@ethlete/cdk 4.63.1 → 4.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, TemplateRef, ViewContainerRef, Directive, input, booleanAttribute, computed, isDevMode, model, contentChild, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, ElementRef, Injector, HostBinding, Input, signal, numberAttribute, Renderer2, DOCUMENT, viewChild, viewChildren, ContentChild, Injectable, ChangeDetectorRef, ViewChild, ContentChildren, assertInInjectionContext, forwardRef, runInInjectionContext, EventEmitter, Output, ViewChildren, Optional, Inject, NgZone, HostListener, SkipSelf, NgModule, DestroyRef, isSignal, IterableDiffers, ComponentFactoryResolver, HostAttributeToken } from '@angular/core';
2
+ import { InjectionToken, inject, TemplateRef, ViewContainerRef, Directive, input, booleanAttribute, computed, isDevMode, model, contentChild, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, ElementRef, Injector, HostBinding, Input, numberAttribute, Renderer2, DOCUMENT, signal, viewChild, viewChildren, ContentChild, Injectable, ChangeDetectorRef, ViewChild, ContentChildren, assertInInjectionContext, forwardRef, runInInjectionContext, EventEmitter, Output, ViewChildren, Optional, Inject, NgZone, HostListener, SkipSelf, NgModule, DestroyRef, isSignal, IterableDiffers, ComponentFactoryResolver, HostAttributeToken } from '@angular/core';
3
3
  import * as i2 from '@angular/cdk/portal';
4
4
  import { CdkPortal, PortalModule, ComponentPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
5
5
  import { DomSanitizer, Title } from '@angular/platform-browser';
@@ -7,7 +7,7 @@ import { trigger, state, transition, style, animate } from '@angular/animations'
7
7
  import { toObservable, takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
8
8
  import { map, switchMap, combineLatest, pairwise, tap, BehaviorSubject, takeUntil, skip, of, merge, timer, takeWhile, filter, fromEvent, Subject, Observable, startWith, debounceTime, withLatestFrom, distinctUntilChanged, take, skipUntil, skipWhile, catchError, throwError, defer, partition, from, finalize, Subscription } from 'rxjs';
9
9
  import { __decorate, __metadata } from 'tslib';
10
- import { AsyncPipe, JsonPipe, NgComponentOutlet, NgClass, NgTemplateOutlet, DOCUMENT as DOCUMENT$1, Location, NgStyle } from '@angular/common';
10
+ import { AsyncPipe, NgComponentOutlet, NgClass, NgTemplateOutlet, DOCUMENT as DOCUMENT$1, Location, NgStyle } from '@angular/common';
11
11
  import * as i1 from '@ethlete/core';
12
12
  import { Memo, createComponentId, signalHostAttributes, signalHostClasses, createDestroy, previousSignalValue, signalHostStyles, nextFrame, syncSignal, signalStyles, injectHostElement, ObserveVisibilityDirective, signalVisibilityChangeClasses, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, equal, switchQueryListChanges, controlValueSignal, signalAttributes, ResizeObserverService, createFlipAnimation, AnimatedOverlayDirective, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, signalClasses, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, AnimatedLifecycleDirective, ANIMATED_LIFECYCLE_TOKEN, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, SmartBlockScrollStrategy, signalElementDimensions, signalElementScrollState, createIsRenderedSignal, createCanAnimateSignal, useCursorDragScroll, signalElementIntersection, signalElementChildren, getIntersectionInfo, getElementScrollCoordinates, ClickObserverService, RootBoundaryDirective, elementCanScroll, cloneFormGroup, getFormGroupValue, ViewportService, injectRoute, ROOT_BOUNDARY_TOKEN, injectQueryParam, RouterStateService, fromNextFrame, isElementVisible, AnimatedIfDirective, FocusVisibleService, inferMimeType, TypedQueryList } from '@ethlete/core';
13
13
  import { extractQuery, isQueryStateSuccess, isQueryStateFailure, isQueryStateLoading, QueryDirective, queryComputed, switchQueryState, shouldRetryRequest, ExperimentalQuery, isClassValidatorError, isSymfonyFormViolationListError, isSymfonyListError } from '@ethlete/query';
@@ -1344,10 +1344,10 @@ const createMatchesMapBase = (source, rounds, participants) => {
1344
1344
 
1345
1345
  const createParticipantsMapBase = (source) => {
1346
1346
  const map = new BracketMap();
1347
- const participantIds = new Set(source.matches
1347
+ const participantIds = source.matches
1348
1348
  .map((m) => [m.home, m.away])
1349
1349
  .flat()
1350
- .filter((p) => !!p));
1350
+ .filter((p) => !!p);
1351
1351
  for (const [index, participantId] of participantIds.entries()) {
1352
1352
  const participantBase = {
1353
1353
  id: participantId,
@@ -1584,13 +1584,13 @@ class NewBracketDefaultMatchComponent {
1584
1584
  this.bracketMatch = input.required(...(ngDevMode ? [{ debugName: "bracketMatch" }] : []));
1585
1585
  }
1586
1586
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDefaultMatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1587
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.2", type: NewBracketDefaultMatchComponent, isStandalone: true, selector: "et-new-bracket-default-match", inputs: { bracketRound: { classPropertyName: "bracketRound", publicName: "bracketRound", isSignal: true, isRequired: true, transformFunction: null }, bracketMatch: { classPropertyName: "bracketMatch", publicName: "bracketMatch", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-new-bracket-default-match-host" }, ngImport: i0, template: ` {{ bracketMatch().id }} `, isInline: true, styles: [".et-new-bracket-default-match-host{display:block;padding:8px;border:1px solid yellow;inline-size:250px;block-size:75px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1587
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.2", type: NewBracketDefaultMatchComponent, isStandalone: true, selector: "et-new-bracket-default-match", inputs: { bracketRound: { classPropertyName: "bracketRound", publicName: "bracketRound", isSignal: true, isRequired: true, transformFunction: null }, bracketMatch: { classPropertyName: "bracketMatch", publicName: "bracketMatch", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-new-bracket-default-match-host" }, ngImport: i0, template: ` {{ bracketMatch().id }} `, isInline: true, styles: [".et-new-bracket-default-match-host{display:block;padding:8px;border:1px solid yellow;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1588
1588
  }
1589
1589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDefaultMatchComponent, decorators: [{
1590
1590
  type: Component,
1591
1591
  args: [{ selector: 'et-new-bracket-default-match', template: ` {{ bracketMatch().id }} `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1592
1592
  class: 'et-new-bracket-default-match-host',
1593
- }, styles: [".et-new-bracket-default-match-host{display:block;padding:8px;border:1px solid yellow;inline-size:250px;block-size:75px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"] }]
1593
+ }, styles: [".et-new-bracket-default-match-host{display:block;padding:8px;border:1px solid yellow;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"] }]
1594
1594
  }] });
1595
1595
 
1596
1596
  class NewBracketDefaultRoundHeaderComponent {
@@ -1598,13 +1598,13 @@ class NewBracketDefaultRoundHeaderComponent {
1598
1598
  this.bracketRound = input.required(...(ngDevMode ? [{ debugName: "bracketRound" }] : []));
1599
1599
  }
1600
1600
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDefaultRoundHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1601
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.2", type: NewBracketDefaultRoundHeaderComponent, isStandalone: true, selector: "et-new-bracket-default-round-header", inputs: { bracketRound: { classPropertyName: "bracketRound", publicName: "bracketRound", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-new-bracket-default-round-header-host" }, ngImport: i0, template: ` {{ bracketRound().name }} `, isInline: true, styles: [".et-new-bracket-default-round-header-host{display:block;padding:8px;border:1px solid green;inline-size:250px;block-size:50px;display:flex;justify-content:center;align-items:center;box-sizing:border-box}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1601
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.2", type: NewBracketDefaultRoundHeaderComponent, isStandalone: true, selector: "et-new-bracket-default-round-header", inputs: { bracketRound: { classPropertyName: "bracketRound", publicName: "bracketRound", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-new-bracket-default-round-header-host" }, ngImport: i0, template: ` {{ bracketRound().name }} `, isInline: true, styles: [".et-new-bracket-default-round-header-host{display:block;padding:8px;border:1px solid green;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1602
1602
  }
1603
1603
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDefaultRoundHeaderComponent, decorators: [{
1604
1604
  type: Component,
1605
1605
  args: [{ selector: 'et-new-bracket-default-round-header', template: ` {{ bracketRound().name }} `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1606
1606
  class: 'et-new-bracket-default-round-header-host',
1607
- }, styles: [".et-new-bracket-default-round-header-host{display:block;padding:8px;border:1px solid green;inline-size:250px;block-size:50px;display:flex;justify-content:center;align-items:center;box-sizing:border-box}\n"] }]
1607
+ }, styles: [".et-new-bracket-default-round-header-host{display:block;padding:8px;border:1px solid green;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box}\n"] }]
1608
1608
  }] });
1609
1609
 
1610
1610
  const path = (d, options) => `<path d="${d.replace(/\s+/g, ' ').trim()}" stroke="currentColor" fill="none" stroke-width="${options.width}" stroke-dasharray="${options.dashArray}" stroke-dashoffset="${options.dashOffset}" class="${options.className}" />`;
@@ -1648,6 +1648,1158 @@ const linePath = (from, to, options) => {
1648
1648
  return path(`M ${from.inline.end} ${from.block.center} L ${to.inline.start} ${to.block.center}`, options.path);
1649
1649
  };
1650
1650
 
