@visma-swno/vsn-navigation 1.1.0 → 1.2.0-beta.10

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.
@@ -275,40 +275,40 @@ function De(e) {
275
275
  function w(e) {
276
276
  window.dispatchEvent(new CustomEvent(y, { detail: e }));
277
277
  }
278
- var T = "", E, Oe, D, O, ke, k = new ye();
279
- k.resolve();
280
- var A = 0, Ae = (e) => (ge(((e, t) => Ee(ke, e, t))), T = Oe = e.sourceLocale, D = new Set(e.targetLocales), D.add(e.sourceLocale), O = e.loadLocale, {
281
- getLocale: je,
282
- setLocale: Me
283
- }), je = () => T, Me = (e) => {
284
- if (e === (E ?? T)) return k.promise;
285
- if (!D || !O) throw Error("Internal error");
278
+ var T = "", E, Oe, D, ke, Ae, O = new ye();
279
+ O.resolve();
280
+ var k = 0, je = (e) => (ge(((e, t) => Ee(Ae, e, t))), T = Oe = e.sourceLocale, D = new Set(e.targetLocales), D.add(e.sourceLocale), ke = e.loadLocale, {
281
+ getLocale: Me,
282
+ setLocale: Ne
283
+ }), Me = () => T, Ne = (e) => {
284
+ if (e === (E ?? T)) return O.promise;
285
+ if (!D || !ke) throw Error("Internal error");
286
286
  if (!D.has(e)) throw Error("Invalid locale code");
287
- A++;
288
- let t = A;
289
- return E = e, k.settled && (k = new ye()), w({
287
+ k++;
288
+ let t = k;
289
+ return E = e, O.settled && (O = new ye()), w({
290
290
  status: "loading",
291
291
  loadingLocale: e
292
- }), (e === Oe ? Promise.resolve({ templates: void 0 }) : O(e)).then((n) => {
293
- A === t && (T = e, E = void 0, ke = n.templates, w({
292
+ }), (e === Oe ? Promise.resolve({ templates: void 0 }) : ke(e)).then((n) => {
293
+ k === t && (T = e, E = void 0, Ae = n.templates, w({
294
294
  status: "ready",
295
295
  readyLocale: e
296
- }), k.resolve());
296
+ }), O.resolve());
297
297
  }, (n) => {
298
- A === t && (w({
298
+ k === t && (w({
299
299
  status: "error",
300
300
  errorLocale: e,
301
301
  errorMessage: n.toString()
302
- }), k.reject(n));
303
- }), k.promise;
304
- }, Ne = () => {
302
+ }), O.reject(n));
303
+ }), O.promise;
304
+ }, Pe = () => {
305
305
  if (typeof navigator > "u") return !1;
306
306
  let e = navigator.userAgentData?.platform ?? navigator.platform ?? "";
307
307
  return /mac/i.test(e);
308
- }, Pe = (e) => Ne() ? e.metaKey : e.ctrlKey, Fe = () => x("Choose a service"), Ie = () => x("Search"), Le = () => Ne() ? "Cmd+K" : "CTRL+K", Re = (e) => x(b`Type at least ${e} characters to search`), ze = () => x("Menu items"), Be = (e) => x(b`Load ${e} more`), Ve = () => x("VSN"), He = "survicate-sdk", Ue = "ui-components-feedback", We = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`;
308
+ }, Fe = (e) => !e.shiftKey && !e.altKey && (Pe() ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey), A = (e) => e.shiftKey || e.altKey || e.ctrlKey || e.metaKey, j = (e) => !A(e), Ie = () => x("Choose a service"), Le = () => x("Search"), Re = () => Pe() ? "Cmd+K" : "CTRL+K", ze = (e) => x(b`Type at least ${e} characters to search`), Be = () => x("Menu items"), Ve = (e) => x(b`Load ${e} more`), He = () => x("VSN"), Ue = "survicate-sdk", We = "ui-components-feedback", Ge = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`;
309
309
  //#endregion
310
310
  //#region src/shared/icons.ts
311
- function j(e, t = 24, r) {
311
+ function M(e, t = 24, r) {
312
312
  return n`<svg
313
313
  xmlns="http://www.w3.org/2000/svg"
314
314
  width="${t}"
@@ -323,23 +323,23 @@ function j(e, t = 24, r) {
323
323
  class=${r ?? ""}
324
324
  >${e}</svg>`;
325
325
  }
326
- var Ge = i`
326
+ var Ke = i``, qe = i`
327
327
  <path d="M4 5h16"/>
328
328
  <path d="M4 12h16"/>
329
329
  <path d="M4 19h16"/>
330
- `, Ke = i`
330
+ `, Je = i`
331
331
  <path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/>
332
332
  <path d="M20 2v4"/>
333
333
  <path d="M22 4h-4"/>
334
334
  <circle cx="4" cy="20" r="2"/>
335
- `, qe = i`
335
+ `, Ye = i`
336
336
  <path d="M10.268 21a2 2 0 0 0 3.464 0"/>
337
337
  <path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>
338
- `, Je = i`
338
+ `, Xe = i`
339
339
  <path d="M10.268 21a2 2 0 0 0 3.464 0"/>
340
340
  <path d="M11.68 2.009A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673c-.824-.85-1.678-1.731-2.21-3.348"/>
341
341
  <circle cx="18" cy="5" r="3"/>
342
- `, Ye = i`
342
+ `, Ze = i`
343
343
  <path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"/>
344
344
  <path d="M7 10v12"/>
345
345
  `;
@@ -350,14 +350,14 @@ i`
350
350
  <path d="M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2"/>
351
351
  <path d="M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16"/>
352
352
  `;
353
- var Xe = i`
353
+ var Qe = i`
354
354
  <path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/>
355
355
  <path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
356
- `, Ze = i`
356
+ `, $e = i`
357
357
  <circle cx="12" cy="12" r="10"/>
358
358
  <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
359
359
  <path d="M12 17h.01"/>
360
- `, Qe = i`
360
+ `, et = i`
361
361
  <circle cx="12" cy="8" r="5"/>
362
362
  <path d="M20 21a8 8 0 0 0-16 0"/>
363
363
  `;
@@ -368,11 +368,11 @@ i`
368
368
  <path d="M12 17v5"/>
369
369
  <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/>
370
370
  `;
371
- var $e = i`
371
+ var tt = i`
372
372
  <path d="m16 17 5-5-5-5"/>
373
373
  <path d="M21 12H9"/>
374
374
  <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
375
- `, et = i`
375
+ `, nt = i`
376
376
  <path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"/>
377
377
  <path d="m21 3-9 9"/>
378
378
  <path d="M15 3h6v6"/>
@@ -381,17 +381,17 @@ i`
381
381
  <circle cx="12" cy="12" r="10"/>
382
382
  <circle cx="12" cy="12" r="1"/>
383
383
  `;
384
- var tt = i`
384
+ var rt = i`
385
385
  <path d="m7 15 5 5 5-5"/>
386
386
  <path d="m7 9 5-5 5 5"/>
387
- `, nt = i`
387
+ `, it = i`
388
388
  <path d="m18 15-6-6-6 6"/>
389
- `, M = i`
389
+ `, N = i`
390
390
  <path d="m6 9 6 6 6-6"/>
391
- `, rt = i`
391
+ `, at = i`
392
392
  <circle cx="11" cy="11" r="8"/>
393
393
  <path d="m21 21-4.3-4.3"/>
394
- `, it = i`
394
+ `, ot = i`
395
395
  <circle cx="12" cy="12" r="10"/>
396
396
  <path d="m15 9-6 6"/>
397
397
  <path d="m9 9 6 6"/>
@@ -401,7 +401,7 @@ i`
401
401
  <line x1="12" x2="12" y1="8" y2="12"/>
402
402
  <line x1="12" x2="12.01" y1="16" y2="16"/>
403
403
  `;
404
- var at = i`
404
+ var st = i`
405
405
  <path d="M12 16h.01"/>
406
406
  <path d="M12 8v4"/>
407
407
  <path d="M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"/>
@@ -412,12 +412,12 @@ i`
412
412
  `, i`
413
413
  <path fill-rule="evenodd" clip-rule="evenodd" d="M2.60982 1.03843C2.99778 0.96126 3.39992 1.00087 3.76537 1.15224C4.13082 1.30362 4.44318 1.55996 4.66294 1.88886C4.8827 2.21776 5 2.60444 5 3V4H7V3C7 2.60444 7.1173 2.21776 7.33706 1.88886C7.55682 1.55996 7.86918 1.30362 8.23463 1.15224C8.60009 1.00087 9.00222 0.96126 9.39018 1.03843C9.77814 1.1156 10.1345 1.30608 10.4142 1.58579C10.6939 1.86549 10.8844 2.22186 10.9616 2.60982C11.0387 2.99778 10.9991 3.39992 10.8478 3.76537C10.6964 4.13082 10.44 4.44318 10.1111 4.66294C9.78224 4.8827 9.39556 5 9 5H8V7H9C9.39556 7 9.78224 7.1173 10.1111 7.33706C10.44 7.55682 10.6964 7.86918 10.8478 8.23463C10.9991 8.60009 11.0387 9.00222 10.9616 9.39018C10.8844 9.77814 10.6939 10.1345 10.4142 10.4142C10.1345 10.6939 9.77814 10.8844 9.39018 10.9616C9.00222 11.0387 8.60009 10.9991 8.23463 10.8478C7.86918 10.6964 7.55682 10.44 7.33706 10.1111C7.1173 9.78224 7 9.39556 7 9V8H5V9C5 9.39556 4.8827 9.78224 4.66294 10.1111C4.44318 10.44 4.13082 10.6964 3.76537 10.8478C3.39992 10.9991 2.99778 11.0387 2.60982 10.9616C2.22186 10.8844 1.86549 10.6939 1.58579 10.4142C1.30608 10.1345 1.1156 9.77814 1.03843 9.39018C0.96126 9.00222 1.00087 8.60009 1.15224 8.23463C1.30362 7.86918 1.55996 7.55682 1.88886 7.33706C2.21776 7.1173 2.60444 7 3 7H4V5H3C2.60444 5 2.21776 4.8827 1.88886 4.66294C1.55996 4.44318 1.30362 4.13082 1.15224 3.76537C1.00087 3.39992 0.96126 2.99778 1.03843 2.60982C1.1156 2.22186 1.30608 1.86549 1.58579 1.58579C1.86549 1.30608 2.22186 1.1156 2.60982 1.03843ZM4 4V3C4 2.80222 3.94135 2.60888 3.83147 2.44443C3.72159 2.27998 3.56541 2.15181 3.38268 2.07612C3.19996 2.00043 2.99889 1.98063 2.80491 2.01922C2.61093 2.0578 2.43275 2.15304 2.29289 2.29289C2.15304 2.43275 2.0578 2.61093 2.01922 2.80491C1.98063 2.99889 2.00043 3.19996 2.07612 3.38268C2.15181 3.56541 2.27998 3.72159 2.44443 3.83147C2.60888 3.94135 2.80222 4 3 4H4ZM5 5V7H7V5H5ZM4 8H3C2.80222 8 2.60888 8.05865 2.44443 8.16853C2.27998 8.27841 2.15181 8.43459 2.07612 8.61732C2.00043 8.80004 1.98063 9.00111 2.01922 9.19509C2.0578 9.38907 2.15304 9.56726 2.29289 9.70711C2.43275 9.84696 2.61093 9.9422 2.80491 9.98079C2.99889 10.0194 3.19996 9.99957 3.38268 9.92388C3.56541 9.84819 3.72159 9.72002 3.83147 9.55557C3.94135 9.39112 4 9.19778 4 9V8ZM8 8V9C8 9.19778 8.05865 9.39112 8.16853 9.55557C8.27841 9.72002 8.43459 9.84819 8.61732 9.92388C8.80004 9.99957 9.00111 10.0194 9.19509 9.98079C9.38907 9.9422 9.56726 9.84696 9.70711 9.70711C9.84696 9.56726 9.9422 9.38907 9.98079 9.19509C10.0194 9.00111 9.99957 8.80004 9.92388 8.61732C9.84819 8.43459 9.72002 8.27841 9.55557 8.16853C9.39112 8.05865 9.19778 8 9 8H8ZM8 4H9C9.19778 4 9.39112 3.94135 9.55557 3.83147C9.72002 3.72159 9.84819 3.56541 9.92388 3.38268C9.99957 3.19996 10.0194 2.99889 9.98079 2.80491C9.9422 2.61093 9.84696 2.43275 9.70711 2.29289C9.56726 2.15304 9.38907 2.0578 9.19509 2.01922C9.00111 1.98063 8.80004 2.00043 8.61732 2.07612C8.43459 2.15181 8.27841 2.27998 8.16853 2.44443C8.05865 2.60888 8 2.80222 8 3V4Z"/>
414
414
  `;
415
- var ot = i`
415
+ var ct = i`
416
416
  <path d="m9 18 6-6-6-6"/>
417
417
  `;
418
418
  //#endregion
419
419
  //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
420
- function N(e, t, n, r) {
420
+ function P(e, t, n, r) {
421
421
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
422
422
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
423
423
  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);
@@ -425,12 +425,9 @@ function N(e, t, n, r) {
425
425
  }
426
426
  //#endregion
427
427
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-item.ts
428
- var P, F = class extends e {
429
- static {
430
- P = this;
431
- }
428
+ var F, I = class extends e {
432
429
  static {
433
- this.styles = [h];
430
+ F = this;
434
431
  }
435
432
  static {
436
433
  this._idCounter = 0;
@@ -452,7 +449,7 @@ var P, F = class extends e {
452
449
  }
453
450
  }, this._onItemMouseLeave = () => {
454
451
  this._showTooltip = !1;
455
- }, this._tooltipId = `vsn-side-menu-item-tooltip-${P._idCounter++}`;
452
+ }, this._tooltipId = `vsn-side-menu-item-tooltip-${F._idCounter++}`;
456
453
  }
457
454
  willUpdate(e) {
458
455
  let t = this.tree;
@@ -461,9 +458,9 @@ var P, F = class extends e {
461
458
  render() {
462
459
  let e = this.tree && _(this.tree) ? this.tree.items : [];
463
460
  return n`
464
- ${this.menuItemMarkup()}
465
- ${u(this._isExpanded && e.length > 0, () => d(e, (e) => this.menuItem(e, this.level + 1)))}
466
- `;
461
+ ${this.menuItemMarkup()}
462
+ ${u(this._isExpanded && e.length > 0, () => d(e, (e) => this.menuItem(e, this.level + 1)))}
463
+ `;
467
464
  }
468
465
  menuItemMarkup() {
469
466
  let e = this.tree !== void 0 && _(this.tree), t = this.tree?.["data-qa-id"], r = {
@@ -477,16 +474,24 @@ var P, F = class extends e {
477
474
  <div class="ga-tooltip ga-tooltip--right-center w-34 max-w-135">${this.tree?.label}</div>
478
475
  </div>
479
476
  <span class="ga-side-navigation__item-icon">
480
- ${e ? this._isExpanded ? j(M, 16) : j(ot, 16) : ""}
477
+ ${e ? this._isExpanded ? M(N, 16) : M(ct, 16) : ""}
481
478
  </span>
482
479
  <div class="ga-side-navigation__item-content">
483
480
  <div class="ga-side-navigation__item-label">${this.tree?.label}</div>
484
481
  </div>
485
482
  `;
486
- return e ? n`<div class="${f(r)}" aria-describedby="${this._tooltipId}" data-qa-id="${ee(t)}" @click=${this._handleItemClick} @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${i}</div>` : n`<a class="${f(r)}" aria-describedby="${this._tooltipId}" href="${this.tree && g(this.tree) ? this.tree.url : ""}" data-qa-id="${ee(t)}" @click=${this._handleItemClick} @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${i}</a>`;
483
+ return e ? n`
484
+ <div class="${f(r)}" aria-describedby="${this._tooltipId}" data-qa-id="${ee(t)}"
485
+ @click=${this._handleItemClick} @mouseenter=${this._onItemMouseEnter}
486
+ @mouseleave=${this._onItemMouseLeave}>${i}
487
+ </div>` : n`<a class="${f(r)}" aria-describedby="${this._tooltipId}"
488
+ href="${this.tree && g(this.tree) ? this.tree.url : ""}" data-qa-id="${ee(t)}"
489
+ @click=${this._handleItemClick} @mouseenter=${this._onItemMouseEnter}
490
+ @mouseleave=${this._onItemMouseLeave}>${i}</a>`;
487
491
  }
488
492
  menuItem(e, t) {
489
- return n`<vsn-menu-item .tree=${e} .level=${t}></vsn-menu-item>`;
493
+ return n`
494
+ <vsn-menu-item .tree=${e} .level=${t}></vsn-menu-item>`;
490
495
  }
491
496
  isActiveNode(e) {
492
497
  if (e.id === this._currentActiveId) return e;
@@ -498,31 +503,31 @@ var P, F = class extends e {
498
503
  }
499
504
  _handleItemClick(e) {
500
505
  let t = this.tree;
501
- if (t !== void 0) if (_(t)) this._isExpanded = !this._isExpanded;
502
- else {
503
- e.preventDefault();
504
- let n = new CustomEvent("vsn-menu-item-changed", {
505
- bubbles: !0,
506
- composed: !0,
507
- detail: t
508
- });
509
- this.dispatchEvent(n);
506
+ if (t === void 0) return;
507
+ if (_(t)) {
508
+ this._isExpanded = !this._isExpanded, e.preventDefault(), e.stopPropagation();
509
+ return;
510
510
  }
511
+ if (e.button !== 0 || A(e)) return;
512
+ e.preventDefault(), e.stopPropagation();
513
+ let n = new CustomEvent("vsn-menu-item-changed", {
514
+ bubbles: !0,
515
+ composed: !0,
516
+ detail: t
517
+ });
518
+ this.dispatchEvent(n);
511
519
  }
512
520
  };
513
- N([s({ attribute: !1 })], F.prototype, "tree", void 0), N([s({ type: Number })], F.prototype, "level", void 0), N([ue({
521
+ P([s({ attribute: !1 })], I.prototype, "tree", void 0), P([s({ type: Number })], I.prototype, "level", void 0), P([ue({
514
522
  context: de,
515
523
  subscribe: !0
516
- }), l()], F.prototype, "_currentActiveId", void 0), N([l()], F.prototype, "_isActive", void 0), N([l()], F.prototype, "_isExpanded", void 0), N([l()], F.prototype, "_showTooltip", void 0), N([l()], F.prototype, "_tooltipPos", void 0), N([c(".ga-side-navigation__item-label")], F.prototype, "_labelEl", void 0), F = P = N([o("vsn-menu-item")], F);
524
+ }), l()], I.prototype, "_currentActiveId", void 0), P([l()], I.prototype, "_isActive", void 0), P([l()], I.prototype, "_isExpanded", void 0), P([l()], I.prototype, "_showTooltip", void 0), P([l()], I.prototype, "_tooltipPos", void 0), P([c(".ga-side-navigation__item-label")], I.prototype, "_labelEl", void 0), I = F = P([o("vsn-menu-item")], I);
517
525
  //#endregion
518
526
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu.ts
519
- var I = class extends e {
527
+ var L = class extends e {
520
528
  constructor(...e) {
521
529
  super(...e), this.items = [], this._currentActiveId = "", this.currentItem = "";
522
530
  }
523
- static {
524
- this.styles = [h];
525
- }
526
531
  createRenderRoot() {
527
532
  return this;
528
533
  }
@@ -531,125 +536,143 @@ var I = class extends e {
531
536
  }
532
537
  render() {
533
538
  return n`
534
- <div class="flex flex-col ga-side-navigation__body h-full">
535
- <div class="flex-1 overflow-y-auto">
536
- ${d(this.items, (e) => this.menuItem(e))}
537
- </div>
538
- <div>
539
- <slot name="nav-footer"></slot>
540
- </div>
539
+ <div class="flex flex-col ga-side-navigation__body h-full">
540
+ <div class="flex-1 overflow-y-auto ga-scroll">
541
+ ${d(this.items, (e) => this.menuItem(e))}
542
+ </div>
543
+ <div>
544
+ <slot name="nav-footer"></slot>
541
545
  </div>
546
+ </div>
542
547
  `;
543
548
  }
544
549
  menuItem(e) {
545
- return n`<vsn-menu-item .tree=${e}></vsn-menu-item>`;
550
+ return n`
551
+ <vsn-menu-item .tree=${e}></vsn-menu-item>`;
546
552
  }
547
553
  };
548
- N([s({ attribute: !1 })], I.prototype, "items", void 0), N([le({ context: de }), l()], I.prototype, "_currentActiveId", void 0), N([s()], I.prototype, "currentItem", void 0), I = N([o("vsn-menu")], I);
554
+ P([s({ attribute: !1 })], L.prototype, "items", void 0), P([le({ context: de }), l()], L.prototype, "_currentActiveId", void 0), P([s()], L.prototype, "currentItem", void 0), L = P([o("vsn-menu")], L);
549
555
  //#endregion
550
556
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-button.ts
551
- var L = class extends e {
557
+ var R = class extends e {
552
558
  constructor(...e) {
553
- super(...e), this.label = "", this._onKeydown = (e) => {
554
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.click());
559
+ super(...e), this.label = "", this.closeOnClick = !1, this._onKeydown = (e) => {
560
+ e.defaultPrevented || j(e) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.click());
561
+ }, this._onClick = (e) => {
562
+ e.defaultPrevented || e.button !== 0 || A(e) || this.closeOnClick && this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
563
+ bubbles: !0,
564
+ composed: !0
565
+ }));
555
566
  };
556
567
  }
557
568
  static {
558
569
  this.styles = [t`
559
- /* Every dimension multiplies by --ga-base-scaling-factor (default 1) so the
560
- whole component scales uniformly with the host's density setting.
561
- Layout spacing lives on the inner .row, NOT on :host — a consuming app's
562
- reset (* { margin: 0; padding: 0 }) overrides :host but can't reach the shadow. */
563
- :host {
564
- display: block;
565
- border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
566
- }
570
+ /* Every dimension multiplies by --ga-base-scaling-factor (default 1) so the
571
+ whole component scales uniformly with the host's density setting.
572
+ Layout spacing lives on the inner .row, NOT on :host — a consuming app's
573
+ reset (* { margin: 0; padding: 0 }) overrides :host but can't reach the shadow. */
567
574
 
568
- :host(:hover) {
569
- background-color: var(--ga-color-surface-action-hover-2);
570
- }
575
+ :host {
576
+ display: block;
577
+ cursor: pointer;
578
+ outline-style: none;
579
+ }
571
580
 
572
- :host(:focus-visible) {
573
- outline: calc(2px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-focus);
574
- outline-offset: calc(4px * var(--ga-base-scaling-factor, 1));
575
- }
581
+ :host(:hover) {
582
+ background-color: var(--ga-color-surface-action-hover-2);
583
+ }
576
584
 
577
- .row {
578
- display: flex;
579
- align-items: center;
580
- /* spacing-04 padding-block + 20px label line-height = 44px row,
581
- matching Gaia's .ga-side-navigation__item (py-3 / px-4 / gap-3). */
582
- gap: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
583
- padding-block: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
584
- padding-inline: calc(var(--ga-size-spacing-05) * var(--ga-base-scaling-factor, 1));
585
- }
585
+ :host(:focus-visible) > .row::after {
586
+ position: absolute;
587
+ inset: 3px;
588
+ border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
589
+ border-style: var(--tw-border-style);
590
+ border-width: 2px;
591
+ border-color: var(--ga-color-border-focus);
592
+ --tw-content: '';
593
+ content: var(--tw-content);
594
+ }
586
595
 
587
- .icon {
588
- width: calc(1rem * var(--ga-base-scaling-factor, 1));
589
- flex-shrink: 0;
590
- color: var(--ga-color-icon-primary);
591
- display: inline-flex;
592
- align-items: center;
593
- }
596
+ .row {
597
+ position: relative;
598
+ display: flex;
599
+ align-items: center;
600
+ /* spacing-04 padding-block + 20px label line-height = 44px row,
601
+ matching Gaia's .ga-side-navigation__item (py-3 / px-4 / gap-3). */
602
+ gap: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
603
+ padding-block: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
604
+ padding-inline: calc(var(--ga-size-spacing-05) * var(--ga-base-scaling-factor, 1));
605
+ }
594
606
 
595
- .label {
596
- flex: 1;
597
- display: inline-flex;
598
- overflow: hidden;
599
- white-space: nowrap;
600
- text-overflow: ellipsis;
601
- font-family: Inter, ui-sans-serif, system-ui, sans-serif;
602
- font-feature-settings: 'liga' 1, 'calt' 1;
603
- font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
604
- line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
605
- letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
606
- color: var(--ga-color-text-action);
607
- }
607
+ .icon {
608
+ width: calc(1rem * var(--ga-base-scaling-factor, 1));
609
+ flex-shrink: 0;
610
+ color: var(--ga-color-icon-primary);
611
+ display: inline-flex;
612
+ align-items: center;
613
+ }
608
614
 
609
- slot[name="kbd"]::slotted(kbd) {
610
- display: inline-flex;
611
- align-items: center;
612
- justify-content: center;
613
- gap: calc(0.125rem * var(--ga-base-scaling-factor, 1));
614
- flex-shrink: 0;
615
- cursor: default;
616
- border: calc(1px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-disabled);
617
- border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
618
- background-color: var(--ga-color-white);
619
- /* !important: the <kbd> is host-provided slotted content, so a
620
- consuming app's * { padding: 0 } reset overrides ::slotted normal
621
- rules. We can't move it to an inner shadow element (it's the
622
- host's element), so important is the accepted defense here. */
623
- padding-inline: calc(var(--ga-size-spacing-02) * var(--ga-base-scaling-factor, 1)) !important;
624
- padding-block: calc(1px * var(--ga-base-scaling-factor, 1)) !important;
625
- font-family: Inter, ui-sans-serif, system-ui, sans-serif;
626
- font-size: calc(var(--ga-text-xs-font-size) * var(--ga-base-scaling-factor, 1));
627
- line-height: calc(var(--ga-text-xs-line-height) * var(--ga-base-scaling-factor, 1));
628
- letter-spacing: calc(var(--ga-text-xs-letter-spacing) * var(--ga-base-scaling-factor, 1));
629
- color: var(--ga-color-text-body);
630
- }
631
- `];
615
+ .label {
616
+ flex: 1;
617
+ display: inline-flex;
618
+ overflow: hidden;
619
+ white-space: nowrap;
620
+ text-overflow: ellipsis;
621
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
622
+ font-feature-settings: 'liga' 1, 'calt' 1;
623
+ font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
624
+ line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
625
+ letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
626
+ color: var(--ga-color-text-action);
627
+ }
628
+
629
+ slot[name="kbd"]::slotted(kbd) {
630
+ display: inline-flex;
631
+ align-items: center;
632
+ justify-content: center;
633
+ gap: calc(0.125rem * var(--ga-base-scaling-factor, 1));
634
+ flex-shrink: 0;
635
+ cursor: default;
636
+ border: calc(1px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-disabled);
637
+ border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
638
+ background-color: var(--ga-color-white);
639
+ /* !important: the <kbd> is host-provided slotted content, so a
640
+ consuming app's * { padding: 0 } reset overrides ::slotted normal
641
+ rules. We can't move it to an inner shadow element (it's the
642
+ host's element), so important is the accepted defense here. */
643
+ padding-inline: calc(var(--ga-size-spacing-02) * var(--ga-base-scaling-factor, 1)) !important;
644
+ padding-block: calc(1px * var(--ga-base-scaling-factor, 1)) !important;
645
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
646
+ font-size: calc(var(--ga-text-xs-font-size) * var(--ga-base-scaling-factor, 1));
647
+ line-height: calc(var(--ga-text-xs-line-height) * var(--ga-base-scaling-factor, 1));
648
+ letter-spacing: calc(var(--ga-text-xs-letter-spacing) * var(--ga-base-scaling-factor, 1));
649
+ color: var(--ga-color-text-body);
650
+ }
651
+ `];
632
652
  }
633
653
  connectedCallback() {
634
- super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown);
654
+ super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown), this.addEventListener("click", this._onClick);
635
655
  }
636
656
  disconnectedCallback() {
637
- this.removeEventListener("keydown", this._onKeydown), super.disconnectedCallback();
657
+ this.removeEventListener("keydown", this._onKeydown), this.removeEventListener("click", this._onClick), super.disconnectedCallback();
638
658
  }
639
659
  render() {
640
660
  return n`
641
- <div class="row">
642
- <span class="icon"><slot name="icon"></slot></span>
643
- <span class="label">${this.label}</span>
644
- <slot name="kbd"></slot>
645
- </div>
646
- `;
661
+ <div class="row">
662
+ <span class="icon"><slot name="icon"></slot></span>
663
+ <span class="label">${this.label}</span>
664
+ <slot name="kbd"></slot>
665
+ </div>
666
+ `;
647
667
  }
648
668
  };
649
- N([s()], L.prototype, "label", void 0), L = N([o("vsn-menu-button")], L);
669
+ P([s()], R.prototype, "label", void 0), P([s({
670
+ type: Boolean,
671
+ attribute: "close-on-click"
672
+ })], R.prototype, "closeOnClick", void 0), R = P([o("vsn-menu-button")], R);
650
673
  //#endregion
651
674
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-separator.ts
652
- var st = class extends e {
675
+ var lt = class extends e {
653
676
  static {
654
677
  this.styles = [t`
655
678
  /* flow-root establishes a BFC so the .line's margins stay contained.
@@ -672,29 +695,30 @@ var st = class extends e {
672
695
  return n`<div class="line"></div>`;
673
696
  }
674
697
  };
675
- st = N([o("vsn-menu-separator")], st);
698
+ lt = P([o("vsn-menu-separator")], lt);
676
699
  //#endregion
677
700
  //#region src/components/vsn-side-bar/vsn-footer/vsn-footer.keyboard.ts
678
- var ct = class {
701
+ var ut = class {
679
702
  constructor(e) {
680
703
  this._prevExpanded = !1, this.onUserKeydown = (e) => {
681
- 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);
704
+ e.defaultPrevented || (j(e) && (e.key === "Enter" || e.key === " ") ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : j(e) && e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1));
682
705
  }, this.onDropdownKeydown = (e) => {
683
- if (e.key === "Escape") {
706
+ if (e.defaultPrevented) return;
707
+ if (j(e) && e.key === "Escape") {
684
708
  e.preventDefault(), this._closeAndRefocus();
685
709
  return;
686
710
  }
687
- if (e.key === "Enter" || e.key === " ") {
711
+ if (j(e) && (e.key === "Enter" || e.key === " ")) {
688
712
  let t = e.target;
689
713
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__footer-dropdown-item") && (e.preventDefault(), t.click());
690
714
  return;
691
715
  }
692
- if (e.key === "Tab" && !e.shiftKey) {
716
+ if (j(e) && e.key === "Tab") {
693
717
  let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__footer-dropdown-item")), n = t[t.length - 1];
694
718
  n && e.target === n && (this.host.expanded = !1);
695
719
  return;
696
720
  }
697
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
721
+ if (A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
698
722
  e.preventDefault();
699
723
  let t = this.host.querySelector(".ga-side-navigation__footer-dropdown");
700
724
  if (!t) return;
@@ -714,7 +738,7 @@ var ct = class {
714
738
  this.host.querySelector(".ga-side-navigation__user")?.focus();
715
739
  });
716
740
  }
717
- }, lt = class {
741
+ }, dt = class {
718
742
  constructor(e, t, n) {
719
743
  this._onPointerDown = (e) => {
720
744
  let t = e.composedPath();
@@ -731,79 +755,40 @@ var ct = class {
731
755
  hostDisconnected() {
732
756
  document.removeEventListener("pointerdown", this._onPointerDown, !0);
733
757
  }
734
- }, ut = t`
735
- @layer components {
736
- :where(.ga-side-navigation__user),
737
- :where(.ga-side-navigation__footer-dropdown-item) {
738
- width: 100%;
739
- cursor: pointer;
740
- }
741
-
742
- .ga-side-navigation__footer-dropdown-item:focus-visible {
743
- outline: 2px solid var(--ga-color-border-focus);
744
- outline-offset: 4px;
745
- }
746
-
747
- .vsn-side-navigation__user-info {
748
- display: flex;
749
- flex-direction: column;
750
- flex: 1;
751
- min-width: 0;
752
- }
753
-
754
- .vsn-side-navigation__user-info > .ga-side-navigation__user-name {
755
- flex: initial;
756
- }
757
-
758
- .vsn-side-navigation__user-email {
759
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
760
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
761
- font-weight: 400;
762
- }
763
-
764
- .vsn-side-navigation__user-avatar--icon {
765
- display: inline-flex;
766
- align-items: center;
767
- justify-content: center;
768
- }
769
- }
770
- `, dt = "initials";
771
- function ft(e, t, n, r) {
758
+ }, ft = "initials";
759
+ function pt(e, t, n, r) {
772
760
  if (!t) return;
773
761
  let i = new URLSearchParams({
774
- type: dt,
762
+ type: ft,
775
763
  size: r
776
764
  });
777
765
  return n && i.set("client_id", n), `${e}${t}?${i}`;
778
766
  }
779
767
  //#endregion
780
768
  //#region src/components/vsn-side-bar/vsn-footer/vsn-footer.ts
781
- var pt = {
782
- profile: Qe,
783
- logout: $e
784
- }, mt = () => ({
769
+ var mt = {
770
+ profile: et,
771
+ logout: tt
772
+ }, ht = () => ({
785
773
  profile: x("My profile"),
786
774
  logout: x("Log out")
787
- }), R = class extends e {
788
- static {
789
- this.styles = [h, ut];
790
- }
775
+ }), z = class extends e {
791
776
  createRenderRoot() {
792
777
  return this;
793
778
  }
794
779
  get _items() {
795
780
  return [{
796
781
  id: "profile",
797
- label: mt().profile,
782
+ label: ht().profile,
798
783
  url: this.myProfileUrl
799
784
  }, {
800
785
  id: "logout",
801
- label: mt().logout,
786
+ label: ht().logout,
802
787
  url: "/logout"
803
788
  }];
804
789
  }
805
790
  constructor() {
806
- super(), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new ct(this), new lt(this, [".ga-side-navigation__footer-dropdown", ".ga-side-navigation__user"], () => {
791
+ super(), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new ut(this), new dt(this, [".ga-side-navigation__footer-dropdown", ".ga-side-navigation__user"], () => {
807
792
  this.expanded = !1;
808
793
  });
809
794
  }
@@ -815,62 +800,63 @@ var pt = {
815
800
  }
816
801
  render() {
817
802
  return n`
818
- <div class="ga-side-navigation__footer">
819
- ${this.expanded ? this.renderDropdown() : r}
803
+ <div class="ga-side-navigation__footer">
804
+ ${this.expanded ? this.renderDropdown() : r}
820
805
 
821
- <div
822
- role="button"
823
- tabindex="0"
824
- aria-expanded="${this.expanded}"
825
- aria-haspopup="menu"
826
- class="ga-side-navigation__user
806
+ <div
807
+ role="button"
808
+ tabindex="0"
809
+ aria-expanded="${this.expanded}"
810
+ aria-haspopup="menu"
811
+ class="ga-side-navigation__user
827
812
  ${this.expanded ? "ga-side-navigation__user--active" : ""}"
828
- @click=${this._toggle}
829
- @keydown=${this._keyboard.onUserKeydown}>
813
+ @click=${this._toggle}
814
+ @keydown=${this._keyboard.onUserKeydown}>
830
815
 
831
- ${this.renderAvatar()}
816
+ ${this.renderAvatar()}
832
817
 
833
- <div class="vsn-side-navigation__user-info">
818
+ <div class="vsn-side-navigation__user-info">
834
819
  <span class="ga-side-navigation__user-name">
835
820
  ${this.user.userName}
836
821
  </span>
837
- ${this.user.userEmail ? n`<span class="vsn-side-navigation__user-email">
822
+ ${this.user.userEmail ? n`<span class="vsn-side-navigation__user-email">
838
823
  ${this.user.userEmail}
839
824
  </span>` : r}
840
- </div>
825
+ </div>
841
826
 
842
- <span class="ga-side-navigation__user-action">
843
- ${this.expanded ? j(nt, 16) : j(tt, 16)}
827
+ <span class="ga-side-navigation__user-action">
828
+ ${this.expanded ? M(it, 16) : M(rt, 16)}
844
829
  </span>
845
830
 
846
- </div>
847
831
  </div>
832
+ </div>
848
833
  `;
849
834
  }
850
835
  renderDropdown() {
851
836
  return n`
852
837
  <div class="ga-side-navigation__footer-dropdown" @keydown=${this._keyboard.onDropdownKeydown}>
853
838
 
854
- ${this._items.map((e) => {
839
+ ${this._items.map((e) => {
855
840
  let t = n`
856
- <span class="ga-side-navigation__footer-dropdown-icon">
857
- ${j(pt[e.id], 16)}
841
+ <span class="ga-side-navigation__footer-dropdown-icon">
842
+ ${M(mt[e.id], 16)}
858
843
  </span>
859
- <span class="ga-side-navigation__footer-dropdown-title">
844
+ <span class="ga-side-navigation__footer-dropdown-title">
860
845
  ${e.label}
861
846
  </span>
862
- ${e.external ? n`
863
- <span class="ga-side-navigation__footer-dropdown-trail">
864
- ${j(et, 16)}
847
+ ${e.external ? n`
848
+ <span class="ga-side-navigation__footer-dropdown-trail">
849
+ ${M(nt, 16)}
865
850
  </span>
866
- ` : r}
867
- `;
851
+ ` : r}
852
+ `;
868
853
  return e.id === "profile" ? n`<a
869
- class="ga-side-navigation__footer-dropdown-item"
870
- href=${e.url ?? ""}
871
- @click=${(t) => this._handleProfileClick(t, e)}>
872
- ${t}
873
- </a>` : n`<div
854
+ class="ga-side-navigation__footer-dropdown-item"
855
+ href=${e.url ?? ""}
856
+ @click=${(t) => this._handleProfileClick(t, e)}>
857
+ ${t}
858
+ </a>` : n`
859
+ <div
874
860
  role="button"
875
861
  tabindex="0"
876
862
  class="ga-side-navigation__footer-dropdown-item"
@@ -901,60 +887,63 @@ var pt = {
901
887
  }));
902
888
  }
903
889
  renderAvatar() {
904
- let e = ft(this.profilePictureBaseUrl, this.user.userId, this.user.clientId, "small");
890
+ let e = pt(this.profilePictureBaseUrl, this.user.userId, this.user.clientId, "small");
905
891
  return e && !this._avatarFailed ? n`<img
906
892
  class="ga-side-navigation__user-avatar"
907
893
  src=${e}
908
894
  alt=""
909
895
  @error=${() => {
910
896
  this._avatarFailed = !0;
911
- }} />` : n`<span class="ga-side-navigation__user-avatar vsn-side-navigation__user-avatar--icon">
912
- ${j(Qe, 24)}
897
+ }}/>` : n`<span class="ga-side-navigation__user-avatar vsn-side-navigation__user-avatar--icon">
898
+ ${M(et, 24)}
913
899
  </span>`;
914
900
  }
915
901
  };
916
- N([s({ attribute: !1 })], R.prototype, "user", void 0), N([s()], R.prototype, "profilePictureBaseUrl", void 0), N([s()], R.prototype, "myProfileUrl", void 0), N([s({
902
+ P([s({ attribute: !1 })], z.prototype, "user", void 0), P([s()], z.prototype, "profilePictureBaseUrl", void 0), P([s()], z.prototype, "myProfileUrl", void 0), P([s({
917
903
  type: Boolean,
918
904
  reflect: !0
919
- })], R.prototype, "expanded", void 0), N([l()], R.prototype, "_avatarFailed", void 0), R = N([S(), o("vsn-footer")], R);
905
+ })], z.prototype, "expanded", void 0), P([l()], z.prototype, "_avatarFailed", void 0), z = P([S(), o("vsn-footer")], z);
920
906
  //#endregion
921
907
  //#region src/components/vsn-side-bar/vsn-header/vsn-header.keyboard.ts
922
- var ht = class {
908
+ var gt = class {
923
909
  constructor(e) {
924
910
  this.onSwitcherKeydown = (e) => {
925
- if (e.key === "Enter" || e.key === " ") {
926
- if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
927
- (this.host.expanded || this.host.hasAvailableItems || this.host.modulesLoading) && (this.host.expanded = !this.host.expanded);
928
- return;
929
- }
930
- if (e.key === "ArrowDown" && !this.host.expanded) {
931
- if (!this.host.hasAvailableItems) return;
932
- e.preventDefault(), this.host.expanded = !0;
933
- return;
934
- }
935
- if (e.key === "Escape" && this.host.expanded) {
936
- if (!this.host.canClose) return;
937
- e.preventDefault(), this.host.expanded = !1;
911
+ if (!e.defaultPrevented) {
912
+ if (j(e) && (e.key === "Enter" || e.key === " ")) {
913
+ if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
914
+ (this.host.expanded || this.host.hasAvailableItems || this.host.modulesLoading) && (this.host.expanded = !this.host.expanded);
915
+ return;
916
+ }
917
+ if (j(e) && e.key === "ArrowDown" && !this.host.expanded) {
918
+ if (!this.host.hasAvailableItems) return;
919
+ e.preventDefault(), this.host.expanded = !0;
920
+ return;
921
+ }
922
+ if (j(e) && e.key === "Escape" && this.host.expanded) {
923
+ if (!this.host.canClose) return;
924
+ e.preventDefault(), this.host.expanded = !1;
925
+ }
938
926
  }
939
927
  }, this.host = e, e.addController(this);
940
928
  }
941
929
  hostConnected() {}
942
- }, gt = ".ga-side-navigation__switcher:focus{outline-offset:2px;outline:2px solid #3b82f6}", z = class extends e {
930
+ }, B = class extends e {
943
931
  constructor(...e) {
944
- super(...e), this.items = [], this.loading = !1, this._handleKeydown = (e) => {
945
- if (e.key === "Escape") {
932
+ super(...e), this.items = [], this.loading = !1, this.maxHeight = 0, this._handleKeydown = (e) => {
933
+ if (e.defaultPrevented) return;
934
+ if (j(e) && e.key === "Escape") {
946
935
  e.preventDefault(), this.dispatchEvent(new CustomEvent("close-request", {
947
936
  bubbles: !0,
948
937
  composed: !0
949
938
  }));
950
939
  return;
951
940
  }
952
- if (e.key === "Enter" || e.key === " ") {
941
+ if (j(e) && (e.key === "Enter" || e.key === " ")) {
953
942
  let t = e.target;
954
943
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__switcher-dropdown-item") && (e.preventDefault(), t.click());
955
944
  return;
956
945
  }
957
- if (e.key === "Tab" && !e.shiftKey) {
946
+ if (j(e) && e.key === "Tab") {
958
947
  let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item")), n = t[t.length - 1];
959
948
  n && e.target === n && this.dispatchEvent(new CustomEvent("tab-exit", {
960
949
  bubbles: !0,
@@ -962,7 +951,7 @@ var ht = class {
962
951
  }));
963
952
  return;
964
953
  }
965
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
954
+ if (A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
966
955
  e.preventDefault();
967
956
  let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item"));
968
957
  if (t.length === 0) return;
@@ -988,11 +977,11 @@ var ht = class {
988
977
  this.loading || this.querySelector(".ga-side-navigation__switcher-dropdown-item")?.focus();
989
978
  }
990
979
  _handleItemClick(e, t) {
991
- e.preventDefault(), this.dispatchEvent(new CustomEvent("item-select", {
980
+ A(e) || (e.preventDefault(), this.dispatchEvent(new CustomEvent("item-select", {
992
981
  detail: { id: t },
993
982
  bubbles: !0,
994
983
  composed: !0
995
- }));
984
+ })));
996
985
  }
997
986
  render() {
998
987
  return this.loading ? n`
@@ -1003,11 +992,12 @@ var ht = class {
1003
992
  <span class="vsn-spinner"></span>
1004
993
  </div>
1005
994
  ` : n`
1006
- <div class="ga-side-navigation__switcher-dropdown"
995
+ <div class="ga-side-navigation__switcher-dropdown ga-scroll"
1007
996
  role="menu"
1008
- aria-label=${Fe()}
997
+ style=${`max-height: ${Math.max(0, this.maxHeight)}px`}
998
+ aria-label=${Ie()}
1009
999
  @keydown=${this._handleKeydown}>
1010
- <span class="ga-side-navigation__switcher-dropdown-header">${Fe()}</span>
1000
+ <span class="ga-side-navigation__switcher-dropdown-header">${Ie()}</span>
1011
1001
  ${this.items.map((e) => n`
1012
1002
  <a class="ga-side-navigation__switcher-dropdown-item"
1013
1003
  href=${e.url ?? ""}
@@ -1020,59 +1010,10 @@ var ht = class {
1020
1010
  `;
1021
1011
  }
1022
1012
  };
1023
- N([s({ attribute: !1 })], z.prototype, "items", void 0), N([s({ type: Boolean })], z.prototype, "loading", void 0), z = N([S(), o("vsn-switcher-menu")], z);
1013
+ P([s({ attribute: !1 })], B.prototype, "items", void 0), P([s({ type: Boolean })], B.prototype, "loading", void 0), P([s({ attribute: !1 })], B.prototype, "maxHeight", void 0), B = P([S(), o("vsn-switcher-menu")], B);
1024
1014
  //#endregion
1025
- //#region src/components/vsn-side-bar/vsn-search/vsn-search.css.ts
1026
- var _t = t`
1027
- .vsn-search__trigger,
1028
- .vsn-search__clear {
1029
- display: inline-flex;
1030
- align-items: center;
1031
- background: none;
1032
- border: none;
1033
- padding: 0;
1034
- cursor: pointer;
1035
- flex-shrink: 0;
1036
- }
1037
-
1038
- .vsn-search__trigger {
1039
- color: var(--ga-color-icon-primary);
1040
- }
1041
-
1042
- .vsn-search__clear {
1043
- color: var(--ga-color-icon-action);
1044
- }
1045
-
1046
- .vsn-search__trigger:disabled {
1047
- cursor: default;
1048
- opacity: 0.5;
1049
- }
1050
-
1051
- .vsn-search__helper {
1052
- display: -webkit-box;
1053
- -webkit-box-orient: vertical;
1054
- -webkit-line-clamp: 3;
1055
- flex: 1 0 0;
1056
- max-width: 550px;
1057
- margin-inline: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
1058
- padding: 0 calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
1059
- overflow: hidden;
1060
- text-overflow: ellipsis;
1061
- font-family: var(--ga-font-family-primary);
1062
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1063
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1064
- font-weight: 400;
1065
- color: var(--ga-color-text-body);
1066
- }
1067
-
1068
- .ga-side-navigation__search input {
1069
- color: var(--ga-color-text-body);
1070
- }
1071
-
1072
- .ga-side-navigation__search input::placeholder {
1073
- color: var(--ga-color-text-disable-selected);
1074
- }
1075
- `, B = class extends e {
1015
+ //#region src/components/vsn-side-bar/vsn-search/vsn-search.ts
1016
+ var V = class extends e {
1076
1017
  constructor(...e) {
1077
1018
  super(...e), this.shortcut = "", this.value = "", this.loading = !1, this._emitSearch = () => {
1078
1019
  this._canSearch && this.dispatchEvent(new CustomEvent("vsn-search-submit", {
@@ -1080,22 +1021,18 @@ var _t = t`
1080
1021
  bubbles: !0,
1081
1022
  composed: !0
1082
1023
  }));
1083
- }, this._emitEscape = () => {
1084
- this.dispatchEvent(new CustomEvent("vsn-search-escape", {
1085
- detail: { value: this.value },
1024
+ }, this._emitSearchCleared = () => {
1025
+ this.dispatchEvent(new CustomEvent("vsn-search-cleared", {
1086
1026
  bubbles: !0,
1087
1027
  composed: !0
1088
1028
  }));
1089
1029
  }, this._handleEscape = (e) => {
1090
- e.key === "Escape" && this._emitEscape();
1030
+ e.defaultPrevented || j(e) && e.key === "Escape" && this.value.length > 0 && (e.preventDefault(), this._emitSearchCleared());
1091
1031
  };
1092
1032
  }
1093
1033
  createRenderRoot() {
1094
1034
  return this;
1095
1035
  }
1096
- static {
1097
- this.styles = [h, _t];
1098
- }
1099
1036
  focus() {
1100
1037
  let e = this.querySelector("input");
1101
1038
  e?.focus(), e?.select();
@@ -1112,7 +1049,7 @@ var _t = t`
1112
1049
  }));
1113
1050
  }
1114
1051
  _handleEnter(e) {
1115
- e.key === "Enter" && this._emitSearch();
1052
+ e.defaultPrevented || j(e) && e.key === "Enter" && this._emitSearch();
1116
1053
  }
1117
1054
  render() {
1118
1055
  let e = this.value.length > 0 && this.value.length < 3;
@@ -1124,16 +1061,17 @@ var _t = t`
1124
1061
  aria-label=${x("Search")}
1125
1062
  ?disabled=${!this._canSearch}
1126
1063
  @click=${this._emitSearch}>
1127
- ${j(rt, 24)}
1064
+ ${M(at, 24)}
1128
1065
  </button>
1129
1066
  <input type="search"
1130
- .placeholder=${Ie()}
1131
- .value=${this.value}
1132
- @input=${this._handleInput}
1133
- @keydown=${this._handleEnter} />
1067
+ .placeholder=${Le()}
1068
+ .value=${this.value}
1069
+ @input=${this._handleInput}
1070
+ @keydown=${this._handleEnter}/>
1134
1071
  ${this._trailingSlot()}
1135
1072
  </div>
1136
- ${u(e, () => n`<div class="vsn-search__helper">${Re(3)}</div>`)}
1073
+ ${u(e, () => n`
1074
+ <div class="vsn-search__helper">${ze(3)}</div>`)}
1137
1075
  `;
1138
1076
  }
1139
1077
  _trailingSlot() {
@@ -1150,8 +1088,8 @@ var _t = t`
1150
1088
  _clearButton() {
1151
1089
  return n`
1152
1090
  <button class="vsn-search__clear" aria-label=${x("Clear search")}
1153
- @click=${this._emitEscape}>
1154
- ${j(it, 16)}
1091
+ @click=${this._emitSearchCleared}>
1092
+ ${M(ot, 16)}
1155
1093
  </button>
1156
1094
  `;
1157
1095
  }
@@ -1159,18 +1097,15 @@ var _t = t`
1159
1097
  return n`<kbd class="ga-side-navigation__search-shortcut">${this.shortcut}</kbd>`;
1160
1098
  }
1161
1099
  };
1162
- N([s()], B.prototype, "shortcut", void 0), N([s()], B.prototype, "value", void 0), N([s({ type: Boolean })], B.prototype, "loading", void 0), B = N([S(), o("vsn-search")], B);
1100
+ P([s()], V.prototype, "shortcut", void 0), P([s()], V.prototype, "value", void 0), P([s({ type: Boolean })], V.prototype, "loading", void 0), V = P([S(), o("vsn-search")], V);
1163
1101
  //#endregion
1164
1102
  //#region src/components/vsn-side-bar/vsn-header/vsn-header.ts
1165
- var V = class extends e {
1103
+ var H = class extends e {
1166
1104
  createRenderRoot() {
1167
1105
  return this;
1168
1106
  }
1169
- static {
1170
- this.styles = [h, a(gt)];
1171
- }
1172
1107
  constructor() {
1173
- super(), this.modules = [], this.modulesLoading = !1, this.hasMenu = !1, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new ht(this), new lt(this, [".ga-side-navigation__switcher-dropdown", ".ga-side-navigation__switcher"], () => {
1108
+ super(), this.modules = [], this.modulesLoading = !1, this.hasMenu = !1, this.moduleSwitcherMaxHeight = 0, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new gt(this), new dt(this, [".ga-side-navigation__switcher-dropdown", ".ga-side-navigation__switcher"], () => {
1174
1109
  this.canClose && (this.expanded = !1);
1175
1110
  });
1176
1111
  }
@@ -1188,29 +1123,28 @@ var V = class extends e {
1188
1123
  @keydown=${this._keyboard.onSwitcherKeydown}
1189
1124
  title="">
1190
1125
  <span class="ga-side-navigation__switcher-title">${e.title}</span>
1191
- ${u(this.canClose, () => n`
1192
- <span class="ga-side-navigation__switcher-action">
1193
- ${this.expanded ? j(M, 16) : j(tt, 16)}
1194
- </span>
1195
- `)}
1126
+ <span class="ga-side-navigation__switcher-action">
1127
+ ${this.canClose ? this.expanded ? M(N, 16) : M(rt, 16) : M(Ke, 16)}
1128
+ </span>
1196
1129
  </div>
1197
1130
 
1198
1131
  ${u(this.expanded, () => n`
1199
1132
  <vsn-switcher-menu
1200
- .items=${e.kind === "loading" ? [] : e.available}
1201
- .loading=${e.kind === "loading"}
1202
- @item-select=${this._onItemSelect}
1203
- @close-request=${this._onCloseRequest}
1204
- @focus-switcher=${this._onFocusSwitcher}
1205
- @tab-exit=${this._onTabExit}>
1133
+ .items=${e.kind === "loading" ? [] : e.available}
1134
+ .loading=${e.kind === "loading"}
1135
+ .maxHeight=${this.moduleSwitcherMaxHeight}
1136
+ @item-select=${this._onItemSelect}
1137
+ @close-request=${this._onCloseRequest}
1138
+ @focus-switcher=${this._onFocusSwitcher}
1139
+ @tab-exit=${this._onTabExit}>
1206
1140
  </vsn-switcher-menu>`)}
1207
1141
  </div>
1208
1142
 
1209
1143
  ${u(this.search?.enabled, () => n`
1210
1144
  <vsn-search
1211
- .shortcut=${this.search?.shortcut ?? Le()}
1212
- .value=${this.searchValue}
1213
- .loading=${this.searchLoading}>
1145
+ .shortcut=${Re()}
1146
+ .value=${this.searchValue}
1147
+ .loading=${this.searchLoading}>
1214
1148
  </vsn-search>`)}
1215
1149
  </div>
1216
1150
  `;
@@ -1218,7 +1152,7 @@ var V = class extends e {
1218
1152
  get _state() {
1219
1153
  if (this.modulesLoading) return {
1220
1154
  kind: "loading",
1221
- title: this.activeModuleLabel || Ve()
1155
+ title: this.activeModuleLabel || He()
1222
1156
  };
1223
1157
  let e = this.modules.find((e) => e.id === this.activeModuleId);
1224
1158
  return e ? {
@@ -1227,7 +1161,7 @@ var V = class extends e {
1227
1161
  available: this.modules.filter((t) => t.id !== e.id)
1228
1162
  } : {
1229
1163
  kind: "no-active",
1230
- title: Ve(),
1164
+ title: He(),
1231
1165
  available: this.modules
1232
1166
  };
1233
1167
  }
@@ -1271,85 +1205,16 @@ var V = class extends e {
1271
1205
  this.canClose && (this.expanded = !1);
1272
1206
  }
1273
1207
  };
1274
- N([s({ attribute: !1 })], V.prototype, "modules", void 0), N([s()], V.prototype, "activeModuleId", void 0), N([s()], V.prototype, "activeModuleLabel", void 0), N([s({ type: Boolean })], V.prototype, "modulesLoading", void 0), N([s({ type: Boolean })], V.prototype, "hasMenu", void 0), N([s({ attribute: !1 })], V.prototype, "search", void 0), N([s()], V.prototype, "searchValue", void 0), N([s({ type: Boolean })], V.prototype, "searchLoading", void 0), N([s({
1208
+ P([s({ attribute: !1 })], H.prototype, "modules", void 0), P([s()], H.prototype, "activeModuleId", void 0), P([s()], H.prototype, "activeModuleLabel", void 0), P([s({ type: Boolean })], H.prototype, "modulesLoading", void 0), P([s({ type: Boolean })], H.prototype, "hasMenu", void 0), P([s({ attribute: !1 })], H.prototype, "moduleSwitcherMaxHeight", void 0), P([s({ attribute: !1 })], H.prototype, "search", void 0), P([s()], H.prototype, "searchValue", void 0), P([s({ type: Boolean })], H.prototype, "searchLoading", void 0), P([s({
1275
1209
  type: Boolean,
1276
1210
  reflect: !0
1277
- })], V.prototype, "expanded", void 0), V = N([S(), o("vsn-header")], V);
1211
+ })], H.prototype, "expanded", void 0), H = P([S(), o("vsn-header")], H);
1278
1212
  //#endregion
1279
- //#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.css.ts
1280
- var vt = t`
1281
- .vsn-search-results__empty {
1282
- display: flex;
1283
- flex-direction: column;
1284
- align-items: center;
1285
- padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
1286
- text-align: center;
1287
- gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1288
- }
1289
-
1290
- .vsn-search-results__empty-title {
1291
- font-family: var(--ga-font-family-primary);
1292
- font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1293
- line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1294
- font-weight: 600;
1295
- margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1296
- }
1297
-
1298
- .vsn-search-results__empty-message,
1299
- .vsn-search-results__empty-hint {
1300
- font-family: var(--ga-font-family-primary);
1301
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1302
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1303
- font-weight: 400;
1304
- color: var(--ga-color-text-disable-selected);
1305
- }
1306
-
1307
- .vsn-search-results__empty-support {
1308
- margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
1309
- font-family: var(--ga-font-family-primary);
1310
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1311
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1312
- font-weight: 400;
1313
- color: var(--ga-color-text-on-disabled);
1314
- }
1315
-
1316
- .vsn-search-results__error {
1317
- display: flex;
1318
- flex-direction: column;
1319
- align-items: center;
1320
- padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
1321
- text-align: center;
1322
- font-family: var(--ga-font-family-primary);
1323
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1324
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1325
- font-weight: 400;
1326
- color: var(--ga-color-text-body);
1327
- }
1328
-
1329
- .vsn-search-results__load-more {
1330
- width: 100%;
1331
- padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 4 * var(--ga-base-scaling-factor, 1));
1332
- background: none;
1333
- border: none;
1334
- cursor: pointer;
1335
- color: var(--ga-color-text-action);
1336
- text-align: center;
1337
- font-family: var(--ga-font-family-primary);
1338
- font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1339
- font-style: normal;
1340
- font-weight: 500;
1341
- line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1342
- letter-spacing: var(--ga-text-md-letter-spacing);
1343
- }
1344
-
1345
- .vsn-search-results__load-more:disabled {
1346
- cursor: not-allowed;
1347
- opacity: 0.5;
1348
- }
1349
- `, yt = class {
1213
+ //#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.keyboard.ts
1214
+ var _t = class {
1350
1215
  constructor(e) {
1351
1216
  this.onResultsKeydown = (e) => {
1352
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1217
+ if (e.defaultPrevented || A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1353
1218
  e.preventDefault();
1354
1219
  let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__search-results-item"));
1355
1220
  if (t.length === 0) return;
@@ -1360,16 +1225,13 @@ var vt = t`
1360
1225
  }, this.host = e, e.addController(this);
1361
1226
  }
1362
1227
  hostConnected() {}
1363
- }, H = class extends e {
1228
+ }, U = class extends e {
1364
1229
  constructor(...e) {
1365
- super(...e), this.loadingMore = !1, this._keyboard = new yt(this);
1230
+ super(...e), this.loadingMore = !1, this._keyboard = new _t(this);
1366
1231
  }
1367
1232
  createRenderRoot() {
1368
1233
  return this;
1369
1234
  }
1370
- static {
1371
- this.styles = [h, vt];
1372
- }
1373
1235
  render() {
1374
1236
  return this.errorMessage ? this._errorState(this.errorMessage) : this.results === void 0 ? n`${r}` : this.results.length === 0 ? this._emptyState() : this._resultsList(this.results);
1375
1237
  }
@@ -1393,7 +1255,8 @@ var vt = t`
1393
1255
  _resultsList(e) {
1394
1256
  let t = e.length;
1395
1257
  return n`
1396
- <div class="ga-side-navigation__body h-full" @keydown=${this._keyboard.onResultsKeydown}>
1258
+ <div class="ga-side-navigation__body h-full ga-scroll"
1259
+ @keydown=${this._keyboard.onResultsKeydown}>
1397
1260
  <div class="ga-side-navigation__search-results-title">
1398
1261
  ${x(t === 1 ? b`${t} result` : b`${t} results`)}
1399
1262
  </div>
@@ -1404,7 +1267,7 @@ var vt = t`
1404
1267
  class="vsn-search-results__load-more"
1405
1268
  ?disabled=${this.loadingMore}
1406
1269
  @click=${this._onLoadMore}>
1407
- ${Be(30)}
1270
+ ${Ve(30)}
1408
1271
  </button>
1409
1272
  `)}
1410
1273
  </div>
@@ -1439,44 +1302,26 @@ var vt = t`
1439
1302
  }));
1440
1303
  }
1441
1304
  };
1442
- N([s({ attribute: !1 })], H.prototype, "results", void 0), N([s()], H.prototype, "errorMessage", void 0), N([s()], H.prototype, "nextCursor", void 0), N([s({ type: Boolean })], H.prototype, "loadingMore", void 0), H = N([S(), o("vsn-search-results")], H);
1305
+ P([s({ attribute: !1 })], U.prototype, "results", void 0), P([s()], U.prototype, "errorMessage", void 0), P([s()], U.prototype, "nextCursor", void 0), P([s({ type: Boolean })], U.prototype, "loadingMore", void 0), U = P([S(), o("vsn-search-results")], U);
1443
1306
  //#endregion
1444
- //#region src/components/vsn-side-bar/vsn-template/vsn-template.css.ts
1445
- var bt = t`
1446
- .vsn-template__row {
1447
- display: flex;
1448
- flex-direction: column;
1449
- align-items: flex-start;
1450
- align-self: stretch;
1451
- padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) 0;
1452
- }
1453
-
1454
- .vsn-template__bar {
1455
- height: calc(1rem * var(--ga-base-scaling-factor, 1));
1456
- border-radius: var(--ga-radius);
1457
- background: var(--ga-color-miscellaneous-skeleton-element, #F2F3F5);
1458
- flex-shrink: 0;
1459
- }
1460
- `, xt = [
1307
+ //#region src/components/vsn-side-bar/vsn-template/vsn-template.ts
1308
+ var vt = [
1461
1309
  160,
1462
1310
  96,
1463
1311
  144,
1464
1312
  192,
1465
1313
  160
1466
- ], St = class extends e {
1314
+ ], yt = class extends e {
1467
1315
  createRenderRoot() {
1468
1316
  return this;
1469
1317
  }
1470
- static {
1471
- this.styles = [h, bt];
1472
- }
1473
1318
  render() {
1474
1319
  return n`
1475
1320
  <div class="ga-side-navigation__body h-full"
1476
- role="status"
1477
- aria-busy="true"
1478
- aria-label=${x("Loading results")}>
1479
- ${xt.map((e) => n`
1321
+ role="status"
1322
+ aria-busy="true"
1323
+ aria-label=${x("Loading results")}>
1324
+ ${vt.map((e) => n`
1480
1325
  <div class="vsn-template__row">
1481
1326
  <div class="vsn-template__bar" style="width: ${e}px"></div>
1482
1327
  </div>
@@ -1485,59 +1330,17 @@ var bt = t`
1485
1330
  `;
1486
1331
  }
1487
1332
  };
1488
- St = N([S(), o("vsn-template")], St);
1333
+ yt = P([S(), o("vsn-template")], yt);
1489
1334
  //#endregion
1490
- //#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.css.ts
1491
- var Ct = t`
1492
- .vsn-error-state {
1493
- display: flex;
1494
- flex-direction: column;
1495
- align-items: flex-start;
1496
- padding: calc(1.5rem * var(--ga-base-scaling-factor, 1)) calc(1rem * var(--ga-base-scaling-factor, 1));
1497
- gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1498
- }
1499
-
1500
- .vsn-error-state__icon {
1501
- display: inline-flex;
1502
- color: var(--ga-color-icon-error);
1503
- margin-bottom: calc(0.5rem * var(--ga-base-scaling-factor, 1));
1504
- }
1505
-
1506
- .vsn-error-state__title {
1507
- font-family: var(--ga-font-family-primary);
1508
- font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1509
- line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1510
- font-weight: 600;
1511
- margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1512
- }
1513
-
1514
- .vsn-error-state__message,
1515
- .vsn-error-state__hint {
1516
- font-family: var(--ga-font-family-primary);
1517
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1518
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1519
- font-weight: 400;
1520
- }
1521
-
1522
- .vsn-error-state__support {
1523
- margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
1524
- font-family: var(--ga-font-family-primary);
1525
- font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1526
- line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1527
- font-weight: 400;
1528
- color: var(--ga-color-text-on-disabled);
1529
- }
1530
- `, wt = class extends e {
1335
+ //#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.ts
1336
+ var bt = class extends e {
1531
1337
  createRenderRoot() {
1532
1338
  return this;
1533
1339
  }
1534
- static {
1535
- this.styles = [h, Ct];
1536
- }
1537
1340
  render() {
1538
1341
  return n`
1539
1342
  <div class="vsn-error-state" role="alert" aria-live="assertive">
1540
- <div class="vsn-error-state__icon">${j(at, 24)}</div>
1343
+ <div class="vsn-error-state__icon">${M(st, 24)}</div>
1541
1344
  <div class="vsn-error-state__title">${x("Loading error")}</div>
1542
1345
  <div class="vsn-error-state__message">${x("We're unable to load the menu.")}</div>
1543
1346
  <div class="vsn-error-state__hint">${x("Please check your internet connection and try again.")}</div>
@@ -1546,43 +1349,19 @@ var Ct = t`
1546
1349
  `;
1547
1350
  }
1548
1351
  };
1549
- wt = N([S(), o("vsn-error-state")], wt);
1352
+ bt = P([S(), o("vsn-error-state")], bt);
1550
1353
  //#endregion
1551
- //#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.css.ts
1552
- var Tt = t`
1553
- @layer components {
1554
- vsn-search-scopes {
1555
- display: block;
1556
- flex-shrink: 0;
1557
- padding: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
1558
- }
1559
-
1560
- vsn-search-scopes .ga-radio-group {
1561
- gap: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
1562
- }
1563
-
1564
- vsn-search-scopes .ga-radio-button__label {
1565
- line-height: calc(0.25rem * 6 * var(--ga-base-scaling-factor, 1));
1566
- display: -webkit-box;
1567
- -webkit-box-orient: vertical;
1568
- -webkit-line-clamp: 1;
1569
- overflow: hidden;
1570
- text-overflow: ellipsis;
1571
- }
1572
- }
1573
- `, U, W = class extends e {
1354
+ //#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.ts
1355
+ var W, G = class extends e {
1574
1356
  static {
1575
- U = this;
1357
+ W = this;
1576
1358
  }
1577
1359
  constructor(...e) {
1578
- super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++U._counter}`;
1360
+ super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++W._counter}`;
1579
1361
  }
1580
1362
  createRenderRoot() {
1581
1363
  return this;
1582
1364
  }
1583
- static {
1584
- this.styles = [h, Tt];
1585
- }
1586
1365
  static {
1587
1366
  this._counter = 0;
1588
1367
  }
@@ -1617,16 +1396,16 @@ var Tt = t`
1617
1396
  }));
1618
1397
  }
1619
1398
  };
1620
- N([s({ attribute: !1 })], W.prototype, "scopes", void 0), N([s()], W.prototype, "selectedScopeId", void 0), W = U = N([S(), o("vsn-search-scopes")], W);
1399
+ P([s({ attribute: !1 })], G.prototype, "scopes", void 0), P([s()], G.prototype, "selectedScopeId", void 0), G = W = P([S(), o("vsn-search-scopes")], G);
1621
1400
  //#endregion
1622
1401
  //#region src/shared/lang/locale-codes.ts
1623
- var Et = "en", Dt = [
1402
+ var xt = "en", St = [
1624
1403
  "da",
1625
1404
  "fi",
1626
1405
  "nl",
1627
1406
  "no",
1628
1407
  "sv"
1629
- ], Ot = /* @__PURE__ */ p({ templates: () => kt }), kt = {
1408
+ ], Ct = /* @__PURE__ */ p({ templates: () => wt }), wt = {
1630
1409
  s09a45db408570a7a: "Min profil",
1631
1410
  s119f9875b7d4cdfc: "Har du brug for hjælp? Kontakt support.",
1632
1411
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1656,7 +1435,7 @@ var Et = "en", Dt = [
1656
1435
  sfbf31f663cef6cc2: "Prøv andre søgeord eller tjek stavningen.",
1657
1436
  s7c510419ea376840: "VSN",
1658
1437
  s38385cd359b17f7a: "Loading modules"
1659
- }, At = /* @__PURE__ */ p({ templates: () => jt }), jt = {
1438
+ }, Tt = /* @__PURE__ */ p({ templates: () => Et }), Et = {
1660
1439
  s09a45db408570a7a: "Oma profiili",
1661
1440
  s119f9875b7d4cdfc: "Tarvitsetko apua? Ota yhteyttä tukeen.",
1662
1441
  s1228605ee65ddefa: b`${0} tulos`,
@@ -1686,7 +1465,7 @@ var Et = "en", Dt = [
1686
1465
  sfbf31f663cef6cc2: "Kokeile eri hakusanoja tai tarkista kirjoitusasu.",
1687
1466
  s7c510419ea376840: "VSN",
1688
1467
  s38385cd359b17f7a: "Loading modules"
1689
- }, Mt = /* @__PURE__ */ p({ templates: () => Nt }), Nt = {
1468
+ }, Dt = /* @__PURE__ */ p({ templates: () => Ot }), Ot = {
1690
1469
  s09a45db408570a7a: "Mijn profiel",
1691
1470
  s119f9875b7d4cdfc: "Hulp nodig? Neem contact op met ondersteuning.",
1692
1471
  s1228605ee65ddefa: b`${0} resultaat`,
@@ -1716,7 +1495,7 @@ var Et = "en", Dt = [
1716
1495
  sfbf31f663cef6cc2: "Probeer andere zoekwoorden of controleer de spelling.",
1717
1496
  s7c510419ea376840: "VSN",
1718
1497
  s38385cd359b17f7a: "Loading modules"
1719
- }, Pt = /* @__PURE__ */ p({ templates: () => Ft }), Ft = {
1498
+ }, kt = /* @__PURE__ */ p({ templates: () => At }), At = {
1720
1499
  s09a45db408570a7a: "Min profil",
1721
1500
  s119f9875b7d4cdfc: "Trenger du hjelp? Kontakt støtte.",
1722
1501
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1746,7 +1525,7 @@ var Et = "en", Dt = [
1746
1525
  sfbf31f663cef6cc2: "Prøv andre søkeord eller sjekk stavemåten.",
1747
1526
  s7c510419ea376840: "VSN",
1748
1527
  s38385cd359b17f7a: "Loading modules"
1749
- }, It = /* @__PURE__ */ p({ templates: () => Lt }), Lt = {
1528
+ }, jt = /* @__PURE__ */ p({ templates: () => Mt }), Mt = {
1750
1529
  s09a45db408570a7a: "Min profil",
1751
1530
  s119f9875b7d4cdfc: "Behöver du hjälp? Kontakta support.",
1752
1531
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1776,31 +1555,260 @@ var Et = "en", Dt = [
1776
1555
  sfbf31f663cef6cc2: "Prova andra sökord eller kontrollera stavningen.",
1777
1556
  s7c510419ea376840: "VSN",
1778
1557
  s38385cd359b17f7a: "Loading modules"
1779
- }, Rt = {
1780
- da: Ot,
1781
- fi: At,
1782
- nl: Mt,
1783
- no: Pt,
1784
- sv: It
1785
- }, { getLocale: zt, setLocale: Bt } = Ae({
1786
- sourceLocale: Et,
1787
- targetLocales: Dt,
1788
- loadLocale: (e) => Rt[e] ? Promise.resolve(Rt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1789
- }), Vt = t`
1558
+ }, Nt = {
1559
+ da: Ct,
1560
+ fi: Tt,
1561
+ nl: Dt,
1562
+ no: kt,
1563
+ sv: jt
1564
+ }, { getLocale: Pt, setLocale: Ft } = je({
1565
+ sourceLocale: xt,
1566
+ targetLocales: St,
1567
+ loadLocale: (e) => Nt[e] ? Promise.resolve(Nt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1568
+ }), It = t`
1569
+ @layer components {
1570
+ :where(.ga-side-navigation__user),
1571
+ :where(.ga-side-navigation__footer-dropdown-item) {
1572
+ width: 100%;
1573
+ cursor: pointer;
1574
+ }
1575
+
1576
+ .ga-side-navigation__footer-dropdown-item:focus-visible {
1577
+ outline: 2px solid var(--ga-color-border-focus);
1578
+ outline-offset: 4px;
1579
+ }
1580
+
1581
+ .vsn-side-navigation__user-info {
1582
+ display: flex;
1583
+ flex-direction: column;
1584
+ flex: 1;
1585
+ min-width: 0;
1586
+ }
1587
+
1588
+ .vsn-side-navigation__user-info > .ga-side-navigation__user-name {
1589
+ flex: initial;
1590
+ }
1591
+
1592
+ .vsn-side-navigation__user-email {
1593
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1594
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1595
+ font-weight: 400;
1596
+ }
1597
+
1598
+ .vsn-side-navigation__user-avatar--icon {
1599
+ display: inline-flex;
1600
+ align-items: center;
1601
+ justify-content: center;
1602
+ }
1603
+ }
1604
+ `, Lt = t`
1605
+ @layer components {
1606
+ .vsn-switcher-anchor {
1607
+ position: relative;
1608
+ }
1609
+
1610
+ .ga-side-navigation__switcher-dropdown {
1611
+ position: absolute;
1612
+ top: 100%;
1613
+ left: 0;
1614
+ right: 0;
1615
+ z-index: 10;
1616
+ }
1617
+ }
1618
+ `, Rt = t`
1619
+ .vsn-search__trigger,
1620
+ .vsn-search__clear {
1621
+ display: inline-flex;
1622
+ align-items: center;
1623
+ background: none;
1624
+ border: none;
1625
+ padding: 0;
1626
+ cursor: pointer;
1627
+ flex-shrink: 0;
1628
+ }
1629
+
1630
+ .vsn-search__trigger {
1631
+ color: var(--ga-color-icon-primary);
1632
+ }
1633
+
1634
+ .vsn-search__clear {
1635
+ color: var(--ga-color-icon-action);
1636
+ }
1637
+
1638
+ .vsn-search__trigger:disabled {
1639
+ cursor: default;
1640
+ opacity: 0.5;
1641
+ }
1642
+
1643
+ .vsn-search__helper {
1644
+ display: -webkit-box;
1645
+ -webkit-box-orient: vertical;
1646
+ -webkit-line-clamp: 3;
1647
+ flex: 1 0 0;
1648
+ max-width: 550px;
1649
+ margin-inline: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
1650
+ padding: 0 calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
1651
+ overflow: hidden;
1652
+ text-overflow: ellipsis;
1653
+ font-family: var(--ga-font-family-primary);
1654
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1655
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1656
+ font-weight: 400;
1657
+ color: var(--ga-color-text-body);
1658
+ }
1659
+
1660
+ .ga-side-navigation__search input {
1661
+ color: var(--ga-color-text-body);
1662
+ }
1663
+
1664
+ .ga-side-navigation__search input::placeholder {
1665
+ color: var(--ga-color-text-disable-selected);
1666
+ }
1667
+ `, zt = t`
1668
+ .vsn-search-results__empty {
1669
+ display: flex;
1670
+ flex-direction: column;
1671
+ align-items: center;
1672
+ padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
1673
+ text-align: center;
1674
+ gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1675
+ }
1676
+
1677
+ .vsn-search-results__empty-title {
1678
+ font-family: var(--ga-font-family-primary);
1679
+ font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1680
+ line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1681
+ font-weight: 600;
1682
+ margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1683
+ }
1684
+
1685
+ .vsn-search-results__empty-message,
1686
+ .vsn-search-results__empty-hint {
1687
+ font-family: var(--ga-font-family-primary);
1688
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1689
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1690
+ font-weight: 400;
1691
+ color: var(--ga-color-text-disable-selected);
1692
+ }
1693
+
1694
+ .vsn-search-results__empty-support {
1695
+ margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
1696
+ font-family: var(--ga-font-family-primary);
1697
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1698
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1699
+ font-weight: 400;
1700
+ color: var(--ga-color-text-on-disabled);
1701
+ }
1702
+
1703
+ .vsn-search-results__error {
1704
+ display: flex;
1705
+ flex-direction: column;
1706
+ align-items: center;
1707
+ padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
1708
+ text-align: center;
1709
+ font-family: var(--ga-font-family-primary);
1710
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1711
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1712
+ font-weight: 400;
1713
+ color: var(--ga-color-text-body);
1714
+ }
1715
+
1716
+ .vsn-search-results__load-more {
1717
+ width: 100%;
1718
+ padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 4 * var(--ga-base-scaling-factor, 1));
1719
+ background: none;
1720
+ border: none;
1721
+ cursor: pointer;
1722
+ color: var(--ga-color-text-action);
1723
+ text-align: center;
1724
+ font-family: var(--ga-font-family-primary);
1725
+ font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1726
+ font-style: normal;
1727
+ font-weight: 500;
1728
+ line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1729
+ letter-spacing: var(--ga-text-md-letter-spacing);
1730
+ }
1731
+
1732
+ .vsn-search-results__load-more:disabled {
1733
+ cursor: not-allowed;
1734
+ opacity: 0.5;
1735
+ }
1736
+ `, Bt = t`
1790
1737
  @layer components {
1791
- .vsn-switcher-anchor {
1792
- position: relative;
1738
+ vsn-search-scopes {
1739
+ display: block;
1740
+ flex-shrink: 0;
1741
+ padding: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
1793
1742
  }
1794
1743
 
1795
- .ga-side-navigation__switcher-dropdown {
1796
- position: absolute;
1797
- top: 100%;
1798
- left: 0;
1799
- right: 0;
1800
- z-index: 10;
1744
+ vsn-search-scopes .ga-radio-group {
1745
+ gap: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
1746
+ }
1747
+
1748
+ vsn-search-scopes .ga-radio-button__label {
1749
+ line-height: calc(0.25rem * 6 * var(--ga-base-scaling-factor, 1));
1750
+ display: -webkit-box;
1751
+ -webkit-box-orient: vertical;
1752
+ -webkit-line-clamp: 1;
1753
+ overflow: hidden;
1754
+ text-overflow: ellipsis;
1801
1755
  }
1802
1756
  }
1757
+ `, Vt = t`
1758
+ .vsn-template__row {
1759
+ display: flex;
1760
+ flex-direction: column;
1761
+ align-items: flex-start;
1762
+ align-self: stretch;
1763
+ padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) 0;
1764
+ }
1765
+
1766
+ .vsn-template__bar {
1767
+ height: calc(1rem * var(--ga-base-scaling-factor, 1));
1768
+ border-radius: var(--ga-radius);
1769
+ background: var(--ga-color-miscellaneous-skeleton-element, #F2F3F5);
1770
+ flex-shrink: 0;
1771
+ }
1803
1772
  `, Ht = t`
1773
+ .vsn-error-state {
1774
+ display: flex;
1775
+ flex-direction: column;
1776
+ align-items: flex-start;
1777
+ padding: calc(1.5rem * var(--ga-base-scaling-factor, 1)) calc(1rem * var(--ga-base-scaling-factor, 1));
1778
+ gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1779
+ }
1780
+
1781
+ .vsn-error-state__icon {
1782
+ display: inline-flex;
1783
+ color: var(--ga-color-icon-error);
1784
+ margin-bottom: calc(0.5rem * var(--ga-base-scaling-factor, 1));
1785
+ }
1786
+
1787
+ .vsn-error-state__title {
1788
+ font-family: var(--ga-font-family-primary);
1789
+ font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
1790
+ line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
1791
+ font-weight: 600;
1792
+ margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
1793
+ }
1794
+
1795
+ .vsn-error-state__message,
1796
+ .vsn-error-state__hint {
1797
+ font-family: var(--ga-font-family-primary);
1798
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1799
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1800
+ font-weight: 400;
1801
+ }
1802
+
1803
+ .vsn-error-state__support {
1804
+ margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
1805
+ font-family: var(--ga-font-family-primary);
1806
+ font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
1807
+ line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
1808
+ font-weight: 400;
1809
+ color: var(--ga-color-text-on-disabled);
1810
+ }
1811
+ `, Ut = t`
1804
1812
  .vsn-spinner {
1805
1813
  display: inline-block;
1806
1814
  flex-shrink: 0;
@@ -1820,7 +1828,7 @@ var Et = "en", Dt = [
1820
1828
  @keyframes vsn-spin {
1821
1829
  to { transform: rotate(360deg); }
1822
1830
  }
1823
- `, Ut = class {
1831
+ `, Wt = class {
1824
1832
  constructor(e, t, n) {
1825
1833
  this._onHostClick = (e) => {
1826
1834
  let t = this._host.renderRoot.querySelector(this._clickedSelector);
@@ -1833,14 +1841,14 @@ var Et = "en", Dt = [
1833
1841
  hostDisconnected() {
1834
1842
  this._host.removeEventListener("click", this._onHostClick);
1835
1843
  }
1836
- }, Wt = "button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])", Gt = class {
1844
+ }, Gt = "button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])", Kt = class {
1837
1845
  constructor(e) {
1838
1846
  this.onKeydown = (e) => {
1839
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1847
+ if (e.defaultPrevented || A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1840
1848
  let t = this.host.renderRoot.querySelector("slot[name=\"nav-footer\"]");
1841
1849
  if (!t) return;
1842
1850
  let n = [];
1843
- for (let e of t.assignedElements({ flatten: !0 })) e.matches(Wt) && n.push(e), n.push(...Array.from(e.querySelectorAll(Wt)));
1851
+ for (let e of t.assignedElements({ flatten: !0 })) e.matches(Gt) && n.push(e), n.push(...Array.from(e.querySelectorAll(Gt)));
1844
1852
  if (n.length === 0) return;
1845
1853
  let r = e.composedPath()[0];
1846
1854
  if (!(r instanceof HTMLElement)) return;
@@ -1852,18 +1860,24 @@ var Et = "en", Dt = [
1852
1860
  }, this.host = e, e.addController(this);
1853
1861
  }
1854
1862
  hostConnected() {}
1855
- }, G = class extends e {
1863
+ }, K = t`
1864
+ .ga-scroll {
1865
+ scrollbar-color: var(--ga-color-text-disabled) var(--ga-color-surface-page);
1866
+ scrollbar-width: thin;
1867
+ }
1868
+ `, q = class extends e {
1856
1869
  static {
1857
1870
  this.styles = [
1858
1871
  h,
1872
+ K,
1873
+ Lt,
1874
+ It,
1875
+ Rt,
1876
+ zt,
1877
+ Bt,
1859
1878
  Vt,
1860
- ut,
1861
- _t,
1862
- vt,
1863
- Tt,
1864
- bt,
1865
- Ct,
1866
1879
  Ht,
1880
+ Ut,
1867
1881
  t`
1868
1882
  :host {
1869
1883
  position: absolute;
@@ -1878,7 +1892,7 @@ var Et = "en", Dt = [
1878
1892
  ];
1879
1893
  }
1880
1894
  constructor() {
1881
- 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._navFooterKeyboard = new Gt(this), this._onNavigate = (e) => {
1895
+ 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._moduleSwitcherMaxHeight = 0, this._navFooterKeyboard = new Kt(this), this._onNavigate = (e) => {
1882
1896
  this._searchQuery = "", this._searchResults = void 0, this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1883
1897
  bubbles: !0,
1884
1898
  composed: !0
@@ -1895,13 +1909,18 @@ var Et = "en", Dt = [
1895
1909
  }));
1896
1910
  }, this._onScopeChanged = (e) => {
1897
1911
  this._activeScopeId = e.detail.scopeId, this._runSearch(this._searchQuery, this._activeScopeId);
1898
- }, new Ut(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1912
+ }, new Wt(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1899
1913
  bubbles: !0,
1900
1914
  composed: !0
1901
- })));
1915
+ }))), this._resizeObserver = new ResizeObserver((e) => {
1916
+ this._observeMenuSize(e);
1917
+ }), this._resizeObserver.observe(this);
1918
+ }
1919
+ _observeMenuSize(e) {
1920
+ this._moduleSwitcherMaxHeight = Math.max(0, e[0].contentRect.height - 134);
1902
1921
  }
1903
1922
  willUpdate(e) {
1904
- e.has("lang") && Bt(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());
1923
+ 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());
1905
1924
  }
1906
1925
  async focusSearch() {
1907
1926
  await this.updateComplete, this.menu?.search?.enabled && this.renderRoot.querySelector("vsn-search")?.focus();
@@ -1912,11 +1931,8 @@ var Et = "en", Dt = [
1912
1931
  _onSearchSubmit(e) {
1913
1932
  this._runSearch(e.detail.query, this._activeScopeId);
1914
1933
  }
1915
- _onSearchEscape(e) {
1916
- e.detail.value.length > 0 ? (this._searchQuery = "", this._clearSearchState(), this.focusSearch()) : this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1917
- bubbles: !0,
1918
- composed: !0
1919
- }));
1934
+ _onSearchCleared() {
1935
+ this._searchQuery = "", this._clearSearchState(), this.focusSearch();
1920
1936
  }
1921
1937
  _clearSearchState() {
1922
1938
  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;
@@ -2002,43 +2018,48 @@ var Et = "en", Dt = [
2002
2018
  ${this.header()}
2003
2019
  ${this.scopesGroup()}
2004
2020
  ${e === "error" ? this.errorState() : e === "loading" ? this.loadingState() : e === "results" ? this.searchResults() : this.renderMenu(this.menu)}
2005
- ${e === "menu" ? n`<slot name="nav-footer"></slot>` : n``}
2021
+ ${e === "menu" ? n`
2022
+ <slot name="nav-footer"></slot>` : n``}
2006
2023
  ${this.auth ? this.footer(this.auth) : ""}
2007
2024
  </div>
2008
2025
  `;
2009
2026
  }
2010
2027
  searchResults() {
2011
- return n`<vsn-search-results
2012
- class="flex-1 min-h-0"
2013
- .results=${this._searchResults}
2014
- .errorMessage=${this._searchError}
2015
- .nextCursor=${this._searchNextCursor}
2016
- .loadingMore=${this._searchLoadingMore}>
2017
- </vsn-search-results>`;
2028
+ return n`
2029
+ <vsn-search-results
2030
+ class="flex-1 min-h-0"
2031
+ .results=${this._searchResults}
2032
+ .errorMessage=${this._searchError}
2033
+ .nextCursor=${this._searchNextCursor}
2034
+ .loadingMore=${this._searchLoadingMore}>
2035
+ </vsn-search-results>`;
2018
2036
  }
2019
2037
  loadingState() {
2020
- return n`<vsn-template class="flex-1 min-h-0"></vsn-template>`;
2038
+ return n`
2039
+ <vsn-template class="flex-1 min-h-0"></vsn-template>`;
2021
2040
  }
2022
2041
  errorState() {
2023
- return n`<vsn-error-state class="flex-1 min-h-0"></vsn-error-state>`;
2042
+ return n`
2043
+ <vsn-error-state class="flex-1 min-h-0"></vsn-error-state>`;
2024
2044
  }
2025
2045
  header() {
2026
2046
  let e = this.menu?.items.length ? this.menu.search : void 0;
2027
2047
  return n`
2028
- <vsn-header
2029
- .modules=${this.modules}
2030
- .activeModuleId=${this.activeModuleId}
2031
- .activeModuleLabel=${this.activeModuleLabel}
2032
- .modulesLoading=${this.modulesLoading}
2033
- .hasMenu=${(this.menu?.items.length ?? 0) > 0}
2034
- .search=${e}
2035
- .searchValue=${this._searchQuery}
2036
- .searchLoading=${this._searchLoading}
2037
- @vsn-search-input=${this._onSearchInput}
2038
- @vsn-search-submit=${this._onSearchSubmit}
2039
- @vsn-search-escape=${this._onSearchEscape}
2040
- >
2041
- </vsn-header>`;
2048
+ <vsn-header
2049
+ .modules=${this.modules}
2050
+ .activeModuleId=${this.activeModuleId}
2051
+ .activeModuleLabel=${this.activeModuleLabel}
2052
+ .modulesLoading=${this.modulesLoading}
2053
+ .hasMenu=${(this.menu?.items.length ?? 0) > 0}
2054
+ .search=${e}
2055
+ .searchValue=${this._searchQuery}
2056
+ .searchLoading=${this._searchLoading}
2057
+ .moduleSwitcherMaxHeight=${this._moduleSwitcherMaxHeight}
2058
+ @vsn-search-input=${this._onSearchInput}
2059
+ @vsn-search-submit=${this._onSearchSubmit}
2060
+ @vsn-search-cleared=${this._onSearchCleared}
2061
+ >
2062
+ </vsn-header>`;
2042
2063
  }
2043
2064
  scopesGroup() {
2044
2065
  if (!this.menu?.search?.enabled) return n``;
@@ -2047,7 +2068,7 @@ var Et = "en", Dt = [
2047
2068
  <vsn-search-scopes
2048
2069
  .scopes=${[{
2049
2070
  id: "menu",
2050
- label: ze()
2071
+ label: Be()
2051
2072
  }, ...e.map((e) => ({
2052
2073
  id: e.id,
2053
2074
  label: e.label
@@ -2058,30 +2079,28 @@ var Et = "en", Dt = [
2058
2079
  `;
2059
2080
  }
2060
2081
  renderMenu(e) {
2061
- return n`<vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
2082
+ return n`
2083
+ <vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
2062
2084
  }
2063
2085
  footer(e) {
2064
2086
  return n`
2065
2087
  <vsn-footer
2066
- .user=${e.user}
2067
- .profilePictureBaseUrl=${e.profilePictureBaseUrl}
2068
- .myProfileUrl=${e.myProfileUrl}>
2088
+ .user=${e.user}
2089
+ .profilePictureBaseUrl=${e.profilePictureBaseUrl}
2090
+ .myProfileUrl=${e.myProfileUrl}>
2069
2091
  </vsn-footer>
2070
2092
  `;
2071
2093
  }
2072
2094
  };
2073
- N([s({ attribute: !1 })], G.prototype, "modules", void 0), N([s()], G.prototype, "activeModuleId", void 0), N([s()], G.prototype, "activeModuleLabel", void 0), N([s({ type: Boolean })], G.prototype, "modulesLoading", void 0), N([s()], G.prototype, "lang", void 0), N([s({ attribute: !1 })], G.prototype, "auth", void 0), N([s({ type: Boolean })], G.prototype, "error", void 0), N([s({
2095
+ P([s({ attribute: !1 })], q.prototype, "modules", void 0), P([s()], q.prototype, "activeModuleId", void 0), P([s()], q.prototype, "activeModuleLabel", void 0), P([s({ type: Boolean })], q.prototype, "modulesLoading", void 0), P([s()], q.prototype, "lang", void 0), P([s({ attribute: !1 })], q.prototype, "auth", void 0), P([s({ type: Boolean })], q.prototype, "error", void 0), P([s({
2074
2096
  type: Boolean,
2075
2097
  reflect: !0
2076
- })], G.prototype, "open", void 0), N([s({ attribute: !1 })], G.prototype, "menu", void 0), N([l()], G.prototype, "_searchQuery", void 0), N([l()], G.prototype, "_searchResults", void 0), N([l()], G.prototype, "_searchLoading", void 0), N([l()], G.prototype, "_activeScopeId", void 0), N([l()], G.prototype, "_searchError", void 0), N([l()], G.prototype, "_searchNextCursor", void 0), N([l()], G.prototype, "_searchLoadingMore", void 0), G = N([o("vsn-side-bar")], G);
2098
+ })], q.prototype, "open", void 0), P([s({ attribute: !1 })], q.prototype, "menu", void 0), P([l()], q.prototype, "_searchQuery", void 0), P([l()], q.prototype, "_searchResults", void 0), P([l()], q.prototype, "_searchLoading", void 0), P([l()], q.prototype, "_activeScopeId", void 0), P([l()], q.prototype, "_searchError", void 0), P([l()], q.prototype, "_searchNextCursor", void 0), P([l()], q.prototype, "_searchLoadingMore", void 0), P([l()], q.prototype, "_moduleSwitcherMaxHeight", void 0), q = P([o("vsn-side-bar")], q);
2077
2099
  //#endregion
2078
2100
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu-item.ts
2079
- var K, q = class extends e {
2080
- static {
2081
- K = this;
2082
- }
2101
+ var J, Y = class extends e {
2083
2102
  static {
2084
- this.styles = h;
2103
+ J = this;
2085
2104
  }
2086
2105
  static {
2087
2106
  this._idCounter = 0;
@@ -2101,51 +2120,60 @@ var K, q = class extends e {
2101
2120
  }, this._onItemMouseLeave = () => {
2102
2121
  this._showTooltip = !1;
2103
2122
  }, this._onClick = (e) => {
2104
- if (this._isParent()) e.preventDefault(), this._isExpanded = !this._isExpanded;
2105
- else if (this.tree) {
2106
- e.preventDefault();
2107
- let t = [...this.ancestorPath, this.tree];
2108
- this.dispatchEvent(new CustomEvent("vsn-breadcrumb-menu-leaf-select", {
2109
- detail: { path: t },
2110
- bubbles: !0,
2111
- composed: !0
2112
- }));
2123
+ if (this._isParent()) {
2124
+ e.preventDefault(), e.stopPropagation(), this._isExpanded = !this._isExpanded;
2125
+ return;
2113
2126
  }
2114
- }, this._tooltipId = `vsn-menu-item-tooltip-${K._idCounter++}`;
2127
+ if (!this.tree || e.button !== 0 || A(e)) return;
2128
+ e.preventDefault(), e.stopPropagation();
2129
+ let t = [...this.ancestorPath, this.tree];
2130
+ this.dispatchEvent(new CustomEvent("vsn-breadcrumb-menu-leaf-select", {
2131
+ detail: { path: t },
2132
+ bubbles: !0,
2133
+ composed: !0
2134
+ }));
2135
+ }, this._tooltipId = `vsn-menu-item-tooltip-${J._idCounter++}`;
2115
2136
  }
2116
2137
  createRenderRoot() {
2117
2138
  return this;
2118
2139
  }
2119
2140
  render() {
2120
2141
  return n`
2121
- ${this._menuItemMarkup()}
2122
- ${u(this._isExpanded, () => n`${this._getExpandedMenu()}`)}
2123
- `;
2142
+ ${this._menuItemMarkup()}
2143
+ ${u(this._isExpanded, () => n`${this._getExpandedMenu()}`)}
2144
+ `;
2124
2145
  }
2125
2146
  _getExpandedMenu() {
2126
2147
  return n`
2127
- ${d(this._getTreeItems(this.tree), (e) => this._menuItem(e, this.level + 1))}
2128
- `;
2148
+ ${d(this._getTreeItems(this.tree), (e) => this._menuItem(e, this.level + 1))}
2149
+ `;
2129
2150
  }
2130
2151
  _menuItemMarkup() {
2131
2152
  let e = this.tree?.label ?? "", t = {
2132
2153
  "ga-side-navigation__item": !0,
2133
2154
  [`ga-side-navigation__item--level-${this.level}`]: this.level > 1
2134
2155
  }, r = n`
2135
- <div id="${this._tooltipId}" role="tooltip" style="position: fixed; left: ${this._tooltipPos.x}px; top: ${this._tooltipPos.y}px; transform: translateY(-50%); visibility: ${this._showTooltip ? "visible" : "hidden"}; pointer-events: none; z-index: 9999;">
2136
- <div class="ga-tooltip ga-tooltip--right-start" style="white-space: nowrap">${e}</div>
2137
- </div>
2156
+ <div id="${this._tooltipId}" role="tooltip"
2157
+ style="position: fixed; left: ${this._tooltipPos.x}px; top: ${this._tooltipPos.y}px; transform: translateY(-50%); visibility: ${this._showTooltip ? "visible" : "hidden"}; pointer-events: none; z-index: 9999;">
2158
+ <div class="ga-tooltip ga-tooltip--right-start" style="white-space: nowrap">${e}</div>
2159
+ </div>
2138
2160
  <span class="ga-side-navigation__item-icon">
2139
- ${this._isParent() ? this._isExpanded ? j(M, 16) : j(ot, 16) : ""}
2161
+ ${this._isParent() ? this._isExpanded ? M(N, 16) : M(ct, 16) : ""}
2140
2162
  </span>
2141
- <div class="ga-side-navigation__item-content">
2142
- <div class="ga-side-navigation__item-label">${e}</div>
2143
- </div>
2144
- `;
2145
- return this._isParent() ? n`<div class="${f(t)}" aria-describedby="${this._tooltipId}" @click=${this._onClick} @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${r}</div>` : n`<a class="${f(t)}" aria-describedby="${this._tooltipId}" href="${this.tree && g(this.tree) ? this.tree.url : ""}" @click=${this._onClick} @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${r}</a>`;
2163
+ <div class="ga-side-navigation__item-content">
2164
+ <div class="ga-side-navigation__item-label">${e}</div>
2165
+ </div>
2166
+ `;
2167
+ return this._isParent() ? n`
2168
+ <div class="${f(t)}" aria-describedby="${this._tooltipId}" @click=${this._onClick}
2169
+ @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${r}
2170
+ </div>` : n`<a class="${f(t)}" aria-describedby="${this._tooltipId}"
2171
+ href="${this.tree && g(this.tree) ? this.tree.url : ""}" @click=${this._onClick}
2172
+ @mouseenter=${this._onItemMouseEnter} @mouseleave=${this._onItemMouseLeave}>${r}</a>`;
2146
2173
  }
2147
2174
  _menuItem(e, t) {
2148
- return n`<vsn-breadcrumb-menu-item .tree=${e} .level=${t} .ancestorPath=${this.tree ? [...this.ancestorPath, this.tree] : this.ancestorPath}></vsn-breadcrumb-menu-item>`;
2175
+ return n`
2176
+ <vsn-breadcrumb-menu-item .tree=${e} .level=${t} .ancestorPath=${this.tree ? [...this.ancestorPath, this.tree] : this.ancestorPath}></vsn-breadcrumb-menu-item>`;
2149
2177
  }
2150
2178
  _getTreeItems(e) {
2151
2179
  if (e !== void 0 && _(e)) return e.items;
@@ -2154,33 +2182,33 @@ var K, q = class extends e {
2154
2182
  if (this.tree && _(this.tree)) return this.tree.items.length > 0;
2155
2183
  }
2156
2184
  };
2157
- N([s({ attribute: !1 })], q.prototype, "tree", void 0), N([s({ type: Number })], q.prototype, "level", void 0), N([s({ type: Array })], q.prototype, "ancestorPath", void 0), N([l()], q.prototype, "_isExpanded", void 0), N([l()], q.prototype, "_showTooltip", void 0), N([l()], q.prototype, "_tooltipPos", void 0), N([c(".ga-side-navigation__item-label")], q.prototype, "_labelEl", void 0), q = K = N([o("vsn-breadcrumb-menu-item")], q);
2185
+ P([s({ attribute: !1 })], Y.prototype, "tree", void 0), P([s({ type: Number })], Y.prototype, "level", void 0), P([s({ type: Array })], Y.prototype, "ancestorPath", void 0), P([l()], Y.prototype, "_isExpanded", void 0), P([l()], Y.prototype, "_showTooltip", void 0), P([l()], Y.prototype, "_tooltipPos", void 0), P([c(".ga-side-navigation__item-label")], Y.prototype, "_labelEl", void 0), Y = J = P([o("vsn-breadcrumb-menu-item")], Y);
2158
2186
  //#endregion
2159
2187
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu.ts
2160
- var J = class extends e {
2161
- static {
2162
- this.styles = h;
2163
- }
2188
+ var qt = class extends e {
2164
2189
  createRenderRoot() {
2165
2190
  return this;
2166
2191
  }
2167
2192
  menuItem(e) {
2168
- return n`<vsn-breadcrumb-menu-item .tree=${e}></vsn-breadcrumb-menu-item>`;
2193
+ return n`
2194
+ <vsn-breadcrumb-menu-item .tree=${e}></vsn-breadcrumb-menu-item>`;
2169
2195
  }
2170
2196
  render() {
2171
2197
  return n`
2172
- <div class="ga-side-navigation" style="height: auto; overflow: visible; width: 238px; min-width: var(--ga-size-160); max-width: 512px; border-radius: var(--ga-radius); border: var(--ga-size-border-width-sm) solid var(--ga-color-border-primary); background: var(--ga-color-surface-primary);">
2173
- <div class="ga-side-navigation__body" style="overflow-x: hidden; overflow-y: auto; max-height: 60vh;">
2198
+ <div class="ga-side-navigation ga-scroll"
2199
+ style="height: auto; overflow: visible; width: 238px; min-width: var(--ga-size-160); max-width: 512px; border-radius: var(--ga-radius); border: var(--ga-size-border-width-sm) solid var(--ga-color-border-primary); background: var(--ga-color-surface-primary);">
2200
+ <div class="ga-side-navigation__body overflow-y-auto ga-scroll"
2201
+ style="overflow-x: hidden; max-height: 60vh;">
2174
2202
  ${d(this.treeList, (e) => this.menuItem(e))}
2175
2203
  </div>
2176
2204
  </div>
2177
2205
  `;
2178
2206
  }
2179
2207
  };
2180
- N([s({ attribute: !1 })], J.prototype, "treeList", void 0), J = N([o("vsn-breadcrumb-menu")], J);
2208
+ P([s({ attribute: !1 })], qt.prototype, "treeList", void 0), qt = P([o("vsn-breadcrumb-menu")], qt);
2181
2209
  //#endregion
2182
2210
  //#region src/components/vsn-top-bar/vsn-breadcrumbs.ts
2183
- var Y = class extends e {
2211
+ var X = class extends e {
2184
2212
  constructor(...e) {
2185
2213
  super(...e), this.modules = [], this._openPopoverId = null, this._displayMode = "full", this._overflowCount = 0, this._tooltip = null, this._mqDesktop = window.matchMedia("(min-width: 1440px)"), this._mqTablet = window.matchMedia("(min-width: 768px) and (max-width: 1439px)"), this._ro = null, this._lastContainerWidth = 0, this._mounted = !1, this._handleMediaChange = () => {
2186
2214
  this._mqDesktop.matches ? (this._displayMode = "full", this._overflowCount = 0) : this._mqTablet.matches ? (this._displayMode = "overflow", this._overflowCount = 0, this._mounted && this.updateComplete.then(() => this._recalculateOverflow())) : (this._displayMode = "mobile", this._overflowCount = 0);
@@ -2199,14 +2227,20 @@ var Y = class extends e {
2199
2227
  };
2200
2228
  }
2201
2229
  static {
2202
- this.styles = [h, t`
2230
+ this.styles = [
2231
+ h,
2232
+ K,
2233
+ t`
2203
2234
  /* Temporary, until breadcrumb styles are updated */
2235
+
2204
2236
  .ga-breadcrumb {
2205
2237
  flex-wrap: nowrap;
2206
2238
  overflow-x: clip;
2207
2239
  }
2240
+
2208
2241
  /* Dropdowns use the native Popover API — promoted to the top layer on open,
2209
2242
  bypassing all stacking contexts. */
2243
+
2210
2244
  .ga-breadcrumb-item__menu[popover] {
2211
2245
  position: fixed;
2212
2246
  inset: unset;
@@ -2216,34 +2250,42 @@ var Y = class extends e {
2216
2250
  background: transparent;
2217
2251
  overflow: visible;
2218
2252
  }
2253
+
2219
2254
  .ga-breadcrumb-item__trigger[aria-expanded='true'] .ga-breadcrumb-item__label {
2220
2255
  outline: none;
2221
2256
  }
2257
+
2222
2258
  .ga-breadcrumb-item--link .ga-breadcrumb-item__trigger:hover,
2223
2259
  .ga-breadcrumb-item--overflow .ga-breadcrumb-item__trigger:hover {
2224
2260
  background-color: var(--ga-color-surface-action-hover-2);
2225
2261
  text-decoration: none;
2226
2262
  }
2263
+
2227
2264
  .ga-breadcrumb-item--link .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label,
2228
2265
  .ga-breadcrumb-item--overflow .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label {
2229
2266
  text-decoration: none;
2230
2267
  }
2268
+
2231
2269
  .ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger {
2232
2270
  color: var(--ga-color-text-body);
2233
2271
  cursor: default;
2234
2272
  }
2273
+
2235
2274
  .ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger .ga-breadcrumb-item__label {
2236
2275
  color: var(--ga-color-text-body);
2237
2276
  }
2277
+
2238
2278
  .ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger:hover {
2239
2279
  background-color: transparent;
2240
2280
  color: var(--ga-color-text-body);
2241
2281
  }
2282
+
2242
2283
  .ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label {
2243
2284
  text-decoration: none;
2244
2285
  color: var(--ga-color-text-body);
2245
2286
  }
2246
- `];
2287
+ `
2288
+ ];
2247
2289
  }
2248
2290
  connectedCallback() {
2249
2291
  super.connectedCallback(), this._mqDesktop.addEventListener("change", this._handleMediaChange), this._mqTablet.addEventListener("change", this._handleMediaChange), this._handleMediaChange();
@@ -2350,10 +2392,11 @@ var Y = class extends e {
2350
2392
  >
2351
2393
  <span class="ga-breadcrumb-item__label">${"VSN"}</span>
2352
2394
  </button>
2353
- ${this._breadcrumbPath.length > 0 ? n`<span class="ga-breadcrumb-item__separator" aria-hidden="true">/</span>` : ""}
2395
+ ${this._breadcrumbPath.length > 0 ? n`<span class="ga-breadcrumb-item__separator"
2396
+ aria-hidden="true">/</span>` : ""}
2354
2397
  <div
2355
2398
  id="vsn-bc-modules-popover"
2356
- class="ga-breadcrumb-item__menu"
2399
+ class="ga-breadcrumb-item__menu ga-scroll"
2357
2400
  popover="auto"
2358
2401
  @beforetoggle=${(e) => this._handlePopoverBeforeToggle("vsn-bc-modules-trigger", e)}
2359
2402
  @toggle=${(e) => this._handlePopoverToggle("vsn-bc-modules-popover", e)}
@@ -2379,7 +2422,10 @@ var Y = class extends e {
2379
2422
  }
2380
2423
  _renderLeafAsAncestor(e) {
2381
2424
  return n`
2382
- <div class="ga-breadcrumb-item ga-breadcrumb-item--link ga-breadcrumb-item--ancestor" aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r} data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter} @mouseleave=${this._onBreadcrumbMouseLeave}>
2425
+ <div class="ga-breadcrumb-item ga-breadcrumb-item--link ga-breadcrumb-item--ancestor"
2426
+ aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
2427
+ data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
2428
+ @mouseleave=${this._onBreadcrumbMouseLeave}>
2383
2429
  <span class="ga-breadcrumb-item__trigger">
2384
2430
  <span class="ga-breadcrumb-item__label">${e.label ?? ""}</span>
2385
2431
  </span>
@@ -2399,7 +2445,10 @@ var Y = class extends e {
2399
2445
  }
2400
2446
  _renderCurrentItem(e) {
2401
2447
  return n`
2402
- <div class="ga-breadcrumb-item ga-breadcrumb-item--current-page" aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r} data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter} @mouseleave=${this._onBreadcrumbMouseLeave}>
2448
+ <div class="ga-breadcrumb-item ga-breadcrumb-item--current-page"
2449
+ aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
2450
+ data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
2451
+ @mouseleave=${this._onBreadcrumbMouseLeave}>
2403
2452
  <span class="ga-breadcrumb-item__trigger" aria-current="page">
2404
2453
  <span class="ga-breadcrumb-item__label">${e.label ?? ""}</span>
2405
2454
  </span>
@@ -2409,7 +2458,10 @@ var Y = class extends e {
2409
2458
  if (!_(e) || e.items.length === 0) return n``;
2410
2459
  let i = this._popoverItemId(t), a = this._popoverItemTriggerId(t);
2411
2460
  return n`
2412
- <div class="ga-breadcrumb-item ga-breadcrumb-item--link" aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r} data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter} @mouseleave=${this._onBreadcrumbMouseLeave}>
2461
+ <div class="ga-breadcrumb-item ga-breadcrumb-item--link"
2462
+ aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
2463
+ data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
2464
+ @mouseleave=${this._onBreadcrumbMouseLeave}>
2413
2465
  <button
2414
2466
  id=${a}
2415
2467
  class="ga-breadcrumb-item__trigger"
@@ -2492,7 +2544,8 @@ var Y = class extends e {
2492
2544
  ${this._displayMode === "full" ? this._renderFullBreadcrumbs() : this._displayMode === "overflow" ? this._renderOverflowBreadcrumbs() : this._renderMobileBreadcrumbs()}
2493
2545
  </div>
2494
2546
  ${this._tooltip ? n`
2495
- <div id="vsn-breadcrumb-tooltip" role="tooltip" style="position: fixed; left: ${this._tooltip.x}px; top: ${this._tooltip.y}px; pointer-events: none; z-index: 9999;">
2547
+ <div id="vsn-breadcrumb-tooltip" role="tooltip"
2548
+ style="position: fixed; left: ${this._tooltip.x}px; top: ${this._tooltip.y}px; pointer-events: none; z-index: 9999;">
2496
2549
  <div class="ga-tooltip ga-tooltip--bottom-start" style="white-space: nowrap">${this._tooltip.label}</div>
2497
2550
  </div>
2498
2551
  ` : r}
@@ -2500,13 +2553,10 @@ var Y = class extends e {
2500
2553
  `;
2501
2554
  }
2502
2555
  };
2503
- N([s({ attribute: !1 })], Y.prototype, "tree", void 0), N([s({ type: Array })], Y.prototype, "modules", void 0), N([s()], Y.prototype, "activeModuleId", void 0), N([l()], Y.prototype, "_openPopoverId", void 0), N([l()], Y.prototype, "_displayMode", void 0), N([l()], Y.prototype, "_overflowCount", void 0), N([l()], Y.prototype, "_tooltip", void 0), Y = N([S(), o("vsn-breadcrumbs")], Y);
2556
+ P([s({ attribute: !1 })], X.prototype, "tree", void 0), P([s({ type: Array })], X.prototype, "modules", void 0), P([s()], X.prototype, "activeModuleId", void 0), P([l()], X.prototype, "_openPopoverId", void 0), P([l()], X.prototype, "_displayMode", void 0), P([l()], X.prototype, "_overflowCount", void 0), P([l()], X.prototype, "_tooltip", void 0), X = P([S(), o("vsn-breadcrumbs")], X);
2504
2557
  //#endregion
2505
2558
  //#region src/components/vsn-top-bar/vsn-ai-assistant.ts
2506
- var Kt = class extends e {
2507
- static {
2508
- this.styles = h;
2509
- }
2559
+ var Jt = class extends e {
2510
2560
  createRenderRoot() {
2511
2561
  return this;
2512
2562
  }
@@ -2519,24 +2569,22 @@ var Kt = class extends e {
2519
2569
  }
2520
2570
  render() {
2521
2571
  return n`
2522
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open AI assistant")} @click=${this._handleClick}>
2523
- <span class="ga-icon">${j(Ke)}</span>
2572
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
2573
+ aria-label=${x("Open AI assistant")} @click=${this._handleClick}>
2574
+ <span class="ga-icon">${M(Je)}</span>
2524
2575
  </button>
2525
2576
  `;
2526
2577
  }
2527
2578
  };
2528
- Kt = N([S(), o("vsn-ai-assistant")], Kt);
2579
+ Jt = P([S(), o("vsn-ai-assistant")], Jt);
2529
2580
  //#endregion
2530
2581
  //#region src/components/vsn-top-bar/vsn-feedback.ts
2531
- var X = class extends e {
2582
+ var Z = class extends e {
2532
2583
  constructor(...e) {
2533
2584
  super(...e), this._compact = !1, this.feedback = null, this._mqMobile = window.matchMedia("(max-width: 767px)"), this._handleMediaChange = () => {
2534
2585
  this._compact = this._mqMobile.matches;
2535
2586
  }, this._traitSet = !1;
2536
2587
  }
2537
- static {
2538
- this.styles = h;
2539
- }
2540
2588
  createRenderRoot() {
2541
2589
  return this;
2542
2590
  }
@@ -2546,7 +2594,7 @@ var X = class extends e {
2546
2594
  updated(e) {
2547
2595
  if (super.updated(e), e.has("feedback") && this.feedback?.workspaceId && !document.getElementById("survicate-sdk") && !window._sva) {
2548
2596
  let e = document.createElement("script");
2549
- e.id = He, e.src = We(this.feedback.workspaceId), e.async = !0, e.onload = () => this._applyVisitorTraits(), document.head.appendChild(e);
2597
+ e.id = Ue, e.src = Ge(this.feedback.workspaceId), e.async = !0, e.onload = () => this._applyVisitorTraits(), document.head.appendChild(e);
2550
2598
  }
2551
2599
  if (e.has("auth")) {
2552
2600
  let t = e.get("auth");
@@ -2566,27 +2614,26 @@ var X = class extends e {
2566
2614
  this.dispatchEvent(new CustomEvent("vsn-feedback", {
2567
2615
  bubbles: !0,
2568
2616
  composed: !0
2569
- })), this.feedback?.surveyId && (this._applyVisitorTraits(), window._sva?.invokeEvent(Ue));
2617
+ })), this.feedback?.surveyId && (this._applyVisitorTraits(), window._sva?.invokeEvent(We));
2570
2618
  }
2571
2619
  render() {
2572
2620
  return this._compact ? n`
2573
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Send feedback")} @click=${this._handleClick}>
2574
- <span class="ga-icon">${j(Ye)}</span>
2621
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
2622
+ aria-label=${x("Send feedback")} @click=${this._handleClick}>
2623
+ <span class="ga-icon">${M(Ze)}</span>
2575
2624
  </button>
2576
2625
  ` : n`
2577
- <button type="button" class="ga-button ga-button--secondary" aria-label=${x("Send feedback")} @click=${this._handleClick}>
2626
+ <button type="button" class="ga-button ga-button--secondary" aria-label=${x("Send feedback")}
2627
+ @click=${this._handleClick}>
2578
2628
  ${x("Feedback")}
2579
2629
  </button>
2580
2630
  `;
2581
2631
  }
2582
2632
  };
2583
- N([l()], X.prototype, "_compact", void 0), N([s({ attribute: !1 })], X.prototype, "feedback", void 0), N([s({ attribute: !1 })], X.prototype, "auth", void 0), X = N([S(), o("vsn-feedback")], X);
2633
+ P([l()], Z.prototype, "_compact", void 0), P([s({ attribute: !1 })], Z.prototype, "feedback", void 0), P([s({ attribute: !1 })], Z.prototype, "auth", void 0), Z = P([S(), o("vsn-feedback")], Z);
2584
2634
  //#endregion
2585
2635
  //#region src/components/vsn-top-bar/vsn-home.ts
2586
- var Z = class extends e {
2587
- static {
2588
- this.styles = h;
2589
- }
2636
+ var Yt = class extends e {
2590
2637
  createRenderRoot() {
2591
2638
  return this;
2592
2639
  }
@@ -2603,30 +2650,17 @@ var Z = class extends e {
2603
2650
  }
2604
2651
  render() {
2605
2652
  return this.landingPageUrl ? n`
2606
- <a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${x("Home")} @click=${this._handleClick}>
2607
- <span class="ga-icon">${j(Xe)}</span>
2653
+ <a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${x("Home")}
2654
+ @click=${this._handleClick}>
2655
+ <span class="ga-icon">${M(Qe)}</span>
2608
2656
  </a>
2609
2657
  ` : r;
2610
2658
  }
2611
2659
  };
2612
- N([s({ attribute: "landing-page-url" })], Z.prototype, "landingPageUrl", void 0), Z = N([S(), o("vsn-home")], Z);
2660
+ P([s({ attribute: "landing-page-url" })], Yt.prototype, "landingPageUrl", void 0), Yt = P([S(), o("vsn-home")], Yt);
2613
2661
  //#endregion
2614
2662
  //#region src/components/vsn-top-bar/vsn-menu-toggle.ts
2615
- var qt = class extends e {
2616
- constructor(...e) {
2617
- super(...e), this._tooltip = null, this._onMouseEnter = (e) => {
2618
- let t = e.currentTarget.getBoundingClientRect();
2619
- this._tooltip = {
2620
- x: t.left,
2621
- y: t.bottom + 4
2622
- };
2623
- }, this._onMouseLeave = () => {
2624
- this._tooltip = null;
2625
- };
2626
- }
2627
- static {
2628
- this.styles = h;
2629
- }
2663
+ var Xt = class extends e {
2630
2664
  createRenderRoot() {
2631
2665
  return this;
2632
2666
  }
@@ -2634,34 +2668,42 @@ var qt = class extends e {
2634
2668
  this.querySelector("button")?.focus(e);
2635
2669
  }
2636
2670
  _handleClick() {
2637
- this._tooltip = null, this.dispatchEvent(new CustomEvent("toggle-side-bar", {
2671
+ this._tooltipElement.hidePopover?.(), this.dispatchEvent(new CustomEvent("toggle-side-bar", {
2638
2672
  bubbles: !0,
2639
2673
  composed: !0
2640
2674
  }));
2641
2675
  }
2676
+ _onActivate(e) {
2677
+ let t = e.currentTarget.getBoundingClientRect();
2678
+ this._tooltipElement.style.left = `${t.left}px`, this._tooltipElement.style.top = `${t.bottom + 4}px`, this._tooltipElement.showPopover?.();
2679
+ }
2680
+ _onDeactivate() {
2681
+ this._tooltipElement.hidePopover?.();
2682
+ }
2642
2683
  render() {
2643
2684
  return n`
2644
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open menu")} aria-describedby=${this._tooltip ? "vsn-menu-toggle-tooltip" : r} @click=${this._handleClick} @mouseenter=${this._onMouseEnter} @mouseleave=${this._onMouseLeave}>
2645
- <span class="ga-icon">${j(Ge)}</span>
2685
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open menu")}
2686
+ aria-describedby="vsn-menu-toggle-tooltip"
2687
+ @click=${this._handleClick}
2688
+ @mouseenter=${this._onActivate}
2689
+ @mouseleave=${this._onDeactivate}>
2690
+ <span class="ga-icon">${M(qe)}</span>
2646
2691
  </button>
2647
- ${this._tooltip ? n`
2648
- <div id="vsn-menu-toggle-tooltip" role="tooltip" style="position: fixed; left: ${this._tooltip.x}px; top: ${this._tooltip.y}px; pointer-events: none; z-index: 9999;">
2649
- <div class="ga-tooltip ga-tooltip--bottom-start" style="white-space: nowrap">${Le()}</div>
2650
- </div>
2651
- ` : r}
2692
+ <div id="vsn-menu-toggle-tooltip" role="tooltip"
2693
+ style="position: fixed; inset: unset; margin: 0; padding: 0; border: none; background: transparent; overflow: visible; pointer-events: none; z-index: 9999;"
2694
+ popover="manual">
2695
+ <div class="ga-tooltip ga-tooltip--bottom-start" style="white-space: nowrap">${Re()}</div>
2696
+ </div>
2652
2697
  `;
2653
2698
  }
2654
2699
  };
2655
- N([l()], qt.prototype, "_tooltip", void 0), qt = N([S(), o("vsn-menu-toggle")], qt);
2700
+ P([c("div[role=\"tooltip\"]", !0)], Xt.prototype, "_tooltipElement", void 0), Xt = P([S(), o("vsn-menu-toggle")], Xt);
2656
2701
  //#endregion
2657
2702
  //#region src/components/vsn-top-bar/vsn-notifications.ts
2658
- var Jt = class extends e {
2703
+ var Zt = class extends e {
2659
2704
  constructor(...e) {
2660
2705
  super(...e), this.notificationActive = !1;
2661
2706
  }
2662
- static {
2663
- this.styles = h;
2664
- }
2665
2707
  createRenderRoot() {
2666
2708
  return this;
2667
2709
  }
@@ -2673,22 +2715,23 @@ var Jt = class extends e {
2673
2715
  }));
2674
2716
  }
2675
2717
  render() {
2676
- let e = this.notificationActive ? Je : qe;
2718
+ let e = this.notificationActive ? Xe : Ye;
2677
2719
  return n`
2678
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Notifications")} @click=${this._handleClick}>
2679
- <span class="ga-icon">${j(e)}</span>
2720
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
2721
+ aria-label=${x("Notifications")} @click=${this._handleClick}>
2722
+ <span class="ga-icon">${M(e)}</span>
2680
2723
  </button>
2681
2724
  `;
2682
2725
  }
2683
2726
  };
2684
- N([s({
2727
+ P([s({
2685
2728
  type: Boolean,
2686
2729
  attribute: "notification-active",
2687
2730
  reflect: !0
2688
- })], Jt.prototype, "notificationActive", void 0), Jt = N([S(), o("vsn-notifications")], Jt);
2731
+ })], Zt.prototype, "notificationActive", void 0), Zt = P([S(), o("vsn-notifications")], Zt);
2689
2732
  //#endregion
2690
2733
  //#region src/components/vsn-top-bar/vsn-help.ts
2691
- function Yt(e) {
2734
+ function Qt(e) {
2692
2735
  try {
2693
2736
  let t = new URL(e);
2694
2737
  return t.protocol === "https:" || t.protocol === "http:";
@@ -2696,10 +2739,7 @@ function Yt(e) {
2696
2739
  return !1;
2697
2740
  }
2698
2741
  }
2699
- var Xt = class extends e {
2700
- static {
2701
- this.styles = h;
2702
- }
2742
+ var $t = class extends e {
2703
2743
  createRenderRoot() {
2704
2744
  return this;
2705
2745
  }
@@ -2711,18 +2751,20 @@ var Xt = class extends e {
2711
2751
  }));
2712
2752
  }
2713
2753
  render() {
2714
- return this.helpUrl && Yt(this.helpUrl) ? n`
2715
- <a href=${this.helpUrl} rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")}>
2716
- <span class="ga-icon">${j(Ze)}</span>
2754
+ return this.helpUrl && Qt(this.helpUrl) ? n`
2755
+ <a href=${this.helpUrl} target="_blank" rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only"
2756
+ aria-label=${x("Help")}>
2757
+ <span class="ga-icon">${M($e)}</span>
2717
2758
  </a>
2718
2759
  ` : n`
2719
- <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")} @click=${this._handleClick}>
2720
- <span class="ga-icon">${j(Ze)}</span>
2760
+ <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")}
2761
+ @click=${this._handleClick}>
2762
+ <span class="ga-icon">${M($e)}</span>
2721
2763
  </button>
2722
2764
  `;
2723
2765
  }
2724
2766
  };
2725
- N([s({ attribute: "help-url" })], Xt.prototype, "helpUrl", void 0), Xt = N([S(), o("vsn-help")], Xt);
2767
+ P([s({ attribute: "help-url" })], $t.prototype, "helpUrl", void 0), $t = P([S(), o("vsn-help")], $t);
2726
2768
  //#endregion
2727
2769
  //#region src/components/vsn-top-bar/vsn-top-bar.ts
2728
2770
  var Q = class extends e {
@@ -2730,7 +2772,7 @@ var Q = class extends e {
2730
2772
  super(...e), this.modules = [], this.feedback = null, this.showHelp = !1, this.showNotification = !1, this.notificationActive = !1, this.lang = "en";
2731
2773
  }
2732
2774
  willUpdate(e) {
2733
- e.has("lang") && Bt(this.lang).catch(console.error);
2775
+ e.has("lang") && Ft(this.lang).catch(console.error);
2734
2776
  }
2735
2777
  focusMenuToggle() {
2736
2778
  this.renderRoot.querySelector("vsn-menu-toggle")?.focus();
@@ -2832,26 +2874,28 @@ var Q = class extends e {
2832
2874
  `;
2833
2875
  }
2834
2876
  };
2835
- N([s({ attribute: !1 })], Q.prototype, "tree", void 0), N([s({ type: Array })], Q.prototype, "modules", void 0), N([s()], Q.prototype, "activeModuleId", void 0), N([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), N([s({ attribute: !1 })], Q.prototype, "feedback", void 0), N([s({ attribute: !1 })], Q.prototype, "auth", void 0), N([s({
2877
+ P([s({ attribute: !1 })], Q.prototype, "tree", void 0), P([s({ type: Array })], Q.prototype, "modules", void 0), P([s()], Q.prototype, "activeModuleId", void 0), P([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), P([s({ attribute: !1 })], Q.prototype, "feedback", void 0), P([s({ attribute: !1 })], Q.prototype, "auth", void 0), P([s({
2836
2878
  type: Boolean,
2837
2879
  attribute: "show-help"
2838
- })], Q.prototype, "showHelp", void 0), N([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), N([s({
2880
+ })], Q.prototype, "showHelp", void 0), P([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), P([s({
2839
2881
  type: Boolean,
2840
2882
  attribute: "show-notification"
2841
- })], Q.prototype, "showNotification", void 0), N([s({
2883
+ })], Q.prototype, "showNotification", void 0), P([s({
2842
2884
  type: Boolean,
2843
2885
  attribute: "notification-active"
2844
- })], Q.prototype, "notificationActive", void 0), N([s()], Q.prototype, "lang", void 0), Q = N([o("vsn-top-bar")], Q);
2886
+ })], Q.prototype, "notificationActive", void 0), P([s()], Q.prototype, "lang", void 0), Q = P([o("vsn-top-bar")], Q);
2845
2887
  //#endregion
2846
2888
  //#region src/components/vsn-navigation.ts
2847
2889
  var $ = class extends e {
2848
2890
  constructor(...e) {
2849
- super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this._currentItem = "", this._sideBarOpen = !1, this._resolvedModules = [], this._modulesLoading = !1, this._modulesLoadToken = 0, this._restoreFocusToToggle = !1, this._onShortcut = (e) => {
2850
- !Pe(e) || e.key.toLowerCase() !== "k" || (e.preventDefault(), this._openAndFocusSearch());
2851
- }, this._onDocEscape = (e) => {
2852
- if (e.key !== "Escape" || !this._sideBarOpen) return;
2853
- let t = document.activeElement;
2854
- t && t !== document.body || (this._closeSideBar(), this._restoreFocusToToggle = !0);
2891
+ super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this.open = !1, this._currentItem = "", this._resolvedModules = [], this._modulesLoading = !1, this._modulesLoadToken = 0, this._restoreFocusToToggle = !1, this._onShortcut = (e) => {
2892
+ e.defaultPrevented || !Fe(e) || e.key.toLowerCase() !== "k" || (e.preventDefault(), this.dispatchEvent(new CustomEvent("vsn-open", {
2893
+ cancelable: !0,
2894
+ bubbles: !0,
2895
+ composed: !0
2896
+ })) && this._openAndFocusSearch());
2897
+ }, this._onEscape = (e) => {
2898
+ e.defaultPrevented || this.open && j(e) && e.key === "Escape" && (e.preventDefault(), this.open = !1);
2855
2899
  };
2856
2900
  }
2857
2901
  _resolveModules() {
@@ -2872,7 +2916,10 @@ var $ = class extends e {
2872
2916
  });
2873
2917
  }
2874
2918
  static {
2875
- this.styles = [h, t`
2919
+ this.styles = [
2920
+ h,
2921
+ K,
2922
+ t`
2876
2923
  :host {
2877
2924
  display: flex;
2878
2925
  flex-direction: column;
@@ -2891,12 +2938,8 @@ var $ = class extends e {
2891
2938
  min-height: 0;
2892
2939
  overflow: hidden;
2893
2940
  }
2894
-
2895
- .vsn-navigation__page-content {
2896
- height: 100%;
2897
- overflow-y: auto;
2898
- }
2899
- `];
2941
+ `
2942
+ ];
2900
2943
  }
2901
2944
  willUpdate(e) {
2902
2945
  e.has("tree") && this.tree && (this.tree.currentItem ? this._currentItem = this.tree.currentItem : this.tree.items.length > 0 && (this._currentItem = this._getFirstLeafId(this.tree.items[0]))), e.has("modules") && this._resolveModules();
@@ -2918,29 +2961,32 @@ var $ = class extends e {
2918
2961
  };
2919
2962
  }
2920
2963
  _onToggleSideBar() {
2921
- this._sideBarOpen ? this._closeSideBar() : this._openAndFocusSearch();
2964
+ this.open ? this._closeSideBar() : this._openAndFocusSearch();
2922
2965
  }
2923
2966
  _openAndFocusSearch() {
2924
- this._sideBarOpen = !0, this.updateComplete.then(() => this.renderRoot.querySelector("vsn-side-bar")?.focusSearch());
2925
- }
2926
- _onSideBarClose() {
2927
- this._closeSideBar();
2967
+ this.open = !0, this.updateComplete.then(() => this.renderRoot.querySelector("vsn-side-bar")?.focusSearch());
2928
2968
  }
2929
2969
  _closeSideBar() {
2930
- let e = this.renderRoot.querySelector("vsn-side-bar");
2931
- this._restoreFocusToToggle = e?.matches(":focus-within") ?? !1, this._sideBarOpen = !1;
2970
+ this.open = !1;
2971
+ }
2972
+ update(e) {
2973
+ if (e.has("open") && e.get("open") && !this.open) {
2974
+ let e = this.renderRoot.querySelector("vsn-side-bar");
2975
+ this._restoreFocusToToggle = e?.matches(":focus-within") ?? !1;
2976
+ }
2977
+ super.update(e);
2932
2978
  }
2933
2979
  updated(e) {
2934
- e.has("_sideBarOpen") && e.get("_sideBarOpen") && !this._sideBarOpen && this._restoreFocusToToggle && this.renderRoot.querySelector("vsn-top-bar")?.focusMenuToggle();
2980
+ e.has("open") && e.get("open") && !this.open && this._restoreFocusToToggle && this.renderRoot.querySelector("vsn-top-bar")?.focusMenuToggle();
2935
2981
  }
2936
2982
  connectedCallback() {
2937
- super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this._onDocEscape);
2983
+ super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this._onEscape);
2938
2984
  }
2939
2985
  disconnectedCallback() {
2940
- document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this._onDocEscape), super.disconnectedCallback();
2986
+ document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this._onEscape), super.disconnectedCallback();
2941
2987
  }
2942
2988
  _onTopBarClick(e) {
2943
- this._sideBarOpen && (e.composedPath().some((e) => e.tagName?.toUpperCase() === "VSN-MENU-TOGGLE") || this._closeSideBar());
2989
+ this.open && (e.composedPath().some((e) => e.tagName?.toUpperCase() === "VSN-MENU-TOGGLE") || (this.open = !1));
2944
2990
  }
2945
2991
  render() {
2946
2992
  return n`
@@ -2958,7 +3004,7 @@ var $ = class extends e {
2958
3004
  ?notification-active=${this.notificationActive}
2959
3005
  @toggle-side-bar=${this._onToggleSideBar}
2960
3006
  @click=${this._onTopBarClick}
2961
- @vsn-breadcrumb-dropdown-open=${this._onSideBarClose}
3007
+ @vsn-breadcrumb-dropdown-open=${this._closeSideBar}
2962
3008
  >
2963
3009
  <slot name="context-selector" slot="context-selector"></slot>
2964
3010
  </vsn-top-bar>
@@ -2971,27 +3017,31 @@ var $ = class extends e {
2971
3017
  .activeModuleLabel=${this.modules?.activeModuleLabel}
2972
3018
  .modulesLoading=${this._modulesLoading}
2973
3019
  .auth=${this.auth}
2974
- ?open=${this._sideBarOpen}
2975
- @vsn-side-bar-close=${this._onSideBarClose}
3020
+ ?open=${this.open}
3021
+ @vsn-side-bar-close=${this._closeSideBar}
2976
3022
  >
2977
3023
  <slot name="nav-footer" slot="nav-footer"></slot>
2978
3024
  </vsn-side-bar>
2979
- <div class="vsn-navigation__page-content">
3025
+ <div class="h-full overflow-y-auto ga-scroll">
2980
3026
  <slot></slot>
2981
3027
  </div>
2982
3028
  </div>
2983
3029
  `;
2984
3030
  }
2985
3031
  };
2986
- N([s()], $.prototype, "lang", void 0), N([s({ attribute: !1 })], $.prototype, "tree", void 0), N([s({ attribute: !1 })], $.prototype, "modules", void 0), N([s({ attribute: !1 })], $.prototype, "auth", void 0), N([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), N([s({
3032
+ P([s()], $.prototype, "lang", void 0), P([s({ attribute: !1 })], $.prototype, "tree", void 0), P([s({ attribute: !1 })], $.prototype, "modules", void 0), P([s({ attribute: !1 })], $.prototype, "auth", void 0), P([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), P([s({
2987
3033
  type: Boolean,
2988
3034
  attribute: "show-help"
2989
- })], $.prototype, "showHelp", void 0), N([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), N([s({ attribute: !1 })], $.prototype, "feedback", void 0), N([s({
3035
+ })], $.prototype, "showHelp", void 0), P([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), P([s({ attribute: !1 })], $.prototype, "feedback", void 0), P([s({
2990
3036
  type: Boolean,
2991
3037
  attribute: "show-notification"
2992
- })], $.prototype, "showNotification", void 0), N([s({
3038
+ })], $.prototype, "showNotification", void 0), P([s({
2993
3039
  type: Boolean,
2994
3040
  attribute: "notification-active"
2995
- })], $.prototype, "notificationActive", void 0), N([l()], $.prototype, "_currentItem", void 0), N([l()], $.prototype, "_sideBarOpen", void 0), N([l()], $.prototype, "_resolvedModules", void 0), N([l()], $.prototype, "_modulesLoading", void 0), $ = N([o("vsn-navigation")], $);
3041
+ })], $.prototype, "notificationActive", void 0), P([s({
3042
+ type: Boolean,
3043
+ attribute: "open",
3044
+ reflect: !0
3045
+ })], $.prototype, "open", void 0), P([l()], $.prototype, "_currentItem", void 0), P([l()], $.prototype, "_resolvedModules", void 0), P([l()], $.prototype, "_modulesLoading", void 0), $ = P([o("vsn-navigation")], $);
2996
3046
  //#endregion
2997
3047
  export { v as SearchError, $ as VSNNavigation, g as isTreeLeaf, _ as isTreeParent };