@ethlete/core 5.0.0-next.62 → 5.0.0-next.64

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { assertInInjectionContext, inject, DestroyRef, ElementRef, TemplateRef, InjectionToken, booleanAttribute, QueryList, RendererFactory2, RendererStyleFlags2, isSignal, DOCUMENT, signal, linkedSignal, isDevMode, computed, afterNextRender, effect, untracked, ApplicationRef, runInInjectionContext, NgZone, Injector, numberAttribute, PLATFORM_ID, afterRenderEffect, EnvironmentInjector, createComponent, ViewEncapsulation, Component, Directive, model, ViewContainerRef, input, CSP_NONCE, provideEnvironmentInitializer, output, createEnvironmentInjector, Pipe, afterEveryRender } from '@angular/core';
2
+ import { assertInInjectionContext, inject, DestroyRef, ElementRef, TemplateRef, InjectionToken, booleanAttribute, QueryList, RendererFactory2, RendererStyleFlags2, isSignal, DOCUMENT, signal, linkedSignal, isDevMode, computed, afterNextRender, effect, untracked, ApplicationRef, runInInjectionContext, NgZone, Injector, numberAttribute, PLATFORM_ID, afterRenderEffect, EnvironmentInjector, createComponent, ViewEncapsulation, Component, Directive, model, ViewContainerRef, input, CSP_NONCE, provideEnvironmentInitializer, output, createEnvironmentInjector, Pipe, makeEnvironmentProviders, afterEveryRender } from '@angular/core';
3
3
  import { takeUntilDestroyed, toSignal, toObservable, outputFromObservable } from '@angular/core/rxjs-interop';
4
4
  import { Subject, fromEvent, switchMap, startWith, of, defer, from, map, catchError, timer, takeUntil, tap, pairwise, debounceTime, merge, distinctUntilChanged, EMPTY, expand, skip, take, filter, BehaviorSubject, combineLatest, Observable, isObservable, firstValueFrom, defaultIfEmpty, concatMap, concat, finalize, exhaustMap, share, shareReplay, ReplaySubject } from 'rxjs';
5
5
  import { FormGroup, FormArray, FormControl } from '@angular/forms';
