@petnow/ui 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +411 -411
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var ru = Object.defineProperty;
|
|
|
2
2
|
var ou = (n, r, e) => r in n ? ru(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var H = (n, r, e) => ou(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import * as W from "react";
|
|
5
|
-
import y, { useRef as U, useCallback as Le, useEffect as Oe, useState as
|
|
5
|
+
import y, { useRef as U, useCallback as Le, useEffect as Oe, useState as ce, useMemo as Z, useLayoutEffect as ga, createContext as Me, useContext as ve, forwardRef as xs, Fragment as Ue, isValidElement as au, cloneElement as ba, createElement as ya, useId as tt, useReducer as to, useSyncExternalStore as iu, createRef as st, Component as We } from "react";
|
|
6
6
|
import * as Zn from "react-dom";
|
|
7
7
|
import su, { createPortal as Ds, flushSync as Xe, findDOMNode as lu } from "react-dom";
|
|
8
8
|
var Ko = { exports: {} }, $n = {};
|
|
@@ -42,11 +42,11 @@ var Yn = {};
|
|
|
42
42
|
var mi;
|
|
43
43
|
function uu() {
|
|
44
44
|
return mi || (mi = 1, process.env.NODE_ENV !== "production" && function() {
|
|
45
|
-
var n = y, r = Symbol.for("react.element"), e = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), h = Symbol.iterator,
|
|
46
|
-
function
|
|
45
|
+
var n = y, r = Symbol.for("react.element"), e = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), h = Symbol.iterator, m = "@@iterator";
|
|
46
|
+
function v(b) {
|
|
47
47
|
if (b === null || typeof b != "object")
|
|
48
48
|
return null;
|
|
49
|
-
var F = h && b[h] || b[
|
|
49
|
+
var F = h && b[h] || b[m];
|
|
50
50
|
return typeof F == "function" ? F : null;
|
|
51
51
|
}
|
|
52
52
|
var g = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -534,7 +534,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
534
534
|
else if (Oo(b))
|
|
535
535
|
b._store && (b._store.validated = !0);
|
|
536
536
|
else if (b) {
|
|
537
|
-
var de =
|
|
537
|
+
var de = v(b);
|
|
538
538
|
if (typeof de == "function" && de !== b.entries)
|
|
539
539
|
for (var ye = de.call(b), ae; !(ae = ye.next()).done; )
|
|
540
540
|
Oo(ae.value) && ui(ae.value, F);
|
|
@@ -776,26 +776,26 @@ function gu(n) {
|
|
|
776
776
|
function i(s) {
|
|
777
777
|
const l = [];
|
|
778
778
|
let c = 0, u = 0, d;
|
|
779
|
-
for (let
|
|
780
|
-
let g = s[
|
|
779
|
+
for (let v = 0; v < s.length; v++) {
|
|
780
|
+
let g = s[v];
|
|
781
781
|
if (c === 0) {
|
|
782
|
-
if (g === o && (t || s.slice(
|
|
783
|
-
l.push(s.slice(u,
|
|
782
|
+
if (g === o && (t || s.slice(v, v + a) === r)) {
|
|
783
|
+
l.push(s.slice(u, v)), u = v + a;
|
|
784
784
|
continue;
|
|
785
785
|
}
|
|
786
786
|
if (g === "/") {
|
|
787
|
-
d =
|
|
787
|
+
d = v;
|
|
788
788
|
continue;
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
g === "[" ? c++ : g === "]" && c--;
|
|
792
792
|
}
|
|
793
|
-
const p = l.length === 0 ? s : s.substring(u), f = p.startsWith(_s), h = f ? p.substring(1) : p,
|
|
793
|
+
const p = l.length === 0 ? s : s.substring(u), f = p.startsWith(_s), h = f ? p.substring(1) : p, m = d && d > u ? d - u : void 0;
|
|
794
794
|
return {
|
|
795
795
|
modifiers: l,
|
|
796
796
|
hasImportantModifier: f,
|
|
797
797
|
baseClassName: h,
|
|
798
|
-
maybePostfixModifierPosition:
|
|
798
|
+
maybePostfixModifierPosition: m
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
801
|
return e ? function(l) {
|
|
@@ -962,7 +962,7 @@ function ju(n) {
|
|
|
962
962
|
return Mu.test(n);
|
|
963
963
|
}
|
|
964
964
|
function Wu() {
|
|
965
|
-
const n = we("colors"), r = we("spacing"), e = we("blur"), t = we("brightness"), o = we("borderColor"), a = we("borderRadius"), i = we("borderSpacing"), s = we("borderWidth"), l = we("contrast"), c = we("grayscale"), u = we("hueRotate"), d = we("invert"), p = we("gap"), f = we("gradientColorStops"), h = we("gradientColorStopPositions"),
|
|
965
|
+
const n = we("colors"), r = we("spacing"), e = we("blur"), t = we("brightness"), o = we("borderColor"), a = we("borderRadius"), i = we("borderSpacing"), s = we("borderWidth"), l = we("contrast"), c = we("grayscale"), u = we("hueRotate"), d = we("invert"), p = we("gap"), f = we("gradientColorStops"), h = we("gradientColorStopPositions"), m = we("inset"), v = we("margin"), g = we("opacity"), w = we("padding"), x = we("saturate"), C = we("scale"), P = we("sepia"), R = we("skew"), S = we("space"), M = we("translate"), L = () => ["auto", "contain", "none"], V = () => ["auto", "hidden", "clip", "visible", "scroll"], D = () => ["auto", J, r], E = () => [J, r], _ = () => ["", _t, Ft], k = () => ["auto", en, J], I = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], A = () => ["solid", "dashed", "dotted", "double", "none"], T = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", J], Q = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], X = () => [en, wr], z = () => [en, J];
|
|
966
966
|
return {
|
|
967
967
|
cacheSize: 500,
|
|
968
968
|
separator: ":",
|
|
@@ -1139,63 +1139,63 @@ function Wu() {
|
|
|
1139
1139
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1140
1140
|
*/
|
|
1141
1141
|
inset: [{
|
|
1142
|
-
inset: [
|
|
1142
|
+
inset: [m]
|
|
1143
1143
|
}],
|
|
1144
1144
|
/**
|
|
1145
1145
|
* Right / Left
|
|
1146
1146
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1147
1147
|
*/
|
|
1148
1148
|
"inset-x": [{
|
|
1149
|
-
"inset-x": [
|
|
1149
|
+
"inset-x": [m]
|
|
1150
1150
|
}],
|
|
1151
1151
|
/**
|
|
1152
1152
|
* Top / Bottom
|
|
1153
1153
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1154
1154
|
*/
|
|
1155
1155
|
"inset-y": [{
|
|
1156
|
-
"inset-y": [
|
|
1156
|
+
"inset-y": [m]
|
|
1157
1157
|
}],
|
|
1158
1158
|
/**
|
|
1159
1159
|
* Start
|
|
1160
1160
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1161
1161
|
*/
|
|
1162
1162
|
start: [{
|
|
1163
|
-
start: [
|
|
1163
|
+
start: [m]
|
|
1164
1164
|
}],
|
|
1165
1165
|
/**
|
|
1166
1166
|
* End
|
|
1167
1167
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1168
1168
|
*/
|
|
1169
1169
|
end: [{
|
|
1170
|
-
end: [
|
|
1170
|
+
end: [m]
|
|
1171
1171
|
}],
|
|
1172
1172
|
/**
|
|
1173
1173
|
* Top
|
|
1174
1174
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1175
1175
|
*/
|
|
1176
1176
|
top: [{
|
|
1177
|
-
top: [
|
|
1177
|
+
top: [m]
|
|
1178
1178
|
}],
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Right
|
|
1181
1181
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1182
1182
|
*/
|
|
1183
1183
|
right: [{
|
|
1184
|
-
right: [
|
|
1184
|
+
right: [m]
|
|
1185
1185
|
}],
|
|
1186
1186
|
/**
|
|
1187
1187
|
* Bottom
|
|
1188
1188
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1189
1189
|
*/
|
|
1190
1190
|
bottom: [{
|
|
1191
|
-
bottom: [
|
|
1191
|
+
bottom: [m]
|
|
1192
1192
|
}],
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Left
|
|
1195
1195
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1196
1196
|
*/
|
|
1197
1197
|
left: [{
|
|
1198
|
-
left: [
|
|
1198
|
+
left: [m]
|
|
1199
1199
|
}],
|
|
1200
1200
|
/**
|
|
1201
1201
|
* Visibility
|
|
@@ -1493,63 +1493,63 @@ function Wu() {
|
|
|
1493
1493
|
* @see https://tailwindcss.com/docs/margin
|
|
1494
1494
|
*/
|
|
1495
1495
|
m: [{
|
|
1496
|
-
m: [
|
|
1496
|
+
m: [v]
|
|
1497
1497
|
}],
|
|
1498
1498
|
/**
|
|
1499
1499
|
* Margin X
|
|
1500
1500
|
* @see https://tailwindcss.com/docs/margin
|
|
1501
1501
|
*/
|
|
1502
1502
|
mx: [{
|
|
1503
|
-
mx: [
|
|
1503
|
+
mx: [v]
|
|
1504
1504
|
}],
|
|
1505
1505
|
/**
|
|
1506
1506
|
* Margin Y
|
|
1507
1507
|
* @see https://tailwindcss.com/docs/margin
|
|
1508
1508
|
*/
|
|
1509
1509
|
my: [{
|
|
1510
|
-
my: [
|
|
1510
|
+
my: [v]
|
|
1511
1511
|
}],
|
|
1512
1512
|
/**
|
|
1513
1513
|
* Margin Start
|
|
1514
1514
|
* @see https://tailwindcss.com/docs/margin
|
|
1515
1515
|
*/
|
|
1516
1516
|
ms: [{
|
|
1517
|
-
ms: [
|
|
1517
|
+
ms: [v]
|
|
1518
1518
|
}],
|
|
1519
1519
|
/**
|
|
1520
1520
|
* Margin End
|
|
1521
1521
|
* @see https://tailwindcss.com/docs/margin
|
|
1522
1522
|
*/
|
|
1523
1523
|
me: [{
|
|
1524
|
-
me: [
|
|
1524
|
+
me: [v]
|
|
1525
1525
|
}],
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Margin Top
|
|
1528
1528
|
* @see https://tailwindcss.com/docs/margin
|
|
1529
1529
|
*/
|
|
1530
1530
|
mt: [{
|
|
1531
|
-
mt: [
|
|
1531
|
+
mt: [v]
|
|
1532
1532
|
}],
|
|
1533
1533
|
/**
|
|
1534
1534
|
* Margin Right
|
|
1535
1535
|
* @see https://tailwindcss.com/docs/margin
|
|
1536
1536
|
*/
|
|
1537
1537
|
mr: [{
|
|
1538
|
-
mr: [
|
|
1538
|
+
mr: [v]
|
|
1539
1539
|
}],
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Margin Bottom
|
|
1542
1542
|
* @see https://tailwindcss.com/docs/margin
|
|
1543
1543
|
*/
|
|
1544
1544
|
mb: [{
|
|
1545
|
-
mb: [
|
|
1545
|
+
mb: [v]
|
|
1546
1546
|
}],
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Margin Left
|
|
1549
1549
|
* @see https://tailwindcss.com/docs/margin
|
|
1550
1550
|
*/
|
|
1551
1551
|
ml: [{
|
|
1552
|
-
ml: [
|
|
1552
|
+
ml: [v]
|
|
1553
1553
|
}],
|
|
1554
1554
|
/**
|
|
1555
1555
|
* Space Between X
|
|
@@ -3357,7 +3357,7 @@ function pd() {
|
|
|
3357
3357
|
};
|
|
3358
3358
|
}
|
|
3359
3359
|
function Da(n) {
|
|
3360
|
-
let { onHoverStart: r, onHoverChange: e, onHoverEnd: t, isDisabled: o } = n, [a, i] =
|
|
3360
|
+
let { onHoverStart: r, onHoverChange: e, onHoverEnd: t, isDisabled: o } = n, [a, i] = ce(!1), s = U({
|
|
3361
3361
|
isHovered: !1,
|
|
3362
3362
|
ignoreEmulatedMouseEvents: !1,
|
|
3363
3363
|
pointerType: "",
|
|
@@ -3368,19 +3368,19 @@ function Da(n) {
|
|
|
3368
3368
|
let u = (f, h) => {
|
|
3369
3369
|
if (s.pointerType = h, o || h === "touch" || s.isHovered || !f.currentTarget.contains(f.target)) return;
|
|
3370
3370
|
s.isHovered = !0;
|
|
3371
|
-
let
|
|
3372
|
-
s.target =
|
|
3371
|
+
let m = f.currentTarget;
|
|
3372
|
+
s.target = m, r && r({
|
|
3373
3373
|
type: "hoverstart",
|
|
3374
|
-
target:
|
|
3374
|
+
target: m,
|
|
3375
3375
|
pointerType: h
|
|
3376
3376
|
}), e && e(!0), i(!0);
|
|
3377
3377
|
}, d = (f, h) => {
|
|
3378
3378
|
if (s.pointerType = "", s.target = null, h === "touch" || !s.isHovered) return;
|
|
3379
3379
|
s.isHovered = !1;
|
|
3380
|
-
let
|
|
3380
|
+
let m = f.currentTarget;
|
|
3381
3381
|
t && t({
|
|
3382
3382
|
type: "hoverend",
|
|
3383
|
-
target:
|
|
3383
|
+
target: m,
|
|
3384
3384
|
pointerType: h
|
|
3385
3385
|
}), e && e(!1), i(!1);
|
|
3386
3386
|
}, p = {};
|
|
@@ -3420,7 +3420,7 @@ function Ea(n = {}) {
|
|
|
3420
3420
|
let { autoFocus: r = !1, isTextInput: e, within: t } = n, o = U({
|
|
3421
3421
|
isFocused: !1,
|
|
3422
3422
|
isFocusVisible: r || Ys()
|
|
3423
|
-
}), [a, i] =
|
|
3423
|
+
}), [a, i] = ce(!1), [s, l] = ce(() => o.current.isFocused && o.current.isFocusVisible), c = Le(() => l(o.current.isFocused && o.current.isFocusVisible), []), u = Le((f) => {
|
|
3424
3424
|
o.current.isFocused = f, i(f), c();
|
|
3425
3425
|
}, [
|
|
3426
3426
|
c
|
|
@@ -3518,7 +3518,7 @@ function lt() {
|
|
|
3518
3518
|
return r;
|
|
3519
3519
|
}
|
|
3520
3520
|
function Rt() {
|
|
3521
|
-
let [n] =
|
|
3521
|
+
let [n] = ce(lt);
|
|
3522
3522
|
return Oe(() => () => n.dispose(), [n]), n;
|
|
3523
3523
|
}
|
|
3524
3524
|
let ne = (n, r) => {
|
|
@@ -3542,7 +3542,7 @@ function bd(n, r) {
|
|
|
3542
3542
|
return !(!n || !r || n.right < r.left || n.left > r.right || n.bottom < r.top || n.top > r.bottom);
|
|
3543
3543
|
}
|
|
3544
3544
|
function js({ disabled: n = !1 } = {}) {
|
|
3545
|
-
let r = U(null), [e, t] =
|
|
3545
|
+
let r = U(null), [e, t] = ce(!1), o = Rt(), a = $(() => {
|
|
3546
3546
|
r.current = null, t(!1), o.dispose();
|
|
3547
3547
|
}), i = $((s) => {
|
|
3548
3548
|
if (o.dispose(), r.current === null) {
|
|
@@ -3601,7 +3601,7 @@ function xr(n, r = {}, e, t, o) {
|
|
|
3601
3601
|
let d = {};
|
|
3602
3602
|
if (r) {
|
|
3603
3603
|
let p = !1, f = [];
|
|
3604
|
-
for (let [h,
|
|
3604
|
+
for (let [h, m] of Object.entries(r)) typeof m == "boolean" && (p = !0), m === !0 && f.push(h.replace(/([A-Z])/g, (v) => `-${v.toLowerCase()}`));
|
|
3605
3605
|
if (p) {
|
|
3606
3606
|
d["data-headlessui-state"] = f.join(" ");
|
|
3607
3607
|
for (let h of f) d[`data-${h}`] = "";
|
|
@@ -3613,9 +3613,9 @@ function xr(n, r = {}, e, t, o) {
|
|
|
3613
3613
|
`)].join(`
|
|
3614
3614
|
`));
|
|
3615
3615
|
} else {
|
|
3616
|
-
let p = u.props, f = p == null ? void 0 : p.className, h = typeof f == "function" ? (...g) => ea(f(...g), l.className) : ea(f, l.className),
|
|
3617
|
-
for (let g in d) g in
|
|
3618
|
-
return ba(u, Object.assign({},
|
|
3616
|
+
let p = u.props, f = p == null ? void 0 : p.className, h = typeof f == "function" ? (...g) => ea(f(...g), l.className) : ea(f, l.className), m = h ? { className: h } : {}, v = Ws(u.props, $t(Ro(l, ["ref"])));
|
|
3617
|
+
for (let g in d) g in v && delete d[g];
|
|
3618
|
+
return ba(u, Object.assign({}, v, d, c, { ref: o(u.ref, c.ref) }, m));
|
|
3619
3619
|
}
|
|
3620
3620
|
return ya(a, Object.assign({}, Ro(l, ["ref"]), a !== Ue && c, a !== Ue && d), u);
|
|
3621
3621
|
}
|
|
@@ -3668,11 +3668,11 @@ function Ro(n, r = []) {
|
|
|
3668
3668
|
return e;
|
|
3669
3669
|
}
|
|
3670
3670
|
function Hs(n, r, e) {
|
|
3671
|
-
let [t, o] =
|
|
3671
|
+
let [t, o] = ce(e), a = n !== void 0, i = U(a), s = U(!1), l = U(!1);
|
|
3672
3672
|
return a && !i.current && !s.current ? (s.current = !0, i.current = a, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !a && i.current && !l.current && (l.current = !0, i.current = a, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [a ? n : t, $((c) => (a || o(c), r == null ? void 0 : r(c)))];
|
|
3673
3673
|
}
|
|
3674
3674
|
function Bs(n) {
|
|
3675
|
-
let [r] =
|
|
3675
|
+
let [r] = ce(n);
|
|
3676
3676
|
return r;
|
|
3677
3677
|
}
|
|
3678
3678
|
function Vs(n = {}, r = null, e = []) {
|
|
@@ -3712,7 +3712,7 @@ function _d({ children: n }) {
|
|
|
3712
3712
|
return e ? Ds(y.createElement(y.Fragment, null, n), e) : null;
|
|
3713
3713
|
}
|
|
3714
3714
|
function Qs({ data: n, form: r, disabled: e, onReset: t, overrides: o }) {
|
|
3715
|
-
let [a, i] =
|
|
3715
|
+
let [a, i] = ce(null), s = Rt();
|
|
3716
3716
|
return Oe(() => {
|
|
3717
3717
|
if (t && a) return s.addEventListener(a, "reset", t);
|
|
3718
3718
|
}, [a, r, t]), y.createElement(_d, null, y.createElement(Cd, { setForm: i, formId: r }), Vs(n).map(([l, c]) => y.createElement(er, { features: kn.Hidden, ...$t({ key: l, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: r, disabled: e, name: l, value: c, ...o }) })));
|
|
@@ -3777,7 +3777,7 @@ function Xs() {
|
|
|
3777
3777
|
return (r = (n = ve(oo)) == null ? void 0 : n.value) != null ? r : void 0;
|
|
3778
3778
|
}
|
|
3779
3779
|
function Md() {
|
|
3780
|
-
let [n, r] =
|
|
3780
|
+
let [n, r] = ce([]);
|
|
3781
3781
|
return [n.length > 0 ? n.join(" ") : void 0, Z(() => function(e) {
|
|
3782
3782
|
let t = $((a) => (r((i) => [...i, a]), () => r((i) => {
|
|
3783
3783
|
let s = i.slice(), l = s.indexOf(a);
|
|
@@ -3794,7 +3794,7 @@ function Rd(n, r) {
|
|
|
3794
3794
|
return _e({ ourProps: u, theirProps: a, slot: c, defaultTag: Td, name: i.name || "Description" });
|
|
3795
3795
|
}
|
|
3796
3796
|
let Nd = De(Rd), Js = Object.assign(Nd, {});
|
|
3797
|
-
var
|
|
3797
|
+
var se = ((n) => (n.Space = " ", n.Enter = "Enter", n.Escape = "Escape", n.Backspace = "Backspace", n.Delete = "Delete", n.ArrowLeft = "ArrowLeft", n.ArrowUp = "ArrowUp", n.ArrowRight = "ArrowRight", n.ArrowDown = "ArrowDown", n.Home = "Home", n.End = "End", n.PageUp = "PageUp", n.PageDown = "PageDown", n.Tab = "Tab", n))(se || {});
|
|
3798
3798
|
let ao = Me(null);
|
|
3799
3799
|
ao.displayName = "LabelContext";
|
|
3800
3800
|
function Zs() {
|
|
@@ -3811,7 +3811,7 @@ function fr(n) {
|
|
|
3811
3811
|
return ((t = n == null ? void 0 : n.length) != null ? t : 0) > 0 ? [o, ...n].filter(Boolean).join(" ") : o;
|
|
3812
3812
|
}
|
|
3813
3813
|
function el({ inherit: n = !1 } = {}) {
|
|
3814
|
-
let r = fr(), [e, t] =
|
|
3814
|
+
let r = fr(), [e, t] = ce([]), o = n ? [r, ...e].filter(Boolean) : e;
|
|
3815
3815
|
return [o.length > 0 ? o.join(" ") : void 0, Z(() => function(a) {
|
|
3816
3816
|
let i = $((l) => (t((c) => [...c, l]), () => t((c) => {
|
|
3817
3817
|
let u = c.slice(), d = u.indexOf(l);
|
|
@@ -3825,9 +3825,9 @@ function Fd(n, r) {
|
|
|
3825
3825
|
var e;
|
|
3826
3826
|
let t = tt(), o = Zs(), a = ka(), i = ro(), { id: s = `headlessui-label-${t}`, htmlFor: l = a ?? ((e = o.props) == null ? void 0 : e.htmlFor), passive: c = !1, ...u } = n, d = $e(r);
|
|
3827
3827
|
ne(() => o.register(s), [s, o.register]);
|
|
3828
|
-
let p = $((
|
|
3829
|
-
let g =
|
|
3830
|
-
if (g instanceof HTMLLabelElement &&
|
|
3828
|
+
let p = $((v) => {
|
|
3829
|
+
let g = v.currentTarget;
|
|
3830
|
+
if (g instanceof HTMLLabelElement && v.preventDefault(), o.props && "onClick" in o.props && typeof o.props.onClick == "function" && o.props.onClick(v), g instanceof HTMLLabelElement) {
|
|
3831
3831
|
let w = document.getElementById(g.htmlFor);
|
|
3832
3832
|
if (w) {
|
|
3833
3833
|
let x = w.getAttribute("disabled");
|
|
@@ -3837,8 +3837,8 @@ function Fd(n, r) {
|
|
|
3837
3837
|
(w instanceof HTMLInputElement && (w.type === "radio" || w.type === "checkbox") || w.role === "radio" || w.role === "checkbox" || w.role === "switch") && w.click(), w.focus({ preventScroll: !0 });
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
}), f = i || !1, h = Z(() => ({ ...o.slot, disabled: f }), [o.slot, f]),
|
|
3841
|
-
return c && ("onClick" in
|
|
3840
|
+
}), f = i || !1, h = Z(() => ({ ...o.slot, disabled: f }), [o.slot, f]), m = { ref: d, ...o.props, id: s, htmlFor: l, onClick: p };
|
|
3841
|
+
return c && ("onClick" in m && (delete m.htmlFor, delete m.onClick), "onClick" in u && delete u.onClick), _e({ ourProps: m, theirProps: u, slot: h, defaultTag: l ? Id : "div", name: o.name || "Label" });
|
|
3842
3842
|
}
|
|
3843
3843
|
let Ld = De(Fd), io = Object.assign(Ld, {}), Ad = Me(() => {
|
|
3844
3844
|
});
|
|
@@ -3857,19 +3857,19 @@ function Hn(n, r, e) {
|
|
|
3857
3857
|
t = u;
|
|
3858
3858
|
let p;
|
|
3859
3859
|
if (e.key && ((i = e.debug) != null && i.call(e)) && (p = Date.now()), o = r(...u), e.key && ((s = e.debug) != null && s.call(e))) {
|
|
3860
|
-
const f = Math.round((Date.now() - c) * 100) / 100, h = Math.round((Date.now() - p) * 100) / 100,
|
|
3860
|
+
const f = Math.round((Date.now() - c) * 100) / 100, h = Math.round((Date.now() - p) * 100) / 100, m = h / 16, v = (g, w) => {
|
|
3861
3861
|
for (g = String(g); g.length < w; )
|
|
3862
3862
|
g = " " + g;
|
|
3863
3863
|
return g;
|
|
3864
3864
|
};
|
|
3865
3865
|
console.info(
|
|
3866
|
-
`%c⏱ ${
|
|
3866
|
+
`%c⏱ ${v(h, 5)} /${v(f, 5)} ms`,
|
|
3867
3867
|
`
|
|
3868
3868
|
font-size: .6rem;
|
|
3869
3869
|
font-weight: bold;
|
|
3870
3870
|
color: hsl(${Math.max(
|
|
3871
3871
|
0,
|
|
3872
|
-
Math.min(120 - 120 *
|
|
3872
|
+
Math.min(120 - 120 * m, 120)
|
|
3873
3873
|
)}deg 100% 31%);`,
|
|
3874
3874
|
e == null ? void 0 : e.key
|
|
3875
3875
|
);
|
|
@@ -4105,10 +4105,10 @@ class Kd {
|
|
|
4105
4105
|
this.options.measureElement(C, void 0, this)
|
|
4106
4106
|
);
|
|
4107
4107
|
});
|
|
4108
|
-
const f = a(d), h = this.options.lanes === 1 ? u[d - 1] : this.getFurthestMeasurement(u, d),
|
|
4108
|
+
const f = a(d), h = this.options.lanes === 1 ? u[d - 1] : this.getFurthestMeasurement(u, d), m = h ? h.end + this.options.gap : t + o, v = s.get(f), g = typeof v == "number" ? v : this.options.estimateSize(d), w = m + g, x = h ? h.lane : d % this.options.lanes;
|
|
4109
4109
|
u[d] = {
|
|
4110
4110
|
index: d,
|
|
4111
|
-
start:
|
|
4111
|
+
start: m,
|
|
4112
4112
|
size: g,
|
|
4113
4113
|
end: w,
|
|
4114
4114
|
key: f,
|
|
@@ -4610,7 +4610,7 @@ function _i(n) {
|
|
|
4610
4610
|
if (typeof e == "string" && e.toLowerCase() === "button") return "button";
|
|
4611
4611
|
}
|
|
4612
4612
|
function dl(n, r) {
|
|
4613
|
-
let [e, t] =
|
|
4613
|
+
let [e, t] = ce(() => _i(n));
|
|
4614
4614
|
return ne(() => {
|
|
4615
4615
|
t(_i(n));
|
|
4616
4616
|
}, [n.type, n.as]), ne(() => {
|
|
@@ -4736,7 +4736,7 @@ function gf(n) {
|
|
|
4736
4736
|
};
|
|
4737
4737
|
}
|
|
4738
4738
|
function bf(n = 0) {
|
|
4739
|
-
let [r, e] =
|
|
4739
|
+
let [r, e] = ce(n), t = Le((l) => e(l), [r]), o = Le((l) => e((c) => c | l), [r]), a = Le((l) => (r & l) === l, [r]), i = Le((l) => e((c) => c & ~l), [e]), s = Le((l) => e((c) => c ^ l), [e]);
|
|
4740
4740
|
return { flags: r, setFlag: t, addFlag: o, hasFlag: a, removeFlag: i, toggleFlag: s };
|
|
4741
4741
|
}
|
|
4742
4742
|
var yf = ((n) => (n[n.None = 0] = "None", n[n.Closed = 1] = "Closed", n[n.Enter = 2] = "Enter", n[n.Leave = 4] = "Leave", n))(yf || {});
|
|
@@ -4746,7 +4746,7 @@ function Ta(n) {
|
|
|
4746
4746
|
return r;
|
|
4747
4747
|
}
|
|
4748
4748
|
function Ra(n, r, e, t) {
|
|
4749
|
-
let [o, a] =
|
|
4749
|
+
let [o, a] = ce(e), { hasFlag: i, addFlag: s, removeFlag: l } = bf(n && o ? 3 : 0), c = U(!1), u = U(!1), d = Rt();
|
|
4750
4750
|
return ne(function p() {
|
|
4751
4751
|
var f;
|
|
4752
4752
|
if (!n) return;
|
|
@@ -4757,8 +4757,8 @@ function Ra(n, r, e, t) {
|
|
|
4757
4757
|
}, run() {
|
|
4758
4758
|
u.current ? e ? (l(3), s(4)) : (l(4), s(3)) : e ? l(1) : s(1);
|
|
4759
4759
|
}, done() {
|
|
4760
|
-
var
|
|
4761
|
-
u.current && typeof h.getAnimations == "function" && h.getAnimations().length > 0 || (c.current = !1, l(7), e || a(!1), (
|
|
4760
|
+
var m;
|
|
4761
|
+
u.current && typeof h.getAnimations == "function" && h.getAnimations().length > 0 || (c.current = !1, l(7), e || a(!1), (m = t == null ? void 0 : t.end) == null || m.call(t, e));
|
|
4762
4762
|
} })) : e ? (s(3), d.nextFrame(() => p())) : void 0;
|
|
4763
4763
|
}, [n, e, r, d]), n ? [o, { closed: i(1), enter: i(2), leave: i(4), transition: i(2) || i(4) }] : [e, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
|
4764
4764
|
}
|
|
@@ -5099,11 +5099,11 @@ const If = async (n, r, e) => {
|
|
|
5099
5099
|
x: u,
|
|
5100
5100
|
y: d
|
|
5101
5101
|
} = Oi(c, t, l), p = t, f = {}, h = 0;
|
|
5102
|
-
for (let
|
|
5102
|
+
for (let m = 0; m < s.length; m++) {
|
|
5103
5103
|
const {
|
|
5104
|
-
name:
|
|
5104
|
+
name: v,
|
|
5105
5105
|
fn: g
|
|
5106
|
-
} = s[
|
|
5106
|
+
} = s[m], {
|
|
5107
5107
|
x: w,
|
|
5108
5108
|
y: x,
|
|
5109
5109
|
data: C,
|
|
@@ -5124,8 +5124,8 @@ const If = async (n, r, e) => {
|
|
|
5124
5124
|
});
|
|
5125
5125
|
u = w ?? u, d = x ?? d, f = {
|
|
5126
5126
|
...f,
|
|
5127
|
-
[
|
|
5128
|
-
...f[
|
|
5127
|
+
[v]: {
|
|
5128
|
+
...f[v],
|
|
5129
5129
|
...C
|
|
5130
5130
|
}
|
|
5131
5131
|
}, P && h <= 50 && (h++, typeof P == "object" && (P.placement && (p = P.placement), P.rects && (c = P.rects === !0 ? await i.getElementRects({
|
|
@@ -5135,7 +5135,7 @@ const If = async (n, r, e) => {
|
|
|
5135
5135
|
}) : P.rects), {
|
|
5136
5136
|
x: u,
|
|
5137
5137
|
y: d
|
|
5138
|
-
} = Oi(c, p, l)),
|
|
5138
|
+
} = Oi(c, p, l)), m = -1);
|
|
5139
5139
|
}
|
|
5140
5140
|
return {
|
|
5141
5141
|
x: u,
|
|
@@ -5161,8 +5161,8 @@ async function uo(n, r) {
|
|
|
5161
5161
|
elementContext: d = "floating",
|
|
5162
5162
|
altBoundary: p = !1,
|
|
5163
5163
|
padding: f = 0
|
|
5164
|
-
} = hn(r, n), h = vl(f),
|
|
5165
|
-
element: (e = await (a.isElement == null ? void 0 : a.isElement(
|
|
5164
|
+
} = hn(r, n), h = vl(f), v = s[p ? d === "floating" ? "reference" : "floating" : d], g = Hr(await a.getClippingRect({
|
|
5165
|
+
element: (e = await (a.isElement == null ? void 0 : a.isElement(v))) == null || e ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
5166
5166
|
boundary: c,
|
|
5167
5167
|
rootBoundary: u,
|
|
5168
5168
|
strategy: l
|
|
@@ -5211,10 +5211,10 @@ const Ff = (n) => ({
|
|
|
5211
5211
|
const d = vl(u), p = {
|
|
5212
5212
|
x: e,
|
|
5213
5213
|
y: t
|
|
5214
|
-
}, f = La(o), h = Fa(f),
|
|
5214
|
+
}, f = La(o), h = Fa(f), m = await i.getDimensions(c), v = f === "y", g = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", C = a.reference[h] + a.reference[f] - p[f] - a.floating[h], P = p[f] - a.reference[f], R = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
5215
5215
|
let S = R ? R[x] : 0;
|
|
5216
5216
|
(!S || !await (i.isElement == null ? void 0 : i.isElement(R))) && (S = s.floating[x] || a.floating[h]);
|
|
5217
|
-
const M = C / 2 - P / 2, L = S / 2 -
|
|
5217
|
+
const M = C / 2 - P / 2, L = S / 2 - m[h] / 2 - 1, V = bt(d[g], L), D = bt(d[w], L), E = V, _ = S - m[h] - D, k = S / 2 - m[h] / 2 + M, I = oa(E, k, _), A = !l.arrow && Rn(o) != null && k !== I && a.reference[h] / 2 - (k < E ? V : D) - m[h] / 2 < 0, T = A ? k < E ? k - E : k - _ : 0;
|
|
5218
5218
|
return {
|
|
5219
5219
|
[f]: p[f] + T,
|
|
5220
5220
|
data: {
|
|
@@ -5246,14 +5246,14 @@ const Ff = (n) => ({
|
|
|
5246
5246
|
fallbackPlacements: p,
|
|
5247
5247
|
fallbackStrategy: f = "bestFit",
|
|
5248
5248
|
fallbackAxisSideDirection: h = "none",
|
|
5249
|
-
flipAlignment:
|
|
5250
|
-
...
|
|
5249
|
+
flipAlignment: m = !0,
|
|
5250
|
+
...v
|
|
5251
5251
|
} = hn(n, r);
|
|
5252
5252
|
if ((e = a.arrow) != null && e.alignmentOffset)
|
|
5253
5253
|
return {};
|
|
5254
|
-
const g = Qt(o), w = cn(s), x = Qt(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = p || (x || !
|
|
5255
|
-
!p && R && P.push(...Rf(s,
|
|
5256
|
-
const S = [s, ...P], M = await uo(r,
|
|
5254
|
+
const g = Qt(o), w = cn(s), x = Qt(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = p || (x || !m ? [Wr(s)] : Mf(s)), R = h !== "none";
|
|
5255
|
+
!p && R && P.push(...Rf(s, m, h, C));
|
|
5256
|
+
const S = [s, ...P], M = await uo(r, v), L = [];
|
|
5257
5257
|
let V = ((t = a.flip) == null ? void 0 : t.overflows) || [];
|
|
5258
5258
|
if (u && L.push(M[g]), d) {
|
|
5259
5259
|
const k = Pf(o, i, C);
|
|
@@ -5370,11 +5370,11 @@ const $f = function(n) {
|
|
|
5370
5370
|
mainAxis: a = !0,
|
|
5371
5371
|
crossAxis: i = !1,
|
|
5372
5372
|
limiter: s = {
|
|
5373
|
-
fn: (
|
|
5373
|
+
fn: (v) => {
|
|
5374
5374
|
let {
|
|
5375
5375
|
x: g,
|
|
5376
5376
|
y: w
|
|
5377
|
-
} =
|
|
5377
|
+
} = v;
|
|
5378
5378
|
return {
|
|
5379
5379
|
x: g,
|
|
5380
5380
|
y: w
|
|
@@ -5388,23 +5388,23 @@ const $f = function(n) {
|
|
|
5388
5388
|
}, u = await uo(r, l), d = cn(Qt(o)), p = ml(d);
|
|
5389
5389
|
let f = c[p], h = c[d];
|
|
5390
5390
|
if (a) {
|
|
5391
|
-
const
|
|
5391
|
+
const v = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", w = f + u[v], x = f - u[g];
|
|
5392
5392
|
f = oa(w, f, x);
|
|
5393
5393
|
}
|
|
5394
5394
|
if (i) {
|
|
5395
|
-
const
|
|
5395
|
+
const v = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", w = h + u[v], x = h - u[g];
|
|
5396
5396
|
h = oa(w, h, x);
|
|
5397
5397
|
}
|
|
5398
|
-
const
|
|
5398
|
+
const m = s.fn({
|
|
5399
5399
|
...r,
|
|
5400
5400
|
[p]: f,
|
|
5401
5401
|
[d]: h
|
|
5402
5402
|
});
|
|
5403
5403
|
return {
|
|
5404
|
-
...
|
|
5404
|
+
...m,
|
|
5405
5405
|
data: {
|
|
5406
|
-
x:
|
|
5407
|
-
y:
|
|
5406
|
+
x: m.x - e,
|
|
5407
|
+
y: m.y - t
|
|
5408
5408
|
}
|
|
5409
5409
|
};
|
|
5410
5410
|
}
|
|
@@ -5427,11 +5427,11 @@ const $f = function(n) {
|
|
|
5427
5427
|
width: p,
|
|
5428
5428
|
height: f
|
|
5429
5429
|
} = t.floating;
|
|
5430
|
-
let h,
|
|
5431
|
-
c === "top" || c === "bottom" ? (h = c,
|
|
5432
|
-
const
|
|
5430
|
+
let h, m;
|
|
5431
|
+
c === "top" || c === "bottom" ? (h = c, m = u === (await (o.isRTL == null ? void 0 : o.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (m = c, h = u === "end" ? "top" : "bottom");
|
|
5432
|
+
const v = f - l.top - l.bottom, g = p - l.left - l.right, w = bt(f - l[h], v), x = bt(p - l[m], g), C = !r.middlewareData.shift;
|
|
5433
5433
|
let P = w, R = x;
|
|
5434
|
-
if (d ? R = u || C ? bt(x, g) : g : P = u || C ? bt(w,
|
|
5434
|
+
if (d ? R = u || C ? bt(x, g) : g : P = u || C ? bt(w, v) : v, C && !u) {
|
|
5435
5435
|
const M = Ze(l.left, 0), L = Ze(l.right, 0), V = Ze(l.top, 0), D = Ze(l.bottom, 0);
|
|
5436
5436
|
d ? R = p - 2 * (M !== 0 || L !== 0 ? M + L : Ze(l.left, l.right)) : P = f - 2 * (V !== 0 || D !== 0 ? V + D : Ze(l.top, l.bottom));
|
|
5437
5437
|
}
|
|
@@ -5497,10 +5497,10 @@ function un(n, r, e, t) {
|
|
|
5497
5497
|
let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, u = o.width / i.x, d = o.height / i.y;
|
|
5498
5498
|
if (a) {
|
|
5499
5499
|
const p = et(a), f = t && Ve(t) ? et(t) : t;
|
|
5500
|
-
let h = p,
|
|
5501
|
-
for (;
|
|
5502
|
-
const
|
|
5503
|
-
l *=
|
|
5500
|
+
let h = p, m = h.frameElement;
|
|
5501
|
+
for (; m && t && f !== h; ) {
|
|
5502
|
+
const v = xn(m), g = m.getBoundingClientRect(), w = at(m), x = g.left + (m.clientLeft + parseFloat(w.paddingLeft)) * v.x, C = g.top + (m.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
5503
|
+
l *= v.x, c *= v.y, u *= v.x, d *= v.y, l += x, c += C, h = et(m), m = h.frameElement;
|
|
5504
5504
|
}
|
|
5505
5505
|
}
|
|
5506
5506
|
return Hr({
|
|
@@ -5728,8 +5728,8 @@ function tp(n, r) {
|
|
|
5728
5728
|
} = n.getBoundingClientRect();
|
|
5729
5729
|
if (s || r(), !d || !p)
|
|
5730
5730
|
return;
|
|
5731
|
-
const f = Dr(u), h = Dr(o.clientWidth - (c + d)),
|
|
5732
|
-
rootMargin: -f + "px " + -h + "px " + -
|
|
5731
|
+
const f = Dr(u), h = Dr(o.clientWidth - (c + d)), m = Dr(o.clientHeight - (u + p)), v = Dr(c), w = {
|
|
5732
|
+
rootMargin: -f + "px " + -h + "px " + -m + "px " + -v + "px",
|
|
5733
5733
|
threshold: Ze(0, bt(1, l)) || 1
|
|
5734
5734
|
};
|
|
5735
5735
|
let x = !0;
|
|
@@ -5780,11 +5780,11 @@ function Dl(n, r, e, t) {
|
|
|
5780
5780
|
(x = f) == null || x.observe(r);
|
|
5781
5781
|
})), e();
|
|
5782
5782
|
}), c && !l && f.observe(c), f.observe(r));
|
|
5783
|
-
let h,
|
|
5784
|
-
l &&
|
|
5785
|
-
function
|
|
5783
|
+
let h, m = l ? un(n) : null;
|
|
5784
|
+
l && v();
|
|
5785
|
+
function v() {
|
|
5786
5786
|
const g = un(n);
|
|
5787
|
-
|
|
5787
|
+
m && (g.x !== m.x || g.y !== m.y || g.width !== m.width || g.height !== m.height) && e(), m = g, h = requestAnimationFrame(v);
|
|
5788
5788
|
}
|
|
5789
5789
|
return e(), () => {
|
|
5790
5790
|
var g;
|
|
@@ -5873,11 +5873,11 @@ function sp(n) {
|
|
|
5873
5873
|
isPositioned: !1
|
|
5874
5874
|
}), [p, f] = W.useState(t);
|
|
5875
5875
|
Br(p, t) || f(t);
|
|
5876
|
-
const [h,
|
|
5877
|
-
T !== R.current && (R.current = T,
|
|
5876
|
+
const [h, m] = W.useState(null), [v, g] = W.useState(null), w = W.useCallback((T) => {
|
|
5877
|
+
T !== R.current && (R.current = T, m(T));
|
|
5878
5878
|
}, []), x = W.useCallback((T) => {
|
|
5879
5879
|
T !== S.current && (S.current = T, g(T));
|
|
5880
|
-
}, []), C = a || h, P = i ||
|
|
5880
|
+
}, []), C = a || h, P = i || v, R = W.useRef(null), S = W.useRef(null), M = W.useRef(u), L = l != null, V = Ni(l), D = Ni(o), E = W.useCallback(() => {
|
|
5881
5881
|
if (!R.current || !S.current)
|
|
5882
5882
|
return;
|
|
5883
5883
|
const T = {
|
|
@@ -6068,10 +6068,10 @@ const bp = /* @__PURE__ */ W.forwardRef(function(r, e) {
|
|
|
6068
6068
|
transform: f,
|
|
6069
6069
|
...h
|
|
6070
6070
|
} = {},
|
|
6071
|
-
...
|
|
6071
|
+
...m
|
|
6072
6072
|
} = r;
|
|
6073
6073
|
process.env.NODE_ENV !== "production" && (e || Ol("The `ref` prop is required for `FloatingArrow`."));
|
|
6074
|
-
const
|
|
6074
|
+
const v = Sl(), [g, w] = W.useState(!1);
|
|
6075
6075
|
if (Vr(() => {
|
|
6076
6076
|
if (!o) return;
|
|
6077
6077
|
at(o).direction === "rtl" && w(!0);
|
|
@@ -6086,7 +6086,7 @@ const bp = /* @__PURE__ */ W.forwardRef(function(r, e) {
|
|
|
6086
6086
|
bottom: L ? "" : "rotate(180deg)",
|
|
6087
6087
|
right: L ? "rotate(-90deg)" : "rotate(90deg)"
|
|
6088
6088
|
}[S];
|
|
6089
|
-
return /* @__PURE__ */ W.createElement("svg", ia({},
|
|
6089
|
+
return /* @__PURE__ */ W.createElement("svg", ia({}, m, {
|
|
6090
6090
|
"aria-hidden": !0,
|
|
6091
6091
|
ref: e,
|
|
6092
6092
|
width: L ? i : i + x,
|
|
@@ -6102,16 +6102,16 @@ const bp = /* @__PURE__ */ W.forwardRef(function(r, e) {
|
|
|
6102
6102
|
...h
|
|
6103
6103
|
}
|
|
6104
6104
|
}), x > 0 && /* @__PURE__ */ W.createElement("path", {
|
|
6105
|
-
clipPath: "url(#" +
|
|
6105
|
+
clipPath: "url(#" + v + ")",
|
|
6106
6106
|
fill: "none",
|
|
6107
6107
|
stroke: d,
|
|
6108
6108
|
strokeWidth: x + (p ? 0 : 1),
|
|
6109
6109
|
d: I
|
|
6110
6110
|
}), /* @__PURE__ */ W.createElement("path", {
|
|
6111
|
-
stroke: x && !p ?
|
|
6111
|
+
stroke: x && !p ? m.fill : "none",
|
|
6112
6112
|
d: I
|
|
6113
6113
|
}), /* @__PURE__ */ W.createElement("clipPath", {
|
|
6114
|
-
id:
|
|
6114
|
+
id: v
|
|
6115
6115
|
}, /* @__PURE__ */ W.createElement("rect", {
|
|
6116
6116
|
x: -C,
|
|
6117
6117
|
y: C * (L ? -1 : 1),
|
|
@@ -6149,13 +6149,13 @@ function kp(n) {
|
|
|
6149
6149
|
const f = t.reference;
|
|
6150
6150
|
f && !Ve(f) && gp("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
6151
6151
|
}
|
|
6152
|
-
const [l, c] = W.useState(t.reference), u = Cl((f, h,
|
|
6152
|
+
const [l, c] = W.useState(t.reference), u = Cl((f, h, m) => {
|
|
6153
6153
|
a.current.openEvent = f ? h : void 0, i.emit("openchange", {
|
|
6154
6154
|
open: f,
|
|
6155
6155
|
event: h,
|
|
6156
|
-
reason:
|
|
6156
|
+
reason: m,
|
|
6157
6157
|
nested: s
|
|
6158
|
-
}), e == null || e(f, h,
|
|
6158
|
+
}), e == null || e(f, h, m);
|
|
6159
6159
|
}), d = W.useMemo(() => ({
|
|
6160
6160
|
setPositionReference: c
|
|
6161
6161
|
}), []), p = W.useMemo(() => ({
|
|
@@ -6202,26 +6202,26 @@ function Pl(n) {
|
|
|
6202
6202
|
contextElement: x
|
|
6203
6203
|
} : x;
|
|
6204
6204
|
l(C), f.refs.setReference(C);
|
|
6205
|
-
}, [f.refs]),
|
|
6205
|
+
}, [f.refs]), m = W.useCallback((x) => {
|
|
6206
6206
|
(Ve(x) || x === null) && (d.current = x, i(x)), (Ve(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
6207
6207
|
// `null` to support `positionReference` + an unstable `reference`
|
|
6208
6208
|
// callback ref.
|
|
6209
6209
|
x !== null && !Ve(x)) && f.refs.setReference(x);
|
|
6210
|
-
}, [f.refs]),
|
|
6210
|
+
}, [f.refs]), v = W.useMemo(() => ({
|
|
6211
6211
|
...f.refs,
|
|
6212
|
-
setReference:
|
|
6212
|
+
setReference: m,
|
|
6213
6213
|
setPositionReference: h,
|
|
6214
6214
|
domReference: d
|
|
6215
|
-
}), [f.refs,
|
|
6215
|
+
}), [f.refs, m, h]), g = W.useMemo(() => ({
|
|
6216
6216
|
...f.elements,
|
|
6217
6217
|
domReference: u
|
|
6218
6218
|
}), [f.elements, u]), w = W.useMemo(() => ({
|
|
6219
6219
|
...f,
|
|
6220
6220
|
...t,
|
|
6221
|
-
refs:
|
|
6221
|
+
refs: v,
|
|
6222
6222
|
elements: g,
|
|
6223
6223
|
nodeId: r
|
|
6224
|
-
}), [f,
|
|
6224
|
+
}), [f, v, g, r, t]);
|
|
6225
6225
|
return Vr(() => {
|
|
6226
6226
|
t.dataRef.current.floatingContext = w;
|
|
6227
6227
|
const x = p == null ? void 0 : p.nodesRef.current.find((C) => C.id === r);
|
|
@@ -6229,9 +6229,9 @@ function Pl(n) {
|
|
|
6229
6229
|
}), W.useMemo(() => ({
|
|
6230
6230
|
...f,
|
|
6231
6231
|
context: w,
|
|
6232
|
-
refs:
|
|
6232
|
+
refs: v,
|
|
6233
6233
|
elements: g
|
|
6234
|
-
}), [f,
|
|
6234
|
+
}), [f, v, g, w]);
|
|
6235
6235
|
}
|
|
6236
6236
|
const Li = "active", Ai = "selected";
|
|
6237
6237
|
function Lo(n, r, e) {
|
|
@@ -6260,9 +6260,9 @@ function Lo(n, r, e) {
|
|
|
6260
6260
|
if (t.has(c) || t.set(c, []), typeof u == "function") {
|
|
6261
6261
|
var d;
|
|
6262
6262
|
(d = t.get(c)) == null || d.push(u), i[c] = function() {
|
|
6263
|
-
for (var p, f = arguments.length, h = new Array(f),
|
|
6264
|
-
h[
|
|
6265
|
-
return (p = t.get(c)) == null ? void 0 : p.map((
|
|
6263
|
+
for (var p, f = arguments.length, h = new Array(f), m = 0; m < f; m++)
|
|
6264
|
+
h[m] = arguments[m];
|
|
6265
|
+
return (p = t.get(c)) == null ? void 0 : p.map((v) => v(...h)).find((v) => v !== void 0);
|
|
6266
6266
|
};
|
|
6267
6267
|
}
|
|
6268
6268
|
} else
|
|
@@ -6328,14 +6328,14 @@ const Cp = (n) => ({
|
|
|
6328
6328
|
const h = {
|
|
6329
6329
|
...r,
|
|
6330
6330
|
...await $a(-f.offsetTop - p.clientTop - d.reference.height / 2 - f.offsetHeight / 2 - a).fn(r)
|
|
6331
|
-
},
|
|
6331
|
+
}, m = (c == null ? void 0 : c.current) || p, v = await Fo($i(h, m.scrollHeight), u), g = await Fo(h, {
|
|
6332
6332
|
...u,
|
|
6333
6333
|
elementContext: "reference"
|
|
6334
|
-
}), w = Math.max(0,
|
|
6335
|
-
return
|
|
6334
|
+
}), w = Math.max(0, v.top), x = h.y + w, C = Math.max(0, m.scrollHeight - w - Math.max(0, v.bottom));
|
|
6335
|
+
return m.style.maxHeight = C + "px", m.scrollTop = w, o && (m.offsetHeight < f.offsetHeight * Math.min(s, e.current.length - 1) - 1 || g.top >= -l || g.bottom >= -l ? Zn.flushSync(() => o(!0)) : Zn.flushSync(() => o(!1))), t && (t.current = await Fo($i({
|
|
6336
6336
|
...h,
|
|
6337
6337
|
y: x
|
|
6338
|
-
},
|
|
6338
|
+
}, m.offsetHeight), u)), {
|
|
6339
6339
|
y: x
|
|
6340
6340
|
};
|
|
6341
6341
|
}
|
|
@@ -6352,13 +6352,13 @@ function Sp(n, r) {
|
|
|
6352
6352
|
} = r, l = Cl(s), c = W.useRef(!1), u = W.useRef(null), d = W.useRef(null);
|
|
6353
6353
|
W.useEffect(() => {
|
|
6354
6354
|
if (!o) return;
|
|
6355
|
-
function f(
|
|
6356
|
-
if (
|
|
6355
|
+
function f(m) {
|
|
6356
|
+
if (m.ctrlKey || !h || a.current == null)
|
|
6357
6357
|
return;
|
|
6358
|
-
const
|
|
6359
|
-
h.scrollHeight <= h.clientHeight || (!g &&
|
|
6360
|
-
l((R) => R + Math[P](
|
|
6361
|
-
})) : /firefox/i.test(Cf()) && (h.scrollTop +=
|
|
6358
|
+
const v = m.deltaY, g = a.current.top >= -0.5, w = a.current.bottom >= -0.5, x = h.scrollHeight - h.clientHeight, C = v < 0 ? -1 : 1, P = v < 0 ? "max" : "min";
|
|
6359
|
+
h.scrollHeight <= h.clientHeight || (!g && v > 0 || !w && v < 0 ? (m.preventDefault(), Zn.flushSync(() => {
|
|
6360
|
+
l((R) => R + Math[P](v, x * C));
|
|
6361
|
+
})) : /firefox/i.test(Cf()) && (h.scrollTop += v));
|
|
6362
6362
|
}
|
|
6363
6363
|
const h = (i == null ? void 0 : i.current) || t.floating;
|
|
6364
6364
|
if (e && h)
|
|
@@ -6385,7 +6385,7 @@ function Sp(n, r) {
|
|
|
6385
6385
|
if (!(!a.current || !f || !c.current)) {
|
|
6386
6386
|
if (u.current !== null) {
|
|
6387
6387
|
const h = f.scrollTop - u.current;
|
|
6388
|
-
(a.current.bottom < -0.5 && h < -1 || a.current.top < -0.5 && h > 1) && Zn.flushSync(() => l((
|
|
6388
|
+
(a.current.bottom < -0.5 && h < -1 || a.current.top < -0.5 && h > 1) && Zn.flushSync(() => l((m) => m + h));
|
|
6389
6389
|
}
|
|
6390
6390
|
requestAnimationFrame(() => {
|
|
6391
6391
|
u.current = f.scrollTop;
|
|
@@ -6427,13 +6427,13 @@ function Nl(n = null) {
|
|
|
6427
6427
|
}
|
|
6428
6428
|
let Yi = 4;
|
|
6429
6429
|
function Il({ children: n, enabled: r = !0 }) {
|
|
6430
|
-
let [e, t] =
|
|
6430
|
+
let [e, t] = ce(null), [o, a] = ce(0), i = U(null), [s, l] = ce(null);
|
|
6431
6431
|
Pp(s);
|
|
6432
|
-
let c = r && e !== null && s !== null, { to: u = "bottom", gap: d = 0, offset: p = 0, padding: f = 0, inner: h } = Mp(e, s), [
|
|
6432
|
+
let c = r && e !== null && s !== null, { to: u = "bottom", gap: d = 0, offset: p = 0, padding: f = 0, inner: h } = Mp(e, s), [m, v = "center"] = u.split(" ");
|
|
6433
6433
|
ne(() => {
|
|
6434
6434
|
c && a(0);
|
|
6435
6435
|
}, [c]);
|
|
6436
|
-
let { refs: g, floatingStyles: w, context: x } = Pl({ open: c, placement:
|
|
6436
|
+
let { refs: g, floatingStyles: w, context: x } = Pl({ open: c, placement: m === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${m}` : `${m}-${v}`, strategy: "absolute", transform: !1, middleware: [$a({ mainAxis: m === "selection" ? 0 : d, crossAxis: p }), cp({ padding: f }), m !== "selection" && kl({ padding: f }), m === "selection" && h ? Cp({ ...h, padding: f, overflowRef: i, offset: o, minItemsVisible: Yi, referenceOverflowThreshold: f, onFallbackChange(D) {
|
|
6437
6437
|
var E, _;
|
|
6438
6438
|
if (!D) return;
|
|
6439
6439
|
let k = x.elements.floating;
|
|
@@ -6453,8 +6453,8 @@ function Il({ children: n, enabled: r = !0 }) {
|
|
|
6453
6453
|
});
|
|
6454
6454
|
} }) : null, up({ padding: f, apply({ availableWidth: D, availableHeight: E, elements: _ }) {
|
|
6455
6455
|
Object.assign(_.floating.style, { overflow: "auto", maxWidth: `${D}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${E}px)` });
|
|
6456
|
-
} })].filter(Boolean), whileElementsMounted: Dl }), [C =
|
|
6457
|
-
|
|
6456
|
+
} })].filter(Boolean), whileElementsMounted: Dl }), [C = m, P = v] = x.placement.split("-");
|
|
6457
|
+
m === "selection" && (C = "selection");
|
|
6458
6458
|
let R = Z(() => ({ anchor: [C, P].filter(Boolean).join(" ") }), [C, P]), S = Sp(x, { overflowRef: i, onChange: a }), { getReferenceProps: M, getFloatingProps: L } = _p([S]), V = $((D) => {
|
|
6459
6459
|
l(D), g.setFloating(D);
|
|
6460
6460
|
});
|
|
@@ -6492,24 +6492,24 @@ function Ao(n, r, e = void 0) {
|
|
|
6492
6492
|
let f = p.map((h) => window.getComputedStyle(c).getPropertyValue(h));
|
|
6493
6493
|
t.requestAnimationFrame(function h() {
|
|
6494
6494
|
t.nextFrame(h);
|
|
6495
|
-
let
|
|
6495
|
+
let m = !1;
|
|
6496
6496
|
for (let [g, w] of p.entries()) {
|
|
6497
6497
|
let x = window.getComputedStyle(c).getPropertyValue(w);
|
|
6498
6498
|
if (f[g] !== x) {
|
|
6499
|
-
f[g] = x,
|
|
6499
|
+
f[g] = x, m = !0;
|
|
6500
6500
|
break;
|
|
6501
6501
|
}
|
|
6502
6502
|
}
|
|
6503
|
-
if (!
|
|
6504
|
-
let
|
|
6505
|
-
u !==
|
|
6503
|
+
if (!m) return;
|
|
6504
|
+
let v = ji(l, c);
|
|
6505
|
+
u !== v && (d(v), u = v);
|
|
6506
6506
|
});
|
|
6507
6507
|
}
|
|
6508
6508
|
return t.dispose;
|
|
6509
6509
|
}];
|
|
6510
6510
|
}
|
|
6511
6511
|
return [e, null];
|
|
6512
|
-
}), a = Z(() => o(n, r)[0], [n, r]), [i = a, s] =
|
|
6512
|
+
}), a = Z(() => o(n, r)[0], [n, r]), [i = a, s] = ce();
|
|
6513
6513
|
return ne(() => {
|
|
6514
6514
|
let [l, c] = o(n, r);
|
|
6515
6515
|
if (s(l), !!c) return c(s);
|
|
@@ -6536,7 +6536,7 @@ function Tp({ children: n, freeze: r }) {
|
|
|
6536
6536
|
return y.createElement(y.Fragment, null, e);
|
|
6537
6537
|
}
|
|
6538
6538
|
function zr(n, r) {
|
|
6539
|
-
let [e, t] =
|
|
6539
|
+
let [e, t] = ce(r);
|
|
6540
6540
|
return !n && e !== r && t(r), n ? e : r;
|
|
6541
6541
|
}
|
|
6542
6542
|
let fo = Me(null);
|
|
@@ -6630,7 +6630,7 @@ function Wi(n) {
|
|
|
6630
6630
|
return y.createElement(Al.Provider, { value: n.force }, n.children);
|
|
6631
6631
|
}
|
|
6632
6632
|
function Ap(n) {
|
|
6633
|
-
let r = Lp(), e = ve(Yl), t = qt(n), [o, a] =
|
|
6633
|
+
let r = Lp(), e = ve(Yl), t = qt(n), [o, a] = ce(() => {
|
|
6634
6634
|
var i;
|
|
6635
6635
|
if (!r && e !== null) return (i = e.current) != null ? i : null;
|
|
6636
6636
|
if (on.isServer) return null;
|
|
@@ -6649,7 +6649,7 @@ function Ap(n) {
|
|
|
6649
6649
|
let $l = Ue, $p = De(function(n, r) {
|
|
6650
6650
|
let e = n, t = U(null), o = $e(Pd((u) => {
|
|
6651
6651
|
t.current = u;
|
|
6652
|
-
}), r), a = qt(t), i = Ap(t), [s] =
|
|
6652
|
+
}), r), a = qt(t), i = Ap(t), [s] = ce(() => {
|
|
6653
6653
|
var u;
|
|
6654
6654
|
return on.isServer ? null : (u = a == null ? void 0 : a.createElement("div")) != null ? u : null;
|
|
6655
6655
|
}), l = ve(sa), c = hr();
|
|
@@ -6705,8 +6705,8 @@ let Kp = { 1(n) {
|
|
|
6705
6705
|
if ((e = n.dataRef.current) != null && e.disabled || (t = n.dataRef.current) != null && t.optionsRef.current && !((o = n.dataRef.current) != null && o.optionsPropsRef.current.static) && n.comboboxState === 1) return n;
|
|
6706
6706
|
if (n.virtual) {
|
|
6707
6707
|
let { options: u, disabled: d } = n.virtual, p = r.focus === te.Specific ? r.idx : Xn(r, { resolveItems: () => u, resolveActiveIndex: () => {
|
|
6708
|
-
var h,
|
|
6709
|
-
return (
|
|
6708
|
+
var h, m;
|
|
6709
|
+
return (m = (h = n.activeOptionIndex) != null ? h : u.findIndex((v) => !d(v))) != null ? m : null;
|
|
6710
6710
|
}, resolveDisabled: d, resolveId() {
|
|
6711
6711
|
throw new Error("Function not implemented.");
|
|
6712
6712
|
} }), f = (a = r.trigger) != null ? a : 2;
|
|
@@ -6766,7 +6766,7 @@ function qp(n) {
|
|
|
6766
6766
|
}, getScrollElement() {
|
|
6767
6767
|
var c;
|
|
6768
6768
|
return (c = r.optionsRef.current) != null ? c : null;
|
|
6769
|
-
}, overscan: 12 }), [i, s] =
|
|
6769
|
+
}, overscan: 12 }), [i, s] = ce(0);
|
|
6770
6770
|
ne(() => {
|
|
6771
6771
|
s((c) => c + 1);
|
|
6772
6772
|
}, [e]);
|
|
@@ -6797,12 +6797,12 @@ function Gp(n, r) {
|
|
|
6797
6797
|
let Xp = Ue;
|
|
6798
6798
|
function Jp(n, r) {
|
|
6799
6799
|
var e, t;
|
|
6800
|
-
let o = ro(), { value: a, defaultValue: i, onChange: s, form: l, name: c, by: u, disabled: d = o || !1, onClose: p, __demoMode: f = !1, multiple: h = !1, immediate:
|
|
6801
|
-
if (M.current && R.activeOptionIndex === null && (
|
|
6802
|
-
if (
|
|
6803
|
-
let be =
|
|
6800
|
+
let o = ro(), { value: a, defaultValue: i, onChange: s, form: l, name: c, by: u, disabled: d = o || !1, onClose: p, __demoMode: f = !1, multiple: h = !1, immediate: m = !1, virtual: v = null, nullable: g, ...w } = n, x = Bs(i), [C = h ? [] : void 0, P] = Hs(a, s, x), [R, S] = to(Gp, { dataRef: st(), comboboxState: f ? 0 : 1, isTyping: !1, options: [], virtual: v ? { options: v.options, disabled: (e = v.disabled) != null ? e : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, __demoMode: f }), M = U(!1), L = U({ static: !1, hold: !1 }), V = U(null), D = U(null), E = U(null), _ = nl(u), k = $((q) => v ? u === null ? v.options.indexOf(q) : v.options.findIndex((be) => _(be, q)) : R.options.findIndex((be) => _(be.dataRef.current.value, q))), I = Le((q) => Ae(T.mode, { 1: () => C.some((be) => _(be, q)), 0: () => _(C, q) }), [C]), A = $((q) => R.activeOptionIndex === k(q)), T = Z(() => ({ ...R, immediate: m, optionsPropsRef: L, inputRef: V, buttonRef: D, optionsRef: E, value: C, defaultValue: x, disabled: d, mode: h ? 1 : 0, virtual: v ? R.virtual : null, get activeOptionIndex() {
|
|
6801
|
+
if (M.current && R.activeOptionIndex === null && (v ? v.options.length > 0 : R.options.length > 0)) {
|
|
6802
|
+
if (v) {
|
|
6803
|
+
let be = v.options.findIndex((Qe) => {
|
|
6804
6804
|
var ut, Ln;
|
|
6805
|
-
return !((Ln = (ut =
|
|
6805
|
+
return !((Ln = (ut = v.disabled) == null ? void 0 : ut.call(v, Qe)) != null && Ln);
|
|
6806
6806
|
});
|
|
6807
6807
|
if (be !== -1) return be;
|
|
6808
6808
|
}
|
|
@@ -6810,11 +6810,11 @@ function Jp(n, r) {
|
|
|
6810
6810
|
if (q !== -1) return q;
|
|
6811
6811
|
}
|
|
6812
6812
|
return R.activeOptionIndex;
|
|
6813
|
-
}, calculateIndex: k, compare: _, isSelected: I, isActive: A }), [C, x, d, h, f, R,
|
|
6813
|
+
}, calculateIndex: k, compare: _, isSelected: I, isActive: A }), [C, x, d, h, f, R, v]);
|
|
6814
6814
|
ne(() => {
|
|
6815
6815
|
var q;
|
|
6816
|
-
|
|
6817
|
-
}, [
|
|
6816
|
+
v && S({ type: 7, options: v.options, disabled: (q = v.disabled) != null ? q : null });
|
|
6817
|
+
}, [v, v == null ? void 0 : v.options, v == null ? void 0 : v.disabled]), ne(() => {
|
|
6818
6818
|
R.dataRef.current = T;
|
|
6819
6819
|
}, [T]);
|
|
6820
6820
|
let K = T.comboboxState === 0;
|
|
@@ -6854,7 +6854,7 @@ function Jp(n, r) {
|
|
|
6854
6854
|
let Zp = "input";
|
|
6855
6855
|
function eh(n, r) {
|
|
6856
6856
|
var e, t, o, a, i;
|
|
6857
|
-
let s = Fn("Combobox.Input"), l = mr("Combobox.Input"), c = tt(), u = ka(), { id: d = u || `headlessui-combobox-input-${c}`, onChange: p, displayValue: f, disabled: h = s.disabled || !1, autoFocus:
|
|
6857
|
+
let s = Fn("Combobox.Input"), l = mr("Combobox.Input"), c = tt(), u = ka(), { id: d = u || `headlessui-combobox-input-${c}`, onChange: p, displayValue: f, disabled: h = s.disabled || !1, autoFocus: m = !1, type: v = "text", ...g } = n, w = $e(s.inputRef, r, Tl()), x = qt(s.inputRef), C = Rt(), P = $(() => {
|
|
6858
6858
|
l.onChange(null), s.optionsRef.current && (s.optionsRef.current.scrollTop = 0), l.goToOption(te.Nothing);
|
|
6859
6859
|
}), R = Z(() => {
|
|
6860
6860
|
var z;
|
|
@@ -6885,7 +6885,7 @@ function eh(n, r) {
|
|
|
6885
6885
|
});
|
|
6886
6886
|
}), V = $((z) => {
|
|
6887
6887
|
switch (l.setIsTyping(!0), z.key) {
|
|
6888
|
-
case
|
|
6888
|
+
case se.Enter:
|
|
6889
6889
|
if (s.comboboxState !== 0 || S.current) return;
|
|
6890
6890
|
if (z.preventDefault(), z.stopPropagation(), s.activeOptionIndex === null) {
|
|
6891
6891
|
l.closeCombobox();
|
|
@@ -6893,25 +6893,25 @@ function eh(n, r) {
|
|
|
6893
6893
|
}
|
|
6894
6894
|
l.selectActiveOption(), s.mode === 0 && l.closeCombobox();
|
|
6895
6895
|
break;
|
|
6896
|
-
case
|
|
6896
|
+
case se.ArrowDown:
|
|
6897
6897
|
return z.preventDefault(), z.stopPropagation(), Ae(s.comboboxState, { 0: () => l.goToOption(te.Next), 1: () => l.openCombobox() });
|
|
6898
|
-
case
|
|
6898
|
+
case se.ArrowUp:
|
|
6899
6899
|
return z.preventDefault(), z.stopPropagation(), Ae(s.comboboxState, { 0: () => l.goToOption(te.Previous), 1: () => {
|
|
6900
6900
|
Xe(() => l.openCombobox()), s.value || l.goToOption(te.Last);
|
|
6901
6901
|
} });
|
|
6902
|
-
case
|
|
6902
|
+
case se.Home:
|
|
6903
6903
|
if (z.shiftKey) break;
|
|
6904
6904
|
return z.preventDefault(), z.stopPropagation(), l.goToOption(te.First);
|
|
6905
|
-
case
|
|
6905
|
+
case se.PageUp:
|
|
6906
6906
|
return z.preventDefault(), z.stopPropagation(), l.goToOption(te.First);
|
|
6907
|
-
case
|
|
6907
|
+
case se.End:
|
|
6908
6908
|
if (z.shiftKey) break;
|
|
6909
6909
|
return z.preventDefault(), z.stopPropagation(), l.goToOption(te.Last);
|
|
6910
|
-
case
|
|
6910
|
+
case se.PageDown:
|
|
6911
6911
|
return z.preventDefault(), z.stopPropagation(), l.goToOption(te.Last);
|
|
6912
|
-
case
|
|
6912
|
+
case se.Escape:
|
|
6913
6913
|
return s.comboboxState !== 0 ? void 0 : (z.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && z.stopPropagation(), s.mode === 0 && s.value === null && P(), l.closeCombobox());
|
|
6914
|
-
case
|
|
6914
|
+
case se.Tab:
|
|
6915
6915
|
if (s.comboboxState !== 0) return;
|
|
6916
6916
|
s.mode === 0 && s.activationTrigger !== 1 && l.selectActiveOption(), l.closeCombobox();
|
|
6917
6917
|
break;
|
|
@@ -6928,7 +6928,7 @@ function eh(n, r) {
|
|
|
6928
6928
|
(ge = s.buttonRef.current) != null && ge.contains(oe) || (Ce = s.optionsRef.current) != null && Ce.contains(oe) || s.disabled || s.immediate && s.comboboxState !== 0 && C.microTask(() => {
|
|
6929
6929
|
Xe(() => l.openCombobox()), l.setActivationTrigger(1);
|
|
6930
6930
|
});
|
|
6931
|
-
}), k = fr(), I = Xs(), { isFocused: A, focusProps: T } = Ea({ autoFocus:
|
|
6931
|
+
}), k = fr(), I = Xs(), { isFocused: A, focusProps: T } = Ea({ autoFocus: m }), { isHovered: K, hoverProps: O } = Da({ isDisabled: h }), Q = Z(() => ({ open: s.comboboxState === 0, disabled: h, hover: K, focus: A, autofocus: m }), [s, K, A, m, h]), X = dr({ ref: w, id: d, role: "combobox", type: v, "aria-controls": (e = s.optionsRef.current) == null ? void 0 : e.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null ? void 0 : s.virtual ? (t = s.options.find((z) => !z.dataRef.current.disabled && s.compare(z.dataRef.current.value, s.virtual.options[s.activeOptionIndex]))) == null ? void 0 : t.id : (o = s.options[s.activeOptionIndex]) == null ? void 0 : o.id, "aria-labelledby": k, "aria-describedby": I, "aria-autocomplete": "list", defaultValue: (i = (a = n.defaultValue) != null ? a : s.defaultValue !== void 0 ? f == null ? void 0 : f(s.defaultValue) : null) != null ? i : s.defaultValue, disabled: h || void 0, autoFocus: m, onCompositionStart: M, onCompositionEnd: L, onKeyDown: V, onChange: D, onFocus: _, onBlur: E }, T, O);
|
|
6932
6932
|
return _e({ ourProps: X, theirProps: g, slot: Q, defaultTag: Zp, name: "Combobox.Input" });
|
|
6933
6933
|
}
|
|
6934
6934
|
let th = "button";
|
|
@@ -6936,17 +6936,17 @@ function nh(n, r) {
|
|
|
6936
6936
|
var e;
|
|
6937
6937
|
let t = Fn("Combobox.Button"), o = mr("Combobox.Button"), a = $e(t.buttonRef, r), i = tt(), { id: s = `headlessui-combobox-button-${i}`, disabled: l = t.disabled || !1, autoFocus: c = !1, ...u } = n, d = ul(t.inputRef), p = $((S) => {
|
|
6938
6938
|
switch (S.key) {
|
|
6939
|
-
case
|
|
6940
|
-
case
|
|
6939
|
+
case se.Space:
|
|
6940
|
+
case se.Enter:
|
|
6941
6941
|
S.preventDefault(), S.stopPropagation(), t.comboboxState === 1 && Xe(() => o.openCombobox()), d();
|
|
6942
6942
|
return;
|
|
6943
|
-
case
|
|
6943
|
+
case se.ArrowDown:
|
|
6944
6944
|
S.preventDefault(), S.stopPropagation(), t.comboboxState === 1 && (Xe(() => o.openCombobox()), t.value || o.goToOption(te.First)), d();
|
|
6945
6945
|
return;
|
|
6946
|
-
case
|
|
6946
|
+
case se.ArrowUp:
|
|
6947
6947
|
S.preventDefault(), S.stopPropagation(), t.comboboxState === 1 && (Xe(() => o.openCombobox()), t.value || o.goToOption(te.Last)), d();
|
|
6948
6948
|
return;
|
|
6949
|
-
case
|
|
6949
|
+
case se.Escape:
|
|
6950
6950
|
if (t.comboboxState !== 0) return;
|
|
6951
6951
|
S.preventDefault(), t.optionsRef.current && !t.optionsPropsRef.current.static && S.stopPropagation(), Xe(() => o.closeCombobox()), d();
|
|
6952
6952
|
return;
|
|
@@ -6955,15 +6955,15 @@ function nh(n, r) {
|
|
|
6955
6955
|
}
|
|
6956
6956
|
}), f = $((S) => {
|
|
6957
6957
|
S.preventDefault(), !Ks(S.currentTarget) && (S.button === Wa.Left && (t.comboboxState === 0 ? o.closeCombobox() : o.openCombobox()), d());
|
|
6958
|
-
}), h = fr([s]), { isFocusVisible:
|
|
6958
|
+
}), h = fr([s]), { isFocusVisible: m, focusProps: v } = Ea({ autoFocus: c }), { isHovered: g, hoverProps: w } = Da({ isDisabled: l }), { pressed: x, pressProps: C } = js({ disabled: l }), P = Z(() => ({ open: t.comboboxState === 0, active: x || t.comboboxState === 0, disabled: l, value: t.value, hover: g, focus: m }), [t, g, m, x, l]), R = dr({ ref: a, id: s, type: dl(n, t.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (e = t.optionsRef.current) == null ? void 0 : e.id, "aria-expanded": t.comboboxState === 0, "aria-labelledby": h, disabled: l || void 0, autoFocus: c, onMouseDown: f, onKeyDown: p }, v, w, C);
|
|
6959
6959
|
return _e({ ourProps: R, theirProps: u, slot: P, defaultTag: th, name: "Combobox.Button" });
|
|
6960
6960
|
}
|
|
6961
6961
|
let rh = "div", oh = Vt.RenderStrategy | Vt.Static;
|
|
6962
6962
|
function ah(n, r) {
|
|
6963
6963
|
var e, t, o;
|
|
6964
|
-
let a = tt(), { id: i = `headlessui-combobox-options-${a}`, hold: s = !1, anchor: l, portal: c = !1, modal: u = !0, transition: d = !1, ...p } = n, f = Fn("Combobox.Options"), h = mr("Combobox.Options"),
|
|
6965
|
-
|
|
6966
|
-
let [
|
|
6964
|
+
let a = tt(), { id: i = `headlessui-combobox-options-${a}`, hold: s = !1, anchor: l, portal: c = !1, modal: u = !0, transition: d = !1, ...p } = n, f = Fn("Combobox.Options"), h = mr("Combobox.Options"), m = Ml(l);
|
|
6965
|
+
m && (c = !0);
|
|
6966
|
+
let [v, g] = Nl(m), w = Rl(), x = $e(f.optionsRef, r, m ? v : null), C = qt(f.optionsRef), P = In(), [R, S] = Ra(d, f.optionsRef, P !== null ? (P & je.Open) === je.Open : f.comboboxState === 0);
|
|
6967
6967
|
so(R, f.inputRef, h.closeCombobox);
|
|
6968
6968
|
let M = f.__demoMode ? !1 : u && f.comboboxState === 0;
|
|
6969
6969
|
Ma(M, C);
|
|
@@ -6982,7 +6982,7 @@ function ah(n, r) {
|
|
|
6982
6982
|
h.setActivationTrigger(0);
|
|
6983
6983
|
}), _ = $((O) => {
|
|
6984
6984
|
O.preventDefault(), h.setActivationTrigger(0);
|
|
6985
|
-
}), k = dr(
|
|
6985
|
+
}), k = dr(m ? w() : {}, { "aria-labelledby": V, role: "listbox", "aria-multiselectable": f.mode === 1 ? !0 : void 0, id: i, ref: x, style: { ...p.style, ...g, "--input-width": ta(f.inputRef, !0).width, "--button-width": ta(f.buttonRef, !0).width }, onWheel: f.activationTrigger === 0 ? void 0 : E, onMouseDown: _, ...Ta(S) }), I = R && f.comboboxState === 1, A = zr(I, (t = f.virtual) == null ? void 0 : t.options), T = zr(I, f.value), K = $((O) => f.compare(T, O));
|
|
6986
6986
|
if (f.virtual) {
|
|
6987
6987
|
if (A === void 0) throw new Error("Missing `options` in virtual mode");
|
|
6988
6988
|
Object.assign(p, { children: y.createElement(or.Provider, { value: A !== f.virtual.options ? { ...f, virtual: { ...f.virtual, options: A } } : f }, y.createElement(qp, { slot: D }, p.children)) });
|
|
@@ -6992,7 +6992,7 @@ function ah(n, r) {
|
|
|
6992
6992
|
let ih = "div";
|
|
6993
6993
|
function sh(n, r) {
|
|
6994
6994
|
var e, t, o, a;
|
|
6995
|
-
let i = Fn("Combobox.Option"), s = mr("Combobox.Option"), l = tt(), { id: c = `headlessui-combobox-option-${l}`, value: u, disabled: d = (o = (t = (e = i.virtual) == null ? void 0 : e.disabled) == null ? void 0 : t.call(e, u)) != null ? o : !1, order: p = null, ...f } = n, h = ul(i.inputRef),
|
|
6995
|
+
let i = Fn("Combobox.Option"), s = mr("Combobox.Option"), l = tt(), { id: c = `headlessui-combobox-option-${l}`, value: u, disabled: d = (o = (t = (e = i.virtual) == null ? void 0 : e.disabled) == null ? void 0 : t.call(e, u)) != null ? o : !1, order: p = null, ...f } = n, h = ul(i.inputRef), m = i.virtual ? i.activeOptionIndex === i.calculateIndex(u) : i.activeOptionIndex === null ? !1 : ((a = i.options[i.activeOptionIndex]) == null ? void 0 : a.id) === c, v = i.isSelected(u), g = U(null), w = Et({ disabled: d, value: u, domRef: g, order: p }), x = ve(Wl), C = $e(r, g, x ? x.measureElement : null), P = $(() => {
|
|
6996
6996
|
s.setIsTyping(!1), s.onChange(u);
|
|
6997
6997
|
});
|
|
6998
6998
|
ne(() => s.registerOption(c, w), [w, c]);
|
|
@@ -7002,11 +7002,11 @@ function sh(n, r) {
|
|
|
7002
7002
|
R.current = !0;
|
|
7003
7003
|
});
|
|
7004
7004
|
}, [i.virtual, i.__demoMode]), ne(() => {
|
|
7005
|
-
if (R.current && i.comboboxState === 0 &&
|
|
7005
|
+
if (R.current && i.comboboxState === 0 && m && i.activationTrigger !== 0) return lt().requestAnimationFrame(() => {
|
|
7006
7006
|
var k, I;
|
|
7007
7007
|
(I = (k = g.current) == null ? void 0 : k.scrollIntoView) == null || I.call(k, { block: "nearest" });
|
|
7008
7008
|
});
|
|
7009
|
-
}, [g,
|
|
7009
|
+
}, [g, m, i.comboboxState, i.activationTrigger, i.activeOptionIndex]);
|
|
7010
7010
|
let S = $((k) => {
|
|
7011
7011
|
k.preventDefault(), k.button === Wa.Left && (d || (P(), ll() || requestAnimationFrame(() => h()), i.mode === 0 && s.closeCombobox()));
|
|
7012
7012
|
}), M = $(() => {
|
|
@@ -7014,24 +7014,24 @@ function sh(n, r) {
|
|
|
7014
7014
|
let k = i.calculateIndex(u);
|
|
7015
7015
|
s.goToOption(te.Specific, k);
|
|
7016
7016
|
}), L = fl(), V = $((k) => L.update(k)), D = $((k) => {
|
|
7017
|
-
if (!L.wasMoved(k) || d ||
|
|
7017
|
+
if (!L.wasMoved(k) || d || m) return;
|
|
7018
7018
|
let I = i.calculateIndex(u);
|
|
7019
7019
|
s.goToOption(te.Specific, I, 0);
|
|
7020
7020
|
}), E = $((k) => {
|
|
7021
|
-
L.wasMoved(k) && (d ||
|
|
7022
|
-
}), _ = Z(() => ({ active:
|
|
7023
|
-
return _e({ ourProps: { id: c, ref: C, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected":
|
|
7021
|
+
L.wasMoved(k) && (d || m && (i.optionsPropsRef.current.hold || s.goToOption(te.Nothing)));
|
|
7022
|
+
}), _ = Z(() => ({ active: m, focus: m, selected: v, disabled: d }), [m, v, d]);
|
|
7023
|
+
return _e({ ourProps: { id: c, ref: C, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected": v, disabled: void 0, onMouseDown: S, onFocus: M, onPointerEnter: V, onMouseEnter: V, onPointerMove: D, onMouseMove: D, onPointerLeave: E, onMouseLeave: E }, theirProps: f, slot: _, defaultTag: ih, name: "Combobox.Option" });
|
|
7024
7024
|
}
|
|
7025
7025
|
let lh = De(Jp), ch = De(nh), Hl = De(eh), uh = io, Bl = De(ah), Vl = De(sh), dh = Object.assign(lh, { Input: Hl, Button: ch, Label: uh, Options: Bl, Option: Vl });
|
|
7026
7026
|
function fh(n, r = typeof document < "u" ? document.defaultView : null, e) {
|
|
7027
7027
|
let t = Mn(n, "escape");
|
|
7028
7028
|
Pa(r, "keydown", (o) => {
|
|
7029
|
-
t && (o.defaultPrevented || o.key ===
|
|
7029
|
+
t && (o.defaultPrevented || o.key === se.Escape && e(o));
|
|
7030
7030
|
});
|
|
7031
7031
|
}
|
|
7032
7032
|
function ph() {
|
|
7033
7033
|
var n;
|
|
7034
|
-
let [r] =
|
|
7034
|
+
let [r] = ce(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [e, t] = ce((n = r == null ? void 0 : r.matches) != null ? n : !1);
|
|
7035
7035
|
return ne(() => {
|
|
7036
7036
|
if (!r) return;
|
|
7037
7037
|
function o(a) {
|
|
@@ -7053,7 +7053,7 @@ function hh({ defaultContainers: n = [], portals: r, mainTreeNode: e } = {}) {
|
|
|
7053
7053
|
}
|
|
7054
7054
|
let zl = Me(null);
|
|
7055
7055
|
function Hi({ children: n, node: r }) {
|
|
7056
|
-
let [e, t] =
|
|
7056
|
+
let [e, t] = ce(null), o = Ul(r ?? e);
|
|
7057
7057
|
return y.createElement(zl.Provider, { value: o }, n, o === null && y.createElement(er, { features: kn.Hidden, ref: (a) => {
|
|
7058
7058
|
var i, s;
|
|
7059
7059
|
if (a) {
|
|
@@ -7106,18 +7106,18 @@ function gh(n, r) {
|
|
|
7106
7106
|
wn(w, it.Last, { skipElements: [g.relatedTarget, a] });
|
|
7107
7107
|
} });
|
|
7108
7108
|
});
|
|
7109
|
-
}), f = Mn(!!(s & 2), "focus-trap#tab-lock"), h = Rt(),
|
|
7110
|
-
g.key == "Tab" && (
|
|
7111
|
-
|
|
7109
|
+
}), f = Mn(!!(s & 2), "focus-trap#tab-lock"), h = Rt(), m = U(!1), v = { ref: t, onKeyDown(g) {
|
|
7110
|
+
g.key == "Tab" && (m.current = !0, h.requestAnimationFrame(() => {
|
|
7111
|
+
m.current = !1;
|
|
7112
7112
|
}));
|
|
7113
7113
|
}, onBlur(g) {
|
|
7114
7114
|
if (!(s & 4)) return;
|
|
7115
7115
|
let w = Ql(i);
|
|
7116
7116
|
e.current instanceof HTMLElement && w.add(e.current);
|
|
7117
7117
|
let x = g.relatedTarget;
|
|
7118
|
-
x instanceof HTMLElement && x.dataset.headlessuiFocusGuard !== "true" && (Kl(w, x) || (
|
|
7118
|
+
x instanceof HTMLElement && x.dataset.headlessuiFocusGuard !== "true" && (Kl(w, x) || (m.current ? wn(e.current, Ae(d.current, { [Un.Forwards]: () => it.Next, [Un.Backwards]: () => it.Previous }) | it.WrapAround, { relativeTo: g.target }) : g.target instanceof HTMLElement && St(g.target)));
|
|
7119
7119
|
} };
|
|
7120
|
-
return y.createElement(y.Fragment, null, f && y.createElement(er, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: p, features: kn.Focusable }), _e({ ourProps:
|
|
7120
|
+
return y.createElement(y.Fragment, null, f && y.createElement(er, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: p, features: kn.Focusable }), _e({ ourProps: v, theirProps: l, defaultTag: vh, name: "FocusTrap" }), f && y.createElement(er, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: p, features: kn.Focusable }));
|
|
7121
7121
|
}
|
|
7122
7122
|
let bh = De(gh), yh = Object.assign(bh, { features: Zt });
|
|
7123
7123
|
function wh(n = !0) {
|
|
@@ -7212,36 +7212,36 @@ function mo(n) {
|
|
|
7212
7212
|
}
|
|
7213
7213
|
function Gl(n, r) {
|
|
7214
7214
|
let e = Et(n), t = U([]), o = Va(), a = Rt(), i = $((f, h = Yt.Hidden) => {
|
|
7215
|
-
let
|
|
7216
|
-
|
|
7217
|
-
t.current.splice(
|
|
7215
|
+
let m = t.current.findIndex(({ el: v }) => v === f);
|
|
7216
|
+
m !== -1 && (Ae(h, { [Yt.Unmount]() {
|
|
7217
|
+
t.current.splice(m, 1);
|
|
7218
7218
|
}, [Yt.Hidden]() {
|
|
7219
|
-
t.current[
|
|
7219
|
+
t.current[m].state = "hidden";
|
|
7220
7220
|
} }), a.microTask(() => {
|
|
7221
|
-
var
|
|
7222
|
-
!mo(t) && o.current && ((
|
|
7221
|
+
var v;
|
|
7222
|
+
!mo(t) && o.current && ((v = e.current) == null || v.call(e));
|
|
7223
7223
|
}));
|
|
7224
7224
|
}), s = $((f) => {
|
|
7225
|
-
let h = t.current.find(({ el:
|
|
7225
|
+
let h = t.current.find(({ el: m }) => m === f);
|
|
7226
7226
|
return h ? h.state !== "visible" && (h.state = "visible") : t.current.push({ el: f, state: "visible" }), () => i(f, Yt.Unmount);
|
|
7227
|
-
}), l = U([]), c = U(Promise.resolve()), u = U({ enter: [], leave: [] }), d = $((f, h,
|
|
7228
|
-
l.current.splice(0), r && (r.chains.current[h] = r.chains.current[h].filter(([
|
|
7229
|
-
l.current.push(
|
|
7230
|
-
})]), r == null || r.chains.current[h].push([f, new Promise((
|
|
7231
|
-
Promise.all(u.current[h].map(([g, w]) => w)).then(() =>
|
|
7232
|
-
})]), h === "enter" ? c.current = c.current.then(() => r == null ? void 0 : r.wait.current).then(() =>
|
|
7233
|
-
}), p = $((f, h,
|
|
7234
|
-
Promise.all(u.current[h].splice(0).map(([
|
|
7235
|
-
var
|
|
7236
|
-
(
|
|
7237
|
-
}).then(() =>
|
|
7227
|
+
}), l = U([]), c = U(Promise.resolve()), u = U({ enter: [], leave: [] }), d = $((f, h, m) => {
|
|
7228
|
+
l.current.splice(0), r && (r.chains.current[h] = r.chains.current[h].filter(([v]) => v !== f)), r == null || r.chains.current[h].push([f, new Promise((v) => {
|
|
7229
|
+
l.current.push(v);
|
|
7230
|
+
})]), r == null || r.chains.current[h].push([f, new Promise((v) => {
|
|
7231
|
+
Promise.all(u.current[h].map(([g, w]) => w)).then(() => v());
|
|
7232
|
+
})]), h === "enter" ? c.current = c.current.then(() => r == null ? void 0 : r.wait.current).then(() => m(h)) : m(h);
|
|
7233
|
+
}), p = $((f, h, m) => {
|
|
7234
|
+
Promise.all(u.current[h].splice(0).map(([v, g]) => g)).then(() => {
|
|
7235
|
+
var v;
|
|
7236
|
+
(v = l.current.shift()) == null || v();
|
|
7237
|
+
}).then(() => m(h));
|
|
7238
7238
|
});
|
|
7239
7239
|
return Z(() => ({ children: t, register: s, unregister: i, onStart: d, onStop: p, wait: c, chains: u }), [s, i, t, d, p, u, c]);
|
|
7240
7240
|
}
|
|
7241
7241
|
let Xl = Ue, Jl = Vt.RenderStrategy;
|
|
7242
7242
|
function Sh(n, r) {
|
|
7243
7243
|
var e, t;
|
|
7244
|
-
let { transition: o = !0, beforeEnter: a, afterEnter: i, beforeLeave: s, afterLeave: l, enter: c, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo:
|
|
7244
|
+
let { transition: o = !0, beforeEnter: a, afterEnter: i, beforeLeave: s, afterLeave: l, enter: c, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: m, ...v } = n, g = U(null), w = ql(n), x = $e(...w ? [g, r] : r === null ? [] : [r]), C = (e = v.unmount) == null || e ? Yt.Unmount : Yt.Hidden, { show: P, appear: R, initial: S } = _h(), [M, L] = ce(P ? "visible" : "hidden"), V = Ch(), { register: D, unregister: E } = V;
|
|
7245
7245
|
ne(() => D(g), [D, g]), ne(() => {
|
|
7246
7246
|
if (C === Yt.Hidden && g.current) {
|
|
7247
7247
|
if (P && M !== "visible") {
|
|
@@ -7272,21 +7272,21 @@ function Sh(n, r) {
|
|
|
7272
7272
|
Oe(() => {
|
|
7273
7273
|
w && o || (K(P), O(P));
|
|
7274
7274
|
}, [P, w, o]);
|
|
7275
|
-
let Q = !(!o || !w || !_ || k), [, X] = Ra(Q, g, P, { start: K, end: O }), z = $t({ ref: x, className: ((t = ea(
|
|
7276
|
-
return M === "visible" && (fe |= je.Open), M === "hidden" && (fe |= je.Closed), X.enter && (fe |= je.Opening), X.leave && (fe |= je.Closing), y.createElement(ho.Provider, { value: T }, y.createElement(ja, { value: fe }, _e({ ourProps: z, theirProps:
|
|
7275
|
+
let Q = !(!o || !w || !_ || k), [, X] = Ra(Q, g, P, { start: K, end: O }), z = $t({ ref: x, className: ((t = ea(v.className, I && c, I && u, X.enter && c, X.enter && X.closed && u, X.enter && !X.closed && d, X.leave && f, X.leave && !X.closed && h, X.leave && X.closed && m, !X.transition && P && p)) == null ? void 0 : t.trim()) || void 0, ...Ta(X) }), fe = 0;
|
|
7276
|
+
return M === "visible" && (fe |= je.Open), M === "hidden" && (fe |= je.Closed), X.enter && (fe |= je.Opening), X.leave && (fe |= je.Closing), y.createElement(ho.Provider, { value: T }, y.createElement(ja, { value: fe }, _e({ ourProps: z, theirProps: v, defaultTag: Xl, features: Jl, visible: M === "visible", name: "Transition.Child" })));
|
|
7277
7277
|
}
|
|
7278
7278
|
function Oh(n, r) {
|
|
7279
7279
|
let { show: e, appear: t = !1, unmount: o = !0, ...a } = n, i = U(null), s = ql(n), l = $e(...s ? [i, r] : r === null ? [] : [r]);
|
|
7280
7280
|
hr();
|
|
7281
7281
|
let c = In();
|
|
7282
7282
|
if (e === void 0 && c !== null && (e = (c & je.Open) === je.Open), e === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
7283
|
-
let [u, d] =
|
|
7283
|
+
let [u, d] = ce(e ? "visible" : "hidden"), p = Gl(() => {
|
|
7284
7284
|
e || d("hidden");
|
|
7285
|
-
}), [f, h] =
|
|
7285
|
+
}), [f, h] = ce(!0), m = U([e]);
|
|
7286
7286
|
ne(() => {
|
|
7287
|
-
f !== !1 &&
|
|
7288
|
-
}, [
|
|
7289
|
-
let
|
|
7287
|
+
f !== !1 && m.current[m.current.length - 1] !== e && (m.current.push(e), h(!1));
|
|
7288
|
+
}, [m, e]);
|
|
7289
|
+
let v = Z(() => ({ show: e, appear: t, initial: f }), [e, t, f]);
|
|
7290
7290
|
so(e, i, () => d("hidden")), ne(() => {
|
|
7291
7291
|
e ? d("visible") : !mo(p) && i.current !== null && d("hidden");
|
|
7292
7292
|
}, [e, p]);
|
|
@@ -7297,7 +7297,7 @@ function Oh(n, r) {
|
|
|
7297
7297
|
var C;
|
|
7298
7298
|
f && h(!1), (C = n.beforeLeave) == null || C.call(n);
|
|
7299
7299
|
});
|
|
7300
|
-
return y.createElement(ho.Provider, { value: p }, y.createElement(po.Provider, { value:
|
|
7300
|
+
return y.createElement(ho.Provider, { value: p }, y.createElement(po.Provider, { value: v }, _e({ ourProps: { ...g, as: Ue, children: y.createElement(Zl, { ref: l, ...g, ...a, beforeEnter: w, beforeLeave: x }) }, theirProps: {}, defaultTag: Ue, features: Jl, visible: u === "visible", name: "Transition" })));
|
|
7301
7301
|
}
|
|
7302
7302
|
function Ph(n, r) {
|
|
7303
7303
|
let e = ve(po) !== null, t = In() !== null;
|
|
@@ -7327,7 +7327,7 @@ let Bi = De(function(n, r) {
|
|
|
7327
7327
|
}();
|
|
7328
7328
|
let f = In();
|
|
7329
7329
|
o === void 0 && f !== null && (o = (f & je.Open) === je.Open);
|
|
7330
|
-
let h = U(null),
|
|
7330
|
+
let h = U(null), m = $e(h, r), v = qt(h), g = o ? 0 : 1, [w, x] = to(Nh, { titleId: null, descriptionId: null, panelRef: st() }), C = $(() => a(!1)), P = $((Q) => x({ type: 0, id: Q })), R = hr() ? g === 0 : !1, [S, M] = Hp(), L = { get current() {
|
|
7331
7331
|
var Q;
|
|
7332
7332
|
return (Q = w.panelRef.current) != null ? Q : h.current;
|
|
7333
7333
|
} }, V = Ul(), { resolveContainers: D } = hh({ mainTreeNode: V, portals: S, defaultContainers: [L] }), E = f !== null ? (f & je.Closing) === je.Closing : !1;
|
|
@@ -7339,10 +7339,10 @@ let Bi = De(function(n, r) {
|
|
|
7339
7339
|
return [(Q = V == null ? void 0 : V.closest("body > *:not(#headlessui-portal-root)")) != null ? Q : null];
|
|
7340
7340
|
}) }), Oa(R, D, (Q) => {
|
|
7341
7341
|
Q.preventDefault(), C();
|
|
7342
|
-
}), fh(R,
|
|
7342
|
+
}), fh(R, v == null ? void 0 : v.defaultView, (Q) => {
|
|
7343
7343
|
Q.preventDefault(), Q.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), C();
|
|
7344
|
-
}), Ma(c || E ? !1 : R,
|
|
7345
|
-
let [_, k] = Md(), I = Z(() => [{ dialogState: g, close: C, setTitleId: P, unmount: u }, w], [g, w, C, P, u]), A = Z(() => ({ open: g === 0 }), [g]), T = { ref:
|
|
7344
|
+
}), Ma(c || E ? !1 : R, v, D), so(R, h, C);
|
|
7345
|
+
let [_, k] = Md(), I = Z(() => [{ dialogState: g, close: C, setTitleId: P, unmount: u }, w], [g, w, C, P, u]), A = Z(() => ({ open: g === 0 }), [g]), T = { ref: m, id: t, role: s, tabIndex: -1, "aria-modal": c ? void 0 : g === 0 ? !0 : void 0, "aria-labelledby": w.titleId, "aria-describedby": _, unmount: u }, K = !ph(), O = Zt.None;
|
|
7346
7346
|
return R && !c && (O |= Zt.RestoreFocus, O |= Zt.TabLock, l && (O |= Zt.AutoFocus), K && (O |= Zt.InitialFocus)), y.createElement(Rp, null, y.createElement(Wi, { force: !0 }, y.createElement(Ha, null, y.createElement(Ua.Provider, { value: I }, y.createElement(jl, { target: h }, y.createElement(Wi, { force: !1 }, y.createElement(k, { slot: A }, y.createElement(M, null, y.createElement(yh, { initialFocus: i, initialFocusFallback: h, containers: D, features: O }, y.createElement($d, { value: C }, _e({ ourProps: T, theirProps: d, slot: A, defaultTag: Ih, features: Fh, visible: g === 0, name: "Dialog" })))))))))));
|
|
7347
7347
|
}), Ih = "div", Fh = Vt.RenderStrategy | Vt.Static;
|
|
7348
7348
|
function Lh(n, r) {
|
|
@@ -7377,7 +7377,7 @@ let Bh = De(Lh), tc = De($h);
|
|
|
7377
7377
|
De(jh);
|
|
7378
7378
|
let nc = De(Hh), ar = Object.assign(Bh, { Panel: tc, Title: nc, Description: Js });
|
|
7379
7379
|
function Vh(n, r) {
|
|
7380
|
-
let [e, t] =
|
|
7380
|
+
let [e, t] = ce(n), o = Et(n);
|
|
7381
7381
|
return ne(() => t(o.current), [o, t, ...r]), e;
|
|
7382
7382
|
}
|
|
7383
7383
|
function zh(n, r) {
|
|
@@ -7511,9 +7511,9 @@ function Zh(n, r) {
|
|
|
7511
7511
|
let em = Ue;
|
|
7512
7512
|
function tm(n, r) {
|
|
7513
7513
|
var e;
|
|
7514
|
-
let t = ro(), { value: o, defaultValue: a, form: i, name: s, onChange: l, by: c, invalid: u = !1, disabled: d = t || !1, horizontal: p = !1, multiple: f = !1, __demoMode: h = !1, ...
|
|
7515
|
-
const
|
|
7516
|
-
let g = $e(r), w = Bs(a), [x = f ? [] : void 0, C] = Hs(o, l, w), [P, R] = to(Zh, { dataRef: st(), listboxState: h ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, optionsVisible: !1, __demoMode: h }), S = U({ static: !1, hold: !1 }), M = U(null), L = U(null), V = U(/* @__PURE__ */ new Map()), D = nl(c), E = Le((Ee) => Ae(_.mode, { 1: () => x.some((Se) => D(Se, Ee)), 0: () => D(x, Ee) }), [x]), _ = Z(() => ({ ...P, value: x, disabled: d, invalid: u, mode: f ? 1 : 0, orientation:
|
|
7514
|
+
let t = ro(), { value: o, defaultValue: a, form: i, name: s, onChange: l, by: c, invalid: u = !1, disabled: d = t || !1, horizontal: p = !1, multiple: f = !1, __demoMode: h = !1, ...m } = n;
|
|
7515
|
+
const v = p ? "horizontal" : "vertical";
|
|
7516
|
+
let g = $e(r), w = Bs(a), [x = f ? [] : void 0, C] = Hs(o, l, w), [P, R] = to(Zh, { dataRef: st(), listboxState: h ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, optionsVisible: !1, __demoMode: h }), S = U({ static: !1, hold: !1 }), M = U(null), L = U(null), V = U(/* @__PURE__ */ new Map()), D = nl(c), E = Le((Ee) => Ae(_.mode, { 1: () => x.some((Se) => D(Se, Ee)), 0: () => D(x, Ee) }), [x]), _ = Z(() => ({ ...P, value: x, disabled: d, invalid: u, mode: f ? 1 : 0, orientation: v, compare: D, isSelected: E, optionsPropsRef: S, buttonRef: M, optionsRef: L, listRef: V }), [x, d, u, f, P, V]);
|
|
7517
7517
|
ne(() => {
|
|
7518
7518
|
P.dataRef.current = _;
|
|
7519
7519
|
}, [_]);
|
|
@@ -7540,35 +7540,35 @@ function tm(n, r) {
|
|
|
7540
7540
|
} })), ge = $((Ee) => R({ type: 3, value: Ee })), Ce = $(() => R({ type: 4 })), oe = Z(() => ({ onChange: fe, registerOption: z, goToOption: X, closeListbox: O, openListbox: K, selectActiveOption: T, selectOption: A, search: ge, clearSearch: Ce }), []), [Ie, He] = el({ inherit: !0 }), kt = { ref: g }, It = Le(() => {
|
|
7541
7541
|
if (w !== void 0) return C == null ? void 0 : C(w);
|
|
7542
7542
|
}, [C, w]);
|
|
7543
|
-
return y.createElement(He, { value: Ie, props: { htmlFor: (e = _.buttonRef.current) == null ? void 0 : e.id }, slot: { open: _.listboxState === 0, disabled: d } }, y.createElement(Il, null, y.createElement(Qa.Provider, { value: oe }, y.createElement(bo.Provider, { value: _ }, y.createElement(ja, { value: Ae(_.listboxState, { 0: je.Open, 1: je.Closed }) }, s != null && x != null && y.createElement(Qs, { disabled: d, data: { [s]: x }, form: i, onReset: It }), _e({ ourProps: kt, theirProps:
|
|
7543
|
+
return y.createElement(He, { value: Ie, props: { htmlFor: (e = _.buttonRef.current) == null ? void 0 : e.id }, slot: { open: _.listboxState === 0, disabled: d } }, y.createElement(Il, null, y.createElement(Qa.Provider, { value: oe }, y.createElement(bo.Provider, { value: _ }, y.createElement(ja, { value: Ae(_.listboxState, { 0: je.Open, 1: je.Closed }) }, s != null && x != null && y.createElement(Qs, { disabled: d, data: { [s]: x }, form: i, onReset: It }), _e({ ourProps: kt, theirProps: m, slot: I, defaultTag: em, name: "Listbox" }))))));
|
|
7544
7544
|
}
|
|
7545
7545
|
let nm = "button";
|
|
7546
7546
|
function rm(n, r) {
|
|
7547
7547
|
var e;
|
|
7548
7548
|
let t = vr("Listbox.Button"), o = go("Listbox.Button"), a = tt(), i = ka(), { id: s = i || `headlessui-listbox-button-${a}`, disabled: l = t.disabled || !1, autoFocus: c = !1, ...u } = n, d = $e(t.buttonRef, r, Tl()), p = Op(), f = $((D) => {
|
|
7549
7549
|
switch (D.key) {
|
|
7550
|
-
case
|
|
7550
|
+
case se.Enter:
|
|
7551
7551
|
xd(D.currentTarget);
|
|
7552
7552
|
break;
|
|
7553
|
-
case
|
|
7554
|
-
case
|
|
7553
|
+
case se.Space:
|
|
7554
|
+
case se.ArrowDown:
|
|
7555
7555
|
D.preventDefault(), Xe(() => o.openListbox()), t.value || o.goToOption(te.First);
|
|
7556
7556
|
break;
|
|
7557
|
-
case
|
|
7557
|
+
case se.ArrowUp:
|
|
7558
7558
|
D.preventDefault(), Xe(() => o.openListbox()), t.value || o.goToOption(te.Last);
|
|
7559
7559
|
break;
|
|
7560
7560
|
}
|
|
7561
7561
|
}), h = $((D) => {
|
|
7562
7562
|
switch (D.key) {
|
|
7563
|
-
case
|
|
7563
|
+
case se.Space:
|
|
7564
7564
|
D.preventDefault();
|
|
7565
7565
|
break;
|
|
7566
7566
|
}
|
|
7567
|
-
}),
|
|
7567
|
+
}), m = $((D) => {
|
|
7568
7568
|
var E;
|
|
7569
7569
|
if (Ks(D.currentTarget)) return D.preventDefault();
|
|
7570
7570
|
t.listboxState === 0 ? (Xe(() => o.closeListbox()), (E = t.buttonRef.current) == null || E.focus({ preventScroll: !0 })) : (D.preventDefault(), o.openListbox());
|
|
7571
|
-
}),
|
|
7571
|
+
}), v = $((D) => D.preventDefault()), g = fr([s]), w = Xs(), { isFocusVisible: x, focusProps: C } = Ea({ autoFocus: c }), { isHovered: P, hoverProps: R } = Da({ isDisabled: l }), { pressed: S, pressProps: M } = js({ disabled: l }), L = Z(() => ({ open: t.listboxState === 0, active: S || t.listboxState === 0, disabled: l, invalid: t.invalid, value: t.value, hover: P, focus: x, autofocus: c }), [t.listboxState, t.value, l, P, x, S, t.invalid, c]), V = dr(p(), { ref: d, id: s, type: dl(n, t.buttonRef), "aria-haspopup": "listbox", "aria-controls": (e = t.optionsRef.current) == null ? void 0 : e.id, "aria-expanded": t.listboxState === 0, "aria-labelledby": g, "aria-describedby": w, disabled: l || void 0, autoFocus: c, onKeyDown: f, onKeyUp: h, onKeyPress: v, onClick: m }, C, R, M);
|
|
7572
7572
|
return _e({ ourProps: V, theirProps: u, slot: L, defaultTag: nm, name: "Listbox.Button" });
|
|
7573
7573
|
}
|
|
7574
7574
|
let rc = Me(!1), om = "div", am = Vt.RenderStrategy | Vt.Static;
|
|
@@ -7576,13 +7576,13 @@ function im(n, r) {
|
|
|
7576
7576
|
var e;
|
|
7577
7577
|
let t = tt(), { id: o = `headlessui-listbox-options-${t}`, anchor: a, portal: i = !1, modal: s = !0, transition: l = !1, ...c } = n, u = Ml(a);
|
|
7578
7578
|
u && (i = !0);
|
|
7579
|
-
let d = vr("Listbox.Options"), p = go("Listbox.Options"), f = qt(d.optionsRef), h = In(), [
|
|
7580
|
-
so(
|
|
7579
|
+
let d = vr("Listbox.Options"), p = go("Listbox.Options"), f = qt(d.optionsRef), h = In(), [m, v] = Ra(l, d.optionsRef, h !== null ? (h & je.Open) === je.Open : d.listboxState === 0);
|
|
7580
|
+
so(m, d.buttonRef, p.closeListbox);
|
|
7581
7581
|
let g = d.__demoMode ? !1 : s && d.listboxState === 0;
|
|
7582
7582
|
Ma(g, f);
|
|
7583
7583
|
let w = d.__demoMode ? !1 : s && d.listboxState === 0;
|
|
7584
7584
|
_a(w, { allowed: $(() => [d.buttonRef.current, d.optionsRef.current]) });
|
|
7585
|
-
let x = d.listboxState !== 0, C = zh(x, d.buttonRef) ? !1 :
|
|
7585
|
+
let x = d.listboxState !== 0, C = zh(x, d.buttonRef) ? !1 : m, P = m && d.listboxState === 1, R = zr(P, d.value), S = $((O) => d.compare(R, O)), M = Z(() => {
|
|
7586
7586
|
var O;
|
|
7587
7587
|
if (u == null || !((O = u == null ? void 0 : u.to) != null && O.includes("selection"))) return null;
|
|
7588
7588
|
let Q = d.options.findIndex((X) => S(X.dataRef.current.value));
|
|
@@ -7601,29 +7601,29 @@ function im(n, r) {
|
|
|
7601
7601
|
let I = $((O) => {
|
|
7602
7602
|
var Q, X;
|
|
7603
7603
|
switch (k.dispose(), O.key) {
|
|
7604
|
-
case
|
|
7604
|
+
case se.Space:
|
|
7605
7605
|
if (d.searchQuery !== "") return O.preventDefault(), O.stopPropagation(), p.search(O.key);
|
|
7606
|
-
case
|
|
7606
|
+
case se.Enter:
|
|
7607
7607
|
if (O.preventDefault(), O.stopPropagation(), d.activeOptionIndex !== null) {
|
|
7608
7608
|
let { dataRef: z } = d.options[d.activeOptionIndex];
|
|
7609
7609
|
p.onChange(z.current.value);
|
|
7610
7610
|
}
|
|
7611
7611
|
d.mode === 0 && (Xe(() => p.closeListbox()), (Q = d.buttonRef.current) == null || Q.focus({ preventScroll: !0 }));
|
|
7612
7612
|
break;
|
|
7613
|
-
case Ae(d.orientation, { vertical:
|
|
7613
|
+
case Ae(d.orientation, { vertical: se.ArrowDown, horizontal: se.ArrowRight }):
|
|
7614
7614
|
return O.preventDefault(), O.stopPropagation(), p.goToOption(te.Next);
|
|
7615
|
-
case Ae(d.orientation, { vertical:
|
|
7615
|
+
case Ae(d.orientation, { vertical: se.ArrowUp, horizontal: se.ArrowLeft }):
|
|
7616
7616
|
return O.preventDefault(), O.stopPropagation(), p.goToOption(te.Previous);
|
|
7617
|
-
case
|
|
7618
|
-
case
|
|
7617
|
+
case se.Home:
|
|
7618
|
+
case se.PageUp:
|
|
7619
7619
|
return O.preventDefault(), O.stopPropagation(), p.goToOption(te.First);
|
|
7620
|
-
case
|
|
7621
|
-
case
|
|
7620
|
+
case se.End:
|
|
7621
|
+
case se.PageDown:
|
|
7622
7622
|
return O.preventDefault(), O.stopPropagation(), p.goToOption(te.Last);
|
|
7623
|
-
case
|
|
7623
|
+
case se.Escape:
|
|
7624
7624
|
O.preventDefault(), O.stopPropagation(), Xe(() => p.closeListbox()), (X = d.buttonRef.current) == null || X.focus({ preventScroll: !0 });
|
|
7625
7625
|
return;
|
|
7626
|
-
case
|
|
7626
|
+
case se.Tab:
|
|
7627
7627
|
O.preventDefault(), O.stopPropagation(), Xe(() => p.closeListbox()), uf(d.buttonRef.current, O.shiftKey ? it.Previous : it.Next);
|
|
7628
7628
|
break;
|
|
7629
7629
|
default:
|
|
@@ -7633,14 +7633,14 @@ function im(n, r) {
|
|
|
7633
7633
|
}), A = Vh(() => {
|
|
7634
7634
|
var O;
|
|
7635
7635
|
return (O = d.buttonRef.current) == null ? void 0 : O.id;
|
|
7636
|
-
}, [d.buttonRef.current]), T = Z(() => ({ open: d.listboxState === 0 }), [d.listboxState]), K = dr(u ? E() : {}, { id: o, ref: _, "aria-activedescendant": d.activeOptionIndex === null || (e = d.options[d.activeOptionIndex]) == null ? void 0 : e.id, "aria-multiselectable": d.mode === 1 ? !0 : void 0, "aria-labelledby": A, "aria-orientation": d.orientation, onKeyDown: I, role: "listbox", tabIndex: d.listboxState === 0 ? 0 : void 0, style: { ...c.style, ...D, "--button-width": ta(d.buttonRef, !0).width }, ...Ta(
|
|
7637
|
-
return y.createElement(Ha, { enabled: i ? n.static ||
|
|
7636
|
+
}, [d.buttonRef.current]), T = Z(() => ({ open: d.listboxState === 0 }), [d.listboxState]), K = dr(u ? E() : {}, { id: o, ref: _, "aria-activedescendant": d.activeOptionIndex === null || (e = d.options[d.activeOptionIndex]) == null ? void 0 : e.id, "aria-multiselectable": d.mode === 1 ? !0 : void 0, "aria-labelledby": A, "aria-orientation": d.orientation, onKeyDown: I, role: "listbox", tabIndex: d.listboxState === 0 ? 0 : void 0, style: { ...c.style, ...D, "--button-width": ta(d.buttonRef, !0).width }, ...Ta(v) });
|
|
7637
|
+
return y.createElement(Ha, { enabled: i ? n.static || m : !1 }, y.createElement(bo.Provider, { value: d.mode === 1 ? d : { ...d, isSelected: S } }, _e({ ourProps: K, theirProps: c, slot: T, defaultTag: om, features: am, visible: C, name: "Listbox.Options" })));
|
|
7638
7638
|
}
|
|
7639
7639
|
let sm = "div";
|
|
7640
7640
|
function lm(n, r) {
|
|
7641
7641
|
let e = tt(), { id: t = `headlessui-listbox-option-${e}`, disabled: o = !1, value: a, ...i } = n, s = ve(rc) === !0, l = vr("Listbox.Option"), c = go("Listbox.Option"), u = l.activeOptionIndex !== null ? l.options[l.activeOptionIndex].id === t : !1, d = l.isSelected(a), p = U(null), f = Qh(p), h = Et({ disabled: o, value: a, domRef: p, get textValue() {
|
|
7642
7642
|
return f();
|
|
7643
|
-
} }),
|
|
7643
|
+
} }), m = $e(r, p, (M) => {
|
|
7644
7644
|
M ? l.listRef.current.set(t, M) : l.listRef.current.delete(t);
|
|
7645
7645
|
});
|
|
7646
7646
|
ne(() => {
|
|
@@ -7651,7 +7651,7 @@ function lm(n, r) {
|
|
|
7651
7651
|
}, [p, u, l.__demoMode, l.listboxState, l.activationTrigger, l.activeOptionIndex]), ne(() => {
|
|
7652
7652
|
if (!s) return c.registerOption(t, h);
|
|
7653
7653
|
}, [h, t, s]);
|
|
7654
|
-
let
|
|
7654
|
+
let v = $((M) => {
|
|
7655
7655
|
var L;
|
|
7656
7656
|
if (o) return M.preventDefault();
|
|
7657
7657
|
c.onChange(a), l.mode === 0 && (Xe(() => c.closeListbox()), (L = l.buttonRef.current) == null || L.focus({ preventScroll: !0 }));
|
|
@@ -7665,7 +7665,7 @@ function lm(n, r) {
|
|
|
7665
7665
|
}), P = $((M) => {
|
|
7666
7666
|
w.wasMoved(M) && (o || u && c.goToOption(te.Nothing));
|
|
7667
7667
|
}), R = Z(() => ({ active: u, focus: u, selected: d, disabled: o, selectedOption: d && s }), [u, d, o, s]);
|
|
7668
|
-
return !d && s ? null : _e({ ourProps: s ? {} : { id: t, ref:
|
|
7668
|
+
return !d && s ? null : _e({ ourProps: s ? {} : { id: t, ref: m, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": d, disabled: void 0, onClick: v, onFocus: g, onPointerEnter: x, onMouseEnter: x, onPointerMove: C, onMouseMove: C, onPointerLeave: P, onMouseLeave: P }, theirProps: i, slot: R, defaultTag: sm, name: "Listbox.Option" });
|
|
7669
7669
|
}
|
|
7670
7670
|
let cm = Ue;
|
|
7671
7671
|
function um(n, r) {
|
|
@@ -7674,7 +7674,7 @@ function um(n, r) {
|
|
|
7674
7674
|
}
|
|
7675
7675
|
let dm = De(tm), oc = De(rm), fm = io, ac = De(im), ic = De(lm), pm = De(um), hm = Object.assign(dm, { Button: oc, Label: fm, Options: ac, Option: ic, SelectedOption: pm });
|
|
7676
7676
|
const My = ({ checked: n, label: r, onChange: e, termImageUrl: t }) => {
|
|
7677
|
-
const [o, a] =
|
|
7677
|
+
const [o, a] = ce(!1);
|
|
7678
7678
|
return /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
|
|
7679
7679
|
/* @__PURE__ */ N.jsx(mm, { isOpen: o, setIsOpen: a, termImageUrl: t }),
|
|
7680
7680
|
/* @__PURE__ */ N.jsxs("div", { className: "inline-flex items-center", children: [
|
|
@@ -7837,14 +7837,14 @@ var sc = {}, lc = {}, yo = {};
|
|
|
7837
7837
|
}
|
|
7838
7838
|
function h(D, E) {
|
|
7839
7839
|
if (typeof E != "function" && E !== null) throw new TypeError("Super expression must either be null or a function");
|
|
7840
|
-
D.prototype = Object.create(E && E.prototype, { constructor: { value: D, writable: !0, configurable: !0 } }), E &&
|
|
7840
|
+
D.prototype = Object.create(E && E.prototype, { constructor: { value: D, writable: !0, configurable: !0 } }), E && m(D, E);
|
|
7841
7841
|
}
|
|
7842
|
-
function
|
|
7843
|
-
return
|
|
7842
|
+
function m(D, E) {
|
|
7843
|
+
return m = Object.setPrototypeOf || function(_, k) {
|
|
7844
7844
|
return _.__proto__ = k, _;
|
|
7845
|
-
},
|
|
7845
|
+
}, m(D, E);
|
|
7846
7846
|
}
|
|
7847
|
-
function
|
|
7847
|
+
function v(D) {
|
|
7848
7848
|
var E = x();
|
|
7849
7849
|
return function() {
|
|
7850
7850
|
var _, k = C(D);
|
|
@@ -7901,7 +7901,7 @@ var sc = {}, lc = {}, yo = {};
|
|
|
7901
7901
|
}), k;
|
|
7902
7902
|
}
|
|
7903
7903
|
h(E, D);
|
|
7904
|
-
var _ =
|
|
7904
|
+
var _ = v(E);
|
|
7905
7905
|
return f(E, [{ key: "componentDidMount", value: function() {
|
|
7906
7906
|
var I = this.initiate, A = this.onError, T = this.props.scriptUrl;
|
|
7907
7907
|
T && (this.mounted || ((0, t.default)(T).then(I).catch(A), this.mounted = !0));
|
|
@@ -7918,67 +7918,67 @@ var cc = {};
|
|
|
7918
7918
|
(function(n) {
|
|
7919
7919
|
function r(h) {
|
|
7920
7920
|
"@babel/helpers - typeof";
|
|
7921
|
-
return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
7922
|
-
return typeof
|
|
7923
|
-
} : function(
|
|
7924
|
-
return
|
|
7921
|
+
return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(m) {
|
|
7922
|
+
return typeof m;
|
|
7923
|
+
} : function(m) {
|
|
7924
|
+
return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
|
|
7925
7925
|
}, r(h);
|
|
7926
7926
|
}
|
|
7927
7927
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.default = void 0;
|
|
7928
7928
|
var e = y, t = i(yo), o = ["defaultQuery", "left", "top", "popupKey", "popupTitle", "autoClose", "onComplete", "onResize", "onClose", "onSearch", "onError"];
|
|
7929
7929
|
function a(h) {
|
|
7930
7930
|
if (typeof WeakMap != "function") return null;
|
|
7931
|
-
var
|
|
7931
|
+
var m = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap();
|
|
7932
7932
|
return (a = function(g) {
|
|
7933
|
-
return g ?
|
|
7933
|
+
return g ? v : m;
|
|
7934
7934
|
})(h);
|
|
7935
7935
|
}
|
|
7936
|
-
function i(h,
|
|
7936
|
+
function i(h, m) {
|
|
7937
7937
|
if (h && h.__esModule) return h;
|
|
7938
7938
|
if (h === null || r(h) !== "object" && typeof h != "function") return { default: h };
|
|
7939
|
-
var
|
|
7940
|
-
if (
|
|
7939
|
+
var v = a(m);
|
|
7940
|
+
if (v && v.has(h)) return v.get(h);
|
|
7941
7941
|
var g = {}, w = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
7942
7942
|
for (var x in h) if (x != "default" && Object.prototype.hasOwnProperty.call(h, x)) {
|
|
7943
7943
|
var C = w ? Object.getOwnPropertyDescriptor(h, x) : null;
|
|
7944
7944
|
C && (C.get || C.set) ? Object.defineProperty(g, x, C) : g[x] = h[x];
|
|
7945
7945
|
}
|
|
7946
|
-
return g.default = h,
|
|
7946
|
+
return g.default = h, v && v.set(h, g), g;
|
|
7947
7947
|
}
|
|
7948
|
-
function s(h,
|
|
7949
|
-
var
|
|
7948
|
+
function s(h, m) {
|
|
7949
|
+
var v = Object.keys(h);
|
|
7950
7950
|
if (Object.getOwnPropertySymbols) {
|
|
7951
7951
|
var g = Object.getOwnPropertySymbols(h);
|
|
7952
|
-
|
|
7952
|
+
m && (g = g.filter(function(w) {
|
|
7953
7953
|
return Object.getOwnPropertyDescriptor(h, w).enumerable;
|
|
7954
|
-
})),
|
|
7954
|
+
})), v.push.apply(v, g);
|
|
7955
7955
|
}
|
|
7956
|
-
return
|
|
7956
|
+
return v;
|
|
7957
7957
|
}
|
|
7958
7958
|
function l(h) {
|
|
7959
|
-
for (var
|
|
7960
|
-
c(h, g,
|
|
7961
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(
|
|
7962
|
-
Object.defineProperty(h, g, Object.getOwnPropertyDescriptor(
|
|
7959
|
+
for (var m, v = 1; v < arguments.length; v++) m = arguments[v] == null ? {} : arguments[v], v % 2 ? s(Object(m), !0).forEach(function(g) {
|
|
7960
|
+
c(h, g, m[g]);
|
|
7961
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(m)) : s(Object(m)).forEach(function(g) {
|
|
7962
|
+
Object.defineProperty(h, g, Object.getOwnPropertyDescriptor(m, g));
|
|
7963
7963
|
});
|
|
7964
7964
|
return h;
|
|
7965
7965
|
}
|
|
7966
|
-
function c(h,
|
|
7967
|
-
return
|
|
7966
|
+
function c(h, m, v) {
|
|
7967
|
+
return m in h ? Object.defineProperty(h, m, { value: v, enumerable: !0, configurable: !0, writable: !0 }) : h[m] = v, h;
|
|
7968
7968
|
}
|
|
7969
|
-
function u(h,
|
|
7969
|
+
function u(h, m) {
|
|
7970
7970
|
if (h == null) return {};
|
|
7971
|
-
var
|
|
7971
|
+
var v, g, w = d(h, m);
|
|
7972
7972
|
if (Object.getOwnPropertySymbols) {
|
|
7973
7973
|
var x = Object.getOwnPropertySymbols(h);
|
|
7974
|
-
for (g = 0; g < x.length; g++)
|
|
7974
|
+
for (g = 0; g < x.length; g++) v = x[g], 0 <= m.indexOf(v) || Object.prototype.propertyIsEnumerable.call(h, v) && (w[v] = h[v]);
|
|
7975
7975
|
}
|
|
7976
7976
|
return w;
|
|
7977
7977
|
}
|
|
7978
|
-
function d(h,
|
|
7978
|
+
function d(h, m) {
|
|
7979
7979
|
if (h == null) return {};
|
|
7980
|
-
var
|
|
7981
|
-
for (g = 0; g < x.length; g++)
|
|
7980
|
+
var v, g, w = {}, x = Object.keys(h);
|
|
7981
|
+
for (g = 0; g < x.length; g++) v = x[g], 0 <= m.indexOf(v) || (w[v] = h[v]);
|
|
7982
7982
|
return w;
|
|
7983
7983
|
}
|
|
7984
7984
|
function p() {
|
|
@@ -7986,14 +7986,14 @@ var cc = {};
|
|
|
7986
7986
|
(0, e.useEffect)(function() {
|
|
7987
7987
|
(0, t.default)(h);
|
|
7988
7988
|
}, [h]);
|
|
7989
|
-
var
|
|
7990
|
-
var g = l({},
|
|
7989
|
+
var m = (0, e.useCallback)(function(v) {
|
|
7990
|
+
var g = l({}, v), w = g.defaultQuery, x = g.left, C = g.top, P = g.popupKey, R = g.popupTitle, S = g.autoClose, M = g.onComplete, L = g.onResize, V = g.onClose, D = g.onSearch, E = g.onError, _ = u(g, o);
|
|
7991
7991
|
return (0, t.default)(h).then(function(k) {
|
|
7992
7992
|
var I = new k(l(l({}, _), {}, { oncomplete: M, onsearch: D, onresize: L, onclose: V }));
|
|
7993
7993
|
I.open({ q: w, left: x, top: C, popupTitle: R, popupKey: P, autoClose: S });
|
|
7994
7994
|
}).catch(E);
|
|
7995
7995
|
}, [h]);
|
|
7996
|
-
return
|
|
7996
|
+
return m;
|
|
7997
7997
|
}
|
|
7998
7998
|
var f = p;
|
|
7999
7999
|
n.default = f;
|
|
@@ -8014,7 +8014,7 @@ var cc = {};
|
|
|
8014
8014
|
n.default = a;
|
|
8015
8015
|
})(sc);
|
|
8016
8016
|
const Ty = ({ label: n, value: r, onFrontChange: e, onBackChange: t, onPostalCodeChange: o, disabled: a }) => {
|
|
8017
|
-
const [i, s] =
|
|
8017
|
+
const [i, s] = ce(!1), l = (d) => {
|
|
8018
8018
|
let p = d.address, f = "";
|
|
8019
8019
|
d.addressType === "R" && (d.bname !== "" && (f += d.bname), d.buildingName !== "" && (f += f !== "" ? `, ${d.buildingName}` : d.buildingName), p += f !== "" ? ` (${f})` : ""), e(p), o && o(d.zonecode), s(!1);
|
|
8020
8020
|
}, c = () => {
|
|
@@ -8115,7 +8115,7 @@ function bm(n) {
|
|
|
8115
8115
|
return lr({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z" }, child: [] }] })(n);
|
|
8116
8116
|
}
|
|
8117
8117
|
const Ny = ({ title: n, description: r, titleTextClassName: e, descriptionTextClassName: t }) => {
|
|
8118
|
-
const [o, a] =
|
|
8118
|
+
const [o, a] = ce(!1);
|
|
8119
8119
|
return /* @__PURE__ */ N.jsxs(
|
|
8120
8120
|
"div",
|
|
8121
8121
|
{
|
|
@@ -9509,8 +9509,8 @@ function Jr(n) {
|
|
|
9509
9509
|
}
|
|
9510
9510
|
const xv = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Dv = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ev = /^'([^]*?)'?$/, kv = /''/g, _v = /[a-zA-Z]/;
|
|
9511
9511
|
function Ji(n, r, e) {
|
|
9512
|
-
var u, d, p, f, h,
|
|
9513
|
-
const t = mn(), o = (e == null ? void 0 : e.locale) ?? t.locale ?? hc, a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((f = (p = t.locale) == null ? void 0 : p.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, i = (e == null ? void 0 : e.weekStartsOn) ?? ((
|
|
9512
|
+
var u, d, p, f, h, m, v, g;
|
|
9513
|
+
const t = mn(), o = (e == null ? void 0 : e.locale) ?? t.locale ?? hc, a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((f = (p = t.locale) == null ? void 0 : p.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, i = (e == null ? void 0 : e.weekStartsOn) ?? ((m = (h = e == null ? void 0 : e.locale) == null ? void 0 : h.options) == null ? void 0 : m.weekStartsOn) ?? t.weekStartsOn ?? ((g = (v = t.locale) == null ? void 0 : v.options) == null ? void 0 : g.weekStartsOn) ?? 0, s = B(n);
|
|
9514
9514
|
if (!Jr(s))
|
|
9515
9515
|
throw new RangeError("Invalid time value");
|
|
9516
9516
|
let l = r.match(Dv).map((w) => {
|
|
@@ -11100,8 +11100,8 @@ const xg = {
|
|
|
11100
11100
|
T: new wg()
|
|
11101
11101
|
}, Dg = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Eg = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, kg = /^'([^]*?)'?$/, _g = /''/g, Cg = /\S/, Sg = /[a-zA-Z]/;
|
|
11102
11102
|
function Wo(n, r, e, t) {
|
|
11103
|
-
var
|
|
11104
|
-
const o = Nv(), a = (t == null ? void 0 : t.locale) ?? o.locale ?? hc, i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
11103
|
+
var m, v, g, w, x, C, P, R;
|
|
11104
|
+
const o = Nv(), a = (t == null ? void 0 : t.locale) ?? o.locale ?? hc, i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((v = (m = t == null ? void 0 : t.locale) == null ? void 0 : m.options) == null ? void 0 : v.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((w = (g = o.locale) == null ? void 0 : g.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, s = (t == null ? void 0 : t.weekStartsOn) ?? ((C = (x = t == null ? void 0 : t.locale) == null ? void 0 : x.options) == null ? void 0 : C.weekStartsOn) ?? o.weekStartsOn ?? ((R = (P = o.locale) == null ? void 0 : P.options) == null ? void 0 : R.weekStartsOn) ?? 0;
|
|
11105
11105
|
if (r === "")
|
|
11106
11106
|
return n === "" ? B(e) : he(e, NaN);
|
|
11107
11107
|
const l = {
|
|
@@ -11366,14 +11366,14 @@ function Be(n, r) {
|
|
|
11366
11366
|
}
|
|
11367
11367
|
n.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
11368
11368
|
}
|
|
11369
|
-
var
|
|
11370
|
-
return
|
|
11369
|
+
var le = function() {
|
|
11370
|
+
return le = Object.assign || function(e) {
|
|
11371
11371
|
for (var t, o = 1, a = arguments.length; o < a; o++) {
|
|
11372
11372
|
t = arguments[o];
|
|
11373
11373
|
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
11374
11374
|
}
|
|
11375
11375
|
return e;
|
|
11376
|
-
},
|
|
11376
|
+
}, le.apply(this, arguments);
|
|
11377
11377
|
};
|
|
11378
11378
|
function yt(n, r, e) {
|
|
11379
11379
|
if (e || arguments.length === 2) for (var t = 0, o = r.length, a; t < o; t++)
|
|
@@ -12102,11 +12102,11 @@ var vb = (
|
|
|
12102
12102
|
var t = e.startOfWeek(), o = [], a = e.formatWeekNumber(t);
|
|
12103
12103
|
if (e.props.showWeekNumber) {
|
|
12104
12104
|
var i = e.props.onWeekSelect || e.props.showWeekPicker ? e.handleWeekClick.bind(e, t, a) : void 0;
|
|
12105
|
-
o.push(y.createElement(bb,
|
|
12105
|
+
o.push(y.createElement(bb, le({ key: "W" }, r.defaultProps, e.props, { weekNumber: a, date: t, onClick: i })));
|
|
12106
12106
|
}
|
|
12107
12107
|
return o.concat([0, 1, 2, 3, 4, 5, 6].map(function(s) {
|
|
12108
12108
|
var l = Gt(t, s);
|
|
12109
|
-
return y.createElement(gb,
|
|
12109
|
+
return y.createElement(gb, le({}, r.defaultProps, e.props, { ariaLabelPrefixWhenEnabled: e.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: e.props.disabledDayAriaLabelPrefix, key: l.valueOf(), day: l, onClick: e.handleDayClick.bind(e, l), onMouseEnter: e.handleDayMouseEnter.bind(e, l) }));
|
|
12110
12110
|
}));
|
|
12111
12111
|
}, e.startOfWeek = function() {
|
|
12112
12112
|
return Ht(e.props.day, e.props.locale, e.props.calendarStartDay);
|
|
@@ -12248,7 +12248,7 @@ var xb = (
|
|
|
12248
12248
|
return e.props.showWeekPicker ? Ht(h, e.props.locale, e.props.calendarStartDay) : e.props.preSelection;
|
|
12249
12249
|
}, c = function(h) {
|
|
12250
12250
|
return e.props.showWeekPicker ? Ht(h, e.props.locale, e.props.calendarStartDay) : e.props.selected;
|
|
12251
|
-
}, u = e.props.selected ? c(e.props.selected) : void 0, d = e.props.preSelection ? l(e.props.preSelection) : void 0; t.push(y.createElement(yb,
|
|
12251
|
+
}, u = e.props.selected ? c(e.props.selected) : void 0, d = e.props.preSelection ? l(e.props.preSelection) : void 0; t.push(y.createElement(yb, le({}, e.props, { ariaLabelPrefix: e.props.weekAriaLabelPrefix, key: a, day: s, month: ze(e.props.day), onDayClick: e.handleDayClick, onDayMouseEnter: e.handleDayMouseEnter, selected: u, preSelection: d, showWeekNumber: e.props.showWeekNumbers }))), !i; ) {
|
|
12252
12252
|
a++, s = Ur(s, 1);
|
|
12253
12253
|
var p = o && a >= wb, f = !o && !e.isWeekInMonth(s);
|
|
12254
12254
|
if (p || f)
|
|
@@ -12270,7 +12270,7 @@ var xb = (
|
|
|
12270
12270
|
}, e.handleKeyboardNavigation = function(t, o, a) {
|
|
12271
12271
|
var i, s = e.props, l = s.selected, c = s.preSelection, u = s.setPreSelection, d = s.minDate, p = s.maxDate, f = s.showFourColumnMonthYearPicker, h = s.showTwoColumnMonthYearPicker;
|
|
12272
12272
|
if (c) {
|
|
12273
|
-
var
|
|
12273
|
+
var m = bs(f, h), v = e.getVerticalOffset(m), g = (i = zo[m]) === null || i === void 0 ? void 0 : i.grid, w = function(S, M, L) {
|
|
12274
12274
|
var V, D, E = M, _ = L;
|
|
12275
12275
|
switch (S) {
|
|
12276
12276
|
case Y.ArrowRight:
|
|
@@ -12280,10 +12280,10 @@ var xb = (
|
|
|
12280
12280
|
E = Sn(M, Or), _ = L === 0 ? 11 : L - Or;
|
|
12281
12281
|
break;
|
|
12282
12282
|
case Y.ArrowUp:
|
|
12283
|
-
E = Sn(M,
|
|
12283
|
+
E = Sn(M, v), _ = !((V = g == null ? void 0 : g[0]) === null || V === void 0) && V.includes(L) ? L + 12 - v : L - v;
|
|
12284
12284
|
break;
|
|
12285
12285
|
case Y.ArrowDown:
|
|
12286
|
-
E = ct(M,
|
|
12286
|
+
E = ct(M, v), _ = !((D = g == null ? void 0 : g[g.length - 1]) === null || D === void 0) && D.includes(L) ? L - 12 + v : L + v;
|
|
12287
12287
|
break;
|
|
12288
12288
|
}
|
|
12289
12289
|
return { newCalculatedDate: E, newCalculatedMonth: _ };
|
|
@@ -12396,11 +12396,11 @@ var xb = (
|
|
|
12396
12396
|
var o = e.props, a = o.chooseDayAriaLabelPrefix, i = a === void 0 ? "Choose" : a, s = o.disabledDayAriaLabelPrefix, l = s === void 0 ? "Not available" : s, c = o.day, u = o.locale, d = Je(c, t), p = e.isDisabled(d) || e.isExcluded(d) ? l : i;
|
|
12397
12397
|
return "".concat(p, " ").concat(xe(d, "MMMM yyyy", u));
|
|
12398
12398
|
}, e.getQuarterClassNames = function(t) {
|
|
12399
|
-
var o = e.props, a = o.day, i = o.startDate, s = o.endDate, l = o.selected, c = o.minDate, u = o.maxDate, d = o.excludeDates, p = o.includeDates, f = o.filterDate, h = o.preSelection,
|
|
12399
|
+
var o = e.props, a = o.day, i = o.startDate, s = o.endDate, l = o.selected, c = o.minDate, u = o.maxDate, d = o.excludeDates, p = o.includeDates, f = o.filterDate, h = o.preSelection, m = o.disabledKeyboardNavigation, v = (c || u || d || p || f) && Vo(yn(a, t), e.props);
|
|
12400
12400
|
return Ye("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(t), {
|
|
12401
|
-
"react-datepicker__quarter-text--disabled":
|
|
12401
|
+
"react-datepicker__quarter-text--disabled": v,
|
|
12402
12402
|
"react-datepicker__quarter-text--selected": l ? e.isSelectedQuarter(a, t, l) : void 0,
|
|
12403
|
-
"react-datepicker__quarter-text--keyboard-selected": !
|
|
12403
|
+
"react-datepicker__quarter-text--keyboard-selected": !m && h && e.isSelectedQuarter(a, t, h) && !v,
|
|
12404
12404
|
"react-datepicker__quarter-text--in-selecting-range": e.isInSelectingRangeQuarter(t),
|
|
12405
12405
|
"react-datepicker__quarter-text--in-range": i && s ? Sr(i, s, t, a) : void 0,
|
|
12406
12406
|
"react-datepicker__quarter-text--range-start": e.isRangeStartQuarter(t),
|
|
@@ -12509,7 +12509,7 @@ var xb = (
|
|
|
12509
12509
|
y.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, o[e.props.month])
|
|
12510
12510
|
);
|
|
12511
12511
|
}, e.renderDropdown = function(t) {
|
|
12512
|
-
return y.createElement(Eb,
|
|
12512
|
+
return y.createElement(Eb, le({ key: "dropdown" }, e.props, { monthNames: t, onChange: e.onChange, onCancel: e.toggleDropdown }));
|
|
12513
12513
|
}, e.renderScrollMode = function(t) {
|
|
12514
12514
|
var o = e.state.dropdownVisible, a = [e.renderReadView(!o, t)];
|
|
12515
12515
|
return o && a.unshift(e.renderDropdown(t)), a;
|
|
@@ -12603,7 +12603,7 @@ var Cb = (
|
|
|
12603
12603
|
y.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, o)
|
|
12604
12604
|
);
|
|
12605
12605
|
}, e.renderDropdown = function() {
|
|
12606
|
-
return y.createElement(Sb,
|
|
12606
|
+
return y.createElement(Sb, le({ key: "dropdown" }, e.props, { onChange: e.onChange, onCancel: e.toggleDropdown }));
|
|
12607
12607
|
}, e.renderScrollMode = function() {
|
|
12608
12608
|
var t = e.state.dropdownVisible, o = [e.renderReadView(!t)];
|
|
12609
12609
|
return t && o.unshift(e.renderDropdown()), o;
|
|
@@ -12660,8 +12660,8 @@ var Cb = (
|
|
|
12660
12660
|
var a, i;
|
|
12661
12661
|
t.key === Y.Space && (t.preventDefault(), t.key = Y.Enter), (t.key === Y.ArrowUp || t.key === Y.ArrowLeft) && t.target instanceof HTMLElement && t.target.previousSibling && (t.preventDefault(), t.target.previousSibling instanceof HTMLElement && t.target.previousSibling.focus()), (t.key === Y.ArrowDown || t.key === Y.ArrowRight) && t.target instanceof HTMLElement && t.target.nextSibling && (t.preventDefault(), t.target.nextSibling instanceof HTMLElement && t.target.nextSibling.focus()), t.key === Y.Enter && e.handleClick(o), (i = (a = e.props).handleOnKeyDown) === null || i === void 0 || i.call(a, t);
|
|
12662
12662
|
}, e.renderTimes = function() {
|
|
12663
|
-
for (var t, o = [], a = e.props.format ? e.props.format : "p", i = (t = e.props.intervals) !== null && t !== void 0 ? t : r.defaultProps.intervals, s = e.props.selected || e.props.openToDate || me(), l = Nr(s), c = e.props.injectTimes && e.props.injectTimes.sort(function(
|
|
12664
|
-
return
|
|
12663
|
+
for (var t, o = [], a = e.props.format ? e.props.format : "p", i = (t = e.props.intervals) !== null && t !== void 0 ? t : r.defaultProps.intervals, s = e.props.selected || e.props.openToDate || me(), l = Nr(s), c = e.props.injectTimes && e.props.injectTimes.sort(function(v, g) {
|
|
12664
|
+
return v.getTime() - g.getTime();
|
|
12665
12665
|
}), u = 60 * hb(s), d = u / i, p = 0; p < d; p++) {
|
|
12666
12666
|
var f = da(l, p * i);
|
|
12667
12667
|
if (o.push(f), c) {
|
|
@@ -12669,15 +12669,15 @@ var Cb = (
|
|
|
12669
12669
|
o = o.concat(h);
|
|
12670
12670
|
}
|
|
12671
12671
|
}
|
|
12672
|
-
var
|
|
12673
|
-
return g.getTime() <= s.getTime() ? g :
|
|
12672
|
+
var m = o.reduce(function(v, g) {
|
|
12673
|
+
return g.getTime() <= s.getTime() ? g : v;
|
|
12674
12674
|
}, o[0]);
|
|
12675
|
-
return o.map(function(
|
|
12676
|
-
return y.createElement("li", { key:
|
|
12677
|
-
|
|
12675
|
+
return o.map(function(v) {
|
|
12676
|
+
return y.createElement("li", { key: v.valueOf(), onClick: e.handleClick.bind(e, v), className: e.liClasses(v), ref: function(g) {
|
|
12677
|
+
v === m && (e.centerLi = g);
|
|
12678
12678
|
}, onKeyDown: function(g) {
|
|
12679
|
-
e.handleOnKeyDown(g,
|
|
12680
|
-
}, tabIndex:
|
|
12679
|
+
e.handleOnKeyDown(g, v);
|
|
12680
|
+
}, tabIndex: v === m ? 0 : -1, role: "option", "aria-selected": e.isSelectedTime(v) ? "true" : void 0, "aria-disabled": e.isDisabledTime(v) ? "true" : void 0 }, xe(v, a, e.props.locale));
|
|
12681
12681
|
});
|
|
12682
12682
|
}, e;
|
|
12683
12683
|
}
|
|
@@ -12815,23 +12815,23 @@ var Cb = (
|
|
|
12815
12815
|
case Y.ArrowUp: {
|
|
12816
12816
|
if (u === void 0 || d === void 0 || t.props.preSelection == null)
|
|
12817
12817
|
break;
|
|
12818
|
-
var f = Wt(u, d).startPeriod, h = ys,
|
|
12819
|
-
if (
|
|
12820
|
-
var
|
|
12821
|
-
a >= f && a < f +
|
|
12818
|
+
var f = Wt(u, d).startPeriod, h = ys, m = a - h;
|
|
12819
|
+
if (m < f) {
|
|
12820
|
+
var v = d % h;
|
|
12821
|
+
a >= f && a < f + v ? h = v : h += v, m = a - h;
|
|
12822
12822
|
}
|
|
12823
|
-
t.handleYearNavigation(
|
|
12823
|
+
t.handleYearNavigation(m, On(t.props.preSelection, h));
|
|
12824
12824
|
break;
|
|
12825
12825
|
}
|
|
12826
12826
|
case Y.ArrowDown: {
|
|
12827
12827
|
if (u === void 0 || d === void 0 || t.props.preSelection == null)
|
|
12828
12828
|
break;
|
|
12829
|
-
var g = Wt(u, d).endPeriod, h = ys,
|
|
12830
|
-
if (
|
|
12831
|
-
var
|
|
12832
|
-
a <= g && a > g -
|
|
12829
|
+
var g = Wt(u, d).endPeriod, h = ys, m = a + h;
|
|
12830
|
+
if (m > g) {
|
|
12831
|
+
var v = d % h;
|
|
12832
|
+
a <= g && a > g - v ? h = v : h += v, m = a + h;
|
|
12833
12833
|
}
|
|
12834
|
-
t.handleYearNavigation(
|
|
12834
|
+
t.handleYearNavigation(m, Ot(t.props.preSelection, h));
|
|
12835
12835
|
break;
|
|
12836
12836
|
}
|
|
12837
12837
|
}
|
|
@@ -12868,20 +12868,20 @@ var Cb = (
|
|
|
12868
12868
|
var e = this, t = [], o = this.props, a = o.date, i = o.yearItemNumber, s = o.onYearMouseEnter, l = o.onYearMouseLeave;
|
|
12869
12869
|
if (a === void 0)
|
|
12870
12870
|
return null;
|
|
12871
|
-
for (var c = Wt(a, i), u = c.startPeriod, d = c.endPeriod, p = function(
|
|
12872
|
-
t.push(y.createElement("div", { ref: f.YEAR_REFS[
|
|
12873
|
-
e.onYearClick(
|
|
12874
|
-
}, onKeyDown: function(
|
|
12875
|
-
Rc(
|
|
12876
|
-
}, tabIndex: Number(f.getYearTabIndex(
|
|
12877
|
-
return s(
|
|
12878
|
-
}, onPointerEnter: f.props.usePointerEvent ? function(
|
|
12879
|
-
return s(
|
|
12880
|
-
} : void 0, onMouseLeave: f.props.usePointerEvent ? void 0 : function(
|
|
12881
|
-
return l(
|
|
12882
|
-
}, onPointerLeave: f.props.usePointerEvent ? function(
|
|
12883
|
-
return l(
|
|
12884
|
-
} : void 0, key:
|
|
12871
|
+
for (var c = Wt(a, i), u = c.startPeriod, d = c.endPeriod, p = function(m) {
|
|
12872
|
+
t.push(y.createElement("div", { ref: f.YEAR_REFS[m - u], onClick: function(v) {
|
|
12873
|
+
e.onYearClick(v, m);
|
|
12874
|
+
}, onKeyDown: function(v) {
|
|
12875
|
+
Rc(v) && (v.preventDefault(), v.key = Y.Enter), e.onYearKeyDown(v, m);
|
|
12876
|
+
}, tabIndex: Number(f.getYearTabIndex(m)), className: f.getYearClassNames(m), onMouseEnter: f.props.usePointerEvent ? void 0 : function(v) {
|
|
12877
|
+
return s(v, m);
|
|
12878
|
+
}, onPointerEnter: f.props.usePointerEvent ? function(v) {
|
|
12879
|
+
return s(v, m);
|
|
12880
|
+
} : void 0, onMouseLeave: f.props.usePointerEvent ? void 0 : function(v) {
|
|
12881
|
+
return l(v, m);
|
|
12882
|
+
}, onPointerLeave: f.props.usePointerEvent ? function(v) {
|
|
12883
|
+
return l(v, m);
|
|
12884
|
+
} : void 0, key: m, "aria-current": f.isCurrentYear(m) ? "date" : void 0 }, f.getYearContent(m)));
|
|
12885
12885
|
}, f = this, h = u; h <= d; h++)
|
|
12886
12886
|
p(h);
|
|
12887
12887
|
return y.createElement(
|
|
@@ -12990,7 +12990,7 @@ var Rb = (
|
|
|
12990
12990
|
y.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, e.props.year)
|
|
12991
12991
|
);
|
|
12992
12992
|
}, e.renderDropdown = function() {
|
|
12993
|
-
return y.createElement(Nb,
|
|
12993
|
+
return y.createElement(Nb, le({ key: "dropdown" }, e.props, { onChange: e.onChange, onCancel: e.toggleDropdown }));
|
|
12994
12994
|
}, e.renderScrollMode = function() {
|
|
12995
12995
|
var t = e.state.dropdownVisible, o = [e.renderReadView(!t)];
|
|
12996
12996
|
return t && o.unshift(e.renderDropdown()), o;
|
|
@@ -13158,7 +13158,7 @@ var Rb = (
|
|
|
13158
13158
|
"react-datepicker__navigation--previous"
|
|
13159
13159
|
], l = t.decreaseMonth;
|
|
13160
13160
|
(t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker) && (l = t.decreaseYear), a && t.props.showDisabledMonthNavigation && (s.push("react-datepicker__navigation--previous--disabled"), l = void 0);
|
|
13161
|
-
var c = t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker, u = t.props, d = u.previousMonthButtonLabel, p = d === void 0 ? r.defaultProps.previousMonthButtonLabel : d, f = u.previousYearButtonLabel, h = f === void 0 ? r.defaultProps.previousYearButtonLabel : f,
|
|
13161
|
+
var c = t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker, u = t.props, d = u.previousMonthButtonLabel, p = d === void 0 ? r.defaultProps.previousMonthButtonLabel : d, f = u.previousYearButtonLabel, h = f === void 0 ? r.defaultProps.previousYearButtonLabel : f, m = t.props, v = m.previousMonthAriaLabel, g = v === void 0 ? typeof p == "string" ? p : "Previous Month" : v, w = m.previousYearAriaLabel, x = w === void 0 ? typeof h == "string" ? h : "Previous Year" : w;
|
|
13162
13162
|
return y.createElement(
|
|
13163
13163
|
"button",
|
|
13164
13164
|
{ type: "button", className: s.join(" "), onClick: l, onKeyDown: t.props.handleOnKeyDown, "aria-label": c ? x : g },
|
|
@@ -13204,7 +13204,7 @@ var Rb = (
|
|
|
13204
13204
|
t.props.showTimeSelect && i.push("react-datepicker__navigation--next--with-time"), t.props.todayButton && i.push("react-datepicker__navigation--next--with-today-button");
|
|
13205
13205
|
var l = t.increaseMonth;
|
|
13206
13206
|
(t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker) && (l = t.increaseYear), a && t.props.showDisabledMonthNavigation && (i.push("react-datepicker__navigation--next--disabled"), l = void 0);
|
|
13207
|
-
var c = t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker, u = t.props, d = u.nextMonthButtonLabel, p = d === void 0 ? r.defaultProps.nextMonthButtonLabel : d, f = u.nextYearButtonLabel, h = f === void 0 ? r.defaultProps.nextYearButtonLabel : f,
|
|
13207
|
+
var c = t.props.showMonthYearPicker || t.props.showQuarterYearPicker || t.props.showYearPicker, u = t.props, d = u.nextMonthButtonLabel, p = d === void 0 ? r.defaultProps.nextMonthButtonLabel : d, f = u.nextYearButtonLabel, h = f === void 0 ? r.defaultProps.nextYearButtonLabel : f, m = t.props, v = m.nextMonthAriaLabel, g = v === void 0 ? typeof p == "string" ? p : "Next Month" : v, w = m.nextYearAriaLabel, x = w === void 0 ? typeof h == "string" ? h : "Next Year" : w;
|
|
13208
13208
|
return y.createElement(
|
|
13209
13209
|
"button",
|
|
13210
13210
|
{ type: "button", className: i.join(" "), onClick: l, onKeyDown: t.props.handleOnKeyDown, "aria-label": c ? x : g },
|
|
@@ -13218,13 +13218,13 @@ var Rb = (
|
|
|
13218
13218
|
return t.props.showYearDropdown && a.push("react-datepicker__current-month--hasYearDropdown"), t.props.showMonthDropdown && a.push("react-datepicker__current-month--hasMonthDropdown"), t.props.showMonthYearDropdown && a.push("react-datepicker__current-month--hasMonthYearDropdown"), y.createElement("h2", { className: a.join(" ") }, xe(o, t.props.dateFormat, t.props.locale));
|
|
13219
13219
|
}, t.renderYearDropdown = function(o) {
|
|
13220
13220
|
if (o === void 0 && (o = !1), !(!t.props.showYearDropdown || o))
|
|
13221
|
-
return y.createElement(Ib,
|
|
13221
|
+
return y.createElement(Ib, le({}, r.defaultProps, t.props, { date: t.state.date, onChange: t.changeYear, year: ee(t.state.date) }));
|
|
13222
13222
|
}, t.renderMonthDropdown = function(o) {
|
|
13223
13223
|
if (o === void 0 && (o = !1), !(!t.props.showMonthDropdown || o))
|
|
13224
|
-
return y.createElement(kb,
|
|
13224
|
+
return y.createElement(kb, le({}, r.defaultProps, t.props, { month: ze(t.state.date), onChange: t.changeMonth }));
|
|
13225
13225
|
}, t.renderMonthYearDropdown = function(o) {
|
|
13226
13226
|
if (o === void 0 && (o = !1), !(!t.props.showMonthYearDropdown || o))
|
|
13227
|
-
return y.createElement(Ob,
|
|
13227
|
+
return y.createElement(Ob, le({}, r.defaultProps, t.props, { date: t.state.date, onChange: t.changeMonthYear }));
|
|
13228
13228
|
}, t.handleTodayButtonClick = function(o) {
|
|
13229
13229
|
t.props.onSelect(os(), o), t.props.setPreSelection && t.props.setPreSelection(os());
|
|
13230
13230
|
}, t.renderTodayButton = function() {
|
|
@@ -13253,7 +13253,7 @@ var Rb = (
|
|
|
13253
13253
|
return y.createElement(
|
|
13254
13254
|
"div",
|
|
13255
13255
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: t.props.onDropdownFocus },
|
|
13256
|
-
(i = (a = t.props).renderCustomHeader) === null || i === void 0 ? void 0 : i.call(a,
|
|
13256
|
+
(i = (a = t.props).renderCustomHeader) === null || i === void 0 ? void 0 : i.call(a, le(le({}, t.state), { customHeaderCount: l, monthDate: s, changeMonth: t.changeMonth, changeYear: t.changeYear, decreaseMonth: t.decreaseMonth, increaseMonth: t.increaseMonth, decreaseYear: t.decreaseYear, increaseYear: t.increaseYear, prevMonthButtonDisabled: c, nextMonthButtonDisabled: u, prevYearButtonDisabled: d, nextYearButtonDisabled: p })),
|
|
13257
13257
|
f && y.createElement("div", { className: "react-datepicker__day-names" }, t.header(s))
|
|
13258
13258
|
);
|
|
13259
13259
|
}, t.renderYearHeader = function(o) {
|
|
@@ -13273,14 +13273,14 @@ var Rb = (
|
|
|
13273
13273
|
var o, a;
|
|
13274
13274
|
if (!(t.props.showTimeSelectOnly || t.props.showYearPicker)) {
|
|
13275
13275
|
for (var i = [], s = (o = t.props.monthsShown) !== null && o !== void 0 ? o : r.defaultProps.monthsShown, l = t.props.showPreviousMonths ? s - 1 : 0, c = t.props.showMonthYearPicker || t.props.showQuarterYearPicker ? Ot(t.state.date, l) : Sn(t.state.date, l), u = (a = t.props.monthSelectedIn) !== null && a !== void 0 ? a : l, d = 0; d < s; ++d) {
|
|
13276
|
-
var p = d - u + l, f = t.props.showMonthYearPicker || t.props.showQuarterYearPicker ? Ot(c, p) : ct(c, p), h = "month-".concat(d),
|
|
13276
|
+
var p = d - u + l, f = t.props.showMonthYearPicker || t.props.showQuarterYearPicker ? Ot(c, p) : ct(c, p), h = "month-".concat(d), m = d < s - 1, v = d > 0;
|
|
13277
13277
|
i.push(y.createElement(
|
|
13278
13278
|
"div",
|
|
13279
13279
|
{ key: h, ref: function(g) {
|
|
13280
13280
|
t.monthContainer = g ?? void 0;
|
|
13281
13281
|
}, className: "react-datepicker__month-container" },
|
|
13282
13282
|
t.renderHeader({ monthDate: f, i: d }),
|
|
13283
|
-
y.createElement(xb,
|
|
13283
|
+
y.createElement(xb, le({}, r.defaultProps, t.props, { ariaLabelPrefix: t.props.monthAriaLabelPrefix, day: f, onDayClick: t.handleDayClick, handleOnKeyDown: t.props.handleOnDayKeyDown, handleOnMonthKeyDown: t.props.handleOnKeyDown, onDayMouseEnter: t.handleDayMouseEnter, onMouseLeave: t.handleMonthMouseLeave, orderInDisplay: d, selectingDate: t.state.selectingDate, monthShowsDuplicateDaysEnd: m, monthShowsDuplicateDaysStart: v }))
|
|
13284
13284
|
));
|
|
13285
13285
|
}
|
|
13286
13286
|
return i;
|
|
@@ -13291,15 +13291,15 @@ var Rb = (
|
|
|
13291
13291
|
"div",
|
|
13292
13292
|
{ className: "react-datepicker__year--container" },
|
|
13293
13293
|
t.renderHeader({ monthDate: t.state.date }),
|
|
13294
|
-
y.createElement(Mb,
|
|
13294
|
+
y.createElement(Mb, le({}, r.defaultProps, t.props, { selectingDate: t.state.selectingDate, date: t.state.date, onDayClick: t.handleDayClick, clearSelectingDate: t.clearSelectingDate, onYearMouseEnter: t.handleYearMouseEnter, onYearMouseLeave: t.handleYearMouseLeave }))
|
|
13295
13295
|
);
|
|
13296
13296
|
}, t.renderTimeSection = function() {
|
|
13297
13297
|
if (t.props.showTimeSelect && (t.state.monthContainer || t.props.showTimeSelectOnly))
|
|
13298
|
-
return y.createElement(Pb,
|
|
13298
|
+
return y.createElement(Pb, le({}, r.defaultProps, t.props, { onChange: t.props.onTimeChange, format: t.props.timeFormat, intervals: t.props.timeIntervals, monthRef: t.state.monthContainer }));
|
|
13299
13299
|
}, t.renderInputTimeSection = function() {
|
|
13300
13300
|
var o = t.props.selected ? new Date(t.props.selected) : void 0, a = o && Ct(o) && !!t.props.selected, i = a ? "".concat(hs(o.getHours()), ":").concat(hs(o.getMinutes())) : "";
|
|
13301
13301
|
if (t.props.showTimeInput)
|
|
13302
|
-
return y.createElement(vb,
|
|
13302
|
+
return y.createElement(vb, le({}, r.defaultProps, t.props, { date: o, timeString: i, onChange: t.props.onTimeChange }));
|
|
13303
13303
|
}, t.renderAriaLiveRegion = function() {
|
|
13304
13304
|
var o, a = Wt(t.state.date, (o = t.props.yearItemNumber) !== null && o !== void 0 ? o : r.defaultProps.yearItemNumber), i = a.startPeriod, s = a.endPeriod, l;
|
|
13305
13305
|
return t.props.showYearPicker ? l = "".concat(i, " - ").concat(s) : t.props.showMonthYearPicker || t.props.showQuarterYearPicker ? l = ee(t.state.date) : l = "".concat(ei(ze(t.state.date), t.props.locale), " ").concat(ee(t.state.date)), y.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, t.state.isRenderAriaLiveMessage && l);
|
|
@@ -13431,12 +13431,12 @@ var Rb = (
|
|
|
13431
13431
|
);
|
|
13432
13432
|
function Wb(n) {
|
|
13433
13433
|
var r = function(e) {
|
|
13434
|
-
var t, o = typeof e.hidePopper == "boolean" ? e.hidePopper : !0, a = U(null), i = Pl(
|
|
13434
|
+
var t, o = typeof e.hidePopper == "boolean" ? e.hidePopper : !0, a = U(null), i = Pl(le({ open: !o, whileElementsMounted: Dl, placement: e.popperPlacement, middleware: yt([
|
|
13435
13435
|
kl({ padding: 15 }),
|
|
13436
13436
|
$a(10),
|
|
13437
13437
|
dp({ element: a })
|
|
13438
|
-
], (t = e.popperModifiers) !== null && t !== void 0 ? t : [], !0) }, e.popperProps)), s =
|
|
13439
|
-
return y.createElement(n,
|
|
13438
|
+
], (t = e.popperModifiers) !== null && t !== void 0 ? t : [], !0) }, e.popperProps)), s = le(le({}, e), { hidePopper: o, popperProps: le(le({}, i), { arrowRef: a }) });
|
|
13439
|
+
return y.createElement(n, le({}, s));
|
|
13440
13440
|
};
|
|
13441
13441
|
return r;
|
|
13442
13442
|
}
|
|
@@ -13456,27 +13456,27 @@ var Hb = (
|
|
|
13456
13456
|
enumerable: !1,
|
|
13457
13457
|
configurable: !0
|
|
13458
13458
|
}), r.prototype.render = function() {
|
|
13459
|
-
var e = this.props, t = e.className, o = e.wrapperClassName, a = e.hidePopper, i = a === void 0 ? r.defaultProps.hidePopper : a, s = e.popperComponent, l = e.targetComponent, c = e.enableTabLoop, u = e.popperOnKeyDown, d = e.portalId, p = e.portalHost, f = e.popperProps, h = e.showArrow,
|
|
13459
|
+
var e = this.props, t = e.className, o = e.wrapperClassName, a = e.hidePopper, i = a === void 0 ? r.defaultProps.hidePopper : a, s = e.popperComponent, l = e.targetComponent, c = e.enableTabLoop, u = e.popperOnKeyDown, d = e.portalId, p = e.portalHost, f = e.popperProps, h = e.showArrow, m = void 0;
|
|
13460
13460
|
if (!i) {
|
|
13461
|
-
var
|
|
13462
|
-
|
|
13461
|
+
var v = Ye("react-datepicker-popper", t);
|
|
13462
|
+
m = y.createElement(
|
|
13463
13463
|
Ic,
|
|
13464
13464
|
{ enableTabLoop: c },
|
|
13465
13465
|
y.createElement(
|
|
13466
13466
|
"div",
|
|
13467
|
-
{ ref: f.refs.setFloating, style: f.floatingStyles, className:
|
|
13467
|
+
{ ref: f.refs.setFloating, style: f.floatingStyles, className: v, "data-placement": f.placement, onKeyDown: u },
|
|
13468
13468
|
s,
|
|
13469
13469
|
h && y.createElement(bp, { ref: f.arrowRef, context: f.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
13470
13470
|
)
|
|
13471
13471
|
);
|
|
13472
13472
|
}
|
|
13473
|
-
this.props.popperContainer && (
|
|
13473
|
+
this.props.popperContainer && (m = ya(this.props.popperContainer, {}, m)), d && !i && (m = y.createElement(Nc, { portalId: d, portalHost: p }, m));
|
|
13474
13474
|
var g = Ye("react-datepicker-wrapper", o);
|
|
13475
13475
|
return y.createElement(
|
|
13476
13476
|
y.Fragment,
|
|
13477
13477
|
null,
|
|
13478
13478
|
y.createElement("div", { ref: f.refs.setReference, className: g }, l),
|
|
13479
|
-
|
|
13479
|
+
m
|
|
13480
13480
|
);
|
|
13481
13481
|
}, r;
|
|
13482
13482
|
}(We)
|
|
@@ -13496,7 +13496,7 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13496
13496
|
var o;
|
|
13497
13497
|
return (o = t.props.holidays) === null || o === void 0 ? void 0 : o.reduce(function(a, i) {
|
|
13498
13498
|
var s = new Date(i.date);
|
|
13499
|
-
return Ct(s) ? yt(yt([], a, !0), [
|
|
13499
|
+
return Ct(s) ? yt(yt([], a, !0), [le(le({}, i), { date: s })], !1) : a;
|
|
13500
13500
|
}, []);
|
|
13501
13501
|
}, t.calcInitialState = function() {
|
|
13502
13502
|
var o, a = t.getPreSelection(), i = Mc(t.props), s = Tc(t.props), l = i && fn(a, Nr(i)) ? i : s && Kt(a, as(s)) ? s : a;
|
|
@@ -13516,9 +13516,9 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13516
13516
|
wasHidden: !1
|
|
13517
13517
|
};
|
|
13518
13518
|
}, t.resetHiddenStatus = function() {
|
|
13519
|
-
t.setState(
|
|
13519
|
+
t.setState(le(le({}, t.state), { wasHidden: !1 }));
|
|
13520
13520
|
}, t.setHiddenStatus = function() {
|
|
13521
|
-
t.setState(
|
|
13521
|
+
t.setState(le(le({}, t.state), { wasHidden: !0 }));
|
|
13522
13522
|
}, t.setHiddenStateOnVisibilityHidden = function() {
|
|
13523
13523
|
document.visibilityState === "hidden" && t.setHiddenStatus();
|
|
13524
13524
|
}, t.clearPreventFocusTimeout = function() {
|
|
@@ -13602,8 +13602,8 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13602
13602
|
return;
|
|
13603
13603
|
} else if (c !== null && jt(c, t.props))
|
|
13604
13604
|
return;
|
|
13605
|
-
var u = t.props, d = u.onChange, p = u.selectsRange, f = u.startDate, h = u.endDate,
|
|
13606
|
-
if (!rn(t.props.selected, c) || t.props.allowSameDay || p ||
|
|
13605
|
+
var u = t.props, d = u.onChange, p = u.selectsRange, f = u.startDate, h = u.endDate, m = u.selectsMultiple, v = u.selectedDates, g = u.minTime, w = u.swapRange;
|
|
13606
|
+
if (!rn(t.props.selected, c) || t.props.allowSameDay || p || m)
|
|
13607
13607
|
if (c !== null && (t.props.selected && (!i || !t.props.showTimeSelect && !t.props.showTimeSelectOnly && !t.props.showTimeInput) && (c = Bo(c, {
|
|
13608
13608
|
hour: wt(t.props.selected),
|
|
13609
13609
|
minute: xt(t.props.selected),
|
|
@@ -13617,21 +13617,21 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13617
13617
|
}), t.props.focusSelectedMonth || t.setState({ monthSelectedIn: s })), p) {
|
|
13618
13618
|
var x = !f && !h, C = f && !h, P = f && h;
|
|
13619
13619
|
x ? d ? d([c, null], a) : r.defaultProps.onChange : C && (c === null ? d ? d([null, null], a) : r.defaultProps.onChange : gs(c, f) ? w ? d ? d([c, f], a) : r.defaultProps.onChange : d ? d([c, null], a) : r.defaultProps.onChange : d ? d([f, c], a) : r.defaultProps.onChange), P && (d ? d([c, null], a) : r.defaultProps.onChange);
|
|
13620
|
-
} else if (
|
|
13620
|
+
} else if (m) {
|
|
13621
13621
|
if (c !== null)
|
|
13622
|
-
if (!(
|
|
13622
|
+
if (!(v != null && v.length))
|
|
13623
13623
|
d ? d([c], a) : r.defaultProps.onChange;
|
|
13624
13624
|
else {
|
|
13625
|
-
var R =
|
|
13625
|
+
var R = v.some(function(L) {
|
|
13626
13626
|
return ie(L, c);
|
|
13627
13627
|
});
|
|
13628
13628
|
if (R) {
|
|
13629
|
-
var S =
|
|
13629
|
+
var S = v.filter(function(L) {
|
|
13630
13630
|
return !ie(L, c);
|
|
13631
13631
|
});
|
|
13632
13632
|
d ? d(S, a) : r.defaultProps.onChange;
|
|
13633
13633
|
} else
|
|
13634
|
-
d ? d(yt(yt([],
|
|
13634
|
+
d ? d(yt(yt([], v, !0), [c], !1), a) : r.defaultProps.onChange;
|
|
13635
13635
|
}
|
|
13636
13636
|
} else
|
|
13637
13637
|
d ? d(c, a) : r.defaultProps.onChange;
|
|
@@ -13702,7 +13702,7 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13702
13702
|
});
|
|
13703
13703
|
}));
|
|
13704
13704
|
}, t.onDayKeyDown = function(o) {
|
|
13705
|
-
var a, i, s, l, c = t.props, u = c.minDate, d = c.maxDate, p = c.disabledKeyboardNavigation, f = c.showWeekPicker, h = c.shouldCloseOnSelect,
|
|
13705
|
+
var a, i, s, l, c = t.props, u = c.minDate, d = c.maxDate, p = c.disabledKeyboardNavigation, f = c.showWeekPicker, h = c.shouldCloseOnSelect, m = c.locale, v = c.calendarStartDay, g = c.adjustDateOnChange, w = c.inline;
|
|
13706
13706
|
if ((i = (a = t.props).onKeyDown) === null || i === void 0 || i.call(a, o), !p) {
|
|
13707
13707
|
var x = o.key, C = o.shiftKey, P = me(t.state.preSelection), R = function(_, k) {
|
|
13708
13708
|
var I = k;
|
|
@@ -13726,7 +13726,7 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13726
13726
|
I = C ? Ot(k, 1) : ct(k, 1);
|
|
13727
13727
|
break;
|
|
13728
13728
|
case Y.Home:
|
|
13729
|
-
I = Ht(k,
|
|
13729
|
+
I = Ht(k, m, v);
|
|
13730
13730
|
break;
|
|
13731
13731
|
case Y.End:
|
|
13732
13732
|
I = tb(k);
|
|
@@ -13785,7 +13785,7 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13785
13785
|
typeof t.props.closeOnScroll == "boolean" && t.props.closeOnScroll ? (o.target === document || o.target === document.documentElement || o.target === document.body) && t.setOpen(!1) : typeof t.props.closeOnScroll == "function" && t.props.closeOnScroll(o) && t.setOpen(!1);
|
|
13786
13786
|
}, t.renderCalendar = function() {
|
|
13787
13787
|
var o, a;
|
|
13788
|
-
return !t.props.inline && !t.isCalendarOpen() ? null : y.createElement(Vb,
|
|
13788
|
+
return !t.props.inline && !t.isCalendarOpen() ? null : y.createElement(Vb, le({ ref: function(i) {
|
|
13789
13789
|
t.calendar = i;
|
|
13790
13790
|
} }, t.props, t.state, { setOpen: t.setOpen, dateFormat: (o = t.props.dateFormatCalendar) !== null && o !== void 0 ? o : r.defaultProps.dateFormatCalendar, onSelect: t.handleSelect, onClickOutside: t.handleCalendarClickOutside, holidays: fb(t.modifyHolidays()), outsideClickIgnoreClass: ws, onDropdownFocus: t.handleDropdownFocus, onTimeChange: t.handleTimeChange, className: t.props.calendarClassName, container: t.props.calendarContainer, handleOnKeyDown: t.props.onKeyDown, handleOnDayKeyDown: t.onDayKeyDown, setPreSelection: t.setPreSelection, dropdownMode: (a = t.props.dropdownMode) !== null && a !== void 0 ? a : r.defaultProps.dropdownMode }), t.props.children);
|
|
13791
13791
|
}, t.renderAriaLiveRegion = function() {
|
|
@@ -13814,12 +13814,12 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13814
13814
|
dateFormat: p,
|
|
13815
13815
|
locale: f
|
|
13816
13816
|
});
|
|
13817
|
-
return ba(l, (a = {}, a[c] = function(
|
|
13818
|
-
t.input =
|
|
13817
|
+
return ba(l, (a = {}, a[c] = function(m) {
|
|
13818
|
+
t.input = m;
|
|
13819
13819
|
}, a.value = h, a.onBlur = t.handleBlur, a.onChange = t.handleChange, a.onClick = t.onInputClick, a.onFocus = t.handleFocus, a.onKeyDown = t.onInputKeyDown, a.id = t.props.id, a.name = t.props.name, a.form = t.props.form, a.autoFocus = t.props.autoFocus, a.placeholder = t.props.placeholderText, a.disabled = t.props.disabled, a.autoComplete = t.props.autoComplete, a.className = Ye(l.props.className, s), a.title = t.props.title, a.readOnly = t.props.readOnly, a.required = t.props.required, a.tabIndex = t.props.tabIndex, a["aria-describedby"] = t.props.ariaDescribedBy, a["aria-invalid"] = t.props.ariaInvalid, a["aria-labelledby"] = t.props.ariaLabelledBy, a["aria-required"] = t.props.ariaRequired, a));
|
|
13820
13820
|
}, t.renderClearButton = function() {
|
|
13821
|
-
var o = t.props, a = o.isClearable, i = o.disabled, s = o.selected, l = o.startDate, c = o.endDate, u = o.clearButtonTitle, d = o.clearButtonClassName, p = d === void 0 ? "" : d, f = o.ariaLabelClose, h = f === void 0 ? "Close" : f,
|
|
13822
|
-
return a && (s != null || l != null || c != null ||
|
|
13821
|
+
var o = t.props, a = o.isClearable, i = o.disabled, s = o.selected, l = o.startDate, c = o.endDate, u = o.clearButtonTitle, d = o.clearButtonClassName, p = d === void 0 ? "" : d, f = o.ariaLabelClose, h = f === void 0 ? "Close" : f, m = o.selectedDates;
|
|
13822
|
+
return a && (s != null || l != null || c != null || m != null && m.length) ? y.createElement("button", { type: "button", className: Ye("react-datepicker__close-icon", p, { "react-datepicker__close-icon--disabled": i }), disabled: i, "aria-label": h, onClick: t.onClearClick, title: u, tabIndex: -1 }) : null;
|
|
13823
13823
|
}, t.state = t.calcInitialState(), t.preventFocusTimeout = void 0, t;
|
|
13824
13824
|
}
|
|
13825
13825
|
return Object.defineProperty(r, "defaultProps", {
|
|
@@ -13911,7 +13911,7 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13911
13911
|
return a && console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."), y.createElement(
|
|
13912
13912
|
"div",
|
|
13913
13913
|
{ className: "react-datepicker__input-container".concat(t ? " react-datepicker__view-calendar-icon" : "") },
|
|
13914
|
-
t && y.createElement($b,
|
|
13914
|
+
t && y.createElement($b, le({ icon: o, className: Ye(i, !i && a, l && "react-datepicker-ignore-onclickoutside") }, s ? {
|
|
13915
13915
|
onClick: this.toggleCalendar
|
|
13916
13916
|
} : null)),
|
|
13917
13917
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -13928,14 +13928,14 @@ var Uo = "Date input not valid.", Ub = (
|
|
|
13928
13928
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
13929
13929
|
y.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, e)
|
|
13930
13930
|
) : null;
|
|
13931
|
-
return this.state.open && this.props.portalId && (t = y.createElement(Nc,
|
|
13931
|
+
return this.state.open && this.props.portalId && (t = y.createElement(Nc, le({ portalId: this.props.portalId }, this.props), t)), y.createElement(
|
|
13932
13932
|
"div",
|
|
13933
13933
|
null,
|
|
13934
13934
|
this.renderInputContainer(),
|
|
13935
13935
|
t
|
|
13936
13936
|
);
|
|
13937
13937
|
}
|
|
13938
|
-
return y.createElement(Bb,
|
|
13938
|
+
return y.createElement(Bb, le({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: e, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
13939
13939
|
}, r;
|
|
13940
13940
|
}(We)
|
|
13941
13941
|
), Qb = "input", Qo = "navigate";
|
|
@@ -14335,8 +14335,8 @@ const Kb = {
|
|
|
14335
14335
|
dir: "rtl",
|
|
14336
14336
|
className: "datepicker-select w-auto cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",
|
|
14337
14337
|
value: ee(u),
|
|
14338
|
-
onChange: ({ target: { value:
|
|
14339
|
-
children: i.map((
|
|
14338
|
+
onChange: ({ target: { value: m } }) => d(Number(m)),
|
|
14339
|
+
children: i.map((m) => /* @__PURE__ */ N.jsx("option", { value: m, children: m }, m))
|
|
14340
14340
|
}
|
|
14341
14341
|
),
|
|
14342
14342
|
/* @__PURE__ */ N.jsx("span", { className: "ml-1 mr-2", children: "년" }),
|
|
@@ -14347,8 +14347,8 @@ const Kb = {
|
|
|
14347
14347
|
dir: "rtl",
|
|
14348
14348
|
className: "datepicker-select cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",
|
|
14349
14349
|
value: s[ze(u)],
|
|
14350
|
-
onChange: ({ target: { value:
|
|
14351
|
-
children: s.map((
|
|
14350
|
+
onChange: ({ target: { value: m } }) => p(s.indexOf(m)),
|
|
14351
|
+
children: s.map((m) => /* @__PURE__ */ N.jsx("option", { value: m, children: m }, m))
|
|
14352
14352
|
}
|
|
14353
14353
|
),
|
|
14354
14354
|
/* @__PURE__ */ N.jsx("span", { className: "mx-1", children: "월" })
|
|
@@ -14408,21 +14408,21 @@ const Fy = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
|
|
|
14408
14408
|
helperText: i,
|
|
14409
14409
|
disableDebounce: s
|
|
14410
14410
|
}) => {
|
|
14411
|
-
const [l, c] =
|
|
14412
|
-
let
|
|
14413
|
-
const
|
|
14414
|
-
|
|
14415
|
-
c(
|
|
14411
|
+
const [l, c] = ce("");
|
|
14412
|
+
let u;
|
|
14413
|
+
const d = (h) => {
|
|
14414
|
+
u && clearTimeout(u), o(""), u = setTimeout(async () => {
|
|
14415
|
+
c(h.target.value);
|
|
14416
14416
|
}, 200);
|
|
14417
|
-
},
|
|
14418
|
-
|
|
14419
|
-
};
|
|
14417
|
+
}, p = (h) => {
|
|
14418
|
+
o(""), c(h.target.value);
|
|
14419
|
+
}, f = l === "" ? t.slice(0, 4) : t.filter((h) => h.name.replace(/ /g, "").includes(l.replace(/ /g, ""))).slice(0, 4);
|
|
14420
14420
|
return /* @__PURE__ */ N.jsxs("div", { children: [
|
|
14421
14421
|
/* @__PURE__ */ N.jsx("div", { className: "relative flex flex-col text-deepGray", children: /* @__PURE__ */ N.jsxs(
|
|
14422
14422
|
dh,
|
|
14423
14423
|
{
|
|
14424
|
-
onChange: (
|
|
14425
|
-
|
|
14424
|
+
onChange: (h) => {
|
|
14425
|
+
o(h);
|
|
14426
14426
|
},
|
|
14427
14427
|
disabled: a,
|
|
14428
14428
|
children: [
|
|
@@ -14432,8 +14432,8 @@ const Fy = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
|
|
|
14432
14432
|
{
|
|
14433
14433
|
"aria-label": "comboboxInput",
|
|
14434
14434
|
className: "mt-4 flex w-full items-center justify-between rounded-xl bg-[#F8F8F8] p-4 text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",
|
|
14435
|
-
value:
|
|
14436
|
-
onChange: s ?
|
|
14435
|
+
value: e,
|
|
14436
|
+
onChange: s ? p : d,
|
|
14437
14437
|
placeholder: r,
|
|
14438
14438
|
autoComplete: "off"
|
|
14439
14439
|
}
|
|
@@ -14442,14 +14442,14 @@ const Fy = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
|
|
|
14442
14442
|
Bl,
|
|
14443
14443
|
{
|
|
14444
14444
|
className: "absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",
|
|
14445
|
-
style: { bottom: -
|
|
14446
|
-
children:
|
|
14445
|
+
style: { bottom: -f.length * 60 },
|
|
14446
|
+
children: f.map((h) => /* @__PURE__ */ N.jsx(Vl, { value: h, as: Ue, children: ({ focus: m, selected: v }) => /* @__PURE__ */ N.jsx(
|
|
14447
14447
|
"li",
|
|
14448
14448
|
{
|
|
14449
|
-
className: `flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${
|
|
14450
|
-
children:
|
|
14449
|
+
className: `flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${m ? "bg-[#E8E8E8]" : "bg-[#F8F8F8]"} ${v && "bg-[#D8D8D8]"}`,
|
|
14450
|
+
children: h.name
|
|
14451
14451
|
}
|
|
14452
|
-
) },
|
|
14452
|
+
) }, h.name))
|
|
14453
14453
|
}
|
|
14454
14454
|
)
|
|
14455
14455
|
]
|
|
@@ -14458,7 +14458,7 @@ const Fy = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
|
|
|
14458
14458
|
i && /* @__PURE__ */ N.jsx("p", { className: "mt-2 px-4 text-[#8B919A]", children: i })
|
|
14459
14459
|
] });
|
|
14460
14460
|
}, $y = ({ tabList: n, onTabChange: r }) => {
|
|
14461
|
-
const [e, t] =
|
|
14461
|
+
const [e, t] = ce(n[0]), o = (a) => {
|
|
14462
14462
|
if (a <= 1 || a > 4)
|
|
14463
14463
|
throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");
|
|
14464
14464
|
return a === 2 ? `absolute h-[2px] w-[50%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e) === JSON.stringify(n[0]) ? "translate-x-[0%]" : "translate-x-[100%]"}` : a === 3 ? `absolute h-[2px] w-[33.3%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e) === JSON.stringify(n[0]) ? "translate-x-[0%]" : JSON.stringify(e) === JSON.stringify(n[1]) ? "translate-x-[100%]" : "translate-x-[200%]"}` : `absolute h-[2px] w-[25%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e) === JSON.stringify(n[0]) ? "translate-x-[0%]" : JSON.stringify(e) === JSON.stringify(n[1]) ? "translate-x-[100%]" : JSON.stringify(e) === JSON.stringify(n[2]) ? "translate-x-[200%]" : "translate-x-[300%]"}`;
|