@marimo-team/islands 0.25.3-dev209 → 0.25.3-dev210
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/{ConnectedDataExplorerComponent-ApTYh0V3.js → ConnectedDataExplorerComponent-D6RHJV8D.js} +114 -112
- package/dist/{ErrorBoundary-B1QlXN-y.js → ErrorBoundary-VruaQLnK.js} +10 -10
- package/dist/{abnfDiagram-VCTEODGH-uo9xhZY0.js → abnfDiagram-VCTEODGH-0q7Lbmii.js} +2 -2
- package/dist/{any-language-editor-BVFHDDQ3.js → any-language-editor-jGaR0EAo.js} +5 -5
- package/dist/{architectureDiagram-5GKGNRK7-Hz6eyeOD.js → architectureDiagram-5GKGNRK7-1PydKPmE.js} +1 -1
- package/dist/{button-BQRdqQi1.js → button-B6RjDKJx.js} +54 -51
- package/dist/{capabilities-C2QUNRXi.js → capabilities-CkVzWJEX.js} +1 -1
- package/dist/{chat-ui-BTA1I5i1.js → chat-ui-B5pH_aXk.js} +414 -413
- package/dist/{check-C9Mp9eCK.js → check-Z_vtI3OL.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DBM2i23k.js → chunk-IMKFNOWR-DEzZZ1Zc.js} +1 -1
- package/dist/{chunk-SHT3W25Y-L8KQLLBy.js → chunk-SHT3W25Y-CuHj-hnn.js} +1 -1
- package/dist/{chunk-SVP7TREG-BOUJKJEP.js → chunk-SVP7TREG-BPiZK2bA.js} +1 -1
- package/dist/{chunk-TICWLB2K-DY3CzFjX.js → chunk-TICWLB2K-DF6XcIjM.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-s9iwW-q4.js → classDiagram-ZZMXUADV-CMdR-cP4.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-2GI5CjGB.js → classDiagram-v2-VYDZK3BY-DRvc3_7Y.js} +2 -2
- package/dist/{code-visibility-CCGlDSq4.js → code-visibility-BdFhHfIC.js} +28 -28
- package/dist/{common-C1PmVtVW.js → common-Ce1SgsX1.js} +8034 -8027
- package/dist/{toDate-BZZ64K_m.js → config-DbjzjwxX.js} +98 -164
- package/dist/{copy-icon-De584pZ4.js → copy-icon-CG57cxwb.js} +3 -3
- package/dist/createReducer-DePYJ0F3.js +63 -0
- package/dist/{cynefinDiagram-5FMLGOSQ-DOxnhBK2.js → cynefinDiagram-5FMLGOSQ-BkBjEY9l.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-D1AhEfpM.js → dagre-GXQ25YYZ-D-HEaW4I.js} +1 -1
- package/dist/{data-grid-overlay-editor-B3KXkZvo.js → data-grid-overlay-editor-Bps1p6jQ.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-DV_GebF_.js → diagram-S7CK7UJ4-Bn-oF-rB.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-6dNzGFfD.js → diagram-UQ7AKVKN-BpzzXWBj.js} +1 -1
- package/dist/{diagram-VX7I27RA-DUh9jsfi.js → diagram-VX7I27RA-COOtvfBP.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Cug-qcQ8.js → diagram-Z3DM3KII-K5cXvbrl.js} +1 -1
- package/dist/{dialog-DVRfQuhD.js → dialog-DsZ49mmU.js} +26 -26
- package/dist/{dist-BJtmSgcE.js → dist-11T5wq3_.js} +41 -40
- package/dist/{dist-B1M0bGO3.js → dist-17ugwGZc.js} +59 -58
- package/dist/{dist-D7mrh5sO.js → dist-7cRjf--y.js} +135 -134
- package/dist/{dist-Ck_C32ye.js → dist-B8pkfkzc.js} +31 -30
- package/dist/{dist-Ba2VIn1K.js → dist-B9UoM_wq.js} +54 -53
- package/dist/{dist-KN80qWCP.js → dist-BGuMTs1i.js} +118 -117
- package/dist/{dist-T5rh6JvL.js → dist-BHW11fni.js} +18 -17
- package/dist/dist-BLY4m1Wi.js +850 -0
- package/dist/{dist-Bj4bmwUm.js → dist-BNlcVoxs.js} +31 -30
- package/dist/{dist-BA13RJj5.js → dist-BQYe5Bju.js} +47 -46
- package/dist/{dist-OUle2RT7.js → dist-BX1mn8na.js} +297 -297
- package/dist/{dist-CTi5FTiV.js → dist-Bh0PTKUW.js} +108 -107
- package/dist/{dist-D9Q3xjiP.js → dist-CKaXK92p.js} +56 -55
- package/dist/{dist-DYXM73-k.js → dist-CLhwfhpJ.js} +58 -57
- package/dist/{dist-BmS-ZGjl.js → dist-CYeqK4Xw.js} +1854 -2702
- package/dist/{dist-D1fnFp1J.js → dist-Cxlp3WH6.js} +16 -15
- package/dist/{dist-DVVwOfrD.js → dist-DSJPGj42.js} +64 -63
- package/dist/{dist-Bzogh7CW.js → dist-DU9ICsWZ.js} +93 -92
- package/dist/{dist-DjeybPOb.js → dist-DWv0ALBi.js} +47 -46
- package/dist/{dist-D3x9__Fu.js → dist-DiBpWEsB.js} +39 -38
- package/dist/{dist-DtGn9N4h.js → dist-DiLFTlnl.js} +165 -165
- package/dist/{dist-DTv9KkpW.js → dist-cVDV5IuI.js} +26 -25
- package/dist/{dist-DP60Ubh8.js → dist-fRfaOoq8.js} +44 -43
- package/dist/{dist-O0qFpEJh.js → dist-gTTI-9Px.js} +66 -65
- package/dist/{dropdown-menu-dlEm41Bt.js → dropdown-menu-CSNdPSnS.js} +2886 -1529
- package/dist/{ebnfDiagram-PWID7BFC-d5LKx7Vb.js → ebnfDiagram-PWID7BFC-BI1ZmjVm.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-BwvlkcID.js → erDiagram-RLTQ6QDP-BtWjj9xy.js} +1 -1
- package/dist/{error-banner-DxJ3s8YO.js → error-banner-IsonnvA0.js} +47 -46
- package/dist/error-entries-CRPfxMqm.js +2505 -0
- package/dist/{esm-Bbw_Njjx.js → esm-BgKjMvWw.js} +389 -388
- package/dist/{esm-mDQNEFe_.js → esm-CHjVSexr.js} +305 -306
- package/dist/{feedback-button-UsovT9sL.js → feedback-button-2ycmR9GG.js} +112 -112
- package/dist/{flowDiagram-HODETNUW-CJcSoFer.js → flowDiagram-HODETNUW-DQvZh96A.js} +2 -2
- package/dist/{formats-Ry7c-aIV.js → formats-BK4VefeF.js} +6 -6
- package/dist/{glide-data-editor-CRd8kBSp.js → glide-data-editor-Buj2OZjL.js} +99 -99
- package/dist/{glide-utils-D98laidb.js → glide-utils-CQddGpa-.js} +3 -3
- package/dist/{globals-BDWrOstF.js → globals-B-14fUeb.js} +3 -3
- package/dist/{error-entries-CVUHA5r_.js → html-to-image-CgAnxFi8.js} +26314 -25474
- package/dist/{infoDiagram-27XIBGKW-Cezgppw3.js → infoDiagram-27XIBGKW-BdAObnc_.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-BahZQwJz.js → ishikawaDiagram-5VMMS53U-DP-jE8dw.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Cvfn_Obm.js → kanban-definition-UXKFOSKX-BkMgPjfm.js} +1 -1
- package/dist/{loader-DOVB0Syl.js → loader-BisjOLiW.js} +1 -1
- package/dist/main.js +2996 -2992
- package/dist/{mermaid-BrdwbArF.js → mermaid-B-OFqheA.js} +36 -36
- package/dist/{mindmap-definition-YA3MSWOX-uB4B2d-J.js → mindmap-definition-YA3MSWOX-Du7toAZX.js} +1 -1
- package/dist/{number-overlay-editor-Bp9a4z5Q.js → number-overlay-editor-ZVFcJ7_u.js} +1 -1
- package/dist/{dist-CThPVKaP.js → objectWithoutPropertiesLoose-ai5NUqGa.js} +1139 -1120
- package/dist/{pegDiagram-XKGWAZYB-CYaIwAmH.js → pegDiagram-XKGWAZYB-CX_729j0.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BJ1oUxVv.js → pieDiagram-E7YTZNPT-dtTFJcVI.js} +1 -1
- package/dist/{process-output-SjJxB1wh.js → process-output-Bmev5azU.js} +5 -5
- package/dist/{railroadDiagram-O6MQD6OU-BqKSaBux.js → railroadDiagram-O6MQD6OU-Dsc2Cf4c.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DwFhgDhH.js → requirementDiagram-BXWQKSXE-D3g0c60I.js} +1 -1
- package/dist/{reveal-component-ov3pS-oO.js → reveal-component-BWz1KjWe.js} +725 -725
- package/dist/schemas-CdscWNy_.js +4747 -0
- package/dist/select-BSxlITBo.js +1200 -0
- package/dist/{sequenceDiagram-WJ2MYXX4-L7ENjfKF.js → sequenceDiagram-WJ2MYXX4-w1pWbIpk.js} +1 -1
- package/dist/{spec-BcJ9ncAY.js → spec-Dq8RNplp.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-CVf88u-p.js → stateDiagram-D77RDMKH-BCv7kP4H.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-DvpkQ1V6.js → stateDiagram-v2-MP3YSRHH-D1cTOt0x.js} +2 -2
- package/dist/static-state-BldGd99T.js +72 -0
- package/dist/strings-BGW-fXVJ.js +507 -0
- package/dist/{swimlanes-42K2YHIH-DIuFHbVE.js → swimlanes-42K2YHIH-DNO6jDnd.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-CAqHAziW.js → swimlanesDiagram-VR7AAH4N-CkSWsxYJ.js} +2 -2
- package/dist/{swiper-component-BVfnhbnt.js → swiper-component-Dir1o8ml.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-xO4EQqBm.js → timeline-definition-24CTP7MA-DQvqGFM9.js} +1 -1
- package/dist/toast-BWIPi3aF.js +491 -0
- package/dist/{tooltip-s4zZxwKe.js → tooltip-C3UnvsRe.js} +58 -58
- package/dist/use-restore-focus-BWO0z1lo.js +1672 -0
- package/dist/{useAsyncData-Dqw22wZQ.js → useAsyncData-DsZMvNXn.js} +1 -1
- package/dist/{useDateFormatter-D3Tkfzej.js → useDateFormatter-ChB4eyim.js} +2 -2
- package/dist/{useDeepCompareMemoize-D3gozcjJ.js → useDeepCompareMemoize-KMBBux8C.js} +1 -1
- package/dist/{useIframeCapabilities-6a_yDNXp.js → useIframeCapabilities-cMNQ80CK.js} +1 -1
- package/dist/useLifecycle-BquH9ET-.js +112 -0
- package/dist/useTheme-B9C1JIy9.js +307 -0
- package/dist/utils-DXkj82sK.js +813 -0
- package/dist/{vega-component-Blvspl7v.js → vega-component-9NOEITbg.js} +55 -54
- package/dist/{vennDiagram-4TSXK5OY-DzCi-lRh.js → vennDiagram-4TSXK5OY-BfzXp4SH.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-CW48xa0n.js → wardleyDiagram-VM6X3IG4-CiqEE8eq.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-UPxGGI2B.js → xychartDiagram-S5SC5T6Z-BTIHCVOI.js} +1 -1
- package/package.json +1 -1
- package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +1 -1
- package/src/components/editor/cell/code/cell-editor.tsx +13 -36
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +1 -1
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +11 -5
- package/src/components/editor/notebook-cell.tsx +0 -1
- package/src/components/scratchpad/scratchpad.test.tsx +3 -11
- package/src/components/scratchpad/scratchpad.tsx +24 -22
- package/src/components/scratchpad/state.ts +7 -0
- package/src/core/ai/__tests__/staged-cells.test.ts +6 -8
- package/src/core/ai/staged-cells.ts +4 -2
- package/src/core/cells/__tests__/cells.test.ts +44 -60
- package/src/core/cells/__tests__/document.test.ts +1 -139
- package/src/core/cells/__tests__/notebook-outline.test.ts +8 -6
- package/src/core/cells/actions.ts +39 -0
- package/src/core/cells/cells.ts +15 -35
- package/src/core/cells/document.ts +9 -84
- package/src/core/codemirror/__tests__/format.test.ts +0 -34
- package/src/core/codemirror/cells/extensions.ts +20 -18
- package/src/core/codemirror/cells/state.ts +0 -5
- package/src/core/codemirror/format.ts +1 -19
- package/src/core/codemirror/misc/__tests__/paste.test.ts +3 -1
- package/src/core/codemirror/misc/paste.ts +1 -1
- package/src/core/notebook/document/__tests__/codemirror.test.ts +172 -0
- package/src/stories/layout/vertical/one-column.stories.tsx +26 -18
- package/dist/html-to-image--E3uFbJ9.js +0 -3348
- package/dist/label-Qvw1E97W.js +0 -281
- package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +0 -23
- package/dist/select-2KOiReNY.js +0 -1423
- package/dist/toast-B5t9o6s_.js +0 -1848
- package/dist/use-restore-focus-BgDTd2tc.js +0 -6418
- package/dist/useLifecycle-CaZi4wTw.js +0 -172
- package/dist/useTheme-TzPgWXwB.js +0 -1114
package/dist/select-2KOiReNY.js
DELETED
|
@@ -1,1423 +0,0 @@
|
|
|
1
|
-
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as t, h as n, m as r, p as i, r as a, u as o } from "./button-BQRdqQi1.js";
|
|
3
|
-
import { t as s } from "./react-sHtZdjeP.js";
|
|
4
|
-
import { t as c } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { c as l, f as u, l as d, m as f, s as p, u as m } from "./tooltip-s4zZxwKe.js";
|
|
6
|
-
import { t as h } from "./check-C9Mp9eCK.js";
|
|
7
|
-
import { t as g } from "./react-dom-DUmH0GXv.js";
|
|
8
|
-
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
9
|
-
import { $ as v, Ct as y, Dt as b, Et as x, Ot as S, Q as C, St as w, Tt as T, bt as E, dt as ee, ft as D, gt as te, ht as O, kt as k, mt as ne, tt as re, wt as ie } from "./use-restore-focus-BgDTd2tc.js";
|
|
10
|
-
import { t as A } from "./invariant-DLmrl-hA.js";
|
|
11
|
-
var j = f("chevron-down", [["path", {
|
|
12
|
-
d: "m6 9 6 6 6-6",
|
|
13
|
-
key: "qrunsl"
|
|
14
|
-
}]]), M = f("chevron-up", [["path", {
|
|
15
|
-
d: "m18 15-6-6-6 6",
|
|
16
|
-
key: "153udz"
|
|
17
|
-
}]]), N = f("x", [["path", {
|
|
18
|
-
d: "M18 6 6 18",
|
|
19
|
-
key: "1bl5f8"
|
|
20
|
-
}], ["path", {
|
|
21
|
-
d: "m6 6 12 12",
|
|
22
|
-
key: "d8bk6v"
|
|
23
|
-
}]]), P = /* @__PURE__ */ e(g(), 1), F = /* @__PURE__ */ e(s(), 1), I = _(), L = Object.defineProperty, R = (e, t) => L(e, "name", {
|
|
24
|
-
value: t,
|
|
25
|
-
configurable: !0
|
|
26
|
-
});
|
|
27
|
-
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function z(e) {
|
|
29
|
-
let t = e + "CollectionProvider", [n, r] = S(t), [a, s] = n(t, {
|
|
30
|
-
collectionRef: { current: null },
|
|
31
|
-
itemMap: /* @__PURE__ */ new Map()
|
|
32
|
-
}), c = /* @__PURE__ */ R((e) => {
|
|
33
|
-
let { scope: t, children: n } = e, r = F.useRef(null), i = F.useRef(/* @__PURE__ */ new Map()).current;
|
|
34
|
-
return /* @__PURE__ */ (0, I.jsx)(a, {
|
|
35
|
-
scope: t,
|
|
36
|
-
itemMap: i,
|
|
37
|
-
collectionRef: r,
|
|
38
|
-
children: n
|
|
39
|
-
});
|
|
40
|
-
}, "CollectionProvider");
|
|
41
|
-
c.displayName = t;
|
|
42
|
-
let l = e + "CollectionSlot", u = o(l), d = F.forwardRef((e, t) => {
|
|
43
|
-
let { scope: n, children: r } = e, a = s(l, n), o = i(t, a.collectionRef);
|
|
44
|
-
return /* @__PURE__ */ (0, I.jsx)(u, {
|
|
45
|
-
ref: o,
|
|
46
|
-
children: r
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
d.displayName = l;
|
|
50
|
-
let f = e + "CollectionItemSlot", p = "data-radix-collection-item", m = o(f), h = F.forwardRef((e, t) => {
|
|
51
|
-
let { scope: n, children: r, ...a } = e, o = F.useRef(null), c = i(t, o), l = s(f, n);
|
|
52
|
-
return F.useEffect(() => (l.itemMap.set(o, {
|
|
53
|
-
ref: o,
|
|
54
|
-
...a
|
|
55
|
-
}), () => void l.itemMap.delete(o))), /* @__PURE__ */ (0, I.jsx)(m, {
|
|
56
|
-
[p]: "",
|
|
57
|
-
ref: c,
|
|
58
|
-
children: r
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
h.displayName = f;
|
|
62
|
-
function g(t) {
|
|
63
|
-
let n = s(e + "CollectionConsumer", t);
|
|
64
|
-
return F.useCallback(() => {
|
|
65
|
-
let e = n.collectionRef.current;
|
|
66
|
-
if (!e) return [];
|
|
67
|
-
let t = Array.from(e.querySelectorAll(`[${p}]`));
|
|
68
|
-
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
|
|
69
|
-
}, [n.collectionRef, n.itemMap]);
|
|
70
|
-
}
|
|
71
|
-
return R(g, "useCollection"), [
|
|
72
|
-
{
|
|
73
|
-
Provider: c,
|
|
74
|
-
Slot: d,
|
|
75
|
-
ItemSlot: h
|
|
76
|
-
},
|
|
77
|
-
g,
|
|
78
|
-
r
|
|
79
|
-
];
|
|
80
|
-
}
|
|
81
|
-
R(z, "createCollection");
|
|
82
|
-
var B = /* @__PURE__ */ new WeakMap(), V = class e extends Map {
|
|
83
|
-
static {
|
|
84
|
-
R(this, "OrderedDict");
|
|
85
|
-
}
|
|
86
|
-
#e;
|
|
87
|
-
constructor(e) {
|
|
88
|
-
super(e), this.#e = [...super.keys()], B.set(this, !0);
|
|
89
|
-
}
|
|
90
|
-
set(e, t) {
|
|
91
|
-
return B.get(this) && !this.has(e) && this.#e.push(e), super.set(e, t), this;
|
|
92
|
-
}
|
|
93
|
-
insert(e, t, n) {
|
|
94
|
-
let r = this.has(t), i = r ? this.size : this.size + 1, a = U(e), o = a >= 0 ? Math.min(a, i - 1) : Math.max(i + a, 0);
|
|
95
|
-
if (r ? this.#e.indexOf(t) === o : o === this.size) return this.set(t, n), this;
|
|
96
|
-
let s = this.#e.filter((e) => e !== t);
|
|
97
|
-
s.splice(o, 0, t);
|
|
98
|
-
let c = s.map((e) => [e, e === t ? n : this.get(e)]);
|
|
99
|
-
this.clear();
|
|
100
|
-
for (let [e, t] of c) this.set(e, t);
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
with(t, n, r) {
|
|
104
|
-
let i = new e(this);
|
|
105
|
-
return i.insert(t, n, r), i;
|
|
106
|
-
}
|
|
107
|
-
before(e) {
|
|
108
|
-
let t = this.#e.indexOf(e) - 1;
|
|
109
|
-
if (!(t < 0)) return this.entryAt(t);
|
|
110
|
-
}
|
|
111
|
-
setBefore(e, t, n) {
|
|
112
|
-
let r = this.#e.indexOf(e);
|
|
113
|
-
if (r === -1) return this;
|
|
114
|
-
let i = this.#e.indexOf(t), a = i !== -1 && i < r ? r - 1 : r;
|
|
115
|
-
return this.insert(a, t, n);
|
|
116
|
-
}
|
|
117
|
-
after(e) {
|
|
118
|
-
let t = this.#e.indexOf(e);
|
|
119
|
-
if (t = t === -1 || t === this.size - 1 ? -1 : t + 1, t !== -1) return this.entryAt(t);
|
|
120
|
-
}
|
|
121
|
-
setAfter(e, t, n) {
|
|
122
|
-
let r = this.#e.indexOf(e);
|
|
123
|
-
if (r === -1) return this;
|
|
124
|
-
let i = this.#e.indexOf(t), a = i !== -1 && i <= r ? r : r + 1;
|
|
125
|
-
return this.insert(a, t, n);
|
|
126
|
-
}
|
|
127
|
-
first() {
|
|
128
|
-
return this.entryAt(0);
|
|
129
|
-
}
|
|
130
|
-
last() {
|
|
131
|
-
return this.entryAt(-1);
|
|
132
|
-
}
|
|
133
|
-
clear() {
|
|
134
|
-
return this.#e = [], super.clear();
|
|
135
|
-
}
|
|
136
|
-
delete(e) {
|
|
137
|
-
let t = super.delete(e);
|
|
138
|
-
return t && this.#e.splice(this.#e.indexOf(e), 1), t;
|
|
139
|
-
}
|
|
140
|
-
deleteAt(e) {
|
|
141
|
-
let t = this.keyAt(e);
|
|
142
|
-
return t !== void 0 && this.delete(t);
|
|
143
|
-
}
|
|
144
|
-
at(e) {
|
|
145
|
-
let t = H(this.#e, e);
|
|
146
|
-
if (t !== void 0) return this.get(t);
|
|
147
|
-
}
|
|
148
|
-
entryAt(e) {
|
|
149
|
-
let t = H(this.#e, e);
|
|
150
|
-
if (t !== void 0) return [t, this.get(t)];
|
|
151
|
-
}
|
|
152
|
-
indexOf(e) {
|
|
153
|
-
return this.#e.indexOf(e);
|
|
154
|
-
}
|
|
155
|
-
keyAt(e) {
|
|
156
|
-
return H(this.#e, e);
|
|
157
|
-
}
|
|
158
|
-
from(e, t) {
|
|
159
|
-
let n = this.indexOf(e);
|
|
160
|
-
if (n === -1) return;
|
|
161
|
-
let r = n + t;
|
|
162
|
-
return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.at(r);
|
|
163
|
-
}
|
|
164
|
-
keyFrom(e, t) {
|
|
165
|
-
let n = this.indexOf(e);
|
|
166
|
-
if (n === -1) return;
|
|
167
|
-
let r = n + t;
|
|
168
|
-
return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.keyAt(r);
|
|
169
|
-
}
|
|
170
|
-
find(e, t) {
|
|
171
|
-
let n = 0;
|
|
172
|
-
for (let r of this) {
|
|
173
|
-
if (Reflect.apply(e, t, [
|
|
174
|
-
r,
|
|
175
|
-
n,
|
|
176
|
-
this
|
|
177
|
-
])) return r;
|
|
178
|
-
n++;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
findIndex(e, t) {
|
|
182
|
-
let n = 0;
|
|
183
|
-
for (let r of this) {
|
|
184
|
-
if (Reflect.apply(e, t, [
|
|
185
|
-
r,
|
|
186
|
-
n,
|
|
187
|
-
this
|
|
188
|
-
])) return n;
|
|
189
|
-
n++;
|
|
190
|
-
}
|
|
191
|
-
return -1;
|
|
192
|
-
}
|
|
193
|
-
filter(t, n) {
|
|
194
|
-
let r = [], i = 0;
|
|
195
|
-
for (let e of this) Reflect.apply(t, n, [
|
|
196
|
-
e,
|
|
197
|
-
i,
|
|
198
|
-
this
|
|
199
|
-
]) && r.push(e), i++;
|
|
200
|
-
return new e(r);
|
|
201
|
-
}
|
|
202
|
-
map(t, n) {
|
|
203
|
-
let r = [], i = 0;
|
|
204
|
-
for (let e of this) r.push([e[0], Reflect.apply(t, n, [
|
|
205
|
-
e,
|
|
206
|
-
i,
|
|
207
|
-
this
|
|
208
|
-
])]), i++;
|
|
209
|
-
return new e(r);
|
|
210
|
-
}
|
|
211
|
-
reduce(...e) {
|
|
212
|
-
let [t, n] = e, r = e.length > 1;
|
|
213
|
-
if (!r && this.size === 0) throw TypeError("Reduce of empty OrderedDict with no initial value");
|
|
214
|
-
let i = 0, a = n;
|
|
215
|
-
for (let e of this) a = i === 0 && !r ? e : Reflect.apply(t, this, [
|
|
216
|
-
a,
|
|
217
|
-
e,
|
|
218
|
-
i,
|
|
219
|
-
this
|
|
220
|
-
]), i++;
|
|
221
|
-
return a;
|
|
222
|
-
}
|
|
223
|
-
reduceRight(...e) {
|
|
224
|
-
let [t, n] = e, r = e.length > 1;
|
|
225
|
-
if (!r && this.size === 0) throw TypeError("Reduce of empty OrderedDict with no initial value");
|
|
226
|
-
let i = n;
|
|
227
|
-
for (let e = this.size - 1; e >= 0; e--) {
|
|
228
|
-
let n = this.entryAt(e);
|
|
229
|
-
i = e === this.size - 1 && !r ? n : Reflect.apply(t, this, [
|
|
230
|
-
i,
|
|
231
|
-
n,
|
|
232
|
-
e,
|
|
233
|
-
this
|
|
234
|
-
]);
|
|
235
|
-
}
|
|
236
|
-
return i;
|
|
237
|
-
}
|
|
238
|
-
sort(e) {
|
|
239
|
-
if (typeof e != "function") throw TypeError("OrderedDict.sort requires a compare function");
|
|
240
|
-
let t = [...this.entries()].sort(e);
|
|
241
|
-
this.clear();
|
|
242
|
-
for (let [e, n] of t) this.set(e, n);
|
|
243
|
-
return this;
|
|
244
|
-
}
|
|
245
|
-
toSorted(t) {
|
|
246
|
-
if (typeof t != "function") throw TypeError("OrderedDict.toSorted requires a compare function");
|
|
247
|
-
let n = [...this.entries()].sort(t);
|
|
248
|
-
return new e(n);
|
|
249
|
-
}
|
|
250
|
-
toReversed() {
|
|
251
|
-
let t = new e();
|
|
252
|
-
for (let e = this.size - 1; e >= 0; e--) {
|
|
253
|
-
let n = this.keyAt(e), r = this.get(n);
|
|
254
|
-
t.set(n, r);
|
|
255
|
-
}
|
|
256
|
-
return t;
|
|
257
|
-
}
|
|
258
|
-
toSpliced(...t) {
|
|
259
|
-
let n = [...this.entries()];
|
|
260
|
-
return n.splice(...t), new e(n);
|
|
261
|
-
}
|
|
262
|
-
slice(t, n) {
|
|
263
|
-
let r = new e();
|
|
264
|
-
for (let e of this.#e.slice(t, n)) r.set(e, this.get(e));
|
|
265
|
-
return r;
|
|
266
|
-
}
|
|
267
|
-
every(e, t) {
|
|
268
|
-
let n = 0;
|
|
269
|
-
for (let r of this) {
|
|
270
|
-
if (!Reflect.apply(e, t, [
|
|
271
|
-
r,
|
|
272
|
-
n,
|
|
273
|
-
this
|
|
274
|
-
])) return !1;
|
|
275
|
-
n++;
|
|
276
|
-
}
|
|
277
|
-
return !0;
|
|
278
|
-
}
|
|
279
|
-
some(e, t) {
|
|
280
|
-
let n = 0;
|
|
281
|
-
for (let r of this) {
|
|
282
|
-
if (Reflect.apply(e, t, [
|
|
283
|
-
r,
|
|
284
|
-
n,
|
|
285
|
-
this
|
|
286
|
-
])) return !0;
|
|
287
|
-
n++;
|
|
288
|
-
}
|
|
289
|
-
return !1;
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
function H(e, t) {
|
|
293
|
-
if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
|
|
294
|
-
let n = ae(e, t);
|
|
295
|
-
return n === -1 ? void 0 : e[n];
|
|
296
|
-
}
|
|
297
|
-
R(H, "at");
|
|
298
|
-
function ae(e, t) {
|
|
299
|
-
let n = e.length, r = U(t), i = r >= 0 ? r : n + r;
|
|
300
|
-
return i < 0 || i >= n ? -1 : i;
|
|
301
|
-
}
|
|
302
|
-
R(ae, "toSafeIndex");
|
|
303
|
-
function U(e) {
|
|
304
|
-
return e !== e || e === 0 ? 0 : Math.trunc(e);
|
|
305
|
-
}
|
|
306
|
-
R(U, "toSafeInteger");
|
|
307
|
-
// @__NO_SIDE_EFFECTS__
|
|
308
|
-
function oe(e) {
|
|
309
|
-
let t = e + "CollectionProvider", [n, r] = S(t), [a, s] = n(t);
|
|
310
|
-
a.displayName = e + "CollectionStableContextProvider";
|
|
311
|
-
let [c, l] = n(t);
|
|
312
|
-
c.displayName = e + "CollectionStatefulContextProvider";
|
|
313
|
-
let u = /* @__PURE__ */ R(({ state: e, ...t }) => e ? /* @__PURE__ */ (0, I.jsx)(f, {
|
|
314
|
-
...t,
|
|
315
|
-
state: e
|
|
316
|
-
}) : /* @__PURE__ */ (0, I.jsx)(d, { ...t }), "CollectionProvider");
|
|
317
|
-
u.displayName = t;
|
|
318
|
-
let d = /* @__PURE__ */ R((e) => {
|
|
319
|
-
let t = y();
|
|
320
|
-
return /* @__PURE__ */ (0, I.jsx)(f, {
|
|
321
|
-
...e,
|
|
322
|
-
state: t
|
|
323
|
-
});
|
|
324
|
-
}, "CollectionInit");
|
|
325
|
-
d.displayName = e + "CollectionInit";
|
|
326
|
-
let f = /* @__PURE__ */ R((e) => {
|
|
327
|
-
let { scope: t, children: n, state: r } = e, o = F.useRef(null), [s, l] = F.useState(null), u = i(o, l), [d, f] = r, p = F.useRef(new V()), m = F.useCallback(() => {
|
|
328
|
-
let e = p.current;
|
|
329
|
-
return ce(e) || e.sort(le), e;
|
|
330
|
-
}, []);
|
|
331
|
-
return F.useEffect(() => {
|
|
332
|
-
if (!s) return;
|
|
333
|
-
let e = ue(() => {
|
|
334
|
-
f((e) => {
|
|
335
|
-
let t = e.toSorted(le);
|
|
336
|
-
return t.some(([t], n) => e.keyAt(n) !== t) ? t : e;
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
return e.observe(s, {
|
|
340
|
-
childList: !0,
|
|
341
|
-
subtree: !0
|
|
342
|
-
}), () => {
|
|
343
|
-
e.disconnect();
|
|
344
|
-
};
|
|
345
|
-
}, [s, f]), /* @__PURE__ */ (0, I.jsx)(a, {
|
|
346
|
-
scope: t,
|
|
347
|
-
collectionElementRef: u,
|
|
348
|
-
collectionElementRefObject: o,
|
|
349
|
-
getCollection: m,
|
|
350
|
-
setCollection: f,
|
|
351
|
-
registryRef: p,
|
|
352
|
-
children: /* @__PURE__ */ (0, I.jsx)(c, {
|
|
353
|
-
scope: t,
|
|
354
|
-
collectionElement: s,
|
|
355
|
-
collection: d,
|
|
356
|
-
children: n
|
|
357
|
-
})
|
|
358
|
-
});
|
|
359
|
-
}, "CollectionProviderImpl");
|
|
360
|
-
f.displayName = e + "CollectionProviderImpl";
|
|
361
|
-
let p = e + "CollectionSlot", m = o(p), h = F.forwardRef((e, t) => {
|
|
362
|
-
let { scope: n, children: r } = e, a = s(p, n), o = i(t, a.collectionElementRef);
|
|
363
|
-
return /* @__PURE__ */ (0, I.jsx)(m, {
|
|
364
|
-
ref: o,
|
|
365
|
-
children: r
|
|
366
|
-
});
|
|
367
|
-
});
|
|
368
|
-
h.displayName = p;
|
|
369
|
-
let g = e + "CollectionItemSlot", _ = o(g), v = F.forwardRef((e, t) => {
|
|
370
|
-
let { scope: n, children: r, ...a } = e, o = F.useRef(null), { setCollection: c, registryRef: l } = s(g, n), u = F.useRef(a);
|
|
371
|
-
se(u.current, a) || (u.current = a);
|
|
372
|
-
let d = u.current, f = F.useCallback((e) => {
|
|
373
|
-
let t = l.current;
|
|
374
|
-
e ? t.set(e, {
|
|
375
|
-
...u.current,
|
|
376
|
-
element: e
|
|
377
|
-
}) : o.current && t.delete(o.current);
|
|
378
|
-
}, [l]), p = i(t, f, o);
|
|
379
|
-
b(() => {
|
|
380
|
-
let e = o.current, t = l.current;
|
|
381
|
-
e && t.has(e) && t.set(e, {
|
|
382
|
-
...d,
|
|
383
|
-
element: e
|
|
384
|
-
});
|
|
385
|
-
}, [d, l]);
|
|
386
|
-
let m = F.useRef(null);
|
|
387
|
-
return F.useEffect(() => {
|
|
388
|
-
let e = o.current, t = m.current;
|
|
389
|
-
(t?.element ?? null) === e && (!e || t?.itemData === d) || (m.current = e ? {
|
|
390
|
-
element: e,
|
|
391
|
-
itemData: d
|
|
392
|
-
} : null, c((n) => {
|
|
393
|
-
let r = new V(n);
|
|
394
|
-
return t && t.element !== e && r.delete(t.element), e && r.set(e, {
|
|
395
|
-
...d,
|
|
396
|
-
element: e
|
|
397
|
-
}), r.sort(le);
|
|
398
|
-
}));
|
|
399
|
-
}), F.useEffect(() => () => {
|
|
400
|
-
let e = m.current;
|
|
401
|
-
m.current = null, e && c((t) => {
|
|
402
|
-
if (!t.has(e.element)) return t;
|
|
403
|
-
let n = new V(t);
|
|
404
|
-
return n.delete(e.element), n;
|
|
405
|
-
});
|
|
406
|
-
}, [c]), /* @__PURE__ */ (0, I.jsx)(_, {
|
|
407
|
-
"data-radix-collection-item": "",
|
|
408
|
-
ref: p,
|
|
409
|
-
children: r
|
|
410
|
-
});
|
|
411
|
-
});
|
|
412
|
-
v.displayName = g;
|
|
413
|
-
function y() {
|
|
414
|
-
return F.useState(new V());
|
|
415
|
-
}
|
|
416
|
-
R(y, "useInitCollection");
|
|
417
|
-
function x(t) {
|
|
418
|
-
let { collection: n } = l(e + "CollectionConsumer", t);
|
|
419
|
-
return n;
|
|
420
|
-
}
|
|
421
|
-
R(x, "useCollection");
|
|
422
|
-
function C(t) {
|
|
423
|
-
let { getCollection: n } = s(e + "CollectionConsumer", t);
|
|
424
|
-
return n;
|
|
425
|
-
}
|
|
426
|
-
return R(C, "useGetCollection"), [{
|
|
427
|
-
Provider: u,
|
|
428
|
-
Slot: h,
|
|
429
|
-
ItemSlot: v
|
|
430
|
-
}, {
|
|
431
|
-
createCollectionScope: r,
|
|
432
|
-
useCollection: x,
|
|
433
|
-
useGetCollection: C,
|
|
434
|
-
useInitCollection: y
|
|
435
|
-
}];
|
|
436
|
-
}
|
|
437
|
-
R(oe, "createCollection");
|
|
438
|
-
function se(e, t) {
|
|
439
|
-
if (e === t) return !0;
|
|
440
|
-
if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
|
|
441
|
-
let n = Object.keys(e), r = Object.keys(t);
|
|
442
|
-
if (n.length !== r.length) return !1;
|
|
443
|
-
for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || e[r] !== t[r]) return !1;
|
|
444
|
-
return !0;
|
|
445
|
-
}
|
|
446
|
-
R(se, "shallowEqual");
|
|
447
|
-
function W(e, t) {
|
|
448
|
-
return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
449
|
-
}
|
|
450
|
-
R(W, "isElementPreceding");
|
|
451
|
-
function ce(e) {
|
|
452
|
-
let t;
|
|
453
|
-
for (let n of e.keys()) {
|
|
454
|
-
if (t) {
|
|
455
|
-
let e = t.compareDocumentPosition(n);
|
|
456
|
-
if (!(e & Node.DOCUMENT_POSITION_DISCONNECTED) && e & Node.DOCUMENT_POSITION_PRECEDING) return !1;
|
|
457
|
-
}
|
|
458
|
-
t = n;
|
|
459
|
-
}
|
|
460
|
-
return !0;
|
|
461
|
-
}
|
|
462
|
-
R(ce, "isInDocumentOrder");
|
|
463
|
-
function le(e, t) {
|
|
464
|
-
return !e[1].element || !t[1].element ? 0 : W(e[1].element, t[1].element) ? -1 : 1;
|
|
465
|
-
}
|
|
466
|
-
R(le, "sortByDocumentPosition");
|
|
467
|
-
function ue(e) {
|
|
468
|
-
return new MutationObserver((t) => {
|
|
469
|
-
for (let n of t) if (n.type === "childList") {
|
|
470
|
-
e();
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
R(ue, "getChildListObserver");
|
|
476
|
-
//#endregion
|
|
477
|
-
//#region ../node_modules/.pnpm/@radix-ui+react-direction@1.2.0_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
478
|
-
var de = Object.defineProperty, fe = (e, t) => de(e, "name", {
|
|
479
|
-
value: t,
|
|
480
|
-
configurable: !0
|
|
481
|
-
}), pe = {
|
|
482
|
-
LTR: "ltr",
|
|
483
|
-
RTL: "rtl"
|
|
484
|
-
}, me = F.createContext(void 0);
|
|
485
|
-
function he(e) {
|
|
486
|
-
let t = F.useContext(me);
|
|
487
|
-
return e || t || pe.LTR;
|
|
488
|
-
}
|
|
489
|
-
fe(he, "useDirection");
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region ../node_modules/.pnpm/@radix-ui+number@1.1.3/node_modules/@radix-ui/number/dist/index.mjs
|
|
492
|
-
var ge = Object.defineProperty, _e = (e, t) => ge(e, "name", {
|
|
493
|
-
value: t,
|
|
494
|
-
configurable: !0
|
|
495
|
-
});
|
|
496
|
-
function ve(e, [t, n]) {
|
|
497
|
-
return Math.min(n, Math.max(t, e));
|
|
498
|
-
}
|
|
499
|
-
_e(ve, "clamp");
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region ../node_modules/.pnpm/@radix-ui+react-select@2.4.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_41875abfe3e9c9a7ec650dda663f0eb9/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
502
|
-
var ye = Object.defineProperty, G = (e, t) => ye(e, "name", {
|
|
503
|
-
value: t,
|
|
504
|
-
configurable: !0
|
|
505
|
-
}), be = {
|
|
506
|
-
ItemAligned: "item-aligned",
|
|
507
|
-
Popper: "popper"
|
|
508
|
-
}, xe = {
|
|
509
|
-
LTR: "ltr",
|
|
510
|
-
RTL: "rtl"
|
|
511
|
-
}, Se = [
|
|
512
|
-
" ",
|
|
513
|
-
"Enter",
|
|
514
|
-
"ArrowUp",
|
|
515
|
-
"ArrowDown"
|
|
516
|
-
], Ce = [" ", "Enter"], K = "Select", [we, Te, Ee] = /* @__PURE__ */ z(K), [q, De] = S(K, [Ee, m]), Oe = m(), [ke, J] = q(K), [Ae, je] = q(K);
|
|
517
|
-
function Me(e) {
|
|
518
|
-
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: m, form: h, internal_do_not_use_render: g } = e, _ = Oe(t), [v, b] = F.useState(null), [x, S] = F.useState(null), [C, w] = F.useState(!1), E = he(l), [ee, D] = T({
|
|
519
|
-
prop: r,
|
|
520
|
-
defaultProp: i ?? !1,
|
|
521
|
-
onChange: a,
|
|
522
|
-
caller: K
|
|
523
|
-
}), [te, O] = T({
|
|
524
|
-
prop: o,
|
|
525
|
-
defaultProp: s,
|
|
526
|
-
onChange: c,
|
|
527
|
-
caller: K
|
|
528
|
-
}), k = F.useRef(null), ne = F.useRef(!1), [re, ie] = F.useState(null), A = /* @__PURE__ */ G((e) => {
|
|
529
|
-
ie({
|
|
530
|
-
value: e,
|
|
531
|
-
hasConsumerStoppedPropagation: ne.current
|
|
532
|
-
}), O(e);
|
|
533
|
-
}, "handleUserSelect"), j = F.useRef(te);
|
|
534
|
-
F.useEffect(() => {
|
|
535
|
-
let e = h ? v?.ownerDocument.getElementById(h) : v?.form;
|
|
536
|
-
if (e instanceof HTMLFormElement) {
|
|
537
|
-
let t = /* @__PURE__ */ G(() => O(j.current), "reset");
|
|
538
|
-
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
539
|
-
}
|
|
540
|
-
}, [
|
|
541
|
-
h,
|
|
542
|
-
v,
|
|
543
|
-
O
|
|
544
|
-
]);
|
|
545
|
-
let M = !v || !!h || !!v.closest("form"), [N, P] = F.useState(/* @__PURE__ */ new Set()), L = y(), R = Array.from(N).map((e) => e.props.value).join(";"), z = F.useCallback((e) => {
|
|
546
|
-
P((t) => new Set(t).add(e));
|
|
547
|
-
}, []), B = F.useCallback((e) => {
|
|
548
|
-
P((t) => {
|
|
549
|
-
let n = new Set(t);
|
|
550
|
-
return n.delete(e), n;
|
|
551
|
-
});
|
|
552
|
-
}, []), V = {
|
|
553
|
-
required: m,
|
|
554
|
-
trigger: v,
|
|
555
|
-
onTriggerChange: b,
|
|
556
|
-
valueNode: x,
|
|
557
|
-
onValueNodeChange: S,
|
|
558
|
-
valueNodeHasChildren: C,
|
|
559
|
-
onValueNodeHasChildrenChange: w,
|
|
560
|
-
contentId: L,
|
|
561
|
-
value: te,
|
|
562
|
-
onValueChange: O,
|
|
563
|
-
hasConsumerStoppedPropagationRef: ne,
|
|
564
|
-
userSelection: re,
|
|
565
|
-
onUserSelect: A,
|
|
566
|
-
open: ee,
|
|
567
|
-
onOpenChange: D,
|
|
568
|
-
dir: E,
|
|
569
|
-
triggerPointerDownPosRef: k,
|
|
570
|
-
disabled: f,
|
|
571
|
-
name: u,
|
|
572
|
-
autoComplete: d,
|
|
573
|
-
form: h,
|
|
574
|
-
nativeOptions: N,
|
|
575
|
-
nativeSelectKey: R,
|
|
576
|
-
isFormControl: M
|
|
577
|
-
};
|
|
578
|
-
return /* @__PURE__ */ (0, I.jsx)(p, {
|
|
579
|
-
..._,
|
|
580
|
-
children: /* @__PURE__ */ (0, I.jsx)(ke, {
|
|
581
|
-
scope: t,
|
|
582
|
-
...V,
|
|
583
|
-
children: /* @__PURE__ */ (0, I.jsx)(we.Provider, {
|
|
584
|
-
scope: t,
|
|
585
|
-
children: /* @__PURE__ */ (0, I.jsx)(Ae, {
|
|
586
|
-
scope: t,
|
|
587
|
-
onNativeOptionAdd: z,
|
|
588
|
-
onNativeOptionRemove: B,
|
|
589
|
-
children: bt(g) ? g(V) : n
|
|
590
|
-
})
|
|
591
|
-
})
|
|
592
|
-
})
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
G(Me, "SelectProvider");
|
|
596
|
-
var Ne = /* @__PURE__ */ G((e) => {
|
|
597
|
-
let { __scopeSelect: t, children: n, ...r } = e;
|
|
598
|
-
return /* @__PURE__ */ (0, I.jsx)(Me, {
|
|
599
|
-
__scopeSelect: t,
|
|
600
|
-
...r,
|
|
601
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [n, e ? /* @__PURE__ */ (0, I.jsx)(yt, { __scopeSelect: t }) : null] })
|
|
602
|
-
});
|
|
603
|
-
}, "Select"), Pe = "SelectTrigger", Fe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
604
|
-
let { __scopeSelect: n, disabled: r = !1, ...a } = e, o = Oe(n), s = J(Pe, n), c = s.disabled || r, u = i(t, s.onTriggerChange), d = Te(n), f = F.useRef("touch"), [p, m, h] = xt((e) => {
|
|
605
|
-
let t = d().filter((e) => !e.disabled), n = St(t, e, t.find((e) => e.value === s.value));
|
|
606
|
-
n !== void 0 && s.onUserSelect(n.value);
|
|
607
|
-
}), g = /* @__PURE__ */ G((e) => {
|
|
608
|
-
c || (s.onOpenChange(!0), h()), e && (s.triggerPointerDownPosRef.current = {
|
|
609
|
-
x: Math.round(e.pageX),
|
|
610
|
-
y: Math.round(e.pageY)
|
|
611
|
-
});
|
|
612
|
-
}, "handleOpen");
|
|
613
|
-
return /* @__PURE__ */ (0, I.jsx)(l, {
|
|
614
|
-
asChild: !0,
|
|
615
|
-
...o,
|
|
616
|
-
children: /* @__PURE__ */ (0, I.jsx)(k.button, {
|
|
617
|
-
type: "button",
|
|
618
|
-
role: "combobox",
|
|
619
|
-
"aria-controls": s.open ? s.contentId : void 0,
|
|
620
|
-
"aria-expanded": s.open,
|
|
621
|
-
"aria-required": s.required,
|
|
622
|
-
"aria-autocomplete": "none",
|
|
623
|
-
dir: s.dir,
|
|
624
|
-
"data-state": s.open ? "open" : "closed",
|
|
625
|
-
disabled: c,
|
|
626
|
-
"data-disabled": c ? "" : void 0,
|
|
627
|
-
"data-placeholder": Q(s.value) ? "" : void 0,
|
|
628
|
-
...a,
|
|
629
|
-
ref: u,
|
|
630
|
-
onClick: x(a.onClick, (e) => {
|
|
631
|
-
e.currentTarget.focus(), f.current !== "mouse" && g(e);
|
|
632
|
-
}),
|
|
633
|
-
onPointerDown: x(a.onPointerDown, (e) => {
|
|
634
|
-
f.current = e.pointerType;
|
|
635
|
-
let t = e.target;
|
|
636
|
-
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (g(e), e.preventDefault());
|
|
637
|
-
}),
|
|
638
|
-
onKeyDown: x(a.onKeyDown, (e) => {
|
|
639
|
-
let t = p.current !== "";
|
|
640
|
-
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && (s.hasConsumerStoppedPropagationRef.current = e.isPropagationStopped(), m(e.key)), !(t && e.key === " ") && Se.includes(e.key) && (g(), e.preventDefault());
|
|
641
|
-
})
|
|
642
|
-
})
|
|
643
|
-
});
|
|
644
|
-
}, "SelectTrigger")), Ie = "SelectValue", Le = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
645
|
-
let { __scopeSelect: n, className: r, style: a, children: o, placeholder: s = "", ...c } = e, l = J(Ie, n), { onValueNodeHasChildrenChange: u } = l, d = o !== void 0, f = i(t, l.onValueNodeChange);
|
|
646
|
-
b(() => {
|
|
647
|
-
u(d);
|
|
648
|
-
}, [u, d]);
|
|
649
|
-
let p = Q(l.value);
|
|
650
|
-
return /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
651
|
-
...c,
|
|
652
|
-
asChild: !p && c.asChild,
|
|
653
|
-
ref: f,
|
|
654
|
-
style: { pointerEvents: "none" },
|
|
655
|
-
children: /* @__PURE__ */ (0, I.jsx)(F.Fragment, { children: p ? s : o }, p ? "placeholder" : "value")
|
|
656
|
-
});
|
|
657
|
-
}, "SelectValue")), Re = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
658
|
-
let { __scopeSelect: n, children: r, ...i } = e;
|
|
659
|
-
return /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
660
|
-
"aria-hidden": !0,
|
|
661
|
-
...i,
|
|
662
|
-
ref: t,
|
|
663
|
-
children: r || "▼"
|
|
664
|
-
});
|
|
665
|
-
}, "SelectIcon")), [ze, Be] = q("SelectPortal", { forceMount: void 0 }), Ve = /* @__PURE__ */ G((e) => {
|
|
666
|
-
let { __scopeSelect: t, forceMount: n, ...r } = e;
|
|
667
|
-
return /* @__PURE__ */ (0, I.jsx)(ze, {
|
|
668
|
-
scope: e.__scopeSelect,
|
|
669
|
-
forceMount: n,
|
|
670
|
-
children: /* @__PURE__ */ (0, I.jsx)(O, {
|
|
671
|
-
asChild: !0,
|
|
672
|
-
...r
|
|
673
|
-
})
|
|
674
|
-
});
|
|
675
|
-
}, "SelectPortal"), Y = "SelectContent", He = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
676
|
-
let n = Be(Y, e.__scopeSelect), { forceMount: r = n.forceMount, ...i } = e, a = J(Y, e.__scopeSelect), [o, s] = F.useState();
|
|
677
|
-
return b(() => {
|
|
678
|
-
s(new DocumentFragment());
|
|
679
|
-
}, []), /* @__PURE__ */ (0, I.jsx)(ie, {
|
|
680
|
-
present: r || a.open,
|
|
681
|
-
children: ({ present: e }) => e ? /* @__PURE__ */ (0, I.jsx)(Ke, {
|
|
682
|
-
...i,
|
|
683
|
-
ref: t
|
|
684
|
-
}) : /* @__PURE__ */ (0, I.jsx)(Ue, {
|
|
685
|
-
...i,
|
|
686
|
-
fragment: o
|
|
687
|
-
})
|
|
688
|
-
});
|
|
689
|
-
}, "SelectContent")), Ue = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
690
|
-
let { __scopeSelect: n, children: r, fragment: i } = e;
|
|
691
|
-
return i ? P.createPortal(/* @__PURE__ */ (0, I.jsx)(We, {
|
|
692
|
-
scope: n,
|
|
693
|
-
children: /* @__PURE__ */ (0, I.jsx)(we.Slot, {
|
|
694
|
-
scope: n,
|
|
695
|
-
children: /* @__PURE__ */ (0, I.jsx)("div", {
|
|
696
|
-
ref: t,
|
|
697
|
-
children: r
|
|
698
|
-
})
|
|
699
|
-
})
|
|
700
|
-
}), i) : null;
|
|
701
|
-
}, "SelectContentFragment")), X = 10, [We, Z] = q(Y), Ge = o("SelectContent.RemoveScroll"), Ke = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
702
|
-
let { __scopeSelect: n } = e, { position: r = be.ItemAligned, onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = e, y = J(Y, n), [b, S] = F.useState(null), [C, w] = F.useState(null), T = i(t, S), [O, k] = F.useState(null), [re, ie] = F.useState(null), A = Te(n), [j, M] = F.useState(!1), N = F.useRef(!1), P = F.useRef(!1), L = F.useRef(!1);
|
|
703
|
-
F.useEffect(() => {
|
|
704
|
-
if (b) return ee(b);
|
|
705
|
-
}, [b]), ne();
|
|
706
|
-
let R = F.useCallback((e) => {
|
|
707
|
-
let [t, ...n] = A().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
708
|
-
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && C && (C.scrollTop = 0), n === r && C && (C.scrollTop = C.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
709
|
-
}, [A, C]), z = F.useCallback(() => R([O, b]), [
|
|
710
|
-
R,
|
|
711
|
-
O,
|
|
712
|
-
b
|
|
713
|
-
]);
|
|
714
|
-
F.useEffect(() => {
|
|
715
|
-
j && z();
|
|
716
|
-
}, [j, z]);
|
|
717
|
-
let { onOpenChange: B, triggerPointerDownPosRef: V } = y;
|
|
718
|
-
F.useEffect(() => {
|
|
719
|
-
if (b) {
|
|
720
|
-
let e = {
|
|
721
|
-
x: 0,
|
|
722
|
-
y: 0
|
|
723
|
-
}, t = /* @__PURE__ */ G((t) => {
|
|
724
|
-
e = {
|
|
725
|
-
x: Math.abs(Math.round(t.pageX) - (V.current?.x ?? 0)),
|
|
726
|
-
y: Math.abs(Math.round(t.pageY) - (V.current?.y ?? 0))
|
|
727
|
-
};
|
|
728
|
-
}, "handlePointerMove"), n = /* @__PURE__ */ G((n) => {
|
|
729
|
-
e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(b) || B(!1), document.removeEventListener("pointermove", t), V.current = null;
|
|
730
|
-
}, "handlePointerUp");
|
|
731
|
-
return V.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
|
|
732
|
-
capture: !0,
|
|
733
|
-
once: !0
|
|
734
|
-
})), () => {
|
|
735
|
-
document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", n, { capture: !0 });
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
}, [
|
|
739
|
-
b,
|
|
740
|
-
B,
|
|
741
|
-
V
|
|
742
|
-
]), F.useEffect(() => {
|
|
743
|
-
let e = /* @__PURE__ */ G(() => B(!1), "close");
|
|
744
|
-
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
745
|
-
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
746
|
-
};
|
|
747
|
-
}, [B]);
|
|
748
|
-
let [H, ae] = xt((e) => {
|
|
749
|
-
let t = A().filter((e) => !e.disabled), n = St(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
750
|
-
n && setTimeout(() => n.ref.current?.focus());
|
|
751
|
-
}), U = F.useCallback((e, t, n) => {
|
|
752
|
-
let r = !P.current;
|
|
753
|
-
r && (P.current = !0);
|
|
754
|
-
let i = !N.current && !n;
|
|
755
|
-
y.value !== void 0 && y.value === t || i ? (k(e), i && (N.current = !0)) : r && k(e);
|
|
756
|
-
}, [y.value]), oe = F.useCallback(() => b?.focus(), [b]), se = F.useCallback((e, t, n) => {
|
|
757
|
-
if (!e) return;
|
|
758
|
-
let r = !L.current;
|
|
759
|
-
r && (L.current = !0);
|
|
760
|
-
let i = !N.current && !n;
|
|
761
|
-
(y.value !== void 0 && y.value === t || i || r) && ie(e);
|
|
762
|
-
}, [y.value]), W = r === be.Popper ? Je : qe, ce = W === Je ? {
|
|
763
|
-
side: c,
|
|
764
|
-
sideOffset: l,
|
|
765
|
-
align: u,
|
|
766
|
-
alignOffset: d,
|
|
767
|
-
arrowPadding: f,
|
|
768
|
-
collisionBoundary: p,
|
|
769
|
-
collisionPadding: m,
|
|
770
|
-
sticky: h,
|
|
771
|
-
hideWhenDetached: g,
|
|
772
|
-
avoidCollisions: _
|
|
773
|
-
} : {};
|
|
774
|
-
return /* @__PURE__ */ (0, I.jsx)(We, {
|
|
775
|
-
scope: n,
|
|
776
|
-
content: b,
|
|
777
|
-
viewport: C,
|
|
778
|
-
onViewportChange: w,
|
|
779
|
-
itemRefCallback: U,
|
|
780
|
-
selectedItem: O,
|
|
781
|
-
onItemLeave: oe,
|
|
782
|
-
itemTextRefCallback: se,
|
|
783
|
-
focusSelectedItem: z,
|
|
784
|
-
selectedItemText: re,
|
|
785
|
-
position: r,
|
|
786
|
-
isPositioned: j,
|
|
787
|
-
searchRef: H,
|
|
788
|
-
children: /* @__PURE__ */ (0, I.jsx)(D, {
|
|
789
|
-
as: Ge,
|
|
790
|
-
allowPinchZoom: !0,
|
|
791
|
-
children: /* @__PURE__ */ (0, I.jsx)(te, {
|
|
792
|
-
asChild: !0,
|
|
793
|
-
trapped: y.open,
|
|
794
|
-
onMountAutoFocus: (e) => {
|
|
795
|
-
e.preventDefault();
|
|
796
|
-
},
|
|
797
|
-
onUnmountAutoFocus: x(a, (e) => {
|
|
798
|
-
y.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
|
|
799
|
-
}),
|
|
800
|
-
children: /* @__PURE__ */ (0, I.jsx)(E, {
|
|
801
|
-
asChild: !0,
|
|
802
|
-
disableOutsidePointerEvents: !0,
|
|
803
|
-
onEscapeKeyDown: o,
|
|
804
|
-
onPointerDownOutside: s,
|
|
805
|
-
onFocusOutside: (e) => e.preventDefault(),
|
|
806
|
-
onDismiss: () => y.onOpenChange(!1),
|
|
807
|
-
children: /* @__PURE__ */ (0, I.jsx)(W, {
|
|
808
|
-
role: "listbox",
|
|
809
|
-
id: y.contentId,
|
|
810
|
-
"data-state": y.open ? "open" : "closed",
|
|
811
|
-
dir: y.dir,
|
|
812
|
-
onContextMenu: (e) => e.preventDefault(),
|
|
813
|
-
...v,
|
|
814
|
-
...ce,
|
|
815
|
-
onPlaced: () => M(!0),
|
|
816
|
-
ref: T,
|
|
817
|
-
style: {
|
|
818
|
-
display: "flex",
|
|
819
|
-
flexDirection: "column",
|
|
820
|
-
outline: "none",
|
|
821
|
-
...v.style
|
|
822
|
-
},
|
|
823
|
-
onKeyDown: x(v.onKeyDown, (e) => {
|
|
824
|
-
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
825
|
-
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ae(e.key), [
|
|
826
|
-
"ArrowUp",
|
|
827
|
-
"ArrowDown",
|
|
828
|
-
"Home",
|
|
829
|
-
"End"
|
|
830
|
-
].includes(e.key)) {
|
|
831
|
-
let t = A().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
832
|
-
if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
833
|
-
let n = e.target, r = t.indexOf(n);
|
|
834
|
-
t = t.slice(r + 1);
|
|
835
|
-
}
|
|
836
|
-
setTimeout(() => R(t)), e.preventDefault();
|
|
837
|
-
}
|
|
838
|
-
})
|
|
839
|
-
})
|
|
840
|
-
})
|
|
841
|
-
})
|
|
842
|
-
})
|
|
843
|
-
});
|
|
844
|
-
}, "SelectContentImpl")), qe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
845
|
-
let { __scopeSelect: n, onPlaced: r, ...a } = e, o = J(Y, n), s = Z(Y, n), [c, l] = F.useState(null), [u, d] = F.useState(null), f = i(t, d), p = Te(n), m = F.useRef(!1), h = F.useRef(!0), { viewport: g, selectedItem: _, selectedItemText: v, focusSelectedItem: y } = s, x = F.useCallback(() => {
|
|
846
|
-
if (o.trigger && o.valueNode && c && u && g && _ && v) {
|
|
847
|
-
let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), i = v.getBoundingClientRect();
|
|
848
|
-
if (o.dir !== xe.RTL) {
|
|
849
|
-
let r = i.left - t.left, a = n.left - r, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ve(a, [X, Math.max(X, u - l)]);
|
|
850
|
-
c.style.minWidth = s + "px", c.style.left = d + "px";
|
|
851
|
-
} else {
|
|
852
|
-
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ve(a, [X, Math.max(X, u - l)]);
|
|
853
|
-
c.style.minWidth = s + "px", c.style.right = d + "px";
|
|
854
|
-
}
|
|
855
|
-
let a = p(), s = window.innerHeight - X * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - X, ee = s - E, D = _.offsetHeight / 2, te = _.offsetTop + D, O = f + h + te, k = x - O;
|
|
856
|
-
if (O <= E) {
|
|
857
|
-
let e = a.length > 0 && _ === a[a.length - 1].ref.current;
|
|
858
|
-
c.style.bottom = "0px";
|
|
859
|
-
let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = O + Math.max(ee, D + (e ? T : 0) + t + y);
|
|
860
|
-
c.style.height = n + "px";
|
|
861
|
-
} else {
|
|
862
|
-
let e = a.length > 0 && _ === a[0].ref.current;
|
|
863
|
-
c.style.top = "0px";
|
|
864
|
-
let t = Math.max(E, f + g.offsetTop + (e ? w : 0) + D) + k;
|
|
865
|
-
c.style.height = t + "px", g.scrollTop = O - E + g.offsetTop;
|
|
866
|
-
}
|
|
867
|
-
c.style.margin = `${X}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", r?.(), requestAnimationFrame(() => m.current = !0);
|
|
868
|
-
}
|
|
869
|
-
}, [
|
|
870
|
-
p,
|
|
871
|
-
o.trigger,
|
|
872
|
-
o.valueNode,
|
|
873
|
-
c,
|
|
874
|
-
u,
|
|
875
|
-
g,
|
|
876
|
-
_,
|
|
877
|
-
v,
|
|
878
|
-
o.dir,
|
|
879
|
-
r
|
|
880
|
-
]);
|
|
881
|
-
b(() => x(), [x]);
|
|
882
|
-
let [S, C] = F.useState();
|
|
883
|
-
b(() => {
|
|
884
|
-
u && C(window.getComputedStyle(u).zIndex);
|
|
885
|
-
}, [u]);
|
|
886
|
-
let w = F.useCallback((e) => {
|
|
887
|
-
e && h.current === !0 && (x(), y?.(), h.current = !1);
|
|
888
|
-
}, [x, y]);
|
|
889
|
-
return /* @__PURE__ */ (0, I.jsx)(Ye, {
|
|
890
|
-
scope: n,
|
|
891
|
-
contentWrapper: c,
|
|
892
|
-
shouldExpandOnScrollRef: m,
|
|
893
|
-
onScrollButtonChange: w,
|
|
894
|
-
children: /* @__PURE__ */ (0, I.jsx)("div", {
|
|
895
|
-
ref: l,
|
|
896
|
-
style: {
|
|
897
|
-
display: "flex",
|
|
898
|
-
flexDirection: "column",
|
|
899
|
-
position: "fixed",
|
|
900
|
-
zIndex: S
|
|
901
|
-
},
|
|
902
|
-
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
903
|
-
...a,
|
|
904
|
-
ref: f,
|
|
905
|
-
style: {
|
|
906
|
-
boxSizing: "border-box",
|
|
907
|
-
maxHeight: "100%",
|
|
908
|
-
...a.style
|
|
909
|
-
}
|
|
910
|
-
})
|
|
911
|
-
})
|
|
912
|
-
});
|
|
913
|
-
}, "SelectItemAlignedPosition")), Je = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
914
|
-
let { __scopeSelect: n, align: r = "start", collisionPadding: i = X, ...a } = e, o = Oe(n);
|
|
915
|
-
return /* @__PURE__ */ (0, I.jsx)(d, {
|
|
916
|
-
...o,
|
|
917
|
-
...a,
|
|
918
|
-
ref: t,
|
|
919
|
-
align: r,
|
|
920
|
-
collisionPadding: i,
|
|
921
|
-
style: {
|
|
922
|
-
boxSizing: "border-box",
|
|
923
|
-
...a.style,
|
|
924
|
-
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
925
|
-
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
926
|
-
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
927
|
-
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
928
|
-
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
}, "SelectPopperPosition")), [Ye, Xe] = q(Y, {}), Ze = "SelectViewport", Qe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
932
|
-
let { __scopeSelect: n, nonce: r, ...a } = e, o = Z(Ze, n), s = Xe(Ze, n), c = i(t, o.onViewportChange), l = F.useRef(0);
|
|
933
|
-
return /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)("style", {
|
|
934
|
-
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
935
|
-
nonce: r
|
|
936
|
-
}), /* @__PURE__ */ (0, I.jsx)(we.Slot, {
|
|
937
|
-
scope: n,
|
|
938
|
-
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
939
|
-
"data-radix-select-viewport": "",
|
|
940
|
-
role: "presentation",
|
|
941
|
-
...a,
|
|
942
|
-
ref: c,
|
|
943
|
-
style: {
|
|
944
|
-
position: "relative",
|
|
945
|
-
flex: 1,
|
|
946
|
-
overflow: "hidden auto",
|
|
947
|
-
...a.style
|
|
948
|
-
},
|
|
949
|
-
onScroll: x(a.onScroll, (e) => {
|
|
950
|
-
let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = s;
|
|
951
|
-
if (r?.current && n) {
|
|
952
|
-
let e = Math.abs(l.current - t.scrollTop);
|
|
953
|
-
if (e > 0) {
|
|
954
|
-
let r = window.innerHeight - X * 2, i = parseFloat(n.style.minHeight), a = parseFloat(n.style.height), o = Math.max(i, a);
|
|
955
|
-
if (o < r) {
|
|
956
|
-
let i = o + e, a = Math.min(r, i), s = i - a;
|
|
957
|
-
n.style.height = a + "px", n.style.bottom === "0px" && (t.scrollTop = s > 0 ? s : 0, n.style.justifyContent = "flex-end");
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
l.current = t.scrollTop;
|
|
962
|
-
})
|
|
963
|
-
})
|
|
964
|
-
})] });
|
|
965
|
-
}, "SelectViewport")), [$e, et] = q("SelectGroup"), tt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
966
|
-
let { __scopeSelect: n, ...r } = e, i = y();
|
|
967
|
-
return /* @__PURE__ */ (0, I.jsx)($e, {
|
|
968
|
-
scope: n,
|
|
969
|
-
id: i,
|
|
970
|
-
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
971
|
-
role: "group",
|
|
972
|
-
"aria-labelledby": i,
|
|
973
|
-
...r,
|
|
974
|
-
ref: t
|
|
975
|
-
})
|
|
976
|
-
});
|
|
977
|
-
}, "SelectGroup")), nt = "SelectLabel", rt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
978
|
-
let { __scopeSelect: n, ...r } = e, i = et(nt, n);
|
|
979
|
-
return /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
980
|
-
id: i.id,
|
|
981
|
-
...r,
|
|
982
|
-
ref: t
|
|
983
|
-
});
|
|
984
|
-
}, "SelectLabel")), it = "SelectItem", [at, ot] = q(it), st = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
985
|
-
let { __scopeSelect: n, value: r, disabled: a = !1, textValue: o, ...s } = e, c = J(it, n), l = Z(it, n), u = c.value === r, [d, f] = F.useState(o ?? ""), [p, m] = F.useState(!1), h = w((e) => l.itemRefCallback?.(e, r, a)), g = i(t, h), _ = y(), v = F.useRef("touch");
|
|
986
|
-
function b(e) {
|
|
987
|
-
c.hasConsumerStoppedPropagationRef.current = e.isPropagationStopped(), c.onUserSelect(r), c.onOpenChange(!1);
|
|
988
|
-
}
|
|
989
|
-
return G(b, "handleSelect"), /* @__PURE__ */ (0, I.jsx)(at, {
|
|
990
|
-
scope: n,
|
|
991
|
-
value: r,
|
|
992
|
-
disabled: a,
|
|
993
|
-
textId: _,
|
|
994
|
-
isSelected: u,
|
|
995
|
-
onItemTextChange: F.useCallback((e) => {
|
|
996
|
-
f((t) => t || (e?.textContent ?? "").trim());
|
|
997
|
-
}, []),
|
|
998
|
-
children: /* @__PURE__ */ (0, I.jsx)(we.ItemSlot, {
|
|
999
|
-
scope: n,
|
|
1000
|
-
value: r,
|
|
1001
|
-
disabled: a,
|
|
1002
|
-
textValue: d,
|
|
1003
|
-
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
1004
|
-
role: "option",
|
|
1005
|
-
"aria-labelledby": _,
|
|
1006
|
-
"data-highlighted": p ? "" : void 0,
|
|
1007
|
-
"aria-selected": u && p,
|
|
1008
|
-
"data-state": u ? "checked" : "unchecked",
|
|
1009
|
-
"aria-disabled": a || void 0,
|
|
1010
|
-
"data-disabled": a ? "" : void 0,
|
|
1011
|
-
tabIndex: a ? void 0 : -1,
|
|
1012
|
-
...s,
|
|
1013
|
-
ref: g,
|
|
1014
|
-
onFocus: x(s.onFocus, () => m(!0)),
|
|
1015
|
-
onBlur: x(s.onBlur, () => m(!1)),
|
|
1016
|
-
onClick: x(s.onClick, (e) => {
|
|
1017
|
-
a || v.current !== "mouse" && b(e);
|
|
1018
|
-
}),
|
|
1019
|
-
onPointerUp: x(s.onPointerUp, (e) => {
|
|
1020
|
-
a || v.current === "mouse" && b(e);
|
|
1021
|
-
}),
|
|
1022
|
-
onPointerDown: x(s.onPointerDown, (e) => {
|
|
1023
|
-
v.current = e.pointerType;
|
|
1024
|
-
}),
|
|
1025
|
-
onPointerMove: x(s.onPointerMove, (e) => {
|
|
1026
|
-
v.current = e.pointerType, a ? l.onItemLeave?.() : v.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
|
|
1027
|
-
}),
|
|
1028
|
-
onPointerLeave: x(s.onPointerLeave, (e) => {
|
|
1029
|
-
e.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
1030
|
-
}),
|
|
1031
|
-
onKeyDown: x(s.onKeyDown, (e) => {
|
|
1032
|
-
a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (Ce.includes(e.key) && b(e), e.key === " " && e.preventDefault());
|
|
1033
|
-
})
|
|
1034
|
-
})
|
|
1035
|
-
})
|
|
1036
|
-
});
|
|
1037
|
-
}, "SelectItem")), ct = "SelectItemText", lt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1038
|
-
let { __scopeSelect: n, className: r, style: a, ...o } = e, s = J(ct, n), c = Z(ct, n), l = ot(ct, n), u = je(ct, n), [d, f] = F.useState(null), p = w((e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), m = i(t, f, l.onItemTextChange, p), h = d?.textContent, g = F.useMemo(() => /* @__PURE__ */ (0, I.jsx)("option", {
|
|
1039
|
-
value: l.value,
|
|
1040
|
-
disabled: l.disabled,
|
|
1041
|
-
children: h
|
|
1042
|
-
}, l.value), [
|
|
1043
|
-
l.disabled,
|
|
1044
|
-
l.value,
|
|
1045
|
-
h
|
|
1046
|
-
]), { onNativeOptionAdd: _, onNativeOptionRemove: v } = u;
|
|
1047
|
-
return b(() => (_(g), () => v(g)), [
|
|
1048
|
-
_,
|
|
1049
|
-
v,
|
|
1050
|
-
g
|
|
1051
|
-
]), /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
1052
|
-
id: l.textId,
|
|
1053
|
-
...o,
|
|
1054
|
-
ref: m
|
|
1055
|
-
}), l.isSelected && s.valueNode && !s.valueNodeHasChildren && !Q(s.value) ? P.createPortal(o.children, s.valueNode) : null] });
|
|
1056
|
-
}, "SelectItemText")), ut = "SelectItemIndicator", dt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1057
|
-
let { __scopeSelect: n, ...r } = e;
|
|
1058
|
-
return ot(ut, n).isSelected ? /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
1059
|
-
"aria-hidden": !0,
|
|
1060
|
-
...r,
|
|
1061
|
-
ref: t
|
|
1062
|
-
}) : null;
|
|
1063
|
-
}, "SelectItemIndicator")), ft = "SelectScrollUpButton", pt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1064
|
-
let n = Z(ft, e.__scopeSelect), r = Xe(ft, e.__scopeSelect), [a, o] = F.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1065
|
-
return b(() => {
|
|
1066
|
-
if (n.viewport && n.isPositioned) {
|
|
1067
|
-
let e = function() {
|
|
1068
|
-
let e = t.scrollTop > 0;
|
|
1069
|
-
o(e);
|
|
1070
|
-
};
|
|
1071
|
-
G(e, "handleScroll");
|
|
1072
|
-
let t = n.viewport;
|
|
1073
|
-
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1074
|
-
}
|
|
1075
|
-
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, I.jsx)(gt, {
|
|
1076
|
-
...e,
|
|
1077
|
-
ref: s,
|
|
1078
|
-
onAutoScroll: () => {
|
|
1079
|
-
let { viewport: e, selectedItem: t } = n;
|
|
1080
|
-
e && t && (e.scrollTop -= t.offsetHeight);
|
|
1081
|
-
}
|
|
1082
|
-
}) : null;
|
|
1083
|
-
}, "SelectScrollUpButton")), mt = "SelectScrollDownButton", ht = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1084
|
-
let n = Z(mt, e.__scopeSelect), r = Xe(mt, e.__scopeSelect), [a, o] = F.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1085
|
-
return b(() => {
|
|
1086
|
-
if (n.viewport && n.isPositioned) {
|
|
1087
|
-
let e = function() {
|
|
1088
|
-
let e = t.scrollHeight - t.clientHeight, n = Math.ceil(t.scrollTop) < e;
|
|
1089
|
-
o(n);
|
|
1090
|
-
};
|
|
1091
|
-
G(e, "handleScroll");
|
|
1092
|
-
let t = n.viewport;
|
|
1093
|
-
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1094
|
-
}
|
|
1095
|
-
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, I.jsx)(gt, {
|
|
1096
|
-
...e,
|
|
1097
|
-
ref: s,
|
|
1098
|
-
onAutoScroll: () => {
|
|
1099
|
-
let { viewport: e, selectedItem: t } = n;
|
|
1100
|
-
e && t && (e.scrollTop += t.offsetHeight);
|
|
1101
|
-
}
|
|
1102
|
-
}) : null;
|
|
1103
|
-
}, "SelectScrollDownButton")), gt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1104
|
-
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Z("SelectScrollButton", n), o = F.useRef(null), s = Te(n), c = F.useCallback(() => {
|
|
1105
|
-
o.current !== null && (window.clearInterval(o.current), o.current = null);
|
|
1106
|
-
}, []);
|
|
1107
|
-
return F.useEffect(() => () => c(), [c]), b(() => {
|
|
1108
|
-
s().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1109
|
-
}, [s]), /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
1110
|
-
"aria-hidden": !0,
|
|
1111
|
-
...i,
|
|
1112
|
-
ref: t,
|
|
1113
|
-
style: {
|
|
1114
|
-
flexShrink: 0,
|
|
1115
|
-
...i.style
|
|
1116
|
-
},
|
|
1117
|
-
onPointerDown: x(i.onPointerDown, () => {
|
|
1118
|
-
o.current === null && (o.current = window.setInterval(r, 50));
|
|
1119
|
-
}),
|
|
1120
|
-
onPointerMove: x(i.onPointerMove, () => {
|
|
1121
|
-
a.onItemLeave?.(), o.current === null && (o.current = window.setInterval(r, 50));
|
|
1122
|
-
}),
|
|
1123
|
-
onPointerLeave: x(i.onPointerLeave, () => {
|
|
1124
|
-
c();
|
|
1125
|
-
})
|
|
1126
|
-
});
|
|
1127
|
-
}, "SelectScrollButtonImpl")), _t = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1128
|
-
let { __scopeSelect: n, ...r } = e;
|
|
1129
|
-
return /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
1130
|
-
"aria-hidden": !0,
|
|
1131
|
-
...r,
|
|
1132
|
-
ref: t
|
|
1133
|
-
});
|
|
1134
|
-
}, "SelectSeparator")), vt = "SelectBubbleInput", yt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function({ __scopeSelect: e, ...t }, n) {
|
|
1135
|
-
let r = J(vt, e), { value: a, onValueChange: o, required: s, disabled: c, name: l, autoComplete: d, form: f, userSelection: p } = r, { nativeOptions: m, nativeSelectKey: h } = r, g = F.useRef(null), _ = i(n, g), v = a ?? "", y = F.useRef(v), b = F.useRef(p), x = F.useRef(!1), S = Array.from(m).some((e) => (e.props.value ?? "") === "");
|
|
1136
|
-
return F.useEffect(() => {
|
|
1137
|
-
let e = g.current;
|
|
1138
|
-
if (!e) return;
|
|
1139
|
-
let t = window.HTMLSelectElement.prototype, n = Object.getOwnPropertyDescriptor(t, "value").set, r = p !== null && p !== b.current;
|
|
1140
|
-
b.current = p;
|
|
1141
|
-
let i = y.current !== v;
|
|
1142
|
-
y.current = v;
|
|
1143
|
-
let a = r && i;
|
|
1144
|
-
if (r && !i && p.value !== v && !p.hasConsumerStoppedPropagation && n) {
|
|
1145
|
-
x.current = !0;
|
|
1146
|
-
try {
|
|
1147
|
-
n.call(e, p.value), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1148
|
-
} finally {
|
|
1149
|
-
x.current = !1, n.call(e, v);
|
|
1150
|
-
}
|
|
1151
|
-
return;
|
|
1152
|
-
}
|
|
1153
|
-
let o = a && !p.hasConsumerStoppedPropagation;
|
|
1154
|
-
if (i && n) {
|
|
1155
|
-
let t = new Event("change", { bubbles: o });
|
|
1156
|
-
n.call(e, v), e.dispatchEvent(t);
|
|
1157
|
-
}
|
|
1158
|
-
}, [v, p]), /* @__PURE__ */ (0, I.jsxs)(k.select, {
|
|
1159
|
-
"aria-hidden": !0,
|
|
1160
|
-
required: s,
|
|
1161
|
-
tabIndex: -1,
|
|
1162
|
-
name: l,
|
|
1163
|
-
autoComplete: d,
|
|
1164
|
-
disabled: c,
|
|
1165
|
-
form: f,
|
|
1166
|
-
onChange: (e) => {
|
|
1167
|
-
x.current || o(e.target.value);
|
|
1168
|
-
},
|
|
1169
|
-
...t,
|
|
1170
|
-
style: {
|
|
1171
|
-
...u,
|
|
1172
|
-
...t.style
|
|
1173
|
-
},
|
|
1174
|
-
ref: _,
|
|
1175
|
-
defaultValue: v,
|
|
1176
|
-
children: [Q(a) && !S ? /* @__PURE__ */ (0, I.jsx)("option", { value: "" }) : null, Array.from(m)]
|
|
1177
|
-
}, h);
|
|
1178
|
-
}, "SelectBubbleInput"));
|
|
1179
|
-
function bt(e) {
|
|
1180
|
-
return typeof e == "function";
|
|
1181
|
-
}
|
|
1182
|
-
G(bt, "isFunction");
|
|
1183
|
-
function Q(e) {
|
|
1184
|
-
return e === "" || e === void 0;
|
|
1185
|
-
}
|
|
1186
|
-
G(Q, "shouldShowPlaceholder");
|
|
1187
|
-
function xt(e) {
|
|
1188
|
-
let t = w(e), n = F.useRef(""), r = F.useRef(0), i = F.useCallback((e) => {
|
|
1189
|
-
let i = n.current + e;
|
|
1190
|
-
t(i);
|
|
1191
|
-
function a(e) {
|
|
1192
|
-
n.current = e, window.clearTimeout(r.current), e !== "" && (r.current = window.setTimeout(() => a(""), 1e3));
|
|
1193
|
-
}
|
|
1194
|
-
G(a, "updateSearch"), a(i);
|
|
1195
|
-
}, [t]), a = F.useCallback(() => {
|
|
1196
|
-
n.current = "", window.clearTimeout(r.current);
|
|
1197
|
-
}, []);
|
|
1198
|
-
return F.useEffect(() => () => window.clearTimeout(r.current), []), [
|
|
1199
|
-
n,
|
|
1200
|
-
i,
|
|
1201
|
-
a
|
|
1202
|
-
];
|
|
1203
|
-
}
|
|
1204
|
-
G(xt, "useTypeaheadSearch");
|
|
1205
|
-
function St(e, t, n) {
|
|
1206
|
-
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Ct(e, Math.max(i, 0));
|
|
1207
|
-
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
1208
|
-
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
1209
|
-
return o === n ? void 0 : o;
|
|
1210
|
-
}
|
|
1211
|
-
G(St, "findNextItem");
|
|
1212
|
-
function Ct(e, t) {
|
|
1213
|
-
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1214
|
-
}
|
|
1215
|
-
G(Ct, "wrapArray");
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region src/utils/assertNever.ts
|
|
1218
|
-
function wt(e) {
|
|
1219
|
-
A(!1, `Unexpected object: ${e}`);
|
|
1220
|
-
}
|
|
1221
|
-
function Tt(e) {
|
|
1222
|
-
return t.warn(`Unexpected object: ${JSON.stringify(e)}`), e;
|
|
1223
|
-
}
|
|
1224
|
-
//#endregion
|
|
1225
|
-
//#region src/utils/strings.ts
|
|
1226
|
-
function Et(e) {
|
|
1227
|
-
return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
|
|
1228
|
-
}
|
|
1229
|
-
function Dt(e) {
|
|
1230
|
-
if (!e) return "";
|
|
1231
|
-
if (typeof e != "string") throw t.error(e), TypeError(`Expected string, got ${typeof e}`);
|
|
1232
|
-
return /[A-Za-z]/.test(e) ? e.replaceAll(/([\da-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replaceAll(/[\s_-]+/g, " ").trim().split(" ").map(Et).join(" ") : e;
|
|
1233
|
-
}
|
|
1234
|
-
var Ot = {
|
|
1235
|
-
startCase: Dt,
|
|
1236
|
-
htmlEscape: (e) => e && e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\n", " "),
|
|
1237
|
-
withTrailingSlash(e) {
|
|
1238
|
-
return e.endsWith("/") ? e : `${e}/`;
|
|
1239
|
-
},
|
|
1240
|
-
withoutTrailingSlash(e) {
|
|
1241
|
-
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
1242
|
-
},
|
|
1243
|
-
withoutLeadingSlash(e) {
|
|
1244
|
-
return e.startsWith("/") ? e.slice(1) : e;
|
|
1245
|
-
},
|
|
1246
|
-
asString: (e) => {
|
|
1247
|
-
if (typeof e == "string") return e;
|
|
1248
|
-
try {
|
|
1249
|
-
return JSON.stringify(e);
|
|
1250
|
-
} catch {
|
|
1251
|
-
return String(e);
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
}, $ = c(), kt = a("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md forced-color-adjust-none forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]", { variants: { subcontent: { true: "shadow-lg" } } }), At = a("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText] forced-colors:data-[state=open]:bg-[Highlight] forced-colors:data-[state=open]:text-[HighlightText]", { variants: { inset: { true: "pl-8" } } }), jt = "data-disabled:pointer-events-none data-disabled:opacity-50 forced-colors:data-disabled:text-[GrayText]", Mt = a(n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]", jt), { variants: {} }), Nt = a("absolute left-2 flex h-3.5 w-3.5 items-center justify-center", { variants: {} }), Pt = a("px-2 py-1.5 text-sm font-semibold", { variants: { inset: { true: "pl-8" } } }), Ft = a(n("menu-item relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText] forced-colors:aria-selected:bg-[Highlight] forced-colors:aria-selected:text-[HighlightText]", jt), {
|
|
1255
|
-
variants: {
|
|
1256
|
-
inset: { true: "pl-8" },
|
|
1257
|
-
variant: {
|
|
1258
|
-
default: "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
1259
|
-
danger: "data-[highlighted]:bg-(--red-5) data-[highlighted]:text-(--red-12) aria-selected:bg-(--red-5) aria-selected:text-(--red-12)",
|
|
1260
|
-
muted: "data-[highlighted]:bg-muted/70 data-[highlighted]:text-muted-foreground aria-selected:bg-muted/70 aria-selected:text-muted-foreground",
|
|
1261
|
-
success: "data-[highlighted]:bg-(--grass-3) data-[highlighted]:text-(--grass-11) aria-selected:bg-(--grass-3) aria-selected:text-(--grass-11)",
|
|
1262
|
-
disabled: "text-muted-foreground"
|
|
1263
|
-
}
|
|
1264
|
-
},
|
|
1265
|
-
defaultVariants: { variant: "default" }
|
|
1266
|
-
}), It = a("-mx-1 my-1 h-px bg-border last:hidden", { variants: {} }), Lt = (e) => {
|
|
1267
|
-
let t = (0, $.c)(8), r, i;
|
|
1268
|
-
t[0] === e ? (r = t[1], i = t[2]) : ({className: r, ...i} = e, t[0] = e, t[1] = r, t[2] = i);
|
|
1269
|
-
let a;
|
|
1270
|
-
t[3] === r ? a = t[4] : (a = n("ml-auto text-xs tracking-widest opacity-60", r), t[3] = r, t[4] = a);
|
|
1271
|
-
let o;
|
|
1272
|
-
return t[5] !== i || t[6] !== a ? (o = /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1273
|
-
className: a,
|
|
1274
|
-
...i
|
|
1275
|
-
}), t[5] = i, t[6] = a, t[7] = o) : o = t[7], o;
|
|
1276
|
-
};
|
|
1277
|
-
Lt.displayName = "MenuShortcut";
|
|
1278
|
-
//#endregion
|
|
1279
|
-
//#region src/components/ui/native-select.tsx
|
|
1280
|
-
var Rt = a("flex h-6 w-fit mb-1 items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer forced-color-adjust-none forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText] forced-colors:disabled:text-[GrayText]", {
|
|
1281
|
-
variants: { variant: {
|
|
1282
|
-
default: "shadow-xs-solid border border-input hover:shadow-sm-solid focus-visible:border-primary focus-visible:shadow-md-solid disabled:hover:shadow-xs-solid forced-colors:border-[ButtonText] forced-colors:disabled:border-[GrayText]",
|
|
1283
|
-
ghost: "opacity-70 hover:opacity-100 focus:opacity-100"
|
|
1284
|
-
} },
|
|
1285
|
-
defaultVariants: { variant: "default" }
|
|
1286
|
-
}), zt = F.forwardRef((e, t) => {
|
|
1287
|
-
let i = (0, $.c)(12), a, o, s;
|
|
1288
|
-
i[0] === e ? (a = i[1], o = i[2], s = i[3]) : ({className: o, children: a, ...s} = e, i[0] = e, i[1] = a, i[2] = o, i[3] = s);
|
|
1289
|
-
let c;
|
|
1290
|
-
i[4] === Symbol.for("react.memo_cache_sentinel") ? (c = r.stopPropagation(), i[4] = c) : c = i[4];
|
|
1291
|
-
let l;
|
|
1292
|
-
i[5] === o ? l = i[6] : (l = n(Rt({}), o), i[5] = o, i[6] = l);
|
|
1293
|
-
let u;
|
|
1294
|
-
return i[7] !== a || i[8] !== s || i[9] !== t || i[10] !== l ? (u = /* @__PURE__ */ (0, I.jsx)("select", {
|
|
1295
|
-
ref: t,
|
|
1296
|
-
onClick: c,
|
|
1297
|
-
className: l,
|
|
1298
|
-
...s,
|
|
1299
|
-
children: a
|
|
1300
|
-
}), i[7] = a, i[8] = s, i[9] = t, i[10] = l, i[11] = u) : u = i[11], u;
|
|
1301
|
-
});
|
|
1302
|
-
zt.displayName = "NativeSelect";
|
|
1303
|
-
//#endregion
|
|
1304
|
-
//#region src/components/ui/select.tsx
|
|
1305
|
-
var Bt = Ne, Vt = tt, Ht = C(Ve), Ut = Le, Wt = F.forwardRef((e, t) => {
|
|
1306
|
-
let r = (0, $.c)(21), i, a, o, s, c, l;
|
|
1307
|
-
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4], c = r[5], l = r[6]) : ({className: a, children: i, onClear: o, variant: l, hideChevron: c, ...s} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = c, r[6] = l);
|
|
1308
|
-
let u = c !== void 0 && c, d;
|
|
1309
|
-
r[7] !== a || r[8] !== l ? (d = n(Rt({ variant: l }), "mb-0", a), r[7] = a, r[8] = l, r[9] = d) : d = r[9];
|
|
1310
|
-
let f;
|
|
1311
|
-
r[10] !== u || r[11] !== o ? (f = o ? /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1312
|
-
onPointerDown: (e) => {
|
|
1313
|
-
e.preventDefault(), e.stopPropagation(), o();
|
|
1314
|
-
},
|
|
1315
|
-
children: /* @__PURE__ */ (0, I.jsx)(N, { className: "h-4 w-4 opacity-50 hover:opacity-90" })
|
|
1316
|
-
}) : !u && /* @__PURE__ */ (0, I.jsx)(j, { className: "h-4 w-4 opacity-50" }), r[10] = u, r[11] = o, r[12] = f) : f = r[12];
|
|
1317
|
-
let p;
|
|
1318
|
-
r[13] === f ? p = r[14] : (p = /* @__PURE__ */ (0, I.jsx)(Re, {
|
|
1319
|
-
asChild: !0,
|
|
1320
|
-
children: f
|
|
1321
|
-
}), r[13] = f, r[14] = p);
|
|
1322
|
-
let m;
|
|
1323
|
-
return r[15] !== i || r[16] !== s || r[17] !== t || r[18] !== d || r[19] !== p ? (m = /* @__PURE__ */ (0, I.jsxs)(Fe, {
|
|
1324
|
-
ref: t,
|
|
1325
|
-
className: d,
|
|
1326
|
-
...s,
|
|
1327
|
-
children: [i, p]
|
|
1328
|
-
}), r[15] = i, r[16] = s, r[17] = t, r[18] = d, r[19] = p, r[20] = m) : m = r[20], m;
|
|
1329
|
-
});
|
|
1330
|
-
Wt.displayName = Fe.displayName;
|
|
1331
|
-
var Gt = v(He), Kt = F.forwardRef((e, t) => {
|
|
1332
|
-
let r = (0, $.c)(21), i, a, o, s;
|
|
1333
|
-
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4]) : ({className: a, children: i, position: s, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s);
|
|
1334
|
-
let c = s === void 0 ? "popper" : s, l = c === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", u;
|
|
1335
|
-
r[5] !== a || r[6] !== l ? (u = n("max-h-[300px] relative z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", l, a), r[5] = a, r[6] = l, r[7] = u) : u = r[7];
|
|
1336
|
-
let d;
|
|
1337
|
-
r[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, I.jsx)(pt, {
|
|
1338
|
-
className: "flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",
|
|
1339
|
-
children: /* @__PURE__ */ (0, I.jsx)(M, { className: "h-4 w-4" })
|
|
1340
|
-
}), r[8] = d) : d = r[8];
|
|
1341
|
-
let f = c === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)", p;
|
|
1342
|
-
r[9] === f ? p = r[10] : (p = n("p-1", f), r[9] = f, r[10] = p);
|
|
1343
|
-
let m;
|
|
1344
|
-
r[11] !== i || r[12] !== p ? (m = /* @__PURE__ */ (0, I.jsx)(Qe, {
|
|
1345
|
-
className: p,
|
|
1346
|
-
children: i
|
|
1347
|
-
}), r[11] = i, r[12] = p, r[13] = m) : m = r[13];
|
|
1348
|
-
let h;
|
|
1349
|
-
r[14] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, I.jsx)(ht, {
|
|
1350
|
-
className: "flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",
|
|
1351
|
-
children: /* @__PURE__ */ (0, I.jsx)(j, { className: "h-4 w-4 opacity-50" })
|
|
1352
|
-
}), r[14] = h) : h = r[14];
|
|
1353
|
-
let g;
|
|
1354
|
-
return r[15] !== c || r[16] !== o || r[17] !== t || r[18] !== u || r[19] !== m ? (g = /* @__PURE__ */ (0, I.jsx)(Ht, { children: /* @__PURE__ */ (0, I.jsx)(re, { children: /* @__PURE__ */ (0, I.jsxs)(Gt, {
|
|
1355
|
-
ref: t,
|
|
1356
|
-
className: u,
|
|
1357
|
-
position: c,
|
|
1358
|
-
...o,
|
|
1359
|
-
children: [
|
|
1360
|
-
d,
|
|
1361
|
-
m,
|
|
1362
|
-
h
|
|
1363
|
-
]
|
|
1364
|
-
}) }) }), r[15] = c, r[16] = o, r[17] = t, r[18] = u, r[19] = m, r[20] = g) : g = r[20], g;
|
|
1365
|
-
});
|
|
1366
|
-
Kt.displayName = He.displayName;
|
|
1367
|
-
var qt = F.forwardRef((e, t) => {
|
|
1368
|
-
let r = (0, $.c)(9), i, a;
|
|
1369
|
-
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
1370
|
-
let o;
|
|
1371
|
-
r[3] === i ? o = r[4] : (o = n("px-2 py-1.5 text-sm font-semibold", i), r[3] = i, r[4] = o);
|
|
1372
|
-
let s;
|
|
1373
|
-
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0, I.jsx)(rt, {
|
|
1374
|
-
ref: t,
|
|
1375
|
-
className: o,
|
|
1376
|
-
...a
|
|
1377
|
-
}), r[5] = a, r[6] = t, r[7] = o, r[8] = s) : s = r[8], s;
|
|
1378
|
-
});
|
|
1379
|
-
qt.displayName = rt.displayName;
|
|
1380
|
-
var Jt = F.forwardRef((e, t) => {
|
|
1381
|
-
let r = (0, $.c)(17), i, a, o, s;
|
|
1382
|
-
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4]) : ({className: a, children: i, subtitle: s, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s);
|
|
1383
|
-
let c;
|
|
1384
|
-
r[5] === a ? c = r[6] : (c = n("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]", jt, a), r[5] = a, r[6] = c);
|
|
1385
|
-
let l;
|
|
1386
|
-
r[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1387
|
-
className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
1388
|
-
children: /* @__PURE__ */ (0, I.jsx)(dt, { children: /* @__PURE__ */ (0, I.jsx)(h, { className: "h-3 w-3" }) })
|
|
1389
|
-
}), r[7] = l) : l = r[7];
|
|
1390
|
-
let u = typeof i != "string" || void 0, d;
|
|
1391
|
-
r[8] !== i || r[9] !== u ? (d = /* @__PURE__ */ (0, I.jsx)(lt, {
|
|
1392
|
-
asChild: u,
|
|
1393
|
-
className: "flex w-full flex-1",
|
|
1394
|
-
children: i
|
|
1395
|
-
}), r[8] = i, r[9] = u, r[10] = d) : d = r[10];
|
|
1396
|
-
let f;
|
|
1397
|
-
return r[11] !== o || r[12] !== t || r[13] !== s || r[14] !== c || r[15] !== d ? (f = /* @__PURE__ */ (0, I.jsxs)(st, {
|
|
1398
|
-
ref: t,
|
|
1399
|
-
className: c,
|
|
1400
|
-
...o,
|
|
1401
|
-
children: [
|
|
1402
|
-
l,
|
|
1403
|
-
d,
|
|
1404
|
-
s
|
|
1405
|
-
]
|
|
1406
|
-
}), r[11] = o, r[12] = t, r[13] = s, r[14] = c, r[15] = d, r[16] = f) : f = r[16], f;
|
|
1407
|
-
});
|
|
1408
|
-
Jt.displayName = st.displayName;
|
|
1409
|
-
var Yt = F.forwardRef((e, t) => {
|
|
1410
|
-
let r = (0, $.c)(9), i, a;
|
|
1411
|
-
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
1412
|
-
let o;
|
|
1413
|
-
r[3] === i ? o = r[4] : (o = n("-mx-1 my-1 h-px bg-muted", i), r[3] = i, r[4] = o);
|
|
1414
|
-
let s;
|
|
1415
|
-
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0, I.jsx)(_t, {
|
|
1416
|
-
ref: t,
|
|
1417
|
-
className: o,
|
|
1418
|
-
...a
|
|
1419
|
-
}), r[5] = a, r[6] = t, r[7] = o, r[8] = s) : s = r[8], s;
|
|
1420
|
-
});
|
|
1421
|
-
Yt.displayName = _t.displayName;
|
|
1422
|
-
//#endregion
|
|
1423
|
-
export { N as A, Tt as C, he as D, ve as E, j as M, z as O, wt as S, Fe as T, Pt as _, qt as a, Ot as b, Ut as c, jt as d, Lt as f, Ft as g, Mt as h, Jt as i, M as j, oe as k, zt as l, Nt as m, Kt as n, Yt as o, kt as p, Vt as r, Wt as s, Bt as t, Rt as u, It as v, Re as w, Et as x, At as y };
|