1651
+ const makePos = (dimensions) => ({
1652
+ block: {
1653
+ start: dimensions.top,
1654
+ end: dimensions.top + dimensions.height,
1655
+ center: dimensions.top + dimensions.height / 2,
1656
+ },
1657
+ inline: {
1658
+ start: dimensions.left,
1659
+ end: dimensions.left + dimensions.width,
1660
+ center: dimensions.left + dimensions.width / 2,
1661
+ },
1662
+ });
1663
+ const drawMan = (dimensions) => {
1664
+ const svgParts = [];
1665
+ for (const col of dimensions.bracketGrid.columns) {
1666
+ for (const el of col.elements) {
1667
+ if (el.type === 'header')
1668
+ continue;
1669
+ const currentMatchParticipantsShortIds = [el.match.home?.shortId, el.match.away?.shortId]
1670
+ .filter((id) => !!id)
1671
+ .join(' ');
1672
+ const pathOptions = { ...dimensions.path, className: currentMatchParticipantsShortIds };
1673
+ const currentPos = makePos(el.dimensions);
1674
+ // No lines for the third place match
1675
+ if (el.round.type === COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)
1676
+ continue;
1677
+ switch (el.match.relation.type) {
1678
+ case 'nothing-to-one': {
1679
+ continue;
1680
+ }
1681
+ case 'one-to-nothing':
1682
+ case 'one-to-one': {
1683
+ const prev = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousMatch.id);
1684
+ const prevPos = makePos(prev.dimensions);
1685
+ // draw a straight line
1686
+ svgParts.push(linePath(prevPos, currentPos, { path: pathOptions }));
1687
+ break;
1688
+ }
1689
+ case 'two-to-nothing':
1690
+ case 'two-to-one': {
1691
+ const prevUpper = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousUpperMatch.id);
1692
+ const prevLower = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousLowerMatch.id);
1693
+ const prevUpperPos = makePos(prevUpper.dimensions);
1694
+ const prevLowerPos = makePos(prevLower.dimensions);
1695
+ const isLowerUpperMerger = el.match.relation.previousLowerRound.id !== el.match.relation.previousUpperRound.id;
1696
+ const invertCurve = el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT;
1697
+ const curveOptions = {
1698
+ ...dimensions.curve,
1699
+ inverted: invertCurve,
1700
+ path: { ...dimensions.path, className: '' },
1701
+ };
1702
+ if (isLowerUpperMerger) {
1703
+ svgParts.push(linePath(prevUpperPos, currentPos, { path: pathOptions }));
1704
+ }
1705
+ else {
1706
+ // draw two lines that merge into one in the middle
1707
+ svgParts.push(curvePath(prevUpperPos, currentPos, 'down', {
1708
+ ...curveOptions,
1709
+ path: {
1710
+ ...curveOptions.path,
1711
+ className: el.match.relation.previousUpperMatch.winner?.shortId || '',
1712
+ },
1713
+ }));
1714
+ }
1715
+ svgParts.push(curvePath(prevLowerPos, currentPos, 'up', {
1716
+ ...curveOptions,
1717
+ path: {
1718
+ ...curveOptions.path,
1719
+ className: el.match.relation.previousLowerMatch.winner?.shortId || '',
1720
+ },
1721
+ }));
1722
+ if (el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT &&
1723
+ el.match.relation.type === 'two-to-one' &&
1724
+ el.match.relation.nextRound.mirrorRoundType === null) {
1725
+ // draw a straight line for the special case of connecting the final match to the mirrored semi final match
1726
+ const next = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.nextMatch.id);
1727
+ const nextPos = makePos(next.dimensions);
1728
+ svgParts.push(linePath(nextPos, currentPos, { path: pathOptions }));
1729
+ }
1730
+ break;
1731
+ }
1732
+ }
1733
+ }
1734
+ }
1735
+ return svgParts.join('');
1736
+ };
1737
+
1738
+ const createBracketElementPart = (config) => {
1739
+ const { elementPartHeight } = config;
1740
+ const newElementPart = {
1741
+ dimensions: {
1742
+ width: 0,
1743
+ height: elementPartHeight,
1744
+ top: 0,
1745
+ left: 0,
1746
+ },
1747
+ };
1748
+ return {
1749
+ elementPart: newElementPart,
1750
+ };
1751
+ };
1752
+
1753
+ const createBracketElement = (config) => {
1754
+ const { type, area, elementHeight, partHeights } = config;
1755
+ const parts = [];
1756
+ const newElementBase = {
1757
+ dimensions: {
1758
+ width: 0,
1759
+ height: elementHeight,
1760
+ top: 0,
1761
+ left: 0,
1762
+ },
1763
+ containerDimensions: {
1764
+ width: 0,
1765
+ height: 0,
1766
+ top: 0,
1767
+ left: 0,
1768
+ },
1769
+ parts,
1770
+ area,
1771
+ };
1772
+ const newElement = (() => {
1773
+ switch (type) {
1774
+ case 'header':
1775
+ return {
1776
+ ...newElementBase,
1777
+ type,
1778
+ component: config.component,
1779
+ round: config.round,
1780
+ };
1781
+ case 'match':
1782
+ return {
1783
+ ...newElementBase,
1784
+ type,
1785
+ component: config.component,
1786
+ match: config.match,
1787
+ round: config.round,
1788
+ };
1789
+ case 'matchGap':
1790
+ case 'roundHeaderGap':
1791
+ case 'roundGap':
1792
+ case 'colGap':
1793
+ return {
1794
+ ...newElementBase,
1795
+ type,
1796
+ };
1797
+ default:
1798
+ throw new Error(`Unknown element type: ${type}`);
1799
+ }
1800
+ })();
1801
+ const pushPart = (...newParts) => {
1802
+ parts.push(...newParts);
1803
+ };
1804
+ for (const partHeight of partHeights) {
1805
+ const { elementPart } = createBracketElementPart({
1806
+ elementPartHeight: partHeight,
1807
+ });
1808
+ pushPart(elementPart);
1809
+ }
1810
+ return {
1811
+ element: newElement,
1812
+ };
1813
+ };
1814
+
1815
+ const finalizeBracketGrid = (grid) => {
1816
+ const finalizedColumns = [];
1817
+ const finalizedElementMap = new BracketMap();
1818
+ const ignoredSections = [];
1819
+ for (const [masterColumnIndex, masterColumn] of grid.grid.masterColumns.entries()) {
1820
+ for (const [sectionIndex, section] of masterColumn.sections.entries()) {
1821
+ if (ignoredSections.some((s) => s.masterColumnIndex === masterColumnIndex && s.sectionIndex === sectionIndex)) {
1822
+ continue;
1823
+ }
1824
+ const elements = [];
1825
+ const firstSubColumn = section.subColumns[0];
1826
+ const lastSubColumn = section.subColumns[section.subColumns.length - 1];
1827
+ if (!firstSubColumn || !lastSubColumn)
1828
+ continue;
1829
+ let sectionWidth = section.dimensions.width;
1830
+ for (const element of firstSubColumn.elements) {
1831
+ if (element.type === 'header') {
1832
+ elements.push({
1833
+ type: 'header',
1834
+ dimensions: element.dimensions,
1835
+ component: element.component,
1836
+ round: element.round,
1837
+ });
1838
+ }
1839
+ else if (element.type === 'match') {
1840
+ const matchEl = {
1841
+ type: 'match',
1842
+ dimensions: element.dimensions,
1843
+ component: element.component,
1844
+ match: element.match,
1845
+ round: element.round,
1846
+ classes: [element.match.home?.shortId, element.match.away?.shortId].filter((v) => !!v).join(' '),
1847
+ };
1848
+ elements.push(matchEl);
1849
+ finalizedElementMap.set(element.match.id, matchEl);
1850
+ }
1851
+ }
1852
+ if (!lastSubColumn.span.isEnd) {
1853
+ for (let index = masterColumnIndex + 1; index < grid.grid.masterColumns.length; index++) {
1854
+ const nextMaster = grid.grid.masterColumns[index];
1855
+ const nextSection = nextMaster?.sections[sectionIndex];
1856
+ if (!nextSection)
1857
+ break;
1858
+ sectionWidth += nextSection.dimensions.width;
1859
+ ignoredSections.push({ masterColumnIndex: index, sectionIndex });
1860
+ if (nextSection.subColumns.some((sc) => sc.span.isEnd)) {
1861
+ break;
1862
+ }
1863
+ }
1864
+ }
1865
+ if (!elements.length)
1866
+ continue;
1867
+ finalizedColumns.push({
1868
+ dimensions: {
1869
+ ...section.dimensions,
1870
+ width: sectionWidth,
1871
+ },
1872
+ elements,
1873
+ });
1874
+ }
1875
+ }
1876
+ return {
1877
+ columns: finalizedColumns,
1878
+ elementMap: finalizedElementMap,
1879
+ };
1880
+ };
1881
+
1882
+ const createBracketGrid = (config) => {
1883
+ const masterColumns = [];
1884
+ const spannedWidthCache = new Map();
1885
+ const spanStartLeftCache = new Map();
1886
+ const newGrid = {
1887
+ dimensions: { width: 0, height: 0, top: 0, left: 0 },
1888
+ masterColumns,
1889
+ };
1890
+ const pushMasterColumn = (...newMasterColumns) => {
1891
+ masterColumns.push(...newMasterColumns);
1892
+ };
1893
+ const calculateDimensions = () => {
1894
+ let currentMasterColumnLeft = 0;
1895
+ let maxGridHeight = 0;
1896
+ const masterCols = newGrid.masterColumns;
1897
+ for (let mcIdx = 0; mcIdx < masterCols.length; mcIdx++) {
1898
+ const masterColumn = masterCols[mcIdx];
1899
+ masterColumn.dimensions.left = currentMasterColumnLeft;
1900
+ masterColumn.dimensions.top = 0;
1901
+ let maxMasterColumnHeight = 0;
1902
+ let currentSectionTop = 0;
1903
+ const sections = masterColumn.sections;
1904
+ for (let secIdx = 0; secIdx < sections.length; secIdx++) {
1905
+ const section = sections[secIdx];
1906
+ section.dimensions.width = masterColumn.dimensions.width;
1907
+ section.dimensions.left = currentMasterColumnLeft;
1908
+ section.dimensions.top = currentSectionTop;
1909
+ const subColumns = section.subColumns;
1910
+ const totalSubColumns = subColumns.length;
1911
+ const subColumnWidth = section.dimensions.width / totalSubColumns;
1912
+ let currentSubColumnLeft = currentMasterColumnLeft;
1913
+ let maxSectionHeight = 0;
1914
+ for (let scIdx = 0; scIdx < totalSubColumns; scIdx++) {
1915
+ const subColumn = subColumns[scIdx];
1916
+ subColumn.dimensions.width = subColumnWidth;
1917
+ subColumn.dimensions.left = currentSubColumnLeft;
1918
+ subColumn.dimensions.top = currentSectionTop;
1919
+ let totalSubColumnHeight = 0;
1920
+ const elements = subColumn.elements;
1921
+ for (let elIdx = 0; elIdx < elements.length; elIdx++) {
1922
+ const element = elements[elIdx];
1923
+ let totalElementHeight = 0;
1924
+ const parts = element.parts;
1925
+ for (let pIdx = 0; pIdx < parts.length; pIdx++) {
1926
+ const part = parts[pIdx];
1927
+ part.dimensions.width = subColumnWidth;
1928
+ part.dimensions.left = currentSubColumnLeft;
1929
+ part.dimensions.top = subColumn.dimensions.top + totalSubColumnHeight + totalElementHeight;
1930
+ totalElementHeight += part.dimensions.height;
1931
+ }
1932
+ element.containerDimensions.height = totalElementHeight;
1933
+ element.containerDimensions.width = subColumnWidth;
1934
+ element.containerDimensions.left = currentSubColumnLeft;
1935
+ element.containerDimensions.top = subColumn.dimensions.top + totalSubColumnHeight;
1936
+ element.dimensions.width = subColumnWidth;
1937
+ element.dimensions.left = currentSubColumnLeft;
1938
+ element.dimensions.top =
1939
+ element.containerDimensions.top + (totalElementHeight - element.dimensions.height) * 0.5;
1940
+ totalSubColumnHeight += totalElementHeight;
1941
+ }
1942
+ subColumn.dimensions.height = totalSubColumnHeight;
1943
+ if (totalSubColumnHeight > maxSectionHeight)
1944
+ maxSectionHeight = totalSubColumnHeight;
1945
+ currentSubColumnLeft += subColumnWidth;
1946
+ }
1947
+ section.dimensions.height = maxSectionHeight;
1948
+ currentSectionTop += maxSectionHeight;
1949
+ maxMasterColumnHeight += maxSectionHeight;
1950
+ }
1951
+ masterColumn.dimensions.height = maxMasterColumnHeight;
1952
+ if (maxMasterColumnHeight > maxGridHeight)
1953
+ maxGridHeight = maxMasterColumnHeight;
1954
+ currentMasterColumnLeft += masterColumn.dimensions.width;
1955
+ }
1956
+ newGrid.dimensions.width = currentMasterColumnLeft;
1957
+ newGrid.dimensions.height = maxGridHeight;
1958
+ calculateSpanningElementDimensions();
1959
+ };
1960
+ const calculateSpanningElementDimensions = () => {
1961
+ const spanDimensions = new Map();
1962
+ const masterCols = newGrid.masterColumns;
1963
+ for (let mcIdx = 0; mcIdx < masterCols.length; mcIdx++) {
1964
+ const masterColumn = masterCols[mcIdx];
1965
+ const sections = masterColumn.sections;
1966
+ for (let secIdx = 0; secIdx < sections.length; secIdx++) {
1967
+ const section = sections[secIdx];
1968
+ const subColumns = section.subColumns;
1969
+ for (let scIdx = 0; scIdx < subColumns.length; scIdx++) {
1970
+ const subColumn = subColumns[scIdx];
1971
+ const elements = subColumn.elements;
1972
+ for (let elIdx = 0; elIdx < elements.length; elIdx++) {
1973
+ const element = elements[elIdx];
1974
+ if (!element.span)
1975
+ continue;
1976
+ const span = element.span;
1977
+ const isStartPosition = mcIdx === span.masterColumnStart && secIdx === span.sectionStart && scIdx === span.subColumnStart;
1978
+ const spanKey = `${span.masterColumnStart}-${span.masterColumnEnd}-${span.sectionStart}-${span.sectionEnd}-${span.subColumnStart}-${span.subColumnEnd}`;
1979
+ if (isStartPosition && !spanDimensions.has(spanKey)) {
1980
+ const totalSpannedWidth = calculateSpannedWidth(span, masterCols);
1981
+ const spanStartLeft = calculateSpanStartLeft(span, masterCols);
1982
+ const width = config.spanElementWidth;
1983
+ spanDimensions.set(spanKey, { width, left: spanStartLeft + (totalSpannedWidth - width) * 0.5 });
1984
+ }
1985
+ const storedDimensions = spanDimensions.get(spanKey);
1986
+ if (storedDimensions) {
1987
+ element.dimensions.width = storedDimensions.width;
1988
+ element.dimensions.left = storedDimensions.left;
1989
+ element.isHidden = !isStartPosition;
1990
+ }
1991
+ }
1992
+ }
1993
+ }
1994
+ }
1995
+ };
1996
+ const calculateSpannedWidth = (span, masterColumns) => {
1997
+ const key = `${span.masterColumnStart}-${span.masterColumnEnd}-${span.sectionStart}-${span.sectionEnd}-${span.subColumnStart}-${span.subColumnEnd}`;
1998
+ if (spannedWidthCache.has(key))
1999
+ return spannedWidthCache.get(key);
2000
+ if (span.masterColumnStart === span.masterColumnEnd) {
2001
+ const masterColumn = masterColumns[span.masterColumnStart];
2002
+ if (masterColumn) {
2003
+ const section = masterColumn.sections[span.sectionStart];
2004
+ if (section) {
2005
+ const subColumnWidth = section.dimensions.width / section.subColumns.length;
2006
+ const totalWidth = subColumnWidth * (span.subColumnEnd - span.subColumnStart + 1);
2007
+ spannedWidthCache.set(key, totalWidth);
2008
+ return totalWidth;
2009
+ }
2010
+ }
2011
+ spannedWidthCache.set(key, 0);
2012
+ return 0;
2013
+ }
2014
+ let totalWidth = 0;
2015
+ for (let mcIdx = span.masterColumnStart; mcIdx <= span.masterColumnEnd; mcIdx++) {
2016
+ const masterColumn = masterColumns[mcIdx];
2017
+ if (!masterColumn)
2018
+ continue;
2019
+ if (mcIdx === span.masterColumnStart) {
2020
+ const section = masterColumn.sections[span.sectionStart];
2021
+ if (section) {
2022
+ const subColumnWidth = section.dimensions.width / section.subColumns.length;
2023
+ totalWidth += subColumnWidth * (section.subColumns.length - span.subColumnStart);
2024
+ }
2025
+ }
2026
+ else if (mcIdx === span.masterColumnEnd) {
2027
+ const section = masterColumn.sections[span.sectionEnd];
2028
+ if (section) {
2029
+ const subColumnWidth = section.dimensions.width / section.subColumns.length;
2030
+ totalWidth += subColumnWidth * (span.subColumnEnd + 1);
2031
+ }
2032
+ }
2033
+ else {
2034
+ totalWidth += masterColumn.dimensions.width;
2035
+ }
2036
+ }
2037
+ spannedWidthCache.set(key, totalWidth);
2038
+ return totalWidth;
2039
+ };
2040
+ const calculateSpanStartLeft = (span, masterColumns) => {
2041
+ const key = `${span.masterColumnStart}-${span.sectionStart}-${span.subColumnStart}`;
2042
+ if (spanStartLeftCache.has(key))
2043
+ return spanStartLeftCache.get(key);
2044
+ const startMasterColumn = masterColumns[span.masterColumnStart];
2045
+ if (!startMasterColumn) {
2046
+ spanStartLeftCache.set(key, 0);
2047
+ return 0;
2048
+ }
2049
+ let startLeft = startMasterColumn.dimensions.left;
2050
+ const section = startMasterColumn.sections[span.sectionStart];
2051
+ if (section) {
2052
+ startLeft += (section.dimensions.width / section.subColumns.length) * span.subColumnStart;
2053
+ }
2054
+ spanStartLeftCache.set(key, startLeft);
2055
+ return startLeft;
2056
+ };
2057
+ const setupElementSpans = () => {
2058
+ const masterCols = newGrid.masterColumns;
2059
+ for (let mcIdx = 0; mcIdx < masterCols.length; mcIdx++) {
2060
+ const masterColumn = masterCols[mcIdx];
2061
+ const sections = masterColumn.sections;
2062
+ for (let secIdx = 0; secIdx < sections.length; secIdx++) {
2063
+ const section = sections[secIdx];
2064
+ const subColumns = section.subColumns;
2065
+ for (let scIdx = 0; scIdx < subColumns.length; scIdx++) {
2066
+ const subColumn = subColumns[scIdx];
2067
+ if (subColumn.span.isStart && subColumn.span.isEnd)
2068
+ continue;
2069
+ let spanStart = { masterColumnIndex: mcIdx, sectionIndex: secIdx, subColumnIndex: scIdx };
2070
+ if (!subColumn.span.isStart) {
2071
+ outer: for (let m = mcIdx; m >= 0; m--) {
2072
+ const mc = masterCols[m];
2073
+ if (!mc)
2074
+ continue;
2075
+ const sec = mc.sections[secIdx];
2076
+ if (!sec)
2077
+ continue;
2078
+ const end = m === mcIdx ? scIdx : sec.subColumns.length - 1;
2079
+ for (let s = end; s >= 0; s--) {
2080
+ if (sec.subColumns[s]?.span.isStart) {
2081
+ spanStart = { masterColumnIndex: m, sectionIndex: secIdx, subColumnIndex: s };
2082
+ break outer;
2083
+ }
2084
+ }
2085
+ }
2086
+ }
2087
+ let spanEnd = { masterColumnIndex: mcIdx, sectionIndex: secIdx, subColumnIndex: scIdx };
2088
+ if (!subColumn.span.isEnd) {
2089
+ outer: for (let m = mcIdx; m < masterCols.length; m++) {
2090
+ const mc = masterCols[m];
2091
+ if (!mc)
2092
+ continue;
2093
+ const sec = mc.sections[secIdx];
2094
+ if (!sec)
2095
+ continue;
2096
+ const start = m === mcIdx ? scIdx : 0;
2097
+ for (let s = start; s < sec.subColumns.length; s++) {
2098
+ if (sec.subColumns[s]?.span.isEnd) {
2099
+ spanEnd = { masterColumnIndex: m, sectionIndex: secIdx, subColumnIndex: s };
2100
+ break outer;
2101
+ }
2102
+ }
2103
+ }
2104
+ }
2105
+ const elements = subColumn.elements;
2106
+ for (let elIdx = 0; elIdx < elements.length; elIdx++) {
2107
+ elements[elIdx].span = {
2108
+ masterColumnStart: spanStart.masterColumnIndex,
2109
+ masterColumnEnd: spanEnd.masterColumnIndex,
2110
+ sectionStart: spanStart.sectionIndex,
2111
+ sectionEnd: spanEnd.sectionIndex,
2112
+ subColumnStart: spanStart.subColumnIndex,
2113
+ subColumnEnd: spanEnd.subColumnIndex,
2114
+ };
2115
+ }
2116
+ }
2117
+ }
2118
+ }
2119
+ };
2120
+ return {
2121
+ grid: newGrid,
2122
+ pushMasterColumn,
2123
+ calculateDimensions,
2124
+ setupElementSpans,
2125
+ };
2126
+ };
2127
+
2128
+ const createBracketMasterColumn = (config) => {
2129
+ const { columnWidth } = config;
2130
+ const sections = [];
2131
+ const newMasterColumn = {
2132
+ dimensions: {
2133
+ width: columnWidth,
2134
+ height: 0,
2135
+ top: 0,
2136
+ left: 0,
2137
+ },
2138
+ sections,
2139
+ };
2140
+ const pushSection = (...newSections) => {
2141
+ sections.push(...newSections);
2142
+ };
2143
+ return {
2144
+ masterColumn: newMasterColumn,
2145
+ pushSection,
2146
+ };
2147
+ };
2148
+
2149
+ const createBracketMasterColumnSection = (config) => {
2150
+ const { type } = config;
2151
+ const subColumns = [];
2152
+ const newMasterColumnSection = {
2153
+ dimensions: {
2154
+ width: 0,
2155
+ height: 0,
2156
+ top: 0,
2157
+ left: 0,
2158
+ },
2159
+ subColumns,
2160
+ type,
2161
+ };
2162
+ const pushSubColumn = (...newSubColumns) => {
2163
+ subColumns.push(...newSubColumns);
2164
+ };
2165
+ return {
2166
+ masterColumnSection: newMasterColumnSection,
2167
+ pushSubColumn,
2168
+ };
2169
+ };
2170
+
2171
+ const createBracketSubColumn = (config) => {
2172
+ const { span } = config;
2173
+ const elements = [];
2174
+ const newSubColumn = {
2175
+ dimensions: {
2176
+ width: 0,
2177
+ height: 0,
2178
+ top: 0,
2179
+ left: 0,
2180
+ },
2181
+ elements,
2182
+ span,
2183
+ };
2184
+ const pushElement = (...newElements) => {
2185
+ elements.push(...newElements);
2186
+ };
2187
+ return {
2188
+ subColumn: newSubColumn,
2189
+ pushElement,
2190
+ };
2191
+ };
2192
+
2193
+ function logGridAreasFormatted(gridTemplateAreas) {
2194
+ if (!gridTemplateAreas) {
2195
+ console.log('No grid areas to display');
2196
+ return;
2197
+ }
2198
+ // Parse the grid template areas string
2199
+ const rows = gridTemplateAreas
2200
+ .split('\n')
2201
+ .map((row) => row.replace(/^"/, '').replace(/"$/, '')) // Remove quotes
2202
+ .map((row) => row.split(' ')); // Split into individual areas
2203
+ if (rows.length === 0) {
2204
+ console.log('No grid areas to display');
2205
+ return;
2206
+ }
2207
+ // Find the maximum width for each column to align properly
2208
+ const columnCount = rows[0]?.length ?? 0;
2209
+ const columnWidths = [];
2210
+ for (let colIndex = 0; colIndex < columnCount; colIndex++) {
2211
+ const maxWidth = Math.max(...rows.map((row) => (row[colIndex] || '').length));
2212
+ columnWidths.push(Math.max(maxWidth, 3)); // Minimum width of 3
2213
+ }
2214
+ console.log('\n📋 Grid Template Areas (Formatted):');
2215
+ console.log('═'.repeat(columnWidths.reduce((sum, width) => sum + width + 3, 0)));
2216
+ // Log each row with proper spacing
2217
+ rows.forEach((row, rowIndex) => {
2218
+ const formattedRow = row
2219
+ .map((area, colIndex) => {
2220
+ const width = columnWidths[colIndex] ?? 0;
2221
+ return area.padEnd(width);
2222
+ })
2223
+ .join(' | ');
2224
+ console.log(`${String(rowIndex).padStart(2, '0')}: ${formattedRow}`);
2225
+ });
2226
+ console.log('═'.repeat(columnWidths.reduce((sum, width) => sum + width + 3, 0)));
2227
+ console.log(`📊 Grid dimensions: ${rows.length} rows × ${columnCount} columns\n`);
2228
+ }
2229
+ function gridColumnsToGridProperty(grid) {
2230
+ if (!grid.length) {
2231
+ return {
2232
+ gridTemplateAreas: '',
2233
+ gridTemplateRows: '',
2234
+ gridTemplateColumns: '',
2235
+ };
2236
+ }
2237
+ // Calculate the total number of columns (subcolumns across all master columns)
2238
+ const totalColumns = grid.reduce((total, masterColumn) => {
2239
+ return total + Math.max(...masterColumn.sections.map((section) => section.subColumns.length));
2240
+ }, 0);
2241
+ // Find all unique sections across all master columns to determine rows
2242
+ const allSections = [];
2243
+ grid.forEach((masterColumn, masterColumnIndex) => {
2244
+ masterColumn.sections.forEach((section, sectionIndex) => {
2245
+ // For each section, we need to process all its subcolumns
2246
+ section.subColumns.forEach((subColumn) => {
2247
+ allSections.push({
2248
+ elements: subColumn.elements,
2249
+ sectionIndex,
2250
+ masterColumnIndex,
2251
+ });
2252
+ });
2253
+ });
2254
+ });
2255
+ // Group sections by their index to create rows
2256
+ const sectionsByIndex = new Map();
2257
+ let globalColumnIndex = 0;
2258
+ grid.forEach((masterColumn, masterColumnIndex) => {
2259
+ const maxSubColumns = Math.max(...masterColumn.sections.map((section) => section.subColumns.length));
2260
+ masterColumn.sections.forEach((section, sectionIndex) => {
2261
+ if (!sectionsByIndex.has(sectionIndex)) {
2262
+ sectionsByIndex.set(sectionIndex, []);
2263
+ }
2264
+ section.subColumns.forEach((subColumn, subColumnIndex) => {
2265
+ sectionsByIndex.get(sectionIndex).push({
2266
+ elements: subColumn.elements,
2267
+ columnIndex: globalColumnIndex + subColumnIndex,
2268
+ masterColumnIndex,
2269
+ });
2270
+ });
2271
+ });
2272
+ globalColumnIndex += maxSubColumns;
2273
+ });
2274
+ // Build the grid matrix - sections become rows, subcolumns become columns
2275
+ const areaMatrix = [];
2276
+ const rowHeights = [];
2277
+ // Process each section (which becomes a row group)
2278
+ for (const [sectionIndex, sectionColumns] of sectionsByIndex.entries()) {
2279
+ // Find max rows needed for this section
2280
+ const maxRowsInSection = Math.max(...sectionColumns.map((col) => col.elements.reduce((total, element) => total + element.parts.length, 0)), 0);
2281
+ // Create rows for this section
2282
+ for (let rowIndex = 0; rowIndex < maxRowsInSection; rowIndex++) {
2283
+ const areaRow = new Array(totalColumns).fill('.');
2284
+ let currentRowHeight;
2285
+ // Fill in areas for each column in this section
2286
+ for (const sectionColumn of sectionColumns) {
2287
+ let accumulatedRows = 0;
2288
+ let area = '.';
2289
+ let height;
2290
+ // Find which element this row belongs to
2291
+ for (const element of sectionColumn.elements) {
2292
+ const elementRowCount = element.parts.length;
2293
+ if (rowIndex >= accumulatedRows && rowIndex < accumulatedRows + elementRowCount) {
2294
+ const relativeRowIndex = rowIndex - accumulatedRows;
2295
+ area = element.area;
2296
+ height = element.parts[relativeRowIndex]?.dimensions.height;
2297
+ break;
2298
+ }
2299
+ accumulatedRows += elementRowCount;
2300
+ }
2301
+ areaRow[sectionColumn.columnIndex] = area;
2302
+ // Use the first defined height for this row
2303
+ if (!currentRowHeight && height !== undefined) {
2304
+ currentRowHeight = `${height}px`;
2305
+ }
2306
+ }
2307
+ areaMatrix.push(areaRow);
2308
+ rowHeights.push(currentRowHeight ?? 'auto');
2309
+ }
2310
+ }
2311
+ // Calculate column widths
2312
+ const columnWidths = [];
2313
+ for (const masterColumn of grid) {
2314
+ const maxSubColumns = Math.max(...masterColumn.sections.map((section) => section.subColumns.length));
2315
+ for (let i = 0; i < maxSubColumns; i++) {
2316
+ // Find the width from any section that has this subcolumn
2317
+ const subColumnWidth = masterColumn.sections.find((section) => section.subColumns[i])?.subColumns[i]?.dimensions.width ?? 0;
2318
+ columnWidths.push(`${subColumnWidth}px`);
2319
+ }
2320
+ }
2321
+ // Build the CSS properties
2322
+ const gridTemplateAreas = areaMatrix.map((row) => `"${row.join(' ')}"`).join('\n');
2323
+ const gridTemplateRows = rowHeights.join(' ');
2324
+ const gridTemplateColumns = columnWidths.join(' ');
2325
+ const result = {
2326
+ gridTemplateAreas,
2327
+ gridTemplateRows,
2328
+ gridTemplateColumns,
2329
+ };
2330
+ logGridAreasFormatted(gridTemplateAreas);
2331
+ return result;
2332
+ }
2333
+
2334
+ const calculateUpperLowerRatio = (upperRoundsCount, lowerRoundsCount) => {
2335
+ // In double elimination, after the first aligned column,
2336
+ // we need to distribute the remaining upper rounds across the remaining lower rounds
2337
+ const remainingUpperRounds = upperRoundsCount - 1; // Subtract the first round
2338
+ const remainingLowerRounds = lowerRoundsCount - 1; // Subtract the first round
2339
+ if (remainingUpperRounds === 0) {
2340
+ return 1; // Edge case: only one upper round
2341
+ }
2342
+ return remainingLowerRounds / remainingUpperRounds;
2343
+ };
2344
+ const calculateColumnSplitFactor = (upperToLowerRatio) => {
2345
+ // The split factor determines how many sub-columns each match column will have
2346
+ // For example, if the ratio is 1.5, we split each match column
2347
+ // into 2 sub-columns so that matches can be centered correctly
2348
+ if (upperToLowerRatio === 1.5) {
2349
+ return 2; // Split into 2 sub-columns for 1.5 ratio
2350
+ }
2351
+ if (upperToLowerRatio === 2) {
2352
+ return 1; // Split into 1 sub-columns for 2 ratio
2353
+ }
2354
+ return 1;
2355
+ };
2356
+ const calculateLowerRoundIndex = (subColumnIndex, splitFactor) => Math.floor(subColumnIndex / splitFactor);
2357
+ const calculateUpperRoundIndex = (subColumnIndex, upperToLowerRatio, splitFactor) => {
2358
+ // Calculate which complete column we're in
2359
+ const completeColumnIndex = Math.floor(subColumnIndex / splitFactor);
2360
+ // For the first complete column (index 0), always use the first upper round (index 0)
2361
+ if (completeColumnIndex === 0) {
2362
+ return 0;
2363
+ }
2364
+ // For subsequent columns, map based on the ratio
2365
+ // We subtract 1 because the first column is handled separately
2366
+ const adjustedColumnIndex = completeColumnIndex - 1;
2367
+ // Calculate which upper round this column should use
2368
+ // We add 1 because we start from the second upper round (index 1)
2369
+ return Math.floor(adjustedColumnIndex / upperToLowerRatio) + 1;
2370
+ };
2371
+
2372
+ const createBracketGapMasterColumn = (config) => {
2373
+ const { existingMasterColumns, columnGap } = config;
2374
+ const lastMasterColumn = existingMasterColumns[existingMasterColumns.length - 1];
2375
+ if (!lastMasterColumn) {
2376
+ throw new Error('No last master column found in existing master columns');
2377
+ }
2378
+ const { masterColumn, pushSection } = createBracketMasterColumn({
2379
+ columnWidth: columnGap,
2380
+ });
2381
+ for (const section of lastMasterColumn.sections) {
2382
+ const { masterColumnSection, pushSubColumn } = createBracketMasterColumnSection({
2383
+ type: 'gap',
2384
+ });
2385
+ const lastSubColumn = section.subColumns[section.subColumns.length - 1];
2386
+ if (!lastSubColumn) {
2387
+ throw new Error('No last sub column found in section');
2388
+ }
2389
+ const { pushElement, subColumn } = createBracketSubColumn({
2390
+ span: {
2391
+ isStart: lastSubColumn.span.isEnd ? true : false,
2392
+ isEnd: lastSubColumn.span.isEnd ? true : false,
2393
+ },
2394
+ });
2395
+ for (const lastSubColumnElement of lastSubColumn.elements) {
2396
+ const partHeights = lastSubColumnElement.parts.map((part) => part.dimensions.height);
2397
+ const elementToCreate = (() => {
2398
+ switch (lastSubColumnElement.type) {
2399
+ case 'matchGap':
2400
+ case 'roundHeaderGap':
2401
+ case 'roundGap':
2402
+ case 'colGap': {
2403
+ return {
2404
+ area: !lastSubColumn.span.isEnd ? lastSubColumnElement.area : `.`,
2405
+ type: !lastSubColumn.span.isEnd ? lastSubColumnElement.type : 'colGap',
2406
+ elementHeight: lastSubColumnElement.dimensions.height,
2407
+ partHeights,
2408
+ };
2409
+ }
2410
+ case 'header':
2411
+ if (lastSubColumn.span.isEnd)
2412
+ break;
2413
+ return {
2414
+ area: lastSubColumnElement.area,
2415
+ type: lastSubColumnElement.type,
2416
+ elementHeight: lastSubColumnElement.dimensions.height,
2417
+ partHeights,
2418
+ component: lastSubColumnElement.component,
2419
+ round: lastSubColumnElement.round,
2420
+ };
2421
+ case 'match':
2422
+ if (lastSubColumn.span.isEnd)
2423
+ break;
2424
+ return {
2425
+ area: lastSubColumnElement.area,
2426
+ type: lastSubColumnElement.type,
2427
+ elementHeight: lastSubColumnElement.dimensions.height,
2428
+ partHeights,
2429
+ component: lastSubColumnElement.component,
2430
+ round: lastSubColumnElement.round,
2431
+ match: lastSubColumnElement.match,
2432
+ };
2433
+ }
2434
+ return {
2435
+ area: `.`,
2436
+ type: 'colGap',
2437
+ elementHeight: lastSubColumnElement.dimensions.height,
2438
+ partHeights,
2439
+ };
2440
+ })();
2441
+ pushElement(createBracketElement(elementToCreate).element);
2442
+ }
2443
+ pushSubColumn(subColumn);
2444
+ pushSection(masterColumnSection);
2445
+ }
2446
+ return masterColumn;
2447
+ };
2448
+
2449
+ const createRoundBracketSubColumnRelativeToFirstRound = (config) => {
2450
+ const { firstRound, round, options, span, hasReverseFinal } = config;
2451
+ const { subColumn, pushElement } = createBracketSubColumn({
2452
+ span,
2453
+ });
2454
+ const matchFactor = firstRound.matchCount / round.matchCount;
2455
+ const matches = Array.from(round.matches.values());
2456
+ const elementsToCreate = [];
2457
+ // Only include a header row if headers exist
2458
+ if (options.roundHeaderHeight > 0) {
2459
+ elementsToCreate.push({
2460
+ type: 'header',
2461
+ area: `h${round.shortId}`,
2462
+ partHeights: [options.roundHeaderHeight],
2463
+ elementHeight: options.roundHeaderHeight,
2464
+ component: config.components.roundHeader,
2465
+ round,
2466
+ }, {
2467
+ type: 'roundHeaderGap',
2468
+ area: '.',
2469
+ partHeights: [options.rowGap],
2470
+ elementHeight: options.rowGap,
2471
+ });
2472
+ }
2473
+ // Add match elements to create
2474
+ for (const [matchIndex, match] of matches.entries()) {
2475
+ const isLastMatch = matchIndex === matches.length - 1;
2476
+ const matchRows = [];
2477
+ for (let factorIndex = 0; factorIndex < matchFactor; factorIndex++) {
2478
+ const isLastFactor = factorIndex === matchFactor - 1;
2479
+ // Add the match height
2480
+ matchRows.push(options.matchHeight);
2481
+ if (isLastFactor)
2482
+ continue;
2483
+ // Add gap between match factors (except after the last one)
2484
+ matchRows.push(options.rowGap);
2485
+ }
2486
+ const isFinalMatch = hasReverseFinal
2487
+ ? round.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL
2488
+ : round.type === COMMON_BRACKET_ROUND_TYPE.FINAL;
2489
+ elementsToCreate.push({
2490
+ type: 'match',
2491
+ area: `m${match.shortId}`,
2492
+ partHeights: matchRows,
2493
+ elementHeight: isFinalMatch ? options.finalMatchHeight : options.matchHeight,
2494
+ component: isFinalMatch ? config.components.finalMatch : config.components.match,
2495
+ match,
2496
+ round,
2497
+ });
2498
+ if (!isLastMatch) {
2499
+ elementsToCreate.push({
2500
+ type: 'matchGap',
2501
+ area: '.',
2502
+ partHeights: [options.rowGap],
2503
+ elementHeight: options.rowGap,
2504
+ });
2505
+ }
2506
+ }
2507
+ // Create all elements at once
2508
+ for (const elementData of elementsToCreate) {
2509
+ const { element } = createBracketElement(elementData);
2510
+ pushElement(element);
2511
+ }
2512
+ return subColumn;
2513
+ };
2514
+
2515
+ const createDoubleEliminationGrid = (bracketData, options, components) => {
2516
+ const grid = createBracketGrid({ spanElementWidth: options.columnWidth });
2517
+ const upperBracketRounds = Array.from(bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET).values());
2518
+ const lowerBracketRounds = Array.from(bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET).values());
2519
+ const remainingRounds = Array.from(bracketData.rounds.values()).filter((r) => r.type !== DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET &&
2520
+ r.type !== DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET &&
2521
+ r.type !== COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE);
2522
+ const thirdPlaceRound = bracketData.roundsByType.get(COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)?.first() ?? null;
2523
+ const hasReverseFinal = !!bracketData.roundsByType.get(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL)?.first();
2524
+ const firstUpperRound = upperBracketRounds[0];
2525
+ const firstLowerRound = lowerBracketRounds[0];
2526
+ if (!firstUpperRound || !firstLowerRound) {
2527
+ throw new Error('No upper or lower rounds found in bracket data');
2528
+ }
2529
+ const upperToLowerRatio = calculateUpperLowerRatio(upperBracketRounds.length, lowerBracketRounds.length);
2530
+ const columnSplitFactor = calculateColumnSplitFactor(upperToLowerRatio);
2531
+ let lastRoundLastSubColumnUpperIndex = -1;
2532
+ let lastRoundLastSubColumnLowerIndex = -1;
2533
+ for (const [lowerRoundIndex, lowerRound] of lowerBracketRounds.entries()) {
2534
+ const isLastLowerRound = lowerRoundIndex === lowerBracketRounds.length - 1;
2535
+ const { masterColumn, pushSection } = createBracketMasterColumn({
2536
+ columnWidth: options.columnWidth,
2537
+ });
2538
+ const { masterColumnSection: upperSection, pushSubColumn: pushUpperSubColumn } = createBracketMasterColumnSection({
2539
+ type: 'round',
2540
+ });
2541
+ const { masterColumnSection: upperLowerGapSection, pushSubColumn: pushUpperLowerSubColumn } = createBracketMasterColumnSection({
2542
+ type: 'gap',
2543
+ });
2544
+ const { masterColumnSection: lowerSection, pushSubColumn: pushLowerSubColumn } = createBracketMasterColumnSection({
2545
+ type: 'round',
2546
+ });
2547
+ for (let currentColumnSplitFactor = 1; currentColumnSplitFactor <= columnSplitFactor; currentColumnSplitFactor++) {
2548
+ const subColumnIndex = lowerRoundIndex * columnSplitFactor + (currentColumnSplitFactor - 1);
2549
+ const currentUpperRoundIndex = calculateUpperRoundIndex(subColumnIndex, upperToLowerRatio, columnSplitFactor);
2550
+ const currentLowerRoundIndex = lowerRoundIndex;
2551
+ const isFirstSubColumnInMasterColumn = currentColumnSplitFactor === 1;
2552
+ const isLastSubColumnInMasterColumn = currentColumnSplitFactor === columnSplitFactor;
2553
+ const previousSubColumnIndex = subColumnIndex - 1;
2554
+ const nextSubColumnIndex = subColumnIndex + 1;
2555
+ const previousUpperRoundIndex = previousSubColumnIndex >= 0
2556
+ ? calculateUpperRoundIndex(previousSubColumnIndex, upperToLowerRatio, columnSplitFactor)
2557
+ : -1;
2558
+ const nextUpperRoundIndex = calculateUpperRoundIndex(nextSubColumnIndex, upperToLowerRatio, columnSplitFactor);
2559
+ const previousLowerRoundIndex = previousSubColumnIndex >= 0 ? calculateLowerRoundIndex(previousSubColumnIndex, columnSplitFactor) : -1;
2560
+ const nextLowerRoundIndex = calculateLowerRoundIndex(nextSubColumnIndex, columnSplitFactor);
2561
+ const upperRound = upperBracketRounds[currentUpperRoundIndex];
2562
+ if (!upperRound) {
2563
+ throw new Error('Upper round not found for subColumnIndex: ' + subColumnIndex);
2564
+ }
2565
+ // For upper bracket spans - check if this round is different from the previous occurrence
2566
+ const isUpperSpanStart = isFirstSubColumnInMasterColumn
2567
+ ? lowerRoundIndex === 0 || lastRoundLastSubColumnUpperIndex !== currentUpperRoundIndex
2568
+ : previousUpperRoundIndex !== currentUpperRoundIndex;
2569
+ // For upper bracket spans - check if this round will be different in the next occurrence
2570
+ const isUpperSpanEnd = isLastSubColumnInMasterColumn
2571
+ ? isLastLowerRound ||
2572
+ calculateUpperRoundIndex((lowerRoundIndex + 1) * columnSplitFactor, upperToLowerRatio, columnSplitFactor) !==
2573
+ currentUpperRoundIndex
2574
+ : nextUpperRoundIndex !== currentUpperRoundIndex;
2575
+ // For lower bracket spans - similar logic
2576
+ const isLowerSpanStart = isFirstSubColumnInMasterColumn
2577
+ ? lowerRoundIndex === 0 || lastRoundLastSubColumnLowerIndex !== currentLowerRoundIndex
2578
+ : previousLowerRoundIndex !== currentLowerRoundIndex;
2579
+ const isLowerSpanEnd = isLastSubColumnInMasterColumn
2580
+ ? isLastLowerRound ||
2581
+ calculateLowerRoundIndex((lowerRoundIndex + 1) * columnSplitFactor, columnSplitFactor) !==
2582
+ currentLowerRoundIndex
2583
+ : nextLowerRoundIndex !== currentLowerRoundIndex;
2584
+ const upperSubColumn = createRoundBracketSubColumnRelativeToFirstRound({
2585
+ firstRound: firstUpperRound,
2586
+ round: upperRound,
2587
+ options,
2588
+ hasReverseFinal,
2589
+ span: {
2590
+ isStart: isUpperSpanStart,
2591
+ isEnd: isUpperSpanEnd,
2592
+ },
2593
+ components,
2594
+ });
2595
+ pushUpperSubColumn(upperSubColumn);
2596
+ const upperLowerGapSubColumn = createBracketSubColumn({
2597
+ span: {
2598
+ isStart: true,
2599
+ isEnd: true,
2600
+ },
2601
+ });
2602
+ const upperLowerGapElement = createBracketElement({
2603
+ area: '.',
2604
+ type: 'roundGap',
2605
+ elementHeight: options.upperLowerGap,
2606
+ partHeights: [options.upperLowerGap],
2607
+ });
2608
+ upperLowerGapSubColumn.pushElement(upperLowerGapElement.element);
2609
+ pushUpperLowerSubColumn(upperLowerGapSubColumn.subColumn);
2610
+ const lowerSubColumn = createRoundBracketSubColumnRelativeToFirstRound({
2611
+ firstRound: firstLowerRound,
2612
+ round: lowerRound,
2613
+ options,
2614
+ hasReverseFinal,
2615
+ span: {
2616
+ isStart: isLowerSpanStart,
2617
+ isEnd: isLowerSpanEnd,
2618
+ },
2619
+ components,
2620
+ });
2621
+ pushLowerSubColumn(lowerSubColumn);
2622
+ if (isLastSubColumnInMasterColumn) {
2623
+ lastRoundLastSubColumnUpperIndex = currentUpperRoundIndex;
2624
+ lastRoundLastSubColumnLowerIndex = currentLowerRoundIndex;
2625
+ }
2626
+ }
2627
+ pushSection(upperSection, upperLowerGapSection, lowerSection);
2628
+ grid.pushMasterColumn(masterColumn);
2629
+ if (remainingRounds.length) {
2630
+ grid.pushMasterColumn(createBracketGapMasterColumn({
2631
+ existingMasterColumns: grid.grid.masterColumns,
2632
+ columnGap: options.columnGap,
2633
+ }));
2634
+ }
2635
+ }
2636
+ for (const [roundIndex, round] of remainingRounds.entries()) {
2637
+ const isLastRound = roundIndex === remainingRounds.length - 1;
2638
+ const isFirstRound = roundIndex === 0;
2639
+ const isAnyFinal = hasReverseFinal
2640
+ ? round.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL
2641
+ : round.type === COMMON_BRACKET_ROUND_TYPE.FINAL;
2642
+ const { masterColumn, pushSection } = createBracketMasterColumn({
2643
+ columnWidth: isAnyFinal ? options.finalColumnWidth : options.columnWidth,
2644
+ });
2645
+ const { masterColumnSection: upperSection, pushSubColumn: pushUpperSubColumn } = createBracketMasterColumnSection({
2646
+ type: 'round',
2647
+ });
2648
+ const { masterColumnSection: upperLowerGapSection, pushSubColumn: pushUpperLowerSubColumn } = createBracketMasterColumnSection({
2649
+ type: 'gap',
2650
+ });
2651
+ const { masterColumnSection: lowerSection, pushSubColumn: pushLowerSubColumn } = createBracketMasterColumnSection({
2652
+ type: 'round',
2653
+ });
2654
+ const upperSubColumn = createRoundBracketSubColumnRelativeToFirstRound({
2655
+ firstRound: firstUpperRound,
2656
+ round,
2657
+ options,
2658
+ hasReverseFinal,
2659
+ span: {
2660
+ isStart: true,
2661
+ isEnd: true,
2662
+ },
2663
+ components,
2664
+ });
2665
+ pushUpperSubColumn(upperSubColumn);
2666
+ const upperLowerGapSubColumn = createBracketSubColumn({
2667
+ span: {
2668
+ isStart: true,
2669
+ isEnd: true,
2670
+ },
2671
+ });
2672
+ const upperLowerGapElement = createBracketElement({
2673
+ area: '.',
2674
+ type: 'roundGap',
2675
+ elementHeight: options.upperLowerGap,
2676
+ partHeights: [options.upperLowerGap],
2677
+ });
2678
+ upperLowerGapSubColumn.pushElement(upperLowerGapElement.element);
2679
+ pushUpperLowerSubColumn(upperLowerGapSubColumn.subColumn);
2680
+ if (thirdPlaceRound) {
2681
+ const lowerSubColumn = createRoundBracketSubColumnRelativeToFirstRound({
2682
+ firstRound: firstLowerRound,
2683
+ round: thirdPlaceRound,
2684
+ options,
2685
+ hasReverseFinal,
2686
+ span: {
2687
+ isStart: isFirstRound,
2688
+ isEnd: isLastRound,
2689
+ },
2690
+ components,
2691
+ });
2692
+ pushLowerSubColumn(lowerSubColumn);
2693
+ }
2694
+ else {
2695
+ const lowerSubColumn = createBracketSubColumn({
2696
+ span: {
2697
+ isStart: true,
2698
+ isEnd: true,
2699
+ },
2700
+ });
2701
+ const firstMasterRound = grid.grid.masterColumns[0];
2702
+ if (!firstMasterRound)
2703
+ throw new Error('No first master round found in grid');
2704
+ const lastMasterColumnSection = firstMasterRound.sections[firstMasterRound.sections.length - 1];
2705
+ if (!lastMasterColumnSection)
2706
+ throw new Error('No last master column section found in grid');
2707
+ const firstSubColumn = lastMasterColumnSection.subColumns[0];
2708
+ if (!firstSubColumn)
2709
+ throw new Error('No first sub column found in grid');
2710
+ for (const element of firstSubColumn.elements) {
2711
+ const el = createBracketElement({
2712
+ area: '.',
2713
+ type: 'colGap',
2714
+ elementHeight: element.dimensions.height,
2715
+ partHeights: element.parts.map((p) => p.dimensions.height),
2716
+ });
2717
+ lowerSubColumn.pushElement(el.element);
2718
+ }
2719
+ pushLowerSubColumn(lowerSubColumn.subColumn);
2720
+ }
2721
+ pushSection(upperSection, upperLowerGapSection, lowerSection);
2722
+ grid.pushMasterColumn(masterColumn);
2723
+ if (!isLastRound) {
2724
+ grid.pushMasterColumn(createBracketGapMasterColumn({
2725
+ existingMasterColumns: grid.grid.masterColumns,
2726
+ columnGap: options.columnGap,
2727
+ }));
2728
+ }
2729
+ }
2730
+ grid.setupElementSpans();
2731
+ grid.calculateDimensions();
2732
+ const finalizedGrid = finalizeBracketGrid(grid);
2733
+ return {
2734
+ raw: grid,
2735
+ columns: finalizedGrid.columns,
2736
+ matchElementMap: finalizedGrid.elementMap,
2737
+ };
2738
+ };
2739
+
2740
+ const createSingleEliminationGrid = (bracketData, options, components) => {
2741
+ const grid = createBracketGrid({ spanElementWidth: options.columnWidth });
2742
+ const rounds = Array.from(bracketData.rounds.values());
2743
+ const firstRound = bracketData.rounds.first();
2744
+ if (!firstRound) {
2745
+ throw new Error('No rounds found in bracket data');
2746
+ }
2747
+ for (const [roundIndex, round] of rounds.entries()) {
2748
+ const isLastRound = roundIndex === rounds.length - 1;
2749
+ const { masterColumn, ...mutableMasterColumn } = createBracketMasterColumn({
2750
+ columnWidth: round.type === COMMON_BRACKET_ROUND_TYPE.FINAL ? options.finalColumnWidth : options.columnWidth,
2751
+ });
2752
+ const { masterColumnSection, pushSubColumn } = createBracketMasterColumnSection({
2753
+ type: 'round',
2754
+ });
2755
+ const sub = createRoundBracketSubColumnRelativeToFirstRound({
2756
+ firstRound,
2757
+ round,
2758
+ options,
2759
+ hasReverseFinal: false,
2760
+ span: {
2761
+ isStart: true,
2762
+ isEnd: true,
2763
+ },
2764
+ components,
2765
+ });
2766
+ pushSubColumn(sub);
2767
+ mutableMasterColumn.pushSection(masterColumnSection);
2768
+ grid.pushMasterColumn(masterColumn);
2769
+ if (!isLastRound) {
2770
+ grid.pushMasterColumn(createBracketGapMasterColumn({
2771
+ existingMasterColumns: grid.grid.masterColumns,
2772
+ columnGap: options.columnGap,
2773
+ }));
2774
+ }
2775
+ }
2776
+ grid.calculateDimensions();
2777
+ const finalizedGrid = finalizeBracketGrid(grid);
2778
+ return {
2779
+ raw: grid,
2780
+ columns: finalizedGrid.columns,
2781
+ matchElementMap: finalizedGrid.elementMap,
2782
+ };
2783
+ };
2784
+
2785
+ const createJourneyHighlight = (bracketData) => {
2786
+ let styles = '';
2787
+ for (const participant of bracketData.participants.values()) {
2788
+ styles += `
2789
+ .et-new-bracket-host:has(.${participant.shortId}:hover) {
2790
+ path, .et-bracket-new-element--match {
2791
+ opacity: 0.5;
2792
+ }
2793
+
2794
+ .${participant.shortId} {
2795
+ opacity: 1 !important;
2796
+ }
2797
+ }
2798
+ `;
2799
+ }
2800
+ return styles.replace(/\s+/g, ' ').trim();
2801
+ };
2802
+
1651
2803
  const FALLBACK_MATCH_RELATION_POSITION = -1;
