e-virt-table 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -116,13 +116,13 @@ function D(a) {
116
116
  }
117
117
  return a;
118
118
  }
119
- function Se(a) {
119
+ function Le(a) {
120
120
  return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
121
121
  }
122
122
  function H(a, t) {
123
- return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Se(t) && typeof a == "string" && !a);
123
+ return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Le(t) && typeof a == "string" && !a);
124
124
  }
125
- function Le(a, t, e) {
125
+ function Se(a, t, e) {
126
126
  var i = [], s = 0, r = a.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
@@ -149,7 +149,7 @@ function Ae(a) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var Bt = /* @__PURE__ */ function(a) {
152
+ var Ft = /* @__PURE__ */ function(a) {
153
153
  Re(t, a);
154
154
  function t(e, i) {
155
155
  var s;
@@ -161,7 +161,7 @@ function Te(a, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
163
  var p = function(m) {
164
- return i(m), m.length ? g(new Bt(m, bt(m))) : x(s);
164
+ return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
165
  }, u = Ae(a);
166
166
  Xt(u, e, p);
167
167
  });
@@ -172,11 +172,11 @@ function Te(a, t, e, i, s) {
172
172
  var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
- return i(d), d.length ? g(new Bt(d, bt(d))) : x(s);
175
+ return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
176
176
  };
177
177
  n.length || (i(d), x(s)), n.forEach(function(u) {
178
178
  var w = a[u];
179
- o.indexOf(u) !== -1 ? Xt(w, e, p) : Le(w, e, p);
179
+ o.indexOf(u) !== -1 ? Xt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
182
182
  return f.catch(function(x) {
@@ -194,7 +194,7 @@ function He(a, t) {
194
194
  }
195
195
  return e;
196
196
  }
197
- function Ft(a, t) {
197
+ function Bt(a, t) {
198
198
  return function(e) {
199
199
  var i;
200
200
  return a.fullFields ? i = He(t, a.fullFields) : i = t[e.field || a.fullField], Me(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
@@ -299,12 +299,12 @@ var Zt = function(t, e, i, s, r, o) {
299
299
  }
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
- }, Be = function(t, e, i, s, r) {
302
+ }, Fe = function(t, e, i, s, r) {
303
303
  var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
304
  if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
306
  p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
- }, j = "enum", Fe = function(t, e, i, s, r) {
307
+ }, j = "enum", Be = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, ke = function(t, e, i, s, r) {
310
310
  if (t.pattern) {
@@ -319,8 +319,8 @@ var Zt = function(t, e, i, s, r, o) {
319
319
  required: Zt,
320
320
  whitespace: De,
321
321
  type: Xe,
322
- range: Be,
323
- enum: Fe,
322
+ range: Fe,
323
+ enum: Be,
324
324
  pattern: ke
325
325
  }, Ke = function(t, e, i, s, r) {
326
326
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
@@ -583,27 +583,27 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
583
583
  v === void 0 && (v = []);
584
584
  var _ = Array.isArray(v) ? v : [v];
585
585
  !h.suppressWarning && _.length && a.warning("async-validator:", _), _.length && m.message !== void 0 && (_ = [].concat(m.message));
586
- var S = _.map(Ft(m, n));
587
- if (h.first && S.length)
588
- return p[m.field] = 1, w(S);
586
+ var L = _.map(Bt(m, n));
587
+ if (h.first && L.length)
588
+ return p[m.field] = 1, w(L);
589
589
  if (!C)
590
- w(S);
590
+ w(L);
591
591
  else {
592
592
  if (m.required && !u.value)
593
- return m.message !== void 0 ? S = [].concat(m.message).map(Ft(m, n)) : h.error && (S = [h.error(m, D(h.messages.required, m.field))]), w(S);
593
+ return m.message !== void 0 ? L = [].concat(m.message).map(Bt(m, n)) : h.error && (L = [h.error(m, D(h.messages.required, m.field))]), w(L);
594
594
  var I = {};
595
- m.defaultField && Object.keys(u.value).map(function(L) {
596
- I[L] = m.defaultField;
595
+ m.defaultField && Object.keys(u.value).map(function(S) {
596
+ I[S] = m.defaultField;
597
597
  }), I = q({}, I, u.rule.fields);
598
598
  var R = {};
599
- Object.keys(I).forEach(function(L) {
600
- var M = I[L], T = Array.isArray(M) ? M : [M];
601
- R[L] = T.map(y.bind(null, L));
599
+ Object.keys(I).forEach(function(S) {
600
+ var M = I[S], T = Array.isArray(M) ? M : [M];
601
+ R[S] = T.map(y.bind(null, S));
602
602
  });
603
603
  var A = new a(R);
604
- A.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), A.validate(u.value, u.rule.options || h, function(L) {
604
+ A.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), A.validate(u.value, u.rule.options || h, function(S) {
605
605
  var M = [];
606
- S && S.length && M.push.apply(M, S), L && L.length && M.push.apply(M, L), w(M.length ? M : null);
606
+ L && L.length && M.push.apply(M, L), S && S.length && M.push.apply(M, S), w(M.length ? M : null);
607
607
  });
608
608
  }
609
609
  }
@@ -1050,14 +1050,14 @@ class Tt extends re {
1050
1050
  if (this.cellType === "footer") {
1051
1051
  let E = n, v = o;
1052
1052
  if (typeof r == "function") {
1053
- const _ = r, { backgroundColor: S, color: I } = _({
1053
+ const _ = r, { backgroundColor: L, color: I } = _({
1054
1054
  row: this.row,
1055
1055
  rowIndex: this.rowIndex,
1056
1056
  colIndex: this.colIndex,
1057
1057
  column: this.column,
1058
1058
  value: this.getValue()
1059
1059
  }) || {};
1060
- S && (E = S), I && (v = I);
1060
+ L && (E = L), I && (v = I);
1061
1061
  }
1062
1062
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = E, this.drawTextColor = v;
1063
1063
  return;
@@ -2166,29 +2166,29 @@ class ai {
2166
2166
  }
2167
2167
  ]
2168
2168
  };
2169
- let w = e, m = e, C = n, y = n, b = [], E = 0, v = 0, _ = 0, S = 0;
2169
+ let w = e, m = e, C = n, y = n, b = [], E = 0, v = 0, _ = 0, L = 0;
2170
2170
  if (d !== 1 && p) {
2171
- S = x;
2171
+ L = x;
2172
2172
  const I = h.reduce((R, A) => {
2173
- const L = this.getItemValue(s, A) ?? "";
2174
- return `${R}${L}`;
2173
+ const S = this.getItemValue(s, A) ?? "";
2174
+ return `${R}${S}`;
2175
2175
  }, "");
2176
2176
  for (let R = e - 1; R >= 0; R--) {
2177
- const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2178
- const F = this.getItemValue(A, T) ?? "";
2179
- return `${M}${F}`;
2177
+ const A = this.rowIndexRowKeyMap.get(R) || "", S = h.reduce((M, T) => {
2178
+ const B = this.getItemValue(A, T) ?? "";
2179
+ return `${M}${B}`;
2180
2180
  }, "");
2181
- if (I === L)
2181
+ if (I === S)
2182
2182
  w = R;
2183
2183
  else
2184
2184
  break;
2185
2185
  }
2186
2186
  for (let R = e; R <= this.ctx.maxRowIndex; R++) {
2187
- const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2188
- const F = this.getItemValue(A, T) ?? "";
2189
- return `${M}${F}`;
2187
+ const A = this.rowIndexRowKeyMap.get(R) || "", S = h.reduce((M, T) => {
2188
+ const B = this.getItemValue(A, T) ?? "";
2189
+ return `${M}${B}`;
2190
2190
  }, "");
2191
- if (I === L)
2191
+ if (I === S)
2192
2192
  m = R;
2193
2193
  else
2194
2194
  break;
@@ -2200,9 +2200,9 @@ class ai {
2200
2200
  for (let R = w; R <= m; R++) {
2201
2201
  const { height: A } = this.positions[R];
2202
2202
  _ += A;
2203
- const L = this.rowIndexRowKeyMap.get(R) || "", { item: M } = this.rowKeyMap.get(L), T = this.getItemValue(L, i);
2203
+ const S = this.rowIndexRowKeyMap.get(R) || "", { item: M } = this.rowKeyMap.get(S), T = this.getItemValue(S, i);
2204
2204
  b.push({
2205
- rowKey: L,
2205
+ rowKey: S,
2206
2206
  key: i,
2207
2207
  value: T,
2208
2208
  row: M
@@ -2215,8 +2215,8 @@ class ai {
2215
2215
  const R = this.getColumnByColIndex(I);
2216
2216
  if (!R)
2217
2217
  break;
2218
- const A = this.getItemValue(s, i), L = this.getItemValue(s, R.key);
2219
- if (A === L && c.includes(R.key))
2218
+ const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2219
+ if (A === S && c.includes(R.key))
2220
2220
  C = I;
2221
2221
  else
2222
2222
  break;
@@ -2225,8 +2225,8 @@ class ai {
2225
2225
  const R = this.getColumnByColIndex(I);
2226
2226
  if (!R)
2227
2227
  break;
2228
- const A = this.getItemValue(s, i), L = this.getItemValue(s, R.key);
2229
- if (A === L && c.includes(R.key))
2228
+ const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2229
+ if (A === S && c.includes(R.key))
2230
2230
  y = I;
2231
2231
  else
2232
2232
  break;
@@ -2241,7 +2241,7 @@ class ai {
2241
2241
  const R = this.getColumnByColIndex(I);
2242
2242
  if (!R)
2243
2243
  break;
2244
- S += R.width || 100, b.push({
2244
+ L += R.width || 100, b.push({
2245
2245
  rowKey: s,
2246
2246
  key: R.key,
2247
2247
  value: this.getItemValue(s, R.key),
@@ -2255,7 +2255,7 @@ class ai {
2255
2255
  rowspan: d,
2256
2256
  colspan: g,
2257
2257
  height: _,
2258
- width: S,
2258
+ width: L,
2259
2259
  offsetTop: E,
2260
2260
  offsetLeft: v,
2261
2261
  dataList: b
@@ -3946,10 +3946,10 @@ class pi {
3946
3946
  r ? this.visibleHeight = b - u : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = g;
3947
3947
  const E = window.devicePixelRatio || 1, v = this.ctx.stageWidth * E, _ = this.ctx.stageHeight * E;
3948
3948
  t.width = Math.floor(v), t.height = Math.floor(_);
3949
- const S = this.data.length ? "not-empty" : "empty";
3949
+ const L = this.data.length ? "not-empty" : "empty";
3950
3950
  this.ctx.emit("emptyChange", {
3951
- isEmpty: S,
3952
- type: S,
3951
+ isEmpty: L,
3952
+ type: L,
3953
3953
  headerHeight: e.height,
3954
3954
  bodyHeight: this.height,
3955
3955
  footerHeight: u,
@@ -4244,7 +4244,7 @@ class yi {
4244
4244
  t.preventDefault(), this.isCut = !0, this.copy();
4245
4245
  return;
4246
4246
  }
4247
- if ((t.ctrlKey && t.code === "KeyA" || t.metaKey && t.code === "KeyA") && (t.preventDefault(), this.selectAll()), t.code === "ArrowLeft") {
4247
+ if ((t.ctrlKey && t.code === "KeyA" || t.metaKey && t.code === "KeyA") && (t.preventDefault(), this.selectAll()), t.code === "ArrowLeft" || t.shiftKey && t.code === "Tab") {
4248
4248
  t.preventDefault(), this.moveFocus("LEFT");
4249
4249
  return;
4250
4250
  }
@@ -4559,7 +4559,7 @@ class yi {
4559
4559
  for (let y = 0; y <= o.length - 1; y++) {
4560
4560
  const b = o[y].length;
4561
4561
  for (let E = 0; E <= b - 1; E++) {
4562
- const v = y + e, _ = E + i, S = o[y][E], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
4562
+ const v = y + e, _ = E + i, L = o[y][E], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
4563
4563
  v,
4564
4564
  _
4565
4565
  );
@@ -4568,7 +4568,7 @@ class yi {
4568
4568
  this.ctx.database.getReadonly(R, A) || (s.add(R), w.push({
4569
4569
  rowKey: R,
4570
4570
  key: A,
4571
- value: S,
4571
+ value: L,
4572
4572
  row: {}
4573
4573
  //内部有设置
4574
4574
  }));
@@ -4701,9 +4701,9 @@ class yi {
4701
4701
  const { drawX: u, drawY: w, width: m, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + m - (e - s) + 1;
4702
4702
  let v = o.height - w, _ = C;
4703
4703
  _ > h.visibleHeight && (_ = h.visibleHeight);
4704
- let S = 0;
4705
- x && (g === "top" ? v = o.height + n.height - w : S = n.visibleHeight);
4706
- const I = w + _ - (t - S - f);
4704
+ let L = 0;
4705
+ x && (g === "top" ? v = o.height + n.height - w : L = n.visibleHeight);
4706
+ const I = w + _ - (t - L - f);
4707
4707
  let R = c, A = d;
4708
4708
  E > 0 && !y ? R = Math.floor(c + E) : b > 0 && !y && (R = Math.floor(c - b)), v > 0 ? A = Math.floor(d - v) : I > 0 && (A = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, A), this.ctx.emit("adjustBoundaryPosition", i));
4709
4709
  }
@@ -4776,14 +4776,14 @@ class Ei {
4776
4776
  o = [Math.max(p, C), Math.min(u, y)], n = [Math.max(w, b), Math.min(m, E)];
4777
4777
  const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
4778
4778
  if (typeof v == "function") {
4779
- const S = v({
4779
+ const L = v({
4780
4780
  focusCell: this.ctx.focusCell,
4781
4781
  xArr: o,
4782
4782
  yArr: n
4783
4783
  });
4784
- if (!S)
4784
+ if (!L)
4785
4785
  return;
4786
- o = S.xArr, n = S.yArr;
4786
+ o = L.xArr, n = L.yArr;
4787
4787
  }
4788
4788
  this.ctx.autofill.xArr = o, this.ctx.autofill.yArr = n, this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
4789
4789
  }
@@ -5007,7 +5007,7 @@ function $t(a, t, e) {
5007
5007
  }
5008
5008
  return g;
5009
5009
  }
5010
- const Si = async (a, t, e) => {
5010
+ const Li = async (a, t, e) => {
5011
5011
  const {
5012
5012
  placement: i = "bottom",
5013
5013
  strategy: s = "absolute",
@@ -5113,7 +5113,7 @@ async function he(a, t) {
5113
5113
  right: (E.right - m.right + p.right) / b.x
5114
5114
  };
5115
5115
  }
5116
- const Li = (a) => ({
5116
+ const Si = (a) => ({
5117
5117
  name: "arrow",
5118
5118
  options: a,
5119
5119
  async fn(t) {
@@ -5137,12 +5137,12 @@ const Li = (a) => ({
5137
5137
  }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[p] + r.reference[g] - x[g] - r.floating[p], E = x[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5138
5138
  let _ = v ? v[y] : 0;
5139
5139
  (!_ || !await (o.isElement == null ? void 0 : o.isElement(v))) && (_ = n.floating[y] || r.floating[p]);
5140
- const S = b / 2 - E / 2, I = _ / 2 - u[p] / 2 - 1, R = rt(f[m], I), A = rt(f[C], I), L = R, M = _ - u[p] - A, T = _ / 2 - u[p] / 2 + S, F = _t(L, T, M), Y = !h.arrow && lt(s) != null && T !== F && r.reference[p] / 2 - (T < L ? R : A) - u[p] / 2 < 0, k = Y ? T < L ? T - L : T - M : 0;
5140
+ const L = b / 2 - E / 2, I = _ / 2 - u[p] / 2 - 1, R = rt(f[m], I), A = rt(f[C], I), S = R, M = _ - u[p] - A, T = _ / 2 - u[p] / 2 + L, B = _t(S, T, M), Y = !h.arrow && lt(s) != null && T !== B && r.reference[p] / 2 - (T < S ? R : A) - u[p] / 2 < 0, k = Y ? T < S ? T - S : T - M : 0;
5141
5141
  return {
5142
5142
  [g]: x[g] + k,
5143
5143
  data: {
5144
- [g]: F,
5145
- centerOffset: T - F - k,
5144
+ [g]: B,
5145
+ centerOffset: T - B - k,
5146
5146
  ...Y && {
5147
5147
  alignmentOffset: k
5148
5148
  }
@@ -5176,29 +5176,29 @@ const Li = (a) => ({
5176
5176
  return {};
5177
5177
  const m = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : Ri(n)), v = p !== "none";
5178
5178
  !x && v && E.push(..._i(n, u, p, b));
5179
- const _ = [n, ...E], S = await he(t, w), I = [];
5179
+ const _ = [n, ...E], L = await he(t, w), I = [];
5180
5180
  let R = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5181
- if (d && I.push(S[m]), f) {
5181
+ if (d && I.push(L[m]), f) {
5182
5182
  const T = vi(s, o, b);
5183
- I.push(S[T[0]], S[T[1]]);
5183
+ I.push(L[T[0]], L[T[1]]);
5184
5184
  }
5185
5185
  if (R = [...R, {
5186
5186
  placement: s,
5187
5187
  overflows: I
5188
5188
  }], !I.every((T) => T <= 0)) {
5189
- var A, L;
5190
- const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, F = _[T];
5191
- if (F)
5189
+ var A, S;
5190
+ const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, B = _[T];
5191
+ if (B)
5192
5192
  return {
5193
5193
  data: {
5194
5194
  index: T,
5195
5195
  overflows: R
5196
5196
  },
5197
5197
  reset: {
5198
- placement: F
5198
+ placement: B
5199
5199
  }
5200
5200
  };
5201
- let Y = (L = R.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
5201
+ let Y = (S = R.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : S.placement;
5202
5202
  if (!Y)
5203
5203
  switch (g) {
5204
5204
  case "bestFit": {
@@ -5368,7 +5368,7 @@ function ht(a) {
5368
5368
  overflowX: e,
5369
5369
  overflowY: i,
5370
5370
  display: s
5371
- } = B(a);
5371
+ } = F(a);
5372
5372
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5373
5373
  }
5374
5374
  function Di(a) {
@@ -5384,7 +5384,7 @@ function wt(a) {
5384
5384
  });
5385
5385
  }
5386
5386
  function Dt(a) {
5387
- const t = Nt(), e = X(a) ? B(a) : a;
5387
+ const t = Nt(), e = X(a) ? F(a) : a;
5388
5388
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
5389
5389
  }
5390
5390
  function Ni(a) {
@@ -5404,7 +5404,7 @@ function Nt() {
5404
5404
  function Q(a) {
5405
5405
  return ["html", "body", "#document"].includes(tt(a));
5406
5406
  }
5407
- function B(a) {
5407
+ function F(a) {
5408
5408
  return N(a).getComputedStyle(a);
5409
5409
  }
5410
5410
  function pt(a) {
@@ -5432,21 +5432,21 @@ function de(a) {
5432
5432
  const t = $(a);
5433
5433
  return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : de(t);
5434
5434
  }
5435
- function St(a, t, e) {
5435
+ function Lt(a, t, e) {
5436
5436
  var i;
5437
5437
  t === void 0 && (t = []), e === void 0 && (e = !0);
5438
5438
  const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = N(s);
5439
5439
  if (r) {
5440
- const n = Lt(o);
5441
- return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? St(n) : []);
5440
+ const n = St(o);
5441
+ return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? Lt(n) : []);
5442
5442
  }
5443
- return t.concat(s, St(s, [], e));
5443
+ return t.concat(s, Lt(s, [], e));
5444
5444
  }
5445
- function Lt(a) {
5445
+ function St(a) {
5446
5446
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5447
5447
  }
5448
5448
  function fe(a) {
5449
- const t = B(a);
5449
+ const t = F(a);
5450
5450
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5451
5451
  const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5452
5452
  return n && (e = r, i = o), {
@@ -5481,7 +5481,7 @@ function ue(a) {
5481
5481
  y: t.visualViewport.offsetTop
5482
5482
  };
5483
5483
  }
5484
- function Bi(a, t, e) {
5484
+ function Fi(a, t, e) {
5485
5485
  return t === void 0 && (t = !1), !e || t && e !== N(a) ? !1 : t;
5486
5486
  }
5487
5487
  function ot(a, t, e, i) {
@@ -5489,14 +5489,14 @@ function ot(a, t, e, i) {
5489
5489
  const s = a.getBoundingClientRect(), r = xe(a);
5490
5490
  let o = z(1);
5491
5491
  t && (i ? X(i) && (o = Z(i)) : o = Z(a));
5492
- const n = Bi(r, e, i) ? ue(r) : z(0);
5492
+ const n = Fi(r, e, i) ? ue(r) : z(0);
5493
5493
  let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5494
5494
  if (r) {
5495
5495
  const x = N(r), g = i && X(i) ? N(i) : i;
5496
- let p = x, u = Lt(p);
5496
+ let p = x, u = St(p);
5497
5497
  for (; u && i && g !== p; ) {
5498
- const w = Z(u), m = u.getBoundingClientRect(), C = B(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5499
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = N(u), u = Lt(p);
5498
+ const w = Z(u), m = u.getBoundingClientRect(), C = F(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5499
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = N(u), u = St(p);
5500
5500
  }
5501
5501
  }
5502
5502
  return ut({
@@ -5506,7 +5506,7 @@ function ot(a, t, e, i) {
5506
5506
  y: c
5507
5507
  });
5508
5508
  }
5509
- function Fi(a) {
5509
+ function Bi(a) {
5510
5510
  let {
5511
5511
  elements: t,
5512
5512
  rect: e,
@@ -5543,7 +5543,7 @@ function Ki(a) {
5543
5543
  const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5544
5544
  let o = -e.scrollLeft + At(a);
5545
5545
  const n = -e.scrollTop;
5546
- return B(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5546
+ return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5547
5547
  width: s,
5548
5548
  height: r,
5549
5549
  x: o,
@@ -5594,17 +5594,17 @@ function Gt(a, t, e) {
5594
5594
  }
5595
5595
  function ge(a, t) {
5596
5596
  const e = $(a);
5597
- return e === t || !X(e) || Q(e) ? !1 : B(e).position === "fixed" || ge(e, t);
5597
+ return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5598
5598
  }
5599
5599
  function Wi(a, t) {
5600
5600
  const e = t.get(a);
5601
5601
  if (e)
5602
5602
  return e;
5603
- let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5604
- const r = B(a).position === "fixed";
5603
+ let i = Lt(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5604
+ const r = F(a).position === "fixed";
5605
5605
  let o = r ? $(a) : a;
5606
5606
  for (; X(o) && !Q(o); ) {
5607
- const n = B(o), h = Dt(o);
5607
+ const n = F(o), h = Dt(o);
5608
5608
  !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5609
5609
  }
5610
5610
  return t.set(a, i), i;
@@ -5664,10 +5664,10 @@ function $i(a, t, e) {
5664
5664
  };
5665
5665
  }
5666
5666
  function yt(a) {
5667
- return B(a).position === "static";
5667
+ return F(a).position === "static";
5668
5668
  }
5669
5669
  function jt(a, t) {
5670
- if (!K(a) || B(a).position === "fixed")
5670
+ if (!K(a) || F(a).position === "fixed")
5671
5671
  return null;
5672
5672
  if (t)
5673
5673
  return t(a);
@@ -5705,10 +5705,10 @@ const qi = async function(a) {
5705
5705
  };
5706
5706
  };
5707
5707
  function Gi(a) {
5708
- return B(a).direction === "rtl";
5708
+ return F(a).direction === "rtl";
5709
5709
  }
5710
5710
  const ji = {
5711
- convertOffsetParentRelativeRectToViewportRelativeRect: Fi,
5711
+ convertOffsetParentRelativeRectToViewportRelativeRect: Bi,
5712
5712
  getDocumentElement: V,
5713
5713
  getClippingRect: Pi,
5714
5714
  getOffsetParent: we,
@@ -5718,7 +5718,7 @@ const ji = {
5718
5718
  getScale: Z,
5719
5719
  isElement: X,
5720
5720
  isRTL: Gi
5721
- }, pe = Mi, me = Hi, ye = Ai, Ui = Li, Ee = (a, t, e) => {
5721
+ }, pe = Mi, me = Hi, ye = Ai, Ui = Si, Ee = (a, t, e) => {
5722
5722
  const i = /* @__PURE__ */ new Map(), s = {
5723
5723
  platform: ji,
5724
5724
  ...e
@@ -5726,7 +5726,7 @@ const ji = {
5726
5726
  ...s.platform,
5727
5727
  _c: i
5728
5728
  };
5729
- return Si(a, t, {
5729
+ return Li(a, t, {
5730
5730
  ...s,
5731
5731
  platform: r
5732
5732
  });
@@ -5884,6 +5884,14 @@ class Ji {
5884
5884
  ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = h + 1, this.autoSize();
5885
5885
  return;
5886
5886
  }
5887
+ if (t.code === "Tab" && this.ctx.editing) {
5888
+ if (t.preventDefault(), this.doneEdit(), t.shiftKey) {
5889
+ this.ctx.emit("setMoveFocus", "LEFT");
5890
+ return;
5891
+ }
5892
+ this.ctx.emit("setMoveFocus", "RIGHT");
5893
+ return;
5894
+ }
5887
5895
  if (t.code === "Enter" && this.ctx.editing) {
5888
5896
  if (t.preventDefault(), this.doneEdit(), t.shiftKey) {
5889
5897
  this.ctx.emit("setMoveFocus", "TOP");