@ynput/ayon-frontend-shared 0.3.45 → 0.3.46

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.
Files changed (51) hide show
  1. package/dist/_virtual/index.cjs22.js +1 -1
  2. package/dist/_virtual/index.cjs23.js +1 -1
  3. package/dist/_virtual/index.cjs24.js +1 -1
  4. package/dist/_virtual/index.cjs4.js +1 -1
  5. package/dist/_virtual/index.cjs5.js +1 -1
  6. package/dist/_virtual/index.cjs6.js +1 -1
  7. package/dist/_virtual/index.cjs8.js +1 -1
  8. package/dist/_virtual/index.cjs9.js +1 -1
  9. package/dist/_virtual/index.es22.js +3 -3
  10. package/dist/_virtual/index.es23.js +5 -5
  11. package/dist/_virtual/index.es24.js +5 -5
  12. package/dist/_virtual/index.es4.js +5 -2
  13. package/dist/_virtual/index.es4.js.map +1 -1
  14. package/dist/_virtual/index.es5.js +2 -5
  15. package/dist/_virtual/index.es5.js.map +1 -1
  16. package/dist/_virtual/index.es6.js +2 -2
  17. package/dist/_virtual/index.es8.js +2 -5
  18. package/dist/_virtual/index.es8.js.map +1 -1
  19. package/dist/_virtual/index.es9.js +5 -2
  20. package/dist/_virtual/index.es9.js.map +1 -1
  21. package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
  22. package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
  23. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
  24. package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +2 -2
  25. package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +1 -1
  26. package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js +1 -1
  27. package/dist/node_modules/rehype-parse/lib/index.cjs.js +1 -1
  28. package/dist/node_modules/rehype-parse/lib/index.es.js +1 -1
  29. package/dist/node_modules/remove-accents/index.cjs.js +1 -1
  30. package/dist/node_modules/remove-accents/index.es.js +1 -1
  31. package/dist/shared/node_modules/@module-federation/error-codes/dist/index.cjs.js +1 -1
  32. package/dist/shared/node_modules/@module-federation/error-codes/dist/index.es.js +1 -1
  33. package/dist/shared/node_modules/@module-federation/runtime/dist/index.cjs.js +1 -1
  34. package/dist/shared/node_modules/@module-federation/runtime/dist/index.es.js +1 -1
  35. package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.cjs.js +1 -1
  36. package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.es.js +1 -1
  37. package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.cjs.js +1 -1
  38. package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.es.js +1 -1
  39. package/dist/shared/node_modules/react-transition-group/esm/Transition.cjs.js +1 -1
  40. package/dist/shared/node_modules/react-transition-group/esm/Transition.es.js +1 -1
  41. package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.cjs.js +1 -1
  42. package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.es.js +1 -1
  43. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +5 -5
  44. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
  45. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +83 -86
  46. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
  47. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js +1 -1
  48. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js.map +1 -1
  49. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js +14 -14
  50. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js.map +1 -1
  51. package/package.json +1 -1
@@ -145,29 +145,29 @@ const bt = Et(void 0), ks = ({
145
145
  async (a, d) => {
146
146
  const { headers: l, fullRow: I } = d || {};
147
147
  try {
148
- const $ = X.map((h) => h.id).filter((h) => h !== K), E = /* @__PURE__ */ new Map();
148
+ const S = X.map((h) => h.id).filter((h) => h !== K), v = /* @__PURE__ */ new Map();
149
149
  a.forEach((h) => {
150
150
  const e = q(h);
151
151
  if (!e) return;
152
- const { rowId: u, colId: A } = e;
153
- A === K || !$.includes(A) || (E.has(u) || E.set(u, /* @__PURE__ */ new Set()), E.get(u)?.add(A));
152
+ const { rowId: u, colId: $ } = e;
153
+ $ === K || !S.includes($) || (v.has(u) || v.set(u, /* @__PURE__ */ new Set()), v.get(u)?.add($));
154
154
  }), I && a.filter(
155
155
  (e) => q(e)?.rowId && q(e)?.colId === K
156
156
  ).map((e) => q(e)?.rowId).forEach((e) => {
157
- E.has(e) || E.set(e, /* @__PURE__ */ new Set()), Array.from(b.colIdToIndex.keys()).forEach((A) => {
158
- E.get(e)?.add(A);
157
+ v.has(e) || v.set(e, /* @__PURE__ */ new Set()), Array.from(b.colIdToIndex.keys()).forEach(($) => {
158
+ v.get(e)?.add($);
159
159
  });
160
160
  });
161
- const m = Array.from(E.keys()).sort((h, e) => {
162
- const u = b.rowIdToIndex.get(h) ?? 1 / 0, A = b.rowIdToIndex.get(e) ?? 1 / 0;
163
- return u - A;
161
+ const m = Array.from(v.keys()).sort((h, e) => {
162
+ const u = b.rowIdToIndex.get(h) ?? 1 / 0, $ = b.rowIdToIndex.get(e) ?? 1 / 0;
163
+ return u - $;
164
164
  });
165
165
  let D = "";
166
166
  const et = m[0];
167
167
  if (!et) return "";
168
- const ot = Array.from(E.get(et) || []).sort((h, e) => {
169
- const u = b.colIdToIndex.get(h) ?? 1 / 0, A = b.colIdToIndex.get(e) ?? 1 / 0;
170
- return u - A;
168
+ const ot = Array.from(v.get(et) || []).sort((h, e) => {
169
+ const u = b.colIdToIndex.get(h) ?? 1 / 0, $ = b.colIdToIndex.get(e) ?? 1 / 0;
170
+ return u - $;
171
171
  });
172
172
  if (l && ot.length > 0) {
173
173
  const h = [];
@@ -184,11 +184,11 @@ const bt = Et(void 0), ks = ({
184
184
  console.warn(`Entity not found for rowId: ${h}`);
185
185
  continue;
186
186
  }
187
- const A = Array.from(E.get(h) || []).sort((c, w) => {
187
+ const $ = Array.from(v.get(h) || []).sort((c, w) => {
188
188
  const F = b.colIdToIndex.get(c) ?? 1 / 0, W = b.colIdToIndex.get(w) ?? 1 / 0;
189
189
  return F - W;
190
190
  }).filter((c) => c !== K), R = [];
191
- for (const c of A) {
191
+ for (const c of $) {
192
192
  let w = "";
193
193
  if (c.startsWith("link_"))
194
194
  w = Nt(e.links, c);
@@ -201,17 +201,14 @@ const bt = Et(void 0), ks = ({
201
201
  } else {
202
202
  let k = lt(e, c);
203
203
  if (c === "folder" && typeof k != "string") {
204
- const T = k || e.product?.folder, t = "parents" in e ? e.parents : void 0;
205
- k = T?.label || T?.name || t?.[t.length - 1] || "";
204
+ const A = k || e.product?.folder, t = "parents" in e ? e.parents : void 0;
205
+ k = A?.label || A?.name || t?.[t.length - 1] || "";
206
206
  }
207
207
  if (!k) {
208
- const T = Q.find((t) => t.name === c.replace("attrib_", ""));
209
- T && T.data.type === "boolean" ? k = !1 : T && T.data.type.includes("list_of") && (k = []);
210
- }
211
- if (w = k != null ? String(k) : "", c === "name" && (w = jt(e.entityId || e.id, j) || e.label || e.name || ""), c === "subType") {
212
- const T = e.subType;
213
- typeof T == "string" && T ? w = T : ("folderType" in e && (w = e.folderType || ""), "taskType" in e && (w = e.taskType || ""));
208
+ const A = Q.find((t) => t.name === c.replace("attrib_", ""));
209
+ A && A.data.type === "boolean" ? k = !1 : A && A.data.type.includes("list_of") && (k = []);
214
210
  }
211
+ w = k != null ? String(k) : "", c === "name" && (w = jt(e.entityId || e.id, j)), c === "subType" && ("folderType" in e && (w = e.folderType || ""), "taskType" in e && (w = e.taskType || ""));
215
212
  }
216
213
  const F = w.replace(/"/g, '""'), W = c !== "subtasks" && (w.includes(`
217
214
  `) || w.includes(" ") || w.includes('"'));
@@ -221,8 +218,8 @@ const bt = Et(void 0), ks = ({
221
218
  `;
222
219
  }
223
220
  return D;
224
- } catch ($) {
225
- console.error("Failed to copy to clipboard:", $);
221
+ } catch (S) {
222
+ console.error("Failed to copy to clipboard:", S);
226
223
  }
227
224
  },
228
225
  [B, It, b, j, H, X]
@@ -230,7 +227,7 @@ const bt = Et(void 0), ks = ({
230
227
  const a = await ft();
231
228
  if (!a) return !1;
232
229
  const d = yt(a);
233
- return d.length === 0 ? !1 : d.every((l) => l.values.every((I) => I.split(",").every(($) => Rt($))));
230
+ return d.length === 0 ? !1 : d.every((l) => l.values.every((I) => I.split(",").every((S) => Rt(S))));
234
231
  }, Z = it(
235
232
  async (a, d) => {
236
233
  if (a = a || Array.from(B), !a.length) return;
@@ -258,10 +255,10 @@ const bt = Et(void 0), ks = ({
258
255
  try {
259
256
  const I = await at(a, { headers: !0, fullRow: l });
260
257
  if (!I) return;
261
- const $ = new Blob([I], { type: "text/csv" }), E = URL.createObjectURL($), m = document.createElement("a");
262
- m.href = E;
258
+ const S = new Blob([I], { type: "text/csv" }), v = URL.createObjectURL(S), m = document.createElement("a");
259
+ m.href = v;
263
260
  const D = a.length;
264
- m.download = `${d}-export-${D}_cells-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, m.click(), URL.revokeObjectURL(E);
261
+ m.download = `${d}-export-${D}_cells-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, m.click(), URL.revokeObjectURL(v);
265
262
  } catch (I) {
266
263
  console.error("Failed to copy to clipboard:", I);
267
264
  }
@@ -289,8 +286,8 @@ const bt = Et(void 0), ks = ({
289
286
  if (!a.length) return;
290
287
  const I = await ft();
291
288
  if (!I) return;
292
- let $ = !1, E = I;
293
- Kt(I) && ($ = !0);
289
+ let S = !1, v = I;
290
+ Kt(I) && (S = !0);
294
291
  const m = yt(I);
295
292
  if (!m.length) return;
296
293
  const D = m.length === 1 && m[0].values.length === 1, et = X.map((t) => t.id).filter((t) => t !== K), ot = (t, o, s) => {
@@ -313,7 +310,7 @@ const bt = Et(void 0), ks = ({
313
310
  const u = Array.from(e.keys()).sort((t, o) => {
314
311
  const s = b.rowIdToIndex.get(t) ?? 1 / 0, f = b.rowIdToIndex.get(o) ?? 1 / 0;
315
312
  return s - f;
316
- }), A = u[0], R = Array.from(e.get(A) || []).sort((t, o) => {
313
+ }), $ = u[0], R = Array.from(e.get($) || []).sort((t, o) => {
317
314
  const s = b.colIdToIndex.get(t) ?? 1 / 0, f = b.colIdToIndex.get(o) ?? 1 / 0;
318
315
  return s - f;
319
316
  });
@@ -341,56 +338,56 @@ const bt = Et(void 0), ks = ({
341
338
  if (o === "name") continue;
342
339
  if (o === "subtasks") {
343
340
  let r = [], g = !1;
344
- if ($) {
345
- const n = E.trim().split(`
341
+ if (S) {
342
+ const n = v.trim().split(`
346
343
  `), y = n[0].toLowerCase(), V = y.includes("label") && y.includes("name") && y.includes("start date") && y.includes("end date") && y.includes("assignees") && y.includes("status") ? n.slice(1) : n, P = /* @__PURE__ */ new Map(), O = [];
347
344
  V.forEach((N) => {
348
345
  const L = pt(N);
349
346
  if (L.length === 0) return;
350
- const x = L[0], U = `${x.taskId || ""}|${x.taskName || ""}`;
351
- P.has(U) || (P.set(U, []), O.push(U)), P.get(U).push(x);
347
+ const T = L[0], U = `${T.taskId || ""}|${T.taskName || ""}`;
348
+ P.has(U) || (P.set(U, []), O.push(U)), P.get(U).push(T);
352
349
  }), O.forEach((N) => {
353
- const [L, x] = N.split("|");
350
+ const [L, T] = N.split("|");
354
351
  r.push({
355
352
  taskId: L || void 0,
356
- taskName: x || void 0,
353
+ taskName: T || void 0,
357
354
  subtasks: P.get(N) || []
358
355
  });
359
356
  }), g = r.length <= 1;
360
357
  }
361
358
  for (let n = 0; n < u.length; n++) {
362
- const y = u[n], v = ct(y, j)?.entityType;
363
- if (v !== "task") continue;
364
- const V = H(y), P = V?.entityId || y, O = `${y}-${v}`;
359
+ const y = u[n], C = ct(y, j)?.entityType;
360
+ if (C !== "task") continue;
361
+ const V = H(y), P = V?.entityId || y, O = `${y}-${C}`;
365
362
  c.has(O) || c.set(O, {
366
363
  rowId: y,
367
364
  id: P,
368
- type: v,
365
+ type: C,
369
366
  fields: {},
370
367
  attrib: {},
371
368
  links: {}
372
369
  });
373
370
  const N = c.get(O), L = V && "subtasks" in V && V.subtasks || [];
374
371
  N.previousSubtasks = L;
375
- let x = [];
376
- if ($) {
372
+ let T = [];
373
+ if (S) {
377
374
  if (g && r.length > 0)
378
- x = r[0].subtasks;
375
+ T = r[0].subtasks;
379
376
  else if (r.length > 0) {
380
377
  const i = n % r.length;
381
- x = r[i].subtasks;
378
+ T = r[i].subtasks;
382
379
  }
383
380
  } else if (D) {
384
381
  const i = m[0].values[0];
385
- x = pt(i);
382
+ T = pt(i);
386
383
  } else {
387
- const i = n % m.length, C = m[i], S = t % C.values.length, _ = C.values[S];
388
- x = pt(_);
384
+ const i = n % m.length, x = m[i], E = t % x.values.length, _ = x.values[E];
385
+ T = pt(_);
389
386
  }
390
- if (!x || x.length === 0) continue;
391
- const U = x.map((i, C) => ({
387
+ if (!T || T.length === 0) continue;
388
+ const U = T.map((i, x) => ({
392
389
  id: Pt(),
393
- name: Mt(i.name || i.label || `Subtask ${C + 1}`),
390
+ name: Mt(i.name || i.label || `Subtask ${x + 1}`),
394
391
  label: i.label || "",
395
392
  assignees: i.assignees || [],
396
393
  description: i.label || "",
@@ -399,25 +396,25 @@ const bt = Et(void 0), ks = ({
399
396
  isDone: i.isDone || !1
400
397
  }));
401
398
  if (l === "merge") {
402
- const i = [...L], C = new Set(
403
- L.map((S) => {
404
- const _ = (S.label || "").toLowerCase(), st = (S.name || "").toLowerCase();
399
+ const i = [...L], x = new Set(
400
+ L.map((E) => {
401
+ const _ = (E.label || "").toLowerCase(), st = (E.name || "").toLowerCase();
405
402
  return `${_}|${st}`;
406
403
  })
407
404
  );
408
- for (const S of U) {
409
- const _ = (S.label || "").toLowerCase(), st = (S.name || "").toLowerCase(), rt = `${_}|${st}`;
410
- C.has(rt) || i.push(S);
405
+ for (const E of U) {
406
+ const _ = (E.label || "").toLowerCase(), st = (E.name || "").toLowerCase(), rt = `${_}|${st}`;
407
+ x.has(rt) || i.push(E);
411
408
  }
412
409
  N.subtasks = i;
413
410
  } else {
414
- const i = U.map((C) => {
415
- const S = L.find(
416
- (_) => (_.label || "").toLowerCase() === (C.label || "").toLowerCase() && (_.name || "").toLowerCase() === (C.name || "").toLowerCase()
411
+ const i = U.map((x) => {
412
+ const E = L.find(
413
+ (_) => (_.label || "").toLowerCase() === (x.label || "").toLowerCase() && (_.name || "").toLowerCase() === (x.name || "").toLowerCase()
417
414
  );
418
415
  return {
419
- ...C,
420
- id: S?.id || C.id
416
+ ...x,
417
+ id: E?.id || x.id
421
418
  };
422
419
  });
423
420
  N.subtasks = i;
@@ -434,7 +431,7 @@ const bt = Et(void 0), ks = ({
434
431
  else if (o === "tags" || o === "assignees")
435
432
  p = "array";
436
433
  else if (s) {
437
- const n = o.replace("attrib_", ""), y = Q.find((v) => v.name === n);
434
+ const n = o.replace("attrib_", ""), y = Q.find((C) => C.name === n);
438
435
  if (y)
439
436
  switch (y.data.type) {
440
437
  case "boolean":
@@ -457,31 +454,31 @@ const bt = Et(void 0), ks = ({
457
454
  }
458
455
  for (let r = 0; r < u.length; r++) {
459
456
  const g = u[r], n = ct(g, j)?.entityType, y = n === "folder";
460
- let v;
457
+ let C;
461
458
  if (D)
462
- v = m[0].values[0];
459
+ C = m[0].values[0];
463
460
  else {
464
461
  const U = r % m.length, i = m[U];
465
462
  if (i.values.length > R.length) {
466
- const C = b.colIdToIndex.get(R[0]) ?? 0, S = Array.from(b.colIdToIndex.keys()).filter((G) => G !== K).sort((G, Tt) => {
463
+ const x = b.colIdToIndex.get(R[0]) ?? 0, E = Array.from(b.colIdToIndex.keys()).filter((G) => G !== K).sort((G, Tt) => {
467
464
  const xt = b.colIdToIndex.get(G) ?? 1 / 0, Ct = b.colIdToIndex.get(Tt) ?? 1 / 0;
468
465
  return xt - Ct;
469
- }), _ = S.findIndex(
470
- (G) => b.colIdToIndex.get(G) === C
471
- ), rt = S.slice(
466
+ }), _ = E.findIndex(
467
+ (G) => b.colIdToIndex.get(G) === x
468
+ ), rt = E.slice(
472
469
  _,
473
470
  _ + i.values.length
474
471
  ).indexOf(o);
475
- v = i.values[rt] || i.values[rt % i.values.length];
472
+ C = i.values[rt] || i.values[rt % i.values.length];
476
473
  } else {
477
- const C = t % i.values.length;
478
- v = i.values[C];
474
+ const x = t % i.values.length;
475
+ C = i.values[x];
479
476
  }
480
477
  }
481
478
  let V = o.split("_").pop() || o;
482
- if (o === "subType" && (V = y ? "folderType" : "taskType", s = !1, !v))
479
+ if (o === "subType" && (V = y ? "folderType" : "taskType", s = !1, !C))
483
480
  continue;
484
- const P = Bt(v, p), N = H(g)?.entityId || g, L = `${g}-${n}`;
481
+ const P = Bt(C, p), N = H(g)?.entityId || g, L = `${g}-${n}`;
485
482
  !c.has(L) && n && c.set(L, {
486
483
  rowId: g,
487
484
  id: N,
@@ -490,11 +487,11 @@ const bt = Et(void 0), ks = ({
490
487
  attrib: {},
491
488
  links: {}
492
489
  });
493
- const x = c.get(L);
490
+ const T = c.get(L);
494
491
  if (f) {
495
- const [U, i, C, S, _] = o.split("_");
496
- x.links[`${i}|${C}|${S}_${_}`] = P;
497
- } else s ? x.attrib[V] = P : x.fields[V] = P;
492
+ const [U, i, x, E, _] = o.split("_");
493
+ T.links[`${i}|${x}|${E}_${_}`] = P;
494
+ } else s ? T.attrib[V] = P : T.fields[V] = P;
498
495
  }
499
496
  }
500
497
  const w = [], F = /* @__PURE__ */ new Map();
@@ -519,12 +516,12 @@ const bt = Et(void 0), ks = ({
519
516
  }), Object.entries(t.links).forEach(([o, s]) => {
520
517
  const [f, p] = o.split("_"), r = f.split("|");
521
518
  if (r.length >= 3) {
522
- const g = r[0], n = r[1], y = r[2], v = `${g}|${n}|${y}`, V = p === "out" ? y : n, P = `${t.id}-${v}-${p}`;
519
+ const g = r[0], n = r[1], y = r[2], C = `${g}|${n}|${y}`, V = p === "out" ? y : n, P = `${t.id}-${C}-${p}`;
523
520
  F.set(P, {
524
521
  rowId: t.rowId,
525
522
  sourceEntityId: t.id,
526
523
  sourceEntityType: t.type,
527
- linkType: v,
524
+ linkType: C,
528
525
  direction: p,
529
526
  targetEntityType: V,
530
527
  operation: l,
@@ -541,8 +538,8 @@ const bt = Et(void 0), ks = ({
541
538
  previousSubtasks: t.previousSubtasks
542
539
  });
543
540
  });
544
- const T = [];
545
- if (w.length > 0 && T.push(mt(w)), W.length > 0 && T.push(ut(W)), k.length > 0) {
541
+ const A = [];
542
+ if (w.length > 0 && A.push(mt(w)), W.length > 0 && A.push(ut(W)), k.length > 0) {
546
543
  nt && k.forEach(({ taskId: o, subtasks: s, previousSubtasks: f }) => {
547
544
  const p = f || [], r = s || [], g = () => {
548
545
  Y({ projectName: J, taskId: o, subtasks: p }).unwrap().catch(() => {
@@ -556,11 +553,11 @@ const bt = Et(void 0), ks = ({
556
553
  const t = k.map(
557
554
  ({ taskId: o, subtasks: s }) => Y({ projectName: J, taskId: o, subtasks: s }).unwrap()
558
555
  );
559
- T.push(...t);
556
+ A.push(...t);
560
557
  }
561
- if (T.length > 0)
558
+ if (A.length > 0)
562
559
  try {
563
- await Promise.all(T);
560
+ await Promise.all(A);
564
561
  } catch (t) {
565
562
  console.error("Error updating entities:", t), M(`Paste failed: ${t || t?.message || "Unknown error"}`);
566
563
  }
@@ -583,8 +580,8 @@ const bt = Et(void 0), ks = ({
583
580
  St(() => {
584
581
  const a = async (d) => {
585
582
  if ((d.ctrlKey || d.metaKey) && d.key === "c") {
586
- const l = document.activeElement, I = l?.closest("table") !== null || l?.closest(".table-container") !== null || l?.tagName === "TD" || l?.tagName === "TH", $ = l?.tagName === "INPUT" || l?.tagName === "TEXTAREA" || l?.isContentEditable;
587
- if ((window.getSelection()?.toString().length ?? !1) && !I || $ && !I)
583
+ const l = document.activeElement, I = l?.closest("table") !== null || l?.closest(".table-container") !== null || l?.tagName === "TD" || l?.tagName === "TH", S = l?.tagName === "INPUT" || l?.tagName === "TEXTAREA" || l?.isContentEditable;
584
+ if ((window.getSelection()?.toString().length ?? !1) && !I || S && !I)
588
585
  return;
589
586
  B.size > 0 && await Z();
590
587
  }