1652
2804
  const generateMatchPosition = (match, factor) => Math.ceil(match.position * factor);
1653
2805
  const generateMatchRelationPositions = (relation, match) => {
@@ -2412,533 +3564,6 @@ const generateBracketRoundSwissGroupMaps = (bracketData) => {
2412
3564
  return roundsWithSwissGroups;
2413
3565
  };
2414
3566
 
2415
- const calcStaticMeasurements = (item, firstRounds, dimensions) => {
2416
- const { columnWidth, matchHeight, rowGap, columnGap, roundHeaderHeight, upperLowerGap } = dimensions;
2417
- const roundHeaderRowGap = roundHeaderHeight ? rowGap : 0;
2418
- const roundHeaderWithGapHeight = roundHeaderHeight + roundHeaderRowGap;
2419
- let baseOffsetY = roundHeaderWithGapHeight;
2420
- let baseRoundMatchCount = null;
2421
- let includeUpperLowerGap = false;
2422
- if (firstRounds.type === FIRST_ROUNDS_TYPE.SINGLE) {
2423
- baseRoundMatchCount = firstRounds.first.matchCount;
2424
- }
2425
- else {
2426
- if (item.roundRelation.currentRound.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET) {
2427
- baseRoundMatchCount = firstRounds.upper.matchCount;
2428
- }
2429
- else if (item.roundRelation.currentRound.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET) {
2430
- baseRoundMatchCount = firstRounds.lower.matchCount;
2431
- }
2432
- else {
2433
- baseRoundMatchCount = firstRounds.upper.matchCount + firstRounds.lower.matchCount;
2434
- includeUpperLowerGap = true;
2435
- }
2436
- }
2437
- if (item.roundRelation.currentRound.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET) {
2438
- if (firstRounds.type !== FIRST_ROUNDS_TYPE.DOUBLE) {
2439
- throw new Error(`Item is in lower bracket, but first rounds type is not double elimination: ${firstRounds.type}`);
2440
- }
2441
- const totalFirstUpperRoundHeight = firstRounds.upper.matchCount * matchHeight +
2442
- (firstRounds.upper.matchCount - 1) * rowGap +
2443
- roundHeaderWithGapHeight;
2444
- baseOffsetY = totalFirstUpperRoundHeight;
2445
- // Add the gap between the upper and lower bracket
2446
- baseOffsetY += upperLowerGap;
2447
- // Add one additional round header height if preset
2448
- baseOffsetY += roundHeaderWithGapHeight;
2449
- }
2450
- const staticMeasurements = {
2451
- upperLowerGap,
2452
- baseOffsetY,
2453
- baseRoundMatchCount,
2454
- includeUpperLowerGap,
2455
- columnGap,
2456
- columnWidth,
2457
- matchHeight,
2458
- rowGap,
2459
- };
2460
- return staticMeasurements;
2461
- };
2462
- const getMatchPosition = (roundItem, matchId, staticMeasurements) => {
2463
- if (!roundItem)
2464
- throw new Error('Item is missing');
2465
- if (!matchId)
2466
- throw new Error('Match is missing');
2467
- const match = roundItem.items.get(matchId);
2468
- if (!match || match.type !== 'match')
2469
- throw new Error('Match is missing');
2470
- const matchHalf = staticMeasurements.matchHeight / 2;
2471
- const roundFactor = staticMeasurements.baseRoundMatchCount / roundItem.roundRelation.currentRound.matchCount;
2472
- const remainingRowGapCount = roundItem.roundRelation.currentRound.matchCount - 1;
2473
- const matchIncludedRowGapTotal = staticMeasurements.baseRoundMatchCount - 1 - remainingRowGapCount;
2474
- const matchIncludedRowGapPerMatch = matchIncludedRowGapTotal / roundItem.roundRelation.currentRound.matchCount;
2475
- const matchRoundItemHeight = staticMeasurements.matchHeight * roundFactor + matchIncludedRowGapPerMatch * staticMeasurements.rowGap;
2476
- const matchesAbove = match.matchRelation.currentMatch.indexInRound;
2477
- const rowOffset = matchesAbove * staticMeasurements.rowGap + matchesAbove * matchRoundItemHeight;
2478
- const matchRowOffset = (matchRoundItemHeight - staticMeasurements.matchHeight) / 2;
2479
- const upperLowerGapOffset = staticMeasurements.includeUpperLowerGap ? staticMeasurements.upperLowerGap : 0;
2480
- const blockStart = rowOffset + matchRowOffset + staticMeasurements.baseOffsetY + upperLowerGapOffset;
2481
- const block = {
2482
- start: blockStart,
2483
- end: blockStart + staticMeasurements.matchHeight,
2484
- center: blockStart + matchHalf,
2485
- };
2486
- const inlineStart = (roundItem.columnStart - 1) * staticMeasurements.columnWidth +
2487
- (roundItem.columnStart - 1) * staticMeasurements.columnGap;
2488
- const inline = {
2489
- start: inlineStart,
2490
- end: inlineStart + staticMeasurements.columnWidth,
2491
- center: inlineStart + staticMeasurements.columnWidth / 2,
2492
- };
2493
- return { inline, block };
2494
- };
2495
-
2496
- const drawMan = (rounds, firstRounds, dimensions) => {
2497
- const svgParts = [];
2498
- const debugMap = {};
2499
- for (const round of rounds.values()) {
2500
- for (const gridItem of round.items.values()) {
2501
- if (gridItem.type === 'round')
2502
- continue; // we don't draw lines for round headers
2503
- const currentStaticMeasurements = calcStaticMeasurements(gridItem, firstRounds, dimensions);
2504
- const currentMatchParticipantsShortIds = [
2505
- gridItem.matchRelation.currentMatch.home?.shortId,
2506
- gridItem.matchRelation.currentMatch.away?.shortId,
2507
- ]
2508
- .filter((id) => !!id)
2509
- .join(' ');
2510
- const pathOptions = { ...dimensions.path, className: currentMatchParticipantsShortIds };
2511
- const currentMatchPosition = getMatchPosition(round, gridItem.matchRelation.currentMatch.id, currentStaticMeasurements);
2512
- debugMap[gridItem.matchRelation.currentMatch.id] = {
2513
- position: currentMatchPosition,
2514
- staticMeasurements: currentStaticMeasurements,
2515
- };
2516
- // We only draw the left side of the match relation
2517
- switch (gridItem.matchRelation.type) {
2518
- case 'nothing-to-one': {
2519
- continue;
2520
- }
2521
- case 'one-to-nothing':
2522
- case 'one-to-one': {
2523
- const previousStaticMeasurements = debugMap[gridItem.matchRelation.previousMatch.id]?.staticMeasurements;
2524
- if (!previousStaticMeasurements) {
2525
- throw new Error(`Static measurements for previous match with id ${gridItem.matchRelation.previousMatch.id} not found`);
2526
- }
2527
- const previousMatchPosition = getMatchPosition(rounds.get(gridItem.matchRelation.previousRound.id), gridItem.matchRelation.previousMatch.id, previousStaticMeasurements);
2528
- // draw a straight line
2529
- svgParts.push(linePath(previousMatchPosition, currentMatchPosition, { path: pathOptions }));
2530
- break;
2531
- }
2532
- case 'two-to-nothing':
2533
- case 'two-to-one': {
2534
- const previousUpperStaticMeasurements = debugMap[gridItem.matchRelation.previousUpperMatch.id]?.staticMeasurements;
2535
- const previousLowerStaticMeasurements = debugMap[gridItem.matchRelation.previousLowerMatch.id]?.staticMeasurements;
2536
- if (!previousUpperStaticMeasurements || !previousLowerStaticMeasurements) {
2537
- throw new Error(`Static measurements for previous upper match with id ${gridItem.matchRelation.previousUpperMatch.id} or previous lower match with id ${gridItem.matchRelation.previousLowerMatch.id} not found`);
2538
- }
2539
- const previousUpper = getMatchPosition(rounds.get(gridItem.matchRelation.previousUpperRound.id), gridItem.matchRelation.previousUpperMatch.id, previousUpperStaticMeasurements);
2540
- const previousLower = getMatchPosition(rounds.get(gridItem.matchRelation.previousLowerRound.id), gridItem.matchRelation.previousLowerMatch.id, previousLowerStaticMeasurements);
2541
- if (round.roundRelation.currentRound.type === 'final') {
2542
- console.log({
2543
- previousUpper,
2544
- previousLower,
2545
- currentMatchPosition,
2546
- currentStaticMeasurements,
2547
- previousUpperStaticMeasurements,
2548
- previousLowerStaticMeasurements,
2549
- });
2550
- }
2551
- const invertCurve = gridItem.roundRelation.currentRound.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT;
2552
- const curveOptions = {
2553
- ...dimensions.curve,
2554
- inverted: invertCurve,
2555
- path: { ...dimensions.path, className: '' },
2556
- };
2557
- // draw two lines that merge into one in the middle
2558
- svgParts.push(curvePath(previousUpper, currentMatchPosition, 'down', {
2559
- ...curveOptions,
2560
- path: {
2561
- ...curveOptions.path,
2562
- className: gridItem.matchRelation.previousUpperMatch.winner?.shortId || '',
2563
- },
2564
- }));
2565
- svgParts.push(curvePath(previousLower, currentMatchPosition, 'up', {
2566
- ...curveOptions,
2567
- path: {
2568
- ...curveOptions.path,
2569
- className: gridItem.matchRelation.previousLowerMatch.winner?.shortId || '',
2570
- },
2571
- }));
2572
- if (gridItem.matchRelation.currentRound.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT &&
2573
- gridItem.matchRelation.type === 'two-to-one' &&
2574
- gridItem.matchRelation.nextRound.mirrorRoundType === null) {
2575
- // draw a straight line for the special case of connecting the final match to the mirrored semi final match
2576
- const next = getMatchPosition(rounds.get(gridItem.matchRelation.nextRound.id), gridItem.matchRelation.nextMatch.id, currentStaticMeasurements);
2577
- svgParts.push(linePath(next, currentMatchPosition, { path: pathOptions }));
2578
- }
2579
- break;
2580
- }
2581
- }
2582
- }
2583
- }
2584
- return {
2585
- svg: svgParts.join(''),
2586
- debugMap,
2587
- };
2588
- };
2589
-
2590
- const generateColumnCount = (bracketData) => {
2591
- const thirdPlaceRoundSize = bracketData.roundsByType.get(COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)?.size || 0;
2592
- switch (bracketData.mode) {
2593
- case TOURNAMENT_MODE.DOUBLE_ELIMINATION: {
2594
- const upperBracketSize = bracketData.roundsByType.get(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET)?.size || 0;
2595
- const lowerBracketSize = bracketData.roundsByType.get(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET)?.size || 0;
2596
- // the total columns are the bigger number of winner bracket rounds vs looser bracket rounds + all other rounds excluding third place
2597
- return (bracketData.rounds.size -
2598
- upperBracketSize -
2599
- lowerBracketSize -
2600
- thirdPlaceRoundSize +
2601
- Math.max(upperBracketSize, lowerBracketSize));
2602
- }
2603
- default: {
2604
- // the total columns are the amount of rounds excluding third place
2605
- return bracketData.rounds.size - thirdPlaceRoundSize;
2606
- }
2607
- }
2608
- };
2609
- const generateRowCount = (bracketData, options) => {
2610
- switch (bracketData.mode) {
2611
- case TOURNAMENT_MODE.DOUBLE_ELIMINATION: {
2612
- const upperBracketSize = bracketData.roundsByType
2613
- .getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET)
2614
- .first()?.matchCount;
2615
- const lowerBracketSize = bracketData.roundsByType
2616
- .getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET)
2617
- ?.first()?.matchCount;
2618
- const roundHeadersCount = options.includeRoundHeaders ? 2 : 0;
2619
- if (upperBracketSize === undefined || lowerBracketSize === undefined) {
2620
- throw new Error('Upper or lower bracket size is undefined');
2621
- }
2622
- // the total rows the amount of matches in the first upper bracket round + first lower bracket round + if true, the round header row for both
2623
- return upperBracketSize + lowerBracketSize + roundHeadersCount;
2624
- }
2625
- default: {
2626
- const firstRoundSize = bracketData.rounds.values().next().value?.matchCount;
2627
- const roundHeadersCount = options.includeRoundHeaders ? 1 : 0;
2628
- if (firstRoundSize === undefined) {
2629
- throw new Error('First round size is undefined');
2630
- }
2631
- // the total rows are the amount of matches in the first round + if true, the round header row
2632
- return firstRoundSize + roundHeadersCount;
2633
- }
2634
- }
2635
- };
2636
- const generateBracketGridDefinitions = (bracketData, options) => {
2637
- const columnCount = generateColumnCount(bracketData);
2638
- const rowCount = generateRowCount(bracketData, options);
2639
- return { columnCount, rowCount };
2640
- };
2641
-
2642
- const generateBracketGridItems = (data) => {
2643
- const { bracketData, swissGroups, options } = data;
2644
- const roundHeaderComponent = options.headerComponent ?? NewBracketDefaultRoundHeaderComponent;
2645
- const matchComponent = options.matchComponent ?? NewBracketDefaultMatchComponent;
2646
- const finalMatchComponent = options.finalMatchComponent ?? matchComponent;
2647
- const optionsWithDefaults = {
2648
- ...options,
2649
- headerComponent: roundHeaderComponent,
2650
- matchComponent: matchComponent,
2651
- finalMatchComponent: finalMatchComponent,
2652
- };
2653
- const config = {
2654
- bracketData,
2655
- swissGroups,
2656
- options: optionsWithDefaults,
2657
- };
2658
- switch (bracketData.mode) {
2659
- case TOURNAMENT_MODE.DOUBLE_ELIMINATION:
2660
- return generateDoubleEliminationGridPlacements(config);
2661
- case TOURNAMENT_MODE.SWISS_WITH_ELIMINATION: {
2662
- return generateSwissWithEliminationGridPlacements(config);
2663
- }
2664
- default:
2665
- return generateGenericGridPlacements(config);
2666
- }
2667
- };
2668
- const generateGenericGridPlacements = (config) => {
2669
- const gridItems = new Map();
2670
- const { bracketData, options } = config;
2671
- const firstRound = bracketData.rounds.first();
2672
- if (!firstRound) {
2673
- throw new Error('First round is missing');
2674
- }
2675
- for (const round of bracketData.rounds.values()) {
2676
- let currentMatchRow = 1;
2677
- const columnStart = round.logicalIndex + 1;
2678
- const columnEnd = columnStart + 1;
2679
- const roundRelation = round.relation;
2680
- if (roundRelation.type === 'two-to-nothing' || roundRelation.type === 'two-to-one') {
2681
- throw new Error(`Invalid relation type ${roundRelation.type}`);
2682
- }
2683
- const roundItem = {
2684
- id: round.id,
2685
- layoutId: `${round.id}-layout`,
2686
- columnStart,
2687
- columnEnd,
2688
- rowStart: 1,
2689
- rowEnd: firstRound.matchCount + 1 + (options.includeRoundHeaders ? 1 : 0),
2690
- roundRelation,
2691
- items: new Map(),
2692
- columnDefinitions: 'var(--_cw)',
2693
- rowDefinitions: options.includeRoundHeaders
2694
- ? `var(--_rhh) ${new Array(firstRound.matchCount).fill('var(--_mh)').join(' ')}`
2695
- : `repeat(${firstRound.matchCount}, var(--_mh))`,
2696
- };
2697
- if (options.includeRoundHeaders) {
2698
- const roundHeaderItem = {
2699
- type: 'round',
2700
- id: round.id,
2701
- layoutId: `${round.id}-layout`,
2702
- rowStart: currentMatchRow,
2703
- rowEnd: ++currentMatchRow,
2704
- component: options.headerComponent,
2705
- className: 'et-bracket-new-item et-bracket-round-header-container',
2706
- roundRelation,
2707
- data: {
2708
- bracketRound: round,
2709
- },
2710
- };
2711
- roundItem.items.set(round.id, roundHeaderItem);
2712
- }
2713
- const rootRoundMatchFactor = roundRelation.type !== 'nothing-to-one' ? roundRelation.rootRoundMatchFactor : null;
2714
- const matchHeight = rootRoundMatchFactor ? rootRoundMatchFactor : 1;
2715
- for (const match of round.matches.values()) {
2716
- const matchRelation = match.relation;
2717
- const baseRow = match.indexInRound * matchHeight;
2718
- const participantShortIds = [match.home?.shortId, match.away?.shortId].filter((id) => !!id).join(' ');
2719
- const matchItem = {
2720
- type: 'match',
2721
- id: match.id,
2722
- layoutId: `${match.id}-layout`,
2723
- rowStart: baseRow + currentMatchRow,
2724
- rowEnd: baseRow + currentMatchRow + matchHeight,
2725
- component: round.type === COMMON_BRACKET_ROUND_TYPE.FINAL ? options.finalMatchComponent : options.matchComponent,
2726
- matchRelation,
2727
- roundRelation,
2728
- className: `et-bracket-new-item et-bracket-match-container ${participantShortIds}`,
2729
- data: {
2730
- bracketRound: round,
2731
- bracketMatch: match,
2732
- },
2733
- };
2734
- roundItem.items.set(match.id, matchItem);
2735
- }
2736
- gridItems.set(round.id, roundItem);
2737
- }
2738
- return gridItems;
2739
- };
2740
- const generateDoubleEliminationGridPlacements = (config) => {
2741
- const gridItems = new Map();
2742
- const { bracketData, options } = config;
2743
- const upperBracketRounds = bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET);
2744
- const lowerBracketRounds = bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET);
2745
- const hasReverseFinal = !!bracketData.roundsByType.get(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL);
2746
- const firstUpperRound = upperBracketRounds.first();
2747
- const firstLowerRound = lowerBracketRounds.first();
2748
- const headerRowMod = options.includeRoundHeaders ? 1 : 0;
2749
- if (!firstUpperRound) {
2750
- throw new Error('First round is missing');
2751
- }
2752
- if (!firstLowerRound) {
2753
- throw new Error('First lower round is missing');
2754
- }
2755
- const roundDelta = lowerBracketRounds.size - upperBracketRounds.size;
2756
- const isAsyncBracket = roundDelta === 2;
2757
- let currentUpperColumn = 1;
2758
- for (const round of bracketData.rounds.values()) {
2759
- let currentMatchRow = 1;
2760
- const columnStart = round.logicalIndex + 1;
2761
- const columnEnd = columnStart + 1;
2762
- const roundRelation = round.relation;
2763
- const isUpperBracket = round.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET;
2764
- const isUpperNeitherStartNorEnd = !round.isFirstOfType && !round.isLastOfType && isUpperBracket;
2765
- const upperRowSpan = isUpperNeitherStartNorEnd || (isAsyncBracket && round.isLastOfType) ? 2 : 1;
2766
- const isLowerBracket = round.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET;
2767
- const upperBracketRowStart = 1;
2768
- const upperBracketRowEnd = firstUpperRound.matchCount + headerRowMod + 1;
2769
- const lowerBracketRowStart = upperBracketRowEnd;
2770
- const lowerBracketRowEnd = lowerBracketRowStart + headerRowMod + firstLowerRound.matchCount;
2771
- const fullBracketRowStart = 1;
2772
- const fullBracketRowEnd = lowerBracketRowEnd;
2773
- const roundRowStart = isUpperBracket
2774
- ? upperBracketRowStart
2775
- : isLowerBracket
2776
- ? lowerBracketRowStart
2777
- : fullBracketRowStart;
2778
- const roundRowEnd = isUpperBracket ? upperBracketRowEnd : isLowerBracket ? lowerBracketRowEnd : fullBracketRowEnd;
2779
- const upperBracketColumnStart = currentUpperColumn;
2780
- const upperBracketColumnEnd = currentUpperColumn + upperRowSpan;
2781
- currentUpperColumn += upperRowSpan;
2782
- const lowerBracketColumnStart = columnStart;
2783
- const lowerBracketColumnEnd = columnEnd;
2784
- const fullBracketColumnStart = columnStart;
2785
- const fullBracketColumnEnd = columnEnd;
2786
- const roundColumnStart = isUpperBracket
2787
- ? upperBracketColumnStart
2788
- : isLowerBracket
2789
- ? lowerBracketColumnStart
2790
- : fullBracketColumnStart;
2791
- const roundColumnEnd = isUpperBracket
2792
- ? upperBracketColumnEnd
2793
- : isLowerBracket
2794
- ? lowerBracketColumnEnd
2795
- : fullBracketColumnEnd;
2796
- const roundItem = {
2797
- id: round.id,
2798
- layoutId: `${round.id}-layout`,
2799
- columnStart: roundColumnStart,
2800
- columnEnd: roundColumnEnd,
2801
- rowStart: roundRowStart,
2802
- rowEnd: roundRowEnd,
2803
- roundRelation,
2804
- columnDefinitions: new Array(roundColumnEnd - roundColumnStart - 1).fill('var(--_cw)').join(' '),
2805
- rowDefinitions: options.includeRoundHeaders
2806
- ? `var(--_rhh) ${new Array(roundRowEnd - roundRowStart - 1).fill('var(--_mh)').join(' ')}`
2807
- : `repeat(${roundRowEnd - roundRowStart - 1}, var(--_mh))`,
2808
- items: new Map(),
2809
- };
2810
- if (options.includeRoundHeaders) {
2811
- const roundHeaderItem = {
2812
- type: 'round',
2813
- id: round.id,
2814
- layoutId: `${round.id}-layout`,
2815
- rowStart: currentMatchRow,
2816
- rowEnd: ++currentMatchRow,
2817
- component: options.headerComponent,
2818
- className: 'et-bracket-new-item et-bracket-round-header-container',
2819
- roundRelation,
2820
- data: {
2821
- bracketRound: round,
2822
- },
2823
- };
2824
- roundItem.items.set(round.id, roundHeaderItem);
2825
- }
2826
- const rootRoundMatchFactor = roundRelation.type !== 'nothing-to-one' &&
2827
- roundRelation.type !== 'two-to-nothing' &&
2828
- roundRelation.type !== 'two-to-one'
2829
- ? roundRelation.rootRoundMatchFactor
2830
- : roundRelation.type === 'two-to-nothing' || roundRelation.type === 'two-to-one'
2831
- ? roundRelation.upperRootRoundMatchFactor
2832
- : null;
2833
- const isPastUpperLower = !isUpperBracket && !isLowerBracket;
2834
- const matchHeight = rootRoundMatchFactor ? rootRoundMatchFactor : 1;
2835
- for (const match of round.matches.values()) {
2836
- const matchRelation = match.relation;
2837
- const baseRow = match.indexInRound * matchHeight;
2838
- const participantShortIds = [match.home?.shortId, match.away?.shortId].filter((id) => !!id).join(' ');
2839
- const matchItem = {
2840
- type: 'match',
2841
- id: match.id,
2842
- layoutId: `${match.id}-layout`,
2843
- rowStart: isPastUpperLower ? currentMatchRow : baseRow + currentMatchRow,
2844
- rowEnd: isPastUpperLower ? roundRowEnd : baseRow + +currentMatchRow + matchHeight,
2845
- component: hasReverseFinal
2846
- ? round.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL
2847
- ? options.finalMatchComponent
2848
- : options.matchComponent
2849
- : round.type === COMMON_BRACKET_ROUND_TYPE.FINAL
2850
- ? options.finalMatchComponent
2851
- : options.matchComponent,
2852
- matchRelation,
2853
- roundRelation,
2854
- className: `et-bracket-new-item et-bracket-match-container ${participantShortIds}`,
2855
- data: {
2856
- bracketRound: round,
2857
- bracketMatch: match,
2858
- },
2859
- };
2860
- roundItem.items.set(match.id, matchItem);
2861
- }
2862
- gridItems.set(round.id, roundItem);
2863
- }
2864
- return gridItems;
2865
- };
2866
- const generateSwissWithEliminationGridPlacements = (config) => {
2867
- const { swissGroups } = config;
2868
- if (!swissGroups)
2869
- throw new Error('Swiss groups are required for swiss with elimination mode');
2870
- const gridItems = new Map();
2871
- return gridItems;
2872
- };
2873
-
2874
- const createJourneyHighlight = (bracketData) => {
2875
- let styles = '';
2876
- for (const participant of bracketData.participants.values()) {
2877
- styles += `
2878
- .et-new-bracket-host:has(.${participant.shortId}:hover) {
2879
- path, .et-bracket-match-container {
2880
- opacity: 0.5;
2881
- }
2882
-
2883
- .${participant.shortId} {
2884
- opacity: 1 !important;
2885
- }
2886
- }
2887
- `;
2888
- }
2889
- return styles.replace(/\s+/g, ' ').trim();
2890
- };
2891
-
2892
- class NewBracketDebugComponent {
2893
- constructor() {
2894
- this.drawManDebugData = input.required(...(ngDevMode ? [{ debugName: "drawManDebugData" }] : []));
2895
- this.showAdditionalInfos = signal(false, ...(ngDevMode ? [{ debugName: "showAdditionalInfos" }] : []));
2896
- }
2897
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDebugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2898
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.2", type: NewBracketDebugComponent, isStandalone: true, selector: "et-new-bracket-debug", inputs: { drawManDebugData: { classPropertyName: "drawManDebugData", publicName: "drawManDebugData", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.et-new-bracket-debug-host--expanded": "showAdditionalInfos()" }, classAttribute: "et-new-bracket-debug-host" }, ngImport: i0, template: `
2899
- @let data = drawManDebugData();
2900
-
2901
- <div class="et-new-bracket-debug-top-level">
2902
- <p>
2903
- ⇔: {{ data.position.inline.start }} - {{ data.position.inline.end }} ⇕: {{ data.position.block.start }} -
2904
- {{ data.position.block.end }}
2905
- </p>
2906
-
2907
- <button (click)="showAdditionalInfos.set(!showAdditionalInfos())" class="et-new-bracket-debug-toggle-detail-btn">
2908
- Details
2909
- </button>
2910
- </div>
2911
-
2912
- @if (showAdditionalInfos()) {
2913
- <pre>{{ data | json }}</pre>
2914
- }
2915
- `, isInline: true, styles: [".et-bracket-match-container{position:relative}.et-new-bracket-debug-host{position:absolute;top:0;left:0;right:0;z-index:1000;font-size:12px;color:#fff;padding:4px;border-radius:4px;background:#000;overflow:auto}.et-new-bracket-debug-host p{margin:0;padding:0}.et-new-bracket-debug-host.et-new-bracket-debug-host--expanded{z-index:1001}.et-new-bracket-debug-top-level{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px}.et-new-bracket-debug-toggle-detail-btn{padding:0;margin:0;background:transparent;border:none;text-decoration:underline;text-align:left;color:inherit;cursor:pointer}\n"], dependencies: [{ kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2916
- }
2917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketDebugComponent, decorators: [{
2918
- type: Component,
2919
- args: [{ selector: 'et-new-bracket-debug', template: `
2920
- @let data = drawManDebugData();
2921
-
2922
- <div class="et-new-bracket-debug-top-level">
2923
- <p>
2924
- ⇔: {{ data.position.inline.start }} - {{ data.position.inline.end }} ⇕: {{ data.position.block.start }} -
2925
- {{ data.position.block.end }}
2926
- </p>
2927
-
2928
- <button (click)="showAdditionalInfos.set(!showAdditionalInfos())" class="et-new-bracket-debug-toggle-detail-btn">
2929
- Details
2930
- </button>
2931
- </div>
2932
-
2933
- @if (showAdditionalInfos()) {
2934
- <pre>{{ data | json }}</pre>
2935
- }
2936
- `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
2937
- class: 'et-new-bracket-debug-host',
2938
- '[class.et-new-bracket-debug-host--expanded]': 'showAdditionalInfos()',
2939
- }, imports: [JsonPipe], styles: [".et-bracket-match-container{position:relative}.et-new-bracket-debug-host{position:absolute;top:0;left:0;right:0;z-index:1000;font-size:12px;color:#fff;padding:4px;border-radius:4px;background:#000;overflow:auto}.et-new-bracket-debug-host p{margin:0;padding:0}.et-new-bracket-debug-host.et-new-bracket-debug-host--expanded{z-index:1001}.et-new-bracket-debug-top-level{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px}.et-new-bracket-debug-toggle-detail-btn{padding:0;margin:0;background:transparent;border:none;text-decoration:underline;text-align:left;color:inherit;cursor:pointer}\n"] }]
2940
- }] });
2941
-
2942
3567
  class NewBracketComponent {
2943
3568
  constructor() {
2944
3569
  this.domSanitizer = inject(DomSanitizer);
@@ -2966,39 +3591,45 @@ class NewBracketComponent {
2966
3591
  this.finalMatchComponent = input(...(ngDevMode ? [undefined, { debugName: "finalMatchComponent" }] : []));
2967
3592
  this.bracketData = computed(() => createNewBracket(this.source(), { layout: this.layout() }), ...(ngDevMode ? [{ debugName: "bracketData" }] : []));
2968
3593
  this.swissGroups = computed(() => generateBracketRoundSwissGroupMaps(this.bracketData()), ...(ngDevMode ? [{ debugName: "swissGroups" }] : []));
2969
- this.items = computed(() => generateBracketGridItems({
2970
- bracketData: this.bracketData(),
2971
- swissGroups: this.swissGroups(),
2972
- options: {
3594
+ this.bracketGrid = computed(() => {
3595
+ const bracketData = this.bracketData();
3596
+ const options = {
2973
3597
  includeRoundHeaders: !this.hideRoundHeaders(),
2974
- headerComponent: this.roundHeaderComponent(),
2975
- matchComponent: this.matchComponent(),
2976
- finalMatchComponent: this.finalMatchComponent(),
2977
- },
2978
- }), ...(ngDevMode ? [{ debugName: "items" }] : []));
2979
- this.definitions = computed(() => generateBracketGridDefinitions(this.bracketData(), {
2980
- includeRoundHeaders: !this.hideRoundHeaders(),
2981
- columnGap: this.columnGap(),
2982
- upperLowerGap: this.bracketData().mode === TOURNAMENT_MODE.DOUBLE_ELIMINATION ? this.upperLowerGap() : 0,
2983
- columnWidth: this.columnWidth(),
2984
- matchHeight: this.matchHeight(),
2985
- roundHeaderHeight: this.hideRoundHeaders() ? 0 : this.roundHeaderHeight(),
2986
- rowGap: this.rowGap(),
2987
- layout: this.layout(),
2988
- finalMatchHeight: this.finalMatchComponent() ? this.finalMatchHeight() : this.matchHeight(),
2989
- finalColumnWidth: this.finalMatchComponent() ? this.finalColumnWidth() : this.columnWidth(),
2990
- }), ...(ngDevMode ? [{ debugName: "definitions" }] : []));
2991
- this.firstRounds = computed(() => getFirstRounds(this.bracketData()), ...(ngDevMode ? [{ debugName: "firstRounds" }] : []));
3598
+ columnGap: this.columnGap(),
3599
+ upperLowerGap: this.bracketData().mode === TOURNAMENT_MODE.DOUBLE_ELIMINATION ? this.upperLowerGap() : 0,
3600
+ columnWidth: this.columnWidth(),
3601
+ matchHeight: this.matchHeight(),
3602
+ roundHeaderHeight: this.hideRoundHeaders() ? 0 : this.roundHeaderHeight(),
3603
+ rowGap: this.rowGap(),
3604
+ layout: this.layout(),
3605
+ finalMatchHeight: this.finalMatchHeight(),
3606
+ finalColumnWidth: this.finalColumnWidth(),
3607
+ };
3608
+ const components = {
3609
+ match: this.matchComponent() ?? NewBracketDefaultMatchComponent,
3610
+ finalMatch: this.finalMatchComponent() ?? NewBracketDefaultMatchComponent,
3611
+ roundHeader: this.roundHeaderComponent() ?? NewBracketDefaultRoundHeaderComponent,
3612
+ };
3613
+ switch (bracketData.mode) {
3614
+ case TOURNAMENT_MODE.DOUBLE_ELIMINATION:
3615
+ return createDoubleEliminationGrid(bracketData, options, components);
3616
+ case TOURNAMENT_MODE.SINGLE_ELIMINATION:
3617
+ return createSingleEliminationGrid(bracketData, options, components);
3618
+ }
3619
+ return null;
3620
+ }, ...(ngDevMode ? [{ debugName: "bracketGrid" }] : []));
2992
3621
  this.drawManData = computed(() => {
2993
- // if (this.bracketData().mode !== TOURNAMENT_MODE.SINGLE_ELIMINATION) return '';
2994
- return drawMan(this.items(), this.firstRounds(), {
3622
+ const bracketGrid = this.bracketGrid();
3623
+ if (!bracketGrid)
3624
+ return '';
3625
+ return drawMan({
2995
3626
  columnGap: this.columnGap(),
2996
3627
  upperLowerGap: this.bracketData().mode === TOURNAMENT_MODE.DOUBLE_ELIMINATION ? this.upperLowerGap() : 0,
2997
3628
  columnWidth: this.columnWidth(),
2998
3629
  matchHeight: this.matchHeight(),
2999
3630
  roundHeaderHeight: this.hideRoundHeaders() ? 0 : this.roundHeaderHeight(),
3000
3631
  rowGap: this.rowGap(),
3001
- gridDefinitions: this.definitions(),
3632
+ bracketGrid,
3002
3633
  curve: {
3003
3634
  lineEndingCurveAmount: this.lineEndingCurveAmount(),
3004
3635
  lineStartingCurveAmount: this.lineStartingCurveAmount(),
@@ -3010,13 +3641,9 @@ class NewBracketComponent {
3010
3641
  },
3011
3642
  });
3012
3643
  }, ...(ngDevMode ? [{ debugName: "drawManData" }] : []));
3013
- this.svgContent = computed(() => this.domSanitizer.bypassSecurityTrustHtml(this.drawManData().svg), ...(ngDevMode ? [{ debugName: "svgContent" }] : []));
3644
+ this.svgContent = computed(() => this.domSanitizer.bypassSecurityTrustHtml(this.drawManData()), ...(ngDevMode ? [{ debugName: "svgContent" }] : []));
3014
3645
  this.journeyHighlight = computed(() => this.disableJourneyHighlight() ? null : createJourneyHighlight(this.bracketData()), ...(ngDevMode ? [{ debugName: "journeyHighlight" }] : []));
3015
3646
  this.setupJourneyHighlight();
3016
- effect(() => {
3017
- logRoundRelations(this.bracketData());
3018
- console.log(this.bracketData());
3019
- });
3020
3647
  }
3021
3648
  setupJourneyHighlight() {
3022
3649
  const renderer = inject(Renderer2);
@@ -3048,13 +3675,13 @@ class NewBracketComponent {
3048
3675
  });
3049
3676
  }
3050
3677
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3051
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.2", type: NewBracketComponent, isStandalone: true, selector: "et-new-bracket", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, columnWidth: { classPropertyName: "columnWidth", publicName: "columnWidth", isSignal: true, isRequired: false, transformFunction: null }, matchHeight: { classPropertyName: "matchHeight", publicName: "matchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalMatchHeight: { classPropertyName: "finalMatchHeight", publicName: "finalMatchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalColumnWidth: { classPropertyName: "finalColumnWidth", publicName: "finalColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderHeight: { classPropertyName: "roundHeaderHeight", publicName: "roundHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, columnGap: { classPropertyName: "columnGap", publicName: "columnGap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, upperLowerGap: { classPropertyName: "upperLowerGap", publicName: "upperLowerGap", isSignal: true, isRequired: false, transformFunction: null }, lineStartingCurveAmount: { classPropertyName: "lineStartingCurveAmount", publicName: "lineStartingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineEndingCurveAmount: { classPropertyName: "lineEndingCurveAmount", publicName: "lineEndingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, lineDashOffset: { classPropertyName: "lineDashOffset", publicName: "lineDashOffset", isSignal: true, isRequired: false, transformFunction: null }, disableJourneyHighlight: { classPropertyName: "disableJourneyHighlight", publicName: "disableJourneyHighlight", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hideRoundHeaders: { classPropertyName: "hideRoundHeaders", publicName: "hideRoundHeaders", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderComponent: { classPropertyName: "roundHeaderComponent", publicName: "roundHeaderComponent", isSignal: true, isRequired: false, transformFunction: null }, matchComponent: { classPropertyName: "matchComponent", publicName: "matchComponent", isSignal: true, isRequired: false, transformFunction: null }, finalMatchComponent: { classPropertyName: "finalMatchComponent", publicName: "finalMatchComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-new-bracket-host" }, ngImport: i0, template: "<section\n [style.--_cw.px]=\"columnWidth()\"\n [style.--_mh.px]=\"matchHeight()\"\n [style.--_rhh.px]=\"hideRoundHeaders() ? matchHeight() : roundHeaderHeight()\"\n [style.--_cg.px]=\"columnGap()\"\n [style.--_ulg.px]=\"upperLowerGap()\"\n [style.--_rg.px]=\"rowGap()\"\n [style.--_bcc]=\"definitions().columnCount\"\n [style.--_brc]=\"definitions().rowCount\"\n class=\"et-bracket-new\"\n>\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of items().values(); track round.layoutId) {\n <ul\n [style.--_c]=\"round.columnStart + ' / ' + round.columnEnd\"\n [style.--_r]=\"round.rowStart + ' / ' + round.rowEnd\"\n [style.--_cd]=\"round.columnDefinitions\"\n [style.--_rd]=\"round.rowDefinitions\"\n class=\"et-bracket-new-round\"\n >\n @for (item of round.items.values(); track item.layoutId) {\n <li [style.--_r]=\"item.rowStart + ' / ' + item.rowEnd\" [class]=\"item.className\">\n <ng-container *ngComponentOutlet=\"item.component; inputs: item.data\" />\n\n @if (debug() && item.type === 'match') {\n @let debugData = drawManData().debugMap[item.id];\n\n @if (debugData) {\n <et-new-bracket-debug [drawManDebugData]=\"debugData\" />\n }\n }\n <div></div>\n </li>\n }\n </ul>\n }\n</section>\n", styles: [".et-bracket-new{display:grid;column-gap:var(--_cg);row-gap:var(--_ulg);grid-template-columns:repeat(var(--_bcc),var(--_cw));grid-template-rows:repeat(var(--_brc),auto);--bracket-line-color: red}.et-bracket-new-round{display:grid;grid-column:var(--_c);grid-row:var(--_r);list-style:none;margin:0;padding:0;row-gap:var(--_rg);grid-template-rows:var(--_rd);grid-template-columns:var(--_cd)}.et-bracket-new-item{grid-row:var(--_r);place-self:center;transition:opacity .2s}.et-bracket-new-svg{grid-column:1/calc(var(--_bcc) + 1);grid-row:1/calc(var(--_brc) + 1);inline-size:100%;block-size:100%}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: NewBracketDebugComponent, selector: "et-new-bracket-debug", inputs: ["drawManDebugData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3678
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.2", type: NewBracketComponent, isStandalone: true, selector: "et-new-bracket", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, columnWidth: { classPropertyName: "columnWidth", publicName: "columnWidth", isSignal: true, isRequired: false, transformFunction: null }, matchHeight: { classPropertyName: "matchHeight", publicName: "matchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalMatchHeight: { classPropertyName: "finalMatchHeight", publicName: "finalMatchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalColumnWidth: { classPropertyName: "finalColumnWidth", publicName: "finalColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderHeight: { classPropertyName: "roundHeaderHeight", publicName: "roundHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, columnGap: { classPropertyName: "columnGap", publicName: "columnGap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, upperLowerGap: { classPropertyName: "upperLowerGap", publicName: "upperLowerGap", isSignal: true, isRequired: false, transformFunction: null }, lineStartingCurveAmount: { classPropertyName: "lineStartingCurveAmount", publicName: "lineStartingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineEndingCurveAmount: { classPropertyName: "lineEndingCurveAmount", publicName: "lineEndingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, lineDashOffset: { classPropertyName: "lineDashOffset", publicName: "lineDashOffset", isSignal: true, isRequired: false, transformFunction: null }, disableJourneyHighlight: { classPropertyName: "disableJourneyHighlight", publicName: "disableJourneyHighlight", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hideRoundHeaders: { classPropertyName: "hideRoundHeaders", publicName: "hideRoundHeaders", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderComponent: { classPropertyName: "roundHeaderComponent", publicName: "roundHeaderComponent", isSignal: true, isRequired: false, transformFunction: null }, matchComponent: { classPropertyName: "matchComponent", publicName: "matchComponent", isSignal: true, isRequired: false, transformFunction: null }, finalMatchComponent: { classPropertyName: "finalMatchComponent", publicName: "finalMatchComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-new-bracket-host" }, ngImport: i0, template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round }\n : { bracketRound: element.round, bracketMatch: element.match };\n\n @let highlightClass = element.type === 'header' ? '' : element.classes;\n\n <li\n [style.width.px]=\"element.dimensions.width\"\n [style.height.px]=\"element.dimensions.height\"\n [style.top.px]=\"element.dimensions.top - round.dimensions.top\"\n [style.left.px]=\"element.dimensions.left - round.dimensions.left\"\n class=\"et-bracket-new-element et-bracket-new-element--{{ element.type }} {{ highlightClass }}\"\n >\n <ng-container *ngComponentOutlet=\"element.component; inputs: inputs\" />\n </li>\n }\n </ul>\n }\n </section>\n}\n", styles: [".et-bracket-new{position:relative;--bracket-line-color: red}.et-bracket-new-round{position:absolute;list-style:none;margin:0;padding:0}.et-bracket-new-element{position:absolute;list-style:none;margin:0;padding:0;transition:opacity .2s}.et-bracket-new-svg{inline-size:100%;block-size:100%;position:absolute}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3052
3679
  }
3053
3680
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NewBracketComponent, decorators: [{
3054
3681
  type: Component,
3055
3682
  args: [{ selector: 'et-new-bracket', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
3056
3683
  class: 'et-new-bracket-host',
3057
- }, imports: [NgComponentOutlet, NewBracketDebugComponent], template: "<section\n [style.--_cw.px]=\"columnWidth()\"\n [style.--_mh.px]=\"matchHeight()\"\n [style.--_rhh.px]=\"hideRoundHeaders() ? matchHeight() : roundHeaderHeight()\"\n [style.--_cg.px]=\"columnGap()\"\n [style.--_ulg.px]=\"upperLowerGap()\"\n [style.--_rg.px]=\"rowGap()\"\n [style.--_bcc]=\"definitions().columnCount\"\n [style.--_brc]=\"definitions().rowCount\"\n class=\"et-bracket-new\"\n>\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of items().values(); track round.layoutId) {\n <ul\n [style.--_c]=\"round.columnStart + ' / ' + round.columnEnd\"\n [style.--_r]=\"round.rowStart + ' / ' + round.rowEnd\"\n [style.--_cd]=\"round.columnDefinitions\"\n [style.--_rd]=\"round.rowDefinitions\"\n class=\"et-bracket-new-round\"\n >\n @for (item of round.items.values(); track item.layoutId) {\n <li [style.--_r]=\"item.rowStart + ' / ' + item.rowEnd\" [class]=\"item.className\">\n <ng-container *ngComponentOutlet=\"item.component; inputs: item.data\" />\n\n @if (debug() && item.type === 'match') {\n @let debugData = drawManData().debugMap[item.id];\n\n @if (debugData) {\n <et-new-bracket-debug [drawManDebugData]=\"debugData\" />\n }\n }\n <div></div>\n </li>\n }\n </ul>\n }\n</section>\n", styles: [".et-bracket-new{display:grid;column-gap:var(--_cg);row-gap:var(--_ulg);grid-template-columns:repeat(var(--_bcc),var(--_cw));grid-template-rows:repeat(var(--_brc),auto);--bracket-line-color: red}.et-bracket-new-round{display:grid;grid-column:var(--_c);grid-row:var(--_r);list-style:none;margin:0;padding:0;row-gap:var(--_rg);grid-template-rows:var(--_rd);grid-template-columns:var(--_cd)}.et-bracket-new-item{grid-row:var(--_r);place-self:center;transition:opacity .2s}.et-bracket-new-svg{grid-column:1/calc(var(--_bcc) + 1);grid-row:1/calc(var(--_brc) + 1);inline-size:100%;block-size:100%}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}\n"] }]
3684
+ }, imports: [NgComponentOutlet], template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round }\n : { bracketRound: element.round, bracketMatch: element.match };\n\n @let highlightClass = element.type === 'header' ? '' : element.classes;\n\n <li\n [style.width.px]=\"element.dimensions.width\"\n [style.height.px]=\"element.dimensions.height\"\n [style.top.px]=\"element.dimensions.top - round.dimensions.top\"\n [style.left.px]=\"element.dimensions.left - round.dimensions.left\"\n class=\"et-bracket-new-element et-bracket-new-element--{{ element.type }} {{ highlightClass }}\"\n >\n <ng-container *ngComponentOutlet=\"element.component; inputs: inputs\" />\n </li>\n }\n </ul>\n }\n </section>\n}\n", styles: [".et-bracket-new{position:relative;--bracket-line-color: red}.et-bracket-new-round{position:absolute;list-style:none;margin:0;padding:0}.et-bracket-new-element{position:absolute;list-style:none;margin:0;padding:0;transition:opacity .2s}.et-bracket-new-svg{inline-size:100%;block-size:100%;position:absolute}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}\n"] }]
3058
3685
  }], ctorParameters: () => [] });
3059
3686
 
3060
3687
  var index = /*#__PURE__*/Object.freeze({
@@ -14381,7 +15008,7 @@ class OverlayContainerComponent extends CdkDialogContainer {
14381
15008
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.2", type: OverlayContainerComponent, isStandalone: true, selector: "et-overlay-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.aria-modal": "_config.ariaModal", "id": "_config.id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByHack", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "class.et-with-default-animation": "!_config.customAnimated" }, classAttribute: "et-overlay" }, usesInheritance: true, hostDirectives: [{ directive: i1.RootBoundaryDirective }, { directive: i1.AnimatedLifecycleDirective }, { directive: ProvideThemeDirective }], ngImport: i0, template: `
14382
15009
  <div class="et-overlay-container-drag-handle"></div>
14383
15010
  <ng-template cdkPortalOutlet />
14384
- `, isInline: true, styles: [".et-overlay{--et-overlay-padding-inline: 16px;--et-overlay-padding-block: 16px;--et-overlay-header-padding-block-end: 16px;--et-overlay-body-padding-block: 0;--et-overlay-footer-padding-block-start: 16px;--et-overlay-body-divider-color: #565656;--et-overlay-body-min-block-size: 100px;--_et-overlay-drag-handle-inline-size: 32px;--_et-overlay-drag-handle-block-size: 4px;--_et-overlay-drag-handle-block-margin: 22px;--_et-overlay-drag-handle-color: #565656;--_et-overlay-drag-handle-radius: 5px;position:relative;display:grid;overflow:hidden;pointer-events:all;outline:none;box-sizing:border-box;width:100%}.et-overlay>:nth-child(2){overflow:auto}.et-overlay>:nth-child(2):not(.et-overlay-main){display:grid}.et-overlay.et-overlay--bottom-sheet .et-overlay-container-drag-handle{display:flex}.et-overlay:has(.et-overlay-main){overflow:visible}.et-overlay:has(.et-overlay-sidebar-host){overflow:hidden}.et-overlay:has(.et-overlay-sidebar-host)>:nth-child(2){display:grid;grid-template-columns:0 1fr}.et-overlay:has(.et-overlay-sidebar-host):has(.et-overlay-sidebar--visible)>:nth-child(2){grid-template-columns:auto 1fr}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-host{display:grid;min-block-size:0}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*{overflow:auto}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*:not(.et-overlay-main){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.et-overlay-sidebar-host{overflow:auto}.et-overlay-main{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr)}.et-overlay-main:has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:not(:has(.et-overlay-footer)){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-container-drag-handle{block-size:var(--_et-overlay-drag-handle-block-size);margin-block:var(--_et-overlay-drag-handle-block-margin);display:none;justify-content:center}.et-overlay-container-drag-handle:before{content:\"\";position:static;inline-size:var(--_et-overlay-drag-handle-inline-size);block-size:var(--_et-overlay-drag-handle-block-size);background-color:var(--_et-overlay-drag-handle-color);border-radius:var(--_et-overlay-drag-handle-radius)}.et-overlay-body{display:grid;overflow:auto;padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body:has(.et-overlay-router-outlet-host){padding:0;overflow:visible}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-body-container{display:grid;grid-auto-rows:minmax(0,1fr);min-height:0}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-host{display:grid}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-page{padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body.et-overlay-body--enable-divider-animations{transition:border-color .3s var(--ease-1)}.et-overlay-main:has(.et-overlay-header) .et-overlay-body.et-overlay-body--render-dividers{border-block-start:1px solid var(--et-overlay-body-divider-color)}.et-overlay-main:has(.et-overlay-footer) .et-overlay-body.et-overlay-body--render-dividers{border-block-end:1px solid var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers{border-color:var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-start{border-block-start-color:transparent}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-end{border-block-end-color:transparent}.et-overlay-body .et-overlay-body-container{position:relative;min-block-size:100%}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element,.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{position:absolute;block-size:1px;pointer-events:none}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element{inset-inline:1px;inset-block-start:1px}.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{inset-inline:1px;inset-block-end:1px}.et-overlay-header{padding-block-start:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-end:var(--et-overlay-header-padding-block-end)}.et-overlay-footer{padding-block-end:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-start:var(--et-overlay-footer-padding-block-start)}.et-overlay-pane{pointer-events:none}.et-overlay.et-with-default-animation:after{content:\"\";position:absolute;background-color:inherit}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-to{transform:scale(0)!important;border-radius:250px}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),border-radius .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-1),border-radius .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-active{transition:transform .15s var(--ease-in-5),border-radius .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-to{transform:translateY(100%)!important}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet:after{inset-inline:0;inset-block-end:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-to{transform:translateY(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--top-sheet:after{inset-inline:0;inset-block-start:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-to{transform:translate(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--left-sheet:after{inset-inline-start:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-to{transform:translate(100%)!important}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--right-sheet:after{inset-inline-end:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15011
+ `, isInline: true, styles: [".et-overlay{--et-overlay-padding-inline: 16px;--et-overlay-padding-block: 16px;--et-overlay-header-padding-block-end: 16px;--et-overlay-body-padding-block: 0;--et-overlay-footer-padding-block-start: 16px;--et-overlay-body-divider-color: #565656;--et-overlay-body-min-block-size: 100px;--_et-overlay-drag-handle-inline-size: 32px;--_et-overlay-drag-handle-block-size: 4px;--_et-overlay-drag-handle-block-margin: 22px;--_et-overlay-drag-handle-color: #565656;--_et-overlay-drag-handle-radius: 5px;position:relative;display:grid;overflow:hidden;pointer-events:all;outline:none;box-sizing:border-box;width:100%}.et-overlay>:nth-child(2){overflow:auto}.et-overlay>:nth-child(2):not(.et-overlay-main){display:grid}.et-overlay.et-overlay--bottom-sheet .et-overlay-container-drag-handle{display:flex}.et-overlay:has(.et-overlay-main){overflow:visible}.et-overlay:has(.et-overlay-sidebar-host){overflow:hidden}.et-overlay:has(.et-overlay-sidebar-host)>:nth-child(2){display:grid;grid-template-columns:0 1fr}.et-overlay:has(.et-overlay-sidebar-host):has(.et-overlay-sidebar--visible)>:nth-child(2){grid-template-columns:auto 1fr}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-host{display:grid;min-block-size:0}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*{overflow:auto}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*:not(.et-overlay-main){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.et-overlay-sidebar-host{overflow:auto}.et-overlay-main{display:grid;grid-template-rows:minmax(0,1fr);overflow:auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr)}.et-overlay-main:has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:not(:has(.et-overlay-footer)){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-container-drag-handle{block-size:var(--_et-overlay-drag-handle-block-size);margin-block:var(--_et-overlay-drag-handle-block-margin);display:none;justify-content:center}.et-overlay-container-drag-handle:before{content:\"\";position:static;inline-size:var(--_et-overlay-drag-handle-inline-size);block-size:var(--_et-overlay-drag-handle-block-size);background-color:var(--_et-overlay-drag-handle-color);border-radius:var(--_et-overlay-drag-handle-radius)}.et-overlay-body{display:grid;overflow:auto;padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body:has(.et-overlay-router-outlet-host){padding:0;overflow:visible}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-body-container{display:grid;grid-auto-rows:minmax(0,1fr);min-height:0}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-host{display:grid}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-page{padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body.et-overlay-body--enable-divider-animations{transition:border-color .3s var(--ease-1)}.et-overlay-main:has(.et-overlay-header) .et-overlay-body.et-overlay-body--render-dividers{border-block-start:1px solid var(--et-overlay-body-divider-color)}.et-overlay-main:has(.et-overlay-footer) .et-overlay-body.et-overlay-body--render-dividers{border-block-end:1px solid var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers{border-color:var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-start{border-block-start-color:transparent}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-end{border-block-end-color:transparent}.et-overlay-body .et-overlay-body-container{position:relative;min-block-size:100%}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element,.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{position:absolute;block-size:1px;pointer-events:none}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element{inset-inline:1px;inset-block-start:1px}.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{inset-inline:1px;inset-block-end:1px}.et-overlay-header{padding-block-start:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-end:var(--et-overlay-header-padding-block-end)}.et-overlay-footer{padding-block-end:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-start:var(--et-overlay-footer-padding-block-start)}.et-overlay-pane{pointer-events:none}.et-overlay.et-with-default-animation:after{content:\"\";position:absolute;background-color:inherit}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-to{transform:scale(0)!important;border-radius:250px}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),border-radius .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-1),border-radius .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-active{transition:transform .15s var(--ease-in-5),border-radius .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-to{transform:translateY(100%)!important}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet:after{inset-inline:0;inset-block-end:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-to{transform:translateY(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--top-sheet:after{inset-inline:0;inset-block-start:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-to{transform:translate(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--left-sheet:after{inset-inline-start:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-to{transform:translate(100%)!important}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--right-sheet:after{inset-inline-end:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
14385
15012
  }
14386
15013
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: OverlayContainerComponent, decorators: [{
14387
15014
  type: Component,
@@ -14398,7 +15025,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImpor
14398
15025
  '[attr.aria-label]': '_config.ariaLabel',
14399
15026
  '[attr.aria-describedby]': '_config.ariaDescribedBy || null',
14400
15027
  '[class.et-with-default-animation]': '!_config.customAnimated',
14401
- }, imports: [PortalModule], hostDirectives: [RootBoundaryDirective, AnimatedLifecycleDirective, ProvideThemeDirective], styles: [".et-overlay{--et-overlay-padding-inline: 16px;--et-overlay-padding-block: 16px;--et-overlay-header-padding-block-end: 16px;--et-overlay-body-padding-block: 0;--et-overlay-footer-padding-block-start: 16px;--et-overlay-body-divider-color: #565656;--et-overlay-body-min-block-size: 100px;--_et-overlay-drag-handle-inline-size: 32px;--_et-overlay-drag-handle-block-size: 4px;--_et-overlay-drag-handle-block-margin: 22px;--_et-overlay-drag-handle-color: #565656;--_et-overlay-drag-handle-radius: 5px;position:relative;display:grid;overflow:hidden;pointer-events:all;outline:none;box-sizing:border-box;width:100%}.et-overlay>:nth-child(2){overflow:auto}.et-overlay>:nth-child(2):not(.et-overlay-main){display:grid}.et-overlay.et-overlay--bottom-sheet .et-overlay-container-drag-handle{display:flex}.et-overlay:has(.et-overlay-main){overflow:visible}.et-overlay:has(.et-overlay-sidebar-host){overflow:hidden}.et-overlay:has(.et-overlay-sidebar-host)>:nth-child(2){display:grid;grid-template-columns:0 1fr}.et-overlay:has(.et-overlay-sidebar-host):has(.et-overlay-sidebar--visible)>:nth-child(2){grid-template-columns:auto 1fr}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-host{display:grid;min-block-size:0}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*{overflow:auto}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*:not(.et-overlay-main){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.et-overlay-sidebar-host{overflow:auto}.et-overlay-main{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr)}.et-overlay-main:has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:not(:has(.et-overlay-footer)){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-container-drag-handle{block-size:var(--_et-overlay-drag-handle-block-size);margin-block:var(--_et-overlay-drag-handle-block-margin);display:none;justify-content:center}.et-overlay-container-drag-handle:before{content:\"\";position:static;inline-size:var(--_et-overlay-drag-handle-inline-size);block-size:var(--_et-overlay-drag-handle-block-size);background-color:var(--_et-overlay-drag-handle-color);border-radius:var(--_et-overlay-drag-handle-radius)}.et-overlay-body{display:grid;overflow:auto;padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body:has(.et-overlay-router-outlet-host){padding:0;overflow:visible}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-body-container{display:grid;grid-auto-rows:minmax(0,1fr);min-height:0}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-host{display:grid}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-page{padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body.et-overlay-body--enable-divider-animations{transition:border-color .3s var(--ease-1)}.et-overlay-main:has(.et-overlay-header) .et-overlay-body.et-overlay-body--render-dividers{border-block-start:1px solid var(--et-overlay-body-divider-color)}.et-overlay-main:has(.et-overlay-footer) .et-overlay-body.et-overlay-body--render-dividers{border-block-end:1px solid var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers{border-color:var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-start{border-block-start-color:transparent}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-end{border-block-end-color:transparent}.et-overlay-body .et-overlay-body-container{position:relative;min-block-size:100%}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element,.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{position:absolute;block-size:1px;pointer-events:none}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element{inset-inline:1px;inset-block-start:1px}.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{inset-inline:1px;inset-block-end:1px}.et-overlay-header{padding-block-start:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-end:var(--et-overlay-header-padding-block-end)}.et-overlay-footer{padding-block-end:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-start:var(--et-overlay-footer-padding-block-start)}.et-overlay-pane{pointer-events:none}.et-overlay.et-with-default-animation:after{content:\"\";position:absolute;background-color:inherit}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-to{transform:scale(0)!important;border-radius:250px}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),border-radius .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-1),border-radius .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-active{transition:transform .15s var(--ease-in-5),border-radius .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-to{transform:translateY(100%)!important}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet:after{inset-inline:0;inset-block-end:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-to{transform:translateY(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--top-sheet:after{inset-inline:0;inset-block-start:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-to{transform:translate(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--left-sheet:after{inset-inline-start:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-to{transform:translate(100%)!important}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--right-sheet:after{inset-inline-end:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}\n"] }]
15028
+ }, imports: [PortalModule], hostDirectives: [RootBoundaryDirective, AnimatedLifecycleDirective, ProvideThemeDirective], styles: [".et-overlay{--et-overlay-padding-inline: 16px;--et-overlay-padding-block: 16px;--et-overlay-header-padding-block-end: 16px;--et-overlay-body-padding-block: 0;--et-overlay-footer-padding-block-start: 16px;--et-overlay-body-divider-color: #565656;--et-overlay-body-min-block-size: 100px;--_et-overlay-drag-handle-inline-size: 32px;--_et-overlay-drag-handle-block-size: 4px;--_et-overlay-drag-handle-block-margin: 22px;--_et-overlay-drag-handle-color: #565656;--_et-overlay-drag-handle-radius: 5px;position:relative;display:grid;overflow:hidden;pointer-events:all;outline:none;box-sizing:border-box;width:100%}.et-overlay>:nth-child(2){overflow:auto}.et-overlay>:nth-child(2):not(.et-overlay-main){display:grid}.et-overlay.et-overlay--bottom-sheet .et-overlay-container-drag-handle{display:flex}.et-overlay:has(.et-overlay-main){overflow:visible}.et-overlay:has(.et-overlay-sidebar-host){overflow:hidden}.et-overlay:has(.et-overlay-sidebar-host)>:nth-child(2){display:grid;grid-template-columns:0 1fr}.et-overlay:has(.et-overlay-sidebar-host):has(.et-overlay-sidebar--visible)>:nth-child(2){grid-template-columns:auto 1fr}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-host{display:grid;min-block-size:0}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page{display:grid;grid-template-rows:minmax(0,1fr)}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*{overflow:auto}.et-overlay:has(.et-overlay-sidebar-host) .et-overlay-router-outlet-page>*:not(.et-overlay-main){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.et-overlay-sidebar-host{overflow:auto}.et-overlay-main{display:grid;grid-template-rows:minmax(0,1fr);overflow:auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:has(.et-overlay-header):has(.et-overlay-body){grid-template-rows:auto minmax(var(--et-overlay-body-min-block-size),1fr)}.et-overlay-main:has(.et-overlay-body):has(.et-overlay-footer){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-main:not(:has(.et-overlay-footer)){grid-template-rows:minmax(var(--et-overlay-body-min-block-size),1fr) auto}.et-overlay-container-drag-handle{block-size:var(--_et-overlay-drag-handle-block-size);margin-block:var(--_et-overlay-drag-handle-block-margin);display:none;justify-content:center}.et-overlay-container-drag-handle:before{content:\"\";position:static;inline-size:var(--_et-overlay-drag-handle-inline-size);block-size:var(--_et-overlay-drag-handle-block-size);background-color:var(--_et-overlay-drag-handle-color);border-radius:var(--_et-overlay-drag-handle-radius)}.et-overlay-body{display:grid;overflow:auto;padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body:has(.et-overlay-router-outlet-host){padding:0;overflow:visible}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-body-container{display:grid;grid-auto-rows:minmax(0,1fr);min-height:0}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-host{display:grid}.et-overlay-body:has(.et-overlay-router-outlet-host) .et-overlay-router-outlet-page{padding-inline:var(--et-overlay-padding-inline);padding-block:var(--et-overlay-body-padding-block);overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr)}.et-overlay-body.et-overlay-body--enable-divider-animations{transition:border-color .3s var(--ease-1)}.et-overlay-main:has(.et-overlay-header) .et-overlay-body.et-overlay-body--render-dividers{border-block-start:1px solid var(--et-overlay-body-divider-color)}.et-overlay-main:has(.et-overlay-footer) .et-overlay-body.et-overlay-body--render-dividers{border-block-end:1px solid var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers{border-color:var(--et-overlay-body-divider-color)}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-start{border-block-start-color:transparent}.et-overlay-body.et-overlay-body--render-dividers.et-overlay-body--dynamic-dividers.et-scrollable-body--is-at-end{border-block-end-color:transparent}.et-overlay-body .et-overlay-body-container{position:relative;min-block-size:100%}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element,.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{position:absolute;block-size:1px;pointer-events:none}.et-overlay-body .et-overlay-body-container .et-overlay-body-start-element{inset-inline:1px;inset-block-start:1px}.et-overlay-body .et-overlay-body-container .et-overlay-body-end-element{inset-inline:1px;inset-block-end:1px}.et-overlay-header{padding-block-start:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-end:var(--et-overlay-header-padding-block-end)}.et-overlay-footer{padding-block-end:var(--et-overlay-padding-block);padding-inline:var(--et-overlay-padding-inline);padding-block-start:var(--et-overlay-footer-padding-block-start)}.et-overlay-pane{pointer-events:none}.et-overlay.et-with-default-animation:after{content:\"\";position:absolute;background-color:inherit}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-to{transform:scale(0)!important;border-radius:250px}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),border-radius .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-1),border-radius .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--full-screen-dialog.et-animation-leave-active{transition:transform .15s var(--ease-in-5),border-radius .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-to{transform:translateY(100%)!important}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--bottom-sheet:after{inset-inline:0;inset-block-end:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-to{transform:translateY(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--top-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--top-sheet:after{inset-inline:0;inset-block-start:-50px;block-size:50px}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-to{transform:translate(-100%)!important}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--left-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--left-sheet:after{inset-inline-start:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-from,.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-to{transform:translate(100%)!important}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-enter-active{transition:transform .3s var(--ease-spring-1)}}.et-overlay.et-with-default-animation.et-overlay--right-sheet.et-animation-leave-active{transition:transform .15s var(--ease-in-5)}.et-overlay.et-with-default-animation.et-overlay--right-sheet:after{inset-inline-end:-50px;inset-block:0;inline-size:50px}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-from{opacity:0!important;transform:scale(.85)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-to{opacity:0!important;transform:scale(.7)!important}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-out-5),opacity .3s var(--ease-out-5)}@supports (transition-timing-function: linear(0,1)){.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-enter-active{transition:transform .3s var(--ease-spring-2),opacity .3s var(--ease-out-5)}}.et-overlay.et-with-default-animation.et-overlay--anchored-dialog.et-animation-leave-active{transition:transform .15s var(--ease-out-5),opacity .15s var(--ease-out-5)}\n"] }]
14402
15029
  }], ctorParameters: () => [] });
14403
15030
 
14404
15031
  const FILTER_OVERLAY_CONFIG = new InjectionToken('FILTER_OVERLAY_CONFIG');