stargazer-ui 1.0.4 → 1.0.5
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/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/Button.types.js +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/Card/Card.d.ts +34 -0
- package/dist/components/Card/Card.js +18 -0
- package/dist/components/Card/Card.types.d.ts +24 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +4 -0
- package/dist/{CloseButton/index.d.ts → components/CloseButton/CloseButton.d.ts} +1 -5
- package/dist/components/CloseButton/CloseButton.types.d.ts +5 -0
- package/dist/components/CloseButton/CloseButton.types.js +1 -0
- package/dist/components/CloseButton/index.d.ts +1 -0
- package/dist/components/CloseButton/index.js +4 -0
- package/dist/{Dropdown/index.d.ts → components/Dropdown/Dropdown.d.ts} +1 -54
- package/dist/components/Dropdown/Dropdown.types.d.ts +55 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropdown/index.js +4 -0
- package/dist/components/FloatingLabel/FloatingLabel.d.ts +4 -0
- package/dist/{FloatingLabel/index.js → components/FloatingLabel/FloatingLabel.js} +1 -1
- package/dist/components/FloatingLabel/FloatingLabel.types.d.ts +9 -0
- package/dist/components/FloatingLabel/FloatingLabel.types.js +1 -0
- package/dist/components/FloatingLabel/index.d.ts +1 -0
- package/dist/components/FloatingLabel/index.js +4 -0
- package/dist/components/Form/Form.d.ts +17 -0
- package/dist/{Form/index.js → components/Form/Form.js} +15 -15
- package/dist/components/Form/Form.types.d.ts +50 -0
- package/dist/components/Form/Form.types.js +1 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +4 -0
- package/dist/components/Grid/Grid.d.ts +5 -0
- package/dist/components/Grid/Grid.js +36 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +4 -0
- package/dist/components/InputGroup/InputGroup.d.ts +6 -0
- package/dist/components/InputGroup/InputGroup.js +8 -0
- package/dist/components/InputGroup/InputGroup.types.d.ts +10 -0
- package/dist/components/InputGroup/InputGroup.types.js +1 -0
- package/dist/components/InputGroup/index.d.ts +1 -0
- package/dist/components/InputGroup/index.js +4 -0
- package/dist/{Modal/index.d.ts → components/Modal/Modal.d.ts} +2 -32
- package/dist/{Modal/index.js → components/Modal/Modal.js} +13 -12
- package/dist/components/Modal/Modal.types.d.ts +40 -0
- package/dist/components/Modal/Modal.types.js +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +4 -0
- package/dist/{Nav/index.d.ts → components/Nav/Nav.d.ts} +0 -16
- package/dist/{Nav/index.js → components/Nav/Nav.js} +7 -7
- package/dist/components/Nav/Nav.types.d.ts +17 -0
- package/dist/components/Nav/Nav.types.js +1 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Nav/index.js +4 -0
- package/dist/components/NavBar/Navbar.d.ts +20 -0
- package/dist/components/NavBar/Navbar.js +17 -0
- package/dist/components/NavBar/Navbar.types.d.ts +18 -0
- package/dist/components/NavBar/Navbar.types.js +1 -0
- package/dist/components/NavBar/index.d.ts +1 -0
- package/dist/components/NavBar/index.js +4 -0
- package/dist/{NavDropdown/index.d.ts → components/NavDropdown/NavDropdown.d.ts} +3 -7
- package/dist/components/NavDropdown/NavDropdown.js +62 -0
- package/dist/components/NavDropdown/NavDropdown.types.d.ts +5 -0
- package/dist/components/NavDropdown/NavDropdown.types.js +1 -0
- package/dist/components/NavDropdown/index.d.ts +1 -0
- package/dist/components/NavDropdown/index.js +4 -0
- package/dist/components/OffCanvas/OffCanvas.d.ts +3 -0
- package/dist/{OffCanvas → components/OffCanvas}/OffCanvas.js +2 -2
- package/dist/components/OffCanvas/index.d.ts +1 -0
- package/dist/components/OffCanvas/index.js +4 -0
- package/dist/components/Overlay/Overlay.d.ts +3 -0
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/Overlay/index.js +4 -0
- package/dist/{Popout/index.d.ts → components/Popout/Popout.d.ts} +1 -35
- package/dist/{Popout/index.js → components/Popout/Popout.js} +18 -18
- package/dist/components/Popout/Popout.types.d.ts +36 -0
- package/dist/components/Popout/Popout.types.js +1 -0
- package/dist/components/Popout/index.d.ts +1 -0
- package/dist/components/Popout/index.js +4 -0
- package/dist/{Spinner/index.d.ts → components/Spinner/Spinner.d.ts} +1 -7
- package/dist/components/Spinner/Spinner.types.d.ts +7 -0
- package/dist/components/Spinner/Spinner.types.js +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +4 -0
- package/dist/components/Table/Table.d.ts +4 -0
- package/dist/components/Table/Table.types.d.ts +7 -0
- package/dist/components/Table/Table.types.js +1 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +4 -0
- package/dist/components/Tabs/Tabs.d.ts +9 -0
- package/dist/{Tabs/index.js → components/Tabs/Tabs.js} +14 -14
- package/dist/{Tabs/index.d.ts → components/Tabs/Tabs.types.d.ts} +2 -9
- package/dist/components/Tabs/Tabs.types.js +1 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +4 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +9 -0
- package/dist/components/ToggleButton/ToggleButton.js +11 -0
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +0 -0
- package/dist/components/ToggleButton/ToggleButton.types.js +1 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/ToggleButton/index.js +4 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +19 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -0
- package/dist/types.d.ts +2 -0
- package/package.json +15 -4
- package/dist/Button/index.d.ts +0 -9
- package/dist/Card/index.d.ts +0 -92
- package/dist/Card/index.js +0 -18
- package/dist/FloatingLabel/index.d.ts +0 -11
- package/dist/Form/index.d.ts +0 -65
- package/dist/Grid/Col.js +0 -19
- package/dist/Grid/Container.js +0 -9
- package/dist/Grid/Row.js +0 -17
- package/dist/InputGroup/index.d.ts +0 -14
- package/dist/InputGroup/index.js +0 -8
- package/dist/NavBar/index.d.ts +0 -46
- package/dist/NavBar/index.js +0 -17
- package/dist/NavDropdown/index.js +0 -858
- package/dist/Table/index.d.ts +0 -9
- package/dist/ToggleButton/index.js +0 -11
- package/dist/main.js +0 -30
- package/dist/stylesheets/stargazerui.css +0 -4902
- package/dist/stylesheets/stargazerui.css.map +0 -1
- /package/dist/{Button/index.js → components/Button/Button.js} +0 -0
- /package/dist/{CloseButton/index.js → components/CloseButton/CloseButton.js} +0 -0
- /package/dist/{Dropdown/index.js → components/Dropdown/Dropdown.js} +0 -0
- /package/dist/{Overlay/index.js → components/Overlay/Overlay.js} +0 -0
- /package/dist/{Spinner/index.js → components/Spinner/Spinner.js} +0 -0
- /package/dist/{Table/index.js → components/Table/Table.js} +0 -0
|
@@ -1,858 +0,0 @@
|
|
|
1
|
-
import { jsx as H, jsxs as Pe } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Ce, useState as se, useCallback as ze, useMemo as De } from "react";
|
|
3
|
-
import C, { DropdownContextProvider as ke } from "../Dropdown/index.js";
|
|
4
|
-
function Ne(e) {
|
|
5
|
-
if (typeof e != "object" || e === null)
|
|
6
|
-
return !1;
|
|
7
|
-
let t = e;
|
|
8
|
-
for (; Object.getPrototypeOf(t) !== null; )
|
|
9
|
-
t = Object.getPrototypeOf(t);
|
|
10
|
-
return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
|
|
11
|
-
}
|
|
12
|
-
function Ae(e) {
|
|
13
|
-
return Ne(e) && "type" in e && typeof e.type == "string";
|
|
14
|
-
}
|
|
15
|
-
var me = Symbol.for("immer-nothing"), ce = Symbol.for("immer-draftable"), y = Symbol.for("immer-state"), Fe = process.env.NODE_ENV !== "production" ? [
|
|
16
|
-
// All error codes, starting by 0:
|
|
17
|
-
function(e) {
|
|
18
|
-
return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
|
|
19
|
-
},
|
|
20
|
-
function(e) {
|
|
21
|
-
return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`;
|
|
22
|
-
},
|
|
23
|
-
"This object has been frozen and should not be mutated",
|
|
24
|
-
function(e) {
|
|
25
|
-
return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + e;
|
|
26
|
-
},
|
|
27
|
-
"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
|
|
28
|
-
"Immer forbids circular references",
|
|
29
|
-
"The first or second argument to `produce` must be a function",
|
|
30
|
-
"The third argument to `produce` must be a function or undefined",
|
|
31
|
-
"First argument to `createDraft` must be a plain object, an array, or an immerable object",
|
|
32
|
-
"First argument to `finishDraft` must be a draft returned by `createDraft`",
|
|
33
|
-
function(e) {
|
|
34
|
-
return `'current' expects a draft, got: ${e}`;
|
|
35
|
-
},
|
|
36
|
-
"Object.defineProperty() cannot be used on an Immer draft",
|
|
37
|
-
"Object.setPrototypeOf() cannot be used on an Immer draft",
|
|
38
|
-
"Immer only supports deleting array indices",
|
|
39
|
-
"Immer only supports setting array indices and the 'length' property",
|
|
40
|
-
function(e) {
|
|
41
|
-
return `'original' expects a draft, got: ${e}`;
|
|
42
|
-
}
|
|
43
|
-
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
44
|
-
// See Patches.ts for additional errors
|
|
45
|
-
] : [];
|
|
46
|
-
function d(e, ...t) {
|
|
47
|
-
if (process.env.NODE_ENV !== "production") {
|
|
48
|
-
const r = Fe[e], n = typeof r == "function" ? r.apply(null, t) : r;
|
|
49
|
-
throw new Error(`[Immer] ${n}`);
|
|
50
|
-
}
|
|
51
|
-
throw new Error(
|
|
52
|
-
`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
var z = Object.getPrototypeOf;
|
|
56
|
-
function v(e) {
|
|
57
|
-
return !!e && !!e[y];
|
|
58
|
-
}
|
|
59
|
-
function O(e) {
|
|
60
|
-
var t;
|
|
61
|
-
return e ? he(e) || Array.isArray(e) || !!e[ce] || !!((t = e.constructor) != null && t[ce]) || $(e) || W(e) : !1;
|
|
62
|
-
}
|
|
63
|
-
var Ie = Object.prototype.constructor.toString();
|
|
64
|
-
function he(e) {
|
|
65
|
-
if (!e || typeof e != "object")
|
|
66
|
-
return !1;
|
|
67
|
-
const t = z(e);
|
|
68
|
-
if (t === null)
|
|
69
|
-
return !0;
|
|
70
|
-
const r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
71
|
-
return r === Object ? !0 : typeof r == "function" && Function.toString.call(r) === Ie;
|
|
72
|
-
}
|
|
73
|
-
function k(e, t) {
|
|
74
|
-
x(e) === 0 ? Object.entries(e).forEach(([r, n]) => {
|
|
75
|
-
t(r, n, e);
|
|
76
|
-
}) : e.forEach((r, n) => t(n, r, e));
|
|
77
|
-
}
|
|
78
|
-
function x(e) {
|
|
79
|
-
const t = e[y];
|
|
80
|
-
return t ? t.type_ : Array.isArray(e) ? 1 : $(e) ? 2 : W(e) ? 3 : 0;
|
|
81
|
-
}
|
|
82
|
-
function Q(e, t) {
|
|
83
|
-
return x(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
|
|
84
|
-
}
|
|
85
|
-
function _e(e, t, r) {
|
|
86
|
-
const n = x(e);
|
|
87
|
-
n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;
|
|
88
|
-
}
|
|
89
|
-
function je(e, t) {
|
|
90
|
-
return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
91
|
-
}
|
|
92
|
-
function $(e) {
|
|
93
|
-
return e instanceof Map;
|
|
94
|
-
}
|
|
95
|
-
function W(e) {
|
|
96
|
-
return e instanceof Set;
|
|
97
|
-
}
|
|
98
|
-
function b(e) {
|
|
99
|
-
return e.copy_ || e.base_;
|
|
100
|
-
}
|
|
101
|
-
function Y(e, t) {
|
|
102
|
-
if ($(e))
|
|
103
|
-
return new Map(e);
|
|
104
|
-
if (W(e))
|
|
105
|
-
return new Set(e);
|
|
106
|
-
if (Array.isArray(e))
|
|
107
|
-
return Array.prototype.slice.call(e);
|
|
108
|
-
if (!t && he(e))
|
|
109
|
-
return z(e) ? { ...e } : Object.assign(/* @__PURE__ */ Object.create(null), e);
|
|
110
|
-
const r = Object.getOwnPropertyDescriptors(e);
|
|
111
|
-
delete r[y];
|
|
112
|
-
let n = Reflect.ownKeys(r);
|
|
113
|
-
for (let o = 0; o < n.length; o++) {
|
|
114
|
-
const i = n[o], s = r[i];
|
|
115
|
-
s.writable === !1 && (s.writable = !0, s.configurable = !0), (s.get || s.set) && (r[i] = {
|
|
116
|
-
configurable: !0,
|
|
117
|
-
writable: !0,
|
|
118
|
-
// could live with !!desc.set as well here...
|
|
119
|
-
enumerable: s.enumerable,
|
|
120
|
-
value: e[i]
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
return Object.create(z(e), r);
|
|
124
|
-
}
|
|
125
|
-
function re(e, t = !1) {
|
|
126
|
-
return q(e) || v(e) || !O(e) || (x(e) > 1 && (e.set = e.add = e.clear = e.delete = Me), Object.freeze(e), t && k(e, (r, n) => re(n, !0))), e;
|
|
127
|
-
}
|
|
128
|
-
function Me() {
|
|
129
|
-
d(2);
|
|
130
|
-
}
|
|
131
|
-
function q(e) {
|
|
132
|
-
return Object.isFrozen(e);
|
|
133
|
-
}
|
|
134
|
-
var Re = {};
|
|
135
|
-
function S(e) {
|
|
136
|
-
const t = Re[e];
|
|
137
|
-
return t || d(0, e), t;
|
|
138
|
-
}
|
|
139
|
-
var N;
|
|
140
|
-
function we() {
|
|
141
|
-
return N;
|
|
142
|
-
}
|
|
143
|
-
function Te(e, t) {
|
|
144
|
-
return {
|
|
145
|
-
drafts_: [],
|
|
146
|
-
parent_: e,
|
|
147
|
-
immer_: t,
|
|
148
|
-
// Whenever the modified draft contains a draft from another scope, we
|
|
149
|
-
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
150
|
-
canAutoFreeze_: !0,
|
|
151
|
-
unfinalizedDrafts_: 0
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function ue(e, t) {
|
|
155
|
-
t && (S("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
156
|
-
}
|
|
157
|
-
function Z(e) {
|
|
158
|
-
L(e), e.drafts_.forEach(xe), e.drafts_ = null;
|
|
159
|
-
}
|
|
160
|
-
function L(e) {
|
|
161
|
-
e === N && (N = e.parent_);
|
|
162
|
-
}
|
|
163
|
-
function ae(e) {
|
|
164
|
-
return N = Te(N, e);
|
|
165
|
-
}
|
|
166
|
-
function xe(e) {
|
|
167
|
-
const t = e[y];
|
|
168
|
-
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
|
|
169
|
-
}
|
|
170
|
-
function fe(e, t) {
|
|
171
|
-
t.unfinalizedDrafts_ = t.drafts_.length;
|
|
172
|
-
const r = t.drafts_[0];
|
|
173
|
-
return e !== void 0 && e !== r ? (r[y].modified_ && (Z(t), d(4)), O(e) && (e = R(t, e), t.parent_ || T(t, e)), t.patches_ && S("Patches").generateReplacementPatches_(
|
|
174
|
-
r[y].base_,
|
|
175
|
-
e,
|
|
176
|
-
t.patches_,
|
|
177
|
-
t.inversePatches_
|
|
178
|
-
)) : e = R(t, r, []), Z(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== me ? e : void 0;
|
|
179
|
-
}
|
|
180
|
-
function R(e, t, r) {
|
|
181
|
-
if (q(t))
|
|
182
|
-
return t;
|
|
183
|
-
const n = t[y];
|
|
184
|
-
if (!n)
|
|
185
|
-
return k(
|
|
186
|
-
t,
|
|
187
|
-
(o, i) => le(e, n, t, o, i, r)
|
|
188
|
-
), t;
|
|
189
|
-
if (n.scope_ !== e)
|
|
190
|
-
return t;
|
|
191
|
-
if (!n.modified_)
|
|
192
|
-
return T(e, n.base_, !0), n.base_;
|
|
193
|
-
if (!n.finalized_) {
|
|
194
|
-
n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;
|
|
195
|
-
const o = n.copy_;
|
|
196
|
-
let i = o, s = !1;
|
|
197
|
-
n.type_ === 3 && (i = new Set(o), o.clear(), s = !0), k(
|
|
198
|
-
i,
|
|
199
|
-
(c, u) => le(e, n, o, c, u, r, s)
|
|
200
|
-
), T(e, o, !1), r && e.patches_ && S("Patches").generatePatches_(
|
|
201
|
-
n,
|
|
202
|
-
r,
|
|
203
|
-
e.patches_,
|
|
204
|
-
e.inversePatches_
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
return n.copy_;
|
|
208
|
-
}
|
|
209
|
-
function le(e, t, r, n, o, i, s) {
|
|
210
|
-
if (process.env.NODE_ENV !== "production" && o === r && d(5), v(o)) {
|
|
211
|
-
const c = i && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
212
|
-
!Q(t.assigned_, n) ? i.concat(n) : void 0, u = R(e, o, c);
|
|
213
|
-
if (_e(r, n, u), v(u))
|
|
214
|
-
e.canAutoFreeze_ = !1;
|
|
215
|
-
else
|
|
216
|
-
return;
|
|
217
|
-
} else
|
|
218
|
-
s && r.add(o);
|
|
219
|
-
if (O(o) && !q(o)) {
|
|
220
|
-
if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
|
|
221
|
-
return;
|
|
222
|
-
R(e, o), (!t || !t.scope_.parent_) && T(e, o);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function T(e, t, r = !1) {
|
|
226
|
-
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && re(t, r);
|
|
227
|
-
}
|
|
228
|
-
function $e(e, t) {
|
|
229
|
-
const r = Array.isArray(e), n = {
|
|
230
|
-
type_: r ? 1 : 0,
|
|
231
|
-
// Track which produce call this is associated with.
|
|
232
|
-
scope_: t ? t.scope_ : we(),
|
|
233
|
-
// True for both shallow and deep changes.
|
|
234
|
-
modified_: !1,
|
|
235
|
-
// Used during finalization.
|
|
236
|
-
finalized_: !1,
|
|
237
|
-
// Track which properties have been assigned (true) or deleted (false).
|
|
238
|
-
assigned_: {},
|
|
239
|
-
// The parent draft state.
|
|
240
|
-
parent_: t,
|
|
241
|
-
// The base state.
|
|
242
|
-
base_: e,
|
|
243
|
-
// The base proxy.
|
|
244
|
-
draft_: null,
|
|
245
|
-
// set below
|
|
246
|
-
// The base copy with any updated values.
|
|
247
|
-
copy_: null,
|
|
248
|
-
// Called by the `produce` function.
|
|
249
|
-
revoke_: null,
|
|
250
|
-
isManual_: !1
|
|
251
|
-
};
|
|
252
|
-
let o = n, i = ne;
|
|
253
|
-
r && (o = [n], i = A);
|
|
254
|
-
const { revoke: s, proxy: c } = Proxy.revocable(o, i);
|
|
255
|
-
return n.draft_ = c, n.revoke_ = s, c;
|
|
256
|
-
}
|
|
257
|
-
var ne = {
|
|
258
|
-
get(e, t) {
|
|
259
|
-
if (t === y)
|
|
260
|
-
return e;
|
|
261
|
-
const r = b(e);
|
|
262
|
-
if (!Q(r, t))
|
|
263
|
-
return We(e, r, t);
|
|
264
|
-
const n = r[t];
|
|
265
|
-
return e.finalized_ || !O(n) ? n : n === X(e.base_, t) ? (J(e), e.copy_[t] = te(n, e)) : n;
|
|
266
|
-
},
|
|
267
|
-
has(e, t) {
|
|
268
|
-
return t in b(e);
|
|
269
|
-
},
|
|
270
|
-
ownKeys(e) {
|
|
271
|
-
return Reflect.ownKeys(b(e));
|
|
272
|
-
},
|
|
273
|
-
set(e, t, r) {
|
|
274
|
-
const n = ge(b(e), t);
|
|
275
|
-
if (n != null && n.set)
|
|
276
|
-
return n.set.call(e.draft_, r), !0;
|
|
277
|
-
if (!e.modified_) {
|
|
278
|
-
const o = X(b(e), t), i = o == null ? void 0 : o[y];
|
|
279
|
-
if (i && i.base_ === r)
|
|
280
|
-
return e.copy_[t] = r, e.assigned_[t] = !1, !0;
|
|
281
|
-
if (je(r, o) && (r !== void 0 || Q(e.base_, t)))
|
|
282
|
-
return !0;
|
|
283
|
-
J(e), ee(e);
|
|
284
|
-
}
|
|
285
|
-
return e.copy_[t] === r && // special case: handle new props with value 'undefined'
|
|
286
|
-
(r !== void 0 || t in e.copy_) || // special case: NaN
|
|
287
|
-
Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_[t] = !0), !0;
|
|
288
|
-
},
|
|
289
|
-
deleteProperty(e, t) {
|
|
290
|
-
return X(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, J(e), ee(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
|
|
291
|
-
},
|
|
292
|
-
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
293
|
-
// the same guarantee in ES5 mode.
|
|
294
|
-
getOwnPropertyDescriptor(e, t) {
|
|
295
|
-
const r = b(e), n = Reflect.getOwnPropertyDescriptor(r, t);
|
|
296
|
-
return n && {
|
|
297
|
-
writable: !0,
|
|
298
|
-
configurable: e.type_ !== 1 || t !== "length",
|
|
299
|
-
enumerable: n.enumerable,
|
|
300
|
-
value: r[t]
|
|
301
|
-
};
|
|
302
|
-
},
|
|
303
|
-
defineProperty() {
|
|
304
|
-
d(11);
|
|
305
|
-
},
|
|
306
|
-
getPrototypeOf(e) {
|
|
307
|
-
return z(e.base_);
|
|
308
|
-
},
|
|
309
|
-
setPrototypeOf() {
|
|
310
|
-
d(12);
|
|
311
|
-
}
|
|
312
|
-
}, A = {};
|
|
313
|
-
k(ne, (e, t) => {
|
|
314
|
-
A[e] = function() {
|
|
315
|
-
return arguments[0] = arguments[0][0], t.apply(this, arguments);
|
|
316
|
-
};
|
|
317
|
-
});
|
|
318
|
-
A.deleteProperty = function(e, t) {
|
|
319
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && d(13), A.set.call(this, e, t, void 0);
|
|
320
|
-
};
|
|
321
|
-
A.set = function(e, t, r) {
|
|
322
|
-
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && d(14), ne.set.call(this, e[0], t, r, e[0]);
|
|
323
|
-
};
|
|
324
|
-
function X(e, t) {
|
|
325
|
-
const r = e[y];
|
|
326
|
-
return (r ? b(r) : e)[t];
|
|
327
|
-
}
|
|
328
|
-
function We(e, t, r) {
|
|
329
|
-
var o;
|
|
330
|
-
const n = ge(t, r);
|
|
331
|
-
return n ? "value" in n ? n.value : (
|
|
332
|
-
// This is a very special case, if the prop is a getter defined by the
|
|
333
|
-
// prototype, we should invoke it with the draft as context!
|
|
334
|
-
(o = n.get) == null ? void 0 : o.call(e.draft_)
|
|
335
|
-
) : void 0;
|
|
336
|
-
}
|
|
337
|
-
function ge(e, t) {
|
|
338
|
-
if (!(t in e))
|
|
339
|
-
return;
|
|
340
|
-
let r = z(e);
|
|
341
|
-
for (; r; ) {
|
|
342
|
-
const n = Object.getOwnPropertyDescriptor(r, t);
|
|
343
|
-
if (n)
|
|
344
|
-
return n;
|
|
345
|
-
r = z(r);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
function ee(e) {
|
|
349
|
-
e.modified_ || (e.modified_ = !0, e.parent_ && ee(e.parent_));
|
|
350
|
-
}
|
|
351
|
-
function J(e) {
|
|
352
|
-
e.copy_ || (e.copy_ = Y(
|
|
353
|
-
e.base_,
|
|
354
|
-
e.scope_.immer_.useStrictShallowCopy_
|
|
355
|
-
));
|
|
356
|
-
}
|
|
357
|
-
var qe = class {
|
|
358
|
-
constructor(e) {
|
|
359
|
-
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, r, n) => {
|
|
360
|
-
if (typeof t == "function" && typeof r != "function") {
|
|
361
|
-
const i = r;
|
|
362
|
-
r = t;
|
|
363
|
-
const s = this;
|
|
364
|
-
return function(u = i, ...a) {
|
|
365
|
-
return s.produce(u, (f) => r.call(this, f, ...a));
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
typeof r != "function" && d(6), n !== void 0 && typeof n != "function" && d(7);
|
|
369
|
-
let o;
|
|
370
|
-
if (O(t)) {
|
|
371
|
-
const i = ae(this), s = te(t, void 0);
|
|
372
|
-
let c = !0;
|
|
373
|
-
try {
|
|
374
|
-
o = r(s), c = !1;
|
|
375
|
-
} finally {
|
|
376
|
-
c ? Z(i) : L(i);
|
|
377
|
-
}
|
|
378
|
-
return ue(i, n), fe(o, i);
|
|
379
|
-
} else if (!t || typeof t != "object") {
|
|
380
|
-
if (o = r(t), o === void 0 && (o = t), o === me && (o = void 0), this.autoFreeze_ && re(o, !0), n) {
|
|
381
|
-
const i = [], s = [];
|
|
382
|
-
S("Patches").generateReplacementPatches_(t, o, i, s), n(i, s);
|
|
383
|
-
}
|
|
384
|
-
return o;
|
|
385
|
-
} else
|
|
386
|
-
d(1, t);
|
|
387
|
-
}, this.produceWithPatches = (t, r) => {
|
|
388
|
-
if (typeof t == "function")
|
|
389
|
-
return (s, ...c) => this.produceWithPatches(s, (u) => t(u, ...c));
|
|
390
|
-
let n, o;
|
|
391
|
-
return [this.produce(t, r, (s, c) => {
|
|
392
|
-
n = s, o = c;
|
|
393
|
-
}), n, o];
|
|
394
|
-
}, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
|
|
395
|
-
}
|
|
396
|
-
createDraft(e) {
|
|
397
|
-
O(e) || d(8), v(e) && (e = be(e));
|
|
398
|
-
const t = ae(this), r = te(e, void 0);
|
|
399
|
-
return r[y].isManual_ = !0, L(t), r;
|
|
400
|
-
}
|
|
401
|
-
finishDraft(e, t) {
|
|
402
|
-
const r = e && e[y];
|
|
403
|
-
(!r || !r.isManual_) && d(9);
|
|
404
|
-
const { scope_: n } = r;
|
|
405
|
-
return ue(n, t), fe(void 0, n);
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Pass true to automatically freeze all copies created by Immer.
|
|
409
|
-
*
|
|
410
|
-
* By default, auto-freezing is enabled.
|
|
411
|
-
*/
|
|
412
|
-
setAutoFreeze(e) {
|
|
413
|
-
this.autoFreeze_ = e;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Pass true to enable strict shallow copy.
|
|
417
|
-
*
|
|
418
|
-
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
419
|
-
*/
|
|
420
|
-
setUseStrictShallowCopy(e) {
|
|
421
|
-
this.useStrictShallowCopy_ = e;
|
|
422
|
-
}
|
|
423
|
-
applyPatches(e, t) {
|
|
424
|
-
let r;
|
|
425
|
-
for (r = t.length - 1; r >= 0; r--) {
|
|
426
|
-
const o = t[r];
|
|
427
|
-
if (o.path.length === 0 && o.op === "replace") {
|
|
428
|
-
e = o.value;
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
r > -1 && (t = t.slice(r + 1));
|
|
433
|
-
const n = S("Patches").applyPatches_;
|
|
434
|
-
return v(e) ? n(e, t) : this.produce(
|
|
435
|
-
e,
|
|
436
|
-
(o) => n(o, t)
|
|
437
|
-
);
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
function te(e, t) {
|
|
441
|
-
const r = $(e) ? S("MapSet").proxyMap_(e, t) : W(e) ? S("MapSet").proxySet_(e, t) : $e(e, t);
|
|
442
|
-
return (t ? t.scope_ : we()).drafts_.push(r), r;
|
|
443
|
-
}
|
|
444
|
-
function be(e) {
|
|
445
|
-
return v(e) || d(10, e), ve(e);
|
|
446
|
-
}
|
|
447
|
-
function ve(e) {
|
|
448
|
-
if (!O(e) || q(e))
|
|
449
|
-
return e;
|
|
450
|
-
const t = e[y];
|
|
451
|
-
let r;
|
|
452
|
-
if (t) {
|
|
453
|
-
if (!t.modified_)
|
|
454
|
-
return t.base_;
|
|
455
|
-
t.finalized_ = !0, r = Y(e, t.scope_.immer_.useStrictShallowCopy_);
|
|
456
|
-
} else
|
|
457
|
-
r = Y(e, !0);
|
|
458
|
-
return k(r, (n, o) => {
|
|
459
|
-
_e(r, n, ve(o));
|
|
460
|
-
}), t && (t.finalized_ = !1), r;
|
|
461
|
-
}
|
|
462
|
-
var m = new qe();
|
|
463
|
-
m.produce;
|
|
464
|
-
m.produceWithPatches.bind(
|
|
465
|
-
m
|
|
466
|
-
);
|
|
467
|
-
m.setAutoFreeze.bind(m);
|
|
468
|
-
m.setUseStrictShallowCopy.bind(m);
|
|
469
|
-
m.applyPatches.bind(m);
|
|
470
|
-
m.createDraft.bind(m);
|
|
471
|
-
m.finishDraft.bind(m);
|
|
472
|
-
var Ue = (e, t, r) => {
|
|
473
|
-
if (t.length === 1 && t[0] === r) {
|
|
474
|
-
let n = !1;
|
|
475
|
-
try {
|
|
476
|
-
const o = {};
|
|
477
|
-
e(o) === o && (n = !0);
|
|
478
|
-
} catch {
|
|
479
|
-
}
|
|
480
|
-
if (n) {
|
|
481
|
-
let o;
|
|
482
|
-
try {
|
|
483
|
-
throw new Error();
|
|
484
|
-
} catch (i) {
|
|
485
|
-
({ stack: o } = i);
|
|
486
|
-
}
|
|
487
|
-
console.warn(
|
|
488
|
-
`The result function returned its own inputs without modification. e.g
|
|
489
|
-
\`createSelector([state => state.todos], todos => todos)\`
|
|
490
|
-
This could lead to inefficient memoization and unnecessary re-renders.
|
|
491
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,
|
|
492
|
-
{ stack: o }
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}, Ve = (e, t, r) => {
|
|
497
|
-
const { memoize: n, memoizeOptions: o } = t, { inputSelectorResults: i, inputSelectorResultsCopy: s } = e, c = n(() => ({}), ...o);
|
|
498
|
-
if (!(c.apply(null, i) === c.apply(null, s))) {
|
|
499
|
-
let a;
|
|
500
|
-
try {
|
|
501
|
-
throw new Error();
|
|
502
|
-
} catch (f) {
|
|
503
|
-
({ stack: a } = f);
|
|
504
|
-
}
|
|
505
|
-
console.warn(
|
|
506
|
-
`An input selector returned a different result when passed same arguments.
|
|
507
|
-
This means your output selector will likely run more frequently than intended.
|
|
508
|
-
Avoid returning a new reference inside your input selector, e.g.
|
|
509
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,
|
|
510
|
-
{
|
|
511
|
-
arguments: r,
|
|
512
|
-
firstInputs: i,
|
|
513
|
-
secondInputs: s,
|
|
514
|
-
stack: a
|
|
515
|
-
}
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
|
-
}, Ke = {
|
|
519
|
-
inputStabilityCheck: "once",
|
|
520
|
-
identityFunctionCheck: "once"
|
|
521
|
-
};
|
|
522
|
-
function Be(e, t = `expected a function, instead received ${typeof e}`) {
|
|
523
|
-
if (typeof e != "function")
|
|
524
|
-
throw new TypeError(t);
|
|
525
|
-
}
|
|
526
|
-
function Ge(e, t = `expected an object, instead received ${typeof e}`) {
|
|
527
|
-
if (typeof e != "object")
|
|
528
|
-
throw new TypeError(t);
|
|
529
|
-
}
|
|
530
|
-
function He(e, t = "expected all items to be functions, instead received the following types: ") {
|
|
531
|
-
if (!e.every((r) => typeof r == "function")) {
|
|
532
|
-
const r = e.map(
|
|
533
|
-
(n) => typeof n == "function" ? `function ${n.name || "unnamed"}()` : typeof n
|
|
534
|
-
).join(", ");
|
|
535
|
-
throw new TypeError(`${t}[${r}]`);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
var de = (e) => Array.isArray(e) ? e : [e];
|
|
539
|
-
function Xe(e) {
|
|
540
|
-
const t = Array.isArray(e[0]) ? e[0] : e;
|
|
541
|
-
return He(
|
|
542
|
-
t,
|
|
543
|
-
"createSelector expects all input-selectors to be functions, but received the following types: "
|
|
544
|
-
), t;
|
|
545
|
-
}
|
|
546
|
-
function pe(e, t) {
|
|
547
|
-
const r = [], { length: n } = e;
|
|
548
|
-
for (let o = 0; o < n; o++)
|
|
549
|
-
r.push(e[o].apply(null, t));
|
|
550
|
-
return r;
|
|
551
|
-
}
|
|
552
|
-
var Je = (e, t) => {
|
|
553
|
-
const { identityFunctionCheck: r, inputStabilityCheck: n } = {
|
|
554
|
-
...Ke,
|
|
555
|
-
...t
|
|
556
|
-
};
|
|
557
|
-
return {
|
|
558
|
-
identityFunctionCheck: {
|
|
559
|
-
shouldRun: r === "always" || r === "once" && e,
|
|
560
|
-
run: Ue
|
|
561
|
-
},
|
|
562
|
-
inputStabilityCheck: {
|
|
563
|
-
shouldRun: n === "always" || n === "once" && e,
|
|
564
|
-
run: Ve
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
}, Qe = class {
|
|
568
|
-
constructor(e) {
|
|
569
|
-
this.value = e;
|
|
570
|
-
}
|
|
571
|
-
deref() {
|
|
572
|
-
return this.value;
|
|
573
|
-
}
|
|
574
|
-
}, Ye = typeof WeakRef < "u" ? WeakRef : Qe, Ze = 0, ye = 1;
|
|
575
|
-
function M() {
|
|
576
|
-
return {
|
|
577
|
-
s: Ze,
|
|
578
|
-
v: void 0,
|
|
579
|
-
o: null,
|
|
580
|
-
p: null
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
function oe(e, t = {}) {
|
|
584
|
-
let r = M();
|
|
585
|
-
const { resultEqualityCheck: n } = t;
|
|
586
|
-
let o, i = 0;
|
|
587
|
-
function s() {
|
|
588
|
-
var l;
|
|
589
|
-
let c = r;
|
|
590
|
-
const { length: u } = arguments;
|
|
591
|
-
for (let _ = 0, g = u; _ < g; _++) {
|
|
592
|
-
const h = arguments[_];
|
|
593
|
-
if (typeof h == "function" || typeof h == "object" && h !== null) {
|
|
594
|
-
let p = c.o;
|
|
595
|
-
p === null && (c.o = p = /* @__PURE__ */ new WeakMap());
|
|
596
|
-
const w = p.get(h);
|
|
597
|
-
w === void 0 ? (c = M(), p.set(h, c)) : c = w;
|
|
598
|
-
} else {
|
|
599
|
-
let p = c.p;
|
|
600
|
-
p === null && (c.p = p = /* @__PURE__ */ new Map());
|
|
601
|
-
const w = p.get(h);
|
|
602
|
-
w === void 0 ? (c = M(), p.set(h, c)) : c = w;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
const a = c;
|
|
606
|
-
let f;
|
|
607
|
-
if (c.s === ye ? f = c.v : (f = e.apply(null, arguments), i++), a.s = ye, n) {
|
|
608
|
-
const _ = ((l = o == null ? void 0 : o.deref) == null ? void 0 : l.call(o)) ?? o;
|
|
609
|
-
_ != null && n(_, f) && (f = _, i !== 0 && i--), o = typeof f == "object" && f !== null || typeof f == "function" ? new Ye(f) : f;
|
|
610
|
-
}
|
|
611
|
-
return a.v = f, f;
|
|
612
|
-
}
|
|
613
|
-
return s.clearCache = () => {
|
|
614
|
-
r = M(), s.resetResultsCount();
|
|
615
|
-
}, s.resultsCount = () => i, s.resetResultsCount = () => {
|
|
616
|
-
i = 0;
|
|
617
|
-
}, s;
|
|
618
|
-
}
|
|
619
|
-
function Oe(e, ...t) {
|
|
620
|
-
const r = typeof e == "function" ? {
|
|
621
|
-
memoize: e,
|
|
622
|
-
memoizeOptions: t
|
|
623
|
-
} : e, n = (...o) => {
|
|
624
|
-
let i = 0, s = 0, c, u = {}, a = o.pop();
|
|
625
|
-
typeof a == "object" && (u = a, a = o.pop()), Be(
|
|
626
|
-
a,
|
|
627
|
-
`createSelector expects an output function after the inputs, but received: [${typeof a}]`
|
|
628
|
-
);
|
|
629
|
-
const f = {
|
|
630
|
-
...r,
|
|
631
|
-
...u
|
|
632
|
-
}, {
|
|
633
|
-
memoize: l,
|
|
634
|
-
memoizeOptions: _ = [],
|
|
635
|
-
argsMemoize: g = oe,
|
|
636
|
-
argsMemoizeOptions: h = [],
|
|
637
|
-
devModeChecks: p = {}
|
|
638
|
-
} = f, w = de(_), F = de(h), E = Xe(o), K = l(function() {
|
|
639
|
-
return i++, a.apply(
|
|
640
|
-
null,
|
|
641
|
-
arguments
|
|
642
|
-
);
|
|
643
|
-
}, ...w);
|
|
644
|
-
let P = !0;
|
|
645
|
-
const B = g(function() {
|
|
646
|
-
s++;
|
|
647
|
-
const D = pe(
|
|
648
|
-
E,
|
|
649
|
-
arguments
|
|
650
|
-
);
|
|
651
|
-
if (c = K.apply(null, D), process.env.NODE_ENV !== "production") {
|
|
652
|
-
const { identityFunctionCheck: I, inputStabilityCheck: j } = Je(P, p);
|
|
653
|
-
if (I.shouldRun && I.run(
|
|
654
|
-
a,
|
|
655
|
-
D,
|
|
656
|
-
c
|
|
657
|
-
), j.shouldRun) {
|
|
658
|
-
const Ee = pe(
|
|
659
|
-
E,
|
|
660
|
-
arguments
|
|
661
|
-
);
|
|
662
|
-
j.run(
|
|
663
|
-
{ inputSelectorResults: D, inputSelectorResultsCopy: Ee },
|
|
664
|
-
{ memoize: l, memoizeOptions: w },
|
|
665
|
-
arguments
|
|
666
|
-
);
|
|
667
|
-
}
|
|
668
|
-
P && (P = !1);
|
|
669
|
-
}
|
|
670
|
-
return c;
|
|
671
|
-
}, ...F);
|
|
672
|
-
return Object.assign(B, {
|
|
673
|
-
resultFunc: a,
|
|
674
|
-
memoizedResultFunc: K,
|
|
675
|
-
dependencies: E,
|
|
676
|
-
dependencyRecomputations: () => s,
|
|
677
|
-
resetDependencyRecomputations: () => {
|
|
678
|
-
s = 0;
|
|
679
|
-
},
|
|
680
|
-
lastResult: () => c,
|
|
681
|
-
recomputations: () => i,
|
|
682
|
-
resetRecomputations: () => {
|
|
683
|
-
i = 0;
|
|
684
|
-
},
|
|
685
|
-
memoize: l,
|
|
686
|
-
argsMemoize: g
|
|
687
|
-
});
|
|
688
|
-
};
|
|
689
|
-
return Object.assign(n, {
|
|
690
|
-
withTypes: () => n
|
|
691
|
-
}), n;
|
|
692
|
-
}
|
|
693
|
-
var Le = /* @__PURE__ */ Oe(oe), et = Object.assign(
|
|
694
|
-
(e, t = Le) => {
|
|
695
|
-
Ge(
|
|
696
|
-
e,
|
|
697
|
-
`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`
|
|
698
|
-
);
|
|
699
|
-
const r = Object.keys(e), n = r.map(
|
|
700
|
-
(i) => e[i]
|
|
701
|
-
);
|
|
702
|
-
return t(
|
|
703
|
-
n,
|
|
704
|
-
(...i) => i.reduce((s, c, u) => (s[r[u]] = c, s), {})
|
|
705
|
-
);
|
|
706
|
-
},
|
|
707
|
-
{ withTypes: () => et }
|
|
708
|
-
), tt = (...e) => {
|
|
709
|
-
const t = Oe(...e), r = Object.assign((...n) => {
|
|
710
|
-
const o = t(...n), i = (s, ...c) => o(v(s) ? be(s) : s, ...c);
|
|
711
|
-
return Object.assign(i, o), i;
|
|
712
|
-
}, {
|
|
713
|
-
withTypes: () => r
|
|
714
|
-
});
|
|
715
|
-
return r;
|
|
716
|
-
};
|
|
717
|
-
tt(oe);
|
|
718
|
-
function U(e, t) {
|
|
719
|
-
function r(...n) {
|
|
720
|
-
if (t) {
|
|
721
|
-
let o = t(...n);
|
|
722
|
-
if (!o)
|
|
723
|
-
throw new Error(process.env.NODE_ENV === "production" ? V(0) : "prepareAction did not return an object");
|
|
724
|
-
return {
|
|
725
|
-
type: e,
|
|
726
|
-
payload: o.payload,
|
|
727
|
-
..."meta" in o && {
|
|
728
|
-
meta: o.meta
|
|
729
|
-
},
|
|
730
|
-
..."error" in o && {
|
|
731
|
-
error: o.error
|
|
732
|
-
}
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
return {
|
|
736
|
-
type: e,
|
|
737
|
-
payload: n[0]
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
return r.toString = () => `${e}`, r.type = e, r.match = (n) => Ae(n) && n.type === e, r;
|
|
741
|
-
}
|
|
742
|
-
process.env.NODE_ENV;
|
|
743
|
-
var rt = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", Se = (e = 21) => {
|
|
744
|
-
let t = "", r = e;
|
|
745
|
-
for (; r--; )
|
|
746
|
-
t += rt[Math.random() * 64 | 0];
|
|
747
|
-
return t;
|
|
748
|
-
}, nt = (e, t) => {
|
|
749
|
-
if (typeof e != "function")
|
|
750
|
-
throw new Error(process.env.NODE_ENV === "production" ? V(32) : `${t} is not a function`);
|
|
751
|
-
}, ie = "listenerMiddleware", ot = (e) => {
|
|
752
|
-
let {
|
|
753
|
-
type: t,
|
|
754
|
-
actionCreator: r,
|
|
755
|
-
matcher: n,
|
|
756
|
-
predicate: o,
|
|
757
|
-
effect: i
|
|
758
|
-
} = e;
|
|
759
|
-
if (t)
|
|
760
|
-
o = U(t).match;
|
|
761
|
-
else if (r)
|
|
762
|
-
t = r.type, o = r.match;
|
|
763
|
-
else if (n)
|
|
764
|
-
o = n;
|
|
765
|
-
else if (!o)
|
|
766
|
-
throw new Error(process.env.NODE_ENV === "production" ? V(21) : "Creating or removing a listener requires one of the known fields for matching an action");
|
|
767
|
-
return nt(i, "options.listener"), {
|
|
768
|
-
predicate: o,
|
|
769
|
-
type: t,
|
|
770
|
-
effect: i
|
|
771
|
-
};
|
|
772
|
-
}, it = Object.assign((e) => {
|
|
773
|
-
const {
|
|
774
|
-
type: t,
|
|
775
|
-
predicate: r,
|
|
776
|
-
effect: n
|
|
777
|
-
} = ot(e);
|
|
778
|
-
return {
|
|
779
|
-
id: Se(),
|
|
780
|
-
effect: n,
|
|
781
|
-
type: t,
|
|
782
|
-
predicate: r,
|
|
783
|
-
pending: /* @__PURE__ */ new Set(),
|
|
784
|
-
unsubscribe: () => {
|
|
785
|
-
throw new Error(process.env.NODE_ENV === "production" ? V(22) : "Unsubscribe not initialized");
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
}, {
|
|
789
|
-
withTypes: () => it
|
|
790
|
-
}), st = Object.assign(U(`${ie}/add`), {
|
|
791
|
-
withTypes: () => st
|
|
792
|
-
});
|
|
793
|
-
U(`${ie}/removeAll`);
|
|
794
|
-
var ct = Object.assign(U(`${ie}/remove`), {
|
|
795
|
-
withTypes: () => ct
|
|
796
|
-
});
|
|
797
|
-
function V(e) {
|
|
798
|
-
return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
|
|
799
|
-
}
|
|
800
|
-
const ut = (e, t, r = !1) => {
|
|
801
|
-
const n = r ? "top-end" : "top-start", o = r ? "top-start" : "top-end", i = r ? "bottom-end" : "bottom-start", s = r ? "bottom-start" : "bottom-end", c = r ? "right-start" : "left-start", u = r ? "right-end" : "left-end", a = r ? "left-start" : "right-start", f = r ? "left-end" : "right-end";
|
|
802
|
-
let l = e ? s : i;
|
|
803
|
-
return t === "up" ? l = e ? o : n : t === "end" ? l = e ? f : a : t === "start" ? l = e ? u : c : t === "down-centered" ? l = "bottom" : t === "up-centered" && (l = "top"), l;
|
|
804
|
-
}, at = Ce(({
|
|
805
|
-
children: e,
|
|
806
|
-
className: t,
|
|
807
|
-
onSelect: r,
|
|
808
|
-
onToggle: n,
|
|
809
|
-
controlId: o,
|
|
810
|
-
toggleProps: i,
|
|
811
|
-
title: s,
|
|
812
|
-
menuProps: c,
|
|
813
|
-
drop: u = "down",
|
|
814
|
-
align: a = "start",
|
|
815
|
-
autoClose: f = !0,
|
|
816
|
-
show: l = "default",
|
|
817
|
-
..._
|
|
818
|
-
}, g) => {
|
|
819
|
-
const [h, p] = se(l === "default" ? !1 : l), [w, F] = se({ case: "" }), E = ze((I) => {
|
|
820
|
-
I.stopPropagation(), p((j) => !j);
|
|
821
|
-
}, []), P = ut(a === "end", u), B = {
|
|
822
|
-
down: "dropdown",
|
|
823
|
-
"down-centered": "dropdown-center",
|
|
824
|
-
up: "dropup",
|
|
825
|
-
"up-centered": "dropup-center dropup",
|
|
826
|
-
end: "dropend",
|
|
827
|
-
start: "dropstart"
|
|
828
|
-
}, G = o || "nav-dropdown-" + Se(), D = De(() => ({
|
|
829
|
-
align: a,
|
|
830
|
-
drop: u,
|
|
831
|
-
showInternal: l != "default" && n ? l : h,
|
|
832
|
-
handleToggle: l != "default" && n ? n : E,
|
|
833
|
-
placement: P,
|
|
834
|
-
directionClasses: {
|
|
835
|
-
down: "dropdown",
|
|
836
|
-
"down-centered": "dropdown-center",
|
|
837
|
-
up: "dropup",
|
|
838
|
-
"up-centered": "dropup-center dropup",
|
|
839
|
-
end: "dropend",
|
|
840
|
-
start: "dropstart"
|
|
841
|
-
},
|
|
842
|
-
controlId: G,
|
|
843
|
-
activeDescendant: w,
|
|
844
|
-
setActiveDescendant: F
|
|
845
|
-
}), [a, u, l, h, n, E, P, B, o, w, F]);
|
|
846
|
-
return /* @__PURE__ */ H("div", { ref: g, id: o + "-wrapper", className: `sg-dropdown${t ? " " + t : ""} sg-nav-item`, ..._, children: /* @__PURE__ */ Pe(ke, { value: D, children: [
|
|
847
|
-
/* @__PURE__ */ H(C.Toggle, { navDropdown: !0, ...i, children: s }),
|
|
848
|
-
/* @__PURE__ */ H(C.Menu, { ...c, children: e })
|
|
849
|
-
] }) });
|
|
850
|
-
}), pt = Object.assign(at, {
|
|
851
|
-
Toggle: C.Toggle,
|
|
852
|
-
Menu: C.Menu,
|
|
853
|
-
Item: C.Item,
|
|
854
|
-
Divider: C.Divider
|
|
855
|
-
});
|
|
856
|
-
export {
|
|
857
|
-
pt as default
|
|
858
|
-
};
|