@blockbite/libraries 0.11.5 → 0.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -4
- package/dist/libraries.js +1018 -2256
- package/dist/libraries.js.map +1 -1
- package/dist/libraries.umd.cjs +2 -10
- package/dist/libraries.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -6
package/dist/libraries.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
3
|
-
for (var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
1
|
+
function ke() {
|
|
2
|
+
return ke = Object.assign ? Object.assign.bind() : function(u) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var i = arguments[e];
|
|
5
|
+
for (var r in i) ({}).hasOwnProperty.call(i, r) && (u[r] = i[r]);
|
|
6
6
|
}
|
|
7
|
-
return
|
|
8
|
-
},
|
|
7
|
+
return u;
|
|
8
|
+
}, ke.apply(null, arguments);
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
return
|
|
10
|
+
var _e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
11
|
+
function $e(u) {
|
|
12
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
13
13
|
}
|
|
14
|
-
var
|
|
14
|
+
var kt, $t = {
|
|
15
15
|
exports: {}
|
|
16
16
|
};
|
|
17
17
|
/*!
|
|
@@ -19,775 +19,775 @@ var xr, Er = {
|
|
|
19
19
|
Licensed under the MIT License (MIT), see
|
|
20
20
|
http://jedwatson.github.io/classnames
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
for (var
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
28
|
-
var
|
|
29
|
-
if (
|
|
30
|
-
else if (Array.isArray(
|
|
31
|
-
if (
|
|
32
|
-
var
|
|
33
|
-
|
|
22
|
+
var mt, Ht, Yt, Di = (kt || (kt = 1, mt = $t, (function() {
|
|
23
|
+
var u = {}.hasOwnProperty;
|
|
24
|
+
function e() {
|
|
25
|
+
for (var i = [], r = 0; r < arguments.length; r++) {
|
|
26
|
+
var l = arguments[r];
|
|
27
|
+
if (l) {
|
|
28
|
+
var m = typeof l;
|
|
29
|
+
if (m === "string" || m === "number") i.push(l);
|
|
30
|
+
else if (Array.isArray(l)) {
|
|
31
|
+
if (l.length) {
|
|
32
|
+
var g = e.apply(null, l);
|
|
33
|
+
g && i.push(g);
|
|
34
34
|
}
|
|
35
|
-
} else if (
|
|
36
|
-
else
|
|
35
|
+
} else if (m === "object") if (l.toString === Object.prototype.toString) for (var d in l) u.call(l, d) && l[d] && i.push(d);
|
|
36
|
+
else i.push(l.toString());
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
})()),
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
var
|
|
48
|
-
return !!
|
|
49
|
-
}
|
|
50
|
-
function
|
|
51
|
-
if (typeof
|
|
52
|
-
if ((function(
|
|
53
|
-
return typeof
|
|
39
|
+
return i.join(" ");
|
|
40
|
+
}
|
|
41
|
+
mt.exports ? (e.default = e, mt.exports = e) : window.classNames = e;
|
|
42
|
+
})()), $t.exports), _t = $e(Di), Bt, se = $e((function() {
|
|
43
|
+
if (Yt) return Ht;
|
|
44
|
+
Yt = 1;
|
|
45
|
+
var u = /^\s+|\s+$/g, e = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, r = /^0o[0-7]+$/i, l = parseInt, m = Object.prototype.toString;
|
|
46
|
+
function g(n) {
|
|
47
|
+
var o = typeof n;
|
|
48
|
+
return !!n && (o == "object" || o == "function");
|
|
49
|
+
}
|
|
50
|
+
function d(n) {
|
|
51
|
+
if (typeof n == "number") return n;
|
|
52
|
+
if ((function(a) {
|
|
53
|
+
return typeof a == "symbol" || /* @__PURE__ */ (function(y) {
|
|
54
54
|
return !!y && typeof y == "object";
|
|
55
|
-
})(
|
|
56
|
-
})(
|
|
57
|
-
if (
|
|
58
|
-
var
|
|
59
|
-
|
|
55
|
+
})(a) && m.call(a) == "[object Symbol]";
|
|
56
|
+
})(n)) return NaN;
|
|
57
|
+
if (g(n)) {
|
|
58
|
+
var o = typeof n.valueOf == "function" ? n.valueOf() : n;
|
|
59
|
+
n = g(o) ? o + "" : o;
|
|
60
60
|
}
|
|
61
|
-
if (typeof
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
return
|
|
67
|
-
return
|
|
68
|
-
return
|
|
69
|
-
})(
|
|
61
|
+
if (typeof n != "string") return n === 0 ? n : +n;
|
|
62
|
+
n = n.replace(u, "");
|
|
63
|
+
var c = i.test(n);
|
|
64
|
+
return c || r.test(n) ? l(n.slice(2), c ? 2 : 8) : e.test(n) ? NaN : +n;
|
|
65
|
+
}
|
|
66
|
+
return Ht = function(n, o, c) {
|
|
67
|
+
return c === void 0 && (c = o, o = void 0), c !== void 0 && (c = (c = d(c)) == c ? c : 0), o !== void 0 && (o = (o = d(o)) == o ? o : 0), (function(a, y, w) {
|
|
68
|
+
return a == a && (w !== void 0 && (a = a <= w ? a : w), y !== void 0 && (a = a >= y ? a : y)), a;
|
|
69
|
+
})(d(n), o, c);
|
|
70
70
|
};
|
|
71
|
-
})()),
|
|
71
|
+
})()), vt = {
|
|
72
72
|
exports: {}
|
|
73
|
-
},
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
var
|
|
73
|
+
}, Li = (Bt || (Bt = 1, (function(u, e) {
|
|
74
|
+
var i = "__lodash_hash_undefined__", r = 9007199254740991, l = "[object Arguments]", m = "[object Array]", g = "[object Boolean]", d = "[object Date]", n = "[object Error]", o = "[object Function]", c = "[object Map]", a = "[object Number]", y = "[object Object]", w = "[object Promise]", v = "[object RegExp]", z = "[object Set]", S = "[object String]", p = "[object Symbol]", b = "[object WeakMap]", I = "[object ArrayBuffer]", E = "[object DataView]", C = /^\[object .+?Constructor\]$/, X = /^(?:0|[1-9]\d*)$/, h = {};
|
|
75
|
+
h["[object Float32Array]"] = h["[object Float64Array]"] = h["[object Int8Array]"] = h["[object Int16Array]"] = h["[object Int32Array]"] = h["[object Uint8Array]"] = h["[object Uint8ClampedArray]"] = h["[object Uint16Array]"] = h["[object Uint32Array]"] = !0, h[l] = h[m] = h[I] = h[g] = h[E] = h[d] = h[n] = h[o] = h[c] = h[a] = h[y] = h[v] = h[z] = h[S] = h[b] = !1;
|
|
76
|
+
var L = typeof _e == "object" && _e && _e.Object === Object && _e, K = typeof self == "object" && self && self.Object === Object && self, F = L || K || Function("return this")(), oe = e && !e.nodeType && e, O = oe && u && !u.nodeType && u, D = O && O.exports === oe, k = D && L.process, R = (function() {
|
|
77
77
|
try {
|
|
78
|
-
return
|
|
78
|
+
return k && k.binding && k.binding("util");
|
|
79
79
|
} catch {
|
|
80
80
|
}
|
|
81
|
-
})(),
|
|
82
|
-
function
|
|
83
|
-
for (var
|
|
81
|
+
})(), N = R && R.isTypedArray;
|
|
82
|
+
function A(t, s) {
|
|
83
|
+
for (var f = -1, _ = t == null ? 0 : t.length; ++f < _; ) if (s(t[f], f, t)) return !0;
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
}
|
|
92
|
-
function
|
|
93
|
-
var
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
}),
|
|
97
|
-
}
|
|
98
|
-
var
|
|
99
|
-
return
|
|
100
|
-
}),
|
|
101
|
-
function
|
|
102
|
-
var
|
|
103
|
-
for (this.clear(); ++
|
|
104
|
-
var
|
|
105
|
-
this.set(
|
|
86
|
+
function W(t) {
|
|
87
|
+
var s = -1, f = Array(t.size);
|
|
88
|
+
return t.forEach(function(_, T) {
|
|
89
|
+
f[++s] = [T, _];
|
|
90
|
+
}), f;
|
|
91
|
+
}
|
|
92
|
+
function be(t) {
|
|
93
|
+
var s = -1, f = Array(t.size);
|
|
94
|
+
return t.forEach(function(_) {
|
|
95
|
+
f[++s] = _;
|
|
96
|
+
}), f;
|
|
97
|
+
}
|
|
98
|
+
var me, J, ve, Q = Array.prototype, ue = Function.prototype, le = Object.prototype, Ve = F["__core-js_shared__"], je = ue.toString, x = le.hasOwnProperty, V = (me = /[^.]+$/.exec(Ve && Ve.keys && Ve.keys.IE_PROTO || "")) ? "Symbol(src)_1." + me : "", $ = le.toString, Y = RegExp("^" + je.call(x).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), St = D ? F.Buffer : void 0, He = F.Symbol, It = F.Uint8Array, xt = le.propertyIsEnumerable, fi = Q.splice, ze = He ? He.toStringTag : void 0, Et = Object.getOwnPropertySymbols, di = St ? St.isBuffer : void 0, mi = (J = Object.keys, ve = Object, function(t) {
|
|
99
|
+
return J(ve(t));
|
|
100
|
+
}), st = De(F, "DataView"), Ne = De(F, "Map"), ot = De(F, "Promise"), at = De(F, "Set"), ut = De(F, "WeakMap"), Me = De(Object, "create"), vi = xe(st), pi = xe(Ne), wi = xe(ot), yi = xe(at), gi = xe(ut), Vt = He ? He.prototype : void 0, lt = Vt ? Vt.valueOf : void 0;
|
|
101
|
+
function Se(t) {
|
|
102
|
+
var s = -1, f = t == null ? 0 : t.length;
|
|
103
|
+
for (this.clear(); ++s < f; ) {
|
|
104
|
+
var _ = t[s];
|
|
105
|
+
this.set(_[0], _[1]);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
var
|
|
110
|
-
for (this.clear(); ++
|
|
111
|
-
var
|
|
112
|
-
this.set(
|
|
108
|
+
function ce(t) {
|
|
109
|
+
var s = -1, f = t == null ? 0 : t.length;
|
|
110
|
+
for (this.clear(); ++s < f; ) {
|
|
111
|
+
var _ = t[s];
|
|
112
|
+
this.set(_[0], _[1]);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
var
|
|
117
|
-
for (this.clear(); ++
|
|
118
|
-
var
|
|
119
|
-
this.set(
|
|
115
|
+
function Ie(t) {
|
|
116
|
+
var s = -1, f = t == null ? 0 : t.length;
|
|
117
|
+
for (this.clear(); ++s < f; ) {
|
|
118
|
+
var _ = t[s];
|
|
119
|
+
this.set(_[0], _[1]);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
var
|
|
124
|
-
for (this.__data__ = new
|
|
122
|
+
function Ye(t) {
|
|
123
|
+
var s = -1, f = t == null ? 0 : t.length;
|
|
124
|
+
for (this.__data__ = new Ie(); ++s < f; ) this.add(t[s]);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
var
|
|
128
|
-
this.size =
|
|
126
|
+
function pe(t) {
|
|
127
|
+
var s = this.__data__ = new ce(t);
|
|
128
|
+
this.size = s.size;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
for (var
|
|
133
|
-
return
|
|
134
|
-
})(
|
|
135
|
-
for (var
|
|
136
|
-
return
|
|
130
|
+
function _i(t, s) {
|
|
131
|
+
var f = Ge(t), _ = !f && xi(t), T = !f && !_ && ct(t), j = !f && !_ && !T && At(t), H = f || _ || T || j, B = H ? (function(U, ae) {
|
|
132
|
+
for (var he = -1, Z = Array(U); ++he < U; ) Z[he] = ae(he);
|
|
133
|
+
return Z;
|
|
134
|
+
})(t.length, String) : [], re = B.length;
|
|
135
|
+
for (var G in t) !x.call(t, G) || H && (G == "length" || T && (G == "offset" || G == "parent") || j && (G == "buffer" || G == "byteLength" || G == "byteOffset") || Ii(G, re)) || B.push(G);
|
|
136
|
+
return B;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
for (var
|
|
138
|
+
function Be(t, s) {
|
|
139
|
+
for (var f = t.length; f--; ) if (Rt(t[f][0], s)) return f;
|
|
140
140
|
return -1;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
return
|
|
144
|
-
var
|
|
142
|
+
function Pe(t) {
|
|
143
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : ze && ze in Object(t) ? (function(s) {
|
|
144
|
+
var f = x.call(s, ze), _ = s[ze];
|
|
145
145
|
try {
|
|
146
|
-
|
|
147
|
-
var
|
|
146
|
+
s[ze] = void 0;
|
|
147
|
+
var T = !0;
|
|
148
148
|
} catch {
|
|
149
149
|
}
|
|
150
|
-
var
|
|
151
|
-
return
|
|
152
|
-
})(
|
|
153
|
-
return
|
|
154
|
-
})(
|
|
155
|
-
}
|
|
156
|
-
function
|
|
157
|
-
return
|
|
158
|
-
}
|
|
159
|
-
function
|
|
160
|
-
return
|
|
161
|
-
var
|
|
162
|
-
if (
|
|
163
|
-
if (!
|
|
164
|
-
|
|
150
|
+
var j = $.call(s);
|
|
151
|
+
return T && (f ? s[ze] = _ : delete s[ze]), j;
|
|
152
|
+
})(t) : (function(s) {
|
|
153
|
+
return $.call(s);
|
|
154
|
+
})(t);
|
|
155
|
+
}
|
|
156
|
+
function jt(t) {
|
|
157
|
+
return Ae(t) && Pe(t) == l;
|
|
158
|
+
}
|
|
159
|
+
function Dt(t, s, f, _, T) {
|
|
160
|
+
return t === s || (t == null || s == null || !Ae(t) && !Ae(s) ? t != t && s != s : (function(j, H, B, re, G, U) {
|
|
161
|
+
var ae = Ge(j), he = Ge(H), Z = ae ? m : we(j), fe = he ? m : we(H), Le = (Z = Z == l ? y : Z) == y, Ue = (fe = fe == l ? y : fe) == y, Oe = Z == fe;
|
|
162
|
+
if (Oe && ct(j)) {
|
|
163
|
+
if (!ct(H)) return !1;
|
|
164
|
+
ae = !0, Le = !1;
|
|
165
165
|
}
|
|
166
|
-
if (
|
|
167
|
-
switch (
|
|
168
|
-
case M:
|
|
169
|
-
if (U.byteLength != T.byteLength || U.byteOffset != T.byteOffset) return !1;
|
|
170
|
-
U = U.buffer, T = T.buffer;
|
|
171
|
-
case l:
|
|
172
|
-
return !(U.byteLength != T.byteLength || !oe(new he(U), new he(T)));
|
|
166
|
+
if (Oe && !Le) return U || (U = new pe()), ae || At(j) ? Lt(j, H, B, re, G, U) : (function(P, M, Xe, ye, ht, ee, de) {
|
|
167
|
+
switch (Xe) {
|
|
173
168
|
case E:
|
|
169
|
+
if (P.byteLength != M.byteLength || P.byteOffset != M.byteOffset) return !1;
|
|
170
|
+
P = P.buffer, M = M.buffer;
|
|
171
|
+
case I:
|
|
172
|
+
return !(P.byteLength != M.byteLength || !ee(new It(P), new It(M)));
|
|
174
173
|
case g:
|
|
175
|
-
case p:
|
|
176
|
-
return gt(+U, +T);
|
|
177
|
-
case i:
|
|
178
|
-
return U.name == T.name && U.message == T.message;
|
|
179
|
-
case b:
|
|
180
|
-
case N:
|
|
181
|
-
return U == T + "";
|
|
182
174
|
case d:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (Et) return Et == T;
|
|
189
|
-
de |= 2, xe.set(U, T);
|
|
190
|
-
var ir = $t(xt(U), xt(T), de, je, oe, xe);
|
|
191
|
-
return xe.delete(U), ir;
|
|
175
|
+
case a:
|
|
176
|
+
return Rt(+P, +M);
|
|
177
|
+
case n:
|
|
178
|
+
return P.name == M.name && P.message == M.message;
|
|
179
|
+
case v:
|
|
192
180
|
case S:
|
|
193
|
-
|
|
181
|
+
return P == M + "";
|
|
182
|
+
case c:
|
|
183
|
+
var ge = W;
|
|
184
|
+
case z:
|
|
185
|
+
var Te = 1 & ye;
|
|
186
|
+
if (ge || (ge = be), P.size != M.size && !Te) return !1;
|
|
187
|
+
var Je = de.get(P);
|
|
188
|
+
if (Je) return Je == M;
|
|
189
|
+
ye |= 2, de.set(P, M);
|
|
190
|
+
var ft = Lt(ge(P), ge(M), ye, ht, ee, de);
|
|
191
|
+
return de.delete(P), ft;
|
|
192
|
+
case p:
|
|
193
|
+
if (lt) return lt.call(P) == lt.call(M);
|
|
194
194
|
}
|
|
195
195
|
return !1;
|
|
196
|
-
})(
|
|
197
|
-
if (!(1 &
|
|
198
|
-
var
|
|
199
|
-
if (
|
|
200
|
-
var
|
|
201
|
-
return
|
|
196
|
+
})(j, H, Z, B, re, G, U);
|
|
197
|
+
if (!(1 & B)) {
|
|
198
|
+
var Ce = Le && x.call(j, "__wrapped__"), Ct = Ue && x.call(H, "__wrapped__");
|
|
199
|
+
if (Ce || Ct) {
|
|
200
|
+
var Vi = Ce ? j.value() : j, ji = Ct ? H.value() : H;
|
|
201
|
+
return U || (U = new pe()), G(Vi, ji, B, re, U);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
return !!
|
|
205
|
-
var
|
|
206
|
-
if (
|
|
207
|
-
for (var
|
|
208
|
-
var
|
|
209
|
-
if (!(
|
|
204
|
+
return !!Oe && (U || (U = new pe()), (function(P, M, Xe, ye, ht, ee) {
|
|
205
|
+
var de = 1 & Xe, ge = Ot(P), Te = ge.length, Je = Ot(M), ft = Je.length;
|
|
206
|
+
if (Te != ft && !de) return !1;
|
|
207
|
+
for (var Ke = Te; Ke--; ) {
|
|
208
|
+
var Ee = ge[Ke];
|
|
209
|
+
if (!(de ? Ee in M : x.call(M, Ee))) return !1;
|
|
210
210
|
}
|
|
211
|
-
var
|
|
212
|
-
if (
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
for (var
|
|
216
|
-
var
|
|
217
|
-
if (
|
|
218
|
-
if (!(
|
|
219
|
-
|
|
211
|
+
var Tt = ee.get(P);
|
|
212
|
+
if (Tt && ee.get(M)) return Tt == M;
|
|
213
|
+
var Ze = !0;
|
|
214
|
+
ee.set(P, M), ee.set(M, P);
|
|
215
|
+
for (var dt = de; ++Ke < Te; ) {
|
|
216
|
+
var Qe = P[Ee = ge[Ke]], qe = M[Ee];
|
|
217
|
+
if (ye) var Ft = de ? ye(qe, Qe, Ee, M, P, ee) : ye(Qe, qe, Ee, P, M, ee);
|
|
218
|
+
if (!(Ft === void 0 ? Qe === qe || ht(Qe, qe, Xe, ye, ee) : Ft)) {
|
|
219
|
+
Ze = !1;
|
|
220
220
|
break;
|
|
221
221
|
}
|
|
222
|
-
|
|
222
|
+
dt || (dt = Ee == "constructor");
|
|
223
223
|
}
|
|
224
|
-
if (
|
|
225
|
-
var
|
|
226
|
-
|
|
224
|
+
if (Ze && !dt) {
|
|
225
|
+
var et = P.constructor, tt = M.constructor;
|
|
226
|
+
et == tt || !("constructor" in P) || !("constructor" in M) || typeof et == "function" && et instanceof et && typeof tt == "function" && tt instanceof tt || (Ze = !1);
|
|
227
227
|
}
|
|
228
|
-
return
|
|
229
|
-
})(
|
|
230
|
-
})(
|
|
231
|
-
}
|
|
232
|
-
function
|
|
233
|
-
return !(!
|
|
234
|
-
return !!
|
|
235
|
-
})(
|
|
236
|
-
}
|
|
237
|
-
function
|
|
238
|
-
if (
|
|
239
|
-
var
|
|
240
|
-
for (var
|
|
241
|
-
return
|
|
242
|
-
}
|
|
243
|
-
function
|
|
244
|
-
var
|
|
245
|
-
if (
|
|
246
|
-
var
|
|
247
|
-
if (
|
|
248
|
-
var
|
|
249
|
-
for (
|
|
250
|
-
var
|
|
251
|
-
if (
|
|
252
|
-
if (
|
|
253
|
-
if (
|
|
254
|
-
|
|
228
|
+
return ee.delete(P), ee.delete(M), Ze;
|
|
229
|
+
})(j, H, B, re, G, U));
|
|
230
|
+
})(t, s, f, _, Dt, T));
|
|
231
|
+
}
|
|
232
|
+
function bi(t) {
|
|
233
|
+
return !(!Pt(t) || (function(s) {
|
|
234
|
+
return !!V && V in s;
|
|
235
|
+
})(t)) && (Nt(t) ? Y : C).test(xe(t));
|
|
236
|
+
}
|
|
237
|
+
function zi(t) {
|
|
238
|
+
if (f = (s = t) && s.constructor, _ = typeof f == "function" && f.prototype || le, s !== _) return mi(t);
|
|
239
|
+
var s, f, _, T = [];
|
|
240
|
+
for (var j in Object(t)) x.call(t, j) && j != "constructor" && T.push(j);
|
|
241
|
+
return T;
|
|
242
|
+
}
|
|
243
|
+
function Lt(t, s, f, _, T, j) {
|
|
244
|
+
var H = 1 & f, B = t.length, re = s.length;
|
|
245
|
+
if (B != re && !(H && re > B)) return !1;
|
|
246
|
+
var G = j.get(t);
|
|
247
|
+
if (G && j.get(s)) return G == s;
|
|
248
|
+
var U = -1, ae = !0, he = 2 & f ? new Ye() : void 0;
|
|
249
|
+
for (j.set(t, s), j.set(s, t); ++U < B; ) {
|
|
250
|
+
var Z = t[U], fe = s[U];
|
|
251
|
+
if (_) var Le = H ? _(fe, Z, U, s, t, j) : _(Z, fe, U, t, s, j);
|
|
252
|
+
if (Le !== void 0) {
|
|
253
|
+
if (Le) continue;
|
|
254
|
+
ae = !1;
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
|
-
if (
|
|
258
|
-
if (!
|
|
259
|
-
if (
|
|
260
|
-
var
|
|
257
|
+
if (he) {
|
|
258
|
+
if (!A(s, function(Ue, Oe) {
|
|
259
|
+
if (Ce = Oe, !he.has(Ce) && (Z === Ue || T(Z, Ue, f, _, j))) return he.push(Oe);
|
|
260
|
+
var Ce;
|
|
261
261
|
})) {
|
|
262
|
-
|
|
262
|
+
ae = !1;
|
|
263
263
|
break;
|
|
264
264
|
}
|
|
265
|
-
} else if (
|
|
266
|
-
|
|
265
|
+
} else if (Z !== fe && !T(Z, fe, f, _, j)) {
|
|
266
|
+
ae = !1;
|
|
267
267
|
break;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
return
|
|
271
|
-
}
|
|
272
|
-
function
|
|
273
|
-
return (function(
|
|
274
|
-
var
|
|
275
|
-
return
|
|
276
|
-
for (var
|
|
277
|
-
return
|
|
278
|
-
})(
|
|
279
|
-
})(
|
|
280
|
-
}
|
|
281
|
-
function
|
|
282
|
-
var
|
|
283
|
-
return ((
|
|
284
|
-
}
|
|
285
|
-
function
|
|
286
|
-
var
|
|
287
|
-
return
|
|
288
|
-
})(
|
|
289
|
-
return
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
this.__data__ =
|
|
293
|
-
},
|
|
294
|
-
var
|
|
295
|
-
return this.size -=
|
|
296
|
-
},
|
|
297
|
-
var
|
|
298
|
-
if (
|
|
299
|
-
var
|
|
300
|
-
return
|
|
270
|
+
return j.delete(t), j.delete(s), ae;
|
|
271
|
+
}
|
|
272
|
+
function Ot(t) {
|
|
273
|
+
return (function(s, f, _) {
|
|
274
|
+
var T = f(s);
|
|
275
|
+
return Ge(s) ? T : (function(j, H) {
|
|
276
|
+
for (var B = -1, re = H.length, G = j.length; ++B < re; ) j[G + B] = H[B];
|
|
277
|
+
return j;
|
|
278
|
+
})(T, _(s));
|
|
279
|
+
})(t, Ei, Si);
|
|
280
|
+
}
|
|
281
|
+
function We(t, s) {
|
|
282
|
+
var f, _, T = t.__data__;
|
|
283
|
+
return ((_ = typeof (f = s)) == "string" || _ == "number" || _ == "symbol" || _ == "boolean" ? f !== "__proto__" : f === null) ? T[typeof s == "string" ? "string" : "hash"] : T.map;
|
|
284
|
+
}
|
|
285
|
+
function De(t, s) {
|
|
286
|
+
var f = (function(_, T) {
|
|
287
|
+
return _ == null ? void 0 : _[T];
|
|
288
|
+
})(t, s);
|
|
289
|
+
return bi(f) ? f : void 0;
|
|
290
|
+
}
|
|
291
|
+
Se.prototype.clear = function() {
|
|
292
|
+
this.__data__ = Me ? Me(null) : {}, this.size = 0;
|
|
293
|
+
}, Se.prototype.delete = function(t) {
|
|
294
|
+
var s = this.has(t) && delete this.__data__[t];
|
|
295
|
+
return this.size -= s ? 1 : 0, s;
|
|
296
|
+
}, Se.prototype.get = function(t) {
|
|
297
|
+
var s = this.__data__;
|
|
298
|
+
if (Me) {
|
|
299
|
+
var f = s[t];
|
|
300
|
+
return f === i ? void 0 : f;
|
|
301
301
|
}
|
|
302
|
-
return
|
|
303
|
-
},
|
|
304
|
-
var
|
|
305
|
-
return
|
|
306
|
-
},
|
|
307
|
-
var
|
|
308
|
-
return this.size += this.has(
|
|
309
|
-
},
|
|
302
|
+
return x.call(s, t) ? s[t] : void 0;
|
|
303
|
+
}, Se.prototype.has = function(t) {
|
|
304
|
+
var s = this.__data__;
|
|
305
|
+
return Me ? s[t] !== void 0 : x.call(s, t);
|
|
306
|
+
}, Se.prototype.set = function(t, s) {
|
|
307
|
+
var f = this.__data__;
|
|
308
|
+
return this.size += this.has(t) ? 0 : 1, f[t] = Me && s === void 0 ? i : s, this;
|
|
309
|
+
}, ce.prototype.clear = function() {
|
|
310
310
|
this.__data__ = [], this.size = 0;
|
|
311
|
-
},
|
|
312
|
-
var
|
|
313
|
-
return !(
|
|
314
|
-
},
|
|
315
|
-
var
|
|
316
|
-
return
|
|
317
|
-
},
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
var
|
|
321
|
-
return
|
|
322
|
-
},
|
|
311
|
+
}, ce.prototype.delete = function(t) {
|
|
312
|
+
var s = this.__data__, f = Be(s, t);
|
|
313
|
+
return !(f < 0 || (f == s.length - 1 ? s.pop() : fi.call(s, f, 1), --this.size, 0));
|
|
314
|
+
}, ce.prototype.get = function(t) {
|
|
315
|
+
var s = this.__data__, f = Be(s, t);
|
|
316
|
+
return f < 0 ? void 0 : s[f][1];
|
|
317
|
+
}, ce.prototype.has = function(t) {
|
|
318
|
+
return Be(this.__data__, t) > -1;
|
|
319
|
+
}, ce.prototype.set = function(t, s) {
|
|
320
|
+
var f = this.__data__, _ = Be(f, t);
|
|
321
|
+
return _ < 0 ? (++this.size, f.push([t, s])) : f[_][1] = s, this;
|
|
322
|
+
}, Ie.prototype.clear = function() {
|
|
323
323
|
this.size = 0, this.__data__ = {
|
|
324
|
-
hash: new
|
|
325
|
-
map: new (
|
|
326
|
-
string: new
|
|
324
|
+
hash: new Se(),
|
|
325
|
+
map: new (Ne || ce)(),
|
|
326
|
+
string: new Se()
|
|
327
327
|
};
|
|
328
|
-
},
|
|
329
|
-
var
|
|
330
|
-
return this.size -=
|
|
331
|
-
},
|
|
332
|
-
return
|
|
333
|
-
},
|
|
334
|
-
return
|
|
335
|
-
},
|
|
336
|
-
var
|
|
337
|
-
return
|
|
338
|
-
},
|
|
339
|
-
return this.__data__.set(
|
|
340
|
-
},
|
|
341
|
-
return this.__data__.has(
|
|
342
|
-
},
|
|
343
|
-
this.__data__ = new
|
|
344
|
-
},
|
|
345
|
-
var
|
|
346
|
-
return this.size =
|
|
347
|
-
},
|
|
348
|
-
return this.__data__.get(
|
|
349
|
-
},
|
|
350
|
-
return this.__data__.has(
|
|
351
|
-
},
|
|
352
|
-
var
|
|
353
|
-
if (
|
|
354
|
-
var
|
|
355
|
-
if (!
|
|
356
|
-
|
|
328
|
+
}, Ie.prototype.delete = function(t) {
|
|
329
|
+
var s = We(this, t).delete(t);
|
|
330
|
+
return this.size -= s ? 1 : 0, s;
|
|
331
|
+
}, Ie.prototype.get = function(t) {
|
|
332
|
+
return We(this, t).get(t);
|
|
333
|
+
}, Ie.prototype.has = function(t) {
|
|
334
|
+
return We(this, t).has(t);
|
|
335
|
+
}, Ie.prototype.set = function(t, s) {
|
|
336
|
+
var f = We(this, t), _ = f.size;
|
|
337
|
+
return f.set(t, s), this.size += f.size == _ ? 0 : 1, this;
|
|
338
|
+
}, Ye.prototype.add = Ye.prototype.push = function(t) {
|
|
339
|
+
return this.__data__.set(t, i), this;
|
|
340
|
+
}, Ye.prototype.has = function(t) {
|
|
341
|
+
return this.__data__.has(t);
|
|
342
|
+
}, pe.prototype.clear = function() {
|
|
343
|
+
this.__data__ = new ce(), this.size = 0;
|
|
344
|
+
}, pe.prototype.delete = function(t) {
|
|
345
|
+
var s = this.__data__, f = s.delete(t);
|
|
346
|
+
return this.size = s.size, f;
|
|
347
|
+
}, pe.prototype.get = function(t) {
|
|
348
|
+
return this.__data__.get(t);
|
|
349
|
+
}, pe.prototype.has = function(t) {
|
|
350
|
+
return this.__data__.has(t);
|
|
351
|
+
}, pe.prototype.set = function(t, s) {
|
|
352
|
+
var f = this.__data__;
|
|
353
|
+
if (f instanceof ce) {
|
|
354
|
+
var _ = f.__data__;
|
|
355
|
+
if (!Ne || _.length < 199) return _.push([t, s]), this.size = ++f.size, this;
|
|
356
|
+
f = this.__data__ = new Ie(_);
|
|
357
357
|
}
|
|
358
|
-
return
|
|
358
|
+
return f.set(t, s), this.size = f.size, this;
|
|
359
359
|
};
|
|
360
|
-
var
|
|
361
|
-
return
|
|
362
|
-
for (var
|
|
363
|
-
var
|
|
364
|
-
|
|
360
|
+
var Si = Et ? function(t) {
|
|
361
|
+
return t == null ? [] : (t = Object(t), (function(s, f) {
|
|
362
|
+
for (var _ = -1, T = s == null ? 0 : s.length, j = 0, H = []; ++_ < T; ) {
|
|
363
|
+
var B = s[_];
|
|
364
|
+
f(B, _, s) && (H[j++] = B);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
367
|
-
})(
|
|
368
|
-
return
|
|
366
|
+
return H;
|
|
367
|
+
})(Et(t), function(s) {
|
|
368
|
+
return xt.call(t, s);
|
|
369
369
|
}));
|
|
370
370
|
} : function() {
|
|
371
371
|
return [];
|
|
372
|
-
},
|
|
373
|
-
function
|
|
374
|
-
return !!(
|
|
372
|
+
}, we = Pe;
|
|
373
|
+
function Ii(t, s) {
|
|
374
|
+
return !!(s = s ?? r) && (typeof t == "number" || X.test(t)) && t > -1 && t % 1 == 0 && t < s;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
376
|
+
function xe(t) {
|
|
377
|
+
if (t != null) {
|
|
378
378
|
try {
|
|
379
|
-
return
|
|
379
|
+
return je.call(t);
|
|
380
380
|
} catch {
|
|
381
381
|
}
|
|
382
382
|
try {
|
|
383
|
-
return
|
|
383
|
+
return t + "";
|
|
384
384
|
} catch {
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
return "";
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return
|
|
391
|
-
}
|
|
392
|
-
(
|
|
393
|
-
var
|
|
394
|
-
if (
|
|
395
|
-
case
|
|
396
|
-
return
|
|
397
|
-
case
|
|
398
|
-
return
|
|
399
|
-
case
|
|
400
|
-
return
|
|
401
|
-
case
|
|
402
|
-
return
|
|
403
|
-
case
|
|
404
|
-
return
|
|
389
|
+
function Rt(t, s) {
|
|
390
|
+
return t === s || t != t && s != s;
|
|
391
|
+
}
|
|
392
|
+
(st && we(new st(new ArrayBuffer(1))) != E || Ne && we(new Ne()) != c || ot && we(ot.resolve()) != w || at && we(new at()) != z || ut && we(new ut()) != b) && (we = function(t) {
|
|
393
|
+
var s = Pe(t), f = s == y ? t.constructor : void 0, _ = f ? xe(f) : "";
|
|
394
|
+
if (_) switch (_) {
|
|
395
|
+
case vi:
|
|
396
|
+
return E;
|
|
397
|
+
case pi:
|
|
398
|
+
return c;
|
|
399
|
+
case wi:
|
|
400
|
+
return w;
|
|
401
|
+
case yi:
|
|
402
|
+
return z;
|
|
403
|
+
case gi:
|
|
404
|
+
return b;
|
|
405
405
|
}
|
|
406
|
-
return
|
|
406
|
+
return s;
|
|
407
407
|
});
|
|
408
|
-
var
|
|
408
|
+
var xi = jt(/* @__PURE__ */ (function() {
|
|
409
409
|
return arguments;
|
|
410
|
-
})()) ?
|
|
411
|
-
return
|
|
412
|
-
},
|
|
410
|
+
})()) ? jt : function(t) {
|
|
411
|
+
return Ae(t) && x.call(t, "callee") && !xt.call(t, "callee");
|
|
412
|
+
}, Ge = Array.isArray, ct = di || function() {
|
|
413
413
|
return !1;
|
|
414
414
|
};
|
|
415
|
-
function
|
|
416
|
-
if (!
|
|
417
|
-
var
|
|
418
|
-
return
|
|
415
|
+
function Nt(t) {
|
|
416
|
+
if (!Pt(t)) return !1;
|
|
417
|
+
var s = Pe(t);
|
|
418
|
+
return s == o || s == "[object GeneratorFunction]" || s == "[object AsyncFunction]" || s == "[object Proxy]";
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return typeof
|
|
420
|
+
function Mt(t) {
|
|
421
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= r;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
var
|
|
425
|
-
return
|
|
423
|
+
function Pt(t) {
|
|
424
|
+
var s = typeof t;
|
|
425
|
+
return t != null && (s == "object" || s == "function");
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
return
|
|
427
|
+
function Ae(t) {
|
|
428
|
+
return t != null && typeof t == "object";
|
|
429
429
|
}
|
|
430
|
-
var
|
|
431
|
-
return function(
|
|
432
|
-
return
|
|
430
|
+
var At = N ? /* @__PURE__ */ (function(t) {
|
|
431
|
+
return function(s) {
|
|
432
|
+
return t(s);
|
|
433
433
|
};
|
|
434
|
-
})(
|
|
435
|
-
return
|
|
434
|
+
})(N) : function(t) {
|
|
435
|
+
return Ae(t) && Mt(t.length) && !!h[Pe(t)];
|
|
436
436
|
};
|
|
437
|
-
function
|
|
438
|
-
return (
|
|
439
|
-
var
|
|
437
|
+
function Ei(t) {
|
|
438
|
+
return (s = t) != null && Mt(s.length) && !Nt(s) ? _i(t) : zi(t);
|
|
439
|
+
var s;
|
|
440
440
|
}
|
|
441
|
-
|
|
442
|
-
return
|
|
441
|
+
u.exports = function(t, s) {
|
|
442
|
+
return Dt(t, s);
|
|
443
443
|
};
|
|
444
|
-
})(
|
|
445
|
-
function
|
|
446
|
-
return e
|
|
444
|
+
})(vt, vt.exports)), vt.exports), Oi = $e(Li);
|
|
445
|
+
function Wt(u, e, i) {
|
|
446
|
+
return u[e] ? u[e][0] ? u[e][0][i] : u[e][i] : e === "contentBoxSize" ? u.contentRect[i === "inlineSize" ? "width" : "height"] : void 0;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
var
|
|
448
|
+
function Ri(u) {
|
|
449
|
+
u === void 0 && (u = {});
|
|
450
|
+
var e = u.onResize, i = window.React.useRef(void 0);
|
|
451
|
+
i.current = e;
|
|
452
|
+
var r = u.round || Math.round, l = window.React.useRef(), m = window.React.useState({
|
|
453
453
|
width: void 0,
|
|
454
454
|
height: void 0
|
|
455
|
-
}),
|
|
455
|
+
}), g = m[0], d = m[1], n = window.React.useRef(!1);
|
|
456
456
|
window.React.useEffect(function() {
|
|
457
|
-
return
|
|
458
|
-
|
|
457
|
+
return n.current = !1, function() {
|
|
458
|
+
n.current = !0;
|
|
459
459
|
};
|
|
460
460
|
}, []);
|
|
461
|
-
var
|
|
461
|
+
var o = window.React.useRef({
|
|
462
462
|
width: void 0,
|
|
463
463
|
height: void 0
|
|
464
|
-
}),
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
var
|
|
464
|
+
}), c = (function(a, y) {
|
|
465
|
+
var w = window.React.useRef(null), v = window.React.useRef(null);
|
|
466
|
+
v.current = y;
|
|
467
|
+
var z = window.React.useRef(null);
|
|
468
468
|
window.React.useEffect(function() {
|
|
469
|
-
|
|
469
|
+
S();
|
|
470
470
|
});
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
element:
|
|
475
|
-
subscriber:
|
|
476
|
-
cleanup:
|
|
471
|
+
var S = window.React.useCallback(function() {
|
|
472
|
+
var p = z.current, b = v.current, I = p || (b ? b instanceof Element ? b : b.current : null);
|
|
473
|
+
w.current && w.current.element === I && w.current.subscriber === a || (w.current && w.current.cleanup && w.current.cleanup(), w.current = {
|
|
474
|
+
element: I,
|
|
475
|
+
subscriber: a,
|
|
476
|
+
cleanup: I ? a(I) : void 0
|
|
477
477
|
});
|
|
478
|
-
}, [
|
|
478
|
+
}, [a]);
|
|
479
479
|
return window.React.useEffect(function() {
|
|
480
480
|
return function() {
|
|
481
|
-
|
|
481
|
+
w.current && w.current.cleanup && (w.current.cleanup(), w.current = null);
|
|
482
482
|
};
|
|
483
|
-
}, []), window.React.useCallback(function(
|
|
484
|
-
|
|
485
|
-
}, [
|
|
486
|
-
})(window.React.useCallback(function(
|
|
487
|
-
return
|
|
488
|
-
box:
|
|
489
|
-
round:
|
|
483
|
+
}, []), window.React.useCallback(function(p) {
|
|
484
|
+
z.current = p, S();
|
|
485
|
+
}, [S]);
|
|
486
|
+
})(window.React.useCallback(function(a) {
|
|
487
|
+
return l.current && l.current.box === u.box && l.current.round === r || (l.current = {
|
|
488
|
+
box: u.box,
|
|
489
|
+
round: r,
|
|
490
490
|
instance: new ResizeObserver(function(y) {
|
|
491
|
-
var
|
|
492
|
-
if (
|
|
493
|
-
var
|
|
494
|
-
width:
|
|
495
|
-
height:
|
|
491
|
+
var w = y[0], v = u.box === "border-box" ? "borderBoxSize" : u.box === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", z = Wt(w, v, "inlineSize"), S = Wt(w, v, "blockSize"), p = z ? r(z) : void 0, b = S ? r(S) : void 0;
|
|
492
|
+
if (o.current.width !== p || o.current.height !== b) {
|
|
493
|
+
var I = {
|
|
494
|
+
width: p,
|
|
495
|
+
height: b
|
|
496
496
|
};
|
|
497
|
-
|
|
497
|
+
o.current.width = p, o.current.height = b, i.current ? i.current(I) : n.current || d(I);
|
|
498
498
|
}
|
|
499
499
|
})
|
|
500
|
-
}),
|
|
501
|
-
box:
|
|
500
|
+
}), l.current.instance.observe(a, {
|
|
501
|
+
box: u.box
|
|
502
502
|
}), function() {
|
|
503
|
-
|
|
503
|
+
l.current && l.current.instance.unobserve(a);
|
|
504
504
|
};
|
|
505
|
-
}, [
|
|
505
|
+
}, [u.box, r]), u.ref);
|
|
506
506
|
return window.React.useMemo(function() {
|
|
507
507
|
return {
|
|
508
|
-
ref:
|
|
509
|
-
width:
|
|
510
|
-
height:
|
|
508
|
+
ref: c,
|
|
509
|
+
width: g.width,
|
|
510
|
+
height: g.height
|
|
511
511
|
};
|
|
512
|
-
}, [
|
|
512
|
+
}, [c, g.width, g.height]);
|
|
513
513
|
}
|
|
514
|
-
var
|
|
515
|
-
let
|
|
516
|
-
typeof navigator == "object" && (
|
|
517
|
-
const
|
|
518
|
-
class
|
|
514
|
+
var Ni = "allotment-module_splitView__L-yRc", Mi = "allotment-module_sashContainer__fzwJF", Pi = "allotment-module_splitViewContainer__rQnVa", ri = "allotment-module_splitViewView__MGZ6O", Ai = "allotment-module_vertical__WSwwa", Ci = "allotment-module_horizontal__7doS8", Ti = "allotment-module_separatorBorder__x-rDS";
|
|
515
|
+
let Fe, si = !1, oi = !1;
|
|
516
|
+
typeof navigator == "object" && (Fe = navigator.userAgent, oi = Fe.indexOf("Macintosh") >= 0, si = (Fe.indexOf("Macintosh") >= 0 || Fe.indexOf("iPad") >= 0 || Fe.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
|
|
517
|
+
const ai = si, Fi = oi, Gt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? window.React.useLayoutEffect : window.React.useEffect;
|
|
518
|
+
class ki {
|
|
519
519
|
constructor() {
|
|
520
520
|
this._size = void 0;
|
|
521
521
|
}
|
|
522
522
|
getSize() {
|
|
523
523
|
return this._size;
|
|
524
524
|
}
|
|
525
|
-
setSize(
|
|
526
|
-
this._size =
|
|
525
|
+
setSize(e) {
|
|
526
|
+
this._size = e;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
return
|
|
529
|
+
function it(u, e) {
|
|
530
|
+
const i = u.length, r = i - e.length;
|
|
531
|
+
return r >= 0 && u.slice(r, i) === e;
|
|
532
532
|
}
|
|
533
|
-
var
|
|
533
|
+
var Ut, Xt = {
|
|
534
534
|
exports: {}
|
|
535
|
-
},
|
|
536
|
-
var
|
|
537
|
-
function
|
|
538
|
-
}
|
|
539
|
-
function
|
|
540
|
-
this.fn =
|
|
541
|
-
}
|
|
542
|
-
function
|
|
543
|
-
if (typeof
|
|
544
|
-
var
|
|
545
|
-
return
|
|
546
|
-
}
|
|
547
|
-
function
|
|
548
|
-
--
|
|
549
|
-
}
|
|
550
|
-
function
|
|
551
|
-
this._events = new
|
|
552
|
-
}
|
|
553
|
-
Object.create && (
|
|
554
|
-
var
|
|
555
|
-
if (this._eventsCount === 0) return
|
|
556
|
-
for (
|
|
557
|
-
return Object.getOwnPropertySymbols ?
|
|
558
|
-
},
|
|
559
|
-
var
|
|
560
|
-
if (!
|
|
561
|
-
if (
|
|
562
|
-
for (var
|
|
563
|
-
return
|
|
564
|
-
},
|
|
565
|
-
var
|
|
566
|
-
return
|
|
567
|
-
},
|
|
568
|
-
var
|
|
569
|
-
if (!this._events[
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
switch (
|
|
535
|
+
}, Jt, Kt, $i = (Ut || (Ut = 1, (function(u) {
|
|
536
|
+
var e = Object.prototype.hasOwnProperty, i = "~";
|
|
537
|
+
function r() {
|
|
538
|
+
}
|
|
539
|
+
function l(n, o, c) {
|
|
540
|
+
this.fn = n, this.context = o, this.once = c || !1;
|
|
541
|
+
}
|
|
542
|
+
function m(n, o, c, a, y) {
|
|
543
|
+
if (typeof c != "function") throw new TypeError("The listener must be a function");
|
|
544
|
+
var w = new l(c, a || n, y), v = i ? i + o : o;
|
|
545
|
+
return n._events[v] ? n._events[v].fn ? n._events[v] = [n._events[v], w] : n._events[v].push(w) : (n._events[v] = w, n._eventsCount++), n;
|
|
546
|
+
}
|
|
547
|
+
function g(n, o) {
|
|
548
|
+
--n._eventsCount == 0 ? n._events = new r() : delete n._events[o];
|
|
549
|
+
}
|
|
550
|
+
function d() {
|
|
551
|
+
this._events = new r(), this._eventsCount = 0;
|
|
552
|
+
}
|
|
553
|
+
Object.create && (r.prototype = /* @__PURE__ */ Object.create(null), new r().__proto__ || (i = !1)), d.prototype.eventNames = function() {
|
|
554
|
+
var n, o, c = [];
|
|
555
|
+
if (this._eventsCount === 0) return c;
|
|
556
|
+
for (o in n = this._events) e.call(n, o) && c.push(i ? o.slice(1) : o);
|
|
557
|
+
return Object.getOwnPropertySymbols ? c.concat(Object.getOwnPropertySymbols(n)) : c;
|
|
558
|
+
}, d.prototype.listeners = function(n) {
|
|
559
|
+
var o = i ? i + n : n, c = this._events[o];
|
|
560
|
+
if (!c) return [];
|
|
561
|
+
if (c.fn) return [c.fn];
|
|
562
|
+
for (var a = 0, y = c.length, w = new Array(y); a < y; a++) w[a] = c[a].fn;
|
|
563
|
+
return w;
|
|
564
|
+
}, d.prototype.listenerCount = function(n) {
|
|
565
|
+
var o = i ? i + n : n, c = this._events[o];
|
|
566
|
+
return c ? c.fn ? 1 : c.length : 0;
|
|
567
|
+
}, d.prototype.emit = function(n, o, c, a, y, w) {
|
|
568
|
+
var v = i ? i + n : n;
|
|
569
|
+
if (!this._events[v]) return !1;
|
|
570
|
+
var z, S, p = this._events[v], b = arguments.length;
|
|
571
|
+
if (p.fn) {
|
|
572
|
+
switch (p.once && this.removeListener(n, p.fn, void 0, !0), b) {
|
|
573
573
|
case 1:
|
|
574
|
-
return
|
|
574
|
+
return p.fn.call(p.context), !0;
|
|
575
575
|
case 2:
|
|
576
|
-
return
|
|
576
|
+
return p.fn.call(p.context, o), !0;
|
|
577
577
|
case 3:
|
|
578
|
-
return
|
|
578
|
+
return p.fn.call(p.context, o, c), !0;
|
|
579
579
|
case 4:
|
|
580
|
-
return
|
|
580
|
+
return p.fn.call(p.context, o, c, a), !0;
|
|
581
581
|
case 5:
|
|
582
|
-
return
|
|
582
|
+
return p.fn.call(p.context, o, c, a, y), !0;
|
|
583
583
|
case 6:
|
|
584
|
-
return
|
|
584
|
+
return p.fn.call(p.context, o, c, a, y, w), !0;
|
|
585
585
|
}
|
|
586
|
-
for (
|
|
587
|
-
|
|
586
|
+
for (S = 1, z = new Array(b - 1); S < b; S++) z[S - 1] = arguments[S];
|
|
587
|
+
p.fn.apply(p.context, z);
|
|
588
588
|
} else {
|
|
589
|
-
var
|
|
590
|
-
for (
|
|
589
|
+
var I, E = p.length;
|
|
590
|
+
for (S = 0; S < E; S++) switch (p[S].once && this.removeListener(n, p[S].fn, void 0, !0), b) {
|
|
591
591
|
case 1:
|
|
592
|
-
S
|
|
592
|
+
p[S].fn.call(p[S].context);
|
|
593
593
|
break;
|
|
594
594
|
case 2:
|
|
595
|
-
S
|
|
595
|
+
p[S].fn.call(p[S].context, o);
|
|
596
596
|
break;
|
|
597
597
|
case 3:
|
|
598
|
-
S
|
|
598
|
+
p[S].fn.call(p[S].context, o, c);
|
|
599
599
|
break;
|
|
600
600
|
case 4:
|
|
601
|
-
S
|
|
601
|
+
p[S].fn.call(p[S].context, o, c, a);
|
|
602
602
|
break;
|
|
603
603
|
default:
|
|
604
|
-
if (!
|
|
605
|
-
S
|
|
604
|
+
if (!z) for (I = 1, z = new Array(b - 1); I < b; I++) z[I - 1] = arguments[I];
|
|
605
|
+
p[S].fn.apply(p[S].context, z);
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
return !0;
|
|
609
|
-
},
|
|
610
|
-
return
|
|
611
|
-
},
|
|
612
|
-
return
|
|
613
|
-
},
|
|
614
|
-
var y =
|
|
609
|
+
}, d.prototype.on = function(n, o, c) {
|
|
610
|
+
return m(this, n, o, c, !1);
|
|
611
|
+
}, d.prototype.once = function(n, o, c) {
|
|
612
|
+
return m(this, n, o, c, !0);
|
|
613
|
+
}, d.prototype.removeListener = function(n, o, c, a) {
|
|
614
|
+
var y = i ? i + n : n;
|
|
615
615
|
if (!this._events[y]) return this;
|
|
616
|
-
if (!
|
|
617
|
-
var
|
|
618
|
-
if (
|
|
616
|
+
if (!o) return g(this, y), this;
|
|
617
|
+
var w = this._events[y];
|
|
618
|
+
if (w.fn) w.fn !== o || a && !w.once || c && w.context !== c || g(this, y);
|
|
619
619
|
else {
|
|
620
|
-
for (var
|
|
621
|
-
|
|
620
|
+
for (var v = 0, z = [], S = w.length; v < S; v++) (w[v].fn !== o || a && !w[v].once || c && w[v].context !== c) && z.push(w[v]);
|
|
621
|
+
z.length ? this._events[y] = z.length === 1 ? z[0] : z : g(this, y);
|
|
622
622
|
}
|
|
623
623
|
return this;
|
|
624
|
-
},
|
|
625
|
-
var
|
|
626
|
-
return
|
|
627
|
-
},
|
|
628
|
-
})(
|
|
629
|
-
function
|
|
630
|
-
const
|
|
631
|
-
|
|
624
|
+
}, d.prototype.removeAllListeners = function(n) {
|
|
625
|
+
var o;
|
|
626
|
+
return n ? (o = i ? i + n : n, this._events[o] && g(this, o)) : (this._events = new r(), this._eventsCount = 0), this;
|
|
627
|
+
}, d.prototype.off = d.prototype.removeListener, d.prototype.addListener = d.prototype.on, d.prefixed = i, d.EventEmitter = d, u.exports = d;
|
|
628
|
+
})(Xt)), Xt.exports), bt = $e($i);
|
|
629
|
+
function Zt(u, e) {
|
|
630
|
+
const i = u.indexOf(e);
|
|
631
|
+
i > -1 && (u.splice(i, 1), u.unshift(e));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
const
|
|
635
|
-
|
|
633
|
+
function pt(u, e) {
|
|
634
|
+
const i = u.indexOf(e);
|
|
635
|
+
i > -1 && (u.splice(i, 1), u.push(e));
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
const
|
|
639
|
-
let
|
|
640
|
-
for (; ++
|
|
641
|
-
return
|
|
637
|
+
function te(u, e, i = 1) {
|
|
638
|
+
const r = Math.max(0, Math.ceil((e - u) / i)), l = new Array(r);
|
|
639
|
+
let m = -1;
|
|
640
|
+
for (; ++m < r; ) l[m] = u + m * i;
|
|
641
|
+
return l;
|
|
642
642
|
}
|
|
643
|
-
var
|
|
644
|
-
if (
|
|
645
|
-
|
|
646
|
-
var
|
|
647
|
-
return
|
|
643
|
+
var Hi = $e((function() {
|
|
644
|
+
if (Kt) return Jt;
|
|
645
|
+
Kt = 1;
|
|
646
|
+
var u = /^\s+|\s+$/g, e = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, r = /^0o[0-7]+$/i, l = parseInt, m = typeof _e == "object" && _e && _e.Object === Object && _e, g = typeof self == "object" && self && self.Object === Object && self, d = m || g || Function("return this")(), n = Object.prototype.toString, o = Math.max, c = Math.min, a = function() {
|
|
647
|
+
return d.Date.now();
|
|
648
648
|
};
|
|
649
|
-
function y(
|
|
650
|
-
var
|
|
651
|
-
return !!
|
|
652
|
-
}
|
|
653
|
-
function
|
|
654
|
-
if (typeof
|
|
655
|
-
if ((function(
|
|
656
|
-
return typeof
|
|
657
|
-
return !!
|
|
658
|
-
})(
|
|
659
|
-
})(
|
|
660
|
-
if (y(
|
|
661
|
-
var
|
|
662
|
-
|
|
649
|
+
function y(v) {
|
|
650
|
+
var z = typeof v;
|
|
651
|
+
return !!v && (z == "object" || z == "function");
|
|
652
|
+
}
|
|
653
|
+
function w(v) {
|
|
654
|
+
if (typeof v == "number") return v;
|
|
655
|
+
if ((function(p) {
|
|
656
|
+
return typeof p == "symbol" || /* @__PURE__ */ (function(b) {
|
|
657
|
+
return !!b && typeof b == "object";
|
|
658
|
+
})(p) && n.call(p) == "[object Symbol]";
|
|
659
|
+
})(v)) return NaN;
|
|
660
|
+
if (y(v)) {
|
|
661
|
+
var z = typeof v.valueOf == "function" ? v.valueOf() : v;
|
|
662
|
+
v = y(z) ? z + "" : z;
|
|
663
663
|
}
|
|
664
|
-
if (typeof
|
|
665
|
-
|
|
666
|
-
var
|
|
667
|
-
return
|
|
668
|
-
}
|
|
669
|
-
return
|
|
670
|
-
var
|
|
671
|
-
if (typeof
|
|
672
|
-
function
|
|
673
|
-
var
|
|
674
|
-
return
|
|
664
|
+
if (typeof v != "string") return v === 0 ? v : +v;
|
|
665
|
+
v = v.replace(u, "");
|
|
666
|
+
var S = i.test(v);
|
|
667
|
+
return S || r.test(v) ? l(v.slice(2), S ? 2 : 8) : e.test(v) ? NaN : +v;
|
|
668
|
+
}
|
|
669
|
+
return Jt = function(v, z, S) {
|
|
670
|
+
var p, b, I, E, C, X, h = 0, L = !1, K = !1, F = !0;
|
|
671
|
+
if (typeof v != "function") throw new TypeError("Expected a function");
|
|
672
|
+
function oe(N) {
|
|
673
|
+
var A = p, W = b;
|
|
674
|
+
return p = b = void 0, h = N, E = v.apply(W, A);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
var
|
|
678
|
-
return
|
|
676
|
+
function O(N) {
|
|
677
|
+
var A = N - X;
|
|
678
|
+
return X === void 0 || A >= z || A < 0 || K && N - h >= I;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
var
|
|
682
|
-
if (
|
|
683
|
-
|
|
684
|
-
var
|
|
685
|
-
return
|
|
686
|
-
})(
|
|
680
|
+
function D() {
|
|
681
|
+
var N = a();
|
|
682
|
+
if (O(N)) return k(N);
|
|
683
|
+
C = setTimeout(D, (function(A) {
|
|
684
|
+
var W = z - (A - X);
|
|
685
|
+
return K ? c(W, I - (A - h)) : W;
|
|
686
|
+
})(N));
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function k(N) {
|
|
689
|
+
return C = void 0, F && p ? oe(N) : (p = b = void 0, E);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
var
|
|
693
|
-
if (
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
696
|
-
})(
|
|
697
|
-
if (
|
|
691
|
+
function R() {
|
|
692
|
+
var N = a(), A = O(N);
|
|
693
|
+
if (p = arguments, b = this, X = N, A) {
|
|
694
|
+
if (C === void 0) return (function(W) {
|
|
695
|
+
return h = W, C = setTimeout(D, z), L ? oe(W) : E;
|
|
696
|
+
})(X);
|
|
697
|
+
if (K) return C = setTimeout(D, z), oe(X);
|
|
698
698
|
}
|
|
699
|
-
return
|
|
699
|
+
return C === void 0 && (C = setTimeout(D, z)), E;
|
|
700
700
|
}
|
|
701
|
-
return
|
|
702
|
-
|
|
703
|
-
},
|
|
704
|
-
return
|
|
705
|
-
},
|
|
701
|
+
return z = w(z) || 0, y(S) && (L = !!S.leading, I = (K = "maxWait" in S) ? o(w(S.maxWait) || 0, z) : I, F = "trailing" in S ? !!S.trailing : F), R.cancel = function() {
|
|
702
|
+
C !== void 0 && clearTimeout(C), h = 0, p = X = b = C = void 0;
|
|
703
|
+
}, R.flush = function() {
|
|
704
|
+
return C === void 0 ? E : k(a());
|
|
705
|
+
}, R;
|
|
706
706
|
};
|
|
707
|
-
})()),
|
|
708
|
-
let
|
|
709
|
-
return
|
|
710
|
-
})({}),
|
|
711
|
-
return
|
|
712
|
-
})({}),
|
|
713
|
-
const
|
|
714
|
-
class
|
|
707
|
+
})()), Yi = "sash-module_sash__K-9lB", Bi = "sash-module_disabled__Hm-wx", Wi = "sash-module_mac__Jf6OJ", Qt = "sash-module_vertical__pB-rs", Gi = "sash-module_minimum__-UKxp", Ui = "sash-module_maximum__TCWxD", qt = "sash-module_horizontal__kFbiw", wt = "sash-module_hover__80W6I", yt = "sash-module_active__bJspD";
|
|
708
|
+
let ne = (function(u) {
|
|
709
|
+
return u.Vertical = "VERTICAL", u.Horizontal = "HORIZONTAL", u;
|
|
710
|
+
})({}), q = (function(u) {
|
|
711
|
+
return u.Disabled = "DISABLED", u.Minimum = "MINIMUM", u.Maximum = "MAXIMUM", u.Enabled = "ENABLED", u;
|
|
712
|
+
})({}), ui = ai ? 20 : 8;
|
|
713
|
+
const li = new bt();
|
|
714
|
+
class ei extends bt {
|
|
715
715
|
get state() {
|
|
716
716
|
return this._state;
|
|
717
717
|
}
|
|
718
|
-
set state(
|
|
719
|
-
this._state !==
|
|
720
|
-
}
|
|
721
|
-
constructor(
|
|
722
|
-
var
|
|
723
|
-
super(), this.el = void 0, this.layoutProvider = void 0, this.orientation = void 0, this.size = void 0, this.hoverDelay = 300, this.hoverDelayer =
|
|
724
|
-
const
|
|
725
|
-
startX:
|
|
726
|
-
currentX:
|
|
727
|
-
startY:
|
|
728
|
-
currentY:
|
|
718
|
+
set state(e) {
|
|
719
|
+
this._state !== e && (this.el.classList.toggle(Bi, e === q.Disabled), this.el.classList.toggle("sash-disabled", e === q.Disabled), this.el.classList.toggle(Gi, e === q.Minimum), this.el.classList.toggle("sash-minimum", e === q.Minimum), this.el.classList.toggle(Ui, e === q.Maximum), this.el.classList.toggle("sash-maximum", e === q.Maximum), this._state = e, this.emit("enablementChange", e));
|
|
720
|
+
}
|
|
721
|
+
constructor(e, i, r) {
|
|
722
|
+
var l;
|
|
723
|
+
super(), this.el = void 0, this.layoutProvider = void 0, this.orientation = void 0, this.size = void 0, this.hoverDelay = 300, this.hoverDelayer = Hi((m) => m.classList.add("sash-hover", wt), this.hoverDelay), this._state = q.Enabled, this.onPointerStart = (m) => {
|
|
724
|
+
const g = m.pageX, d = m.pageY, n = {
|
|
725
|
+
startX: g,
|
|
726
|
+
currentX: g,
|
|
727
|
+
startY: d,
|
|
728
|
+
currentY: d
|
|
729
729
|
};
|
|
730
|
-
this.el.classList.add("sash-active",
|
|
731
|
-
const
|
|
732
|
-
|
|
730
|
+
this.el.classList.add("sash-active", yt), this.emit("start", n), this.el.setPointerCapture(m.pointerId);
|
|
731
|
+
const o = (a) => {
|
|
732
|
+
a.preventDefault();
|
|
733
733
|
const y = {
|
|
734
|
-
startX:
|
|
735
|
-
currentX:
|
|
736
|
-
startY:
|
|
737
|
-
currentY:
|
|
734
|
+
startX: g,
|
|
735
|
+
currentX: a.pageX,
|
|
736
|
+
startY: d,
|
|
737
|
+
currentY: a.pageY
|
|
738
738
|
};
|
|
739
739
|
this.emit("change", y);
|
|
740
|
-
},
|
|
741
|
-
|
|
740
|
+
}, c = (a) => {
|
|
741
|
+
a.preventDefault(), this.el.classList.remove("sash-active", yt), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(a.pointerId), window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", c);
|
|
742
742
|
};
|
|
743
|
-
window.addEventListener("pointermove",
|
|
743
|
+
window.addEventListener("pointermove", o), window.addEventListener("pointerup", c);
|
|
744
744
|
}, this.onPointerDoublePress = () => {
|
|
745
745
|
this.emit("reset");
|
|
746
746
|
}, this.onMouseEnter = () => {
|
|
747
|
-
this.el.classList.contains(
|
|
747
|
+
this.el.classList.contains(yt) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", wt)) : this.hoverDelayer(this.el);
|
|
748
748
|
}, this.onMouseLeave = () => {
|
|
749
|
-
this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover",
|
|
750
|
-
}, this.el = document.createElement("div"), this.el.classList.add("sash",
|
|
751
|
-
this.size =
|
|
752
|
-
})), this.layoutProvider =
|
|
749
|
+
this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", wt);
|
|
750
|
+
}, this.el = document.createElement("div"), this.el.classList.add("sash", Yi), this.el.dataset.testid = "sash", e.append(this.el), Fi && this.el.classList.add("sash-mac", Wi), this.el.addEventListener("pointerdown", this.onPointerStart), this.el.addEventListener("dblclick", this.onPointerDoublePress), this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("mouseleave", this.onMouseLeave), typeof r.size == "number" ? (this.size = r.size, r.orientation === ne.Vertical ? this.el.style.width = `${this.size}px` : this.el.style.height = `${this.size}px`) : (this.size = ui, li.on("onDidChangeGlobalSize", (m) => {
|
|
751
|
+
this.size = m, this.layout();
|
|
752
|
+
})), this.layoutProvider = i, this.orientation = (l = r.orientation) != null ? l : ne.Vertical, this.orientation === ne.Horizontal ? (this.el.classList.add("sash-horizontal", qt), this.el.classList.remove("sash-vertical", Qt)) : (this.el.classList.remove("sash-horizontal", qt), this.el.classList.add("sash-vertical", Qt)), this.layout();
|
|
753
753
|
}
|
|
754
754
|
layout() {
|
|
755
|
-
if (this.orientation ===
|
|
756
|
-
const
|
|
757
|
-
this.el.style.left =
|
|
755
|
+
if (this.orientation === ne.Vertical) {
|
|
756
|
+
const e = this.layoutProvider;
|
|
757
|
+
this.el.style.left = e.getVerticalSashLeft(this) - this.size / 2 + "px", e.getVerticalSashTop && (this.el.style.top = e.getVerticalSashTop(this) + "px"), e.getVerticalSashHeight && (this.el.style.height = e.getVerticalSashHeight(this) + "px");
|
|
758
758
|
} else {
|
|
759
|
-
const
|
|
760
|
-
this.el.style.top =
|
|
759
|
+
const e = this.layoutProvider;
|
|
760
|
+
this.el.style.top = e.getHorizontalSashTop(this) - this.size / 2 + "px", e.getHorizontalSashLeft && (this.el.style.left = e.getHorizontalSashLeft(this) + "px"), e.getHorizontalSashWidth && (this.el.style.width = e.getHorizontalSashWidth(this) + "px");
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
dispose() {
|
|
764
764
|
this.el.removeEventListener("pointerdown", this.onPointerStart), this.el.removeEventListener("dblclick", this.onPointerDoublePress), this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("mouseleave", () => this.onMouseLeave), this.el.remove();
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
let
|
|
768
|
-
var
|
|
769
|
-
(
|
|
767
|
+
let rt;
|
|
768
|
+
var gt;
|
|
769
|
+
(gt = rt || (rt = {})).Distribute = {
|
|
770
770
|
type: "distribute"
|
|
771
|
-
},
|
|
771
|
+
}, gt.Split = function(u) {
|
|
772
772
|
return {
|
|
773
773
|
type: "split",
|
|
774
|
-
index:
|
|
774
|
+
index: u
|
|
775
775
|
};
|
|
776
|
-
},
|
|
776
|
+
}, gt.Invisible = function(u) {
|
|
777
777
|
return {
|
|
778
778
|
type: "invisible",
|
|
779
|
-
cachedVisibleSize:
|
|
779
|
+
cachedVisibleSize: u
|
|
780
780
|
};
|
|
781
781
|
};
|
|
782
|
-
let
|
|
783
|
-
return
|
|
782
|
+
let ie = (function(u) {
|
|
783
|
+
return u.Normal = "NORMAL", u.Low = "LOW", u.High = "HIGH", u;
|
|
784
784
|
})({});
|
|
785
|
-
class
|
|
786
|
-
constructor(
|
|
787
|
-
this.container = void 0, this.view = void 0, this._size = void 0, this._cachedVisibleSize = void 0, this.container =
|
|
785
|
+
class ci {
|
|
786
|
+
constructor(e, i, r) {
|
|
787
|
+
this.container = void 0, this.view = void 0, this._size = void 0, this._cachedVisibleSize = void 0, this.container = e, this.view = i, this.container.classList.add("split-view-view", ri), this.container.dataset.testid = "split-view-view", typeof r == "number" ? (this._size = r, this._cachedVisibleSize = void 0, e.classList.add("split-view-view-visible")) : (this._size = 0, this._cachedVisibleSize = r.cachedVisibleSize);
|
|
788
788
|
}
|
|
789
|
-
set size(
|
|
790
|
-
this._size =
|
|
789
|
+
set size(e) {
|
|
790
|
+
this._size = e;
|
|
791
791
|
}
|
|
792
792
|
get size() {
|
|
793
793
|
return this._size;
|
|
@@ -804,8 +804,8 @@ class Gr {
|
|
|
804
804
|
get visible() {
|
|
805
805
|
return this._cachedVisibleSize === void 0;
|
|
806
806
|
}
|
|
807
|
-
setVisible(
|
|
808
|
-
|
|
807
|
+
setVisible(e, i) {
|
|
808
|
+
e !== this.visible && (e ? (this.size = se(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = typeof i == "number" ? i : this.size, this.size = 0), this.container.classList.toggle("split-view-view-visible", e), this.view.setVisible && this.view.setVisible(e));
|
|
809
809
|
}
|
|
810
810
|
get minimumSize() {
|
|
811
811
|
return this.visible ? this.view.minimumSize : 0;
|
|
@@ -819,1814 +819,576 @@ class Gr {
|
|
|
819
819
|
get viewMaximumSize() {
|
|
820
820
|
return this.view.maximumSize;
|
|
821
821
|
}
|
|
822
|
-
set enabled(
|
|
823
|
-
this.container.style.pointerEvents =
|
|
822
|
+
set enabled(e) {
|
|
823
|
+
this.container.style.pointerEvents = e ? "" : "none";
|
|
824
824
|
}
|
|
825
|
-
layout(
|
|
826
|
-
this.layoutContainer(
|
|
825
|
+
layout(e) {
|
|
826
|
+
this.layoutContainer(e), this.view.layout(this.size, e);
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
-
class
|
|
830
|
-
layoutContainer(
|
|
831
|
-
this.container.style.left = `${
|
|
829
|
+
class Xi extends ci {
|
|
830
|
+
layoutContainer(e) {
|
|
831
|
+
this.container.style.left = `${e}px`, this.container.style.width = `${this.size}px`;
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
|
-
class
|
|
835
|
-
layoutContainer(
|
|
836
|
-
this.container.style.top = `${
|
|
834
|
+
class Ji extends ci {
|
|
835
|
+
layoutContainer(e) {
|
|
836
|
+
this.container.style.top = `${e}px`, this.container.style.height = `${this.size}px`;
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
class
|
|
839
|
+
class Ki extends bt {
|
|
840
840
|
get startSnappingEnabled() {
|
|
841
841
|
return this._startSnappingEnabled;
|
|
842
842
|
}
|
|
843
|
-
set startSnappingEnabled(
|
|
844
|
-
this._startSnappingEnabled !==
|
|
843
|
+
set startSnappingEnabled(e) {
|
|
844
|
+
this._startSnappingEnabled !== e && (this._startSnappingEnabled = e, this.updateSashEnablement());
|
|
845
845
|
}
|
|
846
846
|
get endSnappingEnabled() {
|
|
847
847
|
return this._endSnappingEnabled;
|
|
848
848
|
}
|
|
849
|
-
set endSnappingEnabled(
|
|
850
|
-
this._endSnappingEnabled !==
|
|
851
|
-
}
|
|
852
|
-
constructor(
|
|
853
|
-
var
|
|
854
|
-
if (super(), this.onDidChange = void 0, this.onDidDragStart = void 0, this.onDidDragEnd = void 0, this.orientation = void 0, this.sashContainer = void 0, this.size = 0, this.contentSize = 0, this.proportions = void 0, this.viewItems = [], this.sashItems = [], this.sashDragState = void 0, this.proportionalLayout = void 0, this.getSashOrthogonalSize = void 0, this._startSnappingEnabled = !0, this._endSnappingEnabled = !0, this.onSashEnd = (
|
|
855
|
-
this.emit("sashchange",
|
|
856
|
-
for (const
|
|
857
|
-
}, this.orientation = (
|
|
858
|
-
this.size =
|
|
859
|
-
for (const [
|
|
860
|
-
const
|
|
861
|
-
this.addView(
|
|
849
|
+
set endSnappingEnabled(e) {
|
|
850
|
+
this._endSnappingEnabled !== e && (this._endSnappingEnabled = e, this.updateSashEnablement());
|
|
851
|
+
}
|
|
852
|
+
constructor(e, i = {}, r, l, m) {
|
|
853
|
+
var g, d;
|
|
854
|
+
if (super(), this.onDidChange = void 0, this.onDidDragStart = void 0, this.onDidDragEnd = void 0, this.orientation = void 0, this.sashContainer = void 0, this.size = 0, this.contentSize = 0, this.proportions = void 0, this.viewItems = [], this.sashItems = [], this.sashDragState = void 0, this.proportionalLayout = void 0, this.getSashOrthogonalSize = void 0, this._startSnappingEnabled = !0, this._endSnappingEnabled = !0, this.onSashEnd = (n) => {
|
|
855
|
+
this.emit("sashchange", n), this.saveProportions();
|
|
856
|
+
for (const o of this.viewItems) o.enabled = !0;
|
|
857
|
+
}, this.orientation = (g = i.orientation) != null ? g : ne.Vertical, this.proportionalLayout = (d = i.proportionalLayout) != null ? d : !0, this.getSashOrthogonalSize = i.getSashOrthogonalSize, r && (this.onDidChange = r), l && (this.onDidDragStart = l), m && (this.onDidDragEnd = m), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", Mi), e.prepend(this.sashContainer), i.descriptor) {
|
|
858
|
+
this.size = i.descriptor.size;
|
|
859
|
+
for (const [n, o] of i.descriptor.views.entries()) {
|
|
860
|
+
const c = o.size, a = o.container, y = o.view;
|
|
861
|
+
this.addView(a, y, c, n, !0);
|
|
862
862
|
}
|
|
863
|
-
this.contentSize = this.viewItems.reduce((
|
|
863
|
+
this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0), this.saveProportions();
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
addView(
|
|
867
|
-
let
|
|
868
|
-
|
|
869
|
-
cachedVisibleSize:
|
|
870
|
-
} :
|
|
871
|
-
const
|
|
872
|
-
if (this.viewItems.splice(
|
|
873
|
-
const
|
|
874
|
-
getHorizontalSashTop: (
|
|
866
|
+
addView(e, i, r, l = this.viewItems.length, m) {
|
|
867
|
+
let g;
|
|
868
|
+
g = typeof r == "number" ? r : r.type === "split" ? this.getViewSize(r.index) / 2 : r.type === "invisible" ? {
|
|
869
|
+
cachedVisibleSize: r.cachedVisibleSize
|
|
870
|
+
} : i.minimumSize;
|
|
871
|
+
const d = this.orientation === ne.Vertical ? new Ji(e, i, g) : new Xi(e, i, g);
|
|
872
|
+
if (this.viewItems.splice(l, 0, d), this.viewItems.length > 1) {
|
|
873
|
+
const n = this.orientation === ne.Vertical ? new ei(this.sashContainer, {
|
|
874
|
+
getHorizontalSashTop: (a) => this.getSashPosition(a),
|
|
875
875
|
getHorizontalSashWidth: this.getSashOrthogonalSize
|
|
876
876
|
}, {
|
|
877
|
-
orientation:
|
|
878
|
-
}) : new
|
|
879
|
-
getVerticalSashLeft: (
|
|
877
|
+
orientation: ne.Horizontal
|
|
878
|
+
}) : new ei(this.sashContainer, {
|
|
879
|
+
getVerticalSashLeft: (a) => this.getSashPosition(a),
|
|
880
880
|
getVerticalSashHeight: this.getSashOrthogonalSize
|
|
881
881
|
}, {
|
|
882
|
-
orientation:
|
|
883
|
-
}),
|
|
884
|
-
sash:
|
|
885
|
-
start:
|
|
886
|
-
current:
|
|
887
|
-
}) : (
|
|
888
|
-
sash:
|
|
889
|
-
start:
|
|
890
|
-
current:
|
|
882
|
+
orientation: ne.Vertical
|
|
883
|
+
}), o = this.orientation === ne.Vertical ? (a) => ({
|
|
884
|
+
sash: n,
|
|
885
|
+
start: a.startY,
|
|
886
|
+
current: a.currentY
|
|
887
|
+
}) : (a) => ({
|
|
888
|
+
sash: n,
|
|
889
|
+
start: a.startX,
|
|
890
|
+
current: a.currentX
|
|
891
891
|
});
|
|
892
|
-
|
|
892
|
+
n.on("start", (a) => {
|
|
893
893
|
var y;
|
|
894
|
-
this.emit("sashDragStart"), this.onSashStart(
|
|
895
|
-
const
|
|
896
|
-
(y = this.onDidDragStart) == null || y.call(this,
|
|
897
|
-
}),
|
|
898
|
-
var
|
|
899
|
-
this.emit("sashDragEnd"), this.onSashEnd(this.sashItems.findIndex((
|
|
900
|
-
const y = this.viewItems.map((
|
|
901
|
-
(
|
|
902
|
-
}),
|
|
903
|
-
const
|
|
904
|
-
(typeof
|
|
894
|
+
this.emit("sashDragStart"), this.onSashStart(o(a));
|
|
895
|
+
const w = this.viewItems.map((v) => v.size);
|
|
896
|
+
(y = this.onDidDragStart) == null || y.call(this, w);
|
|
897
|
+
}), n.on("change", (a) => this.onSashChange(o(a))), n.on("end", () => {
|
|
898
|
+
var a;
|
|
899
|
+
this.emit("sashDragEnd"), this.onSashEnd(this.sashItems.findIndex((w) => w.sash === n));
|
|
900
|
+
const y = this.viewItems.map((w) => w.size);
|
|
901
|
+
(a = this.onDidDragEnd) == null || a.call(this, y);
|
|
902
|
+
}), n.on("reset", () => {
|
|
903
|
+
const a = this.sashItems.findIndex((S) => S.sash === n), y = te(a, -1, -1), w = te(a + 1, this.viewItems.length), v = this.findFirstSnapIndex(y), z = this.findFirstSnapIndex(w);
|
|
904
|
+
(typeof v != "number" || this.viewItems[v].visible) && (typeof z != "number" || this.viewItems[z].visible) && this.emit("sashreset", a);
|
|
905
905
|
});
|
|
906
|
-
const
|
|
907
|
-
sash:
|
|
906
|
+
const c = {
|
|
907
|
+
sash: n
|
|
908
908
|
};
|
|
909
|
-
this.sashItems.splice(
|
|
909
|
+
this.sashItems.splice(l - 1, 0, c);
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
m || this.relayout(), m || typeof r == "number" || r.type !== "distribute" || this.distributeViewSizes();
|
|
912
912
|
}
|
|
913
|
-
removeView(
|
|
914
|
-
if (
|
|
915
|
-
const
|
|
913
|
+
removeView(e, i) {
|
|
914
|
+
if (e < 0 || e >= this.viewItems.length) throw new Error("Index out of bounds");
|
|
915
|
+
const r = this.viewItems.splice(e, 1)[0].view;
|
|
916
916
|
if (this.viewItems.length >= 1) {
|
|
917
|
-
const
|
|
918
|
-
this.sashItems.splice(
|
|
917
|
+
const l = Math.max(e - 1, 0);
|
|
918
|
+
this.sashItems.splice(l, 1)[0].sash.dispose();
|
|
919
919
|
}
|
|
920
|
-
return this.relayout(),
|
|
920
|
+
return this.relayout(), i && i.type === "distribute" && this.distributeViewSizes(), r;
|
|
921
921
|
}
|
|
922
|
-
moveView(
|
|
923
|
-
const
|
|
924
|
-
this.addView(
|
|
922
|
+
moveView(e, i, r) {
|
|
923
|
+
const l = this.getViewCachedVisibleSize(i), m = l === void 0 ? this.getViewSize(i) : rt.Invisible(l), g = this.removeView(i);
|
|
924
|
+
this.addView(e, g, m, r);
|
|
925
925
|
}
|
|
926
|
-
getViewCachedVisibleSize(
|
|
927
|
-
if (
|
|
928
|
-
return this.viewItems[
|
|
926
|
+
getViewCachedVisibleSize(e) {
|
|
927
|
+
if (e < 0 || e >= this.viewItems.length) throw new Error("Index out of bounds");
|
|
928
|
+
return this.viewItems[e].cachedVisibleSize;
|
|
929
929
|
}
|
|
930
|
-
layout(
|
|
931
|
-
const
|
|
932
|
-
if (this.size =
|
|
933
|
-
const
|
|
934
|
-
|
|
930
|
+
layout(e = this.size) {
|
|
931
|
+
const i = Math.max(this.size, this.contentSize);
|
|
932
|
+
if (this.size = e, this.proportions) for (let r = 0; r < this.viewItems.length; r++) {
|
|
933
|
+
const l = this.viewItems[r];
|
|
934
|
+
l.size = se(Math.round(this.proportions[r] * e), l.minimumSize, l.maximumSize);
|
|
935
935
|
}
|
|
936
936
|
else {
|
|
937
|
-
const
|
|
938
|
-
this.resize(this.viewItems.length - 1,
|
|
937
|
+
const r = te(0, this.viewItems.length), l = r.filter((g) => this.viewItems[g].priority === ie.Low), m = r.filter((g) => this.viewItems[g].priority === ie.High);
|
|
938
|
+
this.resize(this.viewItems.length - 1, e - i, void 0, l, m);
|
|
939
939
|
}
|
|
940
940
|
this.distributeEmptySpace(), this.layoutViews();
|
|
941
941
|
}
|
|
942
|
-
resizeView(
|
|
943
|
-
if (
|
|
944
|
-
const
|
|
945
|
-
|
|
942
|
+
resizeView(e, i) {
|
|
943
|
+
if (e < 0 || e >= this.viewItems.length) return;
|
|
944
|
+
const r = te(0, this.viewItems.length).filter((d) => d !== e), l = [...r.filter((d) => this.viewItems[d].priority === ie.Low), e], m = r.filter((d) => this.viewItems[d].priority === ie.High), g = this.viewItems[e];
|
|
945
|
+
i = Math.round(i), i = se(i, g.minimumSize, Math.min(g.maximumSize, this.size)), g.size = i, this.relayout(l, m);
|
|
946
946
|
}
|
|
947
|
-
resizeViews(
|
|
948
|
-
for (let
|
|
949
|
-
const
|
|
950
|
-
let
|
|
951
|
-
|
|
947
|
+
resizeViews(e) {
|
|
948
|
+
for (let i = 0; i < e.length; i++) {
|
|
949
|
+
const r = this.viewItems[i];
|
|
950
|
+
let l = e[i];
|
|
951
|
+
l = Math.round(l), l = se(l, r.minimumSize, Math.min(r.maximumSize, this.size)), r.size = l;
|
|
952
952
|
}
|
|
953
|
-
this.contentSize = this.viewItems.reduce((
|
|
953
|
+
this.contentSize = this.viewItems.reduce((i, r) => i + r.size, 0), this.saveProportions(), this.layout(this.size);
|
|
954
954
|
}
|
|
955
|
-
getViewSize(
|
|
956
|
-
return
|
|
955
|
+
getViewSize(e) {
|
|
956
|
+
return e < 0 || e >= this.viewItems.length ? -1 : this.viewItems[e].size;
|
|
957
957
|
}
|
|
958
|
-
isViewVisible(
|
|
959
|
-
if (
|
|
960
|
-
return this.viewItems[
|
|
958
|
+
isViewVisible(e) {
|
|
959
|
+
if (e < 0 || e >= this.viewItems.length) throw new Error("Index out of bounds");
|
|
960
|
+
return this.viewItems[e].visible;
|
|
961
961
|
}
|
|
962
|
-
setViewVisible(
|
|
963
|
-
if (
|
|
964
|
-
this.viewItems[
|
|
962
|
+
setViewVisible(e, i) {
|
|
963
|
+
if (e < 0 || e >= this.viewItems.length) throw new Error("Index out of bounds");
|
|
964
|
+
this.viewItems[e].setVisible(i), this.distributeEmptySpace(e), this.layoutViews(), this.saveProportions();
|
|
965
965
|
}
|
|
966
966
|
distributeViewSizes() {
|
|
967
|
-
const
|
|
968
|
-
let
|
|
969
|
-
for (const
|
|
970
|
-
const
|
|
971
|
-
for (const
|
|
972
|
-
const
|
|
973
|
-
this.relayout(
|
|
967
|
+
const e = [];
|
|
968
|
+
let i = 0;
|
|
969
|
+
for (const d of this.viewItems) d.maximumSize - d.minimumSize > 0 && (e.push(d), i += d.size);
|
|
970
|
+
const r = Math.floor(i / e.length);
|
|
971
|
+
for (const d of e) d.size = se(r, d.minimumSize, d.maximumSize);
|
|
972
|
+
const l = te(0, this.viewItems.length), m = l.filter((d) => this.viewItems[d].priority === ie.Low), g = l.filter((d) => this.viewItems[d].priority === ie.High);
|
|
973
|
+
this.relayout(m, g);
|
|
974
974
|
}
|
|
975
975
|
dispose() {
|
|
976
|
-
this.sashItems.forEach((
|
|
976
|
+
this.sashItems.forEach((e) => e.sash.dispose()), this.sashItems = [], this.sashContainer.remove();
|
|
977
977
|
}
|
|
978
|
-
relayout(
|
|
979
|
-
const
|
|
980
|
-
this.resize(this.viewItems.length - 1, this.size -
|
|
978
|
+
relayout(e, i) {
|
|
979
|
+
const r = this.viewItems.reduce((l, m) => l + m.size, 0);
|
|
980
|
+
this.resize(this.viewItems.length - 1, this.size - r, void 0, e, i), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
|
|
981
981
|
}
|
|
982
982
|
onSashStart({
|
|
983
|
-
sash:
|
|
984
|
-
start:
|
|
983
|
+
sash: e,
|
|
984
|
+
start: i
|
|
985
985
|
}) {
|
|
986
|
-
const
|
|
987
|
-
((
|
|
988
|
-
const
|
|
989
|
-
let
|
|
990
|
-
const
|
|
991
|
-
|
|
992
|
-
const
|
|
993
|
-
if (typeof N == "number") {
|
|
994
|
-
const P = this.viewItems[N], l = Math.floor(P.viewMinimumSize / 2);
|
|
995
|
-
E = {
|
|
996
|
-
index: N,
|
|
997
|
-
limitDelta: P.visible ? i - l : i + l,
|
|
998
|
-
size: P.size
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
986
|
+
const r = this.sashItems.findIndex((l) => l.sash === e);
|
|
987
|
+
((l) => {
|
|
988
|
+
const m = this.viewItems.map((b) => b.size);
|
|
989
|
+
let g, d, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY;
|
|
990
|
+
const c = te(r, -1, -1), a = te(r + 1, this.viewItems.length), y = c.reduce((b, I) => b + (this.viewItems[I].minimumSize - m[I]), 0), w = c.reduce((b, I) => b + (this.viewItems[I].viewMaximumSize - m[I]), 0), v = a.length === 0 ? Number.POSITIVE_INFINITY : a.reduce((b, I) => b + (m[I] - this.viewItems[I].minimumSize), 0), z = a.length === 0 ? Number.NEGATIVE_INFINITY : a.reduce((b, I) => b + (m[I] - this.viewItems[I].viewMaximumSize), 0);
|
|
991
|
+
n = Math.max(y, z), o = Math.min(v, w);
|
|
992
|
+
const S = this.findFirstSnapIndex(c), p = this.findFirstSnapIndex(a);
|
|
1001
993
|
if (typeof S == "number") {
|
|
1002
|
-
const
|
|
994
|
+
const b = this.viewItems[S], I = Math.floor(b.viewMinimumSize / 2);
|
|
1003
995
|
g = {
|
|
1004
996
|
index: S,
|
|
1005
|
-
limitDelta:
|
|
1006
|
-
size:
|
|
997
|
+
limitDelta: b.visible ? n - I : n + I,
|
|
998
|
+
size: b.size
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
if (typeof p == "number") {
|
|
1002
|
+
const b = this.viewItems[p], I = Math.floor(b.viewMinimumSize / 2);
|
|
1003
|
+
d = {
|
|
1004
|
+
index: p,
|
|
1005
|
+
limitDelta: b.visible ? o + I : o - I,
|
|
1006
|
+
size: b.size
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
1009
|
this.sashDragState = {
|
|
1010
|
-
start:
|
|
1011
|
-
current:
|
|
1012
|
-
index:
|
|
1013
|
-
sizes:
|
|
1014
|
-
minDelta:
|
|
1015
|
-
maxDelta:
|
|
1016
|
-
snapBefore:
|
|
1017
|
-
snapAfter:
|
|
1010
|
+
start: l,
|
|
1011
|
+
current: l,
|
|
1012
|
+
index: r,
|
|
1013
|
+
sizes: m,
|
|
1014
|
+
minDelta: n,
|
|
1015
|
+
maxDelta: o,
|
|
1016
|
+
snapBefore: g,
|
|
1017
|
+
snapAfter: d
|
|
1018
1018
|
};
|
|
1019
|
-
})(
|
|
1019
|
+
})(i);
|
|
1020
1020
|
}
|
|
1021
1021
|
onSashChange({
|
|
1022
|
-
current:
|
|
1022
|
+
current: e
|
|
1023
1023
|
}) {
|
|
1024
1024
|
const {
|
|
1025
|
-
index:
|
|
1026
|
-
start:
|
|
1027
|
-
sizes:
|
|
1028
|
-
minDelta:
|
|
1029
|
-
maxDelta:
|
|
1030
|
-
snapBefore:
|
|
1031
|
-
snapAfter:
|
|
1025
|
+
index: i,
|
|
1026
|
+
start: r,
|
|
1027
|
+
sizes: l,
|
|
1028
|
+
minDelta: m,
|
|
1029
|
+
maxDelta: g,
|
|
1030
|
+
snapBefore: d,
|
|
1031
|
+
snapAfter: n
|
|
1032
1032
|
} = this.sashDragState;
|
|
1033
|
-
this.sashDragState.current =
|
|
1034
|
-
const
|
|
1035
|
-
this.resize(
|
|
1033
|
+
this.sashDragState.current = e;
|
|
1034
|
+
const o = e - r;
|
|
1035
|
+
this.resize(i, o, l, void 0, void 0, m, g, d, n), this.distributeEmptySpace(), this.layoutViews();
|
|
1036
1036
|
}
|
|
1037
|
-
getSashPosition(
|
|
1038
|
-
let
|
|
1039
|
-
for (let
|
|
1037
|
+
getSashPosition(e) {
|
|
1038
|
+
let i = 0;
|
|
1039
|
+
for (let r = 0; r < this.sashItems.length; r++) if (i += this.viewItems[r].size, this.sashItems[r].sash === e) return i;
|
|
1040
1040
|
return 0;
|
|
1041
1041
|
}
|
|
1042
|
-
resize(
|
|
1043
|
-
if (
|
|
1044
|
-
const
|
|
1045
|
-
if (
|
|
1046
|
-
if (
|
|
1047
|
-
const y =
|
|
1048
|
-
let
|
|
1049
|
-
if (
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1042
|
+
resize(e, i, r = this.viewItems.map((c) => c.size), l, m, g = Number.NEGATIVE_INFINITY, d = Number.POSITIVE_INFINITY, n, o) {
|
|
1043
|
+
if (e < 0 || e >= this.viewItems.length) return 0;
|
|
1044
|
+
const c = te(e, -1, -1), a = te(e + 1, this.viewItems.length);
|
|
1045
|
+
if (m) for (const h of m) Zt(c, h), Zt(a, h);
|
|
1046
|
+
if (l) for (const h of l) pt(c, h), pt(a, h);
|
|
1047
|
+
const y = c.map((h) => this.viewItems[h]), w = c.map((h) => r[h]), v = a.map((h) => this.viewItems[h]), z = a.map((h) => r[h]), S = c.reduce((h, L) => h + (this.viewItems[L].minimumSize - r[L]), 0), p = c.reduce((h, L) => h + (this.viewItems[L].maximumSize - r[L]), 0), b = a.length === 0 ? Number.POSITIVE_INFINITY : a.reduce((h, L) => h + (r[L] - this.viewItems[L].minimumSize), 0), I = a.length === 0 ? Number.NEGATIVE_INFINITY : a.reduce((h, L) => h + (r[L] - this.viewItems[L].maximumSize), 0), E = Math.max(S, I, g), C = Math.min(b, p, d);
|
|
1048
|
+
let X = !1;
|
|
1049
|
+
if (n) {
|
|
1050
|
+
const h = this.viewItems[n.index], L = i >= n.limitDelta;
|
|
1051
|
+
X = L !== h.visible, h.setVisible(L, n.size);
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1053
|
+
if (!X && o) {
|
|
1054
|
+
const h = this.viewItems[o.index], L = i < o.limitDelta;
|
|
1055
|
+
X = L !== h.visible, h.setVisible(L, o.size);
|
|
1056
1056
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
for (let
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1057
|
+
if (X) return this.resize(e, i, r, l, m, g, d);
|
|
1058
|
+
for (let h = 0, L = i = se(i, E, C); h < y.length; h++) {
|
|
1059
|
+
const K = y[h], F = se(w[h] + L, K.minimumSize, K.maximumSize);
|
|
1060
|
+
L -= F - w[h], K.size = F;
|
|
1061
1061
|
}
|
|
1062
|
-
for (let
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1062
|
+
for (let h = 0, L = i; h < v.length; h++) {
|
|
1063
|
+
const K = v[h], F = se(z[h] - L, K.minimumSize, K.maximumSize);
|
|
1064
|
+
L += F - z[h], K.size = F;
|
|
1065
1065
|
}
|
|
1066
|
-
return
|
|
1067
|
-
}
|
|
1068
|
-
distributeEmptySpace(
|
|
1069
|
-
const
|
|
1070
|
-
let
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
for (let
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1066
|
+
return i;
|
|
1067
|
+
}
|
|
1068
|
+
distributeEmptySpace(e) {
|
|
1069
|
+
const i = this.viewItems.reduce((o, c) => o + c.size, 0);
|
|
1070
|
+
let r = this.size - i;
|
|
1071
|
+
const l = te(0, this.viewItems.length), m = [], g = l.filter((o) => this.viewItems[o].priority === ie.Low), d = l.filter((o) => this.viewItems[o].priority === ie.Normal), n = l.filter((o) => this.viewItems[o].priority === ie.High);
|
|
1072
|
+
m.push(...n, ...d, ...g), typeof e == "number" && pt(m, e);
|
|
1073
|
+
for (let o = 0; r !== 0 && o < m.length; o++) {
|
|
1074
|
+
const c = this.viewItems[m[o]], a = se(c.size + r, c.minimumSize, c.maximumSize);
|
|
1075
|
+
r -= a - c.size, c.size = a;
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
layoutViews() {
|
|
1079
|
-
var
|
|
1080
|
-
this.contentSize = this.viewItems.reduce((
|
|
1081
|
-
let
|
|
1082
|
-
for (const
|
|
1083
|
-
(
|
|
1079
|
+
var e;
|
|
1080
|
+
this.contentSize = this.viewItems.reduce((r, l) => r + l.size, 0);
|
|
1081
|
+
let i = 0;
|
|
1082
|
+
for (const r of this.viewItems) r.layout(i), i += r.size;
|
|
1083
|
+
(e = this.onDidChange) != null && e.call(this, this.viewItems.map((r) => r.size)), this.sashItems.forEach((r) => r.sash.layout()), this.updateSashEnablement();
|
|
1084
1084
|
}
|
|
1085
1085
|
saveProportions() {
|
|
1086
|
-
this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((
|
|
1086
|
+
this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((e) => e.size / this.contentSize));
|
|
1087
1087
|
}
|
|
1088
1088
|
updateSashEnablement() {
|
|
1089
|
-
let
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
let
|
|
1098
|
-
for (let
|
|
1089
|
+
let e = !1;
|
|
1090
|
+
const i = this.viewItems.map((n) => e = n.size - n.minimumSize > 0 || e);
|
|
1091
|
+
e = !1;
|
|
1092
|
+
const r = this.viewItems.map((n) => e = n.maximumSize - n.size > 0 || e), l = [...this.viewItems].reverse();
|
|
1093
|
+
e = !1;
|
|
1094
|
+
const m = l.map((n) => e = n.size - n.minimumSize > 0 || e).reverse();
|
|
1095
|
+
e = !1;
|
|
1096
|
+
const g = l.map((n) => e = n.maximumSize - n.size > 0 || e).reverse();
|
|
1097
|
+
let d = 0;
|
|
1098
|
+
for (let n = 0; n < this.sashItems.length; n++) {
|
|
1099
1099
|
const {
|
|
1100
|
-
sash:
|
|
1101
|
-
} = this.sashItems[
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
if (
|
|
1105
|
-
const y =
|
|
1106
|
-
|
|
1107
|
-
} else
|
|
1100
|
+
sash: o
|
|
1101
|
+
} = this.sashItems[n];
|
|
1102
|
+
d += this.viewItems[n].size;
|
|
1103
|
+
const c = !(i[n] && g[n + 1]), a = !(r[n] && m[n + 1]);
|
|
1104
|
+
if (c && a) {
|
|
1105
|
+
const y = te(n, -1, -1), w = te(n + 1, this.viewItems.length), v = this.findFirstSnapIndex(y), z = this.findFirstSnapIndex(w), S = typeof v == "number" && !this.viewItems[v].visible, p = typeof z == "number" && !this.viewItems[z].visible;
|
|
1106
|
+
S && m[n] && (d > 0 || this.startSnappingEnabled) ? o.state = q.Minimum : p && i[n] && (d < this.contentSize || this.endSnappingEnabled) ? o.state = q.Maximum : o.state = q.Disabled;
|
|
1107
|
+
} else o.state = c && !a ? q.Minimum : !c && a ? q.Maximum : q.Enabled;
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
findFirstSnapIndex(
|
|
1111
|
-
for (const
|
|
1112
|
-
const
|
|
1113
|
-
if (
|
|
1110
|
+
findFirstSnapIndex(e) {
|
|
1111
|
+
for (const i of e) {
|
|
1112
|
+
const r = this.viewItems[i];
|
|
1113
|
+
if (r.visible && r.snap) return i;
|
|
1114
1114
|
}
|
|
1115
|
-
for (const
|
|
1116
|
-
const
|
|
1117
|
-
if (
|
|
1118
|
-
if (!
|
|
1115
|
+
for (const i of e) {
|
|
1116
|
+
const r = this.viewItems[i];
|
|
1117
|
+
if (r.visible && r.maximumSize - r.minimumSize > 0) return;
|
|
1118
|
+
if (!r.visible && r.snap) return i;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
class
|
|
1123
|
-
constructor(
|
|
1124
|
-
this.size = void 0, this.size =
|
|
1122
|
+
class Re {
|
|
1123
|
+
constructor(e) {
|
|
1124
|
+
this.size = void 0, this.size = e;
|
|
1125
1125
|
}
|
|
1126
1126
|
getPreferredSize() {
|
|
1127
1127
|
return this.size;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
class
|
|
1131
|
-
constructor(
|
|
1132
|
-
this.proportion = void 0, this.layoutService = void 0, this.proportion =
|
|
1130
|
+
class ti {
|
|
1131
|
+
constructor(e, i) {
|
|
1132
|
+
this.proportion = void 0, this.layoutService = void 0, this.proportion = e, this.layoutService = i;
|
|
1133
1133
|
}
|
|
1134
1134
|
getPreferredSize() {
|
|
1135
1135
|
return this.proportion * this.layoutService.getSize();
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
|
-
class
|
|
1138
|
+
class nt {
|
|
1139
1139
|
getPreferredSize() {
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
class
|
|
1142
|
+
class ii {
|
|
1143
1143
|
get preferredSize() {
|
|
1144
1144
|
return this.layoutStrategy.getPreferredSize();
|
|
1145
1145
|
}
|
|
1146
|
-
set preferredSize(
|
|
1147
|
-
if (typeof
|
|
1148
|
-
else if (typeof
|
|
1149
|
-
const
|
|
1150
|
-
if (
|
|
1151
|
-
const
|
|
1152
|
-
this.layoutStrategy = new
|
|
1153
|
-
} else if (
|
|
1154
|
-
const
|
|
1155
|
-
this.layoutStrategy = new
|
|
1156
|
-
} else if (typeof Number.parseFloat(
|
|
1157
|
-
const
|
|
1158
|
-
this.layoutStrategy = new
|
|
1159
|
-
} else this.layoutStrategy = new
|
|
1160
|
-
} else this.layoutStrategy = new
|
|
1161
|
-
}
|
|
1162
|
-
constructor(
|
|
1163
|
-
var
|
|
1164
|
-
if (this.minimumSize = 0, this.maximumSize = Number.POSITIVE_INFINITY, this.element = void 0, this.priority = void 0, this.snap = void 0, this.layoutService = void 0, this.layoutStrategy = void 0, this.layoutService =
|
|
1165
|
-
else if (typeof
|
|
1166
|
-
const
|
|
1167
|
-
if (
|
|
1168
|
-
const
|
|
1169
|
-
this.layoutStrategy = new
|
|
1170
|
-
} else if (
|
|
1171
|
-
const
|
|
1172
|
-
this.layoutStrategy = new
|
|
1173
|
-
} else if (typeof Number.parseFloat(
|
|
1174
|
-
const
|
|
1175
|
-
this.layoutStrategy = new
|
|
1176
|
-
} else this.layoutStrategy = new
|
|
1177
|
-
} else this.layoutStrategy = new
|
|
1178
|
-
this.priority = (
|
|
1179
|
-
}
|
|
1180
|
-
layout(
|
|
1146
|
+
set preferredSize(e) {
|
|
1147
|
+
if (typeof e == "number") this.layoutStrategy = new Re(e);
|
|
1148
|
+
else if (typeof e == "string") {
|
|
1149
|
+
const i = e.trim();
|
|
1150
|
+
if (it(i, "%")) {
|
|
1151
|
+
const r = Number(i.slice(0, -1)) / 100;
|
|
1152
|
+
this.layoutStrategy = new ti(r, this.layoutService);
|
|
1153
|
+
} else if (it(i, "px")) {
|
|
1154
|
+
const r = Number(i.slice(0, -2)) / 100;
|
|
1155
|
+
this.layoutStrategy = new Re(r);
|
|
1156
|
+
} else if (typeof Number.parseFloat(i) == "number") {
|
|
1157
|
+
const r = Number.parseFloat(i);
|
|
1158
|
+
this.layoutStrategy = new Re(r);
|
|
1159
|
+
} else this.layoutStrategy = new nt();
|
|
1160
|
+
} else this.layoutStrategy = new nt();
|
|
1161
|
+
}
|
|
1162
|
+
constructor(e, i) {
|
|
1163
|
+
var r;
|
|
1164
|
+
if (this.minimumSize = 0, this.maximumSize = Number.POSITIVE_INFINITY, this.element = void 0, this.priority = void 0, this.snap = void 0, this.layoutService = void 0, this.layoutStrategy = void 0, this.layoutService = e, this.element = i.element, this.minimumSize = typeof i.minimumSize == "number" ? i.minimumSize : 30, this.maximumSize = typeof i.maximumSize == "number" ? i.maximumSize : Number.POSITIVE_INFINITY, typeof i.preferredSize == "number") this.layoutStrategy = new Re(i.preferredSize);
|
|
1165
|
+
else if (typeof i.preferredSize == "string") {
|
|
1166
|
+
const l = i.preferredSize.trim();
|
|
1167
|
+
if (it(l, "%")) {
|
|
1168
|
+
const m = Number(l.slice(0, -1)) / 100;
|
|
1169
|
+
this.layoutStrategy = new ti(m, this.layoutService);
|
|
1170
|
+
} else if (it(l, "px")) {
|
|
1171
|
+
const m = Number(l.slice(0, -2));
|
|
1172
|
+
this.layoutStrategy = new Re(m);
|
|
1173
|
+
} else if (typeof Number.parseFloat(l) == "number") {
|
|
1174
|
+
const m = Number.parseFloat(l);
|
|
1175
|
+
this.layoutStrategy = new Re(m);
|
|
1176
|
+
} else this.layoutStrategy = new nt();
|
|
1177
|
+
} else this.layoutStrategy = new nt();
|
|
1178
|
+
this.priority = (r = i.priority) != null ? r : ie.Normal, this.snap = typeof i.snap == "boolean" && i.snap;
|
|
1179
|
+
}
|
|
1180
|
+
layout(e) {
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return
|
|
1183
|
+
function ni(u) {
|
|
1184
|
+
return u.minSize !== void 0 || u.maxSize !== void 0 || u.preferredSize !== void 0 || u.priority !== void 0 || u.visible !== void 0;
|
|
1185
1185
|
}
|
|
1186
|
-
const
|
|
1186
|
+
const zt = window.React.forwardRef(({
|
|
1187
|
+
className: u,
|
|
1188
|
+
children: e
|
|
1189
|
+
}, i) => window.React.createElement("div", {
|
|
1190
|
+
ref: i,
|
|
1191
|
+
className: _t("split-view-view", ri, u)
|
|
1192
|
+
}, e));
|
|
1193
|
+
zt.displayName = "Allotment.Pane";
|
|
1194
|
+
const hi = window.React.forwardRef(({
|
|
1195
|
+
children: u,
|
|
1187
1196
|
className: e,
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
maxSize: s = 1 / 0,
|
|
1199
|
-
minSize: f = 30,
|
|
1200
|
-
proportionalLayout: _ = !0,
|
|
1201
|
-
separator: E = !0,
|
|
1202
|
-
sizes: g,
|
|
1203
|
-
defaultSizes: i = g,
|
|
1204
|
-
snap: u = !1,
|
|
1205
|
-
vertical: d = !1,
|
|
1206
|
-
onChange: p,
|
|
1197
|
+
id: i,
|
|
1198
|
+
maxSize: r = 1 / 0,
|
|
1199
|
+
minSize: l = 30,
|
|
1200
|
+
proportionalLayout: m = !0,
|
|
1201
|
+
separator: g = !0,
|
|
1202
|
+
sizes: d,
|
|
1203
|
+
defaultSizes: n = d,
|
|
1204
|
+
snap: o = !1,
|
|
1205
|
+
vertical: c = !1,
|
|
1206
|
+
onChange: a,
|
|
1207
1207
|
onReset: y,
|
|
1208
|
-
onVisibleChange:
|
|
1209
|
-
onDragStart:
|
|
1210
|
-
onDragEnd:
|
|
1211
|
-
},
|
|
1212
|
-
const
|
|
1213
|
-
var
|
|
1214
|
-
const
|
|
1215
|
-
return typeof (
|
|
1208
|
+
onVisibleChange: w,
|
|
1209
|
+
onDragStart: v,
|
|
1210
|
+
onDragEnd: z
|
|
1211
|
+
}, S) => {
|
|
1212
|
+
const p = window.React.useRef(null), b = window.React.useRef([]), I = window.React.useRef(/* @__PURE__ */ new Map()), E = window.React.useRef(null), C = window.React.useRef(/* @__PURE__ */ new Map()), X = window.React.useRef(new ki()), h = window.React.useRef([]), [L, K] = window.React.useState(!1), F = window.React.useMemo(() => window.React.Children.toArray(u).filter(window.React.isValidElement), [u]), oe = window.React.useCallback((O) => {
|
|
1213
|
+
var D, k;
|
|
1214
|
+
const R = (D = h.current) == null ? void 0 : D[O];
|
|
1215
|
+
return typeof (R == null ? void 0 : R.preferredSize) == "number" && ((k = E.current) != null && k.resizeView(O, Math.round(R.preferredSize)), !0);
|
|
1216
1216
|
}, []);
|
|
1217
|
-
return window.React.useImperativeHandle(
|
|
1217
|
+
return window.React.useImperativeHandle(S, () => ({
|
|
1218
1218
|
reset: () => {
|
|
1219
1219
|
if (y) y();
|
|
1220
1220
|
else {
|
|
1221
|
-
var
|
|
1222
|
-
(
|
|
1223
|
-
for (let
|
|
1221
|
+
var O;
|
|
1222
|
+
(O = E.current) == null || O.distributeViewSizes();
|
|
1223
|
+
for (let D = 0; D < h.current.length; D++) oe(D);
|
|
1224
1224
|
}
|
|
1225
1225
|
},
|
|
1226
|
-
resize: (
|
|
1227
|
-
var
|
|
1228
|
-
(
|
|
1226
|
+
resize: (O) => {
|
|
1227
|
+
var D;
|
|
1228
|
+
(D = E.current) == null || D.resizeViews(O);
|
|
1229
1229
|
}
|
|
1230
|
-
})),
|
|
1231
|
-
let
|
|
1232
|
-
|
|
1233
|
-
const
|
|
1234
|
-
orientation:
|
|
1235
|
-
proportionalLayout:
|
|
1236
|
-
},
|
|
1230
|
+
})), Gt(() => {
|
|
1231
|
+
let O = !0;
|
|
1232
|
+
n && C.current.size !== n.length && (O = !1, console.warn(`Expected ${n.length} children based on defaultSizes but found ${C.current.size}`)), O && n && (b.current = F.map((R) => R.key));
|
|
1233
|
+
const D = ke({
|
|
1234
|
+
orientation: c ? ne.Vertical : ne.Horizontal,
|
|
1235
|
+
proportionalLayout: m
|
|
1236
|
+
}, O && n && {
|
|
1237
1237
|
descriptor: {
|
|
1238
|
-
size:
|
|
1239
|
-
views:
|
|
1240
|
-
var
|
|
1241
|
-
const
|
|
1238
|
+
size: n.reduce((R, N) => R + N, 0),
|
|
1239
|
+
views: n.map((R, N) => {
|
|
1240
|
+
var A, W, be, me;
|
|
1241
|
+
const J = I.current.get(b.current[N]), ve = new ii(X.current, ke({
|
|
1242
1242
|
element: document.createElement("div"),
|
|
1243
|
-
minimumSize: (
|
|
1244
|
-
maximumSize: (
|
|
1245
|
-
priority: (
|
|
1246
|
-
}, (
|
|
1247
|
-
preferredSize:
|
|
1243
|
+
minimumSize: (A = J == null ? void 0 : J.minSize) != null ? A : l,
|
|
1244
|
+
maximumSize: (W = J == null ? void 0 : J.maxSize) != null ? W : r,
|
|
1245
|
+
priority: (be = J == null ? void 0 : J.priority) != null ? be : ie.Normal
|
|
1246
|
+
}, (J == null ? void 0 : J.preferredSize) && {
|
|
1247
|
+
preferredSize: J == null ? void 0 : J.preferredSize
|
|
1248
1248
|
}, {
|
|
1249
|
-
snap: (
|
|
1249
|
+
snap: (me = J == null ? void 0 : J.snap) != null ? me : o
|
|
1250
1250
|
}));
|
|
1251
|
-
return
|
|
1252
|
-
container: [...
|
|
1253
|
-
size:
|
|
1254
|
-
view:
|
|
1251
|
+
return h.current.push(ve), {
|
|
1252
|
+
container: [...C.current.values()][N],
|
|
1253
|
+
size: R,
|
|
1254
|
+
view: ve
|
|
1255
1255
|
};
|
|
1256
1256
|
})
|
|
1257
1257
|
}
|
|
1258
1258
|
});
|
|
1259
|
-
|
|
1260
|
-
var
|
|
1261
|
-
(
|
|
1262
|
-
}),
|
|
1263
|
-
var
|
|
1264
|
-
(
|
|
1265
|
-
}),
|
|
1266
|
-
if (
|
|
1267
|
-
const
|
|
1268
|
-
for (let
|
|
1269
|
-
const
|
|
1270
|
-
(
|
|
1259
|
+
E.current = new Ki(p.current, D, a, v, z), E.current.on("sashDragStart", () => {
|
|
1260
|
+
var R;
|
|
1261
|
+
(R = p.current) == null || R.classList.add("split-view-sash-dragging");
|
|
1262
|
+
}), E.current.on("sashDragEnd", () => {
|
|
1263
|
+
var R;
|
|
1264
|
+
(R = p.current) == null || R.classList.remove("split-view-sash-dragging");
|
|
1265
|
+
}), E.current.on("sashchange", (R) => {
|
|
1266
|
+
if (w && E.current) {
|
|
1267
|
+
const N = F.map((A) => A.key);
|
|
1268
|
+
for (let A = 0; A < N.length; A++) {
|
|
1269
|
+
const W = I.current.get(N[A]);
|
|
1270
|
+
(W == null ? void 0 : W.visible) !== void 0 && W.visible !== E.current.isViewVisible(A) && w(A, E.current.isViewVisible(A));
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
|
-
}),
|
|
1273
|
+
}), E.current.on("sashreset", (R) => {
|
|
1274
1274
|
if (y) y();
|
|
1275
1275
|
else {
|
|
1276
|
-
var
|
|
1277
|
-
if (
|
|
1278
|
-
(
|
|
1276
|
+
var N;
|
|
1277
|
+
if (oe(R) || oe(R + 1)) return;
|
|
1278
|
+
(N = E.current) == null || N.distributeViewSizes();
|
|
1279
1279
|
}
|
|
1280
1280
|
});
|
|
1281
|
-
const
|
|
1281
|
+
const k = E.current;
|
|
1282
1282
|
return () => {
|
|
1283
|
-
|
|
1283
|
+
k.dispose();
|
|
1284
1284
|
};
|
|
1285
|
-
}, []),
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
for (let
|
|
1289
|
-
var
|
|
1290
|
-
|
|
1285
|
+
}, []), Gt(() => {
|
|
1286
|
+
if (L) {
|
|
1287
|
+
const Q = F.map((x) => x.key), ue = [...b.current], le = Q.filter((x) => !b.current.includes(x)), Ve = Q.filter((x) => b.current.includes(x)), je = b.current.map((x) => !Q.includes(x));
|
|
1288
|
+
for (let x = je.length - 1; x >= 0; x--) {
|
|
1289
|
+
var O;
|
|
1290
|
+
je[x] && ((O = E.current) != null && O.removeView(x), ue.splice(x, 1), h.current.splice(x, 1));
|
|
1291
1291
|
}
|
|
1292
|
-
for (const
|
|
1293
|
-
var
|
|
1294
|
-
const
|
|
1292
|
+
for (const x of le) {
|
|
1293
|
+
var D, k, R, N, A;
|
|
1294
|
+
const V = I.current.get(x), $ = new ii(X.current, ke({
|
|
1295
1295
|
element: document.createElement("div"),
|
|
1296
|
-
minimumSize: (
|
|
1297
|
-
maximumSize: (
|
|
1298
|
-
priority: (
|
|
1299
|
-
}, (
|
|
1300
|
-
preferredSize:
|
|
1296
|
+
minimumSize: (D = V == null ? void 0 : V.minSize) != null ? D : l,
|
|
1297
|
+
maximumSize: (k = V == null ? void 0 : V.maxSize) != null ? k : r,
|
|
1298
|
+
priority: (R = V == null ? void 0 : V.priority) != null ? R : ie.Normal
|
|
1299
|
+
}, (V == null ? void 0 : V.preferredSize) && {
|
|
1300
|
+
preferredSize: V == null ? void 0 : V.preferredSize
|
|
1301
1301
|
}, {
|
|
1302
|
-
snap: (
|
|
1302
|
+
snap: (N = V == null ? void 0 : V.snap) != null ? N : o
|
|
1303
1303
|
}));
|
|
1304
|
-
(
|
|
1304
|
+
(A = E.current) != null && A.addView(C.current.get(x), $, rt.Distribute, Q.findIndex((Y) => Y === x)), ue.splice(Q.findIndex((Y) => Y === x), 0, x), h.current.splice(Q.findIndex((Y) => Y === x), 0, $);
|
|
1305
1305
|
}
|
|
1306
|
-
for (; !
|
|
1307
|
-
const
|
|
1308
|
-
if (
|
|
1309
|
-
var
|
|
1310
|
-
(
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1306
|
+
for (; !Oi(Q, ue); ) for (const [x, V] of Q.entries()) {
|
|
1307
|
+
const $ = ue.findIndex((Y) => Y === V);
|
|
1308
|
+
if ($ !== x) {
|
|
1309
|
+
var W;
|
|
1310
|
+
(W = E.current) == null || W.moveView(C.current.get(V), $, x);
|
|
1311
|
+
const Y = ue[$];
|
|
1312
|
+
ue.splice($, 1), ue.splice(x, 0, Y);
|
|
1313
1313
|
break;
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
for (const
|
|
1317
|
-
var
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1316
|
+
for (const x of le) {
|
|
1317
|
+
var be;
|
|
1318
|
+
const V = Q.findIndex((Y) => Y === x), $ = h.current[V].preferredSize;
|
|
1319
|
+
$ !== void 0 && ((be = E.current) == null || be.resizeView(V, $));
|
|
1320
1320
|
}
|
|
1321
|
-
for (const
|
|
1322
|
-
var
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1321
|
+
for (const x of [...le, ...Ve]) {
|
|
1322
|
+
var me, J;
|
|
1323
|
+
const V = I.current.get(x), $ = Q.findIndex((Y) => Y === x);
|
|
1324
|
+
V && ni(V) && V.visible !== void 0 && ((me = E.current) == null ? void 0 : me.isViewVisible($)) !== V.visible && ((J = E.current) == null || J.setViewVisible($, V.visible));
|
|
1325
1325
|
}
|
|
1326
|
-
for (const
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1329
|
-
var
|
|
1330
|
-
|
|
1331
|
-
let
|
|
1332
|
-
|
|
1326
|
+
for (const x of Ve) {
|
|
1327
|
+
const V = I.current.get(x), $ = Q.findIndex((Y) => Y === x);
|
|
1328
|
+
if (V && ni(V)) {
|
|
1329
|
+
var ve;
|
|
1330
|
+
V.preferredSize !== void 0 && h.current[$].preferredSize !== V.preferredSize && (h.current[$].preferredSize = V.preferredSize);
|
|
1331
|
+
let Y = !1;
|
|
1332
|
+
V.minSize !== void 0 && h.current[$].minimumSize !== V.minSize && (h.current[$].minimumSize = V.minSize, Y = !0), V.maxSize !== void 0 && h.current[$].maximumSize !== V.maxSize && (h.current[$].maximumSize = V.maxSize, Y = !0), Y && ((ve = E.current) == null || ve.layout());
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
(
|
|
1335
|
+
(le.length > 0 || je.length > 0) && (b.current = Q);
|
|
1336
1336
|
}
|
|
1337
|
-
}, [
|
|
1338
|
-
|
|
1339
|
-
}, [
|
|
1340
|
-
|
|
1341
|
-
}, [
|
|
1342
|
-
|
|
1343
|
-
}, [
|
|
1344
|
-
ref:
|
|
1337
|
+
}, [F, L, r, l, o]), window.React.useEffect(() => {
|
|
1338
|
+
E.current && (E.current.onDidChange = a);
|
|
1339
|
+
}, [a]), window.React.useEffect(() => {
|
|
1340
|
+
E.current && (E.current.onDidDragStart = v);
|
|
1341
|
+
}, [v]), window.React.useEffect(() => {
|
|
1342
|
+
E.current && (E.current.onDidDragEnd = z);
|
|
1343
|
+
}, [z]), Ri({
|
|
1344
|
+
ref: p,
|
|
1345
1345
|
onResize: ({
|
|
1346
|
-
width:
|
|
1347
|
-
height:
|
|
1346
|
+
width: O,
|
|
1347
|
+
height: D
|
|
1348
1348
|
}) => {
|
|
1349
|
-
var
|
|
1350
|
-
|
|
1349
|
+
var k;
|
|
1350
|
+
O && D && ((k = E.current) != null && k.layout(c ? D : O), X.current.setSize(c ? D : O), K(!0));
|
|
1351
1351
|
}
|
|
1352
1352
|
}), window.React.useEffect(() => {
|
|
1353
|
-
|
|
1353
|
+
ai && Zi(20);
|
|
1354
1354
|
}, []), window.React.createElement("div", {
|
|
1355
|
-
ref:
|
|
1356
|
-
className:
|
|
1357
|
-
"split-view-separator-border":
|
|
1358
|
-
},
|
|
1359
|
-
[
|
|
1360
|
-
},
|
|
1361
|
-
id:
|
|
1355
|
+
ref: p,
|
|
1356
|
+
className: _t("split-view", c ? "split-view-vertical" : "split-view-horizontal", {
|
|
1357
|
+
"split-view-separator-border": g
|
|
1358
|
+
}, Ni, c ? Ai : Ci, {
|
|
1359
|
+
[Ti]: g
|
|
1360
|
+
}, e),
|
|
1361
|
+
id: i
|
|
1362
1362
|
}, window.React.createElement("div", {
|
|
1363
|
-
className:
|
|
1364
|
-
}, window.React.Children.toArray(
|
|
1365
|
-
if (!window.React.isValidElement(
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
key:
|
|
1369
|
-
ref: (
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1363
|
+
className: _t("split-view-container", Pi)
|
|
1364
|
+
}, window.React.Children.toArray(u).map((O) => {
|
|
1365
|
+
if (!window.React.isValidElement(O)) return null;
|
|
1366
|
+
const D = O.key;
|
|
1367
|
+
return O.type.displayName === "Allotment.Pane" ? (I.current.set(D, O.props), window.React.cloneElement(O, {
|
|
1368
|
+
key: D,
|
|
1369
|
+
ref: (k) => {
|
|
1370
|
+
const R = O.ref;
|
|
1371
|
+
R && (R.current = k), k ? C.current.set(D, k) : C.current.delete(D);
|
|
1372
1372
|
}
|
|
1373
|
-
})) : window.React.createElement(
|
|
1374
|
-
key:
|
|
1375
|
-
ref: (
|
|
1376
|
-
|
|
1373
|
+
})) : window.React.createElement(zt, {
|
|
1374
|
+
key: D,
|
|
1375
|
+
ref: (k) => {
|
|
1376
|
+
k ? C.current.set(D, k) : C.current.delete(D);
|
|
1377
1377
|
}
|
|
1378
|
-
},
|
|
1378
|
+
}, O);
|
|
1379
1379
|
})));
|
|
1380
1380
|
});
|
|
1381
|
-
function
|
|
1382
|
-
const
|
|
1383
|
-
document.documentElement.style.setProperty("--sash-size",
|
|
1384
|
-
|
|
1385
|
-
})(
|
|
1381
|
+
function Zi(u) {
|
|
1382
|
+
const e = se(u, 4, 20), i = se(u, 1, 8);
|
|
1383
|
+
document.documentElement.style.setProperty("--sash-size", e + "px"), document.documentElement.style.setProperty("--sash-hover-size", i + "px"), (function(r) {
|
|
1384
|
+
ui = r, li.emit("onDidChangeGlobalSize", r);
|
|
1385
|
+
})(e);
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1388
|
-
var
|
|
1389
|
-
Pane:
|
|
1387
|
+
hi.displayName = "Allotment";
|
|
1388
|
+
var Qi = Object.assign(hi, {
|
|
1389
|
+
Pane: zt
|
|
1390
1390
|
});
|
|
1391
|
-
(function() {
|
|
1392
|
-
try {
|
|
1393
|
-
if (typeof document < "u") {
|
|
1394
|
-
var e = document.createElement("style");
|
|
1395
|
-
e.appendChild(document.createTextNode('.grid-drag-resize{display:grid}.grid-drag-resize--dropping{background-color:#d8e9f666}.grid-drag-resize__item{position:relative}.grid-drag-resize__item--draggable-full{cursor:move;-webkit-user-select:none;user-select:none}.grid-drag-resize__item--dragging{opacity:.6}.grid-drag-resize__item--shadow{background-color:#bacbd74d}.grid-drag-resize__item--resizing>.grid-drag-resize__item__adjust{display:block}.grid-drag-resize__item--resizing>.grid-drag-resize__item__remove{transform:translate(-14px)}.grid-drag-resize__item--resizing>.grid-drag-resize__item__drop{transform:translate(-16px)}.grid-drag-resize__item__group{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%}.grid-drag-resize__item__mask{position:absolute;z-index:2;top:0;left:0;width:100%;height:100%;-webkit-user-select:none;user-select:none}.grid-drag-resize__item__border{display:none;position:absolute;z-index:3;background-color:#71c4ef}.grid-drag-resize__item__border--top{top:0;width:100%;height:2px}.grid-drag-resize__item__border--right{right:0;width:2px;height:100%}.grid-drag-resize__item__border--bottom{bottom:0;width:100%;height:2px}.grid-drag-resize__item__border--left{left:0;width:2px;height:100%}.grid-drag-resize__item--selected>.grid-drag-resize__item__border{display:block}.grid-drag-resize__item__adjust{display:none;position:absolute;z-index:4;width:10px;height:10px;border:1px solid #666;background-color:#fff;box-shadow:1px 1px 2px #0003}.grid-drag-resize__item__adjust--top{left:calc(50% - 5px);cursor:ns-resize}.grid-drag-resize__item__adjust--right{top:calc(50% - 5px);cursor:ew-resize}.grid-drag-resize__item__adjust--bottom{left:calc(50% - 5px);cursor:ns-resize}.grid-drag-resize__item__adjust--left{top:calc(50% - 5px);cursor:ew-resize}.grid-drag-resize__item__adjust--top-left{cursor:nwse-resize}.grid-drag-resize__item__adjust--top-right,.grid-drag-resize__item__adjust--bottom-left{cursor:nesw-resize}.grid-drag-resize__item__adjust--bottom-right{cursor:nwse-resize}.grid-drag-resize__item__remove{position:absolute;z-index:5;top:0;right:0;width:0;height:0;overflow:hidden;transition:transform .3s ease-in-out;border:0 solid rgba(255,0,0,.6);border-radius:50%;opacity:.8;background-color:#fff;box-shadow:0 0 2px #0003;cursor:pointer}.grid-drag-resize__item__remove:hover{opacity:1}.grid-drag-resize__item__remove:before,.grid-drag-resize__item__remove:after{content:"";display:block;position:absolute;top:5px;left:1px;width:9px;height:1px;transform-origin:center;background-color:#f009}.grid-drag-resize__item__remove:before{transform:rotate(-45deg)}.grid-drag-resize__item__remove:after{transform:rotate(45deg)}.grid-drag-resize__item__drop{position:absolute;z-index:5;left:calc(50% - 9px);width:0;height:0;overflow:hidden;transition:transform .3s ease-in-out;border:0 solid #666;border-radius:50%;opacity:.8;background-color:#fff;cursor:grab}.grid-drag-resize__item__drop:hover{opacity:1}.grid-drag-resize__item--hover>.grid-drag-resize__item__remove{width:13px;height:13px;border-width:1px}.grid-drag-resize__item--hover>.grid-drag-resize__item__drop{width:18px;height:18px;border-width:1px}.grid-drag-resize--sub{min-width:100%;min-height:100%}')), document.head.appendChild(e);
|
|
1396
|
-
}
|
|
1397
|
-
} catch (t) {
|
|
1398
|
-
console.error("vite-plugin-css-injected-by-js", t);
|
|
1399
|
-
}
|
|
1400
|
-
})();
|
|
1401
|
-
var Qr = { exports: {} }, ar = {};
|
|
1402
|
-
/**
|
|
1403
|
-
* @license React
|
|
1404
|
-
* react-jsx-runtime.production.min.js
|
|
1405
|
-
*
|
|
1406
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1407
|
-
*
|
|
1408
|
-
* This source code is licensed under the MIT license found in the
|
|
1409
|
-
* LICENSE file in the root directory of this source tree.
|
|
1410
|
-
*/
|
|
1411
|
-
var Fr;
|
|
1412
|
-
function Pn() {
|
|
1413
|
-
if (Fr) return ar;
|
|
1414
|
-
Fr = 1;
|
|
1415
|
-
var e = window.React, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, f = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1416
|
-
function E(g, i, u) {
|
|
1417
|
-
var d, p = {}, y = null, R = null;
|
|
1418
|
-
u !== void 0 && (y = "" + u), i.key !== void 0 && (y = "" + i.key), i.ref !== void 0 && (R = i.ref);
|
|
1419
|
-
for (d in i) s.call(i, d) && !_.hasOwnProperty(d) && (p[d] = i[d]);
|
|
1420
|
-
if (g && g.defaultProps) for (d in i = g.defaultProps, i) p[d] === void 0 && (p[d] = i[d]);
|
|
1421
|
-
return { $$typeof: t, type: g, key: y, ref: R, props: p, _owner: f.current };
|
|
1422
|
-
}
|
|
1423
|
-
return ar.Fragment = n, ar.jsx = E, ar.jsxs = E, ar;
|
|
1424
|
-
}
|
|
1425
|
-
Qr.exports = Pn();
|
|
1426
|
-
var Ie = Qr.exports;
|
|
1427
|
-
const hr = window.React.createContext(void 0);
|
|
1428
|
-
function Yr(e) {
|
|
1429
|
-
var t, n, s, f, _, E, g, i, u, d, p, y, R, b, j, N, S, P, l, M, K, ue, w, Z, Me, ie, Ye;
|
|
1430
|
-
const I = window.React.useContext(hr), W = window.React.useRef(1), ne = window.React.useRef(1), X = window.React.useRef(1), q = window.React.useRef(2), ee = window.React.useRef(1), fe = window.React.useRef(2), We = window.React.useRef(), $e = window.React.useRef(), ce = window.React.useRef(), Ae = window.React.useRef(), F = window.React.useRef(), Oe = window.React.useRef(), Xe = window.React.useRef(), et = window.React.useRef(), Se = window.React.useRef(), V = window.React.useRef(), A = window.React.useRef(), se = window.React.useRef(), Q = window.React.useRef(), Dt = window.React.useRef(), De = window.React.useRef(), he = window.React.useRef(), Xt = window.React.useRef();
|
|
1431
|
-
window.React.useEffect(() => {
|
|
1432
|
-
var c, O, He, Je, ot, U, T, _e, de, je, oe;
|
|
1433
|
-
W.current = e.columns || 1, ne.current = e.rows || 1, X.current = (e.columnStart ?? 0) < 1 ? 1 : e.columnStart, q.current = (e.columnEnd ?? 0) < 2 ? 2 : e.columnEnd, ee.current = (e.rowStart ?? 0) < 1 ? 1 : e.rowStart, fe.current = (e.rowEnd ?? 0) < 2 ? 2 : e.rowEnd, Se.current = e.mask ?? !1, We.current = e.dragHandler || ((c = e.parentProps) == null ? void 0 : c.dragHandler), $e.current = e.dropOutHandler || ((O = e.parentProps) == null ? void 0 : O.dropOutHandler), ce.current = e.removeHandler || ((He = e.parentProps) == null ? void 0 : He.removeHandler), Ae.current = e.overflow || ((Je = e.parentProps) == null ? void 0 : Je.overflow), F.current = e.readonly ?? ((ot = e.parentProps) == null ? void 0 : ot.readonly), Oe.current = F.current ? !1 : e.draggable ?? ((U = e.parentProps) == null ? void 0 : U.draggable), Q.current = Oe.current ?? !0, Xe.current = F.current ? !1 : e.resizable ?? ((T = e.parentProps) == null ? void 0 : T.resizable), Dt.current = Xe.current ?? !0, et.current = F.current ? !1 : e.removable ?? ((_e = e.parentProps) == null ? void 0 : _e.removable), De.current = et.current ?? !0, Se.current = e.mask ?? ((de = e.parentProps) == null ? void 0 : de.mask), he.current = Se.current ?? !1, V.current = F.current ? !1 : e.droppableOut ?? ((je = e.parentProps) == null ? void 0 : je.droppableOut), Xt.current = V.current ?? !0, A.current = e.debug ?? ((oe = e.parentProps) == null ? void 0 : oe.debug), se.current = { ...e.parentProps };
|
|
1434
|
-
}, [e]);
|
|
1435
|
-
const [Ot, dt] = window.React.useState(
|
|
1436
|
-
Xt.current
|
|
1437
|
-
), [pt, nr] = window.React.useState($e.current), [kt, Ge] = window.React.useState(ce.current), [rt, Vt] = window.React.useState(De.current), [Ut, ae] = window.React.useState(Ae.current), [Ke, St] = window.React.useState(We.current), [ve, Re] = window.React.useState(Q.current), [Tt, It] = window.React.useState(X.current), [Rt, ft] = window.React.useState(q.current), [Ne, Ce] = window.React.useState(ee.current), [nt, ht] = window.React.useState(fe.current), [Le, Ct] = window.React.useState(ne.current), [wt, ke] = window.React.useState(W.current), [Ht, Qe] = window.React.useState(he.current);
|
|
1438
|
-
window.React.useEffect(() => {
|
|
1439
|
-
dt(V.current ?? !0);
|
|
1440
|
-
}, [e.droppableOut, (t = e.parentProps) == null ? void 0 : t.droppableOut]), window.React.useEffect(() => {
|
|
1441
|
-
nr($e.current);
|
|
1442
|
-
}, [e.dropOutHandler, (n = e.parentProps) == null ? void 0 : n.dropOutHandler]), window.React.useEffect(() => {
|
|
1443
|
-
Ge(ce.current);
|
|
1444
|
-
}, [e.removeHandler, (s = e.parentProps) == null ? void 0 : s.removeHandler]), window.React.useEffect(() => {
|
|
1445
|
-
Vt(et.current ?? !0);
|
|
1446
|
-
}, [e.removable, (f = e.parentProps) == null ? void 0 : f.removable]), window.React.useEffect(() => {
|
|
1447
|
-
Qe(Se.current ?? !1);
|
|
1448
|
-
}, [e.mask, (_ = e.parentProps) == null ? void 0 : _.mask]), window.React.useEffect(() => {
|
|
1449
|
-
ae(Ae.current);
|
|
1450
|
-
}, [e.overflow, (E = e.parentProps) == null ? void 0 : E.overflow]), window.React.useEffect(() => {
|
|
1451
|
-
St(We.current);
|
|
1452
|
-
}, [e.dragHandler, (g = e.parentProps) == null ? void 0 : g.dragHandler]), window.React.useEffect(() => {
|
|
1453
|
-
Re(Oe.current ?? !0);
|
|
1454
|
-
}, [e.draggable, (i = e.parentProps) == null ? void 0 : i.draggable]), window.React.useEffect(() => {
|
|
1455
|
-
It(X.current);
|
|
1456
|
-
}, [e.columnStart]), window.React.useEffect(() => {
|
|
1457
|
-
ft(q.current);
|
|
1458
|
-
}, [e.columnEnd]), window.React.useEffect(() => {
|
|
1459
|
-
Ce(ee.current);
|
|
1460
|
-
}, [e.rowStart]), window.React.useEffect(() => {
|
|
1461
|
-
ht(fe.current);
|
|
1462
|
-
}, [e.rowEnd]), window.React.useEffect(() => {
|
|
1463
|
-
Ct(ne.current);
|
|
1464
|
-
}, [e.rows]), window.React.useEffect(() => {
|
|
1465
|
-
ke(W.current);
|
|
1466
|
-
}, [e.columns]);
|
|
1467
|
-
const ge = window.React.useRef(null), [Pt, $t] = window.React.useState(ge.current), mt = window.React.useRef(null), [it, Ve] = window.React.useState(mt.current);
|
|
1468
|
-
window.React.useEffect(() => {
|
|
1469
|
-
$t(ge.current);
|
|
1470
|
-
}, []), window.React.useEffect(() => {
|
|
1471
|
-
Ve(mt.current);
|
|
1472
|
-
}, [Ht]);
|
|
1473
|
-
const [vt, Ue] = window.React.useState(se.current), Jt = window.React.useRef({ ...se.current });
|
|
1474
|
-
window.React.useEffect(() => {
|
|
1475
|
-
Jt.current = {
|
|
1476
|
-
...se.current,
|
|
1477
|
-
//
|
|
1478
|
-
dragHandler: We.current,
|
|
1479
|
-
dropOutHandler: $e.current,
|
|
1480
|
-
removeHandler: ce.current,
|
|
1481
|
-
overflow: Ae.current,
|
|
1482
|
-
//
|
|
1483
|
-
readonly: F.current,
|
|
1484
|
-
//
|
|
1485
|
-
draggable: Oe.current,
|
|
1486
|
-
resizable: Xe.current,
|
|
1487
|
-
removable: et.current,
|
|
1488
|
-
mask: Se.current,
|
|
1489
|
-
droppableIn: e.droppableIn,
|
|
1490
|
-
droppableOut: V.current,
|
|
1491
|
-
//
|
|
1492
|
-
debug: A.current
|
|
1493
|
-
}, Ue(Jt.current);
|
|
1494
|
-
}, [
|
|
1495
|
-
e.dragHandler,
|
|
1496
|
-
(u = e.parentProps) == null ? void 0 : u.dragHandler,
|
|
1497
|
-
e.dropOutHandler,
|
|
1498
|
-
(d = e.parentProps) == null ? void 0 : d.dropOutHandler,
|
|
1499
|
-
e.removeHandler,
|
|
1500
|
-
(p = e.parentProps) == null ? void 0 : p.removeHandler,
|
|
1501
|
-
e.overflow,
|
|
1502
|
-
(y = e.parentProps) == null ? void 0 : y.overflow,
|
|
1503
|
-
e.readonly,
|
|
1504
|
-
(R = e.parentProps) == null ? void 0 : R.readonly,
|
|
1505
|
-
e.draggable,
|
|
1506
|
-
(b = e.parentProps) == null ? void 0 : b.draggable,
|
|
1507
|
-
e.resizable,
|
|
1508
|
-
(j = e.parentProps) == null ? void 0 : j.resizable,
|
|
1509
|
-
e.removable,
|
|
1510
|
-
(N = e.parentProps) == null ? void 0 : N.removable,
|
|
1511
|
-
e.mask,
|
|
1512
|
-
(S = e.parentProps) == null ? void 0 : S.mask,
|
|
1513
|
-
e.droppableIn,
|
|
1514
|
-
(P = e.parentProps) == null ? void 0 : P.droppableIn,
|
|
1515
|
-
e.droppableOut,
|
|
1516
|
-
(l = e.parentProps) == null ? void 0 : l.droppableOut,
|
|
1517
|
-
e.debug,
|
|
1518
|
-
(M = e.parentProps) == null ? void 0 : M.debug
|
|
1519
|
-
]), A.current && console.log(Jt);
|
|
1520
|
-
const [Pe, gt] = window.React.useState(((K = e.parentProps) == null ? void 0 : K.gap) ?? 0);
|
|
1521
|
-
window.React.useEffect(() => {
|
|
1522
|
-
var c;
|
|
1523
|
-
const O = ((c = e.parentProps) == null ? void 0 : c.gap) ?? 0;
|
|
1524
|
-
gt(O < 5 ? O : 5);
|
|
1525
|
-
}, [(ue = e.parentProps) == null ? void 0 : ue.gap]);
|
|
1526
|
-
const [Zt, jt] = window.React.useState(((w = e.parentProps) == null ? void 0 : w.gap) ?? 0);
|
|
1527
|
-
window.React.useEffect(() => {
|
|
1528
|
-
var c;
|
|
1529
|
-
const O = ((c = e.parentProps) == null ? void 0 : c.gap) ?? 0;
|
|
1530
|
-
jt(O < 6.5 ? O : 6.5);
|
|
1531
|
-
}, [(Z = e.parentProps) == null ? void 0 : Z.gap]);
|
|
1532
|
-
const [At, Bt] = window.React.useState(((Me = e.parentProps) == null ? void 0 : Me.gap) ?? 0);
|
|
1533
|
-
window.React.useEffect(() => {
|
|
1534
|
-
var c;
|
|
1535
|
-
const O = ((c = e.parentProps) == null ? void 0 : c.gap) ?? 0;
|
|
1536
|
-
Bt(O < 8 ? O : 8);
|
|
1537
|
-
}, [(ie = e.parentProps) == null ? void 0 : ie.gap]);
|
|
1538
|
-
const [st, ye] = window.React.useState(I == null ? void 0 : I.state.hoverEle), [yt, Ft] = window.React.useState(st === Pt);
|
|
1539
|
-
window.React.useEffect(() => {
|
|
1540
|
-
Ft(
|
|
1541
|
-
st !== void 0 && (st === Pt || st === it)
|
|
1542
|
-
);
|
|
1543
|
-
}, [st, Pt, it]), window.React.useEffect(() => {
|
|
1544
|
-
ye(I == null ? void 0 : I.state.hoverEle);
|
|
1545
|
-
}, [I == null ? void 0 : I.state.hoverEle]);
|
|
1546
|
-
const Mt = window.React.useMemo(() => ({
|
|
1547
|
-
gridColumnStart: Tt ?? "",
|
|
1548
|
-
gridColumnEnd: Rt ?? "",
|
|
1549
|
-
gridRowStart: Ne ?? "",
|
|
1550
|
-
gridRowEnd: nt ?? ""
|
|
1551
|
-
}), [Tt, Rt, Ne, nt]);
|
|
1552
|
-
window.React.useEffect(() => {
|
|
1553
|
-
var c;
|
|
1554
|
-
e.rows !== Le && ((c = e.updateRows) == null || c.call(e, Le));
|
|
1555
|
-
}, [e, Le]), window.React.useEffect(() => {
|
|
1556
|
-
var c;
|
|
1557
|
-
e.columns !== wt && ((c = e.updateColumns) == null || c.call(e, wt));
|
|
1558
|
-
}, [e, wt]), window.React.useEffect(() => {
|
|
1559
|
-
var c, O, He, Je, ot, U;
|
|
1560
|
-
let T = e.columnStart ?? 0, _e = e.columnEnd ?? 0, de = e.columns ?? 0, je = e.rowStart ?? 0, oe = e.rowEnd ?? 0, xe = e.rows ?? 0;
|
|
1561
|
-
(T < 1 && _e < 1 || T > 0 && _e > 0 && _e <= T) && (T = 0, _e = 0), de < 1 && (de = 1), (je < 1 && oe < 1 || oe <= je && je > 0 && oe > 1) && (je = 0, oe = 0), xe < 1 && (xe = 1), T < 1 && _e < 1 && je < 1 && oe < 1 || (T < 1 && (T = 1), _e < T && (de < 1 ? _e = T + 1 : _e = T + de), je < 1 && (je = 1), oe < je && (xe < 1 ? oe = je + 1 : oe = je + xe), (de < 1 || de < _e - T) && T !== void 0 && _e !== void 0 && (de = _e - T), (xe < 1 || xe < oe - je) && oe !== void 0 && je !== void 0 && (xe = oe - je)), (c = e.updateColumnStart) == null || c.call(e, T), (O = e.updateColumnEnd) == null || O.call(e, _e), (He = e.updateColumns) == null || He.call(e, de), (Je = e.updateRowStart) == null || Je.call(e, je), (ot = e.updateRowEnd) == null || ot.call(e, oe), (U = e.updateRows) == null || U.call(e, xe);
|
|
1562
|
-
}, [e]);
|
|
1563
|
-
const r = window.React.useCallback(
|
|
1564
|
-
(c) => {
|
|
1565
|
-
var O, He;
|
|
1566
|
-
Q.current && ((He = e.startDrag) == null || He.call(e, {
|
|
1567
|
-
event: c,
|
|
1568
|
-
rect: ((O = ge == null ? void 0 : ge.current) == null ? void 0 : O.getBoundingClientRect()) ?? {
|
|
1569
|
-
height: 0,
|
|
1570
|
-
width: 0,
|
|
1571
|
-
x: 0,
|
|
1572
|
-
y: 0,
|
|
1573
|
-
bottom: 0,
|
|
1574
|
-
right: 0
|
|
1575
|
-
}
|
|
1576
|
-
}));
|
|
1577
|
-
},
|
|
1578
|
-
[e]
|
|
1579
|
-
), a = window.React.useCallback(() => {
|
|
1580
|
-
var c;
|
|
1581
|
-
(c = e.dropEnd) == null || c.call(e);
|
|
1582
|
-
}, [e]), v = window.React.useCallback(() => {
|
|
1583
|
-
var c;
|
|
1584
|
-
(c = e.dropStart) == null || c.call(e, {
|
|
1585
|
-
ele: ge.current,
|
|
1586
|
-
remove: () => {
|
|
1587
|
-
var O;
|
|
1588
|
-
De.current && ((O = e.remove) == null || O.call(e));
|
|
1589
|
-
}
|
|
1590
|
-
});
|
|
1591
|
-
}, [e]), C = window.React.useCallback(
|
|
1592
|
-
(c) => {
|
|
1593
|
-
var O;
|
|
1594
|
-
c.stopPropagation(), (O = e.remove) == null || O.call(e);
|
|
1595
|
-
},
|
|
1596
|
-
[e]
|
|
1597
|
-
);
|
|
1598
|
-
window.React.useEffect(() => {
|
|
1599
|
-
if (ve && Ke && ge.current) {
|
|
1600
|
-
const c = ge.current.querySelector(Ke);
|
|
1601
|
-
c instanceof HTMLElement && (c.style.cursor = "move", c.addEventListener("mousedown", r));
|
|
1602
|
-
}
|
|
1603
|
-
return () => {
|
|
1604
|
-
window.removeEventListener("mousedown", r);
|
|
1605
|
-
};
|
|
1606
|
-
}, [ve, Ke, r]);
|
|
1607
|
-
const te = window.React.useRef(), B = window.React.useRef(), le = window.React.useRef(), we = window.React.useRef(), Be = window.React.useRef();
|
|
1608
|
-
window.React.useEffect(() => {
|
|
1609
|
-
if (Ot && pt && ge.current) {
|
|
1610
|
-
const c = ge.current.querySelector(pt);
|
|
1611
|
-
c instanceof HTMLElement && (c.style.cursor = "grab", c.setAttribute("draggable", "true"), te.current && c.removeEventListener("mousedown", te.current), B.current && c.removeEventListener("mousemove", B.current), le.current && c.removeEventListener("mouseup", le.current), we.current && c.removeEventListener("dragstart", we.current), Be.current && c.removeEventListener("dragend", Be.current), te.current = (O) => {
|
|
1612
|
-
O.stopPropagation(), v();
|
|
1613
|
-
}, c.addEventListener("mousedown", te.current), B.current = (O) => {
|
|
1614
|
-
O.stopPropagation();
|
|
1615
|
-
}, c.addEventListener("mousemove", B.current), le.current = (O) => {
|
|
1616
|
-
O.stopPropagation();
|
|
1617
|
-
}, c.addEventListener("mouseup", le.current), we.current = (O) => {
|
|
1618
|
-
O.stopPropagation();
|
|
1619
|
-
}, c.addEventListener("dragstart", we.current), Be.current = (O) => {
|
|
1620
|
-
O.stopPropagation(), a();
|
|
1621
|
-
}, c.addEventListener("dragend", Be.current));
|
|
1622
|
-
}
|
|
1623
|
-
}, [pt, Ot, a, v]);
|
|
1624
|
-
const re = window.React.useRef(), me = window.React.useRef(), Fe = window.React.useRef(), Te = window.React.useRef();
|
|
1625
|
-
window.React.useEffect(() => {
|
|
1626
|
-
if (rt && kt && ge.current) {
|
|
1627
|
-
const c = ge.current.querySelector(kt);
|
|
1628
|
-
c instanceof HTMLElement && (c.style.cursor = "pointer", re.current && c.removeEventListener("click", re.current), me.current && c.removeEventListener("mousedown", me.current), Fe.current && c.removeEventListener("mousemove", Fe.current), Te.current && c.removeEventListener("mouseup", Te.current), re.current = (O) => {
|
|
1629
|
-
C(O);
|
|
1630
|
-
}, c.addEventListener("click", re.current), me.current = (O) => {
|
|
1631
|
-
O.stopPropagation();
|
|
1632
|
-
}, c.addEventListener("mousedown", me.current), Fe.current = (O) => {
|
|
1633
|
-
O.stopPropagation();
|
|
1634
|
-
}, c.addEventListener("mousemove", Fe.current), Te.current = (O) => {
|
|
1635
|
-
O.stopPropagation();
|
|
1636
|
-
}, c.addEventListener("mouseup", Te.current));
|
|
1637
|
-
}
|
|
1638
|
-
}, [rt, kt, C]);
|
|
1639
|
-
const be = window.React.useCallback(
|
|
1640
|
-
(c) => {
|
|
1641
|
-
var O, He;
|
|
1642
|
-
F.current || (c.stopPropagation(), (O = e.select) == null || O.call(e)), Dt.current && (c.stopPropagation(), (He = e.selectResizing) == null || He.call(e));
|
|
1643
|
-
},
|
|
1644
|
-
[e]
|
|
1645
|
-
), ze = window.React.useCallback(
|
|
1646
|
-
(c, O) => {
|
|
1647
|
-
var He, Je;
|
|
1648
|
-
Dt.current && (c.stopPropagation(), (Je = e.startResize) == null || Je.call(e, {
|
|
1649
|
-
event: c,
|
|
1650
|
-
rect: ((He = ge == null ? void 0 : ge.current) == null ? void 0 : He.getBoundingClientRect()) ?? {
|
|
1651
|
-
height: 0,
|
|
1652
|
-
width: 0,
|
|
1653
|
-
x: 0,
|
|
1654
|
-
y: 0,
|
|
1655
|
-
bottom: 0,
|
|
1656
|
-
right: 0
|
|
1657
|
-
},
|
|
1658
|
-
cursor: c.target instanceof HTMLElement ? getComputedStyle(c.target).cursor : "",
|
|
1659
|
-
direction: O
|
|
1660
|
-
}));
|
|
1661
|
-
},
|
|
1662
|
-
[e]
|
|
1663
|
-
), _t = window.React.useCallback(
|
|
1664
|
-
(c) => {
|
|
1665
|
-
c.currentTarget instanceof HTMLElement && I && (I.state.hoverEle = c.currentTarget, I.setState({ ...I.state }));
|
|
1666
|
-
},
|
|
1667
|
-
[I]
|
|
1668
|
-
), bt = window.React.useCallback(() => {
|
|
1669
|
-
I && (I.state.hoverEle = void 0, I.setState({ ...I.state }));
|
|
1670
|
-
}, [I]);
|
|
1671
|
-
return /* @__PURE__ */ Ie.jsxs(
|
|
1672
|
-
"div",
|
|
1673
|
-
{
|
|
1674
|
-
className: `grid-drag-resize__item ${[
|
|
1675
|
-
...ve ? ["grid-drag-resize__item--draggable"] : [],
|
|
1676
|
-
...ve && !Ke ? ["grid-drag-resize__item--draggable-full"] : [],
|
|
1677
|
-
...yt && !(I != null && I.state.dragging) && !(I != null && I.state.resizing) ? ["grid-drag-resize__item--hover"] : [],
|
|
1678
|
-
...e.className ? [e.className] : []
|
|
1679
|
-
].join(" ")}`,
|
|
1680
|
-
style: { ...e.style, ...Mt },
|
|
1681
|
-
onMouseDown: (c) => Ke ? void 0 : r(c),
|
|
1682
|
-
onClick: be,
|
|
1683
|
-
onMouseOverCapture: _t,
|
|
1684
|
-
onMouseLeave: bt,
|
|
1685
|
-
ref: ge,
|
|
1686
|
-
children: [
|
|
1687
|
-
/* @__PURE__ */ Ie.jsx("div", { className: "grid-drag-resize__item__group", style: { overflow: Ut }, children: e.grid ? /* @__PURE__ */ Ie.jsx(
|
|
1688
|
-
Ln,
|
|
1689
|
-
{
|
|
1690
|
-
...e.grid,
|
|
1691
|
-
droppingChild: I == null ? void 0 : I.state.droppingChild,
|
|
1692
|
-
parentProps: vt,
|
|
1693
|
-
updateCells: () => {
|
|
1694
|
-
var c;
|
|
1695
|
-
return (c = vt == null ? void 0 : vt.updateCells) == null ? void 0 : c.call(vt, [...(vt == null ? void 0 : vt.cells) ?? []]);
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
) : (Ye = e.render) == null ? void 0 : Ye.call(e, e) }),
|
|
1699
|
-
Ht && /* @__PURE__ */ Ie.jsx(
|
|
1700
|
-
"div",
|
|
1701
|
-
{
|
|
1702
|
-
className: "grid-drag-resize__item__mask",
|
|
1703
|
-
onMouseDown: (c) => Ke ? void 0 : r(c),
|
|
1704
|
-
onClick: be,
|
|
1705
|
-
onMouseOverCapture: _t,
|
|
1706
|
-
onMouseLeave: bt,
|
|
1707
|
-
ref: mt
|
|
1708
|
-
}
|
|
1709
|
-
),
|
|
1710
|
-
/* @__PURE__ */ Ie.jsx("b", { className: "grid-drag-resize__item__border grid-drag-resize__item__border--top" }),
|
|
1711
|
-
/* @__PURE__ */ Ie.jsx("b", { className: "grid-drag-resize__item__border grid-drag-resize__item__border--bottom" }),
|
|
1712
|
-
/* @__PURE__ */ Ie.jsx("b", { className: "grid-drag-resize__item__border grid-drag-resize__item__border--left" }),
|
|
1713
|
-
/* @__PURE__ */ Ie.jsx("b", { className: "grid-drag-resize__item__border grid-drag-resize__item__border--right" }),
|
|
1714
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1715
|
-
"i",
|
|
1716
|
-
{
|
|
1717
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--top",
|
|
1718
|
-
style: { top: `${-Pe}px` },
|
|
1719
|
-
onMouseDown: (c) => ze(c, "top")
|
|
1720
|
-
}
|
|
1721
|
-
),
|
|
1722
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1723
|
-
"i",
|
|
1724
|
-
{
|
|
1725
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--right",
|
|
1726
|
-
style: { right: `${-Pe}px` },
|
|
1727
|
-
onMouseDown: (c) => ze(c, "right")
|
|
1728
|
-
}
|
|
1729
|
-
),
|
|
1730
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1731
|
-
"i",
|
|
1732
|
-
{
|
|
1733
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--bottom",
|
|
1734
|
-
style: { bottom: `${-Pe}px` },
|
|
1735
|
-
onMouseDown: (c) => ze(c, "bottom")
|
|
1736
|
-
}
|
|
1737
|
-
),
|
|
1738
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1739
|
-
"i",
|
|
1740
|
-
{
|
|
1741
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--left",
|
|
1742
|
-
style: { left: `${-Pe}px` },
|
|
1743
|
-
onMouseDown: (c) => ze(c, "left")
|
|
1744
|
-
}
|
|
1745
|
-
),
|
|
1746
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1747
|
-
"i",
|
|
1748
|
-
{
|
|
1749
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--top-left",
|
|
1750
|
-
style: { top: `${-Pe}px`, left: `${-Pe}px` },
|
|
1751
|
-
onMouseDown: (c) => ze(c, "top-left")
|
|
1752
|
-
}
|
|
1753
|
-
),
|
|
1754
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1755
|
-
"i",
|
|
1756
|
-
{
|
|
1757
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--top-right",
|
|
1758
|
-
style: { top: `${-Pe}px`, right: `${-Pe}px` },
|
|
1759
|
-
onMouseDown: (c) => ze(c, "top-right")
|
|
1760
|
-
}
|
|
1761
|
-
),
|
|
1762
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1763
|
-
"i",
|
|
1764
|
-
{
|
|
1765
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--bottom-left",
|
|
1766
|
-
style: { bottom: `${-Pe}px`, left: `${-Pe}px` },
|
|
1767
|
-
onMouseDown: (c) => ze(c, "bottom-left")
|
|
1768
|
-
}
|
|
1769
|
-
),
|
|
1770
|
-
/* @__PURE__ */ Ie.jsx(
|
|
1771
|
-
"i",
|
|
1772
|
-
{
|
|
1773
|
-
className: "grid-drag-resize__item__adjust grid-drag-resize__item__adjust--bottom-right",
|
|
1774
|
-
style: { bottom: `${-Pe}px`, right: `${-Pe}px` },
|
|
1775
|
-
onMouseDown: (c) => ze(c, "bottom-right")
|
|
1776
|
-
}
|
|
1777
|
-
),
|
|
1778
|
-
rt && !kt && /* @__PURE__ */ Ie.jsx(
|
|
1779
|
-
"span",
|
|
1780
|
-
{
|
|
1781
|
-
className: "grid-drag-resize__item__remove",
|
|
1782
|
-
style: { top: `${-Zt}px`, right: `${-Zt}px` },
|
|
1783
|
-
onClick: C,
|
|
1784
|
-
onMouseDown: (c) => c.stopPropagation(),
|
|
1785
|
-
onMouseMove: (c) => c.stopPropagation(),
|
|
1786
|
-
onMouseUp: (c) => c.stopPropagation()
|
|
1787
|
-
}
|
|
1788
|
-
),
|
|
1789
|
-
Ot && !pt && /* @__PURE__ */ Ie.jsx(
|
|
1790
|
-
"div",
|
|
1791
|
-
{
|
|
1792
|
-
className: "grid-drag-resize__item__drop",
|
|
1793
|
-
style: { top: Ot ? `${-At}px` : "" },
|
|
1794
|
-
draggable: "true",
|
|
1795
|
-
onMouseDown: (c) => {
|
|
1796
|
-
c.stopPropagation(), v();
|
|
1797
|
-
},
|
|
1798
|
-
onMouseMove: (c) => c.stopPropagation(),
|
|
1799
|
-
onMouseUp: (c) => c.stopPropagation(),
|
|
1800
|
-
onDragStart: (c) => c.stopPropagation(),
|
|
1801
|
-
onDragEnd: (c) => c.stopPropagation()
|
|
1802
|
-
}
|
|
1803
|
-
)
|
|
1804
|
-
]
|
|
1805
|
-
}
|
|
1806
|
-
);
|
|
1807
|
-
}
|
|
1808
|
-
let jn = 0;
|
|
1809
|
-
const zr = /* @__PURE__ */ new Map();
|
|
1810
|
-
function Mn(e) {
|
|
1811
|
-
if (zr.has(e))
|
|
1812
|
-
return zr.get(e);
|
|
1813
|
-
{
|
|
1814
|
-
const t = ++jn;
|
|
1815
|
-
return zr.set(e, t), t;
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
function Nn(e) {
|
|
1819
|
-
var t, n, s, f, _, E, g, i, u, d, p, y, R, b, j, N, S, P;
|
|
1820
|
-
const l = window.React.useContext(hr), M = window.React.useMemo(() => e.parentProps !== void 0, [e.parentProps]), K = window.React.useRef(1), ue = window.React.useRef(1), w = window.React.useRef(0), Z = window.React.useRef(), Me = window.React.useRef(), ie = window.React.useRef(), Ye = window.React.useRef(), I = window.React.useRef(), W = window.React.useRef(), ne = window.React.useRef(), X = window.React.useRef(), q = window.React.useRef(), ee = window.React.useRef(), fe = window.React.useRef(), We = window.React.useRef(), $e = window.React.useRef(), ce = window.React.useRef(), Ae = window.React.useRef("div"), F = window.React.useRef(), Oe = window.React.useRef();
|
|
1821
|
-
window.React.useEffect(() => {
|
|
1822
|
-
var o, m, h, x, H, z, D, Y, G, J, k, L, $, pe, Ee;
|
|
1823
|
-
K.current = e.columns || 1, ue.current = e.rows || 1, w.current = e.gap || 0, Z.current = e.overflow || ((o = e.parentProps) == null ? void 0 : o.overflow), Me.current = e.dragHandler || ((m = e.parentProps) == null ? void 0 : m.dragHandler), ie.current = e.dropOutHandler || ((h = e.parentProps) == null ? void 0 : h.dropOutHandler), Ye.current = e.removeHandler || ((x = e.parentProps) == null ? void 0 : x.removeHandler), I.current = e.readonly ?? ((H = e.parentProps) == null ? void 0 : H.readonly), W.current = I.current ? !1 : e.draggable ?? ((z = e.parentProps) == null ? void 0 : z.draggable), ne.current = I.current ? !1 : e.resizable ?? ((D = e.parentProps) == null ? void 0 : D.resizable), X.current = I.current ? !1 : e.removable ?? ((Y = e.parentProps) == null ? void 0 : Y.removable), q.current = I.current ? !1 : e.droppableOut ?? ((G = e.parentProps) == null ? void 0 : G.droppableOut), ee.current = e.mask ?? ((J = e.parentProps) == null ? void 0 : J.mask), fe.current = e.debug ?? ((k = e.parentProps) == null ? void 0 : k.debug), We.current = I.current ? !1 : e.droppableIn ?? ((L = e.parentProps) == null ? void 0 : L.droppableIn), Oe.current = We.current ?? !0, $e.current = e.beforeDrop ?? (($ = e.parentProps) == null ? void 0 : $.beforeDrop), ce.current = e.suffixClass || ((pe = e.parentProps) == null ? void 0 : pe.suffixClass), Ae.current = e.tagName || ((Ee = e.parentProps) == null ? void 0 : Ee.tagName) || "div";
|
|
1824
|
-
}, [e]), window.React.useEffect(() => {
|
|
1825
|
-
F.current = l.state.droppingChild ?? e.droppingChild;
|
|
1826
|
-
}, [l.state.droppingChild, e.droppingChild]);
|
|
1827
|
-
const [Xe, et] = window.React.useState(Ae.current), [Se, V] = window.React.useState(F.current), [A, se] = window.React.useState(ce.current), [Q, Dt] = window.React.useState(w.current);
|
|
1828
|
-
window.React.useEffect(() => {
|
|
1829
|
-
et(Ae.current);
|
|
1830
|
-
}, [e.tagName, (t = e.parentProps) == null ? void 0 : t.tagName]), window.React.useEffect(() => {
|
|
1831
|
-
V(F.current);
|
|
1832
|
-
}, [e.droppingChild, l.state.droppingChild]), window.React.useEffect(() => {
|
|
1833
|
-
se(ce.current);
|
|
1834
|
-
}, [e.suffixClass]), window.React.useEffect(() => {
|
|
1835
|
-
Dt(w.current);
|
|
1836
|
-
}, [e.gap]);
|
|
1837
|
-
const De = window.React.useRef(null), [he, Xt] = window.React.useState(De.current);
|
|
1838
|
-
window.React.useEffect(() => {
|
|
1839
|
-
Xt(De.current);
|
|
1840
|
-
}, []);
|
|
1841
|
-
const [Ot, dt] = window.React.useState(), pt = window.React.useRef();
|
|
1842
|
-
window.React.useEffect(() => {
|
|
1843
|
-
pt.current = {
|
|
1844
|
-
...e,
|
|
1845
|
-
//
|
|
1846
|
-
dragHandler: Me.current,
|
|
1847
|
-
dropOutHandler: ie.current,
|
|
1848
|
-
removeHandler: Ye.current,
|
|
1849
|
-
overflow: Z.current,
|
|
1850
|
-
//
|
|
1851
|
-
readonly: I.current,
|
|
1852
|
-
//
|
|
1853
|
-
draggable: W.current,
|
|
1854
|
-
resizable: ne.current,
|
|
1855
|
-
removable: X.current,
|
|
1856
|
-
droppableOut: q.current,
|
|
1857
|
-
mask: ee.current,
|
|
1858
|
-
//
|
|
1859
|
-
debug: fe.current,
|
|
1860
|
-
//
|
|
1861
|
-
droppableIn: We.current,
|
|
1862
|
-
//
|
|
1863
|
-
beforeDrop: $e.current,
|
|
1864
|
-
//
|
|
1865
|
-
suffixClass: ce.current,
|
|
1866
|
-
tagName: Ae.current
|
|
1867
|
-
}, dt(pt.current);
|
|
1868
|
-
}, [
|
|
1869
|
-
e.dragHandler,
|
|
1870
|
-
(n = e.parentProps) == null ? void 0 : n.dragHandler,
|
|
1871
|
-
e.dropOutHandler,
|
|
1872
|
-
(s = e.parentProps) == null ? void 0 : s.dropOutHandler,
|
|
1873
|
-
e.removeHandler,
|
|
1874
|
-
(f = e.parentProps) == null ? void 0 : f.removeHandler,
|
|
1875
|
-
e.overflow,
|
|
1876
|
-
(_ = e.parentProps) == null ? void 0 : _.overflow,
|
|
1877
|
-
e.readonly,
|
|
1878
|
-
(E = e.parentProps) == null ? void 0 : E.readonly,
|
|
1879
|
-
e.draggable,
|
|
1880
|
-
(g = e.parentProps) == null ? void 0 : g.draggable,
|
|
1881
|
-
e.resizable,
|
|
1882
|
-
(i = e.parentProps) == null ? void 0 : i.resizable,
|
|
1883
|
-
e.removable,
|
|
1884
|
-
(u = e.parentProps) == null ? void 0 : u.removable,
|
|
1885
|
-
e.droppableOut,
|
|
1886
|
-
(d = e.parentProps) == null ? void 0 : d.droppableOut,
|
|
1887
|
-
e.mask,
|
|
1888
|
-
(p = e.parentProps) == null ? void 0 : p.mask,
|
|
1889
|
-
e.debug,
|
|
1890
|
-
(y = e.parentProps) == null ? void 0 : y.debug,
|
|
1891
|
-
e.droppableIn,
|
|
1892
|
-
(R = e.parentProps) == null ? void 0 : R.droppableIn,
|
|
1893
|
-
e.beforeDrop,
|
|
1894
|
-
(b = e.parentProps) == null ? void 0 : b.beforeDrop,
|
|
1895
|
-
e.suffixClass,
|
|
1896
|
-
(j = e.parentProps) == null ? void 0 : j.suffixClass,
|
|
1897
|
-
e.tagName,
|
|
1898
|
-
(N = e.parentProps) == null ? void 0 : N.tagName
|
|
1899
|
-
]), fe.current && console.log(pt);
|
|
1900
|
-
const [nr, kt] = window.React.useState({
|
|
1901
|
-
columnStart: 1,
|
|
1902
|
-
columnEnd: 2,
|
|
1903
|
-
rowStart: 1,
|
|
1904
|
-
rowEnd: 2
|
|
1905
|
-
});
|
|
1906
|
-
window.React.useEffect(() => {
|
|
1907
|
-
kt({
|
|
1908
|
-
columnStart: (Se == null ? void 0 : Se.columnStart) ?? 1,
|
|
1909
|
-
columnEnd: (Se == null ? void 0 : Se.columnEnd) ?? 2,
|
|
1910
|
-
rowStart: (Se == null ? void 0 : Se.rowStart) ?? 1,
|
|
1911
|
-
rowEnd: (Se == null ? void 0 : Se.rowEnd) ?? 2
|
|
1912
|
-
});
|
|
1913
|
-
}, [Se]);
|
|
1914
|
-
const [Ge, rt] = window.React.useState();
|
|
1915
|
-
window.React.useEffect(() => {
|
|
1916
|
-
var o, m;
|
|
1917
|
-
l.state.droppingChildRaw && he ? rt(
|
|
1918
|
-
((o = e.cells) == null ? void 0 : o.includes(l.state.droppingChildRaw)) || ((m = l.state.droppingChildEle) == null ? void 0 : m.contains(he))
|
|
1919
|
-
) : rt(!1);
|
|
1920
|
-
}, [l.state.droppingChildRaw, l.state.droppingChildEle, he, e.cells]);
|
|
1921
|
-
const [Vt, Ut] = window.React.useState(!1);
|
|
1922
|
-
window.React.useEffect(() => {
|
|
1923
|
-
Ut(l.state.droppingEle === he && !Ge);
|
|
1924
|
-
}, [l.state.droppingEle, he, Ge]);
|
|
1925
|
-
const ae = window.React.useRef(), [Ke, St] = window.React.useState(), ve = window.React.useRef(1), Re = window.React.useRef(1), [Tt, It] = window.React.useState(ue.current), [Rt, ft] = window.React.useState(K.current);
|
|
1926
|
-
window.React.useEffect(() => {
|
|
1927
|
-
ve.current = e.rows || 1, Re.current = e.columns || 1;
|
|
1928
|
-
}, [e.rows, e.columns]), window.React.useEffect(() => {
|
|
1929
|
-
It(ve.current), ft(Re.current);
|
|
1930
|
-
}, [e.rows, e.columns]);
|
|
1931
|
-
const Ne = window.React.useMemo(
|
|
1932
|
-
() => e.rowExpandable && !Ge,
|
|
1933
|
-
[e.rowExpandable, Ge]
|
|
1934
|
-
), Ce = window.React.useMemo(
|
|
1935
|
-
() => e.columnExpandable && !Ge,
|
|
1936
|
-
[e.columnExpandable, Ge]
|
|
1937
|
-
), nt = window.React.useMemo(() => ({
|
|
1938
|
-
gridTemplateColumns: wt(
|
|
1939
|
-
Rt,
|
|
1940
|
-
e.columnExpandable ?? !1,
|
|
1941
|
-
e.columnSize,
|
|
1942
|
-
e.columnTemplate
|
|
1943
|
-
),
|
|
1944
|
-
gridTemplateRows: wt(
|
|
1945
|
-
Tt,
|
|
1946
|
-
e.rowExpandable ?? !1,
|
|
1947
|
-
e.rowSize,
|
|
1948
|
-
e.rowTemplate
|
|
1949
|
-
),
|
|
1950
|
-
gridGap: Q > 0 ? `${Q}px ${Q}px` : ""
|
|
1951
|
-
}), [
|
|
1952
|
-
Rt,
|
|
1953
|
-
e.columnSize,
|
|
1954
|
-
e.rowSize,
|
|
1955
|
-
Tt,
|
|
1956
|
-
Q,
|
|
1957
|
-
e.columnTemplate,
|
|
1958
|
-
e.rowTemplate,
|
|
1959
|
-
Ce,
|
|
1960
|
-
Ne
|
|
1961
|
-
]);
|
|
1962
|
-
window.React.useEffect(() => {
|
|
1963
|
-
l.state.droppingChild !== e.droppingChild && (l.state.droppingChild = { ...e.droppingChild }, l.setState({ ...l.state }));
|
|
1964
|
-
}, [e.droppingChild]);
|
|
1965
|
-
const ht = window.React.useCallback(() => {
|
|
1966
|
-
var o;
|
|
1967
|
-
(o = e.updateDroppingChild) == null || o.call(e, void 0), l.state.droppingChild = void 0, l.state.droppingChildEle = void 0, l.state.droppingChildRaw = void 0, l.state.droppingEle = void 0, l.state.droppingChildRemove = void 0, l.setState({ ...l.state });
|
|
1968
|
-
}, [l, e]), Le = window.React.useCallback(
|
|
1969
|
-
(o) => {
|
|
1970
|
-
o ? l.state.actionEle = De.current ?? void 0 : l.state.actionEle = void 0;
|
|
1971
|
-
},
|
|
1972
|
-
[l.state]
|
|
1973
|
-
);
|
|
1974
|
-
function Ct(o, m, h) {
|
|
1975
|
-
const x = re(o), H = m - x.length, z = Number.isInteger(h) ? `${h}px` : "1fr";
|
|
1976
|
-
return o + (H > 0 ? ` repeat(${H},${z})` : "");
|
|
1977
|
-
}
|
|
1978
|
-
function wt(o, m, h, x) {
|
|
1979
|
-
return x ? m ? Ct(x, o, h) : x : `repeat(${o},${Number.isInteger(h) ? `${h}px` : "1fr"})`;
|
|
1980
|
-
}
|
|
1981
|
-
const ke = window.React.useCallback(
|
|
1982
|
-
(o, m, h = []) => {
|
|
1983
|
-
const x = [...e.cells ?? [], ...h].reduce((H, z) => {
|
|
1984
|
-
const D = { rows: z.rowEnd, columns: z.columnEnd }[o];
|
|
1985
|
-
D && D > 1 && D - 1 > H && (H = D - 1);
|
|
1986
|
-
const Y = { rows: z.rows, columns: z.columns }[o] ?? 1;
|
|
1987
|
-
return Math.max(H, Y);
|
|
1988
|
-
}, 1);
|
|
1989
|
-
return m === void 0 || m < x ? x : m;
|
|
1990
|
-
},
|
|
1991
|
-
[e.cells]
|
|
1992
|
-
);
|
|
1993
|
-
window.React.useEffect(() => {
|
|
1994
|
-
var o, m;
|
|
1995
|
-
const h = ke(
|
|
1996
|
-
"rows",
|
|
1997
|
-
Math.max(ue.current, re(e.rowTemplate ?? "").length)
|
|
1998
|
-
);
|
|
1999
|
-
ve.current !== h && (ve.current = h, It(ve.current), (o = e.updateRows) == null || o.call(e, ve.current));
|
|
2000
|
-
const x = ke(
|
|
2001
|
-
"columns",
|
|
2002
|
-
Math.max(K.current, re(e.columnTemplate ?? "").length)
|
|
2003
|
-
);
|
|
2004
|
-
Re.current !== x && (Re.current = x, ft(Re.current), (m = e.updateColumns) == null || m.call(e, Re.current));
|
|
2005
|
-
}, [e, ke]), window.React.useEffect(() => {
|
|
2006
|
-
var o, m;
|
|
2007
|
-
const h = (o = e.cells) == null ? void 0 : o.find(
|
|
2008
|
-
(x) => [x.columns, x.columnStart, x.columnEnd, x.rows, x.rowStart, x.rowEnd].every(
|
|
2009
|
-
(H) => H !== void 0
|
|
2010
|
-
) && x.columns > 0 && x.columnStart < 1 && x.columnEnd < 1 && x.rows > 0 && x.rowStart < 1 && x.rowEnd < 1
|
|
2011
|
-
);
|
|
2012
|
-
if (h && e.cells) {
|
|
2013
|
-
const x = e.cells.filter(
|
|
2014
|
-
(J) => [J.columnStart, J.columnEnd, J.rowStart, J.rowEnd].every((k) => k !== void 0) && J.columnEnd > J.columnStart && J.rowEnd > J.rowStart
|
|
2015
|
-
);
|
|
2016
|
-
let H = !0, z = 1, D = z + h.columns, Y = 1, G = Y + h.rows;
|
|
2017
|
-
for (; H; Y++)
|
|
2018
|
-
for (G = Y + h.rows, z = 1; z + h.columns <= Re.current + 1 && H; z++) {
|
|
2019
|
-
D = z + h.columns;
|
|
2020
|
-
let J = !1;
|
|
2021
|
-
for (const k of x)
|
|
2022
|
-
if (!(!(z >= k.columnStart && z < k.columnEnd || D > k.columnStart && D <= k.columnEnd) || !(Y >= k.rowStart && Y < k.rowEnd || G > k.rowStart && G <= k.rowEnd))) {
|
|
2023
|
-
J = !0;
|
|
2024
|
-
break;
|
|
2025
|
-
}
|
|
2026
|
-
J || (H = !1);
|
|
2027
|
-
}
|
|
2028
|
-
H || (z = z - 1, Y = Y - 1, h.columnStart = z, h.columnEnd = D, h.rowStart = Y, h.rowEnd = G, (m = e.updateCells) == null || m.call(e, e.cells ? [...e.cells] : []));
|
|
2029
|
-
}
|
|
2030
|
-
}, [e, Rt]);
|
|
2031
|
-
function Ht(o, m, h, x) {
|
|
2032
|
-
const H = x.filter((D) => /\d+px/.test(D)), z = H.map((D) => parseInt(D) + h).reduce((D, Y) => D + Y, 0);
|
|
2033
|
-
return (o - z - h * (m - 1 - H.length)) / (m - H.length);
|
|
2034
|
-
}
|
|
2035
|
-
const Qe = window.React.useCallback(() => {
|
|
2036
|
-
let o = ((he == null ? void 0 : he.getBoundingClientRect()) ?? {
|
|
2037
|
-
width: 0
|
|
2038
|
-
}).width;
|
|
2039
|
-
return he && (o = o - [
|
|
2040
|
-
parseInt(window.getComputedStyle(he).paddingLeft),
|
|
2041
|
-
parseInt(window.getComputedStyle(he).paddingRight)
|
|
2042
|
-
].filter((m) => !isNaN(m)).reduce((m, h) => m + h, 0)), e.columnSize || Ht(
|
|
2043
|
-
o,
|
|
2044
|
-
Re.current,
|
|
2045
|
-
Q,
|
|
2046
|
-
e.columnTemplate ? re(e.columnTemplate) : []
|
|
2047
|
-
);
|
|
2048
|
-
}, [Rt, Q, e.columnSize, he, e.columnTemplate]), ge = window.React.useCallback(() => {
|
|
2049
|
-
let o = ((he == null ? void 0 : he.getBoundingClientRect()) ?? {
|
|
2050
|
-
height: 0
|
|
2051
|
-
}).height;
|
|
2052
|
-
return he && (o = o - [
|
|
2053
|
-
parseInt(window.getComputedStyle(he).paddingTop),
|
|
2054
|
-
parseInt(window.getComputedStyle(he).paddingBottom)
|
|
2055
|
-
].filter((m) => !isNaN(m)).reduce((m, h) => m + h, 0)), e.rowSize || Ht(
|
|
2056
|
-
o,
|
|
2057
|
-
ve.current,
|
|
2058
|
-
Q,
|
|
2059
|
-
e.rowTemplate ? re(e.rowTemplate) : []
|
|
2060
|
-
);
|
|
2061
|
-
}, [Tt, Q, e.rowSize, he, e.rowTemplate]), Pt = window.React.useRef(0), $t = window.React.useRef(0), mt = window.React.useRef(0), it = window.React.useRef(0), Ve = window.React.useRef(), vt = window.React.useRef(), Ue = window.React.useRef(""), [Jt, Pe] = window.React.useState(
|
|
2062
|
-
Ue.current
|
|
2063
|
-
), gt = window.React.useRef(""), Zt = window.React.useRef(), jt = window.React.useRef(0), At = window.React.useRef(0), Bt = window.React.useRef(0), st = window.React.useRef(0), ye = window.React.useRef(), [yt, Ft] = window.React.useState(ye.current), Mt = window.React.useRef(), r = window.React.useRef(), a = window.React.useRef(), v = window.React.useRef(0), C = window.React.useRef(0), te = window.React.useRef(0), B = window.React.useRef(0), le = window.React.useRef(0), we = window.React.useRef(0);
|
|
2064
|
-
function Be(o) {
|
|
2065
|
-
const m = o.match(/repeat\((\d+),(\d+(fr|px))\)/);
|
|
2066
|
-
return m ? new Array(parseInt(m[1])).fill(m[2]) : [o];
|
|
2067
|
-
}
|
|
2068
|
-
function re(o) {
|
|
2069
|
-
return o.trim().replace(/ {2,}/, " ").replace(/, /, ",").split(" ").map((m) => Be(m)).reduce((m, h) => m.concat(h), []);
|
|
2070
|
-
}
|
|
2071
|
-
function me(o) {
|
|
2072
|
-
const { size: m, gap: h, span: x, max: H, offset: z, startBefore: D, expandable: Y, template: G } = o;
|
|
2073
|
-
if (G) {
|
|
2074
|
-
const J = re(G).map(($) => /\d+px/.test($) ? parseInt($) : m);
|
|
2075
|
-
let k = 0, L = 0;
|
|
2076
|
-
for (; L < J.length && L < D && !(L > D); L++)
|
|
2077
|
-
k += J[L] + h;
|
|
2078
|
-
if (z > 0) {
|
|
2079
|
-
let $ = k;
|
|
2080
|
-
for (; L < J.length && ($ += J[L] + h, !(k + z < $)); L++)
|
|
2081
|
-
;
|
|
2082
|
-
if (Y && k + z > $) {
|
|
2083
|
-
const Ee = Math.round((k + z - $) / (m + h));
|
|
2084
|
-
L += Ee;
|
|
2085
|
-
}
|
|
2086
|
-
let pe = L;
|
|
2087
|
-
return !Y && pe + x > H + 1 && (pe = H + 1 - x), {
|
|
2088
|
-
start: pe,
|
|
2089
|
-
end: pe + x
|
|
2090
|
-
};
|
|
2091
|
-
} else {
|
|
2092
|
-
let $ = 0, pe = D - 2, Ee = 0;
|
|
2093
|
-
for (; pe >= 0 && ($ += J[pe] + h, !($ > Math.abs(z))); pe--, Ee++)
|
|
2094
|
-
;
|
|
2095
|
-
let Lt = D - Ee;
|
|
2096
|
-
return Lt < 1 && (Lt = 1), {
|
|
2097
|
-
start: Lt,
|
|
2098
|
-
end: Lt + x
|
|
2099
|
-
};
|
|
2100
|
-
}
|
|
2101
|
-
} else {
|
|
2102
|
-
const J = m + h ? Math.round(z / (m + h)) : 0;
|
|
2103
|
-
let k = D + J;
|
|
2104
|
-
return k < 1 && (k = 1), Y || k + x > H && (k = H - x + 1), {
|
|
2105
|
-
start: k,
|
|
2106
|
-
end: k + x
|
|
2107
|
-
};
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
function Fe(o) {
|
|
2111
|
-
const { size: m, gap: h, span: x, max: H, pos: z, expandable: D, template: Y } = o;
|
|
2112
|
-
if (Y) {
|
|
2113
|
-
const G = re(Y).map(($) => /\d+px/.test($) ? parseInt($) : m);
|
|
2114
|
-
let J = 0, k = 0;
|
|
2115
|
-
for (; k < G.length && (J += G[k] + h, !(z < J)); k++)
|
|
2116
|
-
;
|
|
2117
|
-
if (D && z - J > 0) {
|
|
2118
|
-
const $ = Math.floor((z - J) / (m + h));
|
|
2119
|
-
k += $;
|
|
2120
|
-
}
|
|
2121
|
-
let L = k + 1;
|
|
2122
|
-
return !D && L + x > H + 1 && (L = H + 1 - x), {
|
|
2123
|
-
start: L,
|
|
2124
|
-
end: L + x
|
|
2125
|
-
};
|
|
2126
|
-
} else {
|
|
2127
|
-
let G = m + h ? Math.ceil((z + h / 2) / (m + h)) : 0;
|
|
2128
|
-
return G < 1 && (G = 1), D || G + x > H && (G = H - x + 1), {
|
|
2129
|
-
start: G,
|
|
2130
|
-
end: G + x
|
|
2131
|
-
};
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
function Te(o) {
|
|
2135
|
-
const { size: m, gap: h, max: x, offset: H, startBefore: z, endBefore: D, target: Y, expandable: G, template: J } = o;
|
|
2136
|
-
if (J) {
|
|
2137
|
-
const k = re(J).map((L) => /\d+px/.test(L) ? parseInt(L) : m);
|
|
2138
|
-
if (Y === "start")
|
|
2139
|
-
if (H > 0) {
|
|
2140
|
-
let L = 0, $ = 0;
|
|
2141
|
-
for (; $ < k.length && $ < z - 1 && !($ > z - 1); $++)
|
|
2142
|
-
L += k[$] + h;
|
|
2143
|
-
let pe = L;
|
|
2144
|
-
for (; $ < k.length && (pe += k[$] + h, !(L + H < pe)); $++)
|
|
2145
|
-
;
|
|
2146
|
-
let Ee = $ + 1;
|
|
2147
|
-
return Ee + 1 > D && (Ee = D - 1), {
|
|
2148
|
-
start: Ee,
|
|
2149
|
-
end: D
|
|
2150
|
-
};
|
|
2151
|
-
} else {
|
|
2152
|
-
let L = 0, $ = z - 2, pe = 0;
|
|
2153
|
-
for (; $ >= 0 && (L += k[$] + h, !(L > Math.abs(H))); $--, pe++)
|
|
2154
|
-
;
|
|
2155
|
-
let Ee = z - pe;
|
|
2156
|
-
return Ee + 1 > D && (Ee = D - 1), {
|
|
2157
|
-
start: Ee,
|
|
2158
|
-
end: D
|
|
2159
|
-
};
|
|
2160
|
-
}
|
|
2161
|
-
else if (H > 0) {
|
|
2162
|
-
let L = 0, $ = 0;
|
|
2163
|
-
for (; $ < k.length && $ < D - 1 && !($ > D - 1); $++)
|
|
2164
|
-
L += k[$] + h;
|
|
2165
|
-
let pe = L;
|
|
2166
|
-
for (; $ < k.length && (pe += k[$] + h, !(L + H < pe)); $++)
|
|
2167
|
-
;
|
|
2168
|
-
if (G && L + H > pe) {
|
|
2169
|
-
const Lt = Math.round((L + H - pe) / (m + h));
|
|
2170
|
-
$ += Lt;
|
|
2171
|
-
}
|
|
2172
|
-
const Ee = $ + 1;
|
|
2173
|
-
return {
|
|
2174
|
-
start: z,
|
|
2175
|
-
end: Ee
|
|
2176
|
-
};
|
|
2177
|
-
} else {
|
|
2178
|
-
let L = 0, $ = D - 2, pe = 0;
|
|
2179
|
-
for (; $ >= 0 && (L += k[$] + h, !(L > Math.abs(H))); $--, pe++)
|
|
2180
|
-
;
|
|
2181
|
-
let Ee = D - pe;
|
|
2182
|
-
return Ee < z && (Ee = z), {
|
|
2183
|
-
start: z,
|
|
2184
|
-
end: Ee
|
|
2185
|
-
};
|
|
2186
|
-
}
|
|
2187
|
-
} else {
|
|
2188
|
-
const k = m + h ? Math.round(H / (m + h)) : 0;
|
|
2189
|
-
if (Y === "start") {
|
|
2190
|
-
let L = z + k;
|
|
2191
|
-
return L < 1 && (L = 1), L >= D && (L = D - 1), {
|
|
2192
|
-
start: L,
|
|
2193
|
-
end: D
|
|
2194
|
-
};
|
|
2195
|
-
} else {
|
|
2196
|
-
let L = D + k;
|
|
2197
|
-
return G || L > x && (L = x + 1), L <= z && (L = z + 1), {
|
|
2198
|
-
start: z,
|
|
2199
|
-
end: L
|
|
2200
|
-
};
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
|
-
const be = window.React.useCallback(() => {
|
|
2205
|
-
l.state.resizing = !1, l.setState({ ...l.state }), Le(!1), Ve.current = void 0, vt.current = void 0, Ue.current = "", Pe(Ue.current), gt.current = "", document.body.style.cursor = "";
|
|
2206
|
-
}, [l, Le]), ze = window.React.useCallback(() => {
|
|
2207
|
-
l.state.dragging = !1, l.setState({ ...l.state }), Le(!1), ye.current = void 0, Ft(ye.current), Mt.current = void 0, r.current = void 0, a.current = void 0;
|
|
2208
|
-
}, [l, Le]);
|
|
2209
|
-
function _t(o) {
|
|
2210
|
-
const m = o.getBoundingClientRect();
|
|
2211
|
-
return m.top >= 0 && m.left >= 0 && m.bottom <= (window.innerHeight || document.documentElement.clientHeight) && m.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
2212
|
-
}
|
|
2213
|
-
const bt = window.React.useCallback((o) => {
|
|
2214
|
-
o && (_t(o) || o.scrollIntoView());
|
|
2215
|
-
}, []), c = (o, m) => {
|
|
2216
|
-
const { event: h, rect: x } = o;
|
|
2217
|
-
h && h.currentTarget instanceof HTMLElement && He(m, x, h.currentTarget);
|
|
2218
|
-
}, O = window.React.useCallback(
|
|
2219
|
-
(...o) => {
|
|
2220
|
-
const m = o[0], { event: h, rect: x, cursor: H, direction: z } = m;
|
|
2221
|
-
h && h.currentTarget instanceof HTMLElement && h.currentTarget.parentElement instanceof HTMLElement && (Zt.current = h.currentTarget.parentElement), Pt.current = h.clientX, $t.current = h.clientY, jt.current = h.clientX, At.current = h.clientY, ze(), l.state.resizing = !0, l.setState({ ...l.state }), Le(!0), vt.current = x, Ue.current = H, Pe(Ue.current), gt.current = z, document.body.style.cursor = H, Ve.current = { ...ae.current };
|
|
2222
|
-
},
|
|
2223
|
-
[l, ze, Le]
|
|
2224
|
-
);
|
|
2225
|
-
function He(o, m, h) {
|
|
2226
|
-
ye.current = o, Ft(ye.current), Mt.current = { ...o }, r.current = m, a.current = h;
|
|
2227
|
-
}
|
|
2228
|
-
const Je = window.React.useRef(e.rowTemplate), ot = window.React.useRef(e.columnTemplate), U = window.React.useCallback(
|
|
2229
|
-
(o) => {
|
|
2230
|
-
Pt.current = o.clientX, $t.current = o.clientY, I.current || ye.current && r.current && (be(), l.state.dragging = !0, l.setState({ ...l.state }), Le(!0), v.current = o.clientX, C.current = o.clientY, Je.current = e.rowTemplate ? Ct(e.rowTemplate, ve.current, ge()) : "", ot.current = e.columnTemplate ? Ct(e.columnTemplate, Re.current, Qe()) : "");
|
|
2231
|
-
},
|
|
2232
|
-
[l, be, Le]
|
|
2233
|
-
), T = window.React.useCallback(
|
|
2234
|
-
(o) => {
|
|
2235
|
-
var m, h, x, H, z, D, Y, G, J, k, L, $, pe, Ee, Lt;
|
|
2236
|
-
if (l.state.dragging && ye.current) {
|
|
2237
|
-
B.current = o.clientX - v.current, te.current = o.clientY - C.current;
|
|
2238
|
-
let Ze = (ye.current.rowEnd ?? ye.current.rowStart ?? 1) - (ye.current.rowStart ?? 1), qe = (ye.current.columnEnd ?? ye.current.columnStart ?? 1) - (ye.current.columnStart ?? 1);
|
|
2239
|
-
Ze <= 0 && (Ze = 1), qe <= 0 && (qe = 1);
|
|
2240
|
-
const { start: tn, end: rn } = me({
|
|
2241
|
-
size: ge(),
|
|
2242
|
-
gap: w.current,
|
|
2243
|
-
span: Ze,
|
|
2244
|
-
max: ve.current ?? 1,
|
|
2245
|
-
offset: te.current,
|
|
2246
|
-
startBefore: ((m = Mt.current) == null ? void 0 : m.rowStart) ?? 1,
|
|
2247
|
-
direction: le.current,
|
|
2248
|
-
expandable: Ne ?? !1,
|
|
2249
|
-
template: Je.current
|
|
2250
|
-
});
|
|
2251
|
-
Ne && (ve.current = ke("rows", ue.current), It(ve.current));
|
|
2252
|
-
const { start: nn, end: sn } = me({
|
|
2253
|
-
size: Qe(),
|
|
2254
|
-
gap: w.current,
|
|
2255
|
-
span: qe,
|
|
2256
|
-
max: Re.current ?? 1,
|
|
2257
|
-
offset: B.current,
|
|
2258
|
-
startBefore: ((h = Mt.current) == null ? void 0 : h.columnStart) ?? 1,
|
|
2259
|
-
direction: we.current,
|
|
2260
|
-
expandable: Ce ?? !1,
|
|
2261
|
-
template: ot.current
|
|
2262
|
-
});
|
|
2263
|
-
Ce && (Re.current = ke("columns", K.current), ft(Re.current)), ye.current.columnStart = nn, ye.current.columnEnd = sn, ye.current.rowStart = tn, ye.current.rowEnd = rn, (x = e.updateCells) == null || x.call(e, e.cells ? [...e.cells] : []), bt(a.current);
|
|
2264
|
-
}
|
|
2265
|
-
if (l.state.resizing && ae.current) {
|
|
2266
|
-
if (st.current = o.clientX - jt.current, Bt.current = o.clientY - At.current, ae.current) {
|
|
2267
|
-
if (gt.current.startsWith("top")) {
|
|
2268
|
-
const { start: Ze, end: qe } = Te({
|
|
2269
|
-
size: ge(),
|
|
2270
|
-
gap: w.current,
|
|
2271
|
-
max: ve.current ?? 1,
|
|
2272
|
-
offset: Bt.current,
|
|
2273
|
-
startBefore: ((H = Ve.current) == null ? void 0 : H.rowStart) ?? 1,
|
|
2274
|
-
endBefore: ((z = Ve.current) == null ? void 0 : z.rowEnd) ?? 1,
|
|
2275
|
-
target: "start",
|
|
2276
|
-
expandable: Ne ?? !1,
|
|
2277
|
-
template: Je.current
|
|
2278
|
-
});
|
|
2279
|
-
ae.current.rows = qe - Ze, ae.current.rowStart = Ze, ae.current.rowEnd = qe, St(ae.current), (D = e.updateCells) == null || D.call(e, e.cells ? [...e.cells] : []);
|
|
2280
|
-
} else if (gt.current.startsWith("bottom")) {
|
|
2281
|
-
const { start: Ze, end: qe } = Te({
|
|
2282
|
-
size: ge(),
|
|
2283
|
-
gap: w.current,
|
|
2284
|
-
max: ve.current ?? 1,
|
|
2285
|
-
offset: Bt.current,
|
|
2286
|
-
startBefore: ((Y = Ve.current) == null ? void 0 : Y.rowStart) ?? 1,
|
|
2287
|
-
endBefore: ((G = Ve.current) == null ? void 0 : G.rowEnd) ?? 1,
|
|
2288
|
-
target: "end",
|
|
2289
|
-
expandable: Ne ?? !1,
|
|
2290
|
-
template: Je.current
|
|
2291
|
-
});
|
|
2292
|
-
ae.current.rows = qe - Ze, ae.current.rowStart = Ze, ae.current.rowEnd = qe, St(ae.current), (J = e.updateCells) == null || J.call(e, e.cells ? [...e.cells] : []), Ne && (ve.current = ke("rows", ue.current), It(ve.current));
|
|
2293
|
-
}
|
|
2294
|
-
if (gt.current.endsWith("left")) {
|
|
2295
|
-
const { start: Ze, end: qe } = Te({
|
|
2296
|
-
size: Qe(),
|
|
2297
|
-
gap: w.current,
|
|
2298
|
-
max: Re.current ?? 1,
|
|
2299
|
-
offset: st.current,
|
|
2300
|
-
startBefore: ((k = Ve.current) == null ? void 0 : k.columnStart) ?? 1,
|
|
2301
|
-
endBefore: ((L = Ve.current) == null ? void 0 : L.columnEnd) ?? 1,
|
|
2302
|
-
target: "start",
|
|
2303
|
-
expandable: Ce ?? !1,
|
|
2304
|
-
template: ot.current
|
|
2305
|
-
});
|
|
2306
|
-
ae.current.columns = qe - Ze, ae.current.columnStart = Ze, ae.current.columnEnd = qe, St(ae.current), ($ = e.updateCells) == null || $.call(e, e.cells ? [...e.cells] : []);
|
|
2307
|
-
} else if (gt.current.endsWith("right")) {
|
|
2308
|
-
const { start: Ze, end: qe } = Te({
|
|
2309
|
-
size: Qe(),
|
|
2310
|
-
gap: w.current,
|
|
2311
|
-
max: Re.current ?? 1,
|
|
2312
|
-
offset: st.current,
|
|
2313
|
-
startBefore: ((pe = Ve.current) == null ? void 0 : pe.columnStart) ?? 1,
|
|
2314
|
-
endBefore: ((Ee = Ve.current) == null ? void 0 : Ee.columnEnd) ?? 1,
|
|
2315
|
-
target: "end",
|
|
2316
|
-
expandable: Ce ?? !1,
|
|
2317
|
-
template: ot.current
|
|
2318
|
-
});
|
|
2319
|
-
ae.current.columns = qe - Ze, ae.current.columnStart = Ze, ae.current.columnEnd = qe, St(ae.current), (Lt = e.updateCells) == null || Lt.call(e, e.cells ? [...e.cells] : []), Ce && (Re.current = ke("columns", K.current), ft(Re.current));
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
bt(Zt.current);
|
|
2323
|
-
}
|
|
2324
|
-
},
|
|
2325
|
-
[
|
|
2326
|
-
ke,
|
|
2327
|
-
Ce,
|
|
2328
|
-
l.state.dragging,
|
|
2329
|
-
l.state.resizing,
|
|
2330
|
-
e,
|
|
2331
|
-
Ne,
|
|
2332
|
-
bt,
|
|
2333
|
-
Qe,
|
|
2334
|
-
ge
|
|
2335
|
-
]
|
|
2336
|
-
), _e = window.React.useCallback(
|
|
2337
|
-
(o) => {
|
|
2338
|
-
mt.current = o.clientX - Pt.current, it.current = o.clientY - $t.current, be(), ze();
|
|
2339
|
-
},
|
|
2340
|
-
[ze, be]
|
|
2341
|
-
), de = window.React.useCallback(() => {
|
|
2342
|
-
var o, m;
|
|
2343
|
-
Math.abs(mt.current) < 5 && Math.abs(it.current) < 5 && (l.state.selectedChild = void 0, l.setState({ ...l.state }), (o = e.updateSelectedChild) == null || o.call(e, void 0), (m = e.select) == null || m.call(e, void 0), ae.current = void 0, St(ae.current)), be(), ze();
|
|
2344
|
-
}, [l, ze, e, be]), je = window.React.useCallback(
|
|
2345
|
-
(o) => {
|
|
2346
|
-
var m, h;
|
|
2347
|
-
Math.abs(mt.current) < 5 && Math.abs(it.current) < 5 && (l.state.selectedChild = o, l.setState({ ...l.state }), (m = e.updateSelectedChild) == null || m.call(e, o), (h = e.select) == null || h.call(e, o));
|
|
2348
|
-
},
|
|
2349
|
-
[l, e]
|
|
2350
|
-
), oe = (o) => {
|
|
2351
|
-
Math.abs(mt.current) < 5 && Math.abs(it.current) < 5 && (ae.current = o, St(ae.current), ye.current = void 0, Ft(ye.current), Mt.current = void 0, r.current = void 0, a.current = void 0);
|
|
2352
|
-
};
|
|
2353
|
-
window.React.useEffect(() => (window.addEventListener("mousedown", U), () => {
|
|
2354
|
-
window.removeEventListener("mousedown", U);
|
|
2355
|
-
}), [U]), window.React.useEffect(() => (window.addEventListener("mousemove", T), () => {
|
|
2356
|
-
window.removeEventListener("mousemove", T);
|
|
2357
|
-
}), [T]), window.React.useEffect(() => (window.addEventListener("mouseup", _e), () => {
|
|
2358
|
-
window.removeEventListener("mouseup", _e);
|
|
2359
|
-
}), [_e]), window.React.useEffect(() => (window.addEventListener("click", de), () => {
|
|
2360
|
-
window.removeEventListener("click", de);
|
|
2361
|
-
}), [de]);
|
|
2362
|
-
const xe = window.React.useCallback(
|
|
2363
|
-
(o) => {
|
|
2364
|
-
var m, h, x;
|
|
2365
|
-
if (Oe.current && (o.stopPropagation(), o.preventDefault(), l.state.droppingEle !== De.current && (l.state.droppingEle = De.current ?? void 0, l.setState({ ...l.state })), F.current)) {
|
|
2366
|
-
const H = ((m = F.current) == null ? void 0 : m.rows) ?? 1, z = ((h = F.current) == null ? void 0 : h.columns) ?? 1, D = ((x = De == null ? void 0 : De.current) == null ? void 0 : x.getBoundingClientRect()) ?? {
|
|
2367
|
-
height: 0,
|
|
2368
|
-
width: 0,
|
|
2369
|
-
x: 0,
|
|
2370
|
-
y: 0
|
|
2371
|
-
};
|
|
2372
|
-
let Y = o.clientY - D.y;
|
|
2373
|
-
Y < 0 ? Y = 0 : !Ne && Y > D.height && (Y = D.height);
|
|
2374
|
-
let G = o.clientX - D.x;
|
|
2375
|
-
G < 0 ? G = 0 : !Ce && G > D.width && (G = D.width);
|
|
2376
|
-
const { start: J, end: k } = Fe({
|
|
2377
|
-
size: ge(),
|
|
2378
|
-
gap: w.current,
|
|
2379
|
-
span: H,
|
|
2380
|
-
max: ve.current ?? 1,
|
|
2381
|
-
pos: Y,
|
|
2382
|
-
expandable: Ne ?? !1,
|
|
2383
|
-
template: Gt.current
|
|
2384
|
-
});
|
|
2385
|
-
F.current && (F.current.rowStart = J, F.current.rowEnd = k, V({ ...F.current })), Ne && (ve.current = ke(
|
|
2386
|
-
"rows",
|
|
2387
|
-
ue.current,
|
|
2388
|
-
F.current ? [F.current] : []
|
|
2389
|
-
), It(ve.current));
|
|
2390
|
-
const { start: L, end: $ } = Fe({
|
|
2391
|
-
size: Qe(),
|
|
2392
|
-
gap: w.current,
|
|
2393
|
-
span: z,
|
|
2394
|
-
max: Re.current ?? 1,
|
|
2395
|
-
pos: G,
|
|
2396
|
-
expandable: Ce ?? !1,
|
|
2397
|
-
template: sr.current
|
|
2398
|
-
});
|
|
2399
|
-
F.current && (F.current.columnStart = L, F.current.columnEnd = $, V({ ...F.current })), Ce && (Re.current = ke(
|
|
2400
|
-
"columns",
|
|
2401
|
-
K.current,
|
|
2402
|
-
F.current ? [F.current] : []
|
|
2403
|
-
), ft(Re.current));
|
|
2404
|
-
}
|
|
2405
|
-
},
|
|
2406
|
-
[l, ke, Ce, Ne, Qe, ge]
|
|
2407
|
-
), xt = window.React.useCallback(
|
|
2408
|
-
(o) => {
|
|
2409
|
-
var m, h, x, H, z, D;
|
|
2410
|
-
if (Oe.current) {
|
|
2411
|
-
if (o.stopPropagation(), o.preventDefault(), F.current && !Ge) {
|
|
2412
|
-
(h = (m = l.state).droppingChildRemove) == null || h.call(m);
|
|
2413
|
-
let Y = { ...F.current };
|
|
2414
|
-
if ($e.current instanceof Function) {
|
|
2415
|
-
const G = $e.current(Y);
|
|
2416
|
-
G instanceof Promise ? G.then((J) => {
|
|
2417
|
-
var k, L;
|
|
2418
|
-
Y = J ?? Y, (k = e.cells) == null || k.push(Y), (L = e.updateCells) == null || L.call(e, e.cells ? [...e.cells] : []);
|
|
2419
|
-
}).catch((J) => {
|
|
2420
|
-
console.error(J);
|
|
2421
|
-
}) : (Y = G ?? Y, (x = e.cells) == null || x.push(Y), (H = e.updateCells) == null || H.call(e, e.cells ? [...e.cells] : []));
|
|
2422
|
-
} else
|
|
2423
|
-
(z = e.cells) == null || z.push(Y), (D = e.updateCells) == null || D.call(e, e.cells ? [...e.cells] : []);
|
|
2424
|
-
}
|
|
2425
|
-
ht();
|
|
2426
|
-
}
|
|
2427
|
-
},
|
|
2428
|
-
[l.state, ht, Ge, e]
|
|
2429
|
-
);
|
|
2430
|
-
window.React.useEffect(() => (M || window.addEventListener("dragover", xe), () => {
|
|
2431
|
-
M || window.removeEventListener("dragover", xe);
|
|
2432
|
-
}), [M, xe]);
|
|
2433
|
-
const at = window.React.useMemo(() => he && l.state && l.state.actionEle ? !l.state.actionEle.contains(he) || l.state.actionEle === he : !0, [l.state, he]), Et = window.React.useRef(!1), ir = window.React.useCallback(
|
|
2434
|
-
(o) => {
|
|
2435
|
-
Et.current = o.target === De.current, M && at && !Et.current && (o.stopPropagation(), U(o));
|
|
2436
|
-
},
|
|
2437
|
-
[M, U, at]
|
|
2438
|
-
), Kt = window.React.useCallback(
|
|
2439
|
-
(o) => {
|
|
2440
|
-
M && at && !Et.current && (o.stopPropagation(), T(o));
|
|
2441
|
-
},
|
|
2442
|
-
[T, at, M]
|
|
2443
|
-
), Nt = window.React.useCallback(
|
|
2444
|
-
(o) => {
|
|
2445
|
-
M && at && !Et.current && (o.stopPropagation(), _e(o)), Et.current = !1;
|
|
2446
|
-
},
|
|
2447
|
-
[_e, at, M]
|
|
2448
|
-
), cr = window.React.useCallback(
|
|
2449
|
-
(o) => {
|
|
2450
|
-
M && o.target !== De.current && (o.stopPropagation(), de());
|
|
2451
|
-
},
|
|
2452
|
-
[M, de]
|
|
2453
|
-
), Qt = window.React.useCallback(
|
|
2454
|
-
(o) => {
|
|
2455
|
-
var m;
|
|
2456
|
-
if (e.cells) {
|
|
2457
|
-
const h = e.cells.findIndex((x) => x === o);
|
|
2458
|
-
h > -1 && (e.cells.splice(h, 1), (m = e.updateCells) == null || m.call(e, e.cells ? [...e.cells] : []));
|
|
2459
|
-
}
|
|
2460
|
-
},
|
|
2461
|
-
[e]
|
|
2462
|
-
), Yt = window.React.useCallback((o) => {
|
|
2463
|
-
const m = {};
|
|
2464
|
-
for (const h in o)
|
|
2465
|
-
Array.isArray(o[h]) ? m[h] = o[h].map((x) => Yt(x)) : o[h] instanceof Function ? m[h] = o[h] : o[h] instanceof Object ? m[h] = Yt(o[h]) : m[h] = o[h];
|
|
2466
|
-
return m;
|
|
2467
|
-
}, []), qt = window.React.useCallback(
|
|
2468
|
-
(o, m) => {
|
|
2469
|
-
var h;
|
|
2470
|
-
l.state.droppingChild = Yt(o), l.state.droppingChildEle = m.ele ?? void 0, l.state.droppingChildRaw = o, l.state.droppingChildRemove = m.remove, l.setState({ ...l.state }), (h = e.updateDroppingChild) == null || h.call(e, l.state.droppingChild);
|
|
2471
|
-
},
|
|
2472
|
-
[l, Yt, e]
|
|
2473
|
-
), Gt = window.React.useRef(e.rowTemplate), sr = window.React.useRef(e.columnTemplate), er = window.React.useCallback(
|
|
2474
|
-
(o, m) => {
|
|
2475
|
-
qt(m, o), Gt.current = e.rowTemplate ? Ct(e.rowTemplate, ve.current, ge()) : "", sr.current = e.columnTemplate ? Ct(e.columnTemplate, Re.current, Qe()) : "";
|
|
2476
|
-
},
|
|
2477
|
-
[qt, e.rowTemplate, e.columnTemplate, ge, Qe]
|
|
2478
|
-
), tr = window.React.useCallback(
|
|
2479
|
-
(o) => {
|
|
2480
|
-
M && Oe.current && (o.stopPropagation(), xe(o));
|
|
2481
|
-
},
|
|
2482
|
-
[xe, M]
|
|
2483
|
-
), en = window.React.useCallback(() => {
|
|
2484
|
-
de(), ht();
|
|
2485
|
-
}, [de, ht]);
|
|
2486
|
-
return e.children ? window.React.createElement(
|
|
2487
|
-
Xe,
|
|
2488
|
-
{
|
|
2489
|
-
className: `grid-drag-resize ${[
|
|
2490
|
-
...A ? [A] : [],
|
|
2491
|
-
...M ? ["grid-drag-resize--sub"] : [],
|
|
2492
|
-
...e.className ? [e.className] : []
|
|
2493
|
-
].join(" ")}`,
|
|
2494
|
-
ref: De,
|
|
2495
|
-
style: {
|
|
2496
|
-
...e.style
|
|
2497
|
-
}
|
|
2498
|
-
},
|
|
2499
|
-
e.children
|
|
2500
|
-
) : window.React.createElement(
|
|
2501
|
-
Xe,
|
|
2502
|
-
{
|
|
2503
|
-
className: `grid-drag-resize ${[
|
|
2504
|
-
...A ? [A] : [],
|
|
2505
|
-
...M ? ["grid-drag-resize--sub"] : [],
|
|
2506
|
-
...Se && Vt ? ["grid-drag-resize--dropping"] : [],
|
|
2507
|
-
...e.className ? [e.className] : []
|
|
2508
|
-
].join(" ")}`,
|
|
2509
|
-
ref: De,
|
|
2510
|
-
style: {
|
|
2511
|
-
...e.style,
|
|
2512
|
-
...nt
|
|
2513
|
-
},
|
|
2514
|
-
//
|
|
2515
|
-
onDragOver: tr,
|
|
2516
|
-
onDrop: xt,
|
|
2517
|
-
onMouseDown: ir,
|
|
2518
|
-
onMouseMove: Kt,
|
|
2519
|
-
onMouseUp: Nt,
|
|
2520
|
-
onClick: cr
|
|
2521
|
-
},
|
|
2522
|
-
/* @__PURE__ */ Ie.jsxs(Ie.Fragment, { children: [
|
|
2523
|
-
(S = e.cells) == null ? void 0 : S.map((o, m) => {
|
|
2524
|
-
var h, x;
|
|
2525
|
-
const H = Mn(o);
|
|
2526
|
-
return /* @__PURE__ */ Ie.jsx(
|
|
2527
|
-
Yr,
|
|
2528
|
-
{
|
|
2529
|
-
...o,
|
|
2530
|
-
columnStart: o.columnStart,
|
|
2531
|
-
columnEnd: o.columnEnd,
|
|
2532
|
-
rowStart: o.rowStart,
|
|
2533
|
-
rowEnd: o.rowEnd,
|
|
2534
|
-
rows: o.rows,
|
|
2535
|
-
columns: o.columns,
|
|
2536
|
-
//
|
|
2537
|
-
updateColumnStart: (z) => {
|
|
2538
|
-
o.columnStart = z;
|
|
2539
|
-
},
|
|
2540
|
-
updateColumnEnd: (z) => {
|
|
2541
|
-
o.columnEnd = z;
|
|
2542
|
-
},
|
|
2543
|
-
updateRowStart: (z) => {
|
|
2544
|
-
o.rowStart = z;
|
|
2545
|
-
},
|
|
2546
|
-
updateRowEnd: (z) => {
|
|
2547
|
-
o.rowEnd = z;
|
|
2548
|
-
},
|
|
2549
|
-
updateRows: (z) => {
|
|
2550
|
-
o.rows = z;
|
|
2551
|
-
},
|
|
2552
|
-
updateColumns: (z) => {
|
|
2553
|
-
o.columns = z;
|
|
2554
|
-
},
|
|
2555
|
-
//
|
|
2556
|
-
startDrag: (z) => {
|
|
2557
|
-
c(z, o);
|
|
2558
|
-
},
|
|
2559
|
-
select: () => {
|
|
2560
|
-
je(o);
|
|
2561
|
-
},
|
|
2562
|
-
selectResizing: () => {
|
|
2563
|
-
oe(o);
|
|
2564
|
-
},
|
|
2565
|
-
startResize: (z) => {
|
|
2566
|
-
O(z);
|
|
2567
|
-
},
|
|
2568
|
-
remove: () => {
|
|
2569
|
-
Qt(o);
|
|
2570
|
-
},
|
|
2571
|
-
dropStart: (z) => {
|
|
2572
|
-
er(z, o);
|
|
2573
|
-
},
|
|
2574
|
-
dropEnd: () => {
|
|
2575
|
-
en();
|
|
2576
|
-
},
|
|
2577
|
-
className: [
|
|
2578
|
-
...yt === o ? ["grid-drag-resize__item--dragging"] : [],
|
|
2579
|
-
...l.state.selectedChild === o ? ["grid-drag-resize__item--selected"] : [],
|
|
2580
|
-
...l.state.selectedChild === o && Ke === o ? ["grid-drag-resize__item--resizing"] : []
|
|
2581
|
-
].join(" "),
|
|
2582
|
-
style: {
|
|
2583
|
-
zIndex: yt === o ? (((h = e.cells) == null ? void 0 : h.length) ?? 0) + 2 : l.state.selectedChild === o ? (((x = e.cells) == null ? void 0 : x.length) ?? 0) + 1 : m + 1,
|
|
2584
|
-
cursor: Jt
|
|
2585
|
-
},
|
|
2586
|
-
parentProps: Ot
|
|
2587
|
-
},
|
|
2588
|
-
H
|
|
2589
|
-
);
|
|
2590
|
-
}),
|
|
2591
|
-
Se && Vt && /* @__PURE__ */ Ie.jsx(
|
|
2592
|
-
Yr,
|
|
2593
|
-
{
|
|
2594
|
-
draggable: !1,
|
|
2595
|
-
resizable: !1,
|
|
2596
|
-
...nr,
|
|
2597
|
-
className: "grid-drag-resize__item--shadow",
|
|
2598
|
-
style: {
|
|
2599
|
-
zIndex: (((P = e.cells) == null ? void 0 : P.length) ?? 0) + 3
|
|
2600
|
-
}
|
|
2601
|
-
},
|
|
2602
|
-
0
|
|
2603
|
-
)
|
|
2604
|
-
] })
|
|
2605
|
-
);
|
|
2606
|
-
}
|
|
2607
|
-
function Ln(e) {
|
|
2608
|
-
const [t, n] = window.React.useState({
|
|
2609
|
-
dragging: !1,
|
|
2610
|
-
resizing: !1,
|
|
2611
|
-
//
|
|
2612
|
-
droppingChild: e.droppingChild,
|
|
2613
|
-
droppingChildRaw: e.droppingChild,
|
|
2614
|
-
selectedChild: e.selectedChild
|
|
2615
|
-
}), s = window.React.useContext(hr) ?? {
|
|
2616
|
-
state: t,
|
|
2617
|
-
setState: n
|
|
2618
|
-
};
|
|
2619
|
-
return /* @__PURE__ */ Ie.jsx(hr.Provider, { value: s, children: /* @__PURE__ */ Ie.jsx(
|
|
2620
|
-
Nn,
|
|
2621
|
-
{
|
|
2622
|
-
...e,
|
|
2623
|
-
parentProps: { ...e.parentProps, ...e }
|
|
2624
|
-
}
|
|
2625
|
-
) });
|
|
2626
|
-
}
|
|
2627
1391
|
export {
|
|
2628
|
-
|
|
2629
|
-
Ln as GridDragResize,
|
|
2630
|
-
Ln as default
|
|
1392
|
+
Qi as Allotment
|
|
2631
1393
|
};
|
|
2632
1394
|
//# sourceMappingURL=libraries.js.map
|