{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/legacy-list/testing/list-item-harness-base.ts","../../../../../../../src/material/legacy-list/testing/list-harness-base.ts","../../../../../../../src/material/legacy-list/testing/action-list-harness.ts","../../../../../../../src/material/legacy-list/testing/list-harness.ts","../../../../../../../src/material/legacy-list/testing/nav-list-harness.ts","../../../../../../../src/material/legacy-list/testing/selection-list-harness.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.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n ContentContainerComponentHarness,\n parallel,\n} from '@angular/cdk/testing';\nimport {\n LegacyBaseListItemHarnessFilters,\n LegacySubheaderHarnessFilters,\n} from './list-harness-filters';\n\nconst iconSelector = '.mat-list-icon';\nconst avatarSelector = '.mat-list-avatar';\n\n/**\n * Gets a `HarnessPredicate` that applies the given `BaseListItemHarnessFilters` to the given\n * list item harness.\n * @template H The type of list item harness to create a predicate for.\n * @param harnessType A constructor for a list item harness.\n * @param options An instance of `BaseListItemHarnessFilters` to apply.\n * @return A `HarnessPredicate` for the given harness type with the given options applied.\n * @deprecated Use `getListItemPredicate` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport function getListItemPredicate(\n harnessType: ComponentHarnessConstructor,\n options: LegacyBaseListItemHarnessFilters,\n): HarnessPredicate {\n return new HarnessPredicate(harnessType, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n}\n\n/**\n * Harness for interacting with a list subheader.\n * @deprecated Use `MatSubheaderHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacySubheaderHarness extends ComponentHarness {\n static hostSelector = '.mat-subheader';\n\n static with(\n options: LegacySubheaderHarnessFilters = {},\n ): HarnessPredicate {\n return new HarnessPredicate(MatLegacySubheaderHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n\n /** Gets the full text content of the list item (including text from any font icons). */\n async getText(): Promise {\n return (await this.host()).text();\n }\n}\n\n/**\n * Selectors for the various list item sections that may contain user content.\n * @deprecated Use `enum` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport const enum MatLegacyListItemSection {\n CONTENT = '.mat-list-item-content',\n // TODO(mmalerba): consider adding sections for leading/trailing icons.\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatListItem` flavors.\n * @docs-private\n * @deprecated Use `class` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport abstract class MatLegacyListItemHarnessBase extends ContentContainerComponentHarness {\n private _lines = this.locatorForAll('.mat-line');\n private _avatar = this.locatorForOptional(avatarSelector);\n private _icon = this.locatorForOptional(iconSelector);\n\n /** Gets the full text content of the list item. */\n async getText(): Promise {\n return (await this.host()).text({exclude: `${iconSelector}, ${avatarSelector}`});\n }\n\n /** Gets the lines of text (`mat-line` elements) in this nav list item. */\n async getLinesText(): Promise {\n const lines = await this._lines();\n return parallel(() => lines.map(l => l.text()));\n }\n\n /** Whether this list item has an avatar. */\n async hasAvatar(): Promise {\n return !!(await this._avatar());\n }\n\n /** Whether this list item has an icon. */\n async hasIcon(): Promise {\n return !!(await this._icon());\n }\n\n /** Whether this list option is disabled. */\n async isDisabled(): Promise {\n return (await this.host()).hasClass('mat-list-item-disabled');\n }\n}\n","/**\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.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n parallel,\n} from '@angular/cdk/testing';\nimport {DividerHarnessFilters, MatDividerHarness} from '@angular/material/divider/testing';\nimport {\n LegacyBaseListItemHarnessFilters,\n LegacySubheaderHarnessFilters,\n} from './list-harness-filters';\nimport {MatLegacySubheaderHarness} from './list-item-harness-base';\n\n/**\n * Represents a section of a list falling under a specific header.\n * @deprecated Use `ListSection` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport interface ListSection {\n /** The heading for this list section. `undefined` if there is no heading. */\n heading?: string;\n\n /** The items in this list section. */\n items: I[];\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatList` flavors.\n * @template T A constructor type for a list item harness type used by this list harness.\n * @template C The list item harness type that `T` constructs.\n * @template F The filter type used filter list item harness of type `C`.\n * @docs-private\n * @deprecated Use `class` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport abstract class MatLegacyListHarnessBase<\n T extends ComponentHarnessConstructor & {with: (options?: F) => HarnessPredicate},\n C extends ComponentHarness,\n F extends LegacyBaseListItemHarnessFilters,\n> extends ComponentHarness {\n protected _itemHarness: T;\n\n /**\n * Gets a list of harnesses representing the items in this list.\n * @param filters Optional filters used to narrow which harnesses are included\n * @return The list of items matching the given filters.\n */\n async getItems(filters?: F): Promise {\n return this.locatorForAll(this._itemHarness.with(filters))();\n }\n\n /**\n * Gets a list of `ListSection` representing the list items grouped by subheaders. If the list has\n * no subheaders it is represented as a single `ListSection` with an undefined `heading` property.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sections by subheader.\n */\n async getItemsGroupedBySubheader(filters?: F): Promise[]> {\n type Section = {items: C[]; heading?: Promise};\n const listSections: Section[] = [];\n let currentSection: Section = {items: []};\n const itemsAndSubheaders = await this.getItemsWithSubheadersAndDividers({\n item: filters,\n divider: false,\n });\n for (const itemOrSubheader of itemsAndSubheaders) {\n if (itemOrSubheader instanceof MatLegacySubheaderHarness) {\n if (currentSection.heading !== undefined || currentSection.items.length) {\n listSections.push(currentSection);\n }\n currentSection = {heading: itemOrSubheader.getText(), items: []};\n } else {\n currentSection.items.push(itemOrSubheader);\n }\n }\n if (\n currentSection.heading !== undefined ||\n currentSection.items.length ||\n !listSections.length\n ) {\n listSections.push(currentSection);\n }\n\n // Concurrently wait for all sections to resolve their heading if present.\n return parallel(() =>\n listSections.map(async s => ({items: s.items, heading: await s.heading})),\n );\n }\n\n /**\n * Gets a list of sub-lists representing the list items grouped by dividers. If the list has no\n * dividers it is represented as a list with a single sub-list.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sub-lists by divider.\n */\n async getItemsGroupedByDividers(filters?: F): Promise {\n const listSections: C[][] = [[]];\n const itemsAndDividers = await this.getItemsWithSubheadersAndDividers({\n item: filters,\n subheader: false,\n });\n for (const itemOrDivider of itemsAndDividers) {\n if (itemOrDivider instanceof MatDividerHarness) {\n listSections.push([]);\n } else {\n listSections[listSections.length - 1].push(itemOrDivider);\n }\n }\n return listSections;\n }\n\n /**\n * Gets a list of harnesses representing all of the items, subheaders, and dividers\n * (in the order they appear in the list). Use `instanceof` to check which type of harness a given\n * item is.\n * @param filters Optional filters used to narrow which list items, subheaders, and dividers are\n * included. A value of `false` for the `item`, `subheader`, or `divider` properties indicates\n * that the respective harness type should be omitted completely.\n * @return The list of harnesses representing the items, subheaders, and dividers matching the\n * given filters.\n */\n getItemsWithSubheadersAndDividers(filters: {\n item: false;\n subheader: false;\n divider: false;\n }): Promise<[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false;\n subheader: false;\n divider: false;\n }): Promise;\n getItemsWithSubheadersAndDividers(filters: {\n item: false;\n subheader?: LegacySubheaderHarnessFilters | false;\n divider: false;\n }): Promise;\n getItemsWithSubheadersAndDividers(filters: {\n item: false;\n subheader: false;\n divider?: DividerHarnessFilters | false;\n }): Promise;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false;\n subheader?: LegacySubheaderHarnessFilters | false;\n divider: false;\n }): Promise<(C | MatLegacySubheaderHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false;\n subheader: false;\n divider?: false | DividerHarnessFilters;\n }): Promise<(C | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false;\n subheader?: false | LegacySubheaderHarnessFilters;\n divider?: false | DividerHarnessFilters;\n }): Promise<(MatLegacySubheaderHarness | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters?: {\n item?: F | false;\n subheader?: LegacySubheaderHarnessFilters | false;\n divider?: DividerHarnessFilters | false;\n }): Promise<(C | MatLegacySubheaderHarness | MatDividerHarness)[]>;\n async getItemsWithSubheadersAndDividers(\n filters: {\n item?: F | false;\n subheader?: LegacySubheaderHarnessFilters | false;\n divider?: DividerHarnessFilters | false;\n } = {},\n ): Promise<(C | MatLegacySubheaderHarness | MatDividerHarness)[]> {\n const query = [];\n if (filters.item !== false) {\n query.push(this._itemHarness.with(filters.item || ({} as F)));\n }\n if (filters.subheader !== false) {\n query.push(MatLegacySubheaderHarness.with(filters.subheader));\n }\n if (filters.divider !== false) {\n query.push(MatDividerHarness.with(filters.divider));\n }\n return this.locatorForAll(...query)();\n }\n}\n","/**\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.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatLegacyListHarnessBase} from './list-harness-base';\nimport {\n LegacyActionListHarnessFilters,\n LegacyActionListItemHarnessFilters,\n} from './list-harness-filters';\nimport {getListItemPredicate, MatLegacyListItemHarnessBase} from './list-item-harness-base';\n\n/**\n * Harness for interacting with a standard mat-action-list in tests.\n * @deprecated Use `MatActionListHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyActionListHarness extends MatLegacyListHarnessBase<\n typeof MatLegacyActionListItemHarness,\n MatLegacyActionListItemHarness,\n LegacyActionListItemHarnessFilters\n> {\n /** The selector for the host element of a `MatActionList` instance. */\n static hostSelector = 'mat-action-list.mat-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which action list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyActionListHarnessFilters = {},\n ): HarnessPredicate {\n return new HarnessPredicate(MatLegacyActionListHarness, options);\n }\n\n override _itemHarness = MatLegacyActionListItemHarness;\n}\n\n/**\n * Harness for interacting with an action list item.\n * @deprecated Use `MatActionListItemHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyActionListItemHarness extends MatLegacyListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatLegacyActionListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which action list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyActionListItemHarnessFilters = {},\n ): HarnessPredicate {\n return getListItemPredicate(MatLegacyActionListItemHarness, options);\n }\n\n /** Clicks on the action list item. */\n async click(): Promise {\n return (await this.host()).click();\n }\n\n /** Focuses the action list item. */\n async focus(): Promise {\n return (await this.host()).focus();\n }\n\n /** Blurs the action list item. */\n async blur(): Promise {\n return (await this.host()).blur();\n }\n\n /** Whether the action list item is focused. */\n async isFocused(): Promise {\n return (await this.host()).isFocused();\n }\n}\n","/**\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.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatLegacyListHarnessBase} from './list-harness-base';\nimport {LegacyListHarnessFilters, LegacyListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatLegacyListItemHarnessBase} from './list-item-harness-base';\n\n/**\n * Harness for interacting with a standard mat-list in tests.\n * @deprecated Use `MatListHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyListHarness extends MatLegacyListHarnessBase<\n typeof MatLegacyListItemHarness,\n MatLegacyListItemHarness,\n LegacyListItemHarnessFilters\n> {\n /** The selector for the host element of a `MatList` instance. */\n static hostSelector = '.mat-list:not(mat-action-list)';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListHarness` that meets certain\n * criteria.\n * @param options Options for filtering which list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: LegacyListHarnessFilters = {}): HarnessPredicate {\n return new HarnessPredicate(MatLegacyListHarness, options);\n }\n\n override _itemHarness = MatLegacyListItemHarness;\n}\n\n/**\n * Harness for interacting with a list item.\n * @deprecated Use `MatListItemHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyListItemHarness extends MatLegacyListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatLegacyListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListItemHarness` that meets\n * certain criteria.\n * @param options Options for filtering which list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyListItemHarnessFilters = {},\n ): HarnessPredicate {\n return getListItemPredicate(MatLegacyListItemHarness, options);\n }\n}\n","/**\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.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatLegacyListHarnessBase} from './list-harness-base';\nimport {LegacyNavListHarnessFilters, LegacyNavListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatLegacyListItemHarnessBase} from './list-item-harness-base';\n\n/**\n * Harness for interacting with a standard mat-nav-list in tests.\n * @deprecated Use `MatNavListHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyNavListHarness extends MatLegacyListHarnessBase<\n typeof MatLegacyNavListItemHarness,\n MatLegacyNavListItemHarness,\n LegacyNavListItemHarnessFilters\n> {\n /** The selector for the host element of a `MatNavList` instance. */\n static hostSelector = '.mat-nav-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which nav list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyNavListHarnessFilters = {},\n ): HarnessPredicate {\n return new HarnessPredicate(MatLegacyNavListHarness, options);\n }\n\n override _itemHarness = MatLegacyNavListItemHarness;\n}\n\n/**\n * Harness for interacting with a nav list item.\n * @deprecated Use `MatNavListItemHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyNavListItemHarness extends MatLegacyListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatLegacyNavListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which nav list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyNavListItemHarnessFilters = {},\n ): HarnessPredicate {\n return getListItemPredicate(MatLegacyNavListItemHarness, options).addOption(\n 'href',\n options.href,\n async (harness, href) => HarnessPredicate.stringMatches(harness.getHref(), href),\n );\n }\n\n /** Gets the href for this nav list item. */\n async getHref(): Promise {\n return (await this.host()).getAttribute('href');\n }\n\n /** Clicks on the nav list item. */\n async click(): Promise {\n return (await this.host()).click();\n }\n\n /** Focuses the nav list item. */\n async focus(): Promise {\n return (await this.host()).focus();\n }\n\n /** Blurs the nav list item. */\n async blur(): Promise {\n return (await this.host()).blur();\n }\n\n /** Whether the nav list item is focused. */\n async isFocused(): Promise {\n return (await this.host()).isFocused();\n }\n}\n","/**\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.io/license\n */\n\nimport {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatLegacyListOptionCheckboxPosition} from '@angular/material/legacy-list';\nimport {MatLegacyListHarnessBase} from './list-harness-base';\nimport {\n LegacyListItemHarnessFilters,\n LegacyListOptionHarnessFilters,\n LegacySelectionListHarnessFilters,\n} from './list-harness-filters';\nimport {getListItemPredicate, MatLegacyListItemHarnessBase} from './list-item-harness-base';\n\n/**\n * Harness for interacting with a standard mat-selection-list in tests.\n * @deprecated Use `MatSelectionListHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacySelectionListHarness extends MatLegacyListHarnessBase<\n typeof MatLegacyListOptionHarness,\n MatLegacyListOptionHarness,\n LegacyListOptionHarnessFilters\n> {\n /** The selector for the host element of a `MatSelectionList` instance. */\n static hostSelector = '.mat-selection-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which selection list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacySelectionListHarnessFilters = {},\n ): HarnessPredicate {\n return new HarnessPredicate(MatLegacySelectionListHarness, options);\n }\n\n override _itemHarness = MatLegacyListOptionHarness;\n\n /** Whether the selection list is disabled. */\n async isDisabled(): Promise {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Selects all items matching any of the given filters.\n * @param filters Filters that specify which items should be selected.\n */\n async selectItems(...filters: LegacyListOptionHarnessFilters[]): Promise {\n const items = await this._getItems(filters);\n await parallel(() => items.map(item => item.select()));\n }\n\n /**\n * Deselects all items matching any of the given filters.\n * @param filters Filters that specify which items should be deselected.\n */\n async deselectItems(...filters: LegacyListItemHarnessFilters[]): Promise {\n const items = await this._getItems(filters);\n await parallel(() => items.map(item => item.deselect()));\n }\n\n /** Gets all items matching the given list of filters. */\n private async _getItems(\n filters: LegacyListOptionHarnessFilters[],\n ): Promise {\n if (!filters.length) {\n return this.getItems();\n }\n const matches = await parallel(() => {\n return filters.map(filter => this.locatorForAll(MatLegacyListOptionHarness.with(filter))());\n });\n return matches.reduce((result, current) => [...result, ...current], []);\n }\n}\n\n/**\n * Harness for interacting with a list option.\n * @deprecated Use `MatListOptionHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyListOptionHarness extends MatLegacyListItemHarnessBase {\n /** The selector for the host element of a `MatListOption` instance. */\n static hostSelector = '.mat-list-option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListOptionHarness` that\n * meets certain criteria.\n * @param options Options for filtering which list option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyListOptionHarnessFilters = {},\n ): HarnessPredicate {\n return getListItemPredicate(MatLegacyListOptionHarness, options).addOption(\n 'is selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n );\n }\n\n private _itemContent = this.locatorFor('.mat-list-item-content');\n\n /** Gets the position of the checkbox relative to the list option content. */\n async getCheckboxPosition(): Promise {\n return (await (await this._itemContent()).hasClass('mat-list-item-content-reverse'))\n ? 'after'\n : 'before';\n }\n\n /** Whether the list option is selected. */\n async isSelected(): Promise {\n return (await (await this.host()).getAttribute('aria-selected')) === 'true';\n }\n\n /** Focuses the list option. */\n async focus(): Promise {\n return (await this.host()).focus();\n }\n\n /** Blurs the list option. */\n async blur(): Promise {\n return (await this.host()).blur();\n }\n\n /** Whether the list option is focused. */\n async isFocused(): Promise {\n return (await this.host()).isFocused();\n }\n\n /** Toggles the checked state of the checkbox. */\n async toggle() {\n return (await this.host()).click();\n }\n\n /**\n * Puts the list option in a checked state by toggling it if it is currently unchecked, or doing\n * nothing if it is already checked.\n */\n async select() {\n if (!(await this.isSelected())) {\n return this.toggle();\n }\n }\n\n /**\n * Puts the list option in an unchecked state by toggling it if it is currently checked, or doing\n * nothing if it is already unchecked.\n */\n async deselect() {\n if (await this.isSelected()) {\n return this.toggle();\n }\n }\n}\n"],"names":[],"mappings":";;;AAoBA,MAAM,YAAY,GAAG,gBAAgB,CAAC;AACtC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C;;;;;;;;;AASG;AACa,SAAA,oBAAoB,CAClC,WAA2C,EAC3C,OAAyC,EAAA;AAEzC,IAAA,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,CACzD,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAC3E,CAAC;AACJ,CAAC;AAED;;;;AAIG;AACG,MAAO,yBAA0B,SAAQ,gBAAgB,CAAA;aACtD,IAAY,CAAA,YAAA,GAAG,gBAAgB,CAAC,EAAA;AAEvC,IAAA,OAAO,IAAI,CACT,OAAA,GAAyC,EAAE,EAAA;AAE3C,QAAA,OAAO,IAAI,gBAAgB,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC,SAAS,CACvE,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAC3E,CAAC;KACH;;AAGD,IAAA,MAAM,OAAO,GAAA;QACX,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IA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