@@ -1755,8 +1755,17 @@ const breakpointTransformBase = (coerce, defaultValue) => {
1755
1755
  const bp = currentBp();
1756
1756
  const r = raw();
1757
1757
  if (!cachedSig) {
1758
- const instance = injector.get(BREAKPOINT_INSTANCE_TOKEN, null);
1759
- if (!instance) {
1758
+ const instance = injector.get(BREAKPOINT_INSTANCE_TOKEN, null, { self: true });
1759
+ if (instance) {
1760
+ for (const key of Object.keys(instance)) {
1761
+ const val = instance[key];
1762
+ if (val && typeof val === 'function' && val[SIGNAL]?.transformFn === transformFn) {
1763
+ cachedSig = val;
1764
+ break;
1765
+ }
1766
+ }
1767
+ }
1768
+ if (!cachedSig) {
1760
1769
  if (ngDevMode && r !== undefined && !warnedMissingInstance) {
1761
1770
  warnedMissingInstance = true;
1762
1771
  console.warn('[ethlete] A breakpoint map was bound to an input, but its component does not call ' +
@@ -1764,13 +1773,6 @@ const breakpointTransformBase = (coerce, defaultValue) => {
1764
1773
  }
1765
1774
  return;
1766
1775
  }
1767
- for (const key of Object.keys(instance)) {
1768
- const val = instance[key];
1769
- if (val && typeof val === 'function' && val[SIGNAL]?.transformFn === transformFn) {
1770
- cachedSig = val;
1771
- break;
1772
- }
1773
- }
1774
1776
  }
1775
1777
  if (!cachedSig || r === undefined)
1776
1778
  return;
@@ -2213,7 +2215,7 @@ const isElementVisible = (options) => {
2213
2215
  containerRect,
2214
2216
  elementRect,
2215
2217
  // Round the intersection ratio to the nearest 0.01 to avoid floating point errors and system scaling issues.
2216
- intersectionRatio: Math.round(Math.min(inlineIntersectionPercentage, blockIntersectionPercentage) * 100) / 100,
2218
+ intersectionRatio: Math.round(inlineIntersectionPercentage * blockIntersectionPercentage * 100) / 100,
2217
2219
  };
2218
2220
  };
2219
2221
  const nearestAlignment = (elStart, elEnd, conStart, conEnd) => {
@@ -2331,6 +2333,8 @@ const getScrollSnapTarget = (items, container, direction, origin, margin = 0) =>
2331
2333
  };
2332
2334
  for (const item of items) {
2333
2335
  const itemRect = item.getBoundingClientRect();
2336
+ if (!itemRect.width && !itemRect.height)
2337
+ continue;
2334
2338
  const itemSize = direction === 'horizontal' ? itemRect.width : itemRect.height;
2335
2339
  const relativeStart = direction === 'horizontal' ? itemRect.left - containerRect.left : itemRect.top - containerRect.top;
2336
2340
  const relativeEnd = relativeStart + itemSize;
@@ -2512,6 +2516,12 @@ const signalElementIntersection = (el, options) => {
2512
2516
  currentValues = [...currentValues, intersectionEntry];
2513
2517
  }
2514
2518
  }
2519
+ const domOrder = untracked(elements).currentElements;
2520
+ const orderOf = (target) => {
2521
+ const index = domOrder.indexOf(target);
2522
+ return index === -1 ? domOrder.length : index;
2523
+ };
2524
+ currentValues.sort((a, b) => orderOf(a.target) - orderOf(b.target));
2515
2525
  zone.run(() => elementIntersectionSignal.set(currentValues));
2516
2526
  };
2517
2527
  const updateIntersectionObserver = (rendered, enabled, rootEl, margin, thresholdValue) => {
@@ -2954,7 +2964,10 @@ const createInitialRoute = () => {
2954
2964
  if (!isBrowser) {
2955
2965
  return router.url;
2956
2966
  }
2957
- const path = inject(Location).path(true);
2967
+ return readLocationPath(inject(Location));
2968
+ };
2969
+ const readLocationPath = (location) => {
2970
+ const path = location.path(true);
2958
2971
  return path.startsWith('/') ? path : `/${path}`;
2959
2972
  };
2960
2973
  /** Inject the current router event */
@@ -3040,14 +3053,20 @@ const createRouterState = (router) => {
3040
3053
  /**
3041
3054
  * Read the current route (the committed url without query params and fragment) straight from the router.
3042
3055
  * Unlike the `injectRoute` signal this reads synchronously, so it can be used inside a `router.events` handler
3043
- * where `router.url` is already committed. Falls back to the browser location before the first navigation commits.
3056
+ * where `router.url` is already committed. Before the first navigation commits it falls back to `location`
3057
+ * (without the base href) when given, else to the browser location.
3044
3058
  */
3045
- const createRoute = (router) => {
3046
- const browserUrl = typeof window === 'undefined'
3059
+ const createRoute = (router, location) => {
3060
+ const url = router.navigated ? router.url : readUncommittedUrl(router, location);
3061
+ return url.split('?')[0]?.split('#')[0] ?? '';
3062
+ };
3063
+ const readUncommittedUrl = (router, location) => {
3064
+ if (location) {
3065
+ return readLocationPath(location);
3066
+ }
3067
+ return typeof window === 'undefined'
3047
3068
  ? router.url
3048
3069
  : window.location.pathname + window.location.search + window.location.hash;
3049
- const url = router.navigated ? router.url : browserUrl;
3050
- return url.split('?')[0]?.split('#')[0] ?? '';
3051
3070
  };
3052
3071
  /**
3053
3072
  * Inject the complete router state. This includes the current route data, path params, query params, title and fragment.
@@ -3306,6 +3325,7 @@ const setupScrollRestoration = (config = {}) => {
3306
3325
  return;
3307
3326
  }
3308
3327
  const router = inject(Router);
3328
+ const location = inject(Location);
3309
3329
  const document = inject(DOCUMENT);
3310
3330
  const injector = inject(Injector);
3311
3331
  const destroyRef = inject(DestroyRef);
@@ -3334,7 +3354,7 @@ const setupScrollRestoration = (config = {}) => {
3334
3354
  let wantsRestore = false;
3335
3355
  let prev = {
3336
3356
  state: createRouterState(router),
3337
- route: createRoute(router),
3357
+ route: createRoute(router, location),
3338
3358
  routeConfig: getDeepestRouteConfig(router),
3339
3359
  };
3340
3360
  let pendingRestore = null;
@@ -3452,7 +3472,7 @@ const setupScrollRestoration = (config = {}) => {
3452
3472
  const onNavigationEnd = (event) => {
3453
3473
  const curr = {
3454
3474
  state: createRouterState(router),
3455
- route: createRoute(router),
3475
+ route: createRoute(router, location),
3456
3476
  routeConfig: getDeepestRouteConfig(router),
3457
3477
  };
3458
3478
  const prevState = prev.state;
@@ -3613,7 +3633,13 @@ const parseSeparatorAligns = (line) => parseTableRow(line).map((cell) => {
3613
3633
  const separatorFor = (align) => align === 'center' ? ':---:' : align === 'right' ? '---:' : align === 'left' ? ':---' : '---';
3614
3634
  const alignClass = (align) => (align ? ` class="et-rte-align-${align}"` : '');
3615
3635
  const alignOf = (attrs) => (/\bclass\s*=\s*["'][^"']*\bet-rte-align-([a-z]+)/i.exec(attrs)?.[1] ??
3616
- /\bstyle\s*=\s*["'][^"']*text-align:\s*([a-z]+)/i.exec(attrs)?.[1])?.toLowerCase() ?? null;
3636
+ /\bstyle\s*=\s*["'][^"']*text-align:\s*(?:-[a-z]+-)?([a-z]+)/i.exec(attrs)?.[1])?.toLowerCase() ?? null;
3637
+ const BLOCK_ALIGNS = /* @__PURE__ */ new Set(['center', 'right', 'justify']);
3638
+ const blockAlignOf = (attrs) => {
3639
+ const align = alignOf(attrs);
3640
+ return align && BLOCK_ALIGNS.has(align) ? align : null;
3641
+ };
3642
+ const isBlankHtml = (html) => !/<img\b/i.test(html) && !stripTags(html.replace(/&nbsp;/gi, ' ')).trim();
3617
3643
  /** Wraps `content` in an emphasis `marker`, hoisting boundary whitespace outside the delimiters -
3618
3644
  * CommonMark emphasis must not face whitespace on the inside (`** fett**` doesn't parse), and
3619
3645
  * `&nbsp;` counts as whitespace there too. Whitespace-only content stays unwrapped. */
@@ -3816,16 +3842,20 @@ const listToMarkdown = (inner, ordered, startNumber, depth) => {
3816
3842
  const indent = ' '.repeat(depth);
3817
3843
  let n = startNumber;
3818
3844
  return findListItems(inner)
3819
- .map((itemInner) => {
3845
+ .flatMap((itemInner) => {
3820
3846
  let content = itemInner;
3821
3847
  let nestedMarkdown = '';
3822
3848
  for (let nested = findList(content); nested; nested = findList(content)) {
3823
- nestedMarkdown += `\n${listToMarkdown(nested.inner, nested.ordered, nested.startNumber, depth + 1)}`;
3849
+ const nestedItems = listToMarkdown(nested.inner, nested.ordered, nested.startNumber, depth + 1);
3850
+ if (nestedItems)
3851
+ nestedMarkdown += `\n${nestedItems}`;
3824
3852
  content = content.slice(0, nested.start) + content.slice(nested.end);
3825
3853
  }
3854
+ if (!nestedMarkdown && isBlankHtml(content))
3855
+ return [];
3826
3856
  const marker = ordered ? `${n++}. ` : '- ';
3827
3857
  // list items are single-line in this serializer, so a <br> degrades to a space
3828
- return `${indent}${marker}${stripTags(content.replace(/<br\s*\/?>/gi, ' ')).trim()}${nestedMarkdown}`;
3858
+ return [`${indent}${marker}${stripTags(content.replace(/<br\s*\/?>/gi, ' ')).trim()}${nestedMarkdown}`];
3829
3859
  })
3830
3860
  .join('\n');
3831
3861
  };
@@ -3934,7 +3964,7 @@ const markdownToHtml = (markdown, options = {}) => {
3934
3964
  const align = aligned ? alignOf(aligned[2] ?? '') : null;
3935
3965
  if (aligned && align) {
3936
3966
  const tag = (aligned[1] ?? 'p').toLowerCase();
3937
- return `<${tag}${alignClass(align)}>${sanitizeInlineHtml(aligned[3] ?? '')}</${tag}>`;
3967
+ return `<${tag}${alignClass(BLOCK_ALIGNS.has(align) ? align : null)}>${sanitizeInlineHtml(aligned[3] ?? '')}</${tag}>`;
3938
3968
  }
3939
3969
  // Heading
3940
3970
  const headingMatch = trimmed.match(/^(#{1,6})\s+(.+)$/);
@@ -4004,9 +4034,12 @@ const htmlToMarkdown = (html) => {
4004
4034
  // stays HTML) and round-trip via a placeholder - extracted before the block passes below rewrite
4005
4035
  // them, restored after the final tag-strip.
4006
4036
  const alignedBlocks = [];
4007
- md = md.replace(/<(p|h[1-6]|div)\b([^>]*\b(?:style="[^"]*text-align|class="[^"]*\bet-rte-align-)[^>]*)>([\s\S]*?)<\/\1>/gi, (_, tag, attrs, inner) => {
4037
+ md = md.replace(/<(p|h[1-6]|div)\b([^>]*\b(?:style="[^"]*text-align|class="[^"]*\bet-rte-align-)[^>]*)>([\s\S]*?)<\/\1>/gi, (block, tag, attrs, inner) => {
4038
+ const align = blockAlignOf(attrs);
4039
+ if (!align)
4040
+ return block.replace(/^<[a-z0-9]+\b[^>]*>/i, `<${tag}>`);
4008
4041
  const name = tag.toLowerCase();
4009
- return makePlaceholder('ALIGN', alignedBlocks.push(`<${name}${alignClass(alignOf(attrs))}>${inner}</${name}>`) - 1);
4042
+ return makePlaceholder('ALIGN', alignedBlocks.push(`<${name}${alignClass(align)}>${inner}</${name}>`) - 1);
4010
4043
  });
4011
4044
  md = escapeTextNodes(md);
4012
4045
  // Code blocks - process before inline code
@@ -4016,7 +4049,7 @@ const htmlToMarkdown = (html) => {
4016
4049
  // Headings - keep the inner markup so the inline passes below turn any nested
4017
4050
  // bold/italic/link/code into markdown; leftover tags are stripped at the end.
4018
4051
  for (let i = 6; i >= 1; i--) {
4019
- md = md.replace(new RegExp(`<h${i}[^>]*>([\\s\\S]*?)<\\/h${i}>`, 'gi'), (_, content) => `\n${'#'.repeat(i)} ${content.trim()}\n`);
4052
+ md = md.replace(new RegExp(`<h${i}[^>]*>([\\s\\S]*?)<\\/h${i}>`, 'gi'), (_, content) => isBlankHtml(content) ? '\n' : `\n${'#'.repeat(i)} ${content.trim()}\n`);
4020
4053
  }
4021
4054
  // Bold + italic (combined before individual). Boundary whitespace is hoisted out of the
4022
4055
  // delimiters (emphasize) - `<strong> x</strong>` must become ` **x**`, not the invalid `** x**`.
@@ -4856,6 +4889,7 @@ const ANIMATION_CLASSES = {
4856
4889
  leaveDone: 'et-animation-leave-done',
4857
4890
  leaveInterrupt: 'et-animation-leave-interrupt',
4858
4891
  };
4892
+ const ALL_ANIMATION_CLASSES = /* @__PURE__ */ Object.values(ANIMATION_CLASSES);
4859
4893
  const FORCE_INVISIBLE_CLASS = 'et-force-invisible';
4860
4894
  class AnimatedLifecycleDirective {
4861
4895
  constructor() {
@@ -4902,9 +4936,9 @@ class AnimatedLifecycleDirective {
4902
4936
  return;
4903
4937
  if ((currentState === 'init' && !this.isConstructed) || this.skipNextEnter()) {
4904
4938
  this.debugLog('enter: instant (not constructed or skipNextEnter)', { currentState });
4905
- this.updateState('entered');
4939
+ this.cancelCurrentAnimation$.next();
4940
+ this.settleInstantly('entered');
4906
4941
  this.skipNextEnter.set(false);
4907
- this.addClass(ANIMATION_CLASSES.enterDone);
4908
4942
  this.forcedThisFrame = false;
4909
4943
  return;
4910
4944
  }
@@ -4922,9 +4956,7 @@ class AnimatedLifecycleDirective {
4922
4956
  transitionId,
4923
4957
  });
4924
4958
  if (skipAnimation) {
4925
- this.removeClasses(ANIMATION_CLASSES.leaveFrom, ANIMATION_CLASSES.leaveActive, ANIMATION_CLASSES.leaveTo, ANIMATION_CLASSES.leaveInterrupt);
4926
- this.updateState('entered');
4927
- this.addClass(ANIMATION_CLASSES.enterDone);
4959
+ this.settleInstantly('entered');
4928
4960
  previousCancel$.next();
4929
4961
  previousCancel$.complete();
4930
4962
  return;
@@ -4972,8 +5004,7 @@ class AnimatedLifecycleDirective {
4972
5004
  return;
4973
5005
  if (currentState === 'init') {
4974
5006
  this.debugLog('leave: instant (state is init, enter never ran)');
4975
- this.updateState('left');
4976
- this.addClass(ANIMATION_CLASSES.leaveDone);
5007
+ this.settleInstantly('left');
4977
5008
  this.forcedThisFrame = false;
4978
5009
  return;
4979
5010
  }
@@ -4991,9 +5022,7 @@ class AnimatedLifecycleDirective {
4991
5022
  transitionId,
4992
5023
  });
4993
5024
  if (skipAnimation) {
4994
- this.removeClasses(ANIMATION_CLASSES.enterFrom, ANIMATION_CLASSES.enterActive, ANIMATION_CLASSES.enterTo, ANIMATION_CLASSES.enterInterrupt);
4995
- this.updateState('left');
4996
- this.addClass(ANIMATION_CLASSES.leaveDone);
5025
+ this.settleInstantly('left');
4997
5026
  previousCancel$.next();
4998
5027
  previousCancel$.complete();
4999
5028
  return;
@@ -5037,18 +5066,20 @@ class AnimatedLifecycleDirective {
5037
5066
  }
5038
5067
  forceEnteredState() {
5039
5068
  this.cancelCurrentAnimation$.next();
5040
- this.updateState('entered');
5041
- this.removeClasses(ANIMATION_CLASSES.enterFrom, ANIMATION_CLASSES.enterActive, ANIMATION_CLASSES.enterTo, ANIMATION_CLASSES.leaveFrom, ANIMATION_CLASSES.leaveActive, ANIMATION_CLASSES.leaveTo);
5042
- this.addClass(ANIMATION_CLASSES.enterDone);
5069
+ this.settleInstantly('entered');
5043
5070
  this.markForcedThisFrame();
5044
5071
  }
5045
5072
  forceLeftState() {
5046
5073
  this.cancelCurrentAnimation$.next();
5047
- this.updateState('left');
5048
- this.removeClasses(ANIMATION_CLASSES.enterFrom, ANIMATION_CLASSES.enterActive, ANIMATION_CLASSES.enterTo, ANIMATION_CLASSES.leaveFrom, ANIMATION_CLASSES.leaveActive, ANIMATION_CLASSES.leaveTo);
5049
- this.addClass(ANIMATION_CLASSES.leaveDone);
5074
+ this.settleInstantly('left');
5050
5075
  this.markForcedThisFrame();
5051
5076
  }
5077
+ settleInstantly(state) {
5078
+ const doneClass = state === 'entered' ? ANIMATION_CLASSES.enterDone : ANIMATION_CLASSES.leaveDone;
5079
+ this.updateState(state);
5080
+ this.removeClasses(...ALL_ANIMATION_CLASSES.filter((cls) => cls !== doneClass));
5081
+ this.addClass(doneClass);
5082
+ }
5052
5083
  markForcedThisFrame() {
5053
5084
  this.forcedThisFrame = true;
5054
5085
  if (typeof requestAnimationFrame === 'undefined')
@@ -6703,12 +6734,9 @@ const createUnsavedChangesTracker = (config) => {
6703
6734
  throw new RuntimeError(UNSAVED_CHANGES_ERROR_CODES.MISSING_CONFIRM, '[createUnsavedChangesTracker] No confirm: pass `confirm` or call `provideUnsavedChangesConfirm()` in a parent injector.');
6704
6735
  }
6705
6736
  const normalized = normalizeUnsavedChangesSource(config.source);
6706
- const hasExplicitDefault = config.defaultValue !== undefined;
6707
- const initialDefault = hasExplicitDefault
6708
- ? typeof config.defaultValue === 'function'
6709
- ? config.defaultValue()
6710
- : config.defaultValue
6711
- : untracked(normalized.value);
6737
+ const explicitDefault = typeof config.defaultValue === 'function' ? config.defaultValue() : config.defaultValue;
6738
+ const hasExplicitDefault = explicitDefault !== undefined && explicitDefault !== null;
6739
+ const initialDefault = hasExplicitDefault ? explicitDefault : untracked(normalized.value);
6712
6740
  const _defaultValue = signal(initialDefault, /* @ts-ignore */
6713
6741
  ...(ngDevMode ? [{ debugName: "_defaultValue" }] : /* istanbul ignore next */ []));
6714
6742
  // No explicit default → capture the first non-null value the source produces as the baseline.
@@ -7073,6 +7101,9 @@ class ClickOutsideDirective {
7073
7101
  this.pressStartedInside = event.composedPath().includes(this.elementRef.nativeElement);
7074
7102
  }), takeUntilDestroyed())
7075
7103
  .subscribe();
7104
+ fromEvent(this.document.documentElement, 'pointercancel', { capture: true })
7105
+ .pipe(tap(() => (this.pressStartedInside = false)), takeUntilDestroyed())
7106
+ .subscribe();
7076
7107
  fromEvent(this.document.documentElement, 'click')
7077
7108
  .pipe(tap((event) => {
7078
7109
  const hostElement = this.elementRef.nativeElement;
@@ -7639,8 +7670,11 @@ const FOCUSABLE_SELECTOR = /* @__PURE__ */ [
7639
7670
  'select:not([disabled])',
7640
7671
  'textarea:not([disabled])',
7641
7672
  'iframe',
7673
+ 'audio[controls]',
7674
+ 'video[controls]',
7675
+ 'details > summary:first-of-type',
7642
7676
  '[tabindex]:not([tabindex="-1"])',
7643
- '[contenteditable="true"]',
7677
+ '[contenteditable]:not([contenteditable="false"])',
7644
7678
  ].join(',');
7645
7679
  const isHTMLElement = (value) => {
7646
7680
  // `instanceof` is realm-bound: an element adopted by a same-origin pop-up (the `document` mount
@@ -7670,10 +7704,24 @@ const isFocusable = (element, document) => {
7670
7704
  const view = document.defaultView;
7671
7705
  const style = view?.getComputedStyle(element);
7672
7706
  const isVisible = style?.display !== 'none' && style?.visibility !== 'hidden' && element.getClientRects().length > 0;
7673
- return isVisible && !element.hasAttribute('disabled') && element.tabIndex >= 0;
7674
- };
7707
+ return (isVisible &&
7708
+ !element.hasAttribute('disabled') &&
7709
+ !element.matches(':disabled') &&
7710
+ !element.closest('[inert]') &&
7711
+ element.tabIndex >= 0);
7712
+ };
7713
+ const isNamedRadio = (element) => element.tagName === 'INPUT' && element.type === 'radio' && !!element.name;
7714
+ const isSameTabStop = (a, b) => a === b || (isNamedRadio(a) && isNamedRadio(b) && a.name === b.name && a.form === b.form);
7715
+ /** The elements Tab stops on inside `container`, with each named radio group collapsed to its checked (else first) radio. */
7675
7716
  const getFocusableElements = (container, document) => {
7676
- return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => isFocusable(el, document));
7717
+ const elements = Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => isFocusable(el, document));
7718
+ return elements.filter((element) => {
7719
+ if (!isNamedRadio(element)) {
7720
+ return true;
7721
+ }
7722
+ const group = elements.filter((other) => isSameTabStop(element, other));
7723
+ return (group.find((radio) => radio.checked) ?? group[0]) === element;
7724
+ });
7677
7725
  };
7678
7726
  const getHeadingElement = (container) => {
7679
7727
  return container.querySelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
@@ -7729,12 +7777,12 @@ const setupFocusTrap = (paneElement, overlayRef, enabled, isTopMost, document) =
7729
7777
  focusElement(event.shiftKey ? (lastElement ?? null) : (firstElement ?? null));
7730
7778
  return;
7731
7779
  }
7732
- if (event.shiftKey && activeElement === firstElement) {
7780
+ if (event.shiftKey && firstElement && isSameTabStop(activeElement, firstElement)) {
7733
7781
  event.preventDefault();
7734
7782
  focusElement(lastElement ?? null);
7735
7783
  return;
7736
7784
  }
7737
- if (!event.shiftKey && activeElement === lastElement) {
7785
+ if (!event.shiftKey && lastElement && isSameTabStop(activeElement, lastElement)) {
7738
7786
  event.preventDefault();
7739
7787
  focusElement(firstElement ?? null);
7740
7788
  }
@@ -8364,6 +8412,7 @@ const createOverlayRuntimeRef = (id, config, elements, requestClose) => {
8364
8412
  }
8365
8413
  _state.set('closed');
8366
8414
  _componentInstance.set(null);
8415
+ afterOpenedSubject.complete();
8367
8416
  afterClosedSubject.next(closeEvent);
8368
8417
  afterClosedSubject.complete();
8369
8418
  },
@@ -8443,14 +8492,18 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8443
8492
  }
8444
8493
  };
8445
8494
  const isTopMost = (overlayRef) => {
8446
- const entries = openEntriesState();
8447
- for (let index = entries.length - 1; index >= 0; index--) {
8448
- const entry = entries[index];
8449
- if (!entry || entry.config.passive || entry.state() === 'closing' || entry.state() === 'closed')
8495
+ let topMost = null;
8496
+ let topMostLayer = -Infinity;
8497
+ for (const entry of openEntriesState()) {
8498
+ if (entry.config.passive || entry.state() === 'closing' || entry.state() === 'closed')
8450
8499
  continue;
8451
- return entry === overlayRef;
8500
+ const entryLayer = entry.config.zIndex ?? DEFAULT_OVERLAY_LAYER;
8501
+ if (entryLayer >= topMostLayer) {
8502
+ topMost = entry;
8503
+ topMostLayer = entryLayer;
8504
+ }
8452
8505
  }
8453
- return false;
8506
+ return topMost === overlayRef;
8454
8507
  };
8455
8508
  const getAnimatedLifecycle = (componentRef) => {
8456
8509
  const componentLifecycle = componentRef.instance.animatedLifecycle?.();
@@ -8601,7 +8654,13 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8601
8654
  openEntriesState.update((entries) => entries.filter((entry) => entry !== overlayRef));
8602
8655
  maybeDestroyRootElements(targetDocument);
8603
8656
  if (config.restoreFocus !== false && overlayStillOwnsFocus) {
8604
- focusRestoreChain.find((element) => element.isConnected)?.focus({ preventScroll: true });
8657
+ for (const element of focusRestoreChain) {
8658
+ if (!element.isConnected)
8659
+ continue;
8660
+ element.focus({ preventScroll: true });
8661
+ if (element.contains(targetDocument.activeElement))
8662
+ break;
8663
+ }
8605
8664
  }
8606
8665
  overlayRef.finishClose(closeEvent);
8607
8666
  };
@@ -8725,12 +8784,13 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8725
8784
  else {
8726
8785
  lifecycle.enter();
8727
8786
  }
8728
- lifecycle.state$
8787
+ const enteredSubscription = lifecycle.state$
8729
8788
  .pipe(filter((state) => state === 'entered'), take(1), tap(() => {
8730
8789
  applyInitialFocus(paneElement, autoFocus, targetDocument);
8731
8790
  overlayRef.markOpened();
8732
8791
  }))
8733
8792
  .subscribe();
8793
+ cleanupFns.push(() => enteredSubscription.unsubscribe());
8734
8794
  });
8735
8795
  return overlayRef;
8736
8796
  };
@@ -9633,6 +9693,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
9633
9693
  }]
9634
9694
  }], ctorParameters: () => [] });
9635
9695
 
9696
+ const COLOR_SCHEME_TYPE = new InjectionToken('ColorSchemeType');
9697
+
9636
9698
  const TOLERANCE_PX = 0.5;
9637
9699
  const readFontSizePx = (view, element) => {
9638
9700
  const match = /^(\d+(?:\.\d+)?)px$/.exec(view.getComputedStyle(element).fontSize ?? '');
@@ -9723,8 +9785,8 @@ const provideSurfaceThemesWithTailwind4 = (themes, prefix = 'et') => [
9723
9785
  /**
9724
9786
  * Inject the registered `isDefault` surface theme of a `type` - the surface an app renders on
9725
9787
  * where nothing scopes one. Without a `type`, resolves the default of the only surface type the
9726
- * app registers; an app registering both must name the one it means, since which of the two
9727
- * `:root` paints is a `prefers-color-scheme` decision. `null` when neither applies.
9788
+ * app registers; an app registering both must name the one it means. `null` when neither applies.
9789
+ * For the theme the root paints right now, use `injectRootSurfaceTheme()`.
9728
9790
  */
9729
9791
  const injectDefaultSurfaceTheme = (type) => {
9730
9792
  const defaults = injectSurfaceThemes({ optional: true })?.filter((theme) => theme.isDefault) ?? [];
@@ -9733,6 +9795,92 @@ const injectDefaultSurfaceTheme = (type) => {
9733
9795
  return defaults.length === 1 ? (defaults[0] ?? null) : null;
9734
9796
  };
9735
9797
 
9798
+ const findRootSurfaceTheme = (defaults, type) => {
9799
+ if (defaults.length <= 1)
9800
+ return defaults[0] ?? null;
9801
+ return defaults.find((theme) => theme.type === type) ?? null;
9802
+ };
9803
+ const COLOR_SCHEME_DEF = /* @__PURE__ */ defineProvider(() => {
9804
+ const root = inject(DOCUMENT).documentElement;
9805
+ const prefix = injectSurfaceThemesPrefix({ optional: true }) || 'et';
9806
+ const prefersDark = injectBreakpointObserver().observeMediaQuery('(prefers-color-scheme: dark)');
9807
+ const mode = signal('system', /* @ts-ignore */
9808
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
9809
+ const surfaceDefaults = injectSurfaceThemes({ optional: true })?.filter((theme) => theme.isDefault) ?? [];
9810
+ const colorThemes = injectColorThemes({ optional: true });
9811
+ const colorPrefix = injectColorThemesPrefix({ optional: true }) || 'et';
9812
+ const type = computed(() => {
9813
+ const current = mode();
9814
+ if (current !== 'system')
9815
+ return current;
9816
+ return prefersDark() ? 'dark' : 'light';
9817
+ }, /* @ts-ignore */
9818
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
9819
+ const rootSurface = computed(() => findRootSurfaceTheme(surfaceDefaults, type()), /* @ts-ignore */
9820
+ ...(ngDevMode ? [{ debugName: "rootSurface" }] : /* istanbul ignore next */ []));
9821
+ const rootColorClass = computed(() => {
9822
+ const chosen = colorThemes?.find((theme) => theme.isDefault)?.name;
9823
+ if (!chosen)
9824
+ return null;
9825
+ const variant = resolveColorThemeVariant(rootSurface(), chosen, colorThemes);
9826
+ return variant === chosen ? null : `${colorPrefix}-color--${createCssColorThemeName(variant)}`;
9827
+ }, /* @ts-ignore */
9828
+ ...(ngDevMode ? [{ debugName: "rootColorClass" }] : /* istanbul ignore next */ []));
9829
+ let paintedColorClass = null;
9830
+ const clearColorClass = () => {
9831
+ if (paintedColorClass)
9832
+ root.classList.remove(paintedColorClass);
9833
+ paintedColorClass = null;
9834
+ };
9835
+ effect(() => {
9836
+ const next = rootColorClass();
9837
+ clearColorClass();
9838
+ if (next)
9839
+ root.classList.add(next);
9840
+ paintedColorClass = next;
9841
+ });
9842
+ const clearClasses = () => root.classList.remove(`${prefix}-scheme--light`, `${prefix}-scheme--dark`);
9843
+ const setMode = (next) => {
9844
+ clearClasses();
9845
+ if (next !== 'system')
9846
+ root.classList.add(`${prefix}-scheme--${next}`);
9847
+ mode.set(next);
9848
+ };
9849
+ inject(DestroyRef).onDestroy(() => {
9850
+ clearClasses();
9851
+ clearColorClass();
9852
+ });
9853
+ return { mode: mode.asReadonly(), type, rootSurface, setMode };
9854
+ }, { name: 'Color Scheme' });
9855
+ const provideColorSchemeState = /* @__PURE__ */ toProvideFn(COLOR_SCHEME_DEF);
9856
+ /**
9857
+ * Inject the app's color scheme: `mode()` is what the app asked for, `type()` the surface type the
9858
+ * root paints, `rootSurface()` the default surface theme of that type, and `setMode()` switches it.
9859
+ * Needs `provideColorScheme()`.
9860
+ */
9861
+ const injectColorScheme = /* @__PURE__ */ toInjectFn(COLOR_SCHEME_DEF);
9862
+ /**
9863
+ * Lets the app switch between its default light and dark surface with a class on `<html>`, instead of
9864
+ * only following `prefers-color-scheme`. It also paints the root surface's `colorThemeVariants` entry for the
9865
+ * default accent on `<html>`. Add it to the application config, next to
9866
+ * `provideSurfaceThemesWithTailwind4()`.
9867
+ */
9868
+ const provideColorScheme = (config) => makeEnvironmentProviders([
9869
+ provideColorSchemeState(),
9870
+ { provide: COLOR_SCHEME_TYPE, useFactory: () => injectColorScheme().type },
9871
+ provideEnvironmentInitializer(() => injectColorScheme().setMode(config?.mode ?? 'system')),
9872
+ ]);
9873
+ /**
9874
+ * Inject a signal of the default surface theme the root paints where nothing scopes one. If the app
9875
+ * registers a default for both surface types, it follows `injectColorScheme()`, and is `null` without
9876
+ * `provideColorScheme()`.
9877
+ */
9878
+ const injectRootSurfaceTheme = () => {
9879
+ const defaults = injectSurfaceThemes({ optional: true })?.filter((theme) => theme.isDefault) ?? [];
9880
+ const colorSchemeType = inject(COLOR_SCHEME_TYPE, { optional: true });
9881
+ return computed(() => findRootSurfaceTheme(defaults, colorSchemeType?.()));
9882
+ };
9883
+
9736
9884
  /**
9737
9885
  * Reserved color name. Resolves the color tokens from the ambient surface's neutral swatch
9738
9886
  * (`SurfaceTheme['interactionColor']`) instead of a registered accent, so a secondary action can
@@ -9775,9 +9923,28 @@ const findColorThemeByType = (themes, type, caller) => {
9775
9923
  };
9776
9924
  const injectColorThemeByType = (type) => findColorThemeByType(injectColorThemes({ optional: true }), type, 'injectColorThemeByType');
9777
9925
  /**
9778
- * A signal of the color theme for `type` on the surface this element renders on: the theme the nearest
9779
- * surface names in `semanticColorThemes`, else the first registered theme of that `type`. Reading it throws
9780
- * when the app registered no theme of that `type`, so read it only for a state that renders.
9926
+ * The color theme name that draws `chosenName` on `surface`: the surface's `colorThemeVariants` entry for it,
9927
+ * else `chosenName` itself. Always pass the chosen accent, never an already swapped one.
9928
+ */
9929
+ const resolveColorThemeVariant = (surface, chosenName, themes) => {
9930
+ if (!surface || chosenName === SURFACE_COLOR)
9931
+ return chosenName;
9932
+ const variants = surface.colorThemeVariants;
9933
+ const variant = variants?.[chosenName];
9934
+ if (variant)
9935
+ return variant;
9936
+ const chosen = themes?.find((t) => t.name === chosenName);
9937
+ const semantic = chosen?.type ? surface.semanticColorThemes?.[chosen.type] : undefined;
9938
+ if (semantic)
9939
+ return semantic;
9940
+ if (surface.colorTheme && chosen?.isDefault)
9941
+ return surface.colorTheme;
9942
+ return chosenName;
9943
+ };
9944
+ /**
9945
+ * A signal of the color theme for `type` on the surface this element renders on: the first registered theme
9946
+ * of that `type`, swapped for the nearest surface's `colorThemeVariants` entry. Reading it throws when the app
9947
+ * registered no theme of that `type`, so read it only for a state that renders.
9781
9948
  *
9782
9949
  * @example
9783
9950
  * protected successTheme = injectSemanticColorTheme('success');
@@ -9786,17 +9953,20 @@ const injectColorThemeByType = (type) => findColorThemeByType(injectColorThemes(
9786
9953
  const injectSemanticColorTheme = (type) => {
9787
9954
  const themes = injectColorThemes({ optional: true });
9788
9955
  const surfaceProvider = inject(SURFACE_PROVIDER, { optional: true });
9789
- const defaultSurface = injectDefaultSurfaceTheme();
9956
+ const rootSurface = injectRootSurfaceTheme();
9790
9957
  return computed(() => {
9791
- const surface = surfaceProvider?.activeTheme() ?? defaultSurface;
9792
- const mappedName = surface?.semanticColorThemes?.[type];
9793
- const mapped = mappedName ? themes?.find((t) => t.name === mappedName) : undefined;
9794
- if (mapped)
9795
- return mapped;
9796
- if (mappedName && isDevMode()) {
9797
- console.error(`[injectSemanticColorTheme] Surface theme "${surface?.name}" maps "${type}" to the color theme "${mappedName}", which is not registered. Add it to provideColorThemesWithTailwind4().`);
9798
- }
9799
- return findColorThemeByType(themes, type, 'injectSemanticColorTheme');
9958
+ const chosen = findColorThemeByType(themes, type, 'injectSemanticColorTheme');
9959
+ const surface = surfaceProvider?.activeTheme() ?? rootSurface();
9960
+ const variantName = resolveColorThemeVariant(surface, chosen.name, themes);
9961
+ if (variantName === chosen.name)
9962
+ return chosen;
9963
+ const variant = themes?.find((t) => t.name === variantName);
9964
+ if (variant)
9965
+ return variant;
9966
+ if (isDevMode()) {
9967
+ console.error(`[injectSemanticColorTheme] Surface theme "${surface?.name}" maps "${type}" to the color theme "${variantName}", which is not registered. Add it to provideColorThemesWithTailwind4().`);
9968
+ }
9969
+ return chosen;
9800
9970
  });
9801
9971
  };
9802
9972
  /** @deprecated Use `injectSemanticColorTheme('error')`, which follows the surface the element renders on. */
@@ -9847,6 +10017,7 @@ class ProvideColorDirective {
9847
10017
  this.themes = injectColorThemes({ optional: true });
9848
10018
  this.prefix = injectColorThemesPrefix({ optional: true });
9849
10019
  this.injector = inject(Injector);
10020
+ this.rootSurfaceTheme = injectRootSurfaceTheme();
9850
10021
  this.parentProvider = inject(COLOR_PROVIDER, { optional: true, skipSelf: true });
9851
10022
  this.appRef = inject(ApplicationRef);
9852
10023
  this.currentProviderSync = null;
@@ -9897,12 +10068,25 @@ class ProvideColorDirective {
9897
10068
  return createCssColorThemeName(value);
9898
10069
  }, /* @ts-ignore */
9899
10070
  ...(ngDevMode ? [{ debugName: "colorName" }] : /* istanbul ignore next */ []));
10071
+ this.paintedColorName = computed(() => {
10072
+ const raw = this.effectiveColor();
10073
+ const value = typeof raw === 'object' && raw !== null ? raw.name : raw;
10074
+ if (!this.colorName() || !value)
10075
+ return;
10076
+ const surface = this.injector.get(SURFACE_PROVIDER, null)?.activeTheme() ?? this.rootSurfaceTheme();
10077
+ const variant = resolveColorThemeVariant(surface, value, this.themes);
10078
+ if (variant === value)
10079
+ return this.colorName();
10080
+ if (isDevMode() && !this.themes?.some((theme) => theme.name === variant)) {
10081
+ console.error(`Surface theme ${surface?.name} names the color theme ${variant}, which does not exist. Please make sure to add it to provideColorThemesWithTailwind4()`);
10082
+ }
10083
+ return createCssColorThemeName(variant);
10084
+ }, /* @ts-ignore */
10085
+ ...(ngDevMode ? [{ debugName: "paintedColorName" }] : /* istanbul ignore next */ []));
9900
10086
  this.themeClass = computed(() => {
9901
10087
  const prefix = this.prefix || 'et';
9902
- if (this.colorName()) {
9903
- return `${prefix}-color--${this.colorName()}`;
9904
- }
9905
- return `${prefix}-color--inherited`;
10088
+ const name = this.paintedColorName();
10089
+ return name ? `${prefix}-color--${name}` : `${prefix}-color--inherited`;
9906
10090
  }, /* @ts-ignore */
9907
10091
  ...(ngDevMode ? [{ debugName: "themeClass" }] : /* istanbul ignore next */ []));
9908
10092
  }
@@ -9961,10 +10145,13 @@ class ProvideSurfaceDirective {
9961
10145
  this.prefix = injectSurfaceThemesPrefix({ optional: true });
9962
10146
  this.injector = inject(Injector);
9963
10147
  this.parentProvider = inject(SURFACE_PROVIDER, { optional: true, skipSelf: true });
9964
- this.defaultTheme = injectDefaultSurfaceTheme();
10148
+ this.hostElement = injectHostElement();
10149
+ this.rootTheme = injectRootSurfaceTheme();
10150
+ this.hasColorScheme = !!inject(COLOR_SCHEME_TYPE, { optional: true });
9965
10151
  this.colorThemes = injectColorThemes({ optional: true });
9966
10152
  this.colorPrefix = injectColorThemesPrefix({ optional: true });
9967
10153
  this.colorProvider = inject(COLOR_PROVIDER, { optional: true });
10154
+ this.ownColorProvider = inject(COLOR_PROVIDER, { optional: true, self: true });
9968
10155
  this.currentProviderSync = null;
9969
10156
  this.forcedSurface = signal(FORCED_SURFACE_UNSET, /* @ts-ignore */
9970
10157
  ...(ngDevMode ? [{ debugName: "forcedSurface" }] : /* istanbul ignore next */ []));
@@ -9984,7 +10171,7 @@ class ProvideSurfaceDirective {
9984
10171
  // Only the outermost provider adopts the app default. A nested one left unset must keep
9985
10172
  // resolving to `null` so it reports the surface it inherits instead of resetting elevation.
9986
10173
  if (!value)
9987
- return this.parentProvider ? null : this.defaultTheme;
10174
+ return this.parentProvider ? null : this.rootTheme();
9988
10175
  const theme = this.themes.find((t) => t.name === value) ?? null;
9989
10176
  if (isDevMode() && !theme) {
9990
10177
  console.error(`Surface theme ${value} does not exist. Please make sure to add it to provideSurfaceThemesWithTailwind4()`);
@@ -10011,13 +10198,25 @@ class ProvideSurfaceDirective {
10011
10198
  }, /* @ts-ignore */
10012
10199
  ...(ngDevMode ? [{ debugName: "surfaceName" }] : /* istanbul ignore next */ []));
10013
10200
  this.colorThemeClass = computed(() => {
10014
- const colorTheme = this.resolvedTheme()?.colorTheme;
10015
- if (!colorTheme || this.colorProvider?.resolvedColor())
10201
+ const own = this.ownColorProvider?.effectiveColor();
10202
+ if (typeof own === 'object' && own !== null ? own.name : own)
10203
+ return null;
10204
+ const resolved = this.colorProvider?.resolvedColor();
10205
+ const chosen = (typeof resolved === 'object' && resolved !== null ? resolved.name : resolved) ||
10206
+ this.colorThemes?.find((theme) => theme.isDefault)?.name;
10207
+ if (!chosen)
10016
10208
  return null;
10017
- if (isDevMode() && !this.colorThemes?.some((theme) => theme.name === colorTheme)) {
10018
- console.error(`Surface theme ${this.resolvedTheme()?.name} names the color theme ${colorTheme}, which does not exist. Please make sure to add it to provideColorThemesWithTailwind4()`);
10209
+ const variant = resolveColorThemeVariant(this.activeTheme(), chosen, this.colorThemes);
10210
+ // An overlay pane's DI parent surface is not its DOM ancestor, so the pane cannot inherit the parent's class.
10211
+ const inheritsFromParent = !this.parentProvider || this.parentProvider.hostElement.contains(this.hostElement);
10212
+ if (inheritsFromParent &&
10213
+ variant === resolveColorThemeVariant(this.inheritedSurfaceTheme(), chosen, this.colorThemes)) {
10214
+ return null;
10215
+ }
10216
+ if (isDevMode() && !this.colorThemes?.some((theme) => theme.name === variant)) {
10217
+ console.error(`Surface theme ${this.activeTheme()?.name} names the color theme ${variant}, which does not exist. Please make sure to add it to provideColorThemesWithTailwind4()`);
10019
10218
  }
10020
- return `${this.colorPrefix || 'et'}-color--${createCssColorThemeName(colorTheme)}`;
10219
+ return `${this.colorPrefix || 'et'}-color--${createCssColorThemeName(variant)}`;
10021
10220
  }, /* @ts-ignore */
10022
10221
  ...(ngDevMode ? [{ debugName: "colorThemeClass" }] : /* istanbul ignore next */ []));
10023
10222
  this.surfaceClass = computed(() => {
@@ -10030,6 +10229,11 @@ class ProvideSurfaceDirective {
10030
10229
  }, /* @ts-ignore */
10031
10230
  ...(ngDevMode ? [{ debugName: "surfaceClass" }] : /* istanbul ignore next */ []));
10032
10231
  }
10232
+ inheritedSurfaceTheme() {
10233
+ if (this.parentProvider)
10234
+ return this.parentProvider.activeTheme();
10235
+ return this.hasColorScheme ? this.rootTheme() : null;
10236
+ }
10033
10237
  syncWithProvider(provider) {
10034
10238
  this.currentProviderSync?.destroy();
10035
10239
  runInInjectionContext(this.injector, () => {
@@ -10082,22 +10286,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
10082
10286
  */
10083
10287
  const injectSurfaceType = () => {
10084
10288
  const provider = inject(SURFACE_PROVIDER, { optional: true, skipSelf: true });
10085
- const defaultType = injectDefaultSurfaceTheme()?.type ?? null;
10086
- return computed(() => provider?.surfaceType() ?? defaultType);
10289
+ const rootTheme = injectRootSurfaceTheme();
10290
+ return computed(() => provider?.surfaceType() ?? rootTheme()?.type ?? null);
10087
10291
  };
10088
10292
  /**
10089
10293
  * Inject a signal containing the surface theme the current subtree renders on - the theme in
10090
10294
  * effect on the surrounding surface provider, or the app's default surface where nothing provides
10091
10295
  * one. Use it to derive an elevation relative to the surrounding surface.
10092
10296
  *
10093
- * `null` where the app registers no surface themes, or registers a default per surface type -
10094
- * which of those two `:root` paints is a `prefers-color-scheme` decision, so it cannot be
10095
- * resolved at runtime.
10297
+ * `null` where the app registers no surface themes, or registers a default per surface type
10298
+ * without `provideColorScheme()`.
10096
10299
  */
10097
10300
  const injectParentSurface = () => {
10098
10301
  const provider = inject(SURFACE_PROVIDER, { optional: true, skipSelf: true });
10099
- const defaultTheme = injectDefaultSurfaceTheme();
10100
- return computed(() => provider?.activeTheme() ?? defaultTheme);
10302
+ const rootTheme = injectRootSurfaceTheme();
10303
+ return computed(() => provider?.activeTheme() ?? rootTheme());
10101
10304
  };
10102
10305
 
10103
10306
  let uniqueId = 0;
@@ -10519,11 +10722,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
10519
10722
 
10520
10723
  // Generated from package.json by tools/scripts/generate-version.js - do not edit.
10521
10724
  /** The version of `@ethlete/core` this build was cut from. */
10522
- const CORE_VERSION = '5.0.0-next.62';
10725
+ const CORE_VERSION = '5.0.0-next.64';
10523
10726
 
10524
10727
  /**
10525
10728
  * Generated bundle index. Do not edit.
10526
10729
  */
10527
10730
 
10528
- export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, ANIMATION_ERROR_CODES, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PALETTE, COLOR_PROVIDER, CORE_VERSION, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_OVERLAY_LAYER, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, ET_RESTORE_SCROLL, EasingTokensStylesComponent, EthleteValidators, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd as JsonLD, KeyPressManager, MARKDOWN_VERBATIM_ATTR, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NOTIFICATION_CLICK_MESSAGE_TYPE, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OVERLAY_LAYER_ATTRIBUTE, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RestoreScrollDirective, RuntimeError, SURFACE_COLOR, SURFACE_PROVIDER, SURFACE_TYPE, SWIPE_VELOCITY_WINDOW_MS, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, UNSAVED_CHANGES_CONFIRM, UNSAVED_CHANGES_ERROR_CODES, UNSAVED_CHANGES_TITLE_MARKER, ValidateAtLeastOneRequired, VisuallyHiddenStylesComponent, anchoredOverlayPosition, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyFaviconOverlay, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHeadTitleMarker, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, boolBreakpointTransform, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDestroy, createDocumentElementSignal, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createIsRenderedSignal, createLogger, createObjectUrlHandle, createPropertyBinding, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUnsavedChangesGuard, createUnsavedChangesTabLock, createUnsavedChangesTracker, createUserConsentProvider, deferredSignal, defineLabels, defineProvider, defineRootProvider, defineStaticProvider, defineStaticRootProvider, deleteCookie, dragGestureFrom, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, enableAnchoredOverlayPositionExtras, equal, fetchDeployedBuildFingerprint$, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, holdScrollRestoration, htmlToMarkdown, inferMimeType, initials, injectAngularRootElement, injectAnimatedBlockSize, injectAppUpdates, injectAppUpdatesConfig, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorPalette, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDefaultColorTheme, injectDefaultSurfaceTheme, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFaviconStore, injectFileDownload, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsDocumentVisible, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectNotifications, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectParentSurface, injectPathParam, injectPathParamChanges, injectPathParams, injectPrefersReducedMotion, injectQueryParam, injectQueryParamAll, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterNavigationState, injectRouterState, injectScrollbarDimensions, injectSemanticColorTheme, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceColorPalette, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectSurfaceType, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUnsavedChangesCoordinator, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElement, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isHTMLOrSVGElement, isKnockoutMatch, isObject, isOnHigherOverlayLayer, isSafeLinkUrl, isSafeUrl, isStaleBuildError, markdownToHtml, matchesReducedMotion, maybeSignalValue, memoizeSignal, mountEasingTokens, mountVisuallyHidden, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, normalizeUnsavedChangesSource, numberBreakpointTransform, onOverlayViewportInsetsChange, optionalBooleanAttribute, overlayViewportInsets, overlayViewportInsetsFor, ownsActiveElement, previousSignalValue, provideAppUpdates, provideAppUpdatesConfig, provideAppUpdatesInstance, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorPalette, provideColorThemes, provideColorThemesWithTailwind4, provideFaviconStore, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideNotifications, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideUnsavedChangesConfirm, provideUnsavedChangesCoordinator, provideViewportConfig, randomId, readBuildFingerprint, readFromClipboard, reserveOverlayViewportSpace, resolveAppRootColorProvider, resolveOverlayLayer, resolveSurfaceByElevation, round, routerDisableScrollTop, routerRestoreScroll, scrollToElement, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalCountdown, signalDeferredLoading, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, slugify, suppressTextSelection, switchQueryListChanges, syncSignal, toArray, toArrayTrackByFn, toInjectFn, toProvideFn, toStringBinding, toToken, transformOrReturn, typedBreakpointTransform, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
10731
+ export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, ANIMATION_ERROR_CODES, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PALETTE, COLOR_PROVIDER, CORE_VERSION, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_OVERLAY_LAYER, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, ET_RESTORE_SCROLL, EasingTokensStylesComponent, EthleteValidators, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd as JsonLD, KeyPressManager, MARKDOWN_VERBATIM_ATTR, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NOTIFICATION_CLICK_MESSAGE_TYPE, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OVERLAY_LAYER_ATTRIBUTE, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RestoreScrollDirective, RuntimeError, SURFACE_COLOR, SURFACE_PROVIDER, SURFACE_TYPE, SWIPE_VELOCITY_WINDOW_MS, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, UNSAVED_CHANGES_CONFIRM, UNSAVED_CHANGES_ERROR_CODES, UNSAVED_CHANGES_TITLE_MARKER, ValidateAtLeastOneRequired, VisuallyHiddenStylesComponent, anchoredOverlayPosition, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyFaviconOverlay, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHeadTitleMarker, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, boolBreakpointTransform, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDestroy, createDocumentElementSignal, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createIsRenderedSignal, createLogger, createObjectUrlHandle, createPropertyBinding, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUnsavedChangesGuard, createUnsavedChangesTabLock, createUnsavedChangesTracker, createUserConsentProvider, deferredSignal, defineLabels, defineProvider, defineRootProvider, defineStaticProvider, defineStaticRootProvider, deleteCookie, dragGestureFrom, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, enableAnchoredOverlayPositionExtras, equal, fetchDeployedBuildFingerprint$, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, holdScrollRestoration, htmlToMarkdown, inferMimeType, initials, injectAngularRootElement, injectAnimatedBlockSize, injectAppUpdates, injectAppUpdatesConfig, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorPalette, injectColorScheme, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDefaultColorTheme, injectDefaultSurfaceTheme, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFaviconStore, injectFileDownload, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsDocumentVisible, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectNotifications, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectParentSurface, injectPathParam, injectPathParamChanges, injectPathParams, injectPrefersReducedMotion, injectQueryParam, injectQueryParamAll, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRootSurfaceTheme, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterNavigationState, injectRouterState, injectScrollbarDimensions, injectSemanticColorTheme, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceColorPalette, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectSurfaceType, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUnsavedChangesCoordinator, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElement, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isHTMLOrSVGElement, isKnockoutMatch, isObject, isOnHigherOverlayLayer, isSafeLinkUrl, isSafeUrl, isStaleBuildError, markdownToHtml, matchesReducedMotion, maybeSignalValue, memoizeSignal, mountEasingTokens, mountVisuallyHidden, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, normalizeUnsavedChangesSource, numberBreakpointTransform, onOverlayViewportInsetsChange, optionalBooleanAttribute, overlayViewportInsets, overlayViewportInsetsFor, ownsActiveElement, previousSignalValue, provideAppUpdates, provideAppUpdatesConfig, provideAppUpdatesInstance, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorPalette, provideColorScheme, provideColorThemes, provideColorThemesWithTailwind4, provideFaviconStore, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideNotifications, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideUnsavedChangesConfirm, provideUnsavedChangesCoordinator, provideViewportConfig, randomId, readBuildFingerprint, readFromClipboard, reserveOverlayViewportSpace, resolveAppRootColorProvider, resolveColorThemeVariant, resolveOverlayLayer, resolveSurfaceByElevation, round, routerDisableScrollTop, routerRestoreScroll, scrollToElement, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalCountdown, signalDeferredLoading, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, slugify, suppressTextSelection, switchQueryListChanges, syncSignal, toArray, toArrayTrackByFn, toInjectFn, toProvideFn, toStringBinding, toToken, transformOrReturn, typedBreakpointTransform, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
10529
10732
  //# sourceMappingURL=ethlete-core.mjs.map