@pie-lib/rubric 2.0.4-next.31 → 2.0.4-next.34
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/CHANGELOG.json +1 -0
- package/CHANGELOG.md +1448 -0
- package/LICENSE.md +5 -0
- package/lib/authoring.js +496 -0
- package/lib/authoring.js.map +1 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/lib/point-menu.js +125 -0
- package/lib/point-menu.js.map +1 -0
- package/package.json +12 -35
- package/src/__tests__/rubric.test.jsx +373 -0
- package/src/authoring.jsx +413 -0
- package/src/index.js +9 -0
- package/src/point-menu.jsx +87 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -7
- package/dist/authoring.d.ts +0 -62
- package/dist/authoring.js +0 -298
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -9
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
- package/dist/node_modules/.bun/@hello-pangea_dnd@18.0.1_d0d44917b9a63a72/node_modules/@hello-pangea/dnd/dist/dnd.esm.js +0 -4451
- package/dist/node_modules/.bun/css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js +0 -102
- package/dist/node_modules/.bun/raf-schd@4.0.3/node_modules/raf-schd/dist/raf-schd.esm.js +0 -13
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +0 -159
- package/dist/node_modules/.bun/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +0 -11
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -53
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -51
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
- package/dist/point-menu.d.ts +0 -27
- package/dist/point-menu.js +0 -73
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { invariant as e } from "../../../../tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js";
|
|
2
|
-
//#region ../../../node_modules/.bun/css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js
|
|
3
|
-
var t = function(e) {
|
|
4
|
-
var t = e.top, n = e.right, r = e.bottom, i = e.left;
|
|
5
|
-
return {
|
|
6
|
-
top: t,
|
|
7
|
-
right: n,
|
|
8
|
-
bottom: r,
|
|
9
|
-
left: i,
|
|
10
|
-
width: n - i,
|
|
11
|
-
height: r - t,
|
|
12
|
-
x: i,
|
|
13
|
-
y: t,
|
|
14
|
-
center: {
|
|
15
|
-
x: (n + i) / 2,
|
|
16
|
-
y: (r + t) / 2
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}, n = function(e, t) {
|
|
20
|
-
return {
|
|
21
|
-
top: e.top - t.top,
|
|
22
|
-
left: e.left - t.left,
|
|
23
|
-
bottom: e.bottom + t.bottom,
|
|
24
|
-
right: e.right + t.right
|
|
25
|
-
};
|
|
26
|
-
}, r = function(e, t) {
|
|
27
|
-
return {
|
|
28
|
-
top: e.top + t.top,
|
|
29
|
-
left: e.left + t.left,
|
|
30
|
-
bottom: e.bottom - t.bottom,
|
|
31
|
-
right: e.right - t.right
|
|
32
|
-
};
|
|
33
|
-
}, i = function(e, t) {
|
|
34
|
-
return {
|
|
35
|
-
top: e.top + t.y,
|
|
36
|
-
left: e.left + t.x,
|
|
37
|
-
bottom: e.bottom + t.y,
|
|
38
|
-
right: e.right + t.x
|
|
39
|
-
};
|
|
40
|
-
}, a = {
|
|
41
|
-
top: 0,
|
|
42
|
-
right: 0,
|
|
43
|
-
bottom: 0,
|
|
44
|
-
left: 0
|
|
45
|
-
}, o = function(e) {
|
|
46
|
-
var i = e.borderBox, o = e.margin, s = o === void 0 ? a : o, c = e.border, l = c === void 0 ? a : c, u = e.padding, d = u === void 0 ? a : u, f = t(n(i, s)), p = t(r(i, l)), m = t(r(p, d));
|
|
47
|
-
return {
|
|
48
|
-
marginBox: f,
|
|
49
|
-
borderBox: t(i),
|
|
50
|
-
paddingBox: p,
|
|
51
|
-
contentBox: m,
|
|
52
|
-
margin: s,
|
|
53
|
-
border: l,
|
|
54
|
-
padding: d
|
|
55
|
-
};
|
|
56
|
-
}, s = function(t) {
|
|
57
|
-
var n = t.slice(0, -2);
|
|
58
|
-
if (t.slice(-2) !== "px") return 0;
|
|
59
|
-
var r = Number(n);
|
|
60
|
-
return isNaN(r) && (process.env.NODE_ENV === "production" ? e(!1) : e(!1, "Could not parse value [raw: " + t + ", without suffix: " + n + "]")), r;
|
|
61
|
-
}, c = function() {
|
|
62
|
-
return {
|
|
63
|
-
x: window.pageXOffset,
|
|
64
|
-
y: window.pageYOffset
|
|
65
|
-
};
|
|
66
|
-
}, l = function(e, t) {
|
|
67
|
-
var n = e.borderBox, r = e.border, a = e.margin, s = e.padding;
|
|
68
|
-
return o({
|
|
69
|
-
borderBox: i(n, t),
|
|
70
|
-
border: r,
|
|
71
|
-
margin: a,
|
|
72
|
-
padding: s
|
|
73
|
-
});
|
|
74
|
-
}, u = function(e, t) {
|
|
75
|
-
return t === void 0 && (t = c()), l(e, t);
|
|
76
|
-
}, d = function(e, t) {
|
|
77
|
-
return o({
|
|
78
|
-
borderBox: e,
|
|
79
|
-
margin: {
|
|
80
|
-
top: s(t.marginTop),
|
|
81
|
-
right: s(t.marginRight),
|
|
82
|
-
bottom: s(t.marginBottom),
|
|
83
|
-
left: s(t.marginLeft)
|
|
84
|
-
},
|
|
85
|
-
padding: {
|
|
86
|
-
top: s(t.paddingTop),
|
|
87
|
-
right: s(t.paddingRight),
|
|
88
|
-
bottom: s(t.paddingBottom),
|
|
89
|
-
left: s(t.paddingLeft)
|
|
90
|
-
},
|
|
91
|
-
border: {
|
|
92
|
-
top: s(t.borderTopWidth),
|
|
93
|
-
right: s(t.borderRightWidth),
|
|
94
|
-
bottom: s(t.borderBottomWidth),
|
|
95
|
-
left: s(t.borderLeftWidth)
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}, f = function(e) {
|
|
99
|
-
return d(e.getBoundingClientRect(), window.getComputedStyle(e));
|
|
100
|
-
};
|
|
101
|
-
//#endregion
|
|
102
|
-
export { d as calculateBox, o as createBox, n as expand, f as getBox, t as getRect, l as offset, u as withScroll };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region ../../../node_modules/.bun/raf-schd@4.0.3/node_modules/raf-schd/dist/raf-schd.esm.js
|
|
2
|
-
var e = function(e) {
|
|
3
|
-
var t = [], n = null, r = function() {
|
|
4
|
-
t = [...arguments], !n && (n = requestAnimationFrame(function() {
|
|
5
|
-
n = null, e.apply(void 0, t);
|
|
6
|
-
}));
|
|
7
|
-
};
|
|
8
|
-
return r.cancel = function() {
|
|
9
|
-
n &&= (cancelAnimationFrame(n), null);
|
|
10
|
-
}, r;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { e as default };
|
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
import { require_with_selector as e } from "../../../../use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js";
|
|
2
|
-
import * as t from "react";
|
|
3
|
-
e();
|
|
4
|
-
var n = /* @__PURE__ */ t.version.startsWith("19"), r = /* @__PURE__ */ Symbol.for(n ? "react.transitional.element" : "react.element"), i = /* @__PURE__ */ Symbol.for("react.portal"), a = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), s = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.consumer"), l = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), d = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), m = /* @__PURE__ */ Symbol.for("react.lazy"), h = /* @__PURE__ */ Symbol.for("react.offscreen"), g = /* @__PURE__ */ Symbol.for("react.client.reference"), _ = u, v = p;
|
|
5
|
-
function y(e) {
|
|
6
|
-
return !!(typeof e == "string" || typeof e == "function" || e === a || e === s || e === o || e === d || e === f || e === h || typeof e == "object" && e && (e.$$typeof === m || e.$$typeof === p || e.$$typeof === l || e.$$typeof === c || e.$$typeof === u || e.$$typeof === g || e.getModuleId !== void 0));
|
|
7
|
-
}
|
|
8
|
-
function b(e) {
|
|
9
|
-
if (typeof e == "object" && e) {
|
|
10
|
-
let { $$typeof: t } = e;
|
|
11
|
-
switch (t) {
|
|
12
|
-
case r: switch (e = e.type, e) {
|
|
13
|
-
case a:
|
|
14
|
-
case s:
|
|
15
|
-
case o:
|
|
16
|
-
case d:
|
|
17
|
-
case f: return e;
|
|
18
|
-
default: switch (e &&= e.$$typeof, e) {
|
|
19
|
-
case l:
|
|
20
|
-
case u:
|
|
21
|
-
case m:
|
|
22
|
-
case p: return e;
|
|
23
|
-
case c: return e;
|
|
24
|
-
default: return t;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
case i: return t;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function ee(e) {
|
|
32
|
-
return n ? b(e) === c : b(e) === l;
|
|
33
|
-
}
|
|
34
|
-
function x(e) {
|
|
35
|
-
return b(e) === p;
|
|
36
|
-
}
|
|
37
|
-
function S(e) {
|
|
38
|
-
typeof console < "u" && typeof console.error == "function" && console.error(e);
|
|
39
|
-
try {
|
|
40
|
-
throw Error(e);
|
|
41
|
-
} catch {}
|
|
42
|
-
}
|
|
43
|
-
function C(e, t) {
|
|
44
|
-
if (e) (t === "mapStateToProps" || t === "mapDispatchToProps") && (Object.prototype.hasOwnProperty.call(e, "dependsOnOwnProps") || S(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`));
|
|
45
|
-
else throw Error(`Unexpected value for ${t} in connect.`);
|
|
46
|
-
}
|
|
47
|
-
function w(e, t, n) {
|
|
48
|
-
C(e, "mapStateToProps"), C(t, "mapDispatchToProps"), C(n, "mergeProps");
|
|
49
|
-
}
|
|
50
|
-
function T(e, t, n, r, { areStatesEqual: i, areOwnPropsEqual: a, areStatePropsEqual: o }) {
|
|
51
|
-
let s = !1, c, l, u, d, f;
|
|
52
|
-
function p(i, a) {
|
|
53
|
-
return c = i, l = a, u = e(c, l), d = t(r, l), f = n(u, d, l), s = !0, f;
|
|
54
|
-
}
|
|
55
|
-
function m() {
|
|
56
|
-
return u = e(c, l), t.dependsOnOwnProps && (d = t(r, l)), f = n(u, d, l), f;
|
|
57
|
-
}
|
|
58
|
-
function h() {
|
|
59
|
-
return e.dependsOnOwnProps && (u = e(c, l)), t.dependsOnOwnProps && (d = t(r, l)), f = n(u, d, l), f;
|
|
60
|
-
}
|
|
61
|
-
function g() {
|
|
62
|
-
let t = e(c, l), r = !o(t, u);
|
|
63
|
-
return u = t, r && (f = n(u, d, l)), f;
|
|
64
|
-
}
|
|
65
|
-
function _(e, t) {
|
|
66
|
-
let n = !a(t, l), r = !i(e, c, t, l);
|
|
67
|
-
return c = e, l = t, n && r ? m() : n ? h() : r ? g() : f;
|
|
68
|
-
}
|
|
69
|
-
return function(e, t) {
|
|
70
|
-
return s ? _(e, t) : p(e, t);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function te(e, { initMapStateToProps: t, initMapDispatchToProps: n, initMergeProps: r, ...i }) {
|
|
74
|
-
let a = t(e, i), o = n(e, i), s = r(e, i);
|
|
75
|
-
return process.env.NODE_ENV !== "production" && w(a, o, s), T(a, o, s, e, i);
|
|
76
|
-
}
|
|
77
|
-
function E(e, t) {
|
|
78
|
-
let n = {};
|
|
79
|
-
for (let r in e) {
|
|
80
|
-
let i = e[r];
|
|
81
|
-
typeof i == "function" && (n[r] = (...e) => t(i(...e)));
|
|
82
|
-
}
|
|
83
|
-
return n;
|
|
84
|
-
}
|
|
85
|
-
function D(e) {
|
|
86
|
-
if (typeof e != "object" || !e) return !1;
|
|
87
|
-
let t = Object.getPrototypeOf(e);
|
|
88
|
-
if (t === null) return !0;
|
|
89
|
-
let n = t;
|
|
90
|
-
for (; Object.getPrototypeOf(n) !== null;) n = Object.getPrototypeOf(n);
|
|
91
|
-
return t === n;
|
|
92
|
-
}
|
|
93
|
-
function O(e, t, n) {
|
|
94
|
-
D(e) || S(`${n}() in ${t} must return a plain object. Instead received ${e}.`);
|
|
95
|
-
}
|
|
96
|
-
function k(e) {
|
|
97
|
-
return function(t) {
|
|
98
|
-
let n = e(t);
|
|
99
|
-
function r() {
|
|
100
|
-
return n;
|
|
101
|
-
}
|
|
102
|
-
return r.dependsOnOwnProps = !1, r;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function A(e) {
|
|
106
|
-
return e.dependsOnOwnProps ? !!e.dependsOnOwnProps : e.length !== 1;
|
|
107
|
-
}
|
|
108
|
-
function j(e, t) {
|
|
109
|
-
return function(n, { displayName: r }) {
|
|
110
|
-
let i = function(e, t) {
|
|
111
|
-
return i.dependsOnOwnProps ? i.mapToProps(e, t) : i.mapToProps(e, void 0);
|
|
112
|
-
};
|
|
113
|
-
return i.dependsOnOwnProps = !0, i.mapToProps = function(n, a) {
|
|
114
|
-
i.mapToProps = e, i.dependsOnOwnProps = A(e);
|
|
115
|
-
let o = i(n, a);
|
|
116
|
-
return typeof o == "function" && (i.mapToProps = o, i.dependsOnOwnProps = A(o), o = i(n, a)), process.env.NODE_ENV !== "production" && O(o, r, t), o;
|
|
117
|
-
}, i;
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function M(e, t) {
|
|
121
|
-
return (n, r) => {
|
|
122
|
-
throw Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function N(e) {
|
|
126
|
-
return e && typeof e == "object" ? k((t) => E(e, t)) : e ? typeof e == "function" ? j(e, "mapDispatchToProps") : M(e, "mapDispatchToProps") : k((e) => ({ dispatch: e }));
|
|
127
|
-
}
|
|
128
|
-
function P(e) {
|
|
129
|
-
return e ? typeof e == "function" ? j(e, "mapStateToProps") : M(e, "mapStateToProps") : k(() => ({}));
|
|
130
|
-
}
|
|
131
|
-
function F(e, t, n) {
|
|
132
|
-
return {
|
|
133
|
-
...n,
|
|
134
|
-
...e,
|
|
135
|
-
...t
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function I(e) {
|
|
139
|
-
return function(t, { displayName: n, areMergedPropsEqual: r }) {
|
|
140
|
-
let i = !1, a;
|
|
141
|
-
return function(t, o, s) {
|
|
142
|
-
let c = e(t, o, s);
|
|
143
|
-
return i ? r(c, a) || (a = c) : (i = !0, a = c, process.env.NODE_ENV !== "production" && O(a, n, "mergeProps")), a;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function ne(e) {
|
|
148
|
-
return e ? typeof e == "function" ? I(e) : M(e, "mergeProps") : () => F;
|
|
149
|
-
}
|
|
150
|
-
function re(e) {
|
|
151
|
-
e();
|
|
152
|
-
}
|
|
153
|
-
function ie() {
|
|
154
|
-
let e = null, t = null;
|
|
155
|
-
return {
|
|
156
|
-
clear() {
|
|
157
|
-
e = null, t = null;
|
|
158
|
-
},
|
|
159
|
-
notify() {
|
|
160
|
-
re(() => {
|
|
161
|
-
let t = e;
|
|
162
|
-
for (; t;) t.callback(), t = t.next;
|
|
163
|
-
});
|
|
164
|
-
},
|
|
165
|
-
get() {
|
|
166
|
-
let t = [], n = e;
|
|
167
|
-
for (; n;) t.push(n), n = n.next;
|
|
168
|
-
return t;
|
|
169
|
-
},
|
|
170
|
-
subscribe(n) {
|
|
171
|
-
let r = !0, i = t = {
|
|
172
|
-
callback: n,
|
|
173
|
-
next: null,
|
|
174
|
-
prev: t
|
|
175
|
-
};
|
|
176
|
-
return i.prev ? i.prev.next = i : e = i, function() {
|
|
177
|
-
!r || e === null || (r = !1, i.next ? i.next.prev = i.prev : t = i.prev, i.prev ? i.prev.next = i.next : e = i.next);
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
var L = {
|
|
183
|
-
notify() {},
|
|
184
|
-
get: () => []
|
|
185
|
-
};
|
|
186
|
-
function R(e, t) {
|
|
187
|
-
let n, r = L, i = 0, a = !1;
|
|
188
|
-
function o(e) {
|
|
189
|
-
u();
|
|
190
|
-
let t = r.subscribe(e), n = !1;
|
|
191
|
-
return () => {
|
|
192
|
-
n || (n = !0, t(), d());
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function s() {
|
|
196
|
-
r.notify();
|
|
197
|
-
}
|
|
198
|
-
function c() {
|
|
199
|
-
m.onStateChange && m.onStateChange();
|
|
200
|
-
}
|
|
201
|
-
function l() {
|
|
202
|
-
return a;
|
|
203
|
-
}
|
|
204
|
-
function u() {
|
|
205
|
-
i++, n || (n = t ? t.addNestedSub(c) : e.subscribe(c), r = ie());
|
|
206
|
-
}
|
|
207
|
-
function d() {
|
|
208
|
-
i--, n && i === 0 && (n(), n = void 0, r.clear(), r = L);
|
|
209
|
-
}
|
|
210
|
-
function f() {
|
|
211
|
-
a || (a = !0, u());
|
|
212
|
-
}
|
|
213
|
-
function p() {
|
|
214
|
-
a && (a = !1, d());
|
|
215
|
-
}
|
|
216
|
-
let m = {
|
|
217
|
-
addNestedSub: o,
|
|
218
|
-
notifyNestedSubs: s,
|
|
219
|
-
handleChangeWrapper: c,
|
|
220
|
-
isSubscribed: l,
|
|
221
|
-
trySubscribe: f,
|
|
222
|
-
tryUnsubscribe: p,
|
|
223
|
-
getListeners: () => r
|
|
224
|
-
};
|
|
225
|
-
return m;
|
|
226
|
-
}
|
|
227
|
-
var ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, oe = typeof navigator < "u" && navigator.product === "ReactNative", z = ae || oe ? t.useLayoutEffect : t.useEffect;
|
|
228
|
-
function B(e, t) {
|
|
229
|
-
return e === t ? e !== 0 || t !== 0 || 1 / e == 1 / t : e !== e && t !== t;
|
|
230
|
-
}
|
|
231
|
-
function V(e, t) {
|
|
232
|
-
if (B(e, t)) return !0;
|
|
233
|
-
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
|
|
234
|
-
let n = Object.keys(e), r = Object.keys(t);
|
|
235
|
-
if (n.length !== r.length) return !1;
|
|
236
|
-
for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !B(e[n[r]], t[n[r]])) return !1;
|
|
237
|
-
return !0;
|
|
238
|
-
}
|
|
239
|
-
var H = {
|
|
240
|
-
childContextTypes: !0,
|
|
241
|
-
contextType: !0,
|
|
242
|
-
contextTypes: !0,
|
|
243
|
-
defaultProps: !0,
|
|
244
|
-
displayName: !0,
|
|
245
|
-
getDefaultProps: !0,
|
|
246
|
-
getDerivedStateFromError: !0,
|
|
247
|
-
getDerivedStateFromProps: !0,
|
|
248
|
-
mixins: !0,
|
|
249
|
-
propTypes: !0,
|
|
250
|
-
type: !0
|
|
251
|
-
}, U = {
|
|
252
|
-
name: !0,
|
|
253
|
-
length: !0,
|
|
254
|
-
prototype: !0,
|
|
255
|
-
caller: !0,
|
|
256
|
-
callee: !0,
|
|
257
|
-
arguments: !0,
|
|
258
|
-
arity: !0
|
|
259
|
-
}, W = {
|
|
260
|
-
$$typeof: !0,
|
|
261
|
-
render: !0,
|
|
262
|
-
defaultProps: !0,
|
|
263
|
-
displayName: !0,
|
|
264
|
-
propTypes: !0
|
|
265
|
-
}, G = {
|
|
266
|
-
$$typeof: !0,
|
|
267
|
-
compare: !0,
|
|
268
|
-
defaultProps: !0,
|
|
269
|
-
displayName: !0,
|
|
270
|
-
propTypes: !0,
|
|
271
|
-
type: !0
|
|
272
|
-
}, K = {
|
|
273
|
-
[_]: W,
|
|
274
|
-
[v]: G
|
|
275
|
-
};
|
|
276
|
-
function q(e) {
|
|
277
|
-
return x(e) ? G : K[e.$$typeof] || H;
|
|
278
|
-
}
|
|
279
|
-
var se = Object.defineProperty, ce = Object.getOwnPropertyNames, J = Object.getOwnPropertySymbols, le = Object.getOwnPropertyDescriptor, ue = Object.getPrototypeOf, Y = Object.prototype;
|
|
280
|
-
function X(e, t) {
|
|
281
|
-
if (typeof t != "string") {
|
|
282
|
-
if (Y) {
|
|
283
|
-
let n = ue(t);
|
|
284
|
-
n && n !== Y && X(e, n);
|
|
285
|
-
}
|
|
286
|
-
let n = ce(t);
|
|
287
|
-
J && (n = n.concat(J(t)));
|
|
288
|
-
let r = q(e), i = q(t);
|
|
289
|
-
for (let a = 0; a < n.length; ++a) {
|
|
290
|
-
let o = n[a];
|
|
291
|
-
if (!U[o] && !(i && i[o]) && !(r && r[o])) {
|
|
292
|
-
let n = le(t, o);
|
|
293
|
-
try {
|
|
294
|
-
se(e, o, n);
|
|
295
|
-
} catch {}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
return e;
|
|
300
|
-
}
|
|
301
|
-
var de = /* @__PURE__ */ Symbol.for("react-redux-context"), fe = typeof globalThis < "u" ? globalThis : {};
|
|
302
|
-
function pe() {
|
|
303
|
-
if (!t.createContext) return {};
|
|
304
|
-
let e = fe[de] ??= /* @__PURE__ */ new Map(), n = e.get(t.createContext);
|
|
305
|
-
return n || (n = t.createContext(null), process.env.NODE_ENV !== "production" && (n.displayName = "ReactRedux"), e.set(t.createContext, n)), n;
|
|
306
|
-
}
|
|
307
|
-
var Z = /* @__PURE__ */ pe(), me = [null, null], Q = (e) => {
|
|
308
|
-
try {
|
|
309
|
-
return JSON.stringify(e);
|
|
310
|
-
} catch {
|
|
311
|
-
return String(e);
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
function he(e, t, n) {
|
|
315
|
-
z(() => e(...t), n);
|
|
316
|
-
}
|
|
317
|
-
function ge(e, t, n, r, i, a) {
|
|
318
|
-
e.current = r, n.current = !1, i.current && (i.current = null, a());
|
|
319
|
-
}
|
|
320
|
-
function _e(e, t, n, r, i, a, o, s, c, l, u) {
|
|
321
|
-
if (!e) return () => {};
|
|
322
|
-
let d = !1, f = null, p = () => {
|
|
323
|
-
if (d || !s.current) return;
|
|
324
|
-
let e = t.getState(), n, p;
|
|
325
|
-
try {
|
|
326
|
-
n = r(e, i.current);
|
|
327
|
-
} catch (e) {
|
|
328
|
-
p = e, f = e;
|
|
329
|
-
}
|
|
330
|
-
p || (f = null), n === a.current ? o.current || l() : (a.current = n, c.current = n, o.current = !0, u());
|
|
331
|
-
};
|
|
332
|
-
return n.onStateChange = p, n.trySubscribe(), p(), () => {
|
|
333
|
-
if (d = !0, n.tryUnsubscribe(), n.onStateChange = null, f) throw f;
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
function ve(e, t) {
|
|
337
|
-
return e === t;
|
|
338
|
-
}
|
|
339
|
-
var $ = !1;
|
|
340
|
-
function ye(e, n, r, { pure: i, areStatesEqual: a = ve, areOwnPropsEqual: o = V, areStatePropsEqual: s = V, areMergedPropsEqual: c = V, forwardRef: l = !1, context: u = Z } = {}) {
|
|
341
|
-
process.env.NODE_ENV !== "production" && i !== void 0 && !$ && ($ = !0, S("The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component"));
|
|
342
|
-
let d = u, f = P(e), p = N(n), m = ne(r), h = !!e;
|
|
343
|
-
return (e) => {
|
|
344
|
-
if (process.env.NODE_ENV !== "production" && !/* @__PURE__ */ y(e)) throw Error(`You must pass a component to the function returned by connect. Instead received ${Q(e)}`);
|
|
345
|
-
let n = e.displayName || e.name || "Component", r = `Connect(${n})`, i = {
|
|
346
|
-
shouldHandleStateChanges: h,
|
|
347
|
-
displayName: r,
|
|
348
|
-
wrappedComponentName: n,
|
|
349
|
-
WrappedComponent: e,
|
|
350
|
-
initMapStateToProps: f,
|
|
351
|
-
initMapDispatchToProps: p,
|
|
352
|
-
initMergeProps: m,
|
|
353
|
-
areStatesEqual: a,
|
|
354
|
-
areStatePropsEqual: s,
|
|
355
|
-
areOwnPropsEqual: o,
|
|
356
|
-
areMergedPropsEqual: c
|
|
357
|
-
};
|
|
358
|
-
function u(n) {
|
|
359
|
-
let [a, o, s] = t.useMemo(() => {
|
|
360
|
-
let { reactReduxForwardedRef: e, ...t } = n;
|
|
361
|
-
return [
|
|
362
|
-
n.context,
|
|
363
|
-
e,
|
|
364
|
-
t
|
|
365
|
-
];
|
|
366
|
-
}, [n]), c = t.useMemo(() => {
|
|
367
|
-
let e = d;
|
|
368
|
-
if (a?.Consumer && process.env.NODE_ENV !== "production") {
|
|
369
|
-
if (!/* @__PURE__ */ ee(/* @__PURE__ */ t.createElement(a.Consumer, null))) throw Error("You must pass a valid React context consumer as `props.context`");
|
|
370
|
-
e = a;
|
|
371
|
-
}
|
|
372
|
-
return e;
|
|
373
|
-
}, [a, d]), l = t.useContext(c), u = !!n.store && !!n.store.getState && !!n.store.dispatch, f = !!l && !!l.store;
|
|
374
|
-
if (process.env.NODE_ENV !== "production" && !u && !f) throw Error(`Could not find "store" in the context of "${r}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${r} in connect options.`);
|
|
375
|
-
let p = u ? n.store : l.store, m = f ? l.getServerState : p.getState, g = t.useMemo(() => te(p.dispatch, i), [p]), [_, v] = t.useMemo(() => {
|
|
376
|
-
if (!h) return me;
|
|
377
|
-
let e = R(p, u ? void 0 : l.subscription);
|
|
378
|
-
return [e, e.notifyNestedSubs.bind(e)];
|
|
379
|
-
}, [
|
|
380
|
-
p,
|
|
381
|
-
u,
|
|
382
|
-
l
|
|
383
|
-
]), y = t.useMemo(() => u ? l : {
|
|
384
|
-
...l,
|
|
385
|
-
subscription: _
|
|
386
|
-
}, [
|
|
387
|
-
u,
|
|
388
|
-
l,
|
|
389
|
-
_
|
|
390
|
-
]), b = t.useRef(void 0), x = t.useRef(s), S = t.useRef(void 0), C = t.useRef(!1), w = t.useRef(!1), T = t.useRef(void 0);
|
|
391
|
-
z(() => (w.current = !0, () => {
|
|
392
|
-
w.current = !1;
|
|
393
|
-
}), []);
|
|
394
|
-
let E = t.useMemo(() => () => S.current && s === x.current ? S.current : g(p.getState(), s), [p, s]), D = t.useMemo(() => (e) => _ ? _e(h, p, _, g, x, b, C, w, S, v, e) : () => {}, [_]);
|
|
395
|
-
he(ge, [
|
|
396
|
-
x,
|
|
397
|
-
b,
|
|
398
|
-
C,
|
|
399
|
-
s,
|
|
400
|
-
S,
|
|
401
|
-
v
|
|
402
|
-
]);
|
|
403
|
-
let O;
|
|
404
|
-
try {
|
|
405
|
-
O = t.useSyncExternalStore(D, E, m ? () => g(m(), s) : E);
|
|
406
|
-
} catch (e) {
|
|
407
|
-
throw T.current && (e.message += `
|
|
408
|
-
The error may be correlated with this previous error:
|
|
409
|
-
${T.current.stack}
|
|
410
|
-
|
|
411
|
-
`), e;
|
|
412
|
-
}
|
|
413
|
-
z(() => {
|
|
414
|
-
T.current = void 0, S.current = void 0, b.current = O;
|
|
415
|
-
});
|
|
416
|
-
let k = t.useMemo(() => /* @__PURE__ */ t.createElement(e, {
|
|
417
|
-
...O,
|
|
418
|
-
ref: o
|
|
419
|
-
}), [
|
|
420
|
-
o,
|
|
421
|
-
e,
|
|
422
|
-
O
|
|
423
|
-
]);
|
|
424
|
-
return t.useMemo(() => h ? /* @__PURE__ */ t.createElement(c.Provider, { value: y }, k) : k, [
|
|
425
|
-
c,
|
|
426
|
-
k,
|
|
427
|
-
y
|
|
428
|
-
]);
|
|
429
|
-
}
|
|
430
|
-
let g = t.memo(u);
|
|
431
|
-
if (g.WrappedComponent = e, g.displayName = u.displayName = r, l) {
|
|
432
|
-
let n = t.forwardRef(function(e, n) {
|
|
433
|
-
return /* @__PURE__ */ t.createElement(g, {
|
|
434
|
-
...e,
|
|
435
|
-
reactReduxForwardedRef: n
|
|
436
|
-
});
|
|
437
|
-
});
|
|
438
|
-
return n.displayName = r, n.WrappedComponent = e, /* @__PURE__ */ X(n, e);
|
|
439
|
-
}
|
|
440
|
-
return /* @__PURE__ */ X(g, e);
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
var be = ye;
|
|
444
|
-
function xe(e) {
|
|
445
|
-
let { children: n, context: r, serverState: i, store: a } = e, o = t.useMemo(() => {
|
|
446
|
-
let t = {
|
|
447
|
-
store: a,
|
|
448
|
-
subscription: R(a),
|
|
449
|
-
getServerState: i ? () => i : void 0
|
|
450
|
-
};
|
|
451
|
-
if (process.env.NODE_ENV === "production") return t;
|
|
452
|
-
{
|
|
453
|
-
let { identityFunctionCheck: n = "once", stabilityCheck: r = "once" } = e;
|
|
454
|
-
return /* @__PURE__ */ Object.assign(t, {
|
|
455
|
-
stabilityCheck: r,
|
|
456
|
-
identityFunctionCheck: n
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
}, [a, i]), s = t.useMemo(() => a.getState(), [a]);
|
|
460
|
-
z(() => {
|
|
461
|
-
let { subscription: e } = o;
|
|
462
|
-
return e.onStateChange = e.notifyNestedSubs, e.trySubscribe(), s !== a.getState() && e.notifyNestedSubs(), () => {
|
|
463
|
-
e.tryUnsubscribe(), e.onStateChange = void 0;
|
|
464
|
-
};
|
|
465
|
-
}, [o, s]);
|
|
466
|
-
let c = r || Z;
|
|
467
|
-
return /* @__PURE__ */ t.createElement(c.Provider, { value: o }, n);
|
|
468
|
-
}
|
|
469
|
-
var Se = xe;
|
|
470
|
-
//#endregion
|
|
471
|
-
export { Se as Provider_default, be as connect };
|