@blockbite/libraries 0.11.6 → 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/libraries.js CHANGED
@@ -1,17 +1,17 @@
1
- function lr() {
2
- return lr = Object.assign ? Object.assign.bind() : function(e) {
3
- for (var t = 1; t < arguments.length; t++) {
4
- var n = arguments[t];
5
- for (var s in n) ({}).hasOwnProperty.call(n, s) && (e[s] = n[s]);
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 e;
8
- }, lr.apply(null, arguments);
7
+ return u;
8
+ }, ke.apply(null, arguments);
9
9
  }
10
- var Wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
11
- function ur(e) {
12
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
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 xr, Er = {
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 wr, Ir, Cr, on = (xr || (xr = 1, wr = Er, (function() {
23
- var e = {}.hasOwnProperty;
24
- function t() {
25
- for (var n = [], s = 0; s < arguments.length; s++) {
26
- var f = arguments[s];
27
- if (f) {
28
- var _ = typeof f;
29
- if (_ === "string" || _ === "number") n.push(f);
30
- else if (Array.isArray(f)) {
31
- if (f.length) {
32
- var E = t.apply(null, f);
33
- E && n.push(E);
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 (_ === "object") if (f.toString === Object.prototype.toString) for (var g in f) e.call(f, g) && f[g] && n.push(g);
36
- else n.push(f.toString());
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 n.join(" ");
40
- }
41
- wr.exports ? (t.default = t, wr.exports = t) : window.classNames = t;
42
- })()), Er.exports), Sr = ur(on), Pr, zt = ur((function() {
43
- if (Cr) return Ir;
44
- Cr = 1;
45
- var e = /^\s+|\s+$/g, t = /^[-+]0x[0-9a-f]+$/i, n = /^0b[01]+$/i, s = /^0o[0-7]+$/i, f = parseInt, _ = Object.prototype.toString;
46
- function E(i) {
47
- var u = typeof i;
48
- return !!i && (u == "object" || u == "function");
49
- }
50
- function g(i) {
51
- if (typeof i == "number") return i;
52
- if ((function(p) {
53
- return typeof p == "symbol" || /* @__PURE__ */ (function(y) {
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
- })(p) && _.call(p) == "[object Symbol]";
56
- })(i)) return NaN;
57
- if (E(i)) {
58
- var u = typeof i.valueOf == "function" ? i.valueOf() : i;
59
- i = E(u) ? u + "" : u;
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 i != "string") return i === 0 ? i : +i;
62
- i = i.replace(e, "");
63
- var d = n.test(i);
64
- return d || s.test(i) ? f(i.slice(2), d ? 2 : 8) : t.test(i) ? NaN : +i;
65
- }
66
- return Ir = function(i, u, d) {
67
- return d === void 0 && (d = u, u = void 0), d !== void 0 && (d = (d = g(d)) == d ? d : 0), u !== void 0 && (u = (u = g(u)) == u ? u : 0), (function(p, y, R) {
68
- return p == p && (R !== void 0 && (p = p <= R ? p : R), y !== void 0 && (p = p >= y ? p : y)), p;
69
- })(g(i), u, d);
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
- })()), mr = {
71
+ })()), vt = {
72
72
  exports: {}
73
- }, an = (Pr || (Pr = 1, (function(e, t) {
74
- var n = "__lodash_hash_undefined__", s = 9007199254740991, f = "[object Arguments]", _ = "[object Array]", E = "[object Boolean]", g = "[object Date]", i = "[object Error]", u = "[object Function]", d = "[object Map]", p = "[object Number]", y = "[object Object]", R = "[object Promise]", b = "[object RegExp]", j = "[object Set]", N = "[object String]", S = "[object Symbol]", P = "[object WeakMap]", l = "[object ArrayBuffer]", M = "[object DataView]", K = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, w = {};
75
- w["[object Float32Array]"] = w["[object Float64Array]"] = w["[object Int8Array]"] = w["[object Int16Array]"] = w["[object Int32Array]"] = w["[object Uint8Array]"] = w["[object Uint8ClampedArray]"] = w["[object Uint16Array]"] = w["[object Uint32Array]"] = !0, w[f] = w[_] = w[l] = w[E] = w[M] = w[g] = w[i] = w[u] = w[d] = w[p] = w[y] = w[b] = w[j] = w[N] = w[P] = !1;
76
- var Z = typeof Wt == "object" && Wt && Wt.Object === Object && Wt, Me = typeof self == "object" && self && self.Object === Object && self, ie = Z || Me || Function("return this")(), Ye = t && !t.nodeType && t, I = Ye && e && !e.nodeType && e, W = I && I.exports === Ye, ne = W && Z.process, X = (function() {
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 ne && ne.binding && ne.binding("util");
78
+ return k && k.binding && k.binding("util");
79
79
  } catch {
80
80
  }
81
- })(), q = X && X.isTypedArray;
82
- function ee(r, a) {
83
- for (var v = -1, C = r == null ? 0 : r.length; ++v < C; ) if (a(r[v], v, r)) return !0;
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 fe(r) {
87
- var a = -1, v = Array(r.size);
88
- return r.forEach(function(C, te) {
89
- v[++a] = [te, C];
90
- }), v;
91
- }
92
- function We(r) {
93
- var a = -1, v = Array(r.size);
94
- return r.forEach(function(C) {
95
- v[++a] = C;
96
- }), v;
97
- }
98
- var $e, ce, Ae, F = Array.prototype, Oe = Function.prototype, Xe = Object.prototype, et = ie["__core-js_shared__"], Se = Oe.toString, V = Xe.hasOwnProperty, A = ($e = /[^.]+$/.exec(et && et.keys && et.keys.IE_PROTO || "")) ? "Symbol(src)_1." + $e : "", se = Xe.toString, Q = RegExp("^" + Se.call(V).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Dt = W ? ie.Buffer : void 0, De = ie.Symbol, he = ie.Uint8Array, Xt = Xe.propertyIsEnumerable, Ot = F.splice, dt = De ? De.toStringTag : void 0, pt = Object.getOwnPropertySymbols, nr = Dt ? Dt.isBuffer : void 0, kt = (ce = Object.keys, Ae = Object, function(r) {
99
- return ce(Ae(r));
100
- }), Ge = Ve(ie, "DataView"), rt = Ve(ie, "Map"), Vt = Ve(ie, "Promise"), Ut = Ve(ie, "Set"), ae = Ve(ie, "WeakMap"), Ke = Ve(Object, "create"), St = Pe(Ge), ve = Pe(rt), Re = Pe(Vt), Tt = Pe(Ut), It = Pe(ae), Rt = De ? De.prototype : void 0, ft = Rt ? Rt.valueOf : void 0;
101
- function Ne(r) {
102
- var a = -1, v = r == null ? 0 : r.length;
103
- for (this.clear(); ++a < v; ) {
104
- var C = r[a];
105
- this.set(C[0], C[1]);
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 Ce(r) {
109
- var a = -1, v = r == null ? 0 : r.length;
110
- for (this.clear(); ++a < v; ) {
111
- var C = r[a];
112
- this.set(C[0], C[1]);
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 nt(r) {
116
- var a = -1, v = r == null ? 0 : r.length;
117
- for (this.clear(); ++a < v; ) {
118
- var C = r[a];
119
- this.set(C[0], C[1]);
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 ht(r) {
123
- var a = -1, v = r == null ? 0 : r.length;
124
- for (this.__data__ = new nt(); ++a < v; ) this.add(r[a]);
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 Le(r) {
127
- var a = this.__data__ = new Ce(r);
128
- this.size = a.size;
126
+ function pe(t) {
127
+ var s = this.__data__ = new ce(t);
128
+ this.size = s.size;
129
129
  }
130
- function Ct(r, a) {
131
- var v = jt(r), C = !v && Zt(r), te = !v && !C && At(r), B = !v && !C && !te && Ft(r), le = v || C || te || B, we = le ? (function(me, Fe) {
132
- for (var Te = -1, be = Array(me); ++Te < me; ) be[Te] = Fe(Te);
133
- return be;
134
- })(r.length, String) : [], Be = we.length;
135
- for (var re in r) !V.call(r, re) || le && (re == "length" || te && (re == "offset" || re == "parent") || B && (re == "buffer" || re == "byteLength" || re == "byteOffset") || Jt(re, Be)) || we.push(re);
136
- return we;
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 wt(r, a) {
139
- for (var v = r.length; v--; ) if (gt(r[v][0], a)) return v;
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 ke(r) {
143
- return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : dt && dt in Object(r) ? (function(a) {
144
- var v = V.call(a, dt), C = a[dt];
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
- a[dt] = void 0;
147
- var te = !0;
146
+ s[ze] = void 0;
147
+ var T = !0;
148
148
  } catch {
149
149
  }
150
- var B = se.call(a);
151
- return te && (v ? a[dt] = C : delete a[dt]), B;
152
- })(r) : (function(a) {
153
- return se.call(a);
154
- })(r);
155
- }
156
- function Ht(r) {
157
- return yt(r) && ke(r) == f;
158
- }
159
- function Qe(r, a, v, C, te) {
160
- return r === a || (r == null || a == null || !yt(r) && !yt(a) ? r != r && a != a : (function(B, le, we, Be, re, me) {
161
- var Fe = jt(B), Te = jt(le), be = Fe ? _ : Ue(B), ze = Te ? _ : Ue(le), _t = (be = be == f ? y : be) == y, bt = (ze = ze == f ? y : ze) == y, c = be == ze;
162
- if (c && At(B)) {
163
- if (!At(le)) return !1;
164
- Fe = !0, _t = !1;
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 (c && !_t) return me || (me = new Le()), Fe || Ft(B) ? $t(B, le, we, Be, re, me) : (function(U, T, _e, de, je, oe, xe) {
167
- switch (_e) {
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
- var xt = fe;
184
- case j:
185
- var at = 1 & de;
186
- if (xt || (xt = We), U.size != T.size && !at) return !1;
187
- var Et = xe.get(U);
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
- if (ft) return ft.call(U) == ft.call(T);
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
- })(B, le, be, we, Be, re, me);
197
- if (!(1 & we)) {
198
- var O = _t && V.call(B, "__wrapped__"), He = bt && V.call(le, "__wrapped__");
199
- if (O || He) {
200
- var Je = O ? B.value() : B, ot = He ? le.value() : le;
201
- return me || (me = new Le()), re(Je, ot, we, Be, me);
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 !!c && (me || (me = new Le()), (function(U, T, _e, de, je, oe) {
205
- var xe = 1 & _e, xt = mt(U), at = xt.length, Et = mt(T), ir = Et.length;
206
- if (at != ir && !xe) return !1;
207
- for (var Kt = at; Kt--; ) {
208
- var Nt = xt[Kt];
209
- if (!(xe ? Nt in T : V.call(T, Nt))) return !1;
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 cr = oe.get(U);
212
- if (cr && oe.get(T)) return cr == T;
213
- var Qt = !0;
214
- oe.set(U, T), oe.set(T, U);
215
- for (var Yt = xe; ++Kt < at; ) {
216
- var qt = U[Nt = xt[Kt]], Gt = T[Nt];
217
- if (de) var sr = xe ? de(Gt, qt, Nt, T, U, oe) : de(qt, Gt, Nt, U, T, oe);
218
- if (!(sr === void 0 ? qt === Gt || je(qt, Gt, _e, de, oe) : sr)) {
219
- Qt = !1;
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
- Yt || (Yt = Nt == "constructor");
222
+ dt || (dt = Ee == "constructor");
223
223
  }
224
- if (Qt && !Yt) {
225
- var er = U.constructor, tr = T.constructor;
226
- er == tr || !("constructor" in U) || !("constructor" in T) || typeof er == "function" && er instanceof er && typeof tr == "function" && tr instanceof tr || (Qt = !1);
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 oe.delete(U), oe.delete(T), Qt;
229
- })(B, le, we, Be, re, me));
230
- })(r, a, v, C, Qe, te));
231
- }
232
- function ge(r) {
233
- return !(!ye(r) || (function(a) {
234
- return !!A && A in a;
235
- })(r)) && (Bt(r) ? Q : K).test(Pe(r));
236
- }
237
- function Pt(r) {
238
- if (v = (a = r) && a.constructor, C = typeof v == "function" && v.prototype || Xe, a !== C) return kt(r);
239
- var a, v, C, te = [];
240
- for (var B in Object(r)) V.call(r, B) && B != "constructor" && te.push(B);
241
- return te;
242
- }
243
- function $t(r, a, v, C, te, B) {
244
- var le = 1 & v, we = r.length, Be = a.length;
245
- if (we != Be && !(le && Be > we)) return !1;
246
- var re = B.get(r);
247
- if (re && B.get(a)) return re == a;
248
- var me = -1, Fe = !0, Te = 2 & v ? new ht() : void 0;
249
- for (B.set(r, a), B.set(a, r); ++me < we; ) {
250
- var be = r[me], ze = a[me];
251
- if (C) var _t = le ? C(ze, be, me, a, r, B) : C(be, ze, me, r, a, B);
252
- if (_t !== void 0) {
253
- if (_t) continue;
254
- Fe = !1;
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 (Te) {
258
- if (!ee(a, function(bt, c) {
259
- if (O = c, !Te.has(O) && (be === bt || te(be, bt, v, C, B))) return Te.push(c);
260
- var O;
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
- Fe = !1;
262
+ ae = !1;
263
263
  break;
264
264
  }
265
- } else if (be !== ze && !te(be, ze, v, C, B)) {
266
- Fe = !1;
265
+ } else if (Z !== fe && !T(Z, fe, f, _, j)) {
266
+ ae = !1;
267
267
  break;
268
268
  }
269
269
  }
270
- return B.delete(r), B.delete(a), Fe;
271
- }
272
- function mt(r) {
273
- return (function(a, v, C) {
274
- var te = v(a);
275
- return jt(a) ? te : (function(B, le) {
276
- for (var we = -1, Be = le.length, re = B.length; ++we < Be; ) B[re + we] = le[we];
277
- return B;
278
- })(te, C(a));
279
- })(r, Mt, vt);
280
- }
281
- function it(r, a) {
282
- var v, C, te = r.__data__;
283
- return ((C = typeof (v = a)) == "string" || C == "number" || C == "symbol" || C == "boolean" ? v !== "__proto__" : v === null) ? te[typeof a == "string" ? "string" : "hash"] : te.map;
284
- }
285
- function Ve(r, a) {
286
- var v = (function(C, te) {
287
- return C == null ? void 0 : C[te];
288
- })(r, a);
289
- return ge(v) ? v : void 0;
290
- }
291
- Ne.prototype.clear = function() {
292
- this.__data__ = Ke ? Ke(null) : {}, this.size = 0;
293
- }, Ne.prototype.delete = function(r) {
294
- var a = this.has(r) && delete this.__data__[r];
295
- return this.size -= a ? 1 : 0, a;
296
- }, Ne.prototype.get = function(r) {
297
- var a = this.__data__;
298
- if (Ke) {
299
- var v = a[r];
300
- return v === n ? void 0 : v;
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 V.call(a, r) ? a[r] : void 0;
303
- }, Ne.prototype.has = function(r) {
304
- var a = this.__data__;
305
- return Ke ? a[r] !== void 0 : V.call(a, r);
306
- }, Ne.prototype.set = function(r, a) {
307
- var v = this.__data__;
308
- return this.size += this.has(r) ? 0 : 1, v[r] = Ke && a === void 0 ? n : a, this;
309
- }, Ce.prototype.clear = function() {
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
- }, Ce.prototype.delete = function(r) {
312
- var a = this.__data__, v = wt(a, r);
313
- return !(v < 0 || (v == a.length - 1 ? a.pop() : Ot.call(a, v, 1), --this.size, 0));
314
- }, Ce.prototype.get = function(r) {
315
- var a = this.__data__, v = wt(a, r);
316
- return v < 0 ? void 0 : a[v][1];
317
- }, Ce.prototype.has = function(r) {
318
- return wt(this.__data__, r) > -1;
319
- }, Ce.prototype.set = function(r, a) {
320
- var v = this.__data__, C = wt(v, r);
321
- return C < 0 ? (++this.size, v.push([r, a])) : v[C][1] = a, this;
322
- }, nt.prototype.clear = function() {
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 Ne(),
325
- map: new (rt || Ce)(),
326
- string: new Ne()
324
+ hash: new Se(),
325
+ map: new (Ne || ce)(),
326
+ string: new Se()
327
327
  };
328
- }, nt.prototype.delete = function(r) {
329
- var a = it(this, r).delete(r);
330
- return this.size -= a ? 1 : 0, a;
331
- }, nt.prototype.get = function(r) {
332
- return it(this, r).get(r);
333
- }, nt.prototype.has = function(r) {
334
- return it(this, r).has(r);
335
- }, nt.prototype.set = function(r, a) {
336
- var v = it(this, r), C = v.size;
337
- return v.set(r, a), this.size += v.size == C ? 0 : 1, this;
338
- }, ht.prototype.add = ht.prototype.push = function(r) {
339
- return this.__data__.set(r, n), this;
340
- }, ht.prototype.has = function(r) {
341
- return this.__data__.has(r);
342
- }, Le.prototype.clear = function() {
343
- this.__data__ = new Ce(), this.size = 0;
344
- }, Le.prototype.delete = function(r) {
345
- var a = this.__data__, v = a.delete(r);
346
- return this.size = a.size, v;
347
- }, Le.prototype.get = function(r) {
348
- return this.__data__.get(r);
349
- }, Le.prototype.has = function(r) {
350
- return this.__data__.has(r);
351
- }, Le.prototype.set = function(r, a) {
352
- var v = this.__data__;
353
- if (v instanceof Ce) {
354
- var C = v.__data__;
355
- if (!rt || C.length < 199) return C.push([r, a]), this.size = ++v.size, this;
356
- v = this.__data__ = new nt(C);
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 v.set(r, a), this.size = v.size, this;
358
+ return f.set(t, s), this.size = f.size, this;
359
359
  };
360
- var vt = pt ? function(r) {
361
- return r == null ? [] : (r = Object(r), (function(a, v) {
362
- for (var C = -1, te = a == null ? 0 : a.length, B = 0, le = []; ++C < te; ) {
363
- var we = a[C];
364
- v(we, C, a) && (le[B++] = we);
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 le;
367
- })(pt(r), function(a) {
368
- return Xt.call(r, a);
366
+ return H;
367
+ })(Et(t), function(s) {
368
+ return xt.call(t, s);
369
369
  }));
370
370
  } : function() {
371
371
  return [];
372
- }, Ue = ke;
373
- function Jt(r, a) {
374
- return !!(a = a ?? s) && (typeof r == "number" || ue.test(r)) && r > -1 && r % 1 == 0 && r < a;
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 Pe(r) {
377
- if (r != null) {
376
+ function xe(t) {
377
+ if (t != null) {
378
378
  try {
379
- return Se.call(r);
379
+ return je.call(t);
380
380
  } catch {
381
381
  }
382
382
  try {
383
- return r + "";
383
+ return t + "";
384
384
  } catch {
385
385
  }
386
386
  }
387
387
  return "";
388
388
  }
389
- function gt(r, a) {
390
- return r === a || r != r && a != a;
391
- }
392
- (Ge && Ue(new Ge(new ArrayBuffer(1))) != M || rt && Ue(new rt()) != d || Vt && Ue(Vt.resolve()) != R || Ut && Ue(new Ut()) != j || ae && Ue(new ae()) != P) && (Ue = function(r) {
393
- var a = ke(r), v = a == y ? r.constructor : void 0, C = v ? Pe(v) : "";
394
- if (C) switch (C) {
395
- case St:
396
- return M;
397
- case ve:
398
- return d;
399
- case Re:
400
- return R;
401
- case Tt:
402
- return j;
403
- case It:
404
- return P;
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 a;
406
+ return s;
407
407
  });
408
- var Zt = Ht(/* @__PURE__ */ (function() {
408
+ var xi = jt(/* @__PURE__ */ (function() {
409
409
  return arguments;
410
- })()) ? Ht : function(r) {
411
- return yt(r) && V.call(r, "callee") && !Xt.call(r, "callee");
412
- }, jt = Array.isArray, At = nr || function() {
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 Bt(r) {
416
- if (!ye(r)) return !1;
417
- var a = ke(r);
418
- return a == u || a == "[object GeneratorFunction]" || a == "[object AsyncFunction]" || a == "[object Proxy]";
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 st(r) {
421
- return typeof r == "number" && r > -1 && r % 1 == 0 && r <= s;
420
+ function Mt(t) {
421
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= r;
422
422
  }
423
- function ye(r) {
424
- var a = typeof r;
425
- return r != null && (a == "object" || a == "function");
423
+ function Pt(t) {
424
+ var s = typeof t;
425
+ return t != null && (s == "object" || s == "function");
426
426
  }
427
- function yt(r) {
428
- return r != null && typeof r == "object";
427
+ function Ae(t) {
428
+ return t != null && typeof t == "object";
429
429
  }
430
- var Ft = q ? /* @__PURE__ */ (function(r) {
431
- return function(a) {
432
- return r(a);
430
+ var At = N ? /* @__PURE__ */ (function(t) {
431
+ return function(s) {
432
+ return t(s);
433
433
  };
434
- })(q) : function(r) {
435
- return yt(r) && st(r.length) && !!w[ke(r)];
434
+ })(N) : function(t) {
435
+ return Ae(t) && Mt(t.length) && !!h[Pe(t)];
436
436
  };
437
- function Mt(r) {
438
- return (a = r) != null && st(a.length) && !Bt(a) ? Ct(r) : Pt(r);
439
- var a;
437
+ function Ei(t) {
438
+ return (s = t) != null && Mt(s.length) && !Nt(s) ? _i(t) : zi(t);
439
+ var s;
440
440
  }
441
- e.exports = function(r, a) {
442
- return Qe(r, a);
441
+ u.exports = function(t, s) {
442
+ return Dt(t, s);
443
443
  };
444
- })(mr, mr.exports)), mr.exports), ln = ur(an);
445
- function jr(e, t, n) {
446
- return e[t] ? e[t][0] ? e[t][0][n] : e[t][n] : t === "contentBoxSize" ? e.contentRect[n === "inlineSize" ? "width" : "height"] : void 0;
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 un(e) {
449
- e === void 0 && (e = {});
450
- var t = e.onResize, n = window.React.useRef(void 0);
451
- n.current = t;
452
- var s = e.round || Math.round, f = window.React.useRef(), _ = window.React.useState({
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
- }), E = _[0], g = _[1], i = window.React.useRef(!1);
455
+ }), g = m[0], d = m[1], n = window.React.useRef(!1);
456
456
  window.React.useEffect(function() {
457
- return i.current = !1, function() {
458
- i.current = !0;
457
+ return n.current = !1, function() {
458
+ n.current = !0;
459
459
  };
460
460
  }, []);
461
- var u = window.React.useRef({
461
+ var o = window.React.useRef({
462
462
  width: void 0,
463
463
  height: void 0
464
- }), d = (function(p, y) {
465
- var R = window.React.useRef(null), b = window.React.useRef(null);
466
- b.current = y;
467
- var j = window.React.useRef(null);
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
- N();
469
+ S();
470
470
  });
471
- var N = window.React.useCallback(function() {
472
- var S = j.current, P = b.current, l = S || (P ? P instanceof Element ? P : P.current : null);
473
- R.current && R.current.element === l && R.current.subscriber === p || (R.current && R.current.cleanup && R.current.cleanup(), R.current = {
474
- element: l,
475
- subscriber: p,
476
- cleanup: l ? p(l) : void 0
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
- }, [p]);
478
+ }, [a]);
479
479
  return window.React.useEffect(function() {
480
480
  return function() {
481
- R.current && R.current.cleanup && (R.current.cleanup(), R.current = null);
481
+ w.current && w.current.cleanup && (w.current.cleanup(), w.current = null);
482
482
  };
483
- }, []), window.React.useCallback(function(S) {
484
- j.current = S, N();
485
- }, [N]);
486
- })(window.React.useCallback(function(p) {
487
- return f.current && f.current.box === e.box && f.current.round === s || (f.current = {
488
- box: e.box,
489
- round: s,
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 R = y[0], b = e.box === "border-box" ? "borderBoxSize" : e.box === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", j = jr(R, b, "inlineSize"), N = jr(R, b, "blockSize"), S = j ? s(j) : void 0, P = N ? s(N) : void 0;
492
- if (u.current.width !== S || u.current.height !== P) {
493
- var l = {
494
- width: S,
495
- height: P
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
- u.current.width = S, u.current.height = P, n.current ? n.current(l) : i.current || g(l);
497
+ o.current.width = p, o.current.height = b, i.current ? i.current(I) : n.current || d(I);
498
498
  }
499
499
  })
500
- }), f.current.instance.observe(p, {
501
- box: e.box
500
+ }), l.current.instance.observe(a, {
501
+ box: u.box
502
502
  }), function() {
503
- f.current && f.current.instance.unobserve(p);
503
+ l.current && l.current.instance.unobserve(a);
504
504
  };
505
- }, [e.box, s]), e.ref);
505
+ }, [u.box, r]), u.ref);
506
506
  return window.React.useMemo(function() {
507
507
  return {
508
- ref: d,
509
- width: E.width,
510
- height: E.height
508
+ ref: c,
509
+ width: g.width,
510
+ height: g.height
511
511
  };
512
- }, [d, E.width, E.height]);
512
+ }, [c, g.width, g.height]);
513
513
  }
514
- var cn = "allotment-module_splitView__L-yRc", dn = "allotment-module_sashContainer__fzwJF", pn = "allotment-module_splitViewContainer__rQnVa", Wr = "allotment-module_splitViewView__MGZ6O", fn = "allotment-module_vertical__WSwwa", hn = "allotment-module_horizontal__7doS8", wn = "allotment-module_separatorBorder__x-rDS";
515
- let or, Xr = !1, Ur = !1;
516
- typeof navigator == "object" && (or = navigator.userAgent, Ur = or.indexOf("Macintosh") >= 0, Xr = (or.indexOf("Macintosh") >= 0 || or.indexOf("iPad") >= 0 || or.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
517
- const Jr = Xr, mn = Ur, Mr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? window.React.useLayoutEffect : window.React.useEffect;
518
- class vn {
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(t) {
526
- this._size = t;
525
+ setSize(e) {
526
+ this._size = e;
527
527
  }
528
528
  }
529
- function dr(e, t) {
530
- const n = e.length, s = n - t.length;
531
- return s >= 0 && e.slice(s, n) === t;
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 Nr, Lr = {
533
+ var Ut, Xt = {
534
534
  exports: {}
535
- }, Dr, Or, gn = (Nr || (Nr = 1, (function(e) {
536
- var t = Object.prototype.hasOwnProperty, n = "~";
537
- function s() {
538
- }
539
- function f(i, u, d) {
540
- this.fn = i, this.context = u, this.once = d || !1;
541
- }
542
- function _(i, u, d, p, y) {
543
- if (typeof d != "function") throw new TypeError("The listener must be a function");
544
- var R = new f(d, p || i, y), b = n ? n + u : u;
545
- return i._events[b] ? i._events[b].fn ? i._events[b] = [i._events[b], R] : i._events[b].push(R) : (i._events[b] = R, i._eventsCount++), i;
546
- }
547
- function E(i, u) {
548
- --i._eventsCount == 0 ? i._events = new s() : delete i._events[u];
549
- }
550
- function g() {
551
- this._events = new s(), this._eventsCount = 0;
552
- }
553
- Object.create && (s.prototype = /* @__PURE__ */ Object.create(null), new s().__proto__ || (n = !1)), g.prototype.eventNames = function() {
554
- var i, u, d = [];
555
- if (this._eventsCount === 0) return d;
556
- for (u in i = this._events) t.call(i, u) && d.push(n ? u.slice(1) : u);
557
- return Object.getOwnPropertySymbols ? d.concat(Object.getOwnPropertySymbols(i)) : d;
558
- }, g.prototype.listeners = function(i) {
559
- var u = n ? n + i : i, d = this._events[u];
560
- if (!d) return [];
561
- if (d.fn) return [d.fn];
562
- for (var p = 0, y = d.length, R = new Array(y); p < y; p++) R[p] = d[p].fn;
563
- return R;
564
- }, g.prototype.listenerCount = function(i) {
565
- var u = n ? n + i : i, d = this._events[u];
566
- return d ? d.fn ? 1 : d.length : 0;
567
- }, g.prototype.emit = function(i, u, d, p, y, R) {
568
- var b = n ? n + i : i;
569
- if (!this._events[b]) return !1;
570
- var j, N, S = this._events[b], P = arguments.length;
571
- if (S.fn) {
572
- switch (S.once && this.removeListener(i, S.fn, void 0, !0), P) {
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 S.fn.call(S.context), !0;
574
+ return p.fn.call(p.context), !0;
575
575
  case 2:
576
- return S.fn.call(S.context, u), !0;
576
+ return p.fn.call(p.context, o), !0;
577
577
  case 3:
578
- return S.fn.call(S.context, u, d), !0;
578
+ return p.fn.call(p.context, o, c), !0;
579
579
  case 4:
580
- return S.fn.call(S.context, u, d, p), !0;
580
+ return p.fn.call(p.context, o, c, a), !0;
581
581
  case 5:
582
- return S.fn.call(S.context, u, d, p, y), !0;
582
+ return p.fn.call(p.context, o, c, a, y), !0;
583
583
  case 6:
584
- return S.fn.call(S.context, u, d, p, y, R), !0;
584
+ return p.fn.call(p.context, o, c, a, y, w), !0;
585
585
  }
586
- for (N = 1, j = new Array(P - 1); N < P; N++) j[N - 1] = arguments[N];
587
- S.fn.apply(S.context, j);
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 l, M = S.length;
590
- for (N = 0; N < M; N++) switch (S[N].once && this.removeListener(i, S[N].fn, void 0, !0), P) {
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[N].fn.call(S[N].context);
592
+ p[S].fn.call(p[S].context);
593
593
  break;
594
594
  case 2:
595
- S[N].fn.call(S[N].context, u);
595
+ p[S].fn.call(p[S].context, o);
596
596
  break;
597
597
  case 3:
598
- S[N].fn.call(S[N].context, u, d);
598
+ p[S].fn.call(p[S].context, o, c);
599
599
  break;
600
600
  case 4:
601
- S[N].fn.call(S[N].context, u, d, p);
601
+ p[S].fn.call(p[S].context, o, c, a);
602
602
  break;
603
603
  default:
604
- if (!j) for (l = 1, j = new Array(P - 1); l < P; l++) j[l - 1] = arguments[l];
605
- S[N].fn.apply(S[N].context, j);
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
- }, g.prototype.on = function(i, u, d) {
610
- return _(this, i, u, d, !1);
611
- }, g.prototype.once = function(i, u, d) {
612
- return _(this, i, u, d, !0);
613
- }, g.prototype.removeListener = function(i, u, d, p) {
614
- var y = n ? n + i : i;
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 (!u) return E(this, y), this;
617
- var R = this._events[y];
618
- if (R.fn) R.fn !== u || p && !R.once || d && R.context !== d || E(this, y);
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 b = 0, j = [], N = R.length; b < N; b++) (R[b].fn !== u || p && !R[b].once || d && R[b].context !== d) && j.push(R[b]);
621
- j.length ? this._events[y] = j.length === 1 ? j[0] : j : E(this, y);
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
- }, g.prototype.removeAllListeners = function(i) {
625
- var u;
626
- return i ? (u = n ? n + i : i, this._events[u] && E(this, u)) : (this._events = new s(), this._eventsCount = 0), this;
627
- }, g.prototype.off = g.prototype.removeListener, g.prototype.addListener = g.prototype.on, g.prefixed = n, g.EventEmitter = g, e.exports = g;
628
- })(Lr)), Lr.exports), Rr = ur(gn);
629
- function kr(e, t) {
630
- const n = e.indexOf(t);
631
- n > -1 && (e.splice(n, 1), e.unshift(t));
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 vr(e, t) {
634
- const n = e.indexOf(t);
635
- n > -1 && (e.splice(n, 1), e.push(t));
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 lt(e, t, n = 1) {
638
- const s = Math.max(0, Math.ceil((t - e) / n)), f = new Array(s);
639
- let _ = -1;
640
- for (; ++_ < s; ) f[_] = e + _ * n;
641
- return f;
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 _n = ur((function() {
644
- if (Or) return Dr;
645
- Or = 1;
646
- var e = /^\s+|\s+$/g, t = /^[-+]0x[0-9a-f]+$/i, n = /^0b[01]+$/i, s = /^0o[0-7]+$/i, f = parseInt, _ = typeof Wt == "object" && Wt && Wt.Object === Object && Wt, E = typeof self == "object" && self && self.Object === Object && self, g = _ || E || Function("return this")(), i = Object.prototype.toString, u = Math.max, d = Math.min, p = function() {
647
- return g.Date.now();
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(b) {
650
- var j = typeof b;
651
- return !!b && (j == "object" || j == "function");
652
- }
653
- function R(b) {
654
- if (typeof b == "number") return b;
655
- if ((function(S) {
656
- return typeof S == "symbol" || /* @__PURE__ */ (function(P) {
657
- return !!P && typeof P == "object";
658
- })(S) && i.call(S) == "[object Symbol]";
659
- })(b)) return NaN;
660
- if (y(b)) {
661
- var j = typeof b.valueOf == "function" ? b.valueOf() : b;
662
- b = y(j) ? j + "" : j;
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 b != "string") return b === 0 ? b : +b;
665
- b = b.replace(e, "");
666
- var N = n.test(b);
667
- return N || s.test(b) ? f(b.slice(2), N ? 2 : 8) : t.test(b) ? NaN : +b;
668
- }
669
- return Dr = function(b, j, N) {
670
- var S, P, l, M, K, ue, w = 0, Z = !1, Me = !1, ie = !0;
671
- if (typeof b != "function") throw new TypeError("Expected a function");
672
- function Ye(q) {
673
- var ee = S, fe = P;
674
- return S = P = void 0, w = q, M = b.apply(fe, ee);
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 I(q) {
677
- var ee = q - ue;
678
- return ue === void 0 || ee >= j || ee < 0 || Me && q - w >= l;
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 W() {
681
- var q = p();
682
- if (I(q)) return ne(q);
683
- K = setTimeout(W, (function(ee) {
684
- var fe = j - (ee - ue);
685
- return Me ? d(fe, l - (ee - w)) : fe;
686
- })(q));
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 ne(q) {
689
- return K = void 0, ie && S ? Ye(q) : (S = P = void 0, M);
688
+ function k(N) {
689
+ return C = void 0, F && p ? oe(N) : (p = b = void 0, E);
690
690
  }
691
- function X() {
692
- var q = p(), ee = I(q);
693
- if (S = arguments, P = this, ue = q, ee) {
694
- if (K === void 0) return (function(fe) {
695
- return w = fe, K = setTimeout(W, j), Z ? Ye(fe) : M;
696
- })(ue);
697
- if (Me) return K = setTimeout(W, j), Ye(ue);
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 K === void 0 && (K = setTimeout(W, j)), M;
699
+ return C === void 0 && (C = setTimeout(D, z)), E;
700
700
  }
701
- return j = R(j) || 0, y(N) && (Z = !!N.leading, l = (Me = "maxWait" in N) ? u(R(N.maxWait) || 0, j) : l, ie = "trailing" in N ? !!N.trailing : ie), X.cancel = function() {
702
- K !== void 0 && clearTimeout(K), w = 0, S = ue = P = K = void 0;
703
- }, X.flush = function() {
704
- return K === void 0 ? M : ne(p());
705
- }, X;
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
- })()), bn = "sash-module_sash__K-9lB", zn = "sash-module_disabled__Hm-wx", Sn = "sash-module_mac__Jf6OJ", Vr = "sash-module_vertical__pB-rs", Rn = "sash-module_minimum__-UKxp", yn = "sash-module_maximum__TCWxD", Tr = "sash-module_horizontal__kFbiw", gr = "sash-module_hover__80W6I", _r = "sash-module_active__bJspD";
708
- let ct = (function(e) {
709
- return e.Vertical = "VERTICAL", e.Horizontal = "HORIZONTAL", e;
710
- })({}), tt = (function(e) {
711
- return e.Disabled = "DISABLED", e.Minimum = "MINIMUM", e.Maximum = "MAXIMUM", e.Enabled = "ENABLED", e;
712
- })({}), Zr = Jr ? 20 : 8;
713
- const qr = new Rr();
714
- class Hr extends Rr {
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(t) {
719
- this._state !== t && (this.el.classList.toggle(zn, t === tt.Disabled), this.el.classList.toggle("sash-disabled", t === tt.Disabled), this.el.classList.toggle(Rn, t === tt.Minimum), this.el.classList.toggle("sash-minimum", t === tt.Minimum), this.el.classList.toggle(yn, t === tt.Maximum), this.el.classList.toggle("sash-maximum", t === tt.Maximum), this._state = t, this.emit("enablementChange", t));
720
- }
721
- constructor(t, n, s) {
722
- var f;
723
- super(), this.el = void 0, this.layoutProvider = void 0, this.orientation = void 0, this.size = void 0, this.hoverDelay = 300, this.hoverDelayer = _n((_) => _.classList.add("sash-hover", gr), this.hoverDelay), this._state = tt.Enabled, this.onPointerStart = (_) => {
724
- const E = _.pageX, g = _.pageY, i = {
725
- startX: E,
726
- currentX: E,
727
- startY: g,
728
- currentY: g
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", _r), this.emit("start", i), this.el.setPointerCapture(_.pointerId);
731
- const u = (p) => {
732
- p.preventDefault();
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: E,
735
- currentX: p.pageX,
736
- startY: g,
737
- currentY: p.pageY
734
+ startX: g,
735
+ currentX: a.pageX,
736
+ startY: d,
737
+ currentY: a.pageY
738
738
  };
739
739
  this.emit("change", y);
740
- }, d = (p) => {
741
- p.preventDefault(), this.el.classList.remove("sash-active", _r), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(p.pointerId), window.removeEventListener("pointermove", u), window.removeEventListener("pointerup", d);
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", u), window.addEventListener("pointerup", d);
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(_r) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", gr)) : this.hoverDelayer(this.el);
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", gr);
750
- }, this.el = document.createElement("div"), this.el.classList.add("sash", bn), this.el.dataset.testid = "sash", t.append(this.el), mn && this.el.classList.add("sash-mac", Sn), 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 s.size == "number" ? (this.size = s.size, s.orientation === ct.Vertical ? this.el.style.width = `${this.size}px` : this.el.style.height = `${this.size}px`) : (this.size = Zr, qr.on("onDidChangeGlobalSize", (_) => {
751
- this.size = _, this.layout();
752
- })), this.layoutProvider = n, this.orientation = (f = s.orientation) != null ? f : ct.Vertical, this.orientation === ct.Horizontal ? (this.el.classList.add("sash-horizontal", Tr), this.el.classList.remove("sash-vertical", Vr)) : (this.el.classList.remove("sash-horizontal", Tr), this.el.classList.add("sash-vertical", Vr)), this.layout();
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 === ct.Vertical) {
756
- const t = this.layoutProvider;
757
- this.el.style.left = t.getVerticalSashLeft(this) - this.size / 2 + "px", t.getVerticalSashTop && (this.el.style.top = t.getVerticalSashTop(this) + "px"), t.getVerticalSashHeight && (this.el.style.height = t.getVerticalSashHeight(this) + "px");
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 t = this.layoutProvider;
760
- this.el.style.top = t.getHorizontalSashTop(this) - this.size / 2 + "px", t.getHorizontalSashLeft && (this.el.style.left = t.getHorizontalSashLeft(this) + "px"), t.getHorizontalSashWidth && (this.el.style.width = t.getHorizontalSashWidth(this) + "px");
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 fr;
768
- var br;
769
- (br = fr || (fr = {})).Distribute = {
767
+ let rt;
768
+ var gt;
769
+ (gt = rt || (rt = {})).Distribute = {
770
770
  type: "distribute"
771
- }, br.Split = function(e) {
771
+ }, gt.Split = function(u) {
772
772
  return {
773
773
  type: "split",
774
- index: e
774
+ index: u
775
775
  };
776
- }, br.Invisible = function(e) {
776
+ }, gt.Invisible = function(u) {
777
777
  return {
778
778
  type: "invisible",
779
- cachedVisibleSize: e
779
+ cachedVisibleSize: u
780
780
  };
781
781
  };
782
- let ut = (function(e) {
783
- return e.Normal = "NORMAL", e.Low = "LOW", e.High = "HIGH", e;
782
+ let ie = (function(u) {
783
+ return u.Normal = "NORMAL", u.Low = "LOW", u.High = "HIGH", u;
784
784
  })({});
785
- class Gr {
786
- constructor(t, n, s) {
787
- this.container = void 0, this.view = void 0, this._size = void 0, this._cachedVisibleSize = void 0, this.container = t, this.view = n, this.container.classList.add("split-view-view", Wr), this.container.dataset.testid = "split-view-view", typeof s == "number" ? (this._size = s, this._cachedVisibleSize = void 0, t.classList.add("split-view-view-visible")) : (this._size = 0, this._cachedVisibleSize = s.cachedVisibleSize);
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(t) {
790
- this._size = t;
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(t, n) {
808
- t !== this.visible && (t ? (this.size = zt(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = typeof n == "number" ? n : this.size, this.size = 0), this.container.classList.toggle("split-view-view-visible", t), this.view.setVisible && this.view.setVisible(t));
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(t) {
823
- this.container.style.pointerEvents = t ? "" : "none";
822
+ set enabled(e) {
823
+ this.container.style.pointerEvents = e ? "" : "none";
824
824
  }
825
- layout(t) {
826
- this.layoutContainer(t), this.view.layout(this.size, t);
825
+ layout(e) {
826
+ this.layoutContainer(e), this.view.layout(this.size, e);
827
827
  }
828
828
  }
829
- class xn extends Gr {
830
- layoutContainer(t) {
831
- this.container.style.left = `${t}px`, this.container.style.width = `${this.size}px`;
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 En extends Gr {
835
- layoutContainer(t) {
836
- this.container.style.top = `${t}px`, this.container.style.height = `${this.size}px`;
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 In extends Rr {
839
+ class Ki extends bt {
840
840
  get startSnappingEnabled() {
841
841
  return this._startSnappingEnabled;
842
842
  }
843
- set startSnappingEnabled(t) {
844
- this._startSnappingEnabled !== t && (this._startSnappingEnabled = t, this.updateSashEnablement());
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(t) {
850
- this._endSnappingEnabled !== t && (this._endSnappingEnabled = t, this.updateSashEnablement());
851
- }
852
- constructor(t, n = {}, s, f, _) {
853
- var E, g;
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 = (i) => {
855
- this.emit("sashchange", i), this.saveProportions();
856
- for (const u of this.viewItems) u.enabled = !0;
857
- }, this.orientation = (E = n.orientation) != null ? E : ct.Vertical, this.proportionalLayout = (g = n.proportionalLayout) != null ? g : !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, s && (this.onDidChange = s), f && (this.onDidDragStart = f), _ && (this.onDidDragEnd = _), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", dn), t.prepend(this.sashContainer), n.descriptor) {
858
- this.size = n.descriptor.size;
859
- for (const [i, u] of n.descriptor.views.entries()) {
860
- const d = u.size, p = u.container, y = u.view;
861
- this.addView(p, y, d, i, !0);
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((i, u) => i + u.size, 0), this.saveProportions();
863
+ this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0), this.saveProportions();
864
864
  }
865
865
  }
866
- addView(t, n, s, f = this.viewItems.length, _) {
867
- let E;
868
- E = typeof s == "number" ? s : s.type === "split" ? this.getViewSize(s.index) / 2 : s.type === "invisible" ? {
869
- cachedVisibleSize: s.cachedVisibleSize
870
- } : n.minimumSize;
871
- const g = this.orientation === ct.Vertical ? new En(t, n, E) : new xn(t, n, E);
872
- if (this.viewItems.splice(f, 0, g), this.viewItems.length > 1) {
873
- const i = this.orientation === ct.Vertical ? new Hr(this.sashContainer, {
874
- getHorizontalSashTop: (p) => this.getSashPosition(p),
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: ct.Horizontal
878
- }) : new Hr(this.sashContainer, {
879
- getVerticalSashLeft: (p) => this.getSashPosition(p),
877
+ orientation: ne.Horizontal
878
+ }) : new ei(this.sashContainer, {
879
+ getVerticalSashLeft: (a) => this.getSashPosition(a),
880
880
  getVerticalSashHeight: this.getSashOrthogonalSize
881
881
  }, {
882
- orientation: ct.Vertical
883
- }), u = this.orientation === ct.Vertical ? (p) => ({
884
- sash: i,
885
- start: p.startY,
886
- current: p.currentY
887
- }) : (p) => ({
888
- sash: i,
889
- start: p.startX,
890
- current: p.currentX
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
- i.on("start", (p) => {
892
+ n.on("start", (a) => {
893
893
  var y;
894
- this.emit("sashDragStart"), this.onSashStart(u(p));
895
- const R = this.viewItems.map((b) => b.size);
896
- (y = this.onDidDragStart) == null || y.call(this, R);
897
- }), i.on("change", (p) => this.onSashChange(u(p))), i.on("end", () => {
898
- var p;
899
- this.emit("sashDragEnd"), this.onSashEnd(this.sashItems.findIndex((R) => R.sash === i));
900
- const y = this.viewItems.map((R) => R.size);
901
- (p = this.onDidDragEnd) == null || p.call(this, y);
902
- }), i.on("reset", () => {
903
- const p = this.sashItems.findIndex((N) => N.sash === i), y = lt(p, -1, -1), R = lt(p + 1, this.viewItems.length), b = this.findFirstSnapIndex(y), j = this.findFirstSnapIndex(R);
904
- (typeof b != "number" || this.viewItems[b].visible) && (typeof j != "number" || this.viewItems[j].visible) && this.emit("sashreset", p);
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 d = {
907
- sash: i
906
+ const c = {
907
+ sash: n
908
908
  };
909
- this.sashItems.splice(f - 1, 0, d);
909
+ this.sashItems.splice(l - 1, 0, c);
910
910
  }
911
- _ || this.relayout(), _ || typeof s == "number" || s.type !== "distribute" || this.distributeViewSizes();
911
+ m || this.relayout(), m || typeof r == "number" || r.type !== "distribute" || this.distributeViewSizes();
912
912
  }
913
- removeView(t, n) {
914
- if (t < 0 || t >= this.viewItems.length) throw new Error("Index out of bounds");
915
- const s = this.viewItems.splice(t, 1)[0].view;
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 f = Math.max(t - 1, 0);
918
- this.sashItems.splice(f, 1)[0].sash.dispose();
917
+ const l = Math.max(e - 1, 0);
918
+ this.sashItems.splice(l, 1)[0].sash.dispose();
919
919
  }
920
- return this.relayout(), n && n.type === "distribute" && this.distributeViewSizes(), s;
920
+ return this.relayout(), i && i.type === "distribute" && this.distributeViewSizes(), r;
921
921
  }
922
- moveView(t, n, s) {
923
- const f = this.getViewCachedVisibleSize(n), _ = f === void 0 ? this.getViewSize(n) : fr.Invisible(f), E = this.removeView(n);
924
- this.addView(t, E, _, s);
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(t) {
927
- if (t < 0 || t >= this.viewItems.length) throw new Error("Index out of bounds");
928
- return this.viewItems[t].cachedVisibleSize;
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(t = this.size) {
931
- const n = Math.max(this.size, this.contentSize);
932
- if (this.size = t, this.proportions) for (let s = 0; s < this.viewItems.length; s++) {
933
- const f = this.viewItems[s];
934
- f.size = zt(Math.round(this.proportions[s] * t), f.minimumSize, f.maximumSize);
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 s = lt(0, this.viewItems.length), f = s.filter((E) => this.viewItems[E].priority === ut.Low), _ = s.filter((E) => this.viewItems[E].priority === ut.High);
938
- this.resize(this.viewItems.length - 1, t - n, void 0, f, _);
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(t, n) {
943
- if (t < 0 || t >= this.viewItems.length) return;
944
- const s = lt(0, this.viewItems.length).filter((g) => g !== t), f = [...s.filter((g) => this.viewItems[g].priority === ut.Low), t], _ = s.filter((g) => this.viewItems[g].priority === ut.High), E = this.viewItems[t];
945
- n = Math.round(n), n = zt(n, E.minimumSize, Math.min(E.maximumSize, this.size)), E.size = n, this.relayout(f, _);
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(t) {
948
- for (let n = 0; n < t.length; n++) {
949
- const s = this.viewItems[n];
950
- let f = t[n];
951
- f = Math.round(f), f = zt(f, s.minimumSize, Math.min(s.maximumSize, this.size)), s.size = f;
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((n, s) => n + s.size, 0), this.saveProportions(), this.layout(this.size);
953
+ this.contentSize = this.viewItems.reduce((i, r) => i + r.size, 0), this.saveProportions(), this.layout(this.size);
954
954
  }
955
- getViewSize(t) {
956
- return t < 0 || t >= this.viewItems.length ? -1 : this.viewItems[t].size;
955
+ getViewSize(e) {
956
+ return e < 0 || e >= this.viewItems.length ? -1 : this.viewItems[e].size;
957
957
  }
958
- isViewVisible(t) {
959
- if (t < 0 || t >= this.viewItems.length) throw new Error("Index out of bounds");
960
- return this.viewItems[t].visible;
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(t, n) {
963
- if (t < 0 || t >= this.viewItems.length) throw new Error("Index out of bounds");
964
- this.viewItems[t].setVisible(n), this.distributeEmptySpace(t), this.layoutViews(), this.saveProportions();
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 t = [];
968
- let n = 0;
969
- for (const g of this.viewItems) g.maximumSize - g.minimumSize > 0 && (t.push(g), n += g.size);
970
- const s = Math.floor(n / t.length);
971
- for (const g of t) g.size = zt(s, g.minimumSize, g.maximumSize);
972
- const f = lt(0, this.viewItems.length), _ = f.filter((g) => this.viewItems[g].priority === ut.Low), E = f.filter((g) => this.viewItems[g].priority === ut.High);
973
- this.relayout(_, E);
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((t) => t.sash.dispose()), this.sashItems = [], this.sashContainer.remove();
976
+ this.sashItems.forEach((e) => e.sash.dispose()), this.sashItems = [], this.sashContainer.remove();
977
977
  }
978
- relayout(t, n) {
979
- const s = this.viewItems.reduce((f, _) => f + _.size, 0);
980
- this.resize(this.viewItems.length - 1, this.size - s, void 0, t, n), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
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: t,
984
- start: n
983
+ sash: e,
984
+ start: i
985
985
  }) {
986
- const s = this.sashItems.findIndex((f) => f.sash === t);
987
- ((f) => {
988
- const _ = this.viewItems.map((P) => P.size);
989
- let E, g, i = Number.NEGATIVE_INFINITY, u = Number.POSITIVE_INFINITY;
990
- const d = lt(s, -1, -1), p = lt(s + 1, this.viewItems.length), y = d.reduce((P, l) => P + (this.viewItems[l].minimumSize - _[l]), 0), R = d.reduce((P, l) => P + (this.viewItems[l].viewMaximumSize - _[l]), 0), b = p.length === 0 ? Number.POSITIVE_INFINITY : p.reduce((P, l) => P + (_[l] - this.viewItems[l].minimumSize), 0), j = p.length === 0 ? Number.NEGATIVE_INFINITY : p.reduce((P, l) => P + (_[l] - this.viewItems[l].viewMaximumSize), 0);
991
- i = Math.max(y, j), u = Math.min(b, R);
992
- const N = this.findFirstSnapIndex(d), S = this.findFirstSnapIndex(p);
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 P = this.viewItems[S], l = Math.floor(P.viewMinimumSize / 2);
994
+ const b = this.viewItems[S], I = Math.floor(b.viewMinimumSize / 2);
1003
995
  g = {
1004
996
  index: S,
1005
- limitDelta: P.visible ? u + l : u - l,
1006
- size: P.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: f,
1011
- current: f,
1012
- index: s,
1013
- sizes: _,
1014
- minDelta: i,
1015
- maxDelta: u,
1016
- snapBefore: E,
1017
- snapAfter: g
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
- })(n);
1019
+ })(i);
1020
1020
  }
1021
1021
  onSashChange({
1022
- current: t
1022
+ current: e
1023
1023
  }) {
1024
1024
  const {
1025
- index: n,
1026
- start: s,
1027
- sizes: f,
1028
- minDelta: _,
1029
- maxDelta: E,
1030
- snapBefore: g,
1031
- snapAfter: i
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 = t;
1034
- const u = t - s;
1035
- this.resize(n, u, f, void 0, void 0, _, E, g, i), this.distributeEmptySpace(), this.layoutViews();
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(t) {
1038
- let n = 0;
1039
- for (let s = 0; s < this.sashItems.length; s++) if (n += this.viewItems[s].size, this.sashItems[s].sash === t) return n;
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(t, n, s = this.viewItems.map((d) => d.size), f, _, E = Number.NEGATIVE_INFINITY, g = Number.POSITIVE_INFINITY, i, u) {
1043
- if (t < 0 || t >= this.viewItems.length) return 0;
1044
- const d = lt(t, -1, -1), p = lt(t + 1, this.viewItems.length);
1045
- if (_) for (const w of _) kr(d, w), kr(p, w);
1046
- if (f) for (const w of f) vr(d, w), vr(p, w);
1047
- const y = d.map((w) => this.viewItems[w]), R = d.map((w) => s[w]), b = p.map((w) => this.viewItems[w]), j = p.map((w) => s[w]), N = d.reduce((w, Z) => w + (this.viewItems[Z].minimumSize - s[Z]), 0), S = d.reduce((w, Z) => w + (this.viewItems[Z].maximumSize - s[Z]), 0), P = p.length === 0 ? Number.POSITIVE_INFINITY : p.reduce((w, Z) => w + (s[Z] - this.viewItems[Z].minimumSize), 0), l = p.length === 0 ? Number.NEGATIVE_INFINITY : p.reduce((w, Z) => w + (s[Z] - this.viewItems[Z].maximumSize), 0), M = Math.max(N, l, E), K = Math.min(P, S, g);
1048
- let ue = !1;
1049
- if (i) {
1050
- const w = this.viewItems[i.index], Z = n >= i.limitDelta;
1051
- ue = Z !== w.visible, w.setVisible(Z, i.size);
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 (!ue && u) {
1054
- const w = this.viewItems[u.index], Z = n < u.limitDelta;
1055
- ue = Z !== w.visible, w.setVisible(Z, u.size);
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 (ue) return this.resize(t, n, s, f, _, E, g);
1058
- for (let w = 0, Z = n = zt(n, M, K); w < y.length; w++) {
1059
- const Me = y[w], ie = zt(R[w] + Z, Me.minimumSize, Me.maximumSize);
1060
- Z -= ie - R[w], Me.size = ie;
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 w = 0, Z = n; w < b.length; w++) {
1063
- const Me = b[w], ie = zt(j[w] - Z, Me.minimumSize, Me.maximumSize);
1064
- Z += ie - j[w], Me.size = ie;
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 n;
1067
- }
1068
- distributeEmptySpace(t) {
1069
- const n = this.viewItems.reduce((u, d) => u + d.size, 0);
1070
- let s = this.size - n;
1071
- const f = lt(0, this.viewItems.length), _ = [], E = f.filter((u) => this.viewItems[u].priority === ut.Low), g = f.filter((u) => this.viewItems[u].priority === ut.Normal), i = f.filter((u) => this.viewItems[u].priority === ut.High);
1072
- _.push(...i, ...g, ...E), typeof t == "number" && vr(_, t);
1073
- for (let u = 0; s !== 0 && u < _.length; u++) {
1074
- const d = this.viewItems[_[u]], p = zt(d.size + s, d.minimumSize, d.maximumSize);
1075
- s -= p - d.size, d.size = p;
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 t;
1080
- this.contentSize = this.viewItems.reduce((s, f) => s + f.size, 0);
1081
- let n = 0;
1082
- for (const s of this.viewItems) s.layout(n), n += s.size;
1083
- (t = this.onDidChange) != null && t.call(this, this.viewItems.map((s) => s.size)), this.sashItems.forEach((s) => s.sash.layout()), this.updateSashEnablement();
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((t) => t.size / this.contentSize));
1086
+ this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((e) => e.size / this.contentSize));
1087
1087
  }
1088
1088
  updateSashEnablement() {
1089
- let t = !1;
1090
- const n = this.viewItems.map((i) => t = i.size - i.minimumSize > 0 || t);
1091
- t = !1;
1092
- const s = this.viewItems.map((i) => t = i.maximumSize - i.size > 0 || t), f = [...this.viewItems].reverse();
1093
- t = !1;
1094
- const _ = f.map((i) => t = i.size - i.minimumSize > 0 || t).reverse();
1095
- t = !1;
1096
- const E = f.map((i) => t = i.maximumSize - i.size > 0 || t).reverse();
1097
- let g = 0;
1098
- for (let i = 0; i < this.sashItems.length; i++) {
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: u
1101
- } = this.sashItems[i];
1102
- g += this.viewItems[i].size;
1103
- const d = !(n[i] && E[i + 1]), p = !(s[i] && _[i + 1]);
1104
- if (d && p) {
1105
- const y = lt(i, -1, -1), R = lt(i + 1, this.viewItems.length), b = this.findFirstSnapIndex(y), j = this.findFirstSnapIndex(R), N = typeof b == "number" && !this.viewItems[b].visible, S = typeof j == "number" && !this.viewItems[j].visible;
1106
- N && _[i] && (g > 0 || this.startSnappingEnabled) ? u.state = tt.Minimum : S && n[i] && (g < this.contentSize || this.endSnappingEnabled) ? u.state = tt.Maximum : u.state = tt.Disabled;
1107
- } else u.state = d && !p ? tt.Minimum : !d && p ? tt.Maximum : tt.Enabled;
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(t) {
1111
- for (const n of t) {
1112
- const s = this.viewItems[n];
1113
- if (s.visible && s.snap) return n;
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 n of t) {
1116
- const s = this.viewItems[n];
1117
- if (s.visible && s.maximumSize - s.minimumSize > 0) return;
1118
- if (!s.visible && s.snap) return n;
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 rr {
1123
- constructor(t) {
1124
- this.size = void 0, this.size = t;
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 $r {
1131
- constructor(t, n) {
1132
- this.proportion = void 0, this.layoutService = void 0, this.proportion = t, this.layoutService = n;
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 pr {
1138
+ class nt {
1139
1139
  getPreferredSize() {
1140
1140
  }
1141
1141
  }
1142
- class Ar {
1142
+ class ii {
1143
1143
  get preferredSize() {
1144
1144
  return this.layoutStrategy.getPreferredSize();
1145
1145
  }
1146
- set preferredSize(t) {
1147
- if (typeof t == "number") this.layoutStrategy = new rr(t);
1148
- else if (typeof t == "string") {
1149
- const n = t.trim();
1150
- if (dr(n, "%")) {
1151
- const s = Number(n.slice(0, -1)) / 100;
1152
- this.layoutStrategy = new $r(s, this.layoutService);
1153
- } else if (dr(n, "px")) {
1154
- const s = Number(n.slice(0, -2)) / 100;
1155
- this.layoutStrategy = new rr(s);
1156
- } else if (typeof Number.parseFloat(n) == "number") {
1157
- const s = Number.parseFloat(n);
1158
- this.layoutStrategy = new rr(s);
1159
- } else this.layoutStrategy = new pr();
1160
- } else this.layoutStrategy = new pr();
1161
- }
1162
- constructor(t, n) {
1163
- var s;
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 = t, this.element = n.element, this.minimumSize = typeof n.minimumSize == "number" ? n.minimumSize : 30, this.maximumSize = typeof n.maximumSize == "number" ? n.maximumSize : Number.POSITIVE_INFINITY, typeof n.preferredSize == "number") this.layoutStrategy = new rr(n.preferredSize);
1165
- else if (typeof n.preferredSize == "string") {
1166
- const f = n.preferredSize.trim();
1167
- if (dr(f, "%")) {
1168
- const _ = Number(f.slice(0, -1)) / 100;
1169
- this.layoutStrategy = new $r(_, this.layoutService);
1170
- } else if (dr(f, "px")) {
1171
- const _ = Number(f.slice(0, -2));
1172
- this.layoutStrategy = new rr(_);
1173
- } else if (typeof Number.parseFloat(f) == "number") {
1174
- const _ = Number.parseFloat(f);
1175
- this.layoutStrategy = new rr(_);
1176
- } else this.layoutStrategy = new pr();
1177
- } else this.layoutStrategy = new pr();
1178
- this.priority = (s = n.priority) != null ? s : ut.Normal, this.snap = typeof n.snap == "boolean" && n.snap;
1179
- }
1180
- layout(t) {
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 Br(e) {
1184
- return e.minSize !== void 0 || e.maxSize !== void 0 || e.preferredSize !== void 0 || e.priority !== void 0 || e.visible !== void 0;
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 yr = window.React.forwardRef(({
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
- children: t
1189
- }, n) => window.React.createElement("div", {
1190
- ref: n,
1191
- className: Sr("split-view-view", Wr, e)
1192
- }, t));
1193
- yr.displayName = "Allotment.Pane";
1194
- const Kr = window.React.forwardRef(({
1195
- children: e,
1196
- className: t,
1197
- id: n,
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: R,
1209
- onDragStart: b,
1210
- onDragEnd: j
1211
- }, N) => {
1212
- const S = window.React.useRef(null), P = window.React.useRef([]), l = window.React.useRef(/* @__PURE__ */ new Map()), M = window.React.useRef(null), K = window.React.useRef(/* @__PURE__ */ new Map()), ue = window.React.useRef(new vn()), w = window.React.useRef([]), [Z, Me] = window.React.useState(!1), ie = window.React.useMemo(() => window.React.Children.toArray(e).filter(window.React.isValidElement), [e]), Ye = window.React.useCallback((I) => {
1213
- var W, ne;
1214
- const X = (W = w.current) == null ? void 0 : W[I];
1215
- return typeof (X == null ? void 0 : X.preferredSize) == "number" && ((ne = M.current) != null && ne.resizeView(I, Math.round(X.preferredSize)), !0);
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(N, () => ({
1217
+ return window.React.useImperativeHandle(S, () => ({
1218
1218
  reset: () => {
1219
1219
  if (y) y();
1220
1220
  else {
1221
- var I;
1222
- (I = M.current) == null || I.distributeViewSizes();
1223
- for (let W = 0; W < w.current.length; W++) Ye(W);
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: (I) => {
1227
- var W;
1228
- (W = M.current) == null || W.resizeViews(I);
1226
+ resize: (O) => {
1227
+ var D;
1228
+ (D = E.current) == null || D.resizeViews(O);
1229
1229
  }
1230
- })), Mr(() => {
1231
- let I = !0;
1232
- i && K.current.size !== i.length && (I = !1, console.warn(`Expected ${i.length} children based on defaultSizes but found ${K.current.size}`)), I && i && (P.current = ie.map((X) => X.key));
1233
- const W = lr({
1234
- orientation: d ? ct.Vertical : ct.Horizontal,
1235
- proportionalLayout: _
1236
- }, I && i && {
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: i.reduce((X, q) => X + q, 0),
1239
- views: i.map((X, q) => {
1240
- var ee, fe, We, $e;
1241
- const ce = l.current.get(P.current[q]), Ae = new Ar(ue.current, lr({
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: (ee = ce == null ? void 0 : ce.minSize) != null ? ee : f,
1244
- maximumSize: (fe = ce == null ? void 0 : ce.maxSize) != null ? fe : s,
1245
- priority: (We = ce == null ? void 0 : ce.priority) != null ? We : ut.Normal
1246
- }, (ce == null ? void 0 : ce.preferredSize) && {
1247
- preferredSize: ce == null ? void 0 : ce.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: ($e = ce == null ? void 0 : ce.snap) != null ? $e : u
1249
+ snap: (me = J == null ? void 0 : J.snap) != null ? me : o
1250
1250
  }));
1251
- return w.current.push(Ae), {
1252
- container: [...K.current.values()][q],
1253
- size: X,
1254
- view: Ae
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
- M.current = new In(S.current, W, p, b, j), M.current.on("sashDragStart", () => {
1260
- var X;
1261
- (X = S.current) == null || X.classList.add("split-view-sash-dragging");
1262
- }), M.current.on("sashDragEnd", () => {
1263
- var X;
1264
- (X = S.current) == null || X.classList.remove("split-view-sash-dragging");
1265
- }), M.current.on("sashchange", (X) => {
1266
- if (R && M.current) {
1267
- const q = ie.map((ee) => ee.key);
1268
- for (let ee = 0; ee < q.length; ee++) {
1269
- const fe = l.current.get(q[ee]);
1270
- (fe == null ? void 0 : fe.visible) !== void 0 && fe.visible !== M.current.isViewVisible(ee) && R(ee, M.current.isViewVisible(ee));
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
- }), M.current.on("sashreset", (X) => {
1273
+ }), E.current.on("sashreset", (R) => {
1274
1274
  if (y) y();
1275
1275
  else {
1276
- var q;
1277
- if (Ye(X) || Ye(X + 1)) return;
1278
- (q = M.current) == null || q.distributeViewSizes();
1276
+ var N;
1277
+ if (oe(R) || oe(R + 1)) return;
1278
+ (N = E.current) == null || N.distributeViewSizes();
1279
1279
  }
1280
1280
  });
1281
- const ne = M.current;
1281
+ const k = E.current;
1282
1282
  return () => {
1283
- ne.dispose();
1283
+ k.dispose();
1284
1284
  };
1285
- }, []), Mr(() => {
1286
- if (Z) {
1287
- const F = ie.map((V) => V.key), Oe = [...P.current], Xe = F.filter((V) => !P.current.includes(V)), et = F.filter((V) => P.current.includes(V)), Se = P.current.map((V) => !F.includes(V));
1288
- for (let V = Se.length - 1; V >= 0; V--) {
1289
- var I;
1290
- Se[V] && ((I = M.current) != null && I.removeView(V), Oe.splice(V, 1), w.current.splice(V, 1));
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 V of Xe) {
1293
- var W, ne, X, q, ee;
1294
- const A = l.current.get(V), se = new Ar(ue.current, lr({
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: (W = A == null ? void 0 : A.minSize) != null ? W : f,
1297
- maximumSize: (ne = A == null ? void 0 : A.maxSize) != null ? ne : s,
1298
- priority: (X = A == null ? void 0 : A.priority) != null ? X : ut.Normal
1299
- }, (A == null ? void 0 : A.preferredSize) && {
1300
- preferredSize: A == null ? void 0 : A.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: (q = A == null ? void 0 : A.snap) != null ? q : u
1302
+ snap: (N = V == null ? void 0 : V.snap) != null ? N : o
1303
1303
  }));
1304
- (ee = M.current) != null && ee.addView(K.current.get(V), se, fr.Distribute, F.findIndex((Q) => Q === V)), Oe.splice(F.findIndex((Q) => Q === V), 0, V), w.current.splice(F.findIndex((Q) => Q === V), 0, se);
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 (; !ln(F, Oe); ) for (const [V, A] of F.entries()) {
1307
- const se = Oe.findIndex((Q) => Q === A);
1308
- if (se !== V) {
1309
- var fe;
1310
- (fe = M.current) == null || fe.moveView(K.current.get(A), se, V);
1311
- const Q = Oe[se];
1312
- Oe.splice(se, 1), Oe.splice(V, 0, Q);
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 V of Xe) {
1317
- var We;
1318
- const A = F.findIndex((Q) => Q === V), se = w.current[A].preferredSize;
1319
- se !== void 0 && ((We = M.current) == null || We.resizeView(A, se));
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 V of [...Xe, ...et]) {
1322
- var $e, ce;
1323
- const A = l.current.get(V), se = F.findIndex((Q) => Q === V);
1324
- A && Br(A) && A.visible !== void 0 && (($e = M.current) == null ? void 0 : $e.isViewVisible(se)) !== A.visible && ((ce = M.current) == null || ce.setViewVisible(se, A.visible));
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 V of et) {
1327
- const A = l.current.get(V), se = F.findIndex((Q) => Q === V);
1328
- if (A && Br(A)) {
1329
- var Ae;
1330
- A.preferredSize !== void 0 && w.current[se].preferredSize !== A.preferredSize && (w.current[se].preferredSize = A.preferredSize);
1331
- let Q = !1;
1332
- A.minSize !== void 0 && w.current[se].minimumSize !== A.minSize && (w.current[se].minimumSize = A.minSize, Q = !0), A.maxSize !== void 0 && w.current[se].maximumSize !== A.maxSize && (w.current[se].maximumSize = A.maxSize, Q = !0), Q && ((Ae = M.current) == null || Ae.layout());
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
- (Xe.length > 0 || Se.length > 0) && (P.current = F);
1335
+ (le.length > 0 || je.length > 0) && (b.current = Q);
1336
1336
  }
1337
- }, [ie, Z, s, f, u]), window.React.useEffect(() => {
1338
- M.current && (M.current.onDidChange = p);
1339
- }, [p]), window.React.useEffect(() => {
1340
- M.current && (M.current.onDidDragStart = b);
1341
- }, [b]), window.React.useEffect(() => {
1342
- M.current && (M.current.onDidDragEnd = j);
1343
- }, [j]), un({
1344
- ref: S,
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: I,
1347
- height: W
1346
+ width: O,
1347
+ height: D
1348
1348
  }) => {
1349
- var ne;
1350
- I && W && ((ne = M.current) != null && ne.layout(d ? W : I), ue.current.setSize(d ? W : I), Me(!0));
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
- Jr && Cn(20);
1353
+ ai && Zi(20);
1354
1354
  }, []), window.React.createElement("div", {
1355
- ref: S,
1356
- className: Sr("split-view", d ? "split-view-vertical" : "split-view-horizontal", {
1357
- "split-view-separator-border": E
1358
- }, cn, d ? fn : hn, {
1359
- [wn]: E
1360
- }, t),
1361
- id: n
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: Sr("split-view-container", pn)
1364
- }, window.React.Children.toArray(e).map((I) => {
1365
- if (!window.React.isValidElement(I)) return null;
1366
- const W = I.key;
1367
- return I.type.displayName === "Allotment.Pane" ? (l.current.set(W, I.props), window.React.cloneElement(I, {
1368
- key: W,
1369
- ref: (ne) => {
1370
- const X = I.ref;
1371
- X && (X.current = ne), ne ? K.current.set(W, ne) : K.current.delete(W);
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(yr, {
1374
- key: W,
1375
- ref: (ne) => {
1376
- ne ? K.current.set(W, ne) : K.current.delete(W);
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
- }, I);
1378
+ }, O);
1379
1379
  })));
1380
1380
  });
1381
- function Cn(e) {
1382
- const t = zt(e, 4, 20), n = zt(e, 1, 8);
1383
- document.documentElement.style.setProperty("--sash-size", t + "px"), document.documentElement.style.setProperty("--sash-hover-size", n + "px"), (function(s) {
1384
- Zr = s, qr.emit("onDidChangeGlobalSize", s);
1385
- })(t);
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
- Kr.displayName = "Allotment";
1388
- var Dn = Object.assign(Kr, {
1389
- Pane: yr
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
- Dn as Allotment,
2629
- Ln as GridDragResize,
2630
- Ln as default
1392
+ Qi as Allotment
2631
1393
  };
2632
1394
  //# sourceMappingURL=libraries.js.map