@angular/aria 21.0.0-rc.1 → 21.0.0-rc.2

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.
Files changed (41) hide show
  1. package/_adev_assets/aria-accordion.json +439 -55
  2. package/_adev_assets/aria-combobox.json +343 -35
  3. package/_adev_assets/aria-grid.json +345 -77
  4. package/_adev_assets/aria-listbox.json +113 -33
  5. package/_adev_assets/aria-menu.json +366 -141
  6. package/_adev_assets/aria-tabs.json +261 -77
  7. package/_adev_assets/aria-toolbar.json +72 -33
  8. package/_adev_assets/aria-tree.json +169 -26
  9. package/fesm2022/_widget-chunk.mjs +388 -57
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +121 -68
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -1
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +132 -21
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +198 -61
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +42 -31
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +173 -67
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +415 -439
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +86 -55
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +13 -25
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +86 -44
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/_grid-chunk.d.ts +216 -35
  33. package/types/accordion.d.ts +133 -34
  34. package/types/combobox.d.ts +145 -12
  35. package/types/grid.d.ts +149 -31
  36. package/types/listbox.d.ts +58 -26
  37. package/types/menu.d.ts +130 -46
  38. package/types/private.d.ts +210 -250
  39. package/types/tabs.d.ts +119 -39
  40. package/types/toolbar.d.ts +49 -29
  41. package/types/tree.d.ts +113 -41
package/fesm2022/grid.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import { _IdGenerator } from '@angular/cdk/a11y';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, contentChild, model } from '@angular/core';
3
+ import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, model, output } from '@angular/core';
4
4
  import { Directionality } from '@angular/cdk/bidi';
5
5
  import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_widget-chunk.mjs';
6
6
 
7
7
  class Grid {
8
8
  _elementRef = inject(ElementRef);
9
+ element = this._elementRef.nativeElement;
9
10
  _rows = contentChildren(GridRow, ...(ngDevMode ? [{
10
11
  debugName: "_rows",
11
12
  descendants: true
@@ -16,9 +17,6 @@ class Grid {
16
17
  debugName: "_rowPatterns"
17
18
  }] : []));
18
19
  textDirection = inject(Directionality).valueSignal;
19
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
20
- debugName: "element"
21
- }] : []));
22
20
  enableSelection = input(false, ...(ngDevMode ? [{
23
21
  debugName: "enableSelection",
24
22
  transform: booleanAttribute
@@ -64,25 +62,29 @@ class Grid {
64
62
  _pattern = new GridPattern({
65
63
  ...this,
66
64
  rows: this._rowPatterns,
67
- getCell: e => this._getCell(e)
65
+ getCell: e => this._getCell(e),
66
+ element: () => this.element
68
67
  });
69
68
  constructor() {
70
69
  afterRenderEffect(() => this._pattern.setDefaultStateEffect());
71
70
  afterRenderEffect(() => this._pattern.resetStateEffect());
71
+ afterRenderEffect(() => this._pattern.resetFocusEffect());
72
+ afterRenderEffect(() => this._pattern.restoreFocusEffect());
72
73
  afterRenderEffect(() => this._pattern.focusEffect());
73
74
  }
74
75
  _getCell(element) {
75
- const cellElement = element.closest('[ngGridCell]');
76
- if (cellElement === undefined) return;
77
- const widgetElement = element.closest('[ngGridCellWidget]');
78
- for (const row of this._rowPatterns()) {
79
- for (const cell of row.inputs.cells()) {
80
- if (cell.element() === cellElement || widgetElement !== undefined && cell.element() === widgetElement) {
81
- return cell;
76
+ let target = element;
77
+ while (target) {
78
+ for (const row of this._rowPatterns()) {
79
+ for (const cell of row.inputs.cells()) {
80
+ if (cell.element() === target) {
81
+ return cell;
82
+ }
82
83
  }
83
84
  }
85
+ target = target.parentElement?.closest('[ngGridCell]');
84
86
  }
85
- return;
87
+ return undefined;
86
88
  }
87
89
  static ɵfac = i0.ɵɵngDeclareFactory({
88
90
  minVersion: "12.0.0",
@@ -172,7 +174,7 @@ class Grid {
172
174
  "pointerdown": "_pattern.onPointerdown($event)",
173
175
  "pointermove": "_pattern.onPointermove($event)",
174
176
  "pointerup": "_pattern.onPointerup($event)",
175
- "focusin": "_pattern.onFocusIn()",
177
+ "focusin": "_pattern.onFocusIn($event)",
176
178
  "focusout": "_pattern.onFocusOut($event)"
177
179
  },
178
180
  properties: {
@@ -212,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({
212
214
  '(pointerdown)': '_pattern.onPointerdown($event)',
213
215
  '(pointermove)': '_pattern.onPointermove($event)',
214
216
  '(pointerup)': '_pattern.onPointerup($event)',
215
- '(focusin)': '_pattern.onFocusIn()',
217
+ '(focusin)': '_pattern.onFocusIn($event)',
216
218
  '(focusout)': '_pattern.onFocusOut($event)'
217
219
  }
218
220
  }]
@@ -221,6 +223,7 @@ i0.ɵɵngDeclareClassMetadata({
221
223
  });
222
224
  class GridRow {
223
225
  _elementRef = inject(ElementRef);
226
+ element = this._elementRef.nativeElement;
224
227
  _cells = contentChildren(GridCell, ...(ngDevMode ? [{
225
228
  debugName: "_cells",
226
229
  descendants: true
@@ -234,12 +237,6 @@ class GridRow {
234
237
  grid = computed(() => this._grid._pattern, ...(ngDevMode ? [{
235
238
  debugName: "grid"
236
239
  }] : []));
237
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
238
- debugName: "element"
239
- }] : []));
240
- role = input('row', ...(ngDevMode ? [{
241
- debugName: "role"
242
- }] : []));
243
240
  rowIndex = input(...(ngDevMode ? [undefined, {
244
241
  debugName: "rowIndex"
245
242
  }] : []));
@@ -262,13 +259,6 @@ class GridRow {
262
259
  isStandalone: true,
263
260
  selector: "[ngGridRow]",
264
261
  inputs: {
265
- role: {
266
- classPropertyName: "role",
267
- publicName: "role",
268
- isSignal: true,
269
- isRequired: false,
270
- transformFunction: null
271
- },
272
262
  rowIndex: {
273
263
  classPropertyName: "rowIndex",
274
264
  publicName: "rowIndex",
@@ -278,8 +268,11 @@ class GridRow {
278
268
  }
279
269
  },
280
270
  host: {
271
+ attributes: {
272
+ "role": "row"
273
+ },
281
274
  properties: {
282
- "attr.role": "role()"
275
+ "attr.aria-rowindex": "_pattern.rowIndex()"
283
276
  },
284
277
  classAttribute: "grid-row"
285
278
  },
@@ -305,23 +298,31 @@ i0.ɵɵngDeclareClassMetadata({
305
298
  exportAs: 'ngGridRow',
306
299
  host: {
307
300
  'class': 'grid-row',
308
- '[attr.role]': 'role()'
301
+ 'role': 'row',
302
+ '[attr.aria-rowindex]': '_pattern.rowIndex()'
309
303
  }
310
304
  }]
311
305
  }]
312
306
  });
313
307
  class GridCell {
314
308
  _elementRef = inject(ElementRef);
315
- _widgets = contentChild(GridCellWidget, ...(ngDevMode ? [{
316
- debugName: "_widgets"
309
+ element = this._elementRef.nativeElement;
310
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
311
+ debugName: "active"
317
312
  }] : []));
318
- _widgetPattern = computed(() => this._widgets()?._pattern, ...(ngDevMode ? [{
319
- debugName: "_widgetPattern"
313
+ _widgets = contentChildren(GridCellWidget, ...(ngDevMode ? [{
314
+ debugName: "_widgets",
315
+ descendants: true
316
+ }] : [{
317
+ descendants: true
318
+ }]));
319
+ _widgetPatterns = computed(() => this._widgets().map(w => w._pattern), ...(ngDevMode ? [{
320
+ debugName: "_widgetPatterns"
320
321
  }] : []));
321
322
  _row = inject(GridRow);
322
- _id = inject(_IdGenerator).getId('ng-grid-cell-', true);
323
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
324
- debugName: "element"
323
+ textDirection = inject(Directionality).valueSignal;
324
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-', true), ...(ngDevMode ? [{
325
+ debugName: "id"
325
326
  }] : []));
326
327
  role = input('gridcell', ...(ngDevMode ? [{
327
328
  debugName: "role"
@@ -350,13 +351,41 @@ class GridCell {
350
351
  selectable = input(true, ...(ngDevMode ? [{
351
352
  debugName: "selectable"
352
353
  }] : []));
354
+ orientation = input('horizontal', ...(ngDevMode ? [{
355
+ debugName: "orientation"
356
+ }] : []));
357
+ wrap = input(true, ...(ngDevMode ? [{
358
+ debugName: "wrap",
359
+ transform: booleanAttribute
360
+ }] : [{
361
+ transform: booleanAttribute
362
+ }]));
363
+ tabindex = input(...(ngDevMode ? [undefined, {
364
+ debugName: "tabindex"
365
+ }] : []));
366
+ _tabIndex = computed(() => this.tabindex() ?? this._pattern.tabIndex(), ...(ngDevMode ? [{
367
+ debugName: "_tabIndex"
368
+ }] : []));
353
369
  _pattern = new GridCellPattern({
354
370
  ...this,
355
- id: () => this._id,
356
371
  grid: this._row.grid,
357
372
  row: () => this._row._pattern,
358
- widget: this._widgetPattern
373
+ widgets: this._widgetPatterns,
374
+ getWidget: e => this._getWidget(e),
375
+ element: () => this.element
359
376
  });
377
+ constructor() {}
378
+ _getWidget(element) {
379
+ let target = element;
380
+ while (target) {
381
+ const pattern = this._widgetPatterns().find(w => w.element() === target);
382
+ if (pattern) {
383
+ return pattern;
384
+ }
385
+ target = target.parentElement?.closest('[ngGridCellWidget]');
386
+ }
387
+ return undefined;
388
+ }
360
389
  static ɵfac = i0.ɵɵngDeclareFactory({
361
390
  minVersion: "12.0.0",
362
391
  version: "20.2.0-next.2",
@@ -372,6 +401,13 @@ class GridCell {
372
401
  isStandalone: true,
373
402
  selector: "[ngGridCell]",
374
403
  inputs: {
404
+ id: {
405
+ classPropertyName: "id",
406
+ publicName: "id",
407
+ isSignal: true,
408
+ isRequired: false,
409
+ transformFunction: null
410
+ },
375
411
  role: {
376
412
  classPropertyName: "role",
377
413
  publicName: "role",
@@ -427,6 +463,27 @@ class GridCell {
427
463
  isSignal: true,
428
464
  isRequired: false,
429
465
  transformFunction: null
466
+ },
467
+ orientation: {
468
+ classPropertyName: "orientation",
469
+ publicName: "orientation",
470
+ isSignal: true,
471
+ isRequired: false,
472
+ transformFunction: null
473
+ },
474
+ wrap: {
475
+ classPropertyName: "wrap",
476
+ publicName: "wrap",
477
+ isSignal: true,
478
+ isRequired: false,
479
+ transformFunction: null
480
+ },
481
+ tabindex: {
482
+ classPropertyName: "tabindex",
483
+ publicName: "tabindex",
484
+ isSignal: true,
485
+ isRequired: false,
486
+ transformFunction: null
430
487
  }
431
488
  },
432
489
  outputs: {
@@ -438,7 +495,7 @@ class GridCell {
438
495
  "attr.id": "_pattern.id()",
439
496
  "attr.rowspan": "_pattern.rowSpan()",
440
497
  "attr.colspan": "_pattern.colSpan()",
441
- "attr.data-active": "_pattern.active()",
498
+ "attr.data-active": "active()",
442
499
  "attr.data-anchor": "_pattern.anchor()",
443
500
  "attr.aria-disabled": "_pattern.disabled()",
444
501
  "attr.aria-rowspan": "_pattern.rowSpan()",
@@ -446,13 +503,12 @@ class GridCell {
446
503
  "attr.aria-rowindex": "_pattern.ariaRowIndex()",
447
504
  "attr.aria-colindex": "_pattern.ariaColIndex()",
448
505
  "attr.aria-selected": "_pattern.ariaSelected()",
449
- "tabindex": "_pattern.tabIndex()"
506
+ "tabindex": "_tabIndex()"
450
507
  },
451
508
  classAttribute: "grid-cell"
452
509
  },
453
510
  queries: [{
454
511
  propertyName: "_widgets",
455
- first: true,
456
512
  predicate: GridCellWidget,
457
513
  descendants: true,
458
514
  isSignal: true
@@ -477,7 +533,7 @@ i0.ɵɵngDeclareClassMetadata({
477
533
  '[attr.id]': '_pattern.id()',
478
534
  '[attr.rowspan]': '_pattern.rowSpan()',
479
535
  '[attr.colspan]': '_pattern.colSpan()',
480
- '[attr.data-active]': '_pattern.active()',
536
+ '[attr.data-active]': 'active()',
481
537
  '[attr.data-anchor]': '_pattern.anchor()',
482
538
  '[attr.aria-disabled]': '_pattern.disabled()',
483
539
  '[attr.aria-rowspan]': '_pattern.rowSpan()',
@@ -485,26 +541,75 @@ i0.ɵɵngDeclareClassMetadata({
485
541
  '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',
486
542
  '[attr.aria-colindex]': '_pattern.ariaColIndex()',
487
543
  '[attr.aria-selected]': '_pattern.ariaSelected()',
488
- '[tabindex]': '_pattern.tabIndex()'
544
+ '[tabindex]': '_tabIndex()'
489
545
  }
490
546
  }]
491
- }]
547
+ }],
548
+ ctorParameters: () => []
492
549
  });
493
550
  class GridCellWidget {
494
551
  _elementRef = inject(ElementRef);
552
+ element = this._elementRef.nativeElement;
553
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
554
+ debugName: "active"
555
+ }] : []));
495
556
  _cell = inject(GridCell);
496
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
497
- debugName: "element"
557
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true), ...(ngDevMode ? [{
558
+ debugName: "id"
559
+ }] : []));
560
+ widgetType = input('simple', ...(ngDevMode ? [{
561
+ debugName: "widgetType"
562
+ }] : []));
563
+ disabled = input(false, ...(ngDevMode ? [{
564
+ debugName: "disabled",
565
+ transform: booleanAttribute
566
+ }] : [{
567
+ transform: booleanAttribute
568
+ }]));
569
+ focusTarget = input(...(ngDevMode ? [undefined, {
570
+ debugName: "focusTarget"
571
+ }] : []));
572
+ onActivate = output();
573
+ onDeactivate = output();
574
+ tabindex = input(...(ngDevMode ? [undefined, {
575
+ debugName: "tabindex"
498
576
  }] : []));
499
- activate = model(false, ...(ngDevMode ? [{
500
- debugName: "activate"
577
+ _tabIndex = computed(() => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()), ...(ngDevMode ? [{
578
+ debugName: "_tabIndex"
501
579
  }] : []));
502
580
  _pattern = new GridCellWidgetPattern({
503
581
  ...this,
504
- cell: () => this._cell._pattern
582
+ element: () => this.element,
583
+ cell: () => this._cell._pattern,
584
+ focusTarget: computed(() => {
585
+ if (this.focusTarget() instanceof ElementRef) {
586
+ return this.focusTarget().nativeElement;
587
+ }
588
+ return this.focusTarget();
589
+ })
505
590
  });
506
- focus() {
507
- this.element().focus();
591
+ get isActivated() {
592
+ return this._pattern.isActivated.asReadonly();
593
+ }
594
+ constructor() {
595
+ afterRenderEffect(() => {
596
+ const activateEvent = this._pattern.lastActivateEvent();
597
+ if (activateEvent) {
598
+ this.onActivate.emit(activateEvent);
599
+ }
600
+ });
601
+ afterRenderEffect(() => {
602
+ const deactivateEvent = this._pattern.lastDeactivateEvent();
603
+ if (deactivateEvent) {
604
+ this.onDeactivate.emit(deactivateEvent);
605
+ }
606
+ });
607
+ }
608
+ activate() {
609
+ this._pattern.activate();
610
+ }
611
+ deactivate() {
612
+ this._pattern.deactivate();
508
613
  }
509
614
  static ɵfac = i0.ɵɵngDeclareFactory({
510
615
  minVersion: "12.0.0",
@@ -521,21 +626,51 @@ class GridCellWidget {
521
626
  isStandalone: true,
522
627
  selector: "[ngGridCellWidget]",
523
628
  inputs: {
524
- activate: {
525
- classPropertyName: "activate",
526
- publicName: "activate",
629
+ id: {
630
+ classPropertyName: "id",
631
+ publicName: "id",
632
+ isSignal: true,
633
+ isRequired: false,
634
+ transformFunction: null
635
+ },
636
+ widgetType: {
637
+ classPropertyName: "widgetType",
638
+ publicName: "widgetType",
639
+ isSignal: true,
640
+ isRequired: false,
641
+ transformFunction: null
642
+ },
643
+ disabled: {
644
+ classPropertyName: "disabled",
645
+ publicName: "disabled",
646
+ isSignal: true,
647
+ isRequired: false,
648
+ transformFunction: null
649
+ },
650
+ focusTarget: {
651
+ classPropertyName: "focusTarget",
652
+ publicName: "focusTarget",
653
+ isSignal: true,
654
+ isRequired: false,
655
+ transformFunction: null
656
+ },
657
+ tabindex: {
658
+ classPropertyName: "tabindex",
659
+ publicName: "tabindex",
527
660
  isSignal: true,
528
661
  isRequired: false,
529
662
  transformFunction: null
530
663
  }
531
664
  },
532
665
  outputs: {
533
- activate: "activateChange"
666
+ onActivate: "onActivate",
667
+ onDeactivate: "onDeactivate"
534
668
  },
535
669
  host: {
536
670
  properties: {
537
- "attr.data-active": "_pattern.active()",
538
- "tabindex": "_pattern.tabIndex()"
671
+ "attr.data-active": "active()",
672
+ "attr.data-active-control": "isActivated() ? \"widget\" : \"cell\"",
673
+ "tabindex": "_tabIndex()"
539
674
  },
540
675
  classAttribute: "grid-cell-widget"
541
676
  },
@@ -555,11 +690,13 @@ i0.ɵɵngDeclareClassMetadata({
555
690
  exportAs: 'ngGridCellWidget',
556
691
  host: {
557
692
  'class': 'grid-cell-widget',
558
- '[attr.data-active]': '_pattern.active()',
559
- '[tabindex]': '_pattern.tabIndex()'
693
+ '[attr.data-active]': 'active()',
694
+ '[attr.data-active-control]': 'isActivated() ? "widget" : "cell"',
695
+ '[tabindex]': '_tabIndex()'
560
696
  }
561
697
  }]
562
- }]
698
+ }],
699
+ ctorParameters: () => []
563
700
  });
564
701
 
565
702
  export { Grid, GridCell, GridCellWidget, GridRow };
@@ -1 +1 @@
1
- {"version":3,"file":"grid.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\n\n/** A directive that provides grid-based navigation and selection behavior. */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'class': 'grid',\n 'role': 'grid',\n '[tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(pointermove)': '_pattern.onPointermove($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Grid {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The rows that make up the grid. */\n private readonly _rows = contentChildren(GridRow, {descendants: true});\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._rows().map(r => r._pattern),\n );\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether selection is enabled for the grid. */\n readonly enableSelection = input(false, {transform: booleanAttribute});\n\n /** Whether the grid is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether to allow disabled items to receive focus. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the grid. */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The wrapping behavior for keyboard navigation along the row axis. */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The wrapping behavior for keyboard navigation along the column axis. */\n readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** Whether multiple cells in the grid can be selected. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** The selection strategy used by the grid. */\n readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** Whether enable range selections (with modifier keys or dragging). */\n readonly enableRangeSelection = input(false, {transform: booleanAttribute});\n\n /** The UI pattern for the grid. */\n readonly _pattern = new GridPattern({\n ...this,\n rows: this._rowPatterns,\n getCell: e => this._getCell(e),\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.setDefaultStateEffect());\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element): GridCellPattern | undefined {\n const cellElement = element.closest('[ngGridCell]');\n if (cellElement === undefined) return;\n\n const widgetElement = element.closest('[ngGridCellWidget]');\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (\n cell.element() === cellElement ||\n (widgetElement !== undefined && cell.element() === widgetElement)\n ) {\n return cell;\n }\n }\n }\n return;\n }\n}\n\n/** A directive that represents a row in a grid. */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n '[attr.role]': 'role()',\n },\n})\nexport class GridRow {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The cells that make up this row. */\n private readonly _cells = contentChildren(GridCell, {descendants: true});\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<GridCellPattern[]> = computed(() =>\n this._cells().map(c => c._pattern),\n );\n\n /** The parent grid. */\n private readonly _grid = inject(Grid);\n\n /** The parent grid UI pattern. */\n readonly grid = computed(() => this._grid._pattern);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the row. */\n readonly role = input<'row' | 'rowheader'>('row');\n\n /** The index of this row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The UI pattern for the grid row. */\n readonly _pattern = new GridRowPattern({\n ...this,\n cells: this._cellPatterns,\n });\n}\n\n/** A directive that represents a cell in a grid. */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n host: {\n 'class': 'grid-cell',\n '[attr.role]': 'role()',\n '[attr.id]': '_pattern.id()',\n '[attr.rowspan]': '_pattern.rowSpan()',\n '[attr.colspan]': '_pattern.colSpan()',\n '[attr.data-active]': '_pattern.active()',\n '[attr.data-anchor]': '_pattern.anchor()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-rowspan]': '_pattern.rowSpan()',\n '[attr.aria-colspan]': '_pattern.colSpan()',\n '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',\n '[attr.aria-colindex]': '_pattern.ariaColIndex()',\n '[attr.aria-selected]': '_pattern.ariaSelected()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCell {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The widget contained within this cell, if any. */\n private readonly _widgets = contentChild(GridCellWidget);\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widgets()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\n\n /** A unique identifier for the cell. */\n private readonly _id = inject(_IdGenerator).getId('ng-grid-cell-', true);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader'>('gridcell');\n\n /** The number of rows the cell should span. */\n readonly rowSpan = input<number>(1);\n\n /** The number of columns the cell should span. */\n readonly colSpan = input<number>(1);\n\n /** The index of this cell's row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The index of this cell's column within the grid. */\n readonly colIndex = input<number>();\n\n /** Whether the cell is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the cell is selected. */\n readonly selected = model<boolean>(false);\n\n /** Whether the cell is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n id: () => this._id,\n grid: this._row.grid,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n });\n}\n\n/** A directive that represents a widget inside a grid cell. */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': '_pattern.active()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCellWidget {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent cell. */\n private readonly _cell = inject(GridCell);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether the widget is activated and the grid navigation should be paused. */\n readonly activate = model<boolean>(false);\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n cell: () => this._cell._pattern,\n });\n\n /** Focuses the widget. */\n focus(): void {\n this.element().focus();\n }\n}\n"],"names":["Grid","_elementRef","inject","ElementRef","_rows","contentChildren","GridRow","descendants","_rowPatterns","computed","map","r","_pattern","ngDevMode","debugName","textDirection","Directionality","valueSignal","element","nativeElement","enableSelection","input","transform","booleanAttribute","disabled","softDisabled","focusMode","rowWrap","colWrap","multi","selectionMode","enableRangeSelection","GridPattern","rows","getCell","e","_getCell","constructor","afterRenderEffect","setDefaultStateEffect","resetStateEffect","focusEffect","cellElement","closest","undefined","widgetElement","row","cell","inputs","cells","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","ngImport","decorators","args","selector","host","_cells","GridCell","_cellPatterns","c","_grid","grid","role","rowIndex","GridRowPattern","_widgets","contentChild","GridCellWidget","_widgetPattern","_row","_id","_IdGenerator","getId","rowSpan","colSpan","colIndex","selected","model","selectable","GridCellPattern","id","widget","_cell","activate","GridCellWidgetPattern","focus","isStandalone","classPropertyName","publicName","isRequired","transformFunction","outputs","properties","classAttribute"],"mappings":";;;;;;MA2CaA,IAAI,CAAA;AAEEC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;EAGhCC,KAAK,GAAGC,eAAe,CAACC,OAAO;;AAAGC,IAAAA,WAAW,EAAE;GAAI,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AAE;AACf;KACF;;;;;;"}
1
+ {"version":3,"file":"grid.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n output,\n model,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\n\n/**\n * The container for a grid. It provides keyboard navigation and focus management for the grid's\n * rows and cells. It manages the overall behavior of the grid, including focus\n * wrapping, selection, and disabled states.\n *\n * ```html\n * <table ngGrid [multi]=\"true\" [enableSelection]=\"true\">\n * @for (row of gridData; track row) {\n * <tr ngGridRow>\n * @for (cell of row; track cell) {\n * <td ngGridCell [disabled]=\"cell.disabled\">\n * {{cell.value}}\n * </td>\n * }\n * </tr>\n * }\n * </table>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'class': 'grid',\n 'role': 'grid',\n '[tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(pointermove)': '_pattern.onPointermove($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Grid {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The rows that make up the grid. */\n private readonly _rows = contentChildren(GridRow, {descendants: true});\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._rows().map(r => r._pattern),\n );\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether selection is enabled for the grid. */\n readonly enableSelection = input(false, {transform: booleanAttribute});\n\n /** Whether the grid is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /**\n * The focus strategy used by the grid.\n * - `roving`: Focus is moved to the active cell using `tabindex`.\n * - `activedescendant`: Focus remains on the grid container, and `aria-activedescendant` is used to indicate the active cell.\n */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /**\n * The wrapping behavior for keyboard navigation along the row axis.\n * - `continuous`: Navigation wraps from the last row to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current row.\n * - `nowrap`: Navigation stops at the first/last item in the row.\n */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /**\n * The wrapping behavior for keyboard navigation along the column axis.\n * - `continuous`: Navigation wraps from the last column to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current column.\n * - `nowrap`: Navigation stops at the first/last item in the column.\n */\n readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** Whether multiple cells in the grid can be selected. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /**\n * The selection strategy used by the grid.\n * - `follow`: The focused cell is automatically selected.\n * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).\n */\n readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** Whether enable range selections (with modifier keys or dragging). */\n readonly enableRangeSelection = input(false, {transform: booleanAttribute});\n\n /** The UI pattern for the grid. */\n readonly _pattern = new GridPattern({\n ...this,\n rows: this._rowPatterns,\n getCell: e => this._getCell(e),\n element: () => this.element,\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.setDefaultStateEffect());\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.resetFocusEffect());\n afterRenderEffect(() => this._pattern.restoreFocusEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element | null | undefined): GridCellPattern | undefined {\n let target = element;\n\n while (target) {\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (cell.element() === target) {\n return cell;\n }\n }\n }\n\n target = target.parentElement?.closest('[ngGridCell]');\n }\n\n return undefined;\n }\n}\n\n/**\n * Represents a row within a grid. It is a container for `ngGridCell` directives.\n *\n * ```html\n * <tr ngGridRow>\n * <!-- ... cells ... -->\n * </tr>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n 'role': 'row',\n '[attr.aria-rowindex]': '_pattern.rowIndex()',\n },\n})\nexport class GridRow {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The cells that make up this row. */\n private readonly _cells = contentChildren(GridCell, {descendants: true});\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<GridCellPattern[]> = computed(() =>\n this._cells().map(c => c._pattern),\n );\n\n /** The parent grid. */\n private readonly _grid = inject(Grid);\n\n /** The parent grid UI pattern. */\n readonly grid = computed(() => this._grid._pattern);\n\n /** The index of this row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The UI pattern for the grid row. */\n readonly _pattern = new GridRowPattern({\n ...this,\n cells: this._cellPatterns,\n });\n}\n\n/**\n * Represents a cell within a grid row. It is the primary focusable element\n * within the grid. It can be disabled and can have its selection state managed\n * through the `selected` input.\n *\n * ```html\n * <td ngGridCell [disabled]=\"isDisabled\" [(selected)]=\"isSelected\">\n * Cell Content\n * </td>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n host: {\n 'class': 'grid-cell',\n '[attr.role]': 'role()',\n '[attr.id]': '_pattern.id()',\n '[attr.rowspan]': '_pattern.rowSpan()',\n '[attr.colspan]': '_pattern.colSpan()',\n '[attr.data-active]': 'active()',\n '[attr.data-anchor]': '_pattern.anchor()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-rowspan]': '_pattern.rowSpan()',\n '[attr.aria-colspan]': '_pattern.colSpan()',\n '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',\n '[attr.aria-colindex]': '_pattern.ariaColIndex()',\n '[attr.aria-selected]': '_pattern.ariaSelected()',\n '[tabindex]': '_tabIndex()',\n },\n})\nexport class GridCell {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the cell is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The widgets contained within this cell, if any. */\n private readonly _widgets = contentChildren(GridCellWidget, {descendants: true});\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPatterns: Signal<GridCellWidgetPattern[]> = computed(() =>\n this._widgets().map(w => w._pattern),\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** A unique identifier for the cell. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-', true));\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader' | 'rowheader'>('gridcell');\n\n /** The number of rows the cell should span. */\n readonly rowSpan = input<number>(1);\n\n /** The number of columns the cell should span. */\n readonly colSpan = input<number>(1);\n\n /** The index of this cell's row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The index of this cell's column within the grid. */\n readonly colIndex = input<number>();\n\n /** Whether the cell is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the cell is selected. */\n readonly selected = model<boolean>(false);\n\n /** Whether the cell is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** Orientation of the widgets in the cell. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** Whether widgets navigation wraps. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? this._pattern.tabIndex(),\n );\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n grid: this._row.grid,\n row: () => this._row._pattern,\n widgets: this._widgetPatterns,\n getWidget: e => this._getWidget(e),\n element: () => this.element,\n });\n\n constructor() {}\n\n /** Gets the cell widget pattern for a given element. */\n private _getWidget(element: Element | null | undefined): GridCellWidgetPattern | undefined {\n let target = element;\n\n while (target) {\n const pattern = this._widgetPatterns().find(w => w.element() === target);\n if (pattern) {\n return pattern;\n }\n\n target = target.parentElement?.closest('[ngGridCellWidget]');\n }\n\n return undefined;\n }\n}\n\n/**\n * Represents an interactive element inside a `GridCell`. It allows for pausing grid navigation to\n * interact with the widget.\n *\n * When the user interacts with the widget (e.g., by typing in an input or opening a menu), grid\n * navigation is temporarily suspended to allow the widget to handle keyboard\n * events.\n *\n * ```html\n * <td ngGridCell>\n * <button ngGridCellWidget>Click Me</button>\n * </td>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': 'active()',\n '[attr.data-active-control]': 'isActivated() ? \"widget\" : \"cell\"',\n '[tabindex]': '_tabIndex()',\n },\n})\nexport class GridCellWidget {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The parent cell. */\n private readonly _cell = inject(GridCell);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true));\n\n /** The type of widget, which determines how it is activated. */\n readonly widgetType = input<'simple' | 'complex' | 'editable'>('simple');\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The target that will receive focus instead of the widget. */\n readonly focusTarget = input<ElementRef | HTMLElement | undefined>();\n\n /** Emits when the widget is activated. */\n readonly onActivate = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** Emits when the widget is deactivated. */\n readonly onDeactivate = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** The tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()),\n );\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n element: () => this.element,\n cell: () => this._cell._pattern,\n focusTarget: computed(() => {\n if (this.focusTarget() instanceof ElementRef) {\n return (this.focusTarget() as ElementRef).nativeElement;\n }\n return this.focusTarget();\n }),\n });\n\n /** Whether the widget is activated. */\n get isActivated(): Signal<boolean> {\n return this._pattern.isActivated.asReadonly();\n }\n\n constructor() {\n afterRenderEffect(() => {\n const activateEvent = this._pattern.lastActivateEvent();\n if (activateEvent) {\n this.onActivate.emit(activateEvent);\n }\n });\n\n afterRenderEffect(() => {\n const deactivateEvent = this._pattern.lastDeactivateEvent();\n if (deactivateEvent) {\n this.onDeactivate.emit(deactivateEvent);\n }\n });\n }\n\n /** Activates the widget. */\n activate(): void {\n this._pattern.activate();\n }\n\n /** Deactivates the widget. */\n deactivate(): void {\n this._pattern.deactivate();\n }\n}\n"],"names":["Grid","_elementRef","inject","ElementRef","element","nativeElement","_rows","contentChildren","GridRow","descendants","_rowPatterns","computed","map","r","_pattern","ngDevMode","debugName","textDirection","Directionality","valueSignal","enableSelection","input","transform","booleanAttribute","disabled","softDisabled","focusMode","rowWrap","colWrap","multi","selectionMode","enableRangeSelection","GridPattern","rows","getCell","e","_getCell","constructor","afterRenderEffect","setDefaultStateEffect","resetStateEffect","resetFocusEffect","restoreFocusEffect","focusEffect","target","row","cell","inputs","cells","parentElement","closest","undefined","deps","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","ngImport","decorators","args","selector","host","_cells","GridCell","_cellPatterns","c","_grid","grid","rowIndex","GridRowPattern","active","_widgets","GridCellWidget","_widgetPatterns","w","_row","id","_IdGenerator","getId","role","rowSpan","colSpan","colIndex","selected","model","selectable","orientation","wrap","tabindex","_tabIndex","tabIndex","GridCellPattern","widgets","getWidget","_getWidget","pattern","find","_cell","widgetType","focusTarget","onActivate","output","onDeactivate","GridCellWidgetPattern","isActivated","asReadonly","activateEvent","lastActivateEvent","emit","deactivateEvent","lastDeactivateEvent","activate","deactivate","isStandalone","classPropertyName","publicName","isRequired","transformFunction","outputs","properties","classAttribute"],"mappings":";;;;;;MA+DaA,IAAI,CAAA;AAEEC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,IAAI,CAACH,WAAW,CAACI,aAA4B;EAG/CC,KAAK,GAAGC,eAAe,CAACC,OAAO;;AAAGC,IAAAA,WAAW,EAAE;GAAI,CAAA,GAAA,CAAlB;AAACA,IAAAA,WAAW,EAAE;GAAK,GAAC;EAGrDC,YAAY,GAA6BC,QAAQ,CAAC,MACjE,IAAI,CAACL,KAAK,EAAE,CAACM,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,EAAA,IAAAC,SAAA,GAAA,CAAA;AAAAC,IA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