@visma-swno/vsn-navigation 1.1.0-beta.11 → 1.1.0-beta.13

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.
@@ -191,10 +191,14 @@ function g(e) {
191
191
  function _(e) {
192
192
  return "items" in e;
193
193
  }
194
- var ue = re("activeId");
194
+ var v = class e extends Error {
195
+ constructor(t) {
196
+ super(t), this.name = "SearchError", Object.setPrototypeOf(this, e.prototype);
197
+ }
198
+ }, ue = re("activeId");
195
199
  //#endregion
196
200
  //#region src/shared/icons.ts
197
- function v(e, t = 24, r) {
201
+ function y(e, t = 24, r) {
198
202
  return n`<svg
199
203
  xmlns="http://www.w3.org/2000/svg"
200
204
  width="${t}"
@@ -272,7 +276,7 @@ var xe = i`
272
276
  <path d="m7 9 5-5 5 5"/>
273
277
  `, Se = i`
274
278
  <path d="m18 15-6-6-6 6"/>
275
- `, y = i`
279
+ `, b = i`
276
280
  <path d="m6 9 6 6 6-6"/>
277
281
  `, Ce = i`
278
282
  <circle cx="11" cy="11" r="8"/>
@@ -303,7 +307,7 @@ var Ee = i`
303
307
  `;
304
308
  //#endregion
305
309
  //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
306
- function b(e, t, n, r) {
310
+ function x(e, t, n, r) {
307
311
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
308
312
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
309
313
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -311,7 +315,7 @@ function b(e, t, n, r) {
311
315
  }
312
316
  //#endregion
313
317
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-item.ts
314
- var x = class extends e {
318
+ var S = class extends e {
315
319
  constructor(...e) {
316
320
  super(...e), this.level = 1, this._currentActiveId = "", this._isActive = !1, this._isExpanded = !1;
317
321
  }
@@ -341,7 +345,7 @@ var x = class extends e {
341
345
  }, r = n`
342
346
  ${u(e, () => n`
343
347
  <span class="ga-side-navigation__item-icon">
344
- ${this._isExpanded ? v(y, 24) : v(Ee, 24)}
348
+ ${this._isExpanded ? y(b, 24) : y(Ee, 24)}
345
349
  </span>
346
350
  `)}
347
351
  <div class="ga-side-navigation__item-content">
@@ -375,13 +379,13 @@ var x = class extends e {
375
379
  }
376
380
  }
377
381
  };
378
- b([s({ attribute: !1 })], x.prototype, "tree", void 0), b([s({ type: Number })], x.prototype, "level", void 0), b([le({
382
+ x([s({ attribute: !1 })], S.prototype, "tree", void 0), x([s({ type: Number })], S.prototype, "level", void 0), x([le({
379
383
  context: ue,
380
384
  subscribe: !0
381
- }), l()], x.prototype, "_currentActiveId", void 0), b([l()], x.prototype, "_isActive", void 0), b([l()], x.prototype, "_isExpanded", void 0), x = b([o("vsn-menu-item")], x);
385
+ }), l()], S.prototype, "_currentActiveId", void 0), x([l()], S.prototype, "_isActive", void 0), x([l()], S.prototype, "_isExpanded", void 0), S = x([o("vsn-menu-item")], S);
382
386
  //#endregion
383
387
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu.ts
384
- var S = class extends e {
388
+ var C = class extends e {
385
389
  constructor(...e) {
386
390
  super(...e), this.items = [], this._currentActiveId = "", this.currentItem = "";
387
391
  }
@@ -405,37 +409,37 @@ var S = class extends e {
405
409
  return n`<vsn-menu-item .tree=${e}></vsn-menu-item>`;
406
410
  }
407
411
  };
408
- b([s({ attribute: !1 })], S.prototype, "items", void 0), b([ce({ context: ue }), l()], S.prototype, "_currentActiveId", void 0), b([s()], S.prototype, "currentItem", void 0), S = b([o("vsn-menu")], S);
412
+ x([s({ attribute: !1 })], C.prototype, "items", void 0), x([ce({ context: ue }), l()], C.prototype, "_currentActiveId", void 0), x([s()], C.prototype, "currentItem", void 0), C = x([o("vsn-menu")], C);
409
413
  //#endregion
410
414
  //#region node_modules/@lit/localize/internal/locale-status-event.js
411
- var C = "lit-localize-status", w = (e, ...t) => ({
415
+ var w = "lit-localize-status", T = (e, ...t) => ({
412
416
  strTag: !0,
413
417
  strings: e,
414
418
  values: t
415
- }), De = (e) => typeof e != "string" && "strTag" in e, T = (e, t, n) => {
419
+ }), De = (e) => typeof e != "string" && "strTag" in e, Oe = (e, t, n) => {
416
420
  let r = e[0];
417
421
  for (let i = 1; i < e.length; i++) r += t[n ? n[i - 1] : i - 1], r += e[i];
418
422
  return r;
419
- }, E = ((e) => De(e) ? T(e.strings, e.values) : e), D = E, Oe = !1;
420
- function ke(e) {
421
- if (Oe) throw Error("lit-localize can only be configured once");
422
- D = e, Oe = !0;
423
+ }, ke = ((e) => De(e) ? Oe(e.strings, e.values) : e), E = ke, Ae = !1;
424
+ function je(e) {
425
+ if (Ae) throw Error("lit-localize can only be configured once");
426
+ E = e, Ae = !0;
423
427
  }
424
428
  //#endregion
425
429
  //#region node_modules/@lit/localize/internal/localized-controller.js
426
- var Ae = class {
430
+ var Me = class {
427
431
  constructor(e) {
428
432
  this.__litLocalizeEventHandler = (e) => {
429
433
  e.detail.status === "ready" && this.host.requestUpdate();
430
434
  }, this.host = e;
431
435
  }
432
436
  hostConnected() {
433
- window.addEventListener(C, this.__litLocalizeEventHandler);
437
+ window.addEventListener(w, this.__litLocalizeEventHandler);
434
438
  }
435
439
  hostDisconnected() {
436
- window.removeEventListener(C, this.__litLocalizeEventHandler);
440
+ window.removeEventListener(w, this.__litLocalizeEventHandler);
437
441
  }
438
- }, je = (e) => e.addController(new Ae(e)), O = () => (e, t) => (e.addInitializer(je), e), Me = class {
442
+ }, Ne = (e) => e.addController(new Me(e)), D = () => (e, t) => (e.addInitializer(Ne), e), Pe = class {
439
443
  constructor() {
440
444
  this.settled = !1, this.promise = new Promise((e, t) => {
441
445
  this._resolve = e, this._reject = t;
@@ -447,73 +451,73 @@ var Ae = class {
447
451
  reject(e) {
448
452
  this.settled = !0, this._reject(e);
449
453
  }
450
- }, k = [];
451
- for (let e = 0; e < 256; e++) k[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
452
- function Ne(e) {
454
+ }, O = [];
455
+ for (let e = 0; e < 256; e++) O[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
456
+ function Fe(e) {
453
457
  let t = 0, n = 8997, r = 0, i = 33826, a = 0, o = 40164, s = 0, c = 52210;
454
458
  for (let l = 0; l < e.length; l++) n ^= e.charCodeAt(l), t = n * 435, r = i * 435, a = o * 435, s = c * 435, a += n << 8, s += i << 8, r += t >>> 16, n = t & 65535, a += r >>> 16, i = r & 65535, c = s + (a >>> 16) & 65535, o = a & 65535;
455
- return k[c >> 8] + k[c & 255] + k[o >> 8] + k[o & 255] + k[i >> 8] + k[i & 255] + k[n >> 8] + k[n & 255];
459
+ return O[c >> 8] + O[c & 255] + O[o >> 8] + O[o & 255] + O[i >> 8] + O[i & 255] + O[n >> 8] + O[n & 255];
456
460
  }
457
- var Pe = "h", Fe = "s";
458
- function Ie(e, t) {
459
- return (t ? Pe : Fe) + Ne(typeof e == "string" ? e : e.join(""));
461
+ var Ie = "h", Le = "s";
462
+ function Re(e, t) {
463
+ return (t ? Ie : Le) + Fe(typeof e == "string" ? e : e.join(""));
460
464
  }
461
465
  //#endregion
462
466
  //#region node_modules/@lit/localize/internal/runtime-msg.js
463
- var Le = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new Map();
464
- function Re(e, t, n) {
467
+ var ze = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new Map();
468
+ function Ve(e, t, n) {
465
469
  if (e) {
466
- let r = e[n?.id ?? ze(t)];
470
+ let r = e[n?.id ?? He(t)];
467
471
  if (r) {
468
472
  if (typeof r == "string") return r;
469
- if ("strTag" in r) return T(r.strings, t.values, r.values);
473
+ if ("strTag" in r) return Oe(r.strings, t.values, r.values);
470
474
  {
471
- let e = Le.get(r);
472
- return e === void 0 && (e = r.values, Le.set(r, e)), {
475
+ let e = ze.get(r);
476
+ return e === void 0 && (e = r.values, ze.set(r, e)), {
473
477
  ...r,
474
478
  values: e.map((e) => t.values[e])
475
479
  };
476
480
  }
477
481
  }
478
482
  }
479
- return E(t);
483
+ return ke(t);
480
484
  }
481
- function ze(e) {
482
- let t = typeof e == "string" ? e : e.strings, n = A.get(t);
483
- return n === void 0 && (n = Ie(t, typeof e != "string" && !("strTag" in e)), A.set(t, n)), n;
485
+ function He(e) {
486
+ let t = typeof e == "string" ? e : e.strings, n = Be.get(t);
487
+ return n === void 0 && (n = Re(t, typeof e != "string" && !("strTag" in e)), Be.set(t, n)), n;
484
488
  }
485
489
  //#endregion
486
490
  //#region node_modules/@lit/localize/init/runtime.js
487
- function j(e) {
488
- window.dispatchEvent(new CustomEvent(C, { detail: e }));
491
+ function k(e) {
492
+ window.dispatchEvent(new CustomEvent(w, { detail: e }));
489
493
  }
490
- var M = "", N, Be, P, F, Ve, I = new Me();
491
- I.resolve();
492
- var L = 0, He = (e) => (ke(((e, t) => Re(Ve, e, t))), M = Be = e.sourceLocale, P = new Set(e.targetLocales), P.add(e.sourceLocale), F = e.loadLocale, {
493
- getLocale: Ue,
494
- setLocale: We
495
- }), Ue = () => M, We = (e) => {
496
- if (e === (N ?? M)) return I.promise;
497
- if (!P || !F) throw Error("Internal error");
498
- if (!P.has(e)) throw Error("Invalid locale code");
499
- L++;
500
- let t = L;
501
- return N = e, I.settled && (I = new Me()), j({
494
+ var A = "", j, Ue, M, N, We, P = new Pe();
495
+ P.resolve();
496
+ var F = 0, Ge = (e) => (je(((e, t) => Ve(We, e, t))), A = Ue = e.sourceLocale, M = new Set(e.targetLocales), M.add(e.sourceLocale), N = e.loadLocale, {
497
+ getLocale: Ke,
498
+ setLocale: qe
499
+ }), Ke = () => A, qe = (e) => {
500
+ if (e === (j ?? A)) return P.promise;
501
+ if (!M || !N) throw Error("Internal error");
502
+ if (!M.has(e)) throw Error("Invalid locale code");
503
+ F++;
504
+ let t = F;
505
+ return j = e, P.settled && (P = new Pe()), k({
502
506
  status: "loading",
503
507
  loadingLocale: e
504
- }), (e === Be ? Promise.resolve({ templates: void 0 }) : F(e)).then((n) => {
505
- L === t && (M = e, N = void 0, Ve = n.templates, j({
508
+ }), (e === Ue ? Promise.resolve({ templates: void 0 }) : N(e)).then((n) => {
509
+ F === t && (A = e, j = void 0, We = n.templates, k({
506
510
  status: "ready",
507
511
  readyLocale: e
508
- }), I.resolve());
512
+ }), P.resolve());
509
513
  }, (n) => {
510
- L === t && (j({
514
+ F === t && (k({
511
515
  status: "error",
512
516
  errorLocale: e,
513
517
  errorMessage: n.toString()
514
- }), I.reject(n));
515
- }), I.promise;
516
- }, Ge = class {
518
+ }), P.reject(n));
519
+ }), P.promise;
520
+ }, Je = class {
517
521
  constructor(e) {
518
522
  this._prevExpanded = !1, this.onUserKeydown = (e) => {
519
523
  e.key === "Enter" || e.key === " " ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1);
@@ -527,6 +531,11 @@ var L = 0, He = (e) => (ke(((e, t) => Re(Ve, e, t))), M = Be = e.sourceLocale, P
527
531
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__footer-dropdown-item") && (e.preventDefault(), t.click());
528
532
  return;
529
533
  }
534
+ if (e.key === "Tab" && !e.shiftKey) {
535
+ let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__footer-dropdown-item")), n = t[t.length - 1];
536
+ n && e.target === n && (this.host.expanded = !1);
537
+ return;
538
+ }
530
539
  if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
531
540
  e.preventDefault();
532
541
  let t = this.host.querySelector(".ga-side-navigation__footer-dropdown");
@@ -547,7 +556,24 @@ var L = 0, He = (e) => (ke(((e, t) => Re(Ve, e, t))), M = Be = e.sourceLocale, P
547
556
  this.host.querySelector(".ga-side-navigation__user")?.focus();
548
557
  });
549
558
  }
550
- }, Ke = t`
559
+ }, Ye = class {
560
+ constructor(e, t, n) {
561
+ this._onPointerDown = (e) => {
562
+ let t = e.composedPath();
563
+ for (let e of this._insideSelectors) {
564
+ let n = this._host.renderRoot.querySelector(e);
565
+ if (n && t.includes(n)) return;
566
+ }
567
+ this._callback();
568
+ }, this._host = e, this._insideSelectors = t, this._callback = n, e.addController(this);
569
+ }
570
+ hostConnected() {
571
+ document.addEventListener("pointerdown", this._onPointerDown, !0);
572
+ }
573
+ hostDisconnected() {
574
+ document.removeEventListener("pointerdown", this._onPointerDown, !0);
575
+ }
576
+ }, Xe = t`
551
577
  @layer components {
552
578
  :where(.ga-side-navigation__user),
553
579
  :where(.ga-side-navigation__footer-dropdown-item) {
@@ -583,33 +609,26 @@ var L = 0, He = (e) => (ke(((e, t) => Re(Ve, e, t))), M = Be = e.sourceLocale, P
583
609
  justify-content: center;
584
610
  }
585
611
  }
586
- `, qe = "initials";
587
- function Je(e, t, n, r) {
612
+ `, Ze = "initials";
613
+ function Qe(e, t, n, r) {
588
614
  if (!t) return;
589
615
  let i = new URLSearchParams({
590
- type: qe,
616
+ type: Ze,
591
617
  size: r
592
618
  });
593
619
  return n && i.set("client_id", n), `${e}${t}?${i}`;
594
620
  }
595
621
  //#endregion
596
622
  //#region src/components/vsn-side-bar/vsn-footer/vsn-footer.ts
597
- var Ye = {
623
+ var $e = {
598
624
  profile: ve,
599
625
  logout: ye
600
- }, Xe = () => ({
601
- profile: D("My profile"),
602
- logout: D("Log out")
603
- }), R = class extends e {
604
- constructor(...e) {
605
- super(...e), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new Ge(this), this._onDocumentPointerDown = (e) => {
606
- if (!this.expanded) return;
607
- let t = this.querySelector(".ga-side-navigation__footer-dropdown"), n = this.querySelector(".ga-side-navigation__user"), r = e.composedPath();
608
- t && r.includes(t) || n && r.includes(n) || (this.expanded = !1);
609
- };
610
- }
626
+ }, et = () => ({
627
+ profile: E("My profile"),
628
+ logout: E("Log out")
629
+ }), I = class extends e {
611
630
  static {
612
- this.styles = [h, Ke];
631
+ this.styles = [h, Xe];
613
632
  }
614
633
  createRenderRoot() {
615
634
  return this;
@@ -617,19 +636,18 @@ var Ye = {
617
636
  get _items() {
618
637
  return [{
619
638
  id: "profile",
620
- label: Xe().profile,
639
+ label: et().profile,
621
640
  url: this.myProfileUrl
622
641
  }, {
623
642
  id: "logout",
624
- label: Xe().logout,
643
+ label: et().logout,
625
644
  url: "/logout"
626
645
  }];
627
646
  }
628
- connectedCallback() {
629
- super.connectedCallback(), document.addEventListener("pointerdown", this._onDocumentPointerDown, !0);
630
- }
631
- disconnectedCallback() {
632
- document.removeEventListener("pointerdown", this._onDocumentPointerDown, !0), super.disconnectedCallback();
647
+ constructor() {
648
+ super(), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new Je(this), new Ye(this, [".ga-side-navigation__footer-dropdown", ".ga-side-navigation__user"], () => {
649
+ this.expanded = !1;
650
+ });
633
651
  }
634
652
  willUpdate(e) {
635
653
  (e.has("user") || e.has("profilePictureBaseUrl")) && (this._avatarFailed = !1);
@@ -645,6 +663,8 @@ var Ye = {
645
663
  <div
646
664
  role="button"
647
665
  tabindex="0"
666
+ aria-expanded="${this.expanded}"
667
+ aria-haspopup="menu"
648
668
  class="ga-side-navigation__user
649
669
  ${this.expanded ? "ga-side-navigation__user--active" : ""}"
650
670
  @click=${this._toggle}
@@ -662,7 +682,7 @@ var Ye = {
662
682
  </div>
663
683
 
664
684
  <span class="ga-side-navigation__user-action">
665
- ${this.expanded ? v(Se, 16) : v(xe, 16)}
685
+ ${this.expanded ? y(Se, 16) : y(xe, 16)}
666
686
  </span>
667
687
 
668
688
  </div>
@@ -676,14 +696,14 @@ var Ye = {
676
696
  ${this._items.map((e) => {
677
697
  let t = n`
678
698
  <span class="ga-side-navigation__footer-dropdown-icon">
679
- ${v(Ye[e.id], 16)}
699
+ ${y($e[e.id], 16)}
680
700
  </span>
681
701
  <span class="ga-side-navigation__footer-dropdown-title">
682
702
  ${e.label}
683
703
  </span>
684
704
  ${e.external ? n`
685
705
  <span class="ga-side-navigation__footer-dropdown-trail">
686
- ${v(be, 16)}
706
+ ${y(be, 16)}
687
707
  </span>
688
708
  ` : r}
689
709
  `;
@@ -723,7 +743,7 @@ var Ye = {
723
743
  }));
724
744
  }
725
745
  renderAvatar() {
726
- let e = Je(this.profilePictureBaseUrl, this.user.userId, this.user.clientId, "small");
746
+ let e = Qe(this.profilePictureBaseUrl, this.user.userId, this.user.clientId, "small");
727
747
  return e && !this._avatarFailed ? n`<img
728
748
  class="ga-side-navigation__user-avatar"
729
749
  src=${e}
@@ -731,21 +751,22 @@ var Ye = {
731
751
  @error=${() => {
732
752
  this._avatarFailed = !0;
733
753
  }} />` : n`<span class="ga-side-navigation__user-avatar vsn-side-navigation__user-avatar--icon">
734
- ${v(ve, 24)}
754
+ ${y(ve, 24)}
735
755
  </span>`;
736
756
  }
737
757
  };
738
- b([s({ attribute: !1 })], R.prototype, "user", void 0), b([s()], R.prototype, "profilePictureBaseUrl", void 0), b([s()], R.prototype, "myProfileUrl", void 0), b([s({
758
+ x([s({ attribute: !1 })], I.prototype, "user", void 0), x([s()], I.prototype, "profilePictureBaseUrl", void 0), x([s()], I.prototype, "myProfileUrl", void 0), x([s({
739
759
  type: Boolean,
740
760
  reflect: !0
741
- })], R.prototype, "expanded", void 0), b([l()], R.prototype, "_avatarFailed", void 0), R = b([O(), o("vsn-footer")], R);
761
+ })], I.prototype, "expanded", void 0), x([l()], I.prototype, "_avatarFailed", void 0), I = x([D(), o("vsn-footer")], I);
742
762
  //#endregion
743
763
  //#region src/shared/utils.ts
744
- var Ze = () => D("Choose a service"), Qe = () => D("Search"), $e = (e) => D(w`Type at least ${e} characters to search`), et = () => D("VSN"), tt = "survicate-sdk", nt = "ui-components-feedback", rt = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`, it = class {
764
+ var tt = () => E("Choose a service"), nt = () => E("Search"), rt = (e) => E(T`Type at least ${e} characters to search`), it = () => E("Menu items"), at = (e) => E(T`Load ${e} more`), ot = () => E("VSN"), st = "survicate-sdk", ct = "ui-components-feedback", lt = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`, ut = class {
745
765
  constructor(e) {
746
766
  this.onSwitcherKeydown = (e) => {
747
767
  if (e.key === "Enter" || e.key === " ") {
748
- e.preventDefault(), (this.host.expanded || this.host.hasAvailableItems) && (this.host.expanded = !this.host.expanded);
768
+ if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
769
+ (this.host.expanded || this.host.hasAvailableItems) && (this.host.expanded = !this.host.expanded);
749
770
  return;
750
771
  }
751
772
  if (e.key === "ArrowDown" && !this.host.expanded) {
@@ -753,11 +774,14 @@ var Ze = () => D("Choose a service"), Qe = () => D("Search"), $e = (e) => D(w`Ty
753
774
  e.preventDefault(), this.host.expanded = !0;
754
775
  return;
755
776
  }
756
- e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1);
777
+ if (e.key === "Escape" && this.host.expanded) {
778
+ if (!this.host.canClose) return;
779
+ e.preventDefault(), this.host.expanded = !1;
780
+ }
757
781
  }, this.host = e, e.addController(this);
758
782
  }
759
783
  hostConnected() {}
760
- }, at = ".ga-side-navigation__switcher:focus{outline-offset:2px;outline:2px solid #3b82f6}", z = class extends e {
784
+ }, dt = ".ga-side-navigation__switcher:focus{outline-offset:2px;outline:2px solid #3b82f6}", L = class extends e {
761
785
  constructor(...e) {
762
786
  super(...e), this.items = [], this.loading = !1, this._handleKeydown = (e) => {
763
787
  if (e.key === "Escape") {
@@ -772,6 +796,14 @@ var Ze = () => D("Choose a service"), Qe = () => D("Search"), $e = (e) => D(w`Ty
772
796
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__switcher-dropdown-item") && (e.preventDefault(), t.click());
773
797
  return;
774
798
  }
799
+ if (e.key === "Tab" && !e.shiftKey) {
800
+ let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item")), n = t[t.length - 1];
801
+ n && e.target === n && this.dispatchEvent(new CustomEvent("tab-exit", {
802
+ bubbles: !0,
803
+ composed: !0
804
+ }));
805
+ return;
806
+ }
775
807
  if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
776
808
  e.preventDefault();
777
809
  let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item"));
@@ -809,15 +841,15 @@ var Ze = () => D("Choose a service"), Qe = () => D("Search"), $e = (e) => D(w`Ty
809
841
  <div class="ga-side-navigation__switcher-dropdown vsn-switcher-dropdown--loading"
810
842
  role="status"
811
843
  aria-busy="true"
812
- aria-label=${D("Loading modules")}>
844
+ aria-label=${E("Loading modules")}>
813
845
  <span class="vsn-spinner"></span>
814
846
  </div>
815
847
  ` : n`
816
848
  <div class="ga-side-navigation__switcher-dropdown"
817
849
  role="menu"
818
- aria-label=${Ze()}
850
+ aria-label=${tt()}
819
851
  @keydown=${this._handleKeydown}>
820
- <span class="ga-side-navigation__switcher-dropdown-header">${Ze()}</span>
852
+ <span class="ga-side-navigation__switcher-dropdown-header">${tt()}</span>
821
853
  ${this.items.map((e) => n`
822
854
  <a class="ga-side-navigation__switcher-dropdown-item"
823
855
  href=${e.url ?? ""}
@@ -830,10 +862,10 @@ var Ze = () => D("Choose a service"), Qe = () => D("Search"), $e = (e) => D(w`Ty
830
862
  `;
831
863
  }
832
864
  };
833
- b([s({ attribute: !1 })], z.prototype, "items", void 0), b([s({ type: Boolean })], z.prototype, "loading", void 0), z = b([O(), o("vsn-switcher-menu")], z);
865
+ x([s({ attribute: !1 })], L.prototype, "items", void 0), x([s({ type: Boolean })], L.prototype, "loading", void 0), L = x([D(), o("vsn-switcher-menu")], L);
834
866
  //#endregion
835
867
  //#region src/components/vsn-side-bar/vsn-search/vsn-search.css.ts
836
- var ot = t`
868
+ var ft = t`
837
869
  .vsn-search__trigger,
838
870
  .vsn-search__clear {
839
871
  display: inline-flex;
@@ -882,7 +914,7 @@ var ot = t`
882
914
  .ga-side-navigation__search input::placeholder {
883
915
  color: var(--ga-color-text-disable-selected);
884
916
  }
885
- `, B = class extends e {
917
+ `, R = class extends e {
886
918
  constructor(...e) {
887
919
  super(...e), this.shortcut = "", this.value = "", this.loading = !1, this._emitSearch = () => {
888
920
  this._canSearch && this.dispatchEvent(new CustomEvent("vsn-search-submit", {
@@ -902,7 +934,7 @@ var ot = t`
902
934
  return this;
903
935
  }
904
936
  static {
905
- this.styles = [h, ot];
937
+ this.styles = [h, ft];
906
938
  }
907
939
  focus() {
908
940
  let e = this.querySelector("input");
@@ -929,19 +961,19 @@ var ot = t`
929
961
  <button
930
962
  type="button"
931
963
  class="vsn-search__trigger"
932
- aria-label=${D("Search")}
964
+ aria-label=${E("Search")}
933
965
  ?disabled=${!this._canSearch}
934
966
  @click=${this._emitSearch}>
935
- ${v(Ce, 24)}
967
+ ${y(Ce, 24)}
936
968
  </button>
937
969
  <input type="search"
938
- .placeholder=${Qe()}
970
+ .placeholder=${nt()}
939
971
  .value=${this.value}
940
972
  @input=${this._handleInput}
941
973
  @keydown=${this._handleKeyDown} />
942
974
  ${this._trailingSlot()}
943
975
  </div>
944
- ${u(e, () => n`<div class="vsn-search__helper">${$e(3)}</div>`)}
976
+ ${u(e, () => n`<div class="vsn-search__helper">${rt(3)}</div>`)}
945
977
  `;
946
978
  }
947
979
  _trailingSlot() {
@@ -953,13 +985,13 @@ var ot = t`
953
985
  `;
954
986
  }
955
987
  _spinner() {
956
- return n`<span class="vsn-spinner" role="status" aria-label=${D("Searching")}></span>`;
988
+ return n`<span class="vsn-spinner" role="status" aria-label=${E("Searching")}></span>`;
957
989
  }
958
990
  _clearButton() {
959
991
  return n`
960
- <button class="vsn-search__clear" aria-label=${D("Clear search")}
992
+ <button class="vsn-search__clear" aria-label=${E("Clear search")}
961
993
  @click=${this._emitEscape}>
962
- ${v(we, 16)}
994
+ ${y(we, 16)}
963
995
  </button>
964
996
  `;
965
997
  }
@@ -967,33 +999,25 @@ var ot = t`
967
999
  return n`<kbd class="ga-side-navigation__search-shortcut">${this.shortcut}</kbd>`;
968
1000
  }
969
1001
  };
970
- b([s()], B.prototype, "shortcut", void 0), b([s()], B.prototype, "value", void 0), b([s({ type: Boolean })], B.prototype, "loading", void 0), B = b([O(), o("vsn-search")], B);
1002
+ x([s()], R.prototype, "shortcut", void 0), x([s()], R.prototype, "value", void 0), x([s({ type: Boolean })], R.prototype, "loading", void 0), R = x([D(), o("vsn-search")], R);
971
1003
  //#endregion
972
1004
  //#region src/components/vsn-side-bar/vsn-header/vsn-header.ts
973
- var V = class extends e {
974
- constructor(...e) {
975
- super(...e), this.modules = [], this.modulesLoading = !1, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new it(this), this._didAutoOpen = !1, this._onDocumentPointerDown = (e) => {
976
- if (!this.expanded) return;
977
- let t = this.querySelector(".ga-side-navigation__switcher-dropdown"), n = this.querySelector(".ga-side-navigation__switcher"), r = e.composedPath();
978
- t && r.includes(t) || n && r.includes(n) || (this.expanded = !1);
979
- };
980
- }
1005
+ var z = class extends e {
981
1006
  createRenderRoot() {
982
1007
  return this;
983
1008
  }
984
1009
  static {
985
- this.styles = [h, a(at)];
986
- }
987
- connectedCallback() {
988
- super.connectedCallback(), document.addEventListener("pointerdown", this._onDocumentPointerDown, !0);
1010
+ this.styles = [h, a(dt)];
989
1011
  }
990
- disconnectedCallback() {
991
- document.removeEventListener("pointerdown", this._onDocumentPointerDown, !0), super.disconnectedCallback();
1012
+ constructor() {
1013
+ super(), this.modules = [], this.modulesLoading = !1, this.hasMenu = !1, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new ut(this), new Ye(this, [".ga-side-navigation__switcher-dropdown", ".ga-side-navigation__switcher"], () => {
1014
+ this.canClose && (this.expanded = !1);
1015
+ });
992
1016
  }
993
1017
  get _state() {
994
1018
  if (this.modulesLoading) return {
995
1019
  kind: "loading",
996
- title: this.activeModuleLabel ?? ""
1020
+ title: this.activeModuleLabel || ot()
997
1021
  };
998
1022
  let e = this.modules.find((e) => e.id === this.activeModuleId);
999
1023
  return e ? {
@@ -1002,24 +1026,30 @@ var V = class extends e {
1002
1026
  available: this.modules.filter((t) => t.id !== e.id)
1003
1027
  } : {
1004
1028
  kind: "no-active",
1005
- title: et(),
1029
+ title: ot(),
1006
1030
  available: this.modules
1007
1031
  };
1008
1032
  }
1033
+ get canClose() {
1034
+ return this.hasMenu ? !0 : this._state.kind !== "no-active";
1035
+ }
1009
1036
  get hasAvailableItems() {
1010
1037
  let e = this._state;
1011
1038
  return e.kind !== "loading" && e.available.length > 0;
1012
1039
  }
1013
1040
  willUpdate() {
1014
- if (this._didAutoOpen) return;
1015
1041
  let e = this._state;
1016
- e.kind !== "no-active" || e.available.length === 0 || (this._didAutoOpen = !0, this.expanded = !0);
1042
+ if (e.kind === "loading") {
1043
+ this.expanded = !0;
1044
+ return;
1045
+ }
1046
+ this.hasMenu || e.kind !== "no-active" || e.available.length === 0 || (this.expanded = !0);
1017
1047
  }
1018
1048
  reset() {
1019
- this.expanded = !1, this._didAutoOpen = !1;
1049
+ this.expanded = !1;
1020
1050
  }
1021
1051
  _toggle() {
1022
- !this.expanded && !this.hasAvailableItems && !this.modulesLoading || (this.expanded = !this.expanded);
1052
+ this.expanded && !this.canClose || !this.expanded && !this.hasAvailableItems && !this.modulesLoading || (this.expanded = !this.expanded);
1023
1053
  }
1024
1054
  _pickModule(e) {
1025
1055
  let t = this.modules.find((t) => t.id === e);
@@ -1033,13 +1063,16 @@ var V = class extends e {
1033
1063
  this._pickModule(e.detail.id);
1034
1064
  }
1035
1065
  _onCloseRequest() {
1036
- this.expanded = !1, this.updateComplete.then(() => {
1066
+ this.canClose && (this.expanded = !1, this.updateComplete.then(() => {
1037
1067
  this.querySelector(".ga-side-navigation__switcher")?.focus();
1038
- });
1068
+ }));
1039
1069
  }
1040
1070
  _onFocusSwitcher() {
1041
1071
  this.querySelector(".ga-side-navigation__switcher")?.focus();
1042
1072
  }
1073
+ _onTabExit() {
1074
+ this.canClose && (this.expanded = !1);
1075
+ }
1043
1076
  render() {
1044
1077
  let e = this._state;
1045
1078
  return n`
@@ -1054,9 +1087,11 @@ var V = class extends e {
1054
1087
  @keydown=${this._keyboard.onSwitcherKeydown}
1055
1088
  title="">
1056
1089
  <span class="ga-side-navigation__switcher-title">${e.title}</span>
1057
- <span class="ga-side-navigation__switcher-action">
1058
- ${this.expanded ? v(y, 16) : v(xe, 16)}
1059
- </span>
1090
+ ${u(this.canClose, () => n`
1091
+ <span class="ga-side-navigation__switcher-action">
1092
+ ${this.expanded ? y(b, 16) : y(xe, 16)}
1093
+ </span>
1094
+ `)}
1060
1095
  </div>
1061
1096
 
1062
1097
  ${u(this.expanded, () => n`
@@ -1065,7 +1100,8 @@ var V = class extends e {
1065
1100
  .loading=${e.kind === "loading"}
1066
1101
  @item-select=${this._onItemSelect}
1067
1102
  @close-request=${this._onCloseRequest}
1068
- @focus-switcher=${this._onFocusSwitcher}>
1103
+ @focus-switcher=${this._onFocusSwitcher}
1104
+ @tab-exit=${this._onTabExit}>
1069
1105
  </vsn-switcher-menu>`)}
1070
1106
  </div>
1071
1107
 
@@ -1079,13 +1115,13 @@ var V = class extends e {
1079
1115
  `;
1080
1116
  }
1081
1117
  };
1082
- b([s({ attribute: !1 })], V.prototype, "modules", void 0), b([s()], V.prototype, "activeModuleId", void 0), b([s()], V.prototype, "activeModuleLabel", void 0), b([s({ type: Boolean })], V.prototype, "modulesLoading", void 0), b([s({ attribute: !1 })], V.prototype, "search", void 0), b([s()], V.prototype, "searchValue", void 0), b([s({ type: Boolean })], V.prototype, "searchLoading", void 0), b([s({
1118
+ x([s({ attribute: !1 })], z.prototype, "modules", void 0), x([s()], z.prototype, "activeModuleId", void 0), x([s()], z.prototype, "activeModuleLabel", void 0), x([s({ type: Boolean })], z.prototype, "modulesLoading", void 0), x([s({ type: Boolean })], z.prototype, "hasMenu", void 0), x([s({ attribute: !1 })], z.prototype, "search", void 0), x([s()], z.prototype, "searchValue", void 0), x([s({ type: Boolean })], z.prototype, "searchLoading", void 0), x([s({
1083
1119
  type: Boolean,
1084
1120
  reflect: !0
1085
- })], V.prototype, "expanded", void 0), V = b([O(), o("vsn-header")], V);
1121
+ })], z.prototype, "expanded", void 0), z = x([D(), o("vsn-header")], z);
1086
1122
  //#endregion
1087
1123
  //#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.css.ts
1088
- var st = t`
1124
+ var pt = t`
1089
1125
  .vsn-search-results__empty {
1090
1126
  display: flex;
1091
1127
  flex-direction: column;
@@ -1120,70 +1156,137 @@ var st = t`
1120
1156
  font-weight: 400;
1121
1157
  color: var(--ga-color-text-on-disabled);
1122
1158
  }
1123
- `, H = class extends e {
1159
+
1160
+ .vsn-search-results__error {
1161
+ display: flex;
1162
+ flex-direction: column;
1163
+ align-items: center;
1164
+ padding: 2rem 1.5rem;
1165
+ text-align: center;
1166
+ font-family: var(--ga-font-family-primary);
1167
+ font-size: var(--ga-text-sm-font-size);
1168
+ line-height: var(--ga-text-sm-line-height);
1169
+ font-weight: 400;
1170
+ color: var(--ga-color-text-body);
1171
+ }
1172
+
1173
+ .vsn-search-results__load-more {
1174
+ width: 100%;
1175
+ padding: calc(0.25rem * 3) calc(0.25rem * 4);
1176
+ background: none;
1177
+ border: none;
1178
+ cursor: pointer;
1179
+ color: var(--ga-color-text-action);
1180
+ text-align: center;
1181
+ font-family: var(--ga-font-family-primary);
1182
+ font-size: var(--ga-text-md-font-size);
1183
+ font-style: normal;
1184
+ font-weight: 500;
1185
+ line-height: var(--ga-text-md-line-height);
1186
+ letter-spacing: var(--ga-text-md-letter-spacing);
1187
+ }
1188
+
1189
+ .vsn-search-results__load-more:disabled {
1190
+ cursor: not-allowed;
1191
+ opacity: 0.5;
1192
+ }
1193
+ `, mt = class {
1194
+ constructor(e) {
1195
+ this.onResultsKeydown = (e) => {
1196
+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1197
+ e.preventDefault();
1198
+ let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__search-results-item"));
1199
+ if (t.length === 0) return;
1200
+ let n = this.host.getRootNode().activeElement;
1201
+ if (!(n instanceof HTMLElement)) return;
1202
+ let r = t.indexOf(n), i = e.key === "ArrowDown" ? 1 : -1;
1203
+ t[r === -1 ? i === 1 ? 0 : t.length - 1 : (r + i + t.length) % t.length].focus();
1204
+ }, this.host = e, e.addController(this);
1205
+ }
1206
+ hostConnected() {}
1207
+ }, B = class extends e {
1208
+ constructor(...e) {
1209
+ super(...e), this.loadingMore = !1, this._keyboard = new mt(this);
1210
+ }
1124
1211
  createRenderRoot() {
1125
1212
  return this;
1126
1213
  }
1127
1214
  static {
1128
- this.styles = [h, st];
1215
+ this.styles = [h, pt];
1129
1216
  }
1130
1217
  render() {
1131
- return this.results === void 0 ? n`${r}` : this.results.length === 0 ? this._emptyState() : this._resultsList(this.results);
1218
+ return this.errorMessage ? this._errorState(this.errorMessage) : this.results === void 0 ? n`${r}` : this.results.length === 0 ? this._emptyState() : this._resultsList(this.results);
1132
1219
  }
1133
1220
  _emptyState() {
1134
1221
  return n`
1135
1222
  <div class="vsn-search-results__empty" role="status" aria-live="polite">
1136
- <div class="vsn-search-results__empty-title">${D("No results found")}</div>
1137
- <div class="vsn-search-results__empty-message">${D("We couldn't find any matches.")}</div>
1138
- <div class="vsn-search-results__empty-hint">${D("Try different keywords or check spelling.")}</div>
1139
- <div class="vsn-search-results__empty-support">${D("Need help? Contact support.")}</div>
1223
+ <div class="vsn-search-results__empty-title">${E("No results found")}</div>
1224
+ <div class="vsn-search-results__empty-message">${E("We couldn't find any matches.")}</div>
1225
+ <div class="vsn-search-results__empty-hint">${E("Try different keywords or check spelling.")}</div>
1226
+ <div class="vsn-search-results__empty-support">${E("Need help? Contact support.")}</div>
1227
+ </div>
1228
+ `;
1229
+ }
1230
+ _errorState(e) {
1231
+ return n`
1232
+ <div class="vsn-search-results__error" role="alert" aria-live="assertive">
1233
+ ${e}
1140
1234
  </div>
1141
1235
  `;
1142
1236
  }
1143
1237
  _resultsList(e) {
1144
1238
  let t = e.length;
1145
1239
  return n`
1146
- <div class="ga-side-navigation__body h-full">
1240
+ <div class="ga-side-navigation__body h-full" @keydown=${this._keyboard.onResultsKeydown}>
1147
1241
  <div class="ga-side-navigation__search-results-title">
1148
- ${D(t === 1 ? w`${t} result` : w`${t} results`)}
1242
+ ${E(t === 1 ? T`${t} result` : T`${t} results`)}
1149
1243
  </div>
1150
1244
  ${e.map((e) => this._resultRow(e))}
1245
+ ${u(this.nextCursor, () => n`
1246
+ <button
1247
+ type="button"
1248
+ class="vsn-search-results__load-more"
1249
+ ?disabled=${this.loadingMore}
1250
+ @click=${this._onLoadMore}>
1251
+ ${at(30)}
1252
+ </button>
1253
+ `)}
1151
1254
  </div>
1152
1255
  `;
1153
1256
  }
1154
1257
  _resultRow(e) {
1155
- let t = e.node, r = e.ancestors;
1156
1258
  return n`
1157
- <div tabindex="0"
1259
+ <a
1158
1260
  class="ga-side-navigation__search-results-item"
1159
- @click=${() => this._onActivate(e)}
1160
- @keydown=${(t) => this._onKeyDown(t, e)}>
1261
+ href=${e.url}
1262
+ @click=${(t) => this._onActivate(t, e)}>
1161
1263
  <div class="ga-side-navigation__search-results-item-content">
1162
- <div class="ga-side-navigation__search-results-item-label">${t.label}</div>
1163
- ${u(r.length > 0, () => n`
1164
- <div class="ga-side-navigation__search-results-item-description">
1165
- ${r.map((e) => e.label).join(D(" › "))}
1166
- </div>
1264
+ <div class="ga-side-navigation__search-results-item-label">${e.label}</div>
1265
+ ${(e.lines ?? []).map((e) => n`
1266
+ <div class="ga-side-navigation__search-results-item-description">${e}</div>
1167
1267
  `)}
1168
1268
  </div>
1169
- </div>
1269
+ </a>
1170
1270
  `;
1171
1271
  }
1172
- _onActivate(e) {
1173
- this.dispatchEvent(new CustomEvent("vsn-menu-item-changed", {
1174
- detail: e.node,
1272
+ _onActivate(e, t) {
1273
+ e.preventDefault(), this.dispatchEvent(new CustomEvent("vsn-search-item-clicked", {
1274
+ detail: t,
1175
1275
  bubbles: !0,
1176
1276
  composed: !0
1177
1277
  }));
1178
1278
  }
1179
- _onKeyDown(e, t) {
1180
- e.key === "Enter" && (e.preventDefault(), this._onActivate(t));
1279
+ _onLoadMore() {
1280
+ this.dispatchEvent(new CustomEvent("vsn-search-load-more", {
1281
+ bubbles: !0,
1282
+ composed: !0
1283
+ }));
1181
1284
  }
1182
1285
  };
1183
- b([s({ attribute: !1 })], H.prototype, "results", void 0), H = b([O(), o("vsn-search-results")], H);
1286
+ x([s({ attribute: !1 })], B.prototype, "results", void 0), x([s()], B.prototype, "errorMessage", void 0), x([s()], B.prototype, "nextCursor", void 0), x([s({ type: Boolean })], B.prototype, "loadingMore", void 0), B = x([D(), o("vsn-search-results")], B);
1184
1287
  //#endregion
1185
1288
  //#region src/components/vsn-side-bar/vsn-template/vsn-template.css.ts
1186
- var ct = t`
1289
+ var ht = t`
1187
1290
  .vsn-template__row {
1188
1291
  display: flex;
1189
1292
  flex-direction: column;
@@ -1198,26 +1301,26 @@ var ct = t`
1198
1301
  background: var(--ga-color-miscellaneous-skeleton-element, #F2F3F5);
1199
1302
  flex-shrink: 0;
1200
1303
  }
1201
- `, lt = [
1304
+ `, gt = [
1202
1305
  160,
1203
1306
  96,
1204
1307
  144,
1205
1308
  192,
1206
1309
  160
1207
- ], ut = class extends e {
1310
+ ], _t = class extends e {
1208
1311
  createRenderRoot() {
1209
1312
  return this;
1210
1313
  }
1211
1314
  static {
1212
- this.styles = [h, ct];
1315
+ this.styles = [h, ht];
1213
1316
  }
1214
1317
  render() {
1215
1318
  return n`
1216
1319
  <div class="ga-side-navigation__body h-full"
1217
1320
  role="status"
1218
1321
  aria-busy="true"
1219
- aria-label=${D("Loading results")}>
1220
- ${lt.map((e) => n`
1322
+ aria-label=${E("Loading results")}>
1323
+ ${gt.map((e) => n`
1221
1324
  <div class="vsn-template__row">
1222
1325
  <div class="vsn-template__bar" style="width: ${e}px"></div>
1223
1326
  </div>
@@ -1226,10 +1329,10 @@ var ct = t`
1226
1329
  `;
1227
1330
  }
1228
1331
  };
1229
- ut = b([O(), o("vsn-template")], ut);
1332
+ _t = x([D(), o("vsn-template")], _t);
1230
1333
  //#endregion
1231
1334
  //#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.css.ts
1232
- var dt = t`
1335
+ var vt = t`
1233
1336
  .vsn-error-state {
1234
1337
  display: flex;
1235
1338
  flex-direction: column;
@@ -1268,44 +1371,115 @@ var dt = t`
1268
1371
  font-weight: 400;
1269
1372
  color: var(--ga-color-text-on-disabled);
1270
1373
  }
1271
- `, ft = class extends e {
1374
+ `, yt = class extends e {
1272
1375
  createRenderRoot() {
1273
1376
  return this;
1274
1377
  }
1275
1378
  static {
1276
- this.styles = [h, dt];
1379
+ this.styles = [h, vt];
1277
1380
  }
1278
1381
  render() {
1279
1382
  return n`
1280
1383
  <div class="vsn-error-state" role="alert" aria-live="assertive">
1281
- <div class="vsn-error-state__icon">${v(Te, 24)}</div>
1282
- <div class="vsn-error-state__title">${D("Loading error")}</div>
1283
- <div class="vsn-error-state__message">${D("We're unable to load the menu.")}</div>
1284
- <div class="vsn-error-state__hint">${D("Please check your internet connection and try again.")}</div>
1285
- <div class="vsn-error-state__support">${D("If the issue persists, reload the page or contact support.")}</div>
1384
+ <div class="vsn-error-state__icon">${y(Te, 24)}</div>
1385
+ <div class="vsn-error-state__title">${E("Loading error")}</div>
1386
+ <div class="vsn-error-state__message">${E("We're unable to load the menu.")}</div>
1387
+ <div class="vsn-error-state__hint">${E("Please check your internet connection and try again.")}</div>
1388
+ <div class="vsn-error-state__support">${E("If the issue persists, reload the page or contact support.")}</div>
1389
+ </div>
1390
+ `;
1391
+ }
1392
+ };
1393
+ yt = x([D(), o("vsn-error-state")], yt);
1394
+ //#endregion
1395
+ //#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.css.ts
1396
+ var bt = t`
1397
+ @layer components {
1398
+ vsn-search-scopes {
1399
+ display: block;
1400
+ flex-shrink: 0;
1401
+ padding: calc(0.25rem * 2) calc(0.25rem * 3);
1402
+ }
1403
+
1404
+ vsn-search-scopes .ga-radio-group {
1405
+ gap: calc(0.25rem * 2);
1406
+ }
1407
+
1408
+ vsn-search-scopes .ga-radio-button__label {
1409
+ line-height: calc(0.25rem * 6);
1410
+ display: -webkit-box;
1411
+ -webkit-box-orient: vertical;
1412
+ -webkit-line-clamp: 1;
1413
+ overflow: hidden;
1414
+ text-overflow: ellipsis;
1415
+ }
1416
+ }
1417
+ `, V, H = class extends e {
1418
+ static {
1419
+ V = this;
1420
+ }
1421
+ constructor(...e) {
1422
+ super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++V._counter}`;
1423
+ }
1424
+ createRenderRoot() {
1425
+ return this;
1426
+ }
1427
+ static {
1428
+ this.styles = [h, bt];
1429
+ }
1430
+ static {
1431
+ this._counter = 0;
1432
+ }
1433
+ render() {
1434
+ return this.scopes.length <= 1 ? n`` : n`
1435
+ <div class="ga-radio-group" role="radiogroup" aria-label=${E("Search scope")}>
1436
+ ${this.scopes.map((e) => this._renderScope(e))}
1286
1437
  </div>
1287
1438
  `;
1288
1439
  }
1440
+ _renderScope(e) {
1441
+ return n`
1442
+ <label class="ga-radio-button">
1443
+ <input
1444
+ type="radio"
1445
+ class="ga-radio-button__native"
1446
+ name=${this._name}
1447
+ .value=${e.id}
1448
+ ?checked=${e.id === this.selectedScopeId}
1449
+ @change=${() => this._onChange(e.id)}
1450
+ />
1451
+ <span class="ga-radio-button__marker"></span>
1452
+ <span class="ga-radio-button__label">${e.label}</span>
1453
+ </label>
1454
+ `;
1455
+ }
1456
+ _onChange(e) {
1457
+ this.dispatchEvent(new CustomEvent("vsn-search-scope-changed", {
1458
+ detail: { scopeId: e },
1459
+ bubbles: !0,
1460
+ composed: !0
1461
+ }));
1462
+ }
1289
1463
  };
1290
- ft = b([O(), o("vsn-error-state")], ft);
1464
+ x([s({ attribute: !1 })], H.prototype, "scopes", void 0), x([s()], H.prototype, "selectedScopeId", void 0), H = V = x([D(), o("vsn-search-scopes")], H);
1291
1465
  //#endregion
1292
1466
  //#region src/shared/lang/locale-codes.ts
1293
- var pt = "en", mt = [
1467
+ var xt = "en", St = [
1294
1468
  "da",
1295
1469
  "fi",
1296
1470
  "nl",
1297
1471
  "no",
1298
1472
  "sv"
1299
- ], ht = /* @__PURE__ */ p({ templates: () => gt }), gt = {
1473
+ ], Ct = /* @__PURE__ */ p({ templates: () => wt }), wt = {
1300
1474
  s09a45db408570a7a: "Min profil",
1301
1475
  s119f9875b7d4cdfc: "Har du brug for hjælp? Kontakt support.",
1302
- s1228605ee65ddefa: w`${0} resultat`,
1303
- s2bb33291ef8ae3d4: w`Indtast mindst ${0} tegn for at søge`,
1476
+ s1228605ee65ddefa: T`${0} resultat`,
1477
+ s2bb33291ef8ae3d4: T`Indtast mindst ${0} tegn for at søge`,
1304
1478
  s2be8f715fbd00dcb: "Vi fandt ingen matchende resultater.",
1305
1479
  s301876182accccad: " › ",
1306
1480
  s3112f1ca236c8a61: "Indlæsningsfejl",
1307
1481
  s352719d86112de9a: "Hjælp",
1308
- s387a4a41718122cb: w`${0} resultater`,
1482
+ s387a4a41718122cb: T`${0} resultater`,
1309
1483
  s3fb7db4771812f0c: "Hvis problemet fortsætter, genindlæs siden eller kontakt support.",
1310
1484
  s4b0c6b66b4efd7d8: "Vælg en tjeneste",
1311
1485
  s5be3c6d61cd9182f: "Notifikationer",
@@ -1326,16 +1500,16 @@ var pt = "en", mt = [
1326
1500
  sfbf31f663cef6cc2: "Prøv andre søgeord eller tjek stavningen.",
1327
1501
  s7c510419ea376840: "VSN",
1328
1502
  s38385cd359b17f7a: "Loading modules"
1329
- }, _t = /* @__PURE__ */ p({ templates: () => vt }), vt = {
1503
+ }, Tt = /* @__PURE__ */ p({ templates: () => Et }), Et = {
1330
1504
  s09a45db408570a7a: "Oma profiili",
1331
1505
  s119f9875b7d4cdfc: "Tarvitsetko apua? Ota yhteyttä tukeen.",
1332
- s1228605ee65ddefa: w`${0} tulos`,
1333
- s2bb33291ef8ae3d4: w`Kirjoita vähintään ${0} merkkiä hakua varten`,
1506
+ s1228605ee65ddefa: T`${0} tulos`,
1507
+ s2bb33291ef8ae3d4: T`Kirjoita vähintään ${0} merkkiä hakua varten`,
1334
1508
  s2be8f715fbd00dcb: "Emme löytäneet osumia.",
1335
1509
  s301876182accccad: " › ",
1336
1510
  s3112f1ca236c8a61: "Latausvirhe",
1337
1511
  s352719d86112de9a: "Ohje",
1338
- s387a4a41718122cb: w`${0} tulosta`,
1512
+ s387a4a41718122cb: T`${0} tulosta`,
1339
1513
  s3fb7db4771812f0c: "Jos ongelma jatkuu, lataa sivu uudelleen tai ota yhteyttä tukeen.",
1340
1514
  s4b0c6b66b4efd7d8: "Valitse palvelu",
1341
1515
  s5be3c6d61cd9182f: "Ilmoitukset",
@@ -1356,16 +1530,16 @@ var pt = "en", mt = [
1356
1530
  sfbf31f663cef6cc2: "Kokeile eri hakusanoja tai tarkista kirjoitusasu.",
1357
1531
  s7c510419ea376840: "VSN",
1358
1532
  s38385cd359b17f7a: "Loading modules"
1359
- }, yt = /* @__PURE__ */ p({ templates: () => bt }), bt = {
1533
+ }, Dt = /* @__PURE__ */ p({ templates: () => Ot }), Ot = {
1360
1534
  s09a45db408570a7a: "Mijn profiel",
1361
1535
  s119f9875b7d4cdfc: "Hulp nodig? Neem contact op met ondersteuning.",
1362
- s1228605ee65ddefa: w`${0} resultaat`,
1363
- s2bb33291ef8ae3d4: w`Typ minimaal ${0} tekens om te zoeken`,
1536
+ s1228605ee65ddefa: T`${0} resultaat`,
1537
+ s2bb33291ef8ae3d4: T`Typ minimaal ${0} tekens om te zoeken`,
1364
1538
  s2be8f715fbd00dcb: "We konden geen overeenkomsten vinden.",
1365
1539
  s301876182accccad: " › ",
1366
1540
  s3112f1ca236c8a61: "Laadingsfout",
1367
1541
  s352719d86112de9a: "Hulp",
1368
- s387a4a41718122cb: w`${0} resultaten`,
1542
+ s387a4a41718122cb: T`${0} resultaten`,
1369
1543
  s3fb7db4771812f0c: "Als het probleem aanhoudt, laad de pagina opnieuw of neem contact op met ondersteuning.",
1370
1544
  s4b0c6b66b4efd7d8: "Kies een service",
1371
1545
  s5be3c6d61cd9182f: "Meldingen",
@@ -1386,16 +1560,16 @@ var pt = "en", mt = [
1386
1560
  sfbf31f663cef6cc2: "Probeer andere zoekwoorden of controleer de spelling.",
1387
1561
  s7c510419ea376840: "VSN",
1388
1562
  s38385cd359b17f7a: "Loading modules"
1389
- }, xt = /* @__PURE__ */ p({ templates: () => St }), St = {
1563
+ }, kt = /* @__PURE__ */ p({ templates: () => At }), At = {
1390
1564
  s09a45db408570a7a: "Min profil",
1391
1565
  s119f9875b7d4cdfc: "Trenger du hjelp? Kontakt støtte.",
1392
- s1228605ee65ddefa: w`${0} resultat`,
1393
- s2bb33291ef8ae3d4: w`Skriv inn minst ${0} tegn for å søke`,
1566
+ s1228605ee65ddefa: T`${0} resultat`,
1567
+ s2bb33291ef8ae3d4: T`Skriv inn minst ${0} tegn for å søke`,
1394
1568
  s2be8f715fbd00dcb: "Vi fant ingen treff.",
1395
1569
  s301876182accccad: " › ",
1396
1570
  s3112f1ca236c8a61: "Lastingsfeil",
1397
1571
  s352719d86112de9a: "Hjelp",
1398
- s387a4a41718122cb: w`${0} resultater`,
1572
+ s387a4a41718122cb: T`${0} resultater`,
1399
1573
  s3fb7db4771812f0c: "Hvis problemet vedvarer, last inn siden på nytt eller kontakt støtte.",
1400
1574
  s4b0c6b66b4efd7d8: "Velg en tjeneste",
1401
1575
  s5be3c6d61cd9182f: "Varsler",
@@ -1416,16 +1590,16 @@ var pt = "en", mt = [
1416
1590
  sfbf31f663cef6cc2: "Prøv andre søkeord eller sjekk stavemåten.",
1417
1591
  s7c510419ea376840: "VSN",
1418
1592
  s38385cd359b17f7a: "Loading modules"
1419
- }, Ct = /* @__PURE__ */ p({ templates: () => wt }), wt = {
1593
+ }, jt = /* @__PURE__ */ p({ templates: () => Mt }), Mt = {
1420
1594
  s09a45db408570a7a: "Min profil",
1421
1595
  s119f9875b7d4cdfc: "Behöver du hjälp? Kontakta support.",
1422
- s1228605ee65ddefa: w`${0} resultat`,
1423
- s2bb33291ef8ae3d4: w`Skriv minst ${0} tecken för att söka`,
1596
+ s1228605ee65ddefa: T`${0} resultat`,
1597
+ s2bb33291ef8ae3d4: T`Skriv minst ${0} tecken för att söka`,
1424
1598
  s2be8f715fbd00dcb: "Vi hittade inga matchningar.",
1425
1599
  s301876182accccad: " › ",
1426
1600
  s3112f1ca236c8a61: "Laddningsfel",
1427
1601
  s352719d86112de9a: "Hjälp",
1428
- s387a4a41718122cb: w`${0} resultat`,
1602
+ s387a4a41718122cb: T`${0} resultat`,
1429
1603
  s3fb7db4771812f0c: "Om problemet kvarstår, ladda om sidan eller kontakta support.",
1430
1604
  s4b0c6b66b4efd7d8: "Välj en tjänst",
1431
1605
  s5be3c6d61cd9182f: "Aviseringar",
@@ -1446,17 +1620,17 @@ var pt = "en", mt = [
1446
1620
  sfbf31f663cef6cc2: "Prova andra sökord eller kontrollera stavningen.",
1447
1621
  s7c510419ea376840: "VSN",
1448
1622
  s38385cd359b17f7a: "Loading modules"
1449
- }, Tt = {
1450
- da: ht,
1451
- fi: _t,
1452
- nl: yt,
1453
- no: xt,
1454
- sv: Ct
1455
- }, { getLocale: Et, setLocale: Dt } = He({
1456
- sourceLocale: pt,
1457
- targetLocales: mt,
1458
- loadLocale: (e) => Tt[e] ? Promise.resolve(Tt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1459
- }), Ot = t`
1623
+ }, Nt = {
1624
+ da: Ct,
1625
+ fi: Tt,
1626
+ nl: Dt,
1627
+ no: kt,
1628
+ sv: jt
1629
+ }, { getLocale: Pt, setLocale: Ft } = Ge({
1630
+ sourceLocale: xt,
1631
+ targetLocales: St,
1632
+ loadLocale: (e) => Nt[e] ? Promise.resolve(Nt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1633
+ }), It = t`
1460
1634
  @layer components {
1461
1635
  .vsn-switcher-anchor {
1462
1636
  position: relative;
@@ -1475,7 +1649,7 @@ var pt = "en", mt = [
1475
1649
  outline-offset: 2px;
1476
1650
  }
1477
1651
  }
1478
- `, kt = t`
1652
+ `, Lt = t`
1479
1653
  .vsn-spinner {
1480
1654
  display: inline-block;
1481
1655
  flex-shrink: 0;
@@ -1495,7 +1669,7 @@ var pt = "en", mt = [
1495
1669
  @keyframes vsn-spin {
1496
1670
  to { transform: rotate(360deg); }
1497
1671
  }
1498
- `, At = class {
1672
+ `, Rt = class {
1499
1673
  constructor(e, t, n) {
1500
1674
  this._onHostClick = (e) => {
1501
1675
  let t = this._host.renderRoot.querySelector(this._clickedSelector);
@@ -1512,13 +1686,14 @@ var pt = "en", mt = [
1512
1686
  static {
1513
1687
  this.styles = [
1514
1688
  h,
1515
- Ot,
1516
- Ke,
1517
- ot,
1518
- st,
1519
- ct,
1520
- dt,
1521
- kt,
1689
+ It,
1690
+ Xe,
1691
+ ft,
1692
+ pt,
1693
+ bt,
1694
+ ht,
1695
+ vt,
1696
+ Lt,
1522
1697
  t`
1523
1698
  :host {
1524
1699
  position: absolute;
@@ -1533,7 +1708,7 @@ var pt = "en", mt = [
1533
1708
  ];
1534
1709
  }
1535
1710
  constructor() {
1536
- super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._onShortcut = (e) => {
1711
+ super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._activeScopeId = "menu", this._searchLoadingMore = !1, this._onShortcut = (e) => {
1537
1712
  (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), this.renderRoot.querySelector("vsn-search")?.focus());
1538
1713
  }, this._onNavigate = (e) => {
1539
1714
  this._searchQuery = "", this._searchResults = void 0, this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
@@ -1545,12 +1720,19 @@ var pt = "en", mt = [
1545
1720
  bubbles: !0,
1546
1721
  composed: !0
1547
1722
  }));
1723
+ }, this._onSearchItemClicked = (e) => {
1724
+ this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1725
+ bubbles: !0,
1726
+ composed: !0
1727
+ }));
1548
1728
  }, this._onFooterAction = () => {
1549
1729
  this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1550
1730
  bubbles: !0,
1551
1731
  composed: !0
1552
1732
  }));
1553
- }, new At(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1733
+ }, this._onScopeChanged = (e) => {
1734
+ this._activeScopeId = e.detail.scopeId, this._runSearch(this._searchQuery, this._activeScopeId);
1735
+ }, new Rt(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1554
1736
  bubbles: !0,
1555
1737
  composed: !0
1556
1738
  })));
@@ -1562,33 +1744,90 @@ var pt = "en", mt = [
1562
1744
  super.disconnectedCallback(), document.removeEventListener("keydown", this._onShortcut);
1563
1745
  }
1564
1746
  willUpdate(e) {
1565
- e.has("lang") && Dt(this.lang).catch(console.error), e.has("open") && e.get("open") && !this.open && (this._searchQuery = "", this._searchResults = void 0, this.renderRoot.querySelector("vsn-header")?.reset(), this.renderRoot.querySelector("vsn-footer")?.reset());
1747
+ e.has("lang") && Ft(this.lang).catch(console.error), e.has("open") && e.get("open") && !this.open && (this._searchQuery = "", this._activeScopeId = "menu", this._clearSearchState(), this.renderRoot.querySelector("vsn-header")?.reset(), this.renderRoot.querySelector("vsn-footer")?.reset());
1566
1748
  }
1567
1749
  _onSearchInput(e) {
1568
- this._searchQuery = e.detail.value, e.detail.value === "" && (this._searchResults = void 0);
1750
+ this._searchQuery = e.detail.value, e.detail.value === "" && this._clearSearchState();
1569
1751
  }
1570
1752
  _onSearchSubmit(e) {
1571
- this._searchResults = this._filterTree(e.detail.query);
1753
+ this._runSearch(e.detail.query, this._activeScopeId);
1572
1754
  }
1573
1755
  _onSearchEscape(e) {
1574
- e.detail.value.length > 0 ? (this._searchQuery = "", this._searchResults = void 0) : this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1756
+ e.detail.value.length > 0 ? (this._searchQuery = "", this._clearSearchState()) : this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1575
1757
  bubbles: !0,
1576
1758
  composed: !0
1577
1759
  }));
1578
1760
  }
1761
+ _clearSearchState() {
1762
+ this._searchAbort?.abort(), this._searchAbort = void 0, this._searchResults = void 0, this._searchLoading = !1, this._searchLoadingMore = !1, this._searchError = void 0, this._searchNextCursor = void 0;
1763
+ }
1764
+ async _runSearch(e, t) {
1765
+ if (this._searchAbort?.abort(), this._searchAbort = void 0, this._searchError = void 0, this._searchNextCursor = void 0, this._searchLoadingMore = !1, !e) {
1766
+ this._searchResults = void 0, this._searchLoading = !1;
1767
+ return;
1768
+ }
1769
+ if (t === "menu") {
1770
+ this._searchResults = this._filterTree(e), this._searchLoading = !1;
1771
+ return;
1772
+ }
1773
+ let n = this.menu?.search?.extraDataSets?.find((e) => e.id === t);
1774
+ if (!n) {
1775
+ this._searchResults = void 0, this._searchLoading = !1;
1776
+ return;
1777
+ }
1778
+ let r = new AbortController();
1779
+ this._searchAbort = r, this._searchLoading = !0, this._searchResults = void 0;
1780
+ try {
1781
+ let t = await n.searchFunction({
1782
+ query: e,
1783
+ abortController: r
1784
+ });
1785
+ if (this._searchAbort !== r) return;
1786
+ this._searchResults = t.results, this._searchNextCursor = t.nextCursor, this._searchLoading = !1, this._searchAbort = void 0;
1787
+ } catch (e) {
1788
+ if (this._searchAbort !== r) return;
1789
+ e instanceof v ? (this._searchError = e.message, this._searchResults = void 0) : console.error("Search function rejected with non-SearchError:", e), this._searchLoading = !1, this._searchAbort = void 0;
1790
+ }
1791
+ }
1792
+ async _loadMore() {
1793
+ if (this._searchLoadingMore || !this._searchNextCursor || !this._searchQuery || this._activeScopeId === "menu") return;
1794
+ let e = this.menu?.search?.extraDataSets?.find((e) => e.id === this._activeScopeId);
1795
+ if (!e) return;
1796
+ this._searchAbort?.abort();
1797
+ let t = new AbortController();
1798
+ this._searchAbort = t, this._searchLoadingMore = !0;
1799
+ try {
1800
+ let n = await e.searchFunction({
1801
+ query: this._searchQuery,
1802
+ cursor: this._searchNextCursor,
1803
+ abortController: t
1804
+ });
1805
+ if (this._searchAbort !== t) return;
1806
+ this._searchResults = [...this._searchResults ?? [], ...n.results], this._searchNextCursor = n.nextCursor, this._searchLoadingMore = !1, this._searchAbort = void 0;
1807
+ } catch (e) {
1808
+ if (this._searchAbort !== t) return;
1809
+ e instanceof v ? (this._searchError = e.message, this._searchResults = void 0, this._searchNextCursor = void 0) : console.error("Load-more function rejected with non-SearchError:", e), this._searchLoadingMore = !1, this._searchAbort = void 0;
1810
+ }
1811
+ }
1579
1812
  _filterTree(e) {
1580
1813
  let t = this.menu?.items;
1581
1814
  if (!t?.length || !e) return [];
1582
1815
  let n = e.toLowerCase(), r = [], i = (e, t) => {
1583
- for (let a of e) _(a) ? i(a.items, [...t, a]) : a.label.toLowerCase().includes(n) && r.push({
1584
- node: a,
1585
- ancestors: t
1586
- });
1816
+ for (let a of e) if (_(a)) i(a.items, [...t, a]);
1817
+ else if (a.label.toLowerCase().includes(n)) {
1818
+ let e = t.length > 0 ? [t.map((e) => e.label).join(" › ")] : void 0;
1819
+ r.push({
1820
+ id: a.id,
1821
+ label: a.label,
1822
+ url: a.url,
1823
+ lines: e
1824
+ });
1825
+ }
1587
1826
  };
1588
1827
  return i(t, []), r;
1589
1828
  }
1590
1829
  _viewMode() {
1591
- return this.error ? "error" : this._searchLoading ? "loading" : this._searchResults === void 0 ? "menu" : "results";
1830
+ return this.error ? "error" : this._searchLoading ? "loading" : this._searchError !== void 0 || this._searchResults !== void 0 ? "results" : "menu";
1592
1831
  }
1593
1832
  render() {
1594
1833
  let e = this._viewMode();
@@ -1596,16 +1835,25 @@ var pt = "en", mt = [
1596
1835
  <div class="ga-side-navigation"
1597
1836
  @vsn-navigate=${this._onNavigate}
1598
1837
  @vsn-menu-item-changed=${this._onMenuItemChanged}
1838
+ @vsn-search-item-clicked=${this._onSearchItemClicked}
1839
+ @vsn-search-load-more=${() => this._loadMore()}
1599
1840
  @vsn-footer-item-changed=${this._onFooterAction}
1600
1841
  @vsn-logout-click=${this._onFooterAction}>
1601
1842
  ${this.header()}
1602
- ${e === "error" ? this.errorState() : e === "loading" ? this.loadingState() : e === "results" ? this.searchResults(this._searchResults) : this.renderMenu(this.menu)}
1843
+ ${this.scopesGroup()}
1844
+ ${e === "error" ? this.errorState() : e === "loading" ? this.loadingState() : e === "results" ? this.searchResults() : this.renderMenu(this.menu)}
1603
1845
  ${this.auth ? this.footer(this.auth) : ""}
1604
1846
  </div>
1605
1847
  `;
1606
1848
  }
1607
- searchResults(e) {
1608
- return n`<vsn-search-results class="flex-1 min-h-0" .results=${e}></vsn-search-results>`;
1849
+ searchResults() {
1850
+ return n`<vsn-search-results
1851
+ class="flex-1 min-h-0"
1852
+ .results=${this._searchResults}
1853
+ .errorMessage=${this._searchError}
1854
+ .nextCursor=${this._searchNextCursor}
1855
+ .loadingMore=${this._searchLoadingMore}>
1856
+ </vsn-search-results>`;
1609
1857
  }
1610
1858
  loadingState() {
1611
1859
  return n`<vsn-template class="flex-1 min-h-0"></vsn-template>`;
@@ -1621,6 +1869,7 @@ var pt = "en", mt = [
1621
1869
  .activeModuleId=${this.activeModuleId}
1622
1870
  .activeModuleLabel=${this.activeModuleLabel}
1623
1871
  .modulesLoading=${this.modulesLoading}
1872
+ .hasMenu=${(this.menu?.items.length ?? 0) > 0}
1624
1873
  .search=${e}
1625
1874
  .searchValue=${this._searchQuery}
1626
1875
  .searchLoading=${this._searchLoading}
@@ -1629,6 +1878,23 @@ var pt = "en", mt = [
1629
1878
  @vsn-search-escape=${this._onSearchEscape}
1630
1879
  >
1631
1880
  </vsn-header>`;
1881
+ }
1882
+ scopesGroup() {
1883
+ if (!this.menu?.search?.enabled) return n``;
1884
+ let e = this.menu.search.extraDataSets ?? [];
1885
+ return e.length === 0 ? n`` : n`
1886
+ <vsn-search-scopes
1887
+ .scopes=${[{
1888
+ id: "menu",
1889
+ label: it()
1890
+ }, ...e.map((e) => ({
1891
+ id: e.id,
1892
+ label: e.label
1893
+ }))]}
1894
+ .selectedScopeId=${this._activeScopeId}
1895
+ @vsn-search-scope-changed=${this._onScopeChanged}>
1896
+ </vsn-search-scopes>
1897
+ `;
1632
1898
  }
1633
1899
  renderMenu(e) {
1634
1900
  return n`<vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
@@ -1643,10 +1909,10 @@ var pt = "en", mt = [
1643
1909
  `;
1644
1910
  }
1645
1911
  };
1646
- b([s({ attribute: !1 })], U.prototype, "modules", void 0), b([s()], U.prototype, "activeModuleId", void 0), b([s()], U.prototype, "activeModuleLabel", void 0), b([s({ type: Boolean })], U.prototype, "modulesLoading", void 0), b([s()], U.prototype, "lang", void 0), b([s({ attribute: !1 })], U.prototype, "auth", void 0), b([s({ type: Boolean })], U.prototype, "error", void 0), b([s({
1912
+ x([s({ attribute: !1 })], U.prototype, "modules", void 0), x([s()], U.prototype, "activeModuleId", void 0), x([s()], U.prototype, "activeModuleLabel", void 0), x([s({ type: Boolean })], U.prototype, "modulesLoading", void 0), x([s()], U.prototype, "lang", void 0), x([s({ attribute: !1 })], U.prototype, "auth", void 0), x([s({ type: Boolean })], U.prototype, "error", void 0), x([s({
1647
1913
  type: Boolean,
1648
1914
  reflect: !0
1649
- })], U.prototype, "open", void 0), b([s({ attribute: !1 })], U.prototype, "menu", void 0), b([l()], U.prototype, "_searchQuery", void 0), b([l()], U.prototype, "_searchResults", void 0), b([l()], U.prototype, "_searchLoading", void 0), U = b([o("vsn-side-bar")], U);
1915
+ })], U.prototype, "open", void 0), x([s({ attribute: !1 })], U.prototype, "menu", void 0), x([l()], U.prototype, "_searchQuery", void 0), x([l()], U.prototype, "_searchResults", void 0), x([l()], U.prototype, "_searchLoading", void 0), x([l()], U.prototype, "_activeScopeId", void 0), x([l()], U.prototype, "_searchError", void 0), x([l()], U.prototype, "_searchNextCursor", void 0), x([l()], U.prototype, "_searchLoadingMore", void 0), U = x([o("vsn-side-bar")], U);
1650
1916
  //#endregion
1651
1917
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu-item.ts
1652
1918
  var W, G = class extends e {
@@ -1710,12 +1976,12 @@ var W, G = class extends e {
1710
1976
  </div>
1711
1977
  ${u(this._isParent() && this._isExpanded, () => n`
1712
1978
  <span class="ga-side-navigation__item-icon">
1713
- ${v(y, 16)}
1979
+ ${y(b, 16)}
1714
1980
  </span>
1715
1981
  `)}
1716
1982
  ${u(this._isParent() && !this._isExpanded, () => n`
1717
1983
  <span class="ga-side-navigation__item-icon">
1718
- ${v(Ee, 16)}
1984
+ ${y(Ee, 16)}
1719
1985
  </span>
1720
1986
  `)}
1721
1987
  <div class="ga-side-navigation__item-content">
@@ -1734,7 +2000,7 @@ var W, G = class extends e {
1734
2000
  if (this.tree && _(this.tree)) return this.tree.items.length > 0;
1735
2001
  }
1736
2002
  };
1737
- b([s({ attribute: !1 })], G.prototype, "tree", void 0), b([s({ type: Number })], G.prototype, "level", void 0), b([s({ type: Array })], G.prototype, "ancestorPath", void 0), b([l()], G.prototype, "_isExpanded", void 0), b([l()], G.prototype, "_showTooltip", void 0), b([l()], G.prototype, "_tooltipPos", void 0), b([c(".ga-side-navigation__item-label")], G.prototype, "_labelEl", void 0), G = W = b([o("vsn-breadcrumb-menu-item")], G);
2003
+ x([s({ attribute: !1 })], G.prototype, "tree", void 0), x([s({ type: Number })], G.prototype, "level", void 0), x([s({ type: Array })], G.prototype, "ancestorPath", void 0), x([l()], G.prototype, "_isExpanded", void 0), x([l()], G.prototype, "_showTooltip", void 0), x([l()], G.prototype, "_tooltipPos", void 0), x([c(".ga-side-navigation__item-label")], G.prototype, "_labelEl", void 0), G = W = x([o("vsn-breadcrumb-menu-item")], G);
1738
2004
  //#endregion
1739
2005
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu.ts
1740
2006
  var K = class extends e {
@@ -1757,7 +2023,7 @@ var K = class extends e {
1757
2023
  `;
1758
2024
  }
1759
2025
  };
1760
- b([s({ attribute: !1 })], K.prototype, "treeList", void 0), K = b([o("vsn-breadcrumb-menu")], K);
2026
+ x([s({ attribute: !1 })], K.prototype, "treeList", void 0), K = x([o("vsn-breadcrumb-menu")], K);
1761
2027
  //#endregion
1762
2028
  //#region src/components/vsn-top-bar/vsn-breadcrumbs.ts
1763
2029
  var q = class extends e {
@@ -2021,7 +2287,7 @@ var q = class extends e {
2021
2287
  }
2022
2288
  render() {
2023
2289
  return n`
2024
- <nav aria-label=${D("Breadcrumb")}>
2290
+ <nav aria-label=${E("Breadcrumb")}>
2025
2291
  <div class="ga-breadcrumb">
2026
2292
  ${this._displayMode === "full" ? this._renderFullBreadcrumbs() : this._displayMode === "overflow" ? this._renderOverflowBreadcrumbs() : this._renderMobileBreadcrumbs()}
2027
2293
  </div>
@@ -2034,10 +2300,10 @@ var q = class extends e {
2034
2300
  `;
2035
2301
  }
2036
2302
  };
2037
- b([s({ attribute: !1 })], q.prototype, "tree", void 0), b([s({ type: Array })], q.prototype, "modules", void 0), b([l()], q.prototype, "_openPopoverId", void 0), b([l()], q.prototype, "_displayMode", void 0), b([l()], q.prototype, "_overflowCount", void 0), b([l()], q.prototype, "_tooltip", void 0), q = b([O(), o("vsn-breadcrumbs")], q);
2303
+ x([s({ attribute: !1 })], q.prototype, "tree", void 0), x([s({ type: Array })], q.prototype, "modules", void 0), x([l()], q.prototype, "_openPopoverId", void 0), x([l()], q.prototype, "_displayMode", void 0), x([l()], q.prototype, "_overflowCount", void 0), x([l()], q.prototype, "_tooltip", void 0), q = x([D(), o("vsn-breadcrumbs")], q);
2038
2304
  //#endregion
2039
2305
  //#region src/components/vsn-top-bar/vsn-ai-assistant.ts
2040
- var jt = class extends e {
2306
+ var zt = class extends e {
2041
2307
  static {
2042
2308
  this.styles = h;
2043
2309
  }
@@ -2052,13 +2318,13 @@ var jt = class extends e {
2052
2318
  }
2053
2319
  render() {
2054
2320
  return n`
2055
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Open AI assistant")} @click=${this._handleClick}>
2056
- <span class="ga-icon">${v(fe)}</span>
2321
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Open AI assistant")} @click=${this._handleClick}>
2322
+ <span class="ga-icon">${y(fe)}</span>
2057
2323
  </button>
2058
2324
  `;
2059
2325
  }
2060
2326
  };
2061
- jt = b([O(), o("vsn-ai-assistant")], jt);
2327
+ zt = x([D(), o("vsn-ai-assistant")], zt);
2062
2328
  //#endregion
2063
2329
  //#region src/components/vsn-top-bar/vsn-feedback.ts
2064
2330
  var J = class extends e {
@@ -2079,7 +2345,7 @@ var J = class extends e {
2079
2345
  updated(e) {
2080
2346
  if (super.updated(e), e.has("feedback") && this.feedback?.workspaceId && !document.getElementById("survicate-sdk")) {
2081
2347
  let e = document.createElement("script");
2082
- e.id = tt, e.src = rt(this.feedback.workspaceId), e.async = !0, document.head.appendChild(e);
2348
+ e.id = st, e.src = lt(this.feedback.workspaceId), e.async = !0, document.head.appendChild(e);
2083
2349
  }
2084
2350
  }
2085
2351
  disconnectedCallback() {
@@ -2089,21 +2355,21 @@ var J = class extends e {
2089
2355
  this.dispatchEvent(new CustomEvent("vsn-feedback", {
2090
2356
  bubbles: !0,
2091
2357
  composed: !0
2092
- })), this.feedback?.surveyId && window._sva?.invokeEvent(nt);
2358
+ })), this.feedback?.surveyId && window._sva?.invokeEvent(ct);
2093
2359
  }
2094
2360
  render() {
2095
2361
  return this._compact ? n`
2096
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Send feedback")} @click=${this._handleClick}>
2097
- <span class="ga-icon">${v(he)}</span>
2362
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Send feedback")} @click=${this._handleClick}>
2363
+ <span class="ga-icon">${y(he)}</span>
2098
2364
  </button>
2099
2365
  ` : n`
2100
- <button type="button" class="ga-button ga-button--secondary" aria-label=${D("Send feedback")} @click=${this._handleClick}>
2101
- ${D("Feedback")}
2366
+ <button type="button" class="ga-button ga-button--secondary" aria-label=${E("Send feedback")} @click=${this._handleClick}>
2367
+ ${E("Feedback")}
2102
2368
  </button>
2103
2369
  `;
2104
2370
  }
2105
2371
  };
2106
- b([l()], J.prototype, "_compact", void 0), b([s({ attribute: !1 })], J.prototype, "feedback", void 0), J = b([O(), o("vsn-feedback")], J);
2372
+ x([l()], J.prototype, "_compact", void 0), x([s({ attribute: !1 })], J.prototype, "feedback", void 0), J = x([D(), o("vsn-feedback")], J);
2107
2373
  //#endregion
2108
2374
  //#region src/components/vsn-top-bar/vsn-home.ts
2109
2375
  var Y = class extends e {
@@ -2117,7 +2383,7 @@ var Y = class extends e {
2117
2383
  e.preventDefault(), this.landingPageUrl && this.dispatchEvent(new CustomEvent("vsn-navigate", {
2118
2384
  detail: {
2119
2385
  id: "home",
2120
- label: D("Home"),
2386
+ label: E("Home"),
2121
2387
  url: this.landingPageUrl
2122
2388
  },
2123
2389
  bubbles: !0,
@@ -2126,16 +2392,16 @@ var Y = class extends e {
2126
2392
  }
2127
2393
  render() {
2128
2394
  return this.landingPageUrl ? n`
2129
- <a href=${this.landingPageUrl} class="ga-button ga-button--secondary ga-button--icon-only" style="border-color: transparent" aria-label=${D("Home")} @click=${this._handleClick}>
2130
- <span class="ga-icon">${v(ge)}</span>
2395
+ <a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${E("Home")} @click=${this._handleClick}>
2396
+ <span class="ga-icon">${y(ge)}</span>
2131
2397
  </a>
2132
2398
  ` : r;
2133
2399
  }
2134
2400
  };
2135
- b([s({ attribute: "landing-page-url" })], Y.prototype, "landingPageUrl", void 0), Y = b([O(), o("vsn-home")], Y);
2401
+ x([s({ attribute: "landing-page-url" })], Y.prototype, "landingPageUrl", void 0), Y = x([D(), o("vsn-home")], Y);
2136
2402
  //#endregion
2137
2403
  //#region src/components/vsn-top-bar/vsn-menu-toggle.ts
2138
- var Mt = class extends e {
2404
+ var Bt = class extends e {
2139
2405
  static {
2140
2406
  this.styles = h;
2141
2407
  }
@@ -2150,13 +2416,13 @@ var Mt = class extends e {
2150
2416
  }
2151
2417
  render() {
2152
2418
  return n`
2153
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Open menu")} @click=${this._handleClick}>
2154
- <span class="ga-icon">${v(de)}</span>
2419
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Open menu")} @click=${this._handleClick}>
2420
+ <span class="ga-icon">${y(de)}</span>
2155
2421
  </button>
2156
2422
  `;
2157
2423
  }
2158
2424
  };
2159
- Mt = b([O(), o("vsn-menu-toggle")], Mt);
2425
+ Bt = x([D(), o("vsn-menu-toggle")], Bt);
2160
2426
  //#endregion
2161
2427
  //#region src/components/vsn-top-bar/vsn-notifications.ts
2162
2428
  var X = class extends e {
@@ -2178,20 +2444,20 @@ var X = class extends e {
2178
2444
  render() {
2179
2445
  let e = this.notificationActive ? me : pe;
2180
2446
  return n`
2181
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Notifications")} @click=${this._handleClick}>
2182
- <span class="ga-icon">${v(e)}</span>
2447
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Notifications")} @click=${this._handleClick}>
2448
+ <span class="ga-icon">${y(e)}</span>
2183
2449
  </button>
2184
2450
  `;
2185
2451
  }
2186
2452
  };
2187
- b([s({
2453
+ x([s({
2188
2454
  type: Boolean,
2189
2455
  attribute: "notification-active",
2190
2456
  reflect: !0
2191
- })], X.prototype, "notificationActive", void 0), X = b([O(), o("vsn-notifications")], X);
2457
+ })], X.prototype, "notificationActive", void 0), X = x([D(), o("vsn-notifications")], X);
2192
2458
  //#endregion
2193
2459
  //#region src/components/vsn-top-bar/vsn-help.ts
2194
- function Nt(e) {
2460
+ function Vt(e) {
2195
2461
  try {
2196
2462
  let t = new URL(e);
2197
2463
  return t.protocol === "https:" || t.protocol === "http:";
@@ -2213,18 +2479,18 @@ var Z = class extends e {
2213
2479
  }));
2214
2480
  }
2215
2481
  render() {
2216
- return this.helpUrl && Nt(this.helpUrl) ? n`
2217
- <a href=${this.helpUrl} rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Help")}>
2218
- <span class="ga-icon">${v(_e)}</span>
2482
+ return this.helpUrl && Vt(this.helpUrl) ? n`
2483
+ <a href=${this.helpUrl} rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Help")}>
2484
+ <span class="ga-icon">${y(_e)}</span>
2219
2485
  </a>
2220
2486
  ` : n`
2221
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${D("Help")} @click=${this._handleClick}>
2222
- <span class="ga-icon">${v(_e)}</span>
2487
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${E("Help")} @click=${this._handleClick}>
2488
+ <span class="ga-icon">${y(_e)}</span>
2223
2489
  </button>
2224
2490
  `;
2225
2491
  }
2226
2492
  };
2227
- b([s({ attribute: "help-url" })], Z.prototype, "helpUrl", void 0), Z = b([O(), o("vsn-help")], Z);
2493
+ x([s({ attribute: "help-url" })], Z.prototype, "helpUrl", void 0), Z = x([D(), o("vsn-help")], Z);
2228
2494
  //#endregion
2229
2495
  //#region src/components/vsn-top-bar/vsn-top-bar.ts
2230
2496
  var Q = class extends e {
@@ -2232,7 +2498,7 @@ var Q = class extends e {
2232
2498
  super(...e), this.modules = [], this.feedback = null, this.showHelp = !1, this.showNotification = !1, this.notificationActive = !1, this.lang = "en";
2233
2499
  }
2234
2500
  willUpdate(e) {
2235
- e.has("lang") && Dt(this.lang).catch(console.error);
2501
+ e.has("lang") && Ft(this.lang).catch(console.error);
2236
2502
  }
2237
2503
  static {
2238
2504
  this.styles = [h, t`
@@ -2261,6 +2527,11 @@ var Q = class extends e {
2261
2527
  margin-left: auto;
2262
2528
  }
2263
2529
 
2530
+ vsn-home .ga-button--ghost:hover {
2531
+ background-color: var(--ga-color-surface-action-hover-2);
2532
+ border-color: transparent;
2533
+ }
2534
+
2264
2535
  @media (max-width: 767px) {
2265
2536
  .ga-page-header__global-navigation {
2266
2537
  flex-wrap: wrap;
@@ -2313,16 +2584,16 @@ var Q = class extends e {
2313
2584
  `;
2314
2585
  }
2315
2586
  };
2316
- b([s({ attribute: !1 })], Q.prototype, "tree", void 0), b([s({ type: Array })], Q.prototype, "modules", void 0), b([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), b([s({ attribute: !1 })], Q.prototype, "feedback", void 0), b([s({
2587
+ x([s({ attribute: !1 })], Q.prototype, "tree", void 0), x([s({ type: Array })], Q.prototype, "modules", void 0), x([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), x([s({ attribute: !1 })], Q.prototype, "feedback", void 0), x([s({
2317
2588
  type: Boolean,
2318
2589
  attribute: "show-help"
2319
- })], Q.prototype, "showHelp", void 0), b([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), b([s({
2590
+ })], Q.prototype, "showHelp", void 0), x([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), x([s({
2320
2591
  type: Boolean,
2321
2592
  attribute: "show-notification"
2322
- })], Q.prototype, "showNotification", void 0), b([s({
2593
+ })], Q.prototype, "showNotification", void 0), x([s({
2323
2594
  type: Boolean,
2324
2595
  attribute: "notification-active"
2325
- })], Q.prototype, "notificationActive", void 0), b([s()], Q.prototype, "lang", void 0), Q = b([o("vsn-top-bar")], Q);
2596
+ })], Q.prototype, "notificationActive", void 0), x([s()], Q.prototype, "lang", void 0), Q = x([o("vsn-top-bar")], Q);
2326
2597
  //#endregion
2327
2598
  //#region src/components/vsn-navigation.ts
2328
2599
  var $ = class extends e {
@@ -2431,15 +2702,15 @@ var $ = class extends e {
2431
2702
  `;
2432
2703
  }
2433
2704
  };
2434
- b([s()], $.prototype, "lang", void 0), b([s({ attribute: !1 })], $.prototype, "tree", void 0), b([s({ attribute: !1 })], $.prototype, "modules", void 0), b([s({ attribute: !1 })], $.prototype, "auth", void 0), b([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), b([s({
2705
+ x([s()], $.prototype, "lang", void 0), x([s({ attribute: !1 })], $.prototype, "tree", void 0), x([s({ attribute: !1 })], $.prototype, "modules", void 0), x([s({ attribute: !1 })], $.prototype, "auth", void 0), x([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), x([s({
2435
2706
  type: Boolean,
2436
2707
  attribute: "show-help"
2437
- })], $.prototype, "showHelp", void 0), b([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), b([s({ attribute: !1 })], $.prototype, "feedback", void 0), b([s({
2708
+ })], $.prototype, "showHelp", void 0), x([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), x([s({ attribute: !1 })], $.prototype, "feedback", void 0), x([s({
2438
2709
  type: Boolean,
2439
2710
  attribute: "show-notification"
2440
- })], $.prototype, "showNotification", void 0), b([s({
2711
+ })], $.prototype, "showNotification", void 0), x([s({
2441
2712
  type: Boolean,
2442
2713
  attribute: "notification-active"
2443
- })], $.prototype, "notificationActive", void 0), b([l()], $.prototype, "_currentItem", void 0), b([l()], $.prototype, "_sideBarOpen", void 0), b([l()], $.prototype, "_resolvedModules", void 0), b([l()], $.prototype, "_modulesLoading", void 0), $ = b([o("vsn-navigation")], $);
2714
+ })], $.prototype, "notificationActive", void 0), x([l()], $.prototype, "_currentItem", void 0), x([l()], $.prototype, "_sideBarOpen", void 0), x([l()], $.prototype, "_resolvedModules", void 0), x([l()], $.prototype, "_modulesLoading", void 0), $ = x([o("vsn-navigation")], $);
2444
2715
  //#endregion
2445
- export { $ as VSNNavigation, g as isTreeLeaf, _ as isTreeParent };
2716
+ export { v as SearchError, $ as VSNNavigation, g as isTreeLeaf, _ as isTreeParent };