@wisemen/vue-core-actions 0.2.4 → 0.4.0

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.js CHANGED
@@ -311,11 +311,11 @@ function ye(e, n, r = {}) {
311
311
  }
312
312
  //#endregion
313
313
  //#region src/const/index.ts
314
- var be = .24, xe = .85, Se = -.15, Ce = .05, we = m(!1);
315
- function Te(e) {
316
- we.value = e;
317
- }
314
+ var be = .24, xe = .85, Se = -.15, Ce = .05, we = .02, Te = m(!1);
318
315
  function Ee(e) {
316
+ Te.value = e;
317
+ }
318
+ function De(e) {
319
319
  return e;
320
320
  }
321
321
  //#endregion
@@ -325,94 +325,94 @@ function j(e) {
325
325
  }
326
326
  //#endregion
327
327
  //#region src/utils/resolveActions.util.ts
328
- var De = /[\s\-_./]+/;
329
- async function Oe(e, t, n, r) {
330
- let i = t.searchInput.length, a = i >= 0, o = je(e);
331
- if (a) {
332
- let e = [], a = [], s = [...o];
333
- for (; s.length > 0;) {
334
- let n = s.shift();
328
+ var Oe = /[\s\-_./]+/;
329
+ async function ke(e, t, n, r, i = !1) {
330
+ let a = t.searchInput.length, o = a >= 0, s = Me(e);
331
+ if (o) {
332
+ let e = [], o = [], c = [...s];
333
+ for (; c.length > 0;) {
334
+ let n = c.shift();
335
335
  if (e.push(n), !N(n, t)) continue;
336
- let r = R(n, t), o = i >= (r?.minLength ?? 2);
337
- if (n.subActions !== void 0 && o) {
336
+ let r = R(n, t), i = a >= (r?.minLength ?? 2);
337
+ if (n.subActions !== void 0 && i) {
338
338
  let e = r?.maxResults ?? 99, i = n.subActions(t);
339
339
  if (Array.isArray(i)) {
340
- let t = Me(i.slice(0, e), n);
341
- s.push(...t);
342
- } else if (ke(i)) {
343
- let t = Me(i.actions.slice(0, e), n);
344
- s.push(...t);
340
+ let t = Ne(i.slice(0, e), n);
341
+ c.push(...t);
342
+ } else if (Ae(i)) {
343
+ let t = Ne(i.actions.slice(0, e), n);
344
+ c.push(...t);
345
345
  } else {
346
346
  let t = n;
347
- a.push(async () => Me(await Ae(i, e), t));
347
+ o.push(async () => Ne(await je(i, e), t));
348
348
  }
349
349
  }
350
350
  }
351
- if (a.length > 0 && n !== void 0) {
352
- n(M(e, t, r));
353
- let i = [...e];
354
- return await Promise.all(a.map(async (e) => {
355
- let a = await e();
356
- i.push(...a), n(M(i, t, r));
357
- })), M(i, t, r);
351
+ if (o.length > 0 && n !== void 0) {
352
+ n(M(e, t, r, i));
353
+ let a = [...e];
354
+ return await Promise.all(o.map(async (e) => {
355
+ let o = await e();
356
+ a.push(...o), n(M(a, t, r, i));
357
+ })), M(a, t, r, i);
358
358
  }
359
- let c = (await Promise.all(a.map((e) => e()))).flat();
360
- o = [...e, ...c];
359
+ let l = (await Promise.all(o.map((e) => e()))).flat();
360
+ s = [...e, ...l];
361
361
  }
362
- return M(o, t, r);
362
+ return M(s, t, r, i);
363
363
  }
364
- function M(e, t, n) {
365
- let r = t.searchInput.length >= 0, i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = [];
364
+ function M(e, t, n, r = !1) {
365
+ let i = t.searchInput.length >= 0, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = [];
366
366
  for (let n of e) if (N(n, t)) {
367
367
  if (n.id !== void 0) {
368
- if (a.has(n.id)) continue;
369
- a.add(n.id);
368
+ if (o.has(n.id)) continue;
369
+ o.add(n.id);
370
370
  }
371
371
  if (n.key !== void 0) {
372
- if (i.has(n.key)) continue;
373
- i.add(n.key);
372
+ if (a.has(n.key)) continue;
373
+ a.add(n.key);
374
374
  }
375
- o.push(n);
375
+ s.push(n);
376
376
  }
377
- if (r) {
378
- let e = o.map((e) => ({
377
+ if (i) {
378
+ let e = s.map((e) => ({
379
379
  action: e,
380
- score: Ne(e, t.searchInput, t)
380
+ score: Pe(e, t.searchInput, t)
381
381
  })).filter(({ score: e }) => e >= be);
382
- return e = e.toSorted((e, r) => {
383
- let i = e.action.parentAction ?? n, a = r.action.parentAction ?? n, o = i?.showSelectedSubActionsFirst !== !1 && L(e.action, t) ? 0 : 1, s = a?.showSelectedSubActionsFirst !== !1 && L(r.action, t) ? 0 : 1;
384
- if (o !== s) return o - s;
385
- let c = Math.floor(e.score / Ce + 1e-9), l = Math.floor(r.score / Ce + 1e-9);
386
- if (c !== l) return l - c;
387
- let u = P(e.action, t), d = P(r.action, t);
388
- return u === d ? r.score - e.score : u - d;
382
+ return e = e.toSorted((e, i) => {
383
+ let a = e.action.parentAction ?? n, o = i.action.parentAction ?? n, s = a?.showSelectedSubActionsFirst !== !1 && L(e.action, t) ? 0 : 1, c = o?.showSelectedSubActionsFirst !== !1 && L(i.action, t) ? 0 : 1;
384
+ if (s !== c) return s - c;
385
+ let l = r ? we : Ce, u = Math.floor(e.score / l + 1e-9), d = Math.floor(i.score / l + 1e-9);
386
+ if (u !== d) return d - u;
387
+ let f = P(e.action, t), p = P(i.action, t);
388
+ return f === p ? i.score - e.score : f - p;
389
389
  }), e.map((e) => e.action);
390
390
  }
391
- let s = n?.showSelectedSubActionsFirst !== !1;
392
- return o.sort((e, n) => {
393
- let r = s && L(e, t) ? 0 : 1, i = s && L(n, t) ? 0 : 1;
391
+ let c = n?.showSelectedSubActionsFirst !== !1;
392
+ return s.sort((e, n) => {
393
+ let r = c && L(e, t) ? 0 : 1, i = c && L(n, t) ? 0 : 1;
394
394
  return r === i ? P(e, t) - P(n, t) : r - i;
395
395
  });
396
396
  }
397
- function ke(e) {
397
+ function Ae(e) {
398
398
  return typeof e == "object" && !!e && "actions" in e && "pagination" in e && Array.isArray(e.actions);
399
399
  }
400
- async function Ae(e, t) {
400
+ async function je(e, t) {
401
401
  if (j(e)) {
402
402
  let n = await e;
403
- return ke(n) ? n.actions.slice(0, t) : n.slice(0, t);
403
+ return Ae(n) ? n.actions.slice(0, t) : n.slice(0, t);
404
404
  }
405
405
  if (e == null || !(Symbol.asyncIterator in e)) return [];
406
406
  let n = [];
407
407
  for await (let r of e) if (n.push(r), n.length >= t) break;
408
408
  return n;
409
409
  }
410
- function je(e) {
410
+ function Me(e) {
411
411
  let t = [];
412
412
  for (let n of e) typeof n == "function" ? t.push(...n()) : t.push(n);
413
413
  return t;
414
414
  }
415
- function Me(e, t) {
415
+ function Ne(e, t) {
416
416
  let n = t.rootAction ?? t;
417
417
  return e.map((e) => ({
418
418
  ...e,
@@ -423,23 +423,23 @@ function Me(e, t) {
423
423
  }));
424
424
  }
425
425
  function N(e, t) {
426
- return !(!we.value && e.availableWhenUnauthenticated !== !0 || e.isApplicable !== void 0 && !e.isApplicable(t) || t.menuType === "commandMenu" && e.disabledReason !== void 0 && typeof e.disabledReason(t) == "string" || e.onlyVisibleThroughSearch && t.menuType !== void 0 && t.searchInput.length === 0);
426
+ return !(!Te.value && e.availableWhenUnauthenticated !== !0 || e.isApplicable !== void 0 && !e.isApplicable(t) || t.menuType === "commandMenu" && e.disabledReason !== void 0 && typeof e.disabledReason(t) == "string" || e.onlyVisibleThroughSearch && t.menuType !== void 0 && t.searchInput.length === 0);
427
427
  }
428
428
  function P(e, t) {
429
429
  let n = e.group?.priority ?? null;
430
430
  return n === null ? 9999 : typeof n == "function" ? n(t) : n;
431
431
  }
432
- function Ne(e, t, n) {
432
+ function Pe(e, t, n) {
433
433
  if (t.trim().length === 0 || e.skipFilterScoring) return 1;
434
- let r = I(e, n), i = Pe(e, n);
434
+ let r = I(e, n), i = Fe(e, n);
435
435
  if (e.keywordsExactMatch) {
436
436
  let t = Array.isArray(e.keywordsExactMatch) ? e.keywordsExactMatch : [e.keywordsExactMatch];
437
437
  if (t.some((e) => r.toLowerCase().includes(e.toLowerCase())) || t.some((e) => i.toLowerCase().includes(e.toLowerCase()))) return 1;
438
438
  }
439
- let a = Fe(r, t), o = Fe(i, t) * xe, s = Math.max(a, o);
439
+ let a = Ie(r, t), o = Ie(i, t) * xe, s = Math.max(a, o);
440
440
  return s < .24 && (r.toLowerCase().includes(t.toLowerCase()) ? s = .29 : i.toLowerCase().includes(t.toLowerCase()) && (s = .245)), e.parentAction && (s += Se), e.scoreOverride !== void 0 && (s = e.scoreOverride), e.sortPriority !== void 0 && (s -= e.sortPriority * 1e-4), s;
441
441
  }
442
- function Pe(e, t) {
442
+ function Fe(e, t) {
443
443
  let n = [], r = e.parentScoreInfluence ?? "all";
444
444
  if (r !== "none") {
445
445
  let i = e.parentAction;
@@ -458,14 +458,14 @@ function Pe(e, t) {
458
458
  }
459
459
  return n.join(" ");
460
460
  }
461
- function Fe(e, t) {
461
+ function Ie(e, t) {
462
462
  if (!e || !t) return 0;
463
463
  let n = e.toLowerCase().trim(), r = t.toLowerCase().trim();
464
464
  if (!r || n === r) return 1;
465
465
  if (n.startsWith(r)) return .92 - Math.min(.12, (n.length - r.length) * .002);
466
466
  let i = n.indexOf(r);
467
467
  if (i !== -1) return .82 - Math.min(.12, i * .004);
468
- let a = n.split(De);
468
+ let a = n.split(Oe);
469
469
  if (a.some((e) => e.startsWith(r))) return .68;
470
470
  let o = a.map((e) => e[0] ?? "").join("");
471
471
  if (o === r || o.startsWith(r)) return .6;
@@ -483,10 +483,10 @@ function F(e, t) {
483
483
  function I(e, t) {
484
484
  return typeof e.name == "function" ? e.name(t) : e.name;
485
485
  }
486
- function Ie(e, t) {
486
+ function Le(e, t) {
487
487
  return typeof e.avatar == "function" ? e.avatar(t) : e.avatar ?? null;
488
488
  }
489
- function Le(e, t) {
489
+ function Re(e, t) {
490
490
  return typeof e.hint == "function" ? e.hint(t) : e.hint ?? null;
491
491
  }
492
492
  function L(e, t) {
@@ -495,16 +495,16 @@ function L(e, t) {
495
495
  function R(e, t) {
496
496
  return typeof e.searchSubActionsConfig == "function" ? e.searchSubActionsConfig(t) : e.searchSubActionsConfig ?? null;
497
497
  }
498
- function Re(e, t) {
498
+ function ze(e, t) {
499
499
  return typeof e.preview == "function" ? e.preview(t) : null;
500
500
  }
501
501
  //#endregion
502
502
  //#region src/composables/actionPreview.composable.ts
503
- function ze({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
503
+ function Be({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
504
504
  let i = p(!1), a = t(() => {
505
505
  if (e.value === null || !i.value) return null;
506
506
  let t = r.value.find((t) => t.id === e.value) ?? null;
507
- return t === null ? null : Re(t, n());
507
+ return t === null ? null : ze(t, n());
508
508
  });
509
509
  function o() {
510
510
  i.value = !0;
@@ -526,7 +526,7 @@ function ze({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
526
526
  }
527
527
  //#endregion
528
528
  //#region src/composables/isSelectorVisible.composable.ts
529
- function Be(e) {
529
+ function Ve(e) {
530
530
  let t = p(!1), n = null;
531
531
  function r() {
532
532
  t.value = document.querySelector(e) !== null;
@@ -542,72 +542,93 @@ function Be(e) {
542
542
  }
543
543
  //#endregion
544
544
  //#region src/stores/actionManager.store.ts
545
- async function Ve(e, t, n) {
545
+ async function He(e, t, n) {
546
546
  e.execute !== void 0 && (await e.execute(t), n?.onComplete?.());
547
547
  }
548
- function He(e) {
548
+ function Ue(e) {
549
549
  let t = /* @__PURE__ */ new Set();
550
550
  return e.filter((e) => t.has(e) ? !1 : (t.add(e), !0));
551
551
  }
552
552
  var z = y("actionManager", () => {
553
- let e = p([]), t = p([]), n = p({}), r = x(), i = b(), a = Be("[data-dialog]:not([data-command-menu])");
554
- function o(e) {
555
- n.value = {
556
- ...n.value,
553
+ let e = p([]), t = p([]), n = p([]), r = p(null), i = p({}), a = x(), o = b(), s = Ve("[data-dialog]:not([data-command-menu])");
554
+ function c(e) {
555
+ i.value = {
556
+ ...i.value,
557
557
  ...e
558
558
  };
559
559
  }
560
- function s(e) {
561
- let t = { ...n.value };
562
- delete t[e], n.value = t;
560
+ function l(e) {
561
+ let t = { ...i.value };
562
+ delete t[e], i.value = t;
563
563
  }
564
- function c(t) {
564
+ function u(t) {
565
565
  e.value = t;
566
566
  }
567
- function l(e) {
567
+ function d(e) {
568
568
  t.value = e;
569
569
  }
570
- function u(o) {
571
- let s = He([
572
- ...o.models ?? [],
570
+ function f(e) {
571
+ n.value = e;
572
+ }
573
+ function m(e) {
574
+ r.value = e;
575
+ }
576
+ function h() {
577
+ r.value = {
578
+ items: [],
579
+ type: "include"
580
+ };
581
+ }
582
+ function g(c) {
583
+ let l = Ue([
584
+ ...c.models ?? [],
585
+ ...n.value,
573
586
  ...t.value,
574
587
  ...e.value
575
- ]), c = {
576
- ...n.value,
577
- ...o.metadata
588
+ ]), u = {
589
+ ...i.value,
590
+ ...c.metadata
578
591
  };
579
592
  return {
580
- getPaginationOffsetForSubActionId: (e) => o.subActionsMeta?.[e] ?? null,
581
- hasActiveDialogs: () => a.value,
582
- hasTargetedModelsOfType: (e) => s.some((t) => t.modelName === e),
583
- isRouteActive: (e, t) => t === void 0 || t === !1 ? i.matched.some((t) => t.name === e) : i.name === e,
584
- allModels: s,
593
+ getPaginationOffsetForSubActionId: (e) => c.subActionsMeta?.[e] ?? null,
594
+ hasActiveDialogs: () => s.value,
595
+ hasTargetedModelsOfType: (e) => l.some((t) => t.modelName === e),
596
+ isRouteActive: (e, t) => t === void 0 || t === !1 ? o.matched.some((t) => t.name === e) : o.name === e,
597
+ allModels: l,
598
+ clearTableSelection: h,
585
599
  focusedModels: e.value,
586
- keyboardEvent: o.keyboardEvent,
587
- menuType: o.menuType,
588
- metadata: c,
589
- models: o.models ?? [],
590
- router: r,
591
- searchInput: o.searchInput ?? "",
592
- subActionsMeta: o.subActionsMeta,
593
- targetedModelOfType: (e) => s.find((t) => t.modelName === e) ?? null,
600
+ keyboardEvent: c.keyboardEvent,
601
+ menuType: c.menuType,
602
+ metadata: u,
603
+ models: c.models ?? [],
604
+ router: a,
605
+ searchInput: c.searchInput ?? "",
606
+ selectedModels: n.value,
607
+ subActionsMeta: c.subActionsMeta,
608
+ tableSelection: r.value,
609
+ targetedModelOfType: (e) => l.find((t) => t.modelName === e) ?? null,
594
610
  targetedModelOfTypeOrThrow: (e) => {
595
- let t = s.find((t) => t.modelName === e) ?? null;
611
+ let t = l.find((t) => t.modelName === e) ?? null;
596
612
  if (t === null) throw Error(`Model of type: ${e} not found`);
597
613
  return t;
598
614
  },
599
- targetedModelsOfType: (e) => s.filter((t) => t.modelName === e)
615
+ targetedModelsOfType: (e) => l.filter((t) => t.modelName === e)
600
616
  };
601
617
  }
602
618
  return {
603
- actionContext: u,
604
- executeAction: Ve,
619
+ actionContext: g,
620
+ clearTableSelection: h,
621
+ executeAction: He,
605
622
  focusedModels: e,
606
- metadata: n,
607
- registerMetadata: o,
608
- setFocusedModels: c,
609
- setViewModels: l,
610
- unregisterMetadata: s,
623
+ metadata: i,
624
+ registerMetadata: c,
625
+ selectedModels: n,
626
+ setFocusedModels: u,
627
+ setSelectedModels: f,
628
+ setTableSelection: m,
629
+ setViewModels: d,
630
+ tableSelection: r,
631
+ unregisterMetadata: l,
611
632
  viewModels: t
612
633
  };
613
634
  });
@@ -619,7 +640,7 @@ function B(e) {
619
640
  function V(e, t, n) {
620
641
  return B(t) ? (e.id && (n[e.id] = t.pagination.nextOffset), t.actions) : (e.id && delete n[e.id], t);
621
642
  }
622
- async function Ue(e, t, n, r = 297) {
643
+ async function We(e, t, n, r = 297) {
623
644
  if (e.subActions === void 0) return [];
624
645
  let i = e.subActions(t);
625
646
  if (Array.isArray(i) || B(i)) return V(e, i, n);
@@ -630,13 +651,13 @@ async function Ue(e, t, n, r = 297) {
630
651
  }
631
652
  //#endregion
632
653
  //#region src/composables/actionDropdownMenuContent.composable.ts
633
- function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContainerRef: a }) {
654
+ function Ge({ actions: e, metadata: n, models: r, parentAction: i, scrollContainerRef: a }) {
634
655
  let o = v(), s = z(), c = p(null), l = p(""), u = p(""), d = p(!1), f = p([]), m = p({}), h = p(!0), g = 0, y = t(() => s.actionContext({
635
656
  menuType: "contextualMenu",
636
657
  metadata: n.value,
637
658
  models: r.value,
638
659
  searchInput: u.value
639
- })), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } = ze({
660
+ })), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } = Be({
640
661
  highlightedActionId: c,
641
662
  getContext: () => y.value,
642
663
  resolvedActions: f
@@ -649,8 +670,8 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
649
670
  let t = ++g, n = y.value;
650
671
  try {
651
672
  let r = e.value;
652
- i.value?.subActions !== void 0 && (r = await Ue(i.value, n, m.value));
653
- let a = await Oe(r, n, (e) => {
673
+ i.value?.subActions !== void 0 && (r = await We(i.value, n, m.value));
674
+ let a = await ke(r, n, (e) => {
654
675
  t !== g || e.length === 0 || (f.value = e);
655
676
  }, i.value ?? void 0);
656
677
  if (t !== g) return;
@@ -718,10 +739,10 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
718
739
  }
719
740
  //#endregion
720
741
  //#region src/composables/actionGroup.composable.ts
721
- var Ge = /* @__PURE__ */ function(e) {
742
+ var Ke = /* @__PURE__ */ function(e) {
722
743
  return e[e.HOVER = 1] = "HOVER", e[e.VIEW = 2] = "VIEW", e[e.MODEL = 3] = "MODEL", e[e.GENERAL = 4] = "GENERAL", e[e.NAVIGATION = 5] = "NAVIGATION", e[e.PREFERENCES = 6] = "PREFERENCES", e[e.SETTINGS = 7] = "SETTINGS", e[e.APPLICATION = 8] = "APPLICATION", e[e.ACCOUNT = 9] = "ACCOUNT", e[e.DEVELOPER = 10] = "DEVELOPER", e;
723
744
  }({});
724
- function Ke() {
745
+ function qe() {
725
746
  let e = v();
726
747
  return {
727
748
  account: {
@@ -756,9 +777,9 @@ function Ke() {
756
777
  }
757
778
  //#endregion
758
779
  //#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/HotkeysProviderContext.js
759
- var qe = Symbol("HotkeysContext");
760
- function Je() {
761
- return i(qe, null)?.defaultOptions ?? {};
780
+ var Je = Symbol("HotkeysContext");
781
+ function Ye() {
782
+ return i(Je, null)?.defaultOptions ?? {};
762
783
  }
763
784
  //#endregion
764
785
  //#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/constants.js
@@ -800,10 +821,10 @@ var W = {
800
821
  commandorcontrol: "Mod",
801
822
  mod: "Mod"
802
823
  };
803
- function Ye(e, t = H()) {
824
+ function Xe(e, t = H()) {
804
825
  return e === "Mod" ? t === "mac" ? "Meta" : "Control" : e;
805
826
  }
806
- var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")), Ze = /* @__PURE__ */ new Set([
827
+ var Ze = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")), Qe = /* @__PURE__ */ new Set([
807
828
  "0",
808
829
  "1",
809
830
  "2",
@@ -814,7 +835,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
814
835
  "7",
815
836
  "8",
816
837
  "9"
817
- ]), Qe = /* @__PURE__ */ new Set([
838
+ ]), $e = /* @__PURE__ */ new Set([
818
839
  "F1",
819
840
  "F2",
820
841
  "F3",
@@ -827,7 +848,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
827
848
  "F10",
828
849
  "F11",
829
850
  "F12"
830
- ]), $e = /* @__PURE__ */ new Set([
851
+ ]), et = /* @__PURE__ */ new Set([
831
852
  "ArrowUp",
832
853
  "ArrowDown",
833
854
  "ArrowLeft",
@@ -836,14 +857,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
836
857
  "End",
837
858
  "PageUp",
838
859
  "PageDown"
839
- ]), et = /* @__PURE__ */ new Set([
860
+ ]), tt = /* @__PURE__ */ new Set([
840
861
  "Enter",
841
862
  "Escape",
842
863
  "Space",
843
864
  "Tab",
844
865
  "Backspace",
845
866
  "Delete"
846
- ]), tt = /* @__PURE__ */ new Set([
867
+ ]), nt = /* @__PURE__ */ new Set([
847
868
  "/",
848
869
  "[",
849
870
  "]",
@@ -854,7 +875,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
854
875
  ".",
855
876
  ";",
856
877
  "`"
857
- ]), nt = {
878
+ ]), rt = {
858
879
  Backquote: "`",
859
880
  Backslash: "\\",
860
881
  BracketLeft: "[",
@@ -867,14 +888,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
867
888
  Slash: "/"
868
889
  };
869
890
  [
870
- ...Xe,
871
891
  ...Ze,
872
892
  ...Qe,
873
893
  ...$e,
874
894
  ...et,
875
- ...tt
895
+ ...tt,
896
+ ...nt
876
897
  ];
877
- var rt = {
898
+ var it = {
878
899
  Esc: "Escape",
879
900
  esc: "Escape",
880
901
  escape: "Escape",
@@ -911,13 +932,13 @@ var rt = {
911
932
  pgup: "PageUp",
912
933
  pgdn: "PageDown"
913
934
  };
914
- function it(e) {
935
+ function at(e) {
915
936
  return /^\p{Letter}$/u.test(e);
916
937
  }
917
938
  function G(e) {
918
939
  if (!e) return "";
919
- if (e in rt) return rt[e];
920
- if (it(e)) {
940
+ if (e in it) return it[e];
941
+ if (at(e)) {
921
942
  let t = e.toUpperCase();
922
943
  return t.length === 1 ? t : e;
923
944
  }
@@ -934,7 +955,7 @@ function K(e, t = H()) {
934
955
  else {
935
956
  let e = W[a] ?? W[a.toLowerCase()];
936
957
  if (e) {
937
- let n = Ye(e, t);
958
+ let n = Xe(e, t);
938
959
  r.add(n);
939
960
  } else n.length === 1 && (i = G(a));
940
961
  }
@@ -948,9 +969,9 @@ function K(e, t = H()) {
948
969
  modifiers: U.filter((e) => r.has(e))
949
970
  };
950
971
  }
951
- function at(e, t = H()) {
972
+ function ot(e, t = H()) {
952
973
  let n = e.ctrl ?? !1, r = e.shift ?? !1, i = e.alt ?? !1, a = e.meta ?? !1;
953
- e.mod && (Ye("Mod", t) === "Control" ? n = !0 : a = !0);
974
+ e.mod && (Xe("Mod", t) === "Control" ? n = !0 : a = !0);
954
975
  let o = U.filter((e) => {
955
976
  switch (e) {
956
977
  case "Control": return n;
@@ -969,30 +990,30 @@ function at(e, t = H()) {
969
990
  modifiers: o
970
991
  };
971
992
  }
972
- function ot(e, t) {
993
+ function st(e, t) {
973
994
  let n = t === "mac" ? e.meta && !e.ctrl : e.ctrl && !e.meta, r = [];
974
995
  if (n) r.push("Mod"), e.alt && r.push("Alt"), e.shift && r.push("Shift");
975
996
  else for (let t of U) e.modifiers.includes(t) && r.push(t);
976
997
  return r.push(G(e.key)), r.join("+");
977
998
  }
978
- function st(e, t = H()) {
979
- return ot(K(e, t), t);
980
- }
981
999
  function ct(e, t = H()) {
982
- return ot(e, t);
1000
+ return st(K(e, t), t);
983
1001
  }
984
1002
  function lt(e, t = H()) {
985
- return typeof e == "string" ? st(e, t) : ct(at(e, t), t);
1003
+ return st(e, t);
1004
+ }
1005
+ function ut(e, t = H()) {
1006
+ return typeof e == "string" ? ct(e, t) : lt(ot(e, t), t);
986
1007
  }
987
- function ut(e) {
1008
+ function dt(e) {
988
1009
  return e in W || e.toLowerCase() in W;
989
1010
  }
990
1011
  //#endregion
991
1012
  //#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/format.js
992
- function dt(e) {
1013
+ function ft(e) {
993
1014
  return e.join(" ");
994
1015
  }
995
- function ft(e) {
1016
+ function pt(e) {
996
1017
  let t = [];
997
1018
  for (let n of U) e.modifiers.includes(n) && t.push(n);
998
1019
  return t.push(e.key), t.join("+");
@@ -1005,7 +1026,7 @@ function q(e, t, n = H()) {
1005
1026
  let i = G(e.key), a = r.key;
1006
1027
  if (i !== "Dead" && i.length === 1 && a.length === 1) {
1007
1028
  if (i.toUpperCase() === a.toUpperCase()) return !0;
1008
- if (it(i) && (/^[A-Za-z]$/.test(i) || !e.altKey)) return !1;
1029
+ if (at(i) && (/^[A-Za-z]$/.test(i) || !e.altKey)) return !1;
1009
1030
  }
1010
1031
  if (e.code && (i === "Dead" || i.length === 1 && a.length === 1)) {
1011
1032
  if (e.code.startsWith("Key")) {
@@ -1016,13 +1037,13 @@ function q(e, t, n = H()) {
1016
1037
  let t = e.code.slice(5);
1017
1038
  if (t.length === 1 && /^[0-9]$/.test(t)) return t === a;
1018
1039
  }
1019
- return e.code in nt ? nt[e.code] === a : !1;
1040
+ return e.code in rt ? rt[e.code] === a : !1;
1020
1041
  }
1021
1042
  return i === a;
1022
1043
  }
1023
1044
  //#endregion
1024
1045
  //#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/manager.utils.js
1025
- var pt = {
1046
+ var mt = {
1026
1047
  preventDefault: !0,
1027
1048
  stopPropagation: !0,
1028
1049
  eventType: "keydown",
@@ -1030,10 +1051,10 @@ var pt = {
1030
1051
  ignoreInputs: !0,
1031
1052
  conflictBehavior: "warn"
1032
1053
  };
1033
- function mt(e) {
1054
+ function ht(e) {
1034
1055
  return !(e.ctrl || e.meta || e.key === "Escape");
1035
1056
  }
1036
- function ht(e) {
1057
+ function gt(e) {
1037
1058
  if (!e) return !1;
1038
1059
  if (e instanceof HTMLInputElement) {
1039
1060
  let t = e.type.toLowerCase();
@@ -1041,17 +1062,17 @@ function ht(e) {
1041
1062
  }
1042
1063
  return !!(e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement || e instanceof HTMLElement && e.isContentEditable);
1043
1064
  }
1044
- function gt(e) {
1065
+ function _t(e) {
1045
1066
  return typeof document > "u" ? null : typeof Document < "u" && e instanceof Document || typeof Node < "u" && e.nodeType === Node.DOCUMENT_NODE ? e.activeElement : typeof HTMLElement < "u" && e instanceof HTMLElement ? e.ownerDocument.activeElement ?? null : e.document.activeElement ?? null;
1046
1067
  }
1047
- function _t(e, t, n) {
1048
- let r = gt(t);
1049
- return r && ht(r) && r !== n || e.composedPath().some((e) => ht(e) && e !== n) ? !0 : ht(e.target) && e.target !== n;
1068
+ function vt(e, t, n) {
1069
+ let r = _t(t);
1070
+ return r && gt(r) && r !== n || e.composedPath().some((e) => gt(e) && e !== n) ? !0 : gt(e.target) && e.target !== n;
1050
1071
  }
1051
- function vt(e, t) {
1072
+ function yt(e, t) {
1052
1073
  return t === document || t === window ? e.currentTarget === t || e.currentTarget === document.documentElement : t === window ? e.currentTarget === window || e.currentTarget === document || e.currentTarget === document.documentElement : !!(t instanceof HTMLElement && (e.currentTarget === t || e.target instanceof Node && t.contains(e.target)));
1053
1074
  }
1054
- function yt(e, t, n, r) {
1075
+ function bt(e, t, n, r) {
1055
1076
  if (n !== "allow") {
1056
1077
  if (n === "warn") {
1057
1078
  console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);
@@ -1067,7 +1088,7 @@ var J = /* @__PURE__ */ function(e) {
1067
1088
  return e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e;
1068
1089
  }({});
1069
1090
  /* @__NO_SIDE_EFFECTS__ */
1070
- function bt({ update: e, notify: t, unwatched: n }) {
1091
+ function xt({ update: e, notify: t, unwatched: n }) {
1071
1092
  return {
1072
1093
  link: r,
1073
1094
  unlink: i,
@@ -1186,7 +1207,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
1186
1207
  }
1187
1208
  //#endregion
1188
1209
  //#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.js
1189
- function xt(e, t, n) {
1210
+ function St(e, t, n) {
1190
1211
  let r = typeof e == "object", i = r ? e : void 0;
1191
1212
  return {
1192
1213
  next: (r ? e.next : e)?.bind(i),
@@ -1194,31 +1215,31 @@ function xt(e, t, n) {
1194
1215
  complete: (r ? e.complete : n)?.bind(i)
1195
1216
  };
1196
1217
  }
1197
- var St = [], Y = 0, { link: Ct, unlink: wt, propagate: Tt, checkDirty: Et, shallowPropagate: Dt } = /* @__PURE__ */ bt({
1218
+ var Ct = [], Y = 0, { link: wt, unlink: Tt, propagate: Et, checkDirty: Dt, shallowPropagate: Ot } = /* @__PURE__ */ xt({
1198
1219
  update(e) {
1199
1220
  return e._update();
1200
1221
  },
1201
1222
  notify(e) {
1202
- St[Ot++] = e, e.flags &= ~J.Watching;
1223
+ Ct[kt++] = e, e.flags &= ~J.Watching;
1203
1224
  },
1204
1225
  unwatched(e) {
1205
- e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = J.Mutable | J.Dirty, At(e));
1226
+ e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = J.Mutable | J.Dirty, jt(e));
1206
1227
  }
1207
- }), X = 0, Ot = 0, Z, kt = 0;
1208
- function At(e) {
1228
+ }), X = 0, kt = 0, Z, At = 0;
1229
+ function jt(e) {
1209
1230
  let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
1210
- for (; n !== void 0;) n = wt(n, e);
1231
+ for (; n !== void 0;) n = Tt(n, e);
1211
1232
  }
1212
- function jt() {
1213
- if (!(kt > 0)) {
1214
- for (; X < Ot;) {
1215
- let e = St[X];
1216
- St[X++] = void 0, e.notify();
1233
+ function Mt() {
1234
+ if (!(At > 0)) {
1235
+ for (; X < kt;) {
1236
+ let e = Ct[X];
1237
+ Ct[X++] = void 0, e.notify();
1217
1238
  }
1218
- X = 0, Ot = 0;
1239
+ X = 0, kt = 0;
1219
1240
  }
1220
1241
  }
1221
- function Mt(e, t) {
1242
+ function Nt(e, t) {
1222
1243
  let n = typeof e == "function", r = e, i = {
1223
1244
  _snapshot: n ? void 0 : e,
1224
1245
  subs: void 0,
@@ -1227,10 +1248,10 @@ function Mt(e, t) {
1227
1248
  depsTail: void 0,
1228
1249
  flags: n ? J.None : J.Mutable,
1229
1250
  get() {
1230
- return Z !== void 0 && Ct(i, Z, Y), i._snapshot;
1251
+ return Z !== void 0 && wt(i, Z, Y), i._snapshot;
1231
1252
  },
1232
1253
  subscribe(e) {
1233
- let t = xt(e), n = { current: !1 }, r = Nt(() => {
1254
+ let t = St(e), n = { current: !1 }, r = Pt(() => {
1234
1255
  i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
1235
1256
  });
1236
1257
  return { unsubscribe: () => {
@@ -1246,34 +1267,34 @@ function Mt(e, t) {
1246
1267
  let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
1247
1268
  return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
1248
1269
  } finally {
1249
- Z = a, n && (i.flags &= ~J.RecursedCheck), At(i);
1270
+ Z = a, n && (i.flags &= ~J.RecursedCheck), jt(i);
1250
1271
  }
1251
1272
  }
1252
1273
  };
1253
1274
  return n ? (i.flags = J.Mutable | J.Dirty, i.get = function() {
1254
1275
  let e = i.flags;
1255
- if (e & J.Dirty || e & J.Pending && Et(i.deps, i)) {
1276
+ if (e & J.Dirty || e & J.Pending && Dt(i.deps, i)) {
1256
1277
  if (i._update()) {
1257
1278
  let e = i.subs;
1258
- e !== void 0 && Dt(e);
1279
+ e !== void 0 && Ot(e);
1259
1280
  }
1260
1281
  } else e & J.Pending && (i.flags = e & ~J.Pending);
1261
- return Z !== void 0 && Ct(i, Z, Y), i._snapshot;
1282
+ return Z !== void 0 && wt(i, Z, Y), i._snapshot;
1262
1283
  }) : i.set = function(e) {
1263
1284
  if (i._update(e)) {
1264
1285
  let e = i.subs;
1265
- e !== void 0 && (Tt(e), Dt(e), jt());
1286
+ e !== void 0 && (Et(e), Ot(e), Mt());
1266
1287
  }
1267
1288
  }, i;
1268
1289
  }
1269
- function Nt(e) {
1290
+ function Pt(e) {
1270
1291
  let t = () => {
1271
1292
  let t = Z;
1272
1293
  Z = n, ++Y, n.depsTail = void 0, n.flags = J.Watching | J.RecursedCheck;
1273
1294
  try {
1274
1295
  return e();
1275
1296
  } finally {
1276
- Z = t, n.flags &= ~J.RecursedCheck, At(n);
1297
+ Z = t, n.flags &= ~J.RecursedCheck, jt(n);
1277
1298
  }
1278
1299
  }, n = {
1279
1300
  deps: void 0,
@@ -1283,19 +1304,19 @@ function Nt(e) {
1283
1304
  flags: J.Watching | J.RecursedCheck,
1284
1305
  notify() {
1285
1306
  let e = this.flags;
1286
- e & J.Dirty || e & J.Pending && Et(this.deps, this) ? t() : this.flags = J.Watching;
1307
+ e & J.Dirty || e & J.Pending && Dt(this.deps, this) ? t() : this.flags = J.Watching;
1287
1308
  },
1288
1309
  stop() {
1289
- this.flags = J.None, this.depsTail = void 0, At(this);
1310
+ this.flags = J.None, this.depsTail = void 0, jt(this);
1290
1311
  }
1291
1312
  };
1292
1313
  return t(), n;
1293
1314
  }
1294
1315
  //#endregion
1295
1316
  //#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/store.js
1296
- var Pt = class {
1317
+ var Ft = class {
1297
1318
  constructor(e, t) {
1298
- this.atom = Mt(e), this.get = this.get.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), t && (this.actions = t(this));
1319
+ this.atom = Nt(e), this.get = this.get.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), t && (this.actions = t(this));
1299
1320
  }
1300
1321
  setState(e) {
1301
1322
  this.atom.set(e);
@@ -1307,19 +1328,19 @@ var Pt = class {
1307
1328
  return this.state;
1308
1329
  }
1309
1330
  subscribe(e) {
1310
- return this.atom.subscribe(xt(e));
1331
+ return this.atom.subscribe(St(e));
1311
1332
  }
1312
- }, Ft = 0;
1313
- function It() {
1314
- return `hotkey_${++Ft}`;
1333
+ }, It = 0;
1334
+ function Lt() {
1335
+ return `hotkey_${++It}`;
1315
1336
  }
1316
- var Lt = class e {
1337
+ var Rt = class e {
1317
1338
  static #e = null;
1318
1339
  #t;
1319
1340
  #n = /* @__PURE__ */ new Map();
1320
1341
  #r = /* @__PURE__ */ new Map();
1321
1342
  constructor() {
1322
- this.registrations = new Pt(/* @__PURE__ */ new Map()), this.#t = H();
1343
+ this.registrations = new Ft(/* @__PURE__ */ new Map()), this.#t = H();
1323
1344
  }
1324
1345
  static getInstance() {
1325
1346
  return e.#e ||= new e(), e.#e;
@@ -1331,7 +1352,7 @@ var Lt = class e {
1331
1352
  if (typeof document > "u" && !n.target) {
1332
1353
  let e = t;
1333
1354
  return {
1334
- id: It(),
1355
+ id: Lt(),
1335
1356
  unregister: () => {},
1336
1357
  get callback() {
1337
1358
  return e;
@@ -1345,15 +1366,15 @@ var Lt = class e {
1345
1366
  }
1346
1367
  };
1347
1368
  }
1348
- let r = It(), i = n.platform ?? this.#t, a = typeof e == "string" ? K(e, i) : at(e, i), o = typeof e == "string" ? e : ft(a), s = n.target ?? document, c = n.conflictBehavior ?? "warn", l = this.#d(o, s);
1349
- l && yt(l.id, o, c, (e) => this.#i(e));
1350
- let u = n.ignoreInputs ?? mt(a), d = {
1369
+ let r = Lt(), i = n.platform ?? this.#t, a = typeof e == "string" ? K(e, i) : ot(e, i), o = typeof e == "string" ? e : pt(a), s = n.target ?? document, c = n.conflictBehavior ?? "warn", l = this.#d(o, s);
1370
+ l && bt(l.id, o, c, (e) => this.#i(e));
1371
+ let u = n.ignoreInputs ?? ht(a), d = {
1351
1372
  id: r,
1352
1373
  hotkey: o,
1353
1374
  parsedHotkey: a,
1354
1375
  callback: t,
1355
1376
  options: {
1356
- ...pt,
1377
+ ...mt,
1357
1378
  requireReset: !1,
1358
1379
  ...n,
1359
1380
  platform: i,
@@ -1428,7 +1449,7 @@ var Lt = class e {
1428
1449
  let r = this.#r.get(t);
1429
1450
  if (r) for (let i of r) {
1430
1451
  let r = this.registrations.state.get(i);
1431
- if (r && vt(e, t) && r.options.enabled && !(r.options.ignoreInputs !== !1 && _t(e, t, r.target))) if (n === "keydown") {
1452
+ if (r && yt(e, t) && r.options.enabled && !(r.options.ignoreInputs !== !1 && vt(e, t, r.target))) if (n === "keydown") {
1432
1453
  if (r.options.eventType !== "keydown") continue;
1433
1454
  q(e, r.parsedHotkey, r.options.platform) && (r.options.preventDefault && e.preventDefault(), r.options.stopPropagation && e.stopPropagation(), (!r.options.requireReset || !r.hasFired) && (this.#c(r, e), r.options.requireReset && (r.hasFired = !0)));
1434
1455
  } else r.options.eventType === "keyup" && q(e, r.parsedHotkey, r.options.platform) && this.#c(r, e), r.options.requireReset && r.hasFired && this.#f(r, e) && (r.hasFired = !1);
@@ -1489,19 +1510,19 @@ var Lt = class e {
1489
1510
  this.registrations.setState(() => /* @__PURE__ */ new Map()), this.#n.clear(), this.#r.clear();
1490
1511
  }
1491
1512
  };
1492
- function Rt() {
1493
- return Lt.getInstance();
1513
+ function zt() {
1514
+ return Rt.getInstance();
1494
1515
  }
1495
1516
  //#endregion
1496
1517
  //#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/sequence-manager.js
1497
- var zt = 1e3, Bt = 0;
1498
- function Vt() {
1499
- return `sequence_${++Bt}`;
1518
+ var Bt = 1e3, Vt = 0;
1519
+ function Ht() {
1520
+ return `sequence_${++Vt}`;
1500
1521
  }
1501
- function Ht(e) {
1522
+ function Ut(e) {
1502
1523
  return e.join("|");
1503
1524
  }
1504
- function Ut(e) {
1525
+ function Wt(e) {
1505
1526
  let t = e.parsedSequence.length, n = e.currentIndex > 0 && e.currentIndex < t;
1506
1527
  return {
1507
1528
  id: e.id,
@@ -1514,14 +1535,14 @@ function Ut(e) {
1514
1535
  partialMatchLastKeyTime: n ? e.lastKeyTime : 0
1515
1536
  };
1516
1537
  }
1517
- var Wt = class e {
1538
+ var Gt = class e {
1518
1539
  static #e = null;
1519
1540
  #t = /* @__PURE__ */ new Map();
1520
1541
  #n = /* @__PURE__ */ new Map();
1521
1542
  #r = /* @__PURE__ */ new Map();
1522
1543
  #i;
1523
1544
  constructor() {
1524
- this.registrations = new Pt(/* @__PURE__ */ new Map()), this.#i = H();
1545
+ this.registrations = new Ft(/* @__PURE__ */ new Map()), this.#i = H();
1525
1546
  }
1526
1547
  static getInstance() {
1527
1548
  return e.#e ||= new e(), e.#e;
@@ -1530,20 +1551,20 @@ var Wt = class e {
1530
1551
  e.#e &&= (e.#e.destroy(), null);
1531
1552
  }
1532
1553
  #a(e) {
1533
- this.registrations.setState((t) => new Map(t).set(e.id, Ut(e)));
1554
+ this.registrations.setState((t) => new Map(t).set(e.id, Wt(e)));
1534
1555
  }
1535
1556
  register(e, t, n = {}) {
1536
1557
  if (e.length === 0) throw Error("Sequence must contain at least one hotkey");
1537
- let r = Vt(), i = n.platform ?? this.#i, a = e.map((e) => K(e, i)), o = n.target ?? (typeof document < "u" ? document : {}), s = n.conflictBehavior ?? "warn", c = this.#f(e, o);
1538
- c && yt(c.id, dt(e), s, (e) => this.#o(e));
1539
- let l = a[0], u = n.ignoreInputs ?? mt(l), d = {
1558
+ let r = Ht(), i = n.platform ?? this.#i, a = e.map((e) => K(e, i)), o = n.target ?? (typeof document < "u" ? document : {}), s = n.conflictBehavior ?? "warn", c = this.#f(e, o);
1559
+ c && bt(c.id, ft(e), s, (e) => this.#o(e));
1560
+ let l = a[0], u = n.ignoreInputs ?? ht(l), d = {
1540
1561
  id: r,
1541
1562
  sequence: e,
1542
1563
  parsedSequence: a,
1543
1564
  callback: t,
1544
1565
  options: {
1545
- ...pt,
1546
- timeout: zt,
1566
+ ...mt,
1567
+ timeout: Bt,
1547
1568
  ...n,
1548
1569
  platform: i,
1549
1570
  ignoreInputs: u
@@ -1554,7 +1575,7 @@ var Wt = class e {
1554
1575
  triggerCount: 0,
1555
1576
  hasFired: !1
1556
1577
  };
1557
- this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r, Ut(d))), this.#r.has(o) || this.#r.set(o, /* @__PURE__ */ new Set()), this.#r.get(o).add(r), this.#s(o);
1578
+ this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r, Wt(d))), this.#r.has(o) || this.#r.set(o, /* @__PURE__ */ new Set()), this.#r.get(o).add(r), this.#s(o);
1558
1579
  let f = this;
1559
1580
  return {
1560
1581
  get id() {
@@ -1575,7 +1596,7 @@ var Wt = class e {
1575
1596
  t && (t.options = {
1576
1597
  ...t.options,
1577
1598
  ...e
1578
- }, f.registrations.setState((e) => new Map(e).set(r, Ut(t))));
1599
+ }, f.registrations.setState((e) => new Map(e).set(r, Wt(t))));
1579
1600
  },
1580
1601
  unregister: () => {
1581
1602
  f.#o(r);
@@ -1617,14 +1638,14 @@ var Wt = class e {
1617
1638
  };
1618
1639
  }
1619
1640
  #d(e, t, n) {
1620
- if (ut(G(e.key))) return;
1641
+ if (dt(G(e.key))) return;
1621
1642
  let r = this.#r.get(t);
1622
1643
  if (!r) return;
1623
1644
  let i = Date.now();
1624
1645
  registrationIds: for (let a of r) {
1625
1646
  let r = this.#t.get(a);
1626
- if (!r || !vt(e, t) || !r.options.enabled) continue;
1627
- if (r.options.ignoreInputs !== !1 && _t(e, t, r.target)) continue registrationIds;
1647
+ if (!r || !yt(e, t) || !r.options.enabled) continue;
1648
+ if (r.options.ignoreInputs !== !1 && vt(e, t, r.target)) continue registrationIds;
1628
1649
  if (r.options.eventType !== n) continue;
1629
1650
  let o = r.options.timeout ?? 1e3;
1630
1651
  r.currentIndex > 0 && i - r.lastKeyTime > o && (r.currentIndex = 0, this.#a(r));
@@ -1646,8 +1667,8 @@ var Wt = class e {
1646
1667
  }
1647
1668
  }
1648
1669
  #f(e, t) {
1649
- let n = Ht(e);
1650
- for (let e of this.#t.values()) if (Ht(e.sequence) === n && e.target === t) return e;
1670
+ let n = Ut(e);
1671
+ for (let e of this.#t.values()) if (Ut(e.sequence) === n && e.target === t) return e;
1651
1672
  return null;
1652
1673
  }
1653
1674
  resetAll() {
@@ -1682,20 +1703,20 @@ var Wt = class e {
1682
1703
  this.#t.clear(), this.registrations.setState(() => /* @__PURE__ */ new Map());
1683
1704
  }
1684
1705
  };
1685
- function Gt() {
1686
- return Wt.getInstance();
1706
+ function Kt() {
1707
+ return Gt.getInstance();
1687
1708
  }
1688
1709
  //#endregion
1689
1710
  //#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/useHotkeys.js
1690
- function Kt(e, t = {}) {
1691
- let n = Je(), r = Rt(), i = /* @__PURE__ */ new Map(), a = _(() => {
1711
+ function qt(e, t = {}) {
1712
+ let n = Ye(), r = zt(), i = /* @__PURE__ */ new Map(), a = _(() => {
1692
1713
  let r = Q(e), i = Q(t);
1693
1714
  return r.map((e, t) => {
1694
1715
  let r = Q(e.hotkey), a = e.options ? Q(e.options) : {}, o = {
1695
1716
  ...n.hotkey,
1696
1717
  ...i,
1697
1718
  ...a
1698
- }, s = lt(r, o.platform ?? H()), c = o.enabled === void 0 ? void 0 : Q(o.enabled), l = o.target === void 0 ? void 0 : Q(o.target);
1719
+ }, s = ut(r, o.platform ?? H()), c = o.enabled === void 0 ? void 0 : Q(o.enabled), l = o.target === void 0 ? void 0 : Q(o.target);
1699
1720
  return {
1700
1721
  index: t,
1701
1722
  hotkeyString: s,
@@ -1754,15 +1775,15 @@ function Q(e) {
1754
1775
  }
1755
1776
  //#endregion
1756
1777
  //#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/useHotkeySequences.js
1757
- function qt(e, t = {}) {
1758
- let n = Je(), r = Gt(), i = /* @__PURE__ */ new Map(), a = _(() => {
1778
+ function Jt(e, t = {}) {
1779
+ let n = Ye(), r = Kt(), i = /* @__PURE__ */ new Map(), a = _(() => {
1759
1780
  let r = $(e), i = $(t);
1760
1781
  return r.map((e, t) => {
1761
1782
  let r = $(e.sequence), a = e.options ? $(e.options) : {}, o = {
1762
1783
  ...n.hotkeySequence,
1763
1784
  ...i,
1764
1785
  ...a
1765
- }, s = dt(r), c = o.enabled === void 0 ? void 0 : $(o.enabled), l = o.target === void 0 ? void 0 : $(o.target);
1786
+ }, s = ft(r), c = o.enabled === void 0 ? void 0 : $(o.enabled), l = o.target === void 0 ? void 0 : $(o.target);
1766
1787
  return {
1767
1788
  index: t,
1768
1789
  resolvedSequence: r,
@@ -1823,7 +1844,7 @@ function $(e) {
1823
1844
  }
1824
1845
  //#endregion
1825
1846
  //#region src/stores/actionRegistry.store.ts
1826
- var Jt = y("actionRegistry", () => {
1847
+ var Yt = y("actionRegistry", () => {
1827
1848
  let e = p([]), t = p(/* @__PURE__ */ new Map()), n = 1;
1828
1849
  function r() {
1829
1850
  return [...e.value, ...t.value.values().map((e) => e)];
@@ -1847,14 +1868,14 @@ var Jt = y("actionRegistry", () => {
1847
1868
  });
1848
1869
  //#endregion
1849
1870
  //#region src/composables/actionShortcuts.composable.ts
1850
- function* Yt(e, t) {
1871
+ function* Xt(e, t) {
1851
1872
  for (let n of e) {
1852
1873
  if (yield n, n.subActionsHaveKeyboardShortcuts !== !0 || n.subActions === void 0) continue;
1853
1874
  let e = n.subActions(t);
1854
- Array.isArray(e) ? yield* Yt(e, t) : typeof e == "object" && e && "actions" in e && Array.isArray(e.actions) && (yield* Yt(e.actions, t));
1875
+ Array.isArray(e) ? yield* Xt(e, t) : typeof e == "object" && e && "actions" in e && Array.isArray(e.actions) && (yield* Xt(e.actions, t));
1855
1876
  }
1856
1877
  }
1857
- function Xt(e) {
1878
+ function Zt(e) {
1858
1879
  return [
1859
1880
  e.key,
1860
1881
  e.alt === !0 ? "alt" : "",
@@ -1864,8 +1885,8 @@ function Xt(e) {
1864
1885
  e.shift === !0 ? "shift" : ""
1865
1886
  ].filter(Boolean).join("+");
1866
1887
  }
1867
- function Zt(e) {
1868
- let t = Jt(), n = z();
1888
+ function Qt(e) {
1889
+ let t = Yt(), n = z();
1869
1890
  function r(t) {
1870
1891
  return () => {
1871
1892
  let r = e ? e() : n.actionContext({});
@@ -1880,11 +1901,11 @@ function Zt(e) {
1880
1901
  }
1881
1902
  };
1882
1903
  }
1883
- Kt(() => {
1904
+ qt(() => {
1884
1905
  let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
1885
- for (let e of Yt(t.allActions(), a)) {
1906
+ for (let e of Xt(t.allActions(), a)) {
1886
1907
  if (e.keyboardShortcut === void 0 || "sequence" in e.keyboardShortcut) continue;
1887
- let t = e.keyboardShortcut, n = Xt(t);
1908
+ let t = e.keyboardShortcut, n = Zt(t);
1888
1909
  i.has(n) || i.set(n, []), i.get(n).push(e);
1889
1910
  }
1890
1911
  return Array.from(i.values()).map((e) => {
@@ -1906,9 +1927,9 @@ function Zt(e) {
1906
1927
  }
1907
1928
  };
1908
1929
  });
1909
- }, { conflictBehavior: "allow" }), qt(() => {
1930
+ }, { conflictBehavior: "allow" }), Jt(() => {
1910
1931
  let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
1911
- for (let e of Yt(t.allActions(), a)) {
1932
+ for (let e of Xt(t.allActions(), a)) {
1912
1933
  if (e.keyboardShortcut === void 0 || !("sequence" in e.keyboardShortcut)) continue;
1913
1934
  let t = e.keyboardShortcut.sequence.join(",");
1914
1935
  i.has(t) || i.set(t, []), i.get(t).push(e);
@@ -1929,85 +1950,87 @@ function Zt(e) {
1929
1950
  }
1930
1951
  //#endregion
1931
1952
  //#region src/composables/commandMenuActions.composable.ts
1932
- function Qt({ actionsSnapshot: e, focusedModelsSnapshot: n, listboxContentRef: r, listboxRootRef: i, manager: a, navStack: o, searchInput: s }) {
1933
- let c = p(!1), l = p(!1), u = m([]), d = p({}), f = 0, h = t(() => r.value?.$el);
1934
- function g(e) {
1935
- return a.actionContext({
1953
+ function $t({ isGroupingDisabled: e, actionsSnapshot: n, focusedModelsSnapshot: r, listboxContentRef: i, listboxRootRef: a, manager: o, navStack: s, searchInput: c }) {
1954
+ let l = p(!1), u = p(!1), d = m([]), f = p({}), h = 0, g = t(() => i.value?.$el);
1955
+ function v(e) {
1956
+ return o.actionContext({
1936
1957
  menuType: "commandMenu",
1937
- models: n,
1938
- searchInput: s.value,
1958
+ models: r,
1959
+ searchInput: c.value,
1939
1960
  subActionsMeta: e
1940
1961
  });
1941
1962
  }
1942
- async function v() {
1943
- let t = ++f;
1944
- l.value = !1, c.value = !0;
1963
+ async function y() {
1964
+ let t = ++h;
1965
+ u.value = !1, l.value = !0;
1945
1966
  try {
1946
- let n = g(), r;
1947
- if (o.value.length > 0) {
1948
- let e = o.value.at(-1);
1949
- r = e.parentAction.subActions === void 0 ? e.actions : await Ue(e.parentAction, n, d.value);
1950
- } else r = e;
1951
- let i = await Oe(r, n, (e) => {
1952
- t === f && e.length > 0 && (u.value = e);
1953
- }, o.value.at(-1)?.parentAction);
1954
- t === f && (u.value = i);
1967
+ let r = v(), i;
1968
+ if (s.value.length > 0) {
1969
+ let e = s.value.at(-1);
1970
+ i = e.parentAction.subActions === void 0 ? e.actions : await We(e.parentAction, r, f.value);
1971
+ } else i = n;
1972
+ let a = await ke(i, r, (e) => {
1973
+ t === h && e.length > 0 && (d.value = e);
1974
+ }, s.value.at(-1)?.parentAction, e.value);
1975
+ t === h && (d.value = a);
1955
1976
  } catch (e) {
1956
1977
  throw console.error("Error refreshing actions", e), e;
1957
1978
  } finally {
1958
- t === f && (c.value = !1);
1979
+ t === h && (l.value = !1);
1959
1980
  }
1960
1981
  }
1961
- let y = ie(v, 80);
1962
- return _(s, () => {
1963
- d.value = {}, l.value = !0, (r.value?.$el)?.scrollTo({
1982
+ let b = ie(y, 80);
1983
+ return _(c, () => {
1984
+ f.value = {}, u.value = !0, (i.value?.$el)?.scrollTo({
1964
1985
  behavior: "instant",
1965
1986
  top: 0
1966
- }), y();
1967
- }), _(u, (e, t) => {
1987
+ }), b();
1988
+ }), _(e, () => {
1989
+ y();
1990
+ }), _(d, (e, t) => {
1968
1991
  if (e.length === 0) return;
1969
- let n = i.value?.$el;
1992
+ let n = a.value?.$el;
1970
1993
  setTimeout(() => {
1971
- (n?.querySelector("[data-highlighted]") ?? null) === null && i.value?.highlightFirstItem();
1994
+ (n?.querySelector("[data-highlighted]") ?? null) === null && a.value?.highlightFirstItem();
1972
1995
  }), t.length === 0 && setTimeout(() => {
1973
- (r.value?.$el)?.scrollTo({
1996
+ (i.value?.$el)?.scrollTo({
1974
1997
  behavior: "instant",
1975
1998
  top: 0
1976
1999
  });
1977
2000
  });
1978
- }), ye(h, async () => {
1979
- let e = o.value.at(-1)?.parentAction;
2001
+ }), ye(g, async () => {
2002
+ let e = s.value.at(-1)?.parentAction;
1980
2003
  if (e?.subActions === void 0 || e.id === void 0) return;
1981
- let t = d.value[e.id];
2004
+ let t = f.value[e.id];
1982
2005
  if (t == null) return;
1983
- let n = g({ [e.id]: t }), r = e.subActions(n), i;
2006
+ let n = v({ [e.id]: t }), r = e.subActions(n), i;
1984
2007
  if (Array.isArray(r) || B(r)) i = r;
1985
2008
  else if (j(r)) i = await r;
1986
2009
  else {
1987
2010
  let e = [];
1988
2011
  for await (let t of r) e.push(t);
1989
- u.value = [...u.value, ...e];
2012
+ d.value = [...d.value, ...e];
1990
2013
  return;
1991
2014
  }
1992
- u.value = [...u.value, ...V(e, i, d.value)];
2015
+ d.value = [...d.value, ...V(e, i, f.value)];
1993
2016
  }, {
1994
2017
  canLoadMore: () => {
1995
- let e = o.value.at(-1)?.parentAction;
1996
- return e?.subActions === void 0 || e.id === void 0 ? !1 : d.value[e.id] != null;
2018
+ let e = s.value.at(-1)?.parentAction;
2019
+ return e?.subActions === void 0 || e.id === void 0 ? !1 : f.value[e.id] != null;
1997
2020
  },
1998
2021
  distance: 40
1999
2022
  }), {
2000
- isDebouncing: l,
2001
- isLoadingActions: c,
2002
- buildContext: g,
2003
- refreshActions: v,
2004
- resolvedActions: u,
2005
- subActionsMetaMap: d
2023
+ isDebouncing: u,
2024
+ isLoadingActions: l,
2025
+ buildContext: v,
2026
+ refreshActions: y,
2027
+ resolvedActions: d,
2028
+ subActionsMetaMap: f
2006
2029
  };
2007
2030
  }
2008
2031
  //#endregion
2009
2032
  //#region src/composables/commandMenuAnimation.composable.ts
2010
- function $t(e, t) {
2033
+ function en(e, t) {
2011
2034
  let n = p(!1), r = p(!1), i = null;
2012
2035
  return _(e, (e) => {
2013
2036
  e || (r.value = !1);
@@ -2024,7 +2047,7 @@ function $t(e, t) {
2024
2047
  }
2025
2048
  //#endregion
2026
2049
  //#region src/composables/commandMenuNavigation.composable.ts
2027
- function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, manager: a, navStack: o, refreshActions: s, resolvedActions: c, scrollToTopOfGroup: l, searchInput: u, subActionsMetaMap: d }) {
2050
+ function tn({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, manager: a, navStack: o, refreshActions: s, resolvedActions: c, scrollToTopOfGroup: l, searchInput: u, subActionsMetaMap: d }) {
2028
2051
  let f = v(), m = p(null), h = t(() => o.value.at(-1)?.parentAction ?? null), g = t(() => {
2029
2052
  let e = n();
2030
2053
  return o.value.filter((e) => e.parentAction.forceAsRootMenu !== !0).map((t) => {
@@ -2035,7 +2058,7 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
2035
2058
  if (h.value === null) return f.t("type_a_command_or_search");
2036
2059
  let e = R(h.value, n())?.placeholder;
2037
2060
  return e === void 0 ? f.t("search") : typeof e == "function" ? e() : e;
2038
- }), { preview: y, onKeyDown: b } = ze({
2061
+ }), { preview: y, onKeyDown: b } = Be({
2039
2062
  highlightedActionId: m,
2040
2063
  getContext: n,
2041
2064
  resolvedActions: c
@@ -2074,7 +2097,7 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
2074
2097
  onKeyDown: C
2075
2098
  };
2076
2099
  }
2077
- function tn(e, t) {
2100
+ function nn(e, t) {
2078
2101
  let n = [], r = e.parentAction ?? null;
2079
2102
  for (; r !== null;) {
2080
2103
  if (r.forceAsRootMenu === !0) return n;
@@ -2088,7 +2111,7 @@ function tn(e, t) {
2088
2111
  }
2089
2112
  //#endregion
2090
2113
  //#region src/composables/focusedModels.composable.ts
2091
- function nn(e) {
2114
+ function rn(e) {
2092
2115
  let t = z(), n = p(!1);
2093
2116
  function r() {
2094
2117
  n.value = !0, t.setFocusedModels([...t.focusedModels, ...e.value]);
@@ -2107,8 +2130,8 @@ function nn(e) {
2107
2130
  }
2108
2131
  //#endregion
2109
2132
  //#region src/composables/temporaryActions.composable.ts
2110
- function rn(e, t, n = !1) {
2111
- let r = Jt(), i = [];
2133
+ function an(e, t, n = !1) {
2134
+ let r = Yt(), i = [];
2112
2135
  function a() {
2113
2136
  i.length > 0 || (i = (Array.isArray(e) ? e : [e]).map((e) => r.registerTemporaryAction(s(e))));
2114
2137
  }
@@ -2134,7 +2157,7 @@ function rn(e, t, n = !1) {
2134
2157
  }
2135
2158
  //#endregion
2136
2159
  //#region src/composables/activeModels.composable.ts
2137
- function an(e, t) {
2160
+ function on(e, t) {
2138
2161
  let n = z();
2139
2162
  function r() {
2140
2163
  t === "focused" ? n.setFocusedModels([...n.focusedModels, ...e.value]) : n.setViewModels([...n.viewModels, ...e.value]);
@@ -2150,19 +2173,19 @@ function an(e, t) {
2150
2173
  }
2151
2174
  //#endregion
2152
2175
  //#region src/composables/viewModels.composable.ts
2153
- function on(e) {
2154
- an(e, "view");
2176
+ function sn(e) {
2177
+ on(e, "view");
2155
2178
  }
2156
2179
  //#endregion
2157
2180
  //#region src/utils/commandMenuGroups.util.ts
2158
- var sn = 0, cn = /* @__PURE__ */ new WeakMap();
2159
- function ln(e, t) {
2160
- return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (cn.has(e) || cn.set(e, `unnamed-${sn++}`), cn.get(e));
2161
- }
2181
+ var cn = 0, ln = /* @__PURE__ */ new WeakMap();
2162
2182
  function un(e, t) {
2183
+ return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (ln.has(e) || ln.set(e, `unnamed-${cn++}`), ln.get(e));
2184
+ }
2185
+ function dn(e, t) {
2163
2186
  let n = /* @__PURE__ */ new Map();
2164
2187
  for (let r of e) {
2165
- let e = r.group, i = ln(e, t), a = n.get(i);
2188
+ let e = r.group, i = un(e, t), a = n.get(i);
2166
2189
  if (a === void 0) {
2167
2190
  let r = e?.name ? F(e.name, t) : null;
2168
2191
  a = {
@@ -2179,4 +2202,4 @@ function un(e, t) {
2179
2202
  return [...n.values()];
2180
2203
  }
2181
2204
  //#endregion
2182
- export { Ge as GroupPriority, e as actionsLocales, Oe as applicableActions, un as buildCommandMenuGroups, Ee as createAction, we as isAuthenticated, B as isSubActionsWithMeta, Ie as resolveActionAvatar, tn as resolveActionBreadcrumbs, Le as resolveActionHint, I as resolveActionName, Re as resolveActionPreview, L as resolveActionSelected, F as resolveActionValue, N as resolveApplicable, R as resolveSearchSubActionsConfig, Ue as resolveSubActions, Te as setIsAuthenticated, V as storeSubActionsPagination, We as useActionDropdownMenuContent, Ke as useActionGroup, z as useActionManagerStore, ze as useActionPreview, Jt as useActionRegistryStore, Zt as useActionShortcuts, Qt as useCommandMenuActions, $t as useCommandMenuAnimation, en as useCommandMenuNavigation, nn as useFocusedModels, rn as useTemporaryActions, on as useViewModels };
2205
+ export { Ke as GroupPriority, e as actionsLocales, ke as applicableActions, dn as buildCommandMenuGroups, De as createAction, Te as isAuthenticated, B as isSubActionsWithMeta, Le as resolveActionAvatar, nn as resolveActionBreadcrumbs, Re as resolveActionHint, I as resolveActionName, ze as resolveActionPreview, L as resolveActionSelected, F as resolveActionValue, N as resolveApplicable, R as resolveSearchSubActionsConfig, We as resolveSubActions, Ee as setIsAuthenticated, V as storeSubActionsPagination, Ge as useActionDropdownMenuContent, qe as useActionGroup, z as useActionManagerStore, Be as useActionPreview, Yt as useActionRegistryStore, Qt as useActionShortcuts, $t as useCommandMenuActions, en as useCommandMenuAnimation, tn as useCommandMenuNavigation, rn as useFocusedModels, an as useTemporaryActions, sn as useViewModels };