{"version":3,"sources":["webpack:///./node_modules/@material/chips/action/constants.js","webpack:///./node_modules/@material/chips/chip/foundation.js","webpack:///./node_modules/@material/dom/announce.js","webpack:///./node_modules/@material/dom/ponyfill.js","webpack:///./node_modules/@material/data-table/constants.js","webpack:///./node_modules/@material/checkbox/constants.js","webpack:///./node_modules/@material/checkbox/foundation.js","webpack:///./node_modules/@material/chips/action/component-ripple.js","webpack:///./node_modules/@material/drawer/dismissible/foundation.js","webpack:///./node_modules/@material/chips/action/trailing-foundation.js","webpack:///./node_modules/@material/base/observer.js","webpack:///./node_modules/@material/base/observer-foundation.js","webpack:///./node_modules/@material/chips/chip-set/constants.js","webpack:///./node_modules/@material/chips/chip-set/foundation.js","webpack:///./node_modules/@material/animation/util.js","webpack:///./node_modules/@material/base/foundation.js","webpack:///./node_modules/@material/drawer/component.js","webpack:///./node_modules/@material/drawer/util.js","webpack:///./node_modules/@material/dom/focus-trap.js","webpack:///./node_modules/@material/dom/keyboard.js","webpack:///./node_modules/@material/chips/chip/constants.js","webpack:///./node_modules/@material/circular-progress/constants.js","webpack:///./node_modules/@material/chips/action/primary-foundation.js","webpack:///./node_modules/@material/base/component.js","webpack:///./node_modules/@material/dialog/util.js","webpack:///./node_modules/@material/dialog/constants.js","webpack:///./node_modules/@material/animation/animationframe.js","webpack:///./node_modules/@material/drawer/constants.js","webpack:///./node_modules/@material/dom/events.js","webpack:///./node_modules/@material/data-table/foundation.js","webpack:///./node_modules/@material/chips/action/foundation.js","webpack:///./node_modules/@material/circular-progress/foundation.js","webpack:///./node_modules/@material/dialog/foundation.js","webpack:///./node_modules/@material/drawer/modal/foundation.js"],"names":["CssClasses","InteractionTrigger","ActionType","Events","FocusBehavior","Attributes","Direction","AnimationKeys","MDCChipFoundation","_super","adapter","_this","call","this","defaultAdapter","animFrame","Object","defineProperty","get","addClass","emitEvent","getActions","getAttribute","getElementID","getOffsetWidth","hasClass","isActionDisabled","isActionFocusable","isActionSelectable","isActionSelected","isRTL","removeClass","setActionDisabled","setActionFocus","setActionSelected","setStyleProperty","enumerable","configurable","prototype","destroy","cancelAll","setDisabled","isDisabled","e_1","_a","actions","actions_1","actions_1_1","next","done","action","value","e_1_1","error","return","DISABLED","e_2","actions_2","actions_2_1","e_2_1","focus","isSelected","animateSelection","startAnimation","animation","ENTER","EXIT","handleAnimationEnd","event","animationName","ANIMATION","chipID","addedAnnouncement","getAddedAnnouncement","isComplete","HIDDEN","width","request","handleTransitionEnd","removedAnnouncement","getRemovedAnnouncement","handleActionInteraction","detail","source","actionID","isSelectable","INTERACTION","shouldRemove","handleActionNavigation","key","isTrailingActionFocusable","TRAILING","isPrimaryActionFocusable","PRIMARY","dir","directionFromKey","shouldNavigateToTrailing","RIGHT","shouldNavigateToPrimary","LEFT","navigateActions","from","to","NAVIGATION","isLeftKey","ARROW_LEFT","isRightKey","ARROW_RIGHT","UNSPECIFIED","nav","NOT_FOCUSABLE","FOCUSABLE_AND_FOCUSED","trigger","BACKSPACE_KEY","DELETE_KEY","DATA_REMOVED_ANNOUNCEMENT","undefined","DATA_ADDED_ANNOUNCEMENT","resetAnimationStyles","SELECTION","updateSelectionStyles","SELECTING","DESELECTING","SELECTING_WITH_PRIMARY_ICON","DESELECTING_WITH_PRIMARY_ICON","hasIcon","WITH_PRIMARY_ICON","SELECTED","AnnouncerPriority","announce","message","priority","Announcer","getInstance","say","liveRegions","Map","instance","POLITE","liveRegion","getLiveRegion","clearLiveRegion","textContent","document","removeEventListener","setTimeout","addEventListener","existingLiveRegion","body","contains","createLiveRegion","set","el","createElement","style","position","top","left","height","overflow","setAttribute","appendChild","closest","element","selector","matches","parentElement","webkitMatchesSelector","msMatchesSelector","estimateScrollWidth","htmlEl","offsetParent","scrollWidth","clone","cloneNode","setProperty","documentElement","removeChild","SortValue","cssClasses","CELL","CELL_NUMERIC","CONTENT","HEADER_CELL","HEADER_CELL_LABEL","HEADER_CELL_SORTED","HEADER_CELL_SORTED_DESCENDING","HEADER_CELL_WITH_SORT","HEADER_CELL_WRAPPER","HEADER_ROW","HEADER_ROW_CHECKBOX","IN_PROGRESS","LINEAR_PROGRESS","PAGINATION_ROWS_PER_PAGE_LABEL","PAGINATION_ROWS_PER_PAGE_SELECT","PROGRESS_INDICATOR","ROOT","ROW","ROW_CHECKBOX","ROW_SELECTED","SORT_ICON_BUTTON","SORT_STATUS_LABEL","TABLE_CONTAINER","attributes","dataAttributes","COLUMN_ID","ROW_ID","selectors","messages","SORTED_IN_DESCENDING","SORTED_IN_ASCENDING","strings","ARIA_SELECTED","ARIA_SORT","DATA_ROW_ID_ATTR","HEADER_ROW_CHECKBOX_SELECTOR","ROW_CHECKBOX_SELECTOR","ROW_SELECTED_SELECTOR","ROW_SELECTOR","events","ROW_SELECTION_CHANGED","SELECTED_ALL","UNSELECTED_ALL","SORTED","ANIM_CHECKED_INDETERMINATE","ANIM_CHECKED_UNCHECKED","ANIM_INDETERMINATE_CHECKED","ANIM_INDETERMINATE_UNCHECKED","ANIM_UNCHECKED_CHECKED","ANIM_UNCHECKED_INDETERMINATE","BACKGROUND","CHECKED","CHECKMARK","CHECKMARK_PATH","INDETERMINATE","MIXEDMARK","NATIVE_CONTROL","UPGRADED","ARIA_CHECKED_ATTR","ARIA_CHECKED_INDETERMINATE_VALUE","DATA_INDETERMINATE_ATTR","NATIVE_CONTROL_SELECTOR","TRANSITION_STATE_CHECKED","TRANSITION_STATE_INDETERMINATE","TRANSITION_STATE_INIT","TRANSITION_STATE_UNCHECKED","numbers","ANIM_END_LATCH_MS","MDCCheckboxFoundation","currentCheckState","currentAnimationClass","animEndLatchTimer","enableAnimationEndHandler","forceLayout","hasNativeControl","isAttachedToDOM","isChecked","isIndeterminate","removeNativeControlAttr","setNativeControlAttr","setNativeControlDisabled","init","determineCheckState","updateAriaChecked","clearTimeout","disabled","handleChange","transitionCheckState","oldState","newState","length","getTransitionAnimationClass","computePrimaryActionRippleClientRect","clientRect","graphicSelectedWidthStyleValue","graphicWidth","Number","replace","isNaN","right","bottom","GRAPHIC_SELECTED_WIDTH_STYLE_PROP","MDCDismissibleDrawerFoundation","animationFrame","animationTimer","elementHasClass","notifyClose","notifyOpen","saveFocus","restoreFocus","focusActiveNavigationItem","trapFocus","releaseFocus","cancelAnimationFrame","open","isOpen","isOpening","isClosing","OPEN","ANIMATE","runNextAnimationFrame","OPENING","close","CLOSING","handleKeydown","evt","keyCode","isElement","target","closed","opened","callback","requestAnimationFrame","Boolean","classList","MDCChipTrailingActionFoundation","apply","arguments","actionType","shouldEmitInteractionOnRemoveKey","observeProperty","property","observer","observers","observersMap","allTargetObservers","has","isEnabled","getObservers","installedProperties","Set","targetObservers","descriptor","descriptorTarget","getOwnPropertyDescriptor","getPrototypeOf","getDescriptor","writable","observedDescriptor","descGet","descSet","value_1","newValue","e_4","previous","_b","_c","e_4_1","add","installObserver","push","splice","indexOf","WeakMap","setObserversEnabled","enabled","MDCObserverFoundation","unobserves","unobserve","observe","cleanup","keys","bind","cleanup_1","cleanup_1_1","cleanupFn","delete","e_3","e_3_1","Operator","MDCChipSetFoundation","announceMessage","getChipActionsAtIndex","getChipCount","getChipIdAtIndex","getChipIndexById","isChipFocusableAtIndex","isChipSelectableAtIndex","isChipSelectedAtIndex","removeChipAtIndex","setChipFocusAtIndex","setChipSelectedAtIndex","startChipAnimationAtIndex","handleChipAnimation","index","removeAfterAnimation","handleChipInteraction","removeChip","focusChip","FOCUSABLE","chipIndex","setSelection","handleChipNavigation","focusNextChipFrom","focusPrevChipFrom","ARROW_DOWN","ARROW_UP","HOME","END","getSelectedChipIndexes","selectedIndexes","chipCount","i","setChipSelected","isChipSelected","REMOVAL","addChip","startIndex","targetAction","focusableAction","getFocusableAction","INCREMENT","DECREMENT","op","reverse","getMatchingFocusableAction","getFirstFocusableAction","actions_3","actions_3_1","actions_4","actions_4_1","chipAction","supportsMultiSelect","ARIA_MULTISELECTABLE","e_5","actions_5","actions_5_1","e_5_1","focusNearestFocusableAction","decrIndex","incrIndex","focusAction","getNearestFocusableAction","decrAction","incrAction","cssPropertyNameMap","prefixed","standard","transform","transition","jsEventTypeMap","animationend","cssProperty","animationiteration","animationstart","transitionend","isWindow","windowObj","getCorrectPropertyName","getCorrectEventName","eventType","MDCFoundation","MDCDrawer","attachTo","root","foundation","innerList","initialize","focusTrapFactory","listFactory","listEl","querySelector","LIST_SELECTOR","wrapFocus","initialSyncWithDOM","surfaceEl","MODAL","SCRIM_SELECTOR","scrim","parentNode","handleScrimClick","focusTrap","skipInitialFocus","listen","unlisten","getDefaultFoundation","className","remove","previousFocus","activeElement","activeNavItemEl","LIST_ITEM_ACTIVATED_SELECTOR","emit","CLOSE_EVENT","OPEN_EVENT","DISMISSIBLE","Error","FocusTrap","options","elFocusedBeforeTrapFocus","focusableEls","getFocusableElements","HTMLElement","wrapTabFocus","focusInitialElement","initialFocusEl","slice","querySelectorAll","forEach","sentinelEl","skipRestoreFocus","sentinelStart","createSentinel","sentinelEnd","insertBefore","children","focusIndex","Math","max","filter","isDisabledOrHidden","isTabbableAndVisible","tabIndex","getBoundingClientRect","isProgrammaticallyHidden","getComputedStyle","display","visibility","sentinel","KEY","UNKNOWN","BACKSPACE","SPACEBAR","PAGE_UP","PAGE_DOWN","DELETE","ESCAPE","TAB","normalizedKeys","KEY_CODE","mappedKeyCodes","navigationKeys","normalizeKey","mappedKey","isNavigationEvent","Animation","INDETERMINATE_CLASS","CLOSED_CLASS","ARIA_HIDDEN","ARIA_VALUENOW","DETERMINATE_CIRCLE_SELECTOR","RADIUS","STROKE_DASHOFFSET","MDCChipPrimaryActionFoundation","ROLE","DATA_DELETABLE","MDCComponent","args","_i","_args","evtType","handler","evtData","shouldBubble","CustomEvent","bubbles","createEvent","initCustomEvent","dispatchEvent","createFocusTrapInstance","isScrollable","scrollHeight","offsetHeight","isScrollAtTop","scrollTop","isScrollAtBottom","ceil","clientHeight","areTopsMisaligned","els","tops","offsetTop","size","SCROLLABLE","SCROLL_LOCK","STACKED","FULLSCREEN","SCROLL_DIVIDER_HEADER","SCROLL_DIVIDER_FOOTER","SURFACE_SCRIM_SHOWN","SURFACE_SCRIM_SHOWING","SURFACE_SCRIM_HIDING","SCRIM_HIDDEN","ACTION_ATTRIBUTE","BUTTON_DEFAULT_ATTRIBUTE","BUTTON_SELECTOR","CLOSED_EVENT","CLOSE_ACTION","CLOSING_EVENT","CONTAINER_SELECTOR","CONTENT_SELECTOR","DESTROY_ACTION","INITIAL_FOCUS_ATTRIBUTE","OPENED_EVENT","OPENING_EVENT","SUPPRESS_DEFAULT_PRESS_SELECTOR","join","SURFACE_SELECTOR","DIALOG_ANIMATION_CLOSE_TIME_MS","DIALOG_ANIMATION_OPEN_TIME_MS","AnimationFrame","rafIDs","cancel","frameID","frame","rafID","_","getQueue","queue","APP_CONTENT_SELECTOR","applyPassive","globalObj","window","passiveSupported","err","supportsPassiveOption","passive","MDCDataTableFoundation","addClassAtRowIndex","getAttributeByHeaderCellIndex","getHeaderCellCount","getHeaderCellElements","getRowCount","getRowElements","getRowIdAtIndex","getRowIndexByChildElement","getSelectedRowCount","getTableContainerHeight","getTableHeaderHeight","isCheckboxAtRowIndexChecked","isHeaderRowCheckboxChecked","isRowsSelectable","notifyRowSelectionChanged","notifySelectedAll","notifySortAction","notifyUnselectedAll","registerHeaderRowCheckbox","registerRowCheckboxes","removeClassAtRowIndex","removeClassNameByHeaderCellIndex","setAttributeAtRowIndex","setAttributeByHeaderCellIndex","setClassNameByHeaderCellIndex","setHeaderRowCheckboxChecked","setHeaderRowCheckboxIndeterminate","setProgressIndicatorStyles","setRowCheckboxCheckedAtIndex","setSortStatusLabelByHeaderCellIndex","layout","setHeaderRowCheckboxState","layoutAsync","label","sent","getRows","getHeaderCells","setSelectedRowIds","rowIds","rowIndex","rowId","selectRowAtIndex","getRowIds","getSelectedRowIds","selectedRowIds","handleHeaderRowCheckboxChange","isHeaderChecked","handleRowCheckboxChange","selected","handleSortAction","eventData","columnId","columnIndex","headerCell","NONE","currentSortValue","sortValue","ASCENDING","DESCENDING","showProgress","tableHeaderHeight","hideProgress","triggerMap","SPACEBAR_KEY","ENTER_KEY","MDCChipActionFoundation","removeAttribute","handleClick","emitInteraction","CLICK","shouldNotifyInteractionFromKey","preventDefault","getTriggerFromKey","emitNavigation","ARIA_DISABLED","setFocus","behavior","isFocusable","TAB_INDEX","setSelected","isFromActionKey","isFromRemoveKey","MDCCircularProgressFoundation","getDeterminateCircleAttribute","setDeterminateCircleAttribute","determinate","progress","toString","radius","setDeterminate","setProgress","isDeterminate","unfilledArcLength","PI","getProgress","isClosed","MDCDialogFoundation","dialogOpen","isFullscreen","escapeKeyAction","scrimClickAction","autoStackButtons","areButtonsStacked","suppressDefaultPressSelector","contentScrollHandler","handleScrollEvent","windowResizeHandler","windowOrientationChangeHandler","addBodyClass","clickDefaultButton","eventTargetMatches","getActionFromEvent","getInitialFocusEl","isContentScrollable","notifyClosed","notifyClosing","notifyOpened","notifyOpening","removeBodyClass","reverseButtons","registerContentEventHandler","deregisterContentEventHandler","isScrollableContentAtTop","isScrollableContentAtBottom","registerWindowEventHandler","deregisterWindowEventHandler","setAutoStackButtons","handleAnimationTimerEnd","dialogOptions","isAboveFullscreenDialog","showSurfaceScrim","hideSurfaceScrim","handleSurfaceScrimTransitionEnd","getEscapeKeyAction","setEscapeKeyAction","getScrimClickAction","setScrimClickAction","getAutoStackButtons","autoStack","getSuppressDefaultPressSelector","setSuppressDefaultPressSelector","POLL_LAYOUT_CHANGE","layoutInternal","isEnter","composedPath","isDefault","handleDocumentKeydown","POLL_SCROLL_POS","toggleScrollDividerHeader","toggleScrollDividerFooter","detectStackedButtons","toggleScrollableClasses","MDCModalDrawerFoundation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBO,IAAIA,EAUAC,EAYAC,EASAC,EAQAC,EASAC,EAzEX,4MA0BA,SAAWL,GACPA,EAA2B,eAAI,sCAC/BA,EAA4B,gBAAI,uCAChCA,EAAsB,UAAI,qBAH9B,CAIGA,IAAeA,EAAa,KAM/B,SAAWC,GACPA,EAAmBA,EAAgC,YAA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AAKH,QAAQyR,aAKjB+d,EAAyB5tB,UAAU+Q,OAAS,WACxCxS,KAAKH,QAAQ0R,gBAEV8d,EAvBkC,CAzB7C,UAiDE","file":"vendors~64da9178.196035502de42dea5740.chunk.js","sourcesContent":["/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * CssClasses provides the classes to be queried and manipulated on the root.\n */\nexport var CssClasses;\n(function (CssClasses) {\n    CssClasses[\"PRIMARY_ACTION\"] = \"mdc-evolution-chip__action--primary\";\n    CssClasses[\"TRAILING_ACTION\"] = \"mdc-evolution-chip__action--trailing\";\n    CssClasses[\"CHIP_ROOT\"] = \"mdc-evolution-chip\";\n})(CssClasses || (CssClasses = {}));\n/**\n * InteractionTrigger provides detail of the different triggers for action\n * interactions.\n */\nexport var InteractionTrigger;\n(function (InteractionTrigger) {\n    InteractionTrigger[InteractionTrigger[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n    InteractionTrigger[InteractionTrigger[\"CLICK\"] = 1] = \"CLICK\";\n    InteractionTrigger[InteractionTrigger[\"BACKSPACE_KEY\"] = 2] = \"BACKSPACE_KEY\";\n    InteractionTrigger[InteractionTrigger[\"DELETE_KEY\"] = 3] = \"DELETE_KEY\";\n    InteractionTrigger[InteractionTrigger[\"SPACEBAR_KEY\"] = 4] = \"SPACEBAR_KEY\";\n    InteractionTrigger[InteractionTrigger[\"ENTER_KEY\"] = 5] = \"ENTER_KEY\";\n})(InteractionTrigger || (InteractionTrigger = {}));\n/**\n * ActionType provides the different types of available actions.\n */\nexport var ActionType;\n(function (ActionType) {\n    ActionType[ActionType[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n    ActionType[ActionType[\"PRIMARY\"] = 1] = \"PRIMARY\";\n    ActionType[ActionType[\"TRAILING\"] = 2] = \"TRAILING\";\n})(ActionType || (ActionType = {}));\n/**\n * Events provides the different events emitted by the action.\n */\nexport var Events;\n(function (Events) {\n    Events[\"INTERACTION\"] = \"MDCChipAction:interaction\";\n    Events[\"NAVIGATION\"] = \"MDCChipAction:navigation\";\n})(Events || (Events = {}));\n/**\n * FocusBehavior provides configurations for focusing or unfocusing an action.\n */\nexport var FocusBehavior;\n(function (FocusBehavior) {\n    FocusBehavior[FocusBehavior[\"FOCUSABLE\"] = 0] = \"FOCUSABLE\";\n    FocusBehavior[FocusBehavior[\"FOCUSABLE_AND_FOCUSED\"] = 1] = \"FOCUSABLE_AND_FOCUSED\";\n    FocusBehavior[FocusBehavior[\"NOT_FOCUSABLE\"] = 2] = \"NOT_FOCUSABLE\";\n})(FocusBehavior || (FocusBehavior = {}));\n/**\n * Attributes provides the HTML attributes used by the foundation.\n */\nexport var Attributes;\n(function (Attributes) {\n    Attributes[\"ARIA_DISABLED\"] = \"aria-disabled\";\n    Attributes[\"ARIA_HIDDEN\"] = \"aria-hidden\";\n    Attributes[\"ARIA_SELECTED\"] = \"aria-selected\";\n    Attributes[\"DATA_DELETABLE\"] = \"data-mdc-deletable\";\n    Attributes[\"DISABLED\"] = \"disabled\";\n    Attributes[\"ROLE\"] = \"role\";\n    Attributes[\"TAB_INDEX\"] = \"tabindex\";\n})(Attributes || (Attributes = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { AnimationFrame } from '@material/animation/animationframe';\nimport { MDCFoundation } from '@material/base/foundation';\nimport { KEY } from '@material/dom/keyboard';\nimport { ActionType, FocusBehavior, InteractionTrigger } from '../action/constants';\nimport { Animation, Attributes, CssClasses, Events } from './constants';\nvar Direction;\n(function (Direction) {\n    Direction[Direction[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n    Direction[Direction[\"LEFT\"] = 1] = \"LEFT\";\n    Direction[Direction[\"RIGHT\"] = 2] = \"RIGHT\";\n})(Direction || (Direction = {}));\nvar AnimationKeys;\n(function (AnimationKeys) {\n    AnimationKeys[\"SELECTION\"] = \"selection\";\n    AnimationKeys[\"EXIT\"] = \"exit\";\n})(AnimationKeys || (AnimationKeys = {}));\n/**\n * MDCChipFoundation provides a foundation for all chips.\n */\nvar MDCChipFoundation = /** @class */ (function (_super) {\n    __extends(MDCChipFoundation, _super);\n    function MDCChipFoundation(adapter) {\n        var _this = _super.call(this, __assign(__assign({}, MDCChipFoundation.defaultAdapter), adapter)) || this;\n        _this.animFrame = new AnimationFrame();\n        return _this;\n    }\n    Object.defineProperty(MDCChipFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                addClass: function () { return undefined; },\n                emitEvent: function () { return undefined; },\n                getActions: function () { return []; },\n                getAttribute: function () { return null; },\n                getElementID: function () { return ''; },\n                getOffsetWidth: function () { return 0; },\n                hasClass: function () { return false; },\n                isActionDisabled: function () { return false; },\n                isActionFocusable: function () { return false; },\n                isActionSelectable: function () { return false; },\n                isActionSelected: function () { return false; },\n                isRTL: function () { return false; },\n                removeClass: function () { return undefined; },\n                setActionDisabled: function () { return undefined; },\n                setActionFocus: function () { return undefined; },\n                setActionSelected: function () { return undefined; },\n                setStyleProperty: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCChipFoundation.prototype.destroy = function () {\n        this.animFrame.cancelAll();\n    };\n    MDCChipFoundation.prototype.getElementID = function () {\n        return this.adapter.getElementID();\n    };\n    MDCChipFoundation.prototype.setDisabled = function (isDisabled) {\n        var e_1, _a;\n        var actions = this.getActions();\n        try {\n            for (var actions_1 = __values(actions), actions_1_1 = actions_1.next(); !actions_1_1.done; actions_1_1 = actions_1.next()) {\n                var action = actions_1_1.value;\n                this.adapter.setActionDisabled(action, isDisabled);\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (actions_1_1 && !actions_1_1.done && (_a = actions_1.return)) _a.call(actions_1);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        if (isDisabled) {\n            this.adapter.addClass(CssClasses.DISABLED);\n        }\n        else {\n            this.adapter.removeClass(CssClasses.DISABLED);\n        }\n    };\n    MDCChipFoundation.prototype.isDisabled = function () {\n        var e_2, _a;\n        var actions = this.getActions();\n        try {\n            for (var actions_2 = __values(actions), actions_2_1 = actions_2.next(); !actions_2_1.done; actions_2_1 = actions_2.next()) {\n                var action = actions_2_1.value;\n                if (this.adapter.isActionDisabled(action)) {\n                    return true;\n                }\n            }\n        }\n        catch (e_2_1) { e_2 = { error: e_2_1 }; }\n        finally {\n            try {\n                if (actions_2_1 && !actions_2_1.done && (_a = actions_2.return)) _a.call(actions_2);\n            }\n            finally { if (e_2) throw e_2.error; }\n        }\n        return false;\n    };\n    MDCChipFoundation.prototype.getActions = function () {\n        return this.adapter.getActions();\n    };\n    MDCChipFoundation.prototype.isActionFocusable = function (action) {\n        return this.adapter.isActionFocusable(action);\n    };\n    MDCChipFoundation.prototype.isActionSelectable = function (action) {\n        return this.adapter.isActionSelectable(action);\n    };\n    MDCChipFoundation.prototype.isActionSelected = function (action) {\n        return this.adapter.isActionSelected(action);\n    };\n    MDCChipFoundation.prototype.setActionFocus = function (action, focus) {\n        this.adapter.setActionFocus(action, focus);\n    };\n    MDCChipFoundation.prototype.setActionSelected = function (action, isSelected) {\n        this.adapter.setActionSelected(action, isSelected);\n        this.animateSelection(isSelected);\n    };\n    MDCChipFoundation.prototype.startAnimation = function (animation) {\n        if (animation === Animation.ENTER) {\n            this.adapter.addClass(CssClasses.ENTER);\n            return;\n        }\n        if (animation === Animation.EXIT) {\n            this.adapter.addClass(CssClasses.EXIT);\n            return;\n        }\n    };\n    MDCChipFoundation.prototype.handleAnimationEnd = function (event) {\n        var _this = this;\n        var animationName = event.animationName;\n        if (animationName === Animation.ENTER) {\n            this.adapter.removeClass(CssClasses.ENTER);\n            this.adapter.emitEvent(Events.ANIMATION, {\n                chipID: this.getElementID(),\n                animation: Animation.ENTER,\n                addedAnnouncement: this.getAddedAnnouncement(),\n                isComplete: true,\n            });\n            return;\n        }\n        if (animationName === Animation.EXIT) {\n            this.adapter.removeClass(CssClasses.EXIT);\n            this.adapter.addClass(CssClasses.HIDDEN);\n            var width = this.adapter.getOffsetWidth();\n            this.adapter.setStyleProperty('width', width + \"px\");\n            // Wait two frames so the width gets applied correctly.\n            this.animFrame.request(AnimationKeys.EXIT, function () {\n                _this.animFrame.request(AnimationKeys.EXIT, function () {\n                    _this.adapter.setStyleProperty('width', '0');\n                });\n            });\n        }\n    };\n    MDCChipFoundation.prototype.handleTransitionEnd = function () {\n        if (!this.adapter.hasClass(CssClasses.HIDDEN))\n            return;\n        this.adapter.emitEvent(Events.ANIMATION, {\n            chipID: this.getElementID(),\n            animation: Animation.EXIT,\n            removedAnnouncement: this.getRemovedAnnouncement(),\n            isComplete: true,\n        });\n    };\n    MDCChipFoundation.prototype.handleActionInteraction = function (_a) {\n        var detail = _a.detail;\n        var source = detail.source, actionID = detail.actionID;\n        var isSelectable = this.adapter.isActionSelectable(source);\n        var isSelected = this.adapter.isActionSelected(source);\n        this.adapter.emitEvent(Events.INTERACTION, {\n            chipID: this.getElementID(),\n            shouldRemove: this.shouldRemove(detail),\n            actionID: actionID,\n            isSelectable: isSelectable,\n            isSelected: isSelected,\n            source: source,\n        });\n    };\n    MDCChipFoundation.prototype.handleActionNavigation = function (_a) {\n        var detail = _a.detail;\n        var source = detail.source, key = detail.key;\n        var isRTL = this.adapter.isRTL();\n        var isTrailingActionFocusable = this.adapter.isActionFocusable(ActionType.TRAILING);\n        var isPrimaryActionFocusable = this.adapter.isActionFocusable(ActionType.PRIMARY);\n        var dir = this.directionFromKey(key, isRTL);\n        var shouldNavigateToTrailing = source === ActionType.PRIMARY &&\n            dir === Direction.RIGHT && isTrailingActionFocusable;\n        var shouldNavigateToPrimary = source === ActionType.TRAILING &&\n            dir === Direction.LEFT && isPrimaryActionFocusable;\n        if (shouldNavigateToTrailing) {\n            this.navigateActions({ from: source, to: ActionType.TRAILING });\n            return;\n        }\n        if (shouldNavigateToPrimary) {\n            this.navigateActions({ from: source, to: ActionType.PRIMARY });\n            return;\n        }\n        this.adapter.emitEvent(Events.NAVIGATION, {\n            chipID: this.getElementID(),\n            isRTL: isRTL,\n            source: source,\n            key: key,\n        });\n    };\n    MDCChipFoundation.prototype.directionFromKey = function (key, isRTL) {\n        var isLeftKey = key === KEY.ARROW_LEFT;\n        var isRightKey = key === KEY.ARROW_RIGHT;\n        if (!isRTL && isLeftKey || isRTL && isRightKey) {\n            return Direction.LEFT;\n        }\n        if (!isRTL && isRightKey || isRTL && isLeftKey) {\n            return Direction.RIGHT;\n        }\n        return Direction.UNSPECIFIED;\n    };\n    MDCChipFoundation.prototype.navigateActions = function (nav) {\n        this.adapter.setActionFocus(nav.from, FocusBehavior.NOT_FOCUSABLE);\n        this.adapter.setActionFocus(nav.to, FocusBehavior.FOCUSABLE_AND_FOCUSED);\n    };\n    MDCChipFoundation.prototype.shouldRemove = function (_a) {\n        var source = _a.source, trigger = _a.trigger;\n        if (trigger === InteractionTrigger.BACKSPACE_KEY ||\n            trigger === InteractionTrigger.DELETE_KEY) {\n            return true;\n        }\n        return source === ActionType.TRAILING;\n    };\n    MDCChipFoundation.prototype.getRemovedAnnouncement = function () {\n        var msg = this.adapter.getAttribute(Attributes.DATA_REMOVED_ANNOUNCEMENT);\n        return msg || undefined;\n    };\n    MDCChipFoundation.prototype.getAddedAnnouncement = function () {\n        var msg = this.adapter.getAttribute(Attributes.DATA_ADDED_ANNOUNCEMENT);\n        return msg || undefined;\n    };\n    MDCChipFoundation.prototype.animateSelection = function (isSelected) {\n        var _this = this;\n        this.resetAnimationStyles();\n        // Wait two frames to ensure the animation classes are unset\n        this.animFrame.request(AnimationKeys.SELECTION, function () {\n            _this.animFrame.request(AnimationKeys.SELECTION, function () {\n                _this.updateSelectionStyles(isSelected);\n            });\n        });\n    };\n    MDCChipFoundation.prototype.resetAnimationStyles = function () {\n        this.adapter.removeClass(CssClasses.SELECTING);\n        this.adapter.removeClass(CssClasses.DESELECTING);\n        this.adapter.removeClass(CssClasses.SELECTING_WITH_PRIMARY_ICON);\n        this.adapter.removeClass(CssClasses.DESELECTING_WITH_PRIMARY_ICON);\n    };\n    MDCChipFoundation.prototype.updateSelectionStyles = function (isSelected) {\n        var _this = this;\n        var hasIcon = this.adapter.hasClass(CssClasses.WITH_PRIMARY_ICON);\n        if (hasIcon && isSelected) {\n            this.adapter.addClass(CssClasses.SELECTING_WITH_PRIMARY_ICON);\n            this.animFrame.request(AnimationKeys.SELECTION, function () {\n                _this.adapter.addClass(CssClasses.SELECTED);\n            });\n            return;\n        }\n        if (hasIcon && !isSelected) {\n            this.adapter.addClass(CssClasses.DESELECTING_WITH_PRIMARY_ICON);\n            this.animFrame.request(AnimationKeys.SELECTION, function () {\n                _this.adapter.removeClass(CssClasses.SELECTED);\n            });\n            return;\n        }\n        if (isSelected) {\n            this.adapter.addClass(CssClasses.SELECTING);\n            this.animFrame.request(AnimationKeys.SELECTION, function () {\n                _this.adapter.addClass(CssClasses.SELECTED);\n            });\n            return;\n        }\n        if (!isSelected) {\n            this.adapter.addClass(CssClasses.DESELECTING);\n            this.animFrame.request(AnimationKeys.SELECTION, function () {\n                _this.adapter.removeClass(CssClasses.SELECTED);\n            });\n            return;\n        }\n    };\n    return MDCChipFoundation;\n}(MDCFoundation));\nexport { MDCChipFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Priorities for the announce function\n */\nexport var AnnouncerPriority;\n(function (AnnouncerPriority) {\n    AnnouncerPriority[\"POLITE\"] = \"polite\";\n    AnnouncerPriority[\"ASSERTIVE\"] = \"assertive\";\n})(AnnouncerPriority || (AnnouncerPriority = {}));\n/**\n * Data attribute added to live region element.\n */\nexport var DATA_MDC_DOM_ANNOUNCE = 'data-mdc-dom-announce';\n/**\n * Announces the given message with optional priority, defaulting to \"polite\"\n */\nexport function announce(message, priority) {\n    Announcer.getInstance().say(message, priority);\n}\nvar Announcer = /** @class */ (function () {\n    // Constructor made private to ensure only the singleton is used\n    function Announcer() {\n        this.liveRegions = new Map();\n    }\n    Announcer.getInstance = function () {\n        if (!Announcer.instance) {\n            Announcer.instance = new Announcer();\n        }\n        return Announcer.instance;\n    };\n    Announcer.prototype.say = function (message, priority) {\n        if (priority === void 0) { priority = AnnouncerPriority.POLITE; }\n        var liveRegion = this.getLiveRegion(priority);\n        // Reset the region to pick up the message, even if the message is the\n        // exact same as before.\n        liveRegion.textContent = '';\n        // Timeout is necessary for screen readers like NVDA and VoiceOver.\n        setTimeout(function () {\n            liveRegion.textContent = message;\n            document.addEventListener('click', clearLiveRegion);\n        }, 1);\n        function clearLiveRegion() {\n            liveRegion.textContent = '';\n            document.removeEventListener('click', clearLiveRegion);\n        }\n    };\n    Announcer.prototype.getLiveRegion = function (priority) {\n        var existingLiveRegion = this.liveRegions.get(priority);\n        if (existingLiveRegion &&\n            document.body.contains(existingLiveRegion)) {\n            return existingLiveRegion;\n        }\n        var liveRegion = this.createLiveRegion(priority);\n        this.liveRegions.set(priority, liveRegion);\n        return liveRegion;\n    };\n    Announcer.prototype.createLiveRegion = function (priority) {\n        var el = document.createElement('div');\n        el.style.position = 'absolute';\n        el.style.top = '-9999px';\n        el.style.left = '-9999px';\n        el.style.height = '1px';\n        el.style.overflow = 'hidden';\n        el.setAttribute('aria-atomic', 'true');\n        el.setAttribute('aria-live', priority);\n        el.setAttribute(DATA_MDC_DOM_ANNOUNCE, 'true');\n        document.body.appendChild(el);\n        return el;\n    };\n    return Announcer;\n}());\n//# sourceMappingURL=announce.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\nexport function closest(element, selector) {\n    if (element.closest) {\n        return element.closest(selector);\n    }\n    var el = element;\n    while (el) {\n        if (matches(el, selector)) {\n            return el;\n        }\n        el = el.parentElement;\n    }\n    return null;\n}\nexport function matches(element, selector) {\n    var nativeMatches = element.matches\n        || element.webkitMatchesSelector\n        || element.msMatchesSelector;\n    return nativeMatches.call(element, selector);\n}\n/**\n * Used to compute the estimated scroll width of elements. When an element is\n * hidden due to display: none; being applied to a parent element, the width is\n * returned as 0. However, the element will have a true width once no longer\n * inside a display: none context. This method computes an estimated width when\n * the element is hidden or returns the true width when the element is visble.\n * @param {Element} element the element whose width to estimate\n */\nexport function estimateScrollWidth(element) {\n    // Check the offsetParent. If the element inherits display: none from any\n    // parent, the offsetParent property will be null (see\n    // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).\n    // This check ensures we only clone the node when necessary.\n    var htmlEl = element;\n    if (htmlEl.offsetParent !== null) {\n        return htmlEl.scrollWidth;\n    }\n    var clone = htmlEl.cloneNode(true);\n    clone.style.setProperty('position', 'absolute');\n    clone.style.setProperty('transform', 'translate(-9999px, -9999px)');\n    document.documentElement.appendChild(clone);\n    var scrollWidth = clone.scrollWidth;\n    document.documentElement.removeChild(clone);\n    return scrollWidth;\n}\n//# sourceMappingURL=ponyfill.js.map","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * CSS class names used in component.\n */\nexport var cssClasses = {\n    CELL: 'mdc-data-table__cell',\n    CELL_NUMERIC: 'mdc-data-table__cell--numeric',\n    CONTENT: 'mdc-data-table__content',\n    HEADER_CELL: 'mdc-data-table__header-cell',\n    HEADER_CELL_LABEL: 'mdc-data-table__header-cell-label',\n    HEADER_CELL_SORTED: 'mdc-data-table__header-cell--sorted',\n    HEADER_CELL_SORTED_DESCENDING: 'mdc-data-table__header-cell--sorted-descending',\n    HEADER_CELL_WITH_SORT: 'mdc-data-table__header-cell--with-sort',\n    HEADER_CELL_WRAPPER: 'mdc-data-table__header-cell-wrapper',\n    HEADER_ROW: 'mdc-data-table__header-row',\n    HEADER_ROW_CHECKBOX: 'mdc-data-table__header-row-checkbox',\n    IN_PROGRESS: 'mdc-data-table--in-progress',\n    LINEAR_PROGRESS: 'mdc-data-table__linear-progress',\n    PAGINATION_ROWS_PER_PAGE_LABEL: 'mdc-data-table__pagination-rows-per-page-label',\n    PAGINATION_ROWS_PER_PAGE_SELECT: 'mdc-data-table__pagination-rows-per-page-select',\n    PROGRESS_INDICATOR: 'mdc-data-table__progress-indicator',\n    ROOT: 'mdc-data-table',\n    ROW: 'mdc-data-table__row',\n    ROW_CHECKBOX: 'mdc-data-table__row-checkbox',\n    ROW_SELECTED: 'mdc-data-table__row--selected',\n    SORT_ICON_BUTTON: 'mdc-data-table__sort-icon-button',\n    SORT_STATUS_LABEL: 'mdc-data-table__sort-status-label',\n    TABLE_CONTAINER: 'mdc-data-table__table-container',\n};\n/**\n * DOM attributes used in component.\n */\nexport var attributes = {\n    ARIA_SELECTED: 'aria-selected',\n    ARIA_SORT: 'aria-sort',\n};\n/**\n * List of data attributes used in component.\n */\nexport var dataAttributes = {\n    COLUMN_ID: 'data-column-id',\n    ROW_ID: 'data-row-id',\n};\n/**\n * CSS selectors used in component.\n */\nexport var selectors = {\n    CONTENT: \".\" + cssClasses.CONTENT,\n    HEADER_CELL: \".\" + cssClasses.HEADER_CELL,\n    HEADER_CELL_WITH_SORT: \".\" + cssClasses.HEADER_CELL_WITH_SORT,\n    HEADER_ROW: \".\" + cssClasses.HEADER_ROW,\n    HEADER_ROW_CHECKBOX: \".\" + cssClasses.HEADER_ROW_CHECKBOX,\n    PROGRESS_INDICATOR: \".\" + cssClasses.PROGRESS_INDICATOR,\n    ROW: \".\" + cssClasses.ROW,\n    ROW_CHECKBOX: \".\" + cssClasses.ROW_CHECKBOX,\n    ROW_SELECTED: \".\" + cssClasses.ROW_SELECTED,\n    SORT_ICON_BUTTON: \".\" + cssClasses.SORT_ICON_BUTTON,\n    SORT_STATUS_LABEL: \".\" + cssClasses.SORT_STATUS_LABEL,\n};\n/**\n * Messages used in component.\n */\nexport var messages = {\n    SORTED_IN_DESCENDING: 'Sorted in descending order',\n    SORTED_IN_ASCENDING: 'Sorted in ascending order',\n};\n/**\n * Attributes and selectors used in component.\n * @deprecated Use `attributes`, `dataAttributes` and `selectors` instead.\n */\nexport var strings = {\n    ARIA_SELECTED: attributes.ARIA_SELECTED,\n    ARIA_SORT: attributes.ARIA_SORT,\n    DATA_ROW_ID_ATTR: dataAttributes.ROW_ID,\n    HEADER_ROW_CHECKBOX_SELECTOR: selectors.HEADER_ROW_CHECKBOX,\n    ROW_CHECKBOX_SELECTOR: selectors.ROW_CHECKBOX,\n    ROW_SELECTED_SELECTOR: selectors.ROW_SELECTED,\n    ROW_SELECTOR: selectors.ROW,\n};\n/**\n * Sort values defined by ARIA.\n * See https://www.w3.org/WAI/PF/aria/states_and_properties#aria-sort\n */\nexport var SortValue;\n(function (SortValue) {\n    // Items are sorted in ascending order by this column.\n    SortValue[\"ASCENDING\"] = \"ascending\";\n    // Items are sorted in descending order by this column.\n    SortValue[\"DESCENDING\"] = \"descending\";\n    // There is no defined sort applied to the column.\n    SortValue[\"NONE\"] = \"none\";\n    // A sort algorithm other than ascending or descending has been applied.\n    SortValue[\"OTHER\"] = \"other\";\n})(SortValue || (SortValue = {}));\n/**\n * Event names used in component.\n */\nexport var events = {\n    ROW_SELECTION_CHANGED: 'MDCDataTable:rowSelectionChanged',\n    SELECTED_ALL: 'MDCDataTable:selectedAll',\n    UNSELECTED_ALL: 'MDCDataTable:unselectedAll',\n    SORTED: 'MDCDataTable:sorted',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n    ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate',\n    ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked',\n    ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked',\n    ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked',\n    ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked',\n    ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate',\n    BACKGROUND: 'mdc-checkbox__background',\n    CHECKED: 'mdc-checkbox--checked',\n    CHECKMARK: 'mdc-checkbox__checkmark',\n    CHECKMARK_PATH: 'mdc-checkbox__checkmark-path',\n    DISABLED: 'mdc-checkbox--disabled',\n    INDETERMINATE: 'mdc-checkbox--indeterminate',\n    MIXEDMARK: 'mdc-checkbox__mixedmark',\n    NATIVE_CONTROL: 'mdc-checkbox__native-control',\n    ROOT: 'mdc-checkbox',\n    SELECTED: 'mdc-checkbox--selected',\n    UPGRADED: 'mdc-checkbox--upgraded',\n};\nexport var strings = {\n    ARIA_CHECKED_ATTR: 'aria-checked',\n    ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed',\n    DATA_INDETERMINATE_ATTR: 'data-indeterminate',\n    NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control',\n    TRANSITION_STATE_CHECKED: 'checked',\n    TRANSITION_STATE_INDETERMINATE: 'indeterminate',\n    TRANSITION_STATE_INIT: 'init',\n    TRANSITION_STATE_UNCHECKED: 'unchecked',\n};\nexport var numbers = {\n    ANIM_END_LATCH_MS: 250,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar MDCCheckboxFoundation = /** @class */ (function (_super) {\n    __extends(MDCCheckboxFoundation, _super);\n    function MDCCheckboxFoundation(adapter) {\n        var _this = _super.call(this, __assign(__assign({}, MDCCheckboxFoundation.defaultAdapter), adapter)) || this;\n        _this.currentCheckState = strings.TRANSITION_STATE_INIT;\n        _this.currentAnimationClass = '';\n        _this.animEndLatchTimer = 0;\n        _this.enableAnimationEndHandler = false;\n        return _this;\n    }\n    Object.defineProperty(MDCCheckboxFoundation, \"cssClasses\", {\n        get: function () {\n            return cssClasses;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCCheckboxFoundation, \"strings\", {\n        get: function () {\n            return strings;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCCheckboxFoundation, \"numbers\", {\n        get: function () {\n            return numbers;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCCheckboxFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                addClass: function () { return undefined; },\n                forceLayout: function () { return undefined; },\n                hasNativeControl: function () { return false; },\n                isAttachedToDOM: function () { return false; },\n                isChecked: function () { return false; },\n                isIndeterminate: function () { return false; },\n                removeClass: function () { return undefined; },\n                removeNativeControlAttr: function () { return undefined; },\n                setNativeControlAttr: function () { return undefined; },\n                setNativeControlDisabled: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCCheckboxFoundation.prototype.init = function () {\n        this.currentCheckState = this.determineCheckState();\n        this.updateAriaChecked();\n        this.adapter.addClass(cssClasses.UPGRADED);\n    };\n    MDCCheckboxFoundation.prototype.destroy = function () {\n        clearTimeout(this.animEndLatchTimer);\n    };\n    MDCCheckboxFoundation.prototype.setDisabled = function (disabled) {\n        this.adapter.setNativeControlDisabled(disabled);\n        if (disabled) {\n            this.adapter.addClass(cssClasses.DISABLED);\n        }\n        else {\n            this.adapter.removeClass(cssClasses.DISABLED);\n        }\n    };\n    /**\n     * Handles the animationend event for the checkbox\n     */\n    MDCCheckboxFoundation.prototype.handleAnimationEnd = function () {\n        var _this = this;\n        if (!this.enableAnimationEndHandler) {\n            return;\n        }\n        clearTimeout(this.animEndLatchTimer);\n        this.animEndLatchTimer = setTimeout(function () {\n            _this.adapter.removeClass(_this.currentAnimationClass);\n            _this.enableAnimationEndHandler = false;\n        }, numbers.ANIM_END_LATCH_MS);\n    };\n    /**\n     * Handles the change event for the checkbox\n     */\n    MDCCheckboxFoundation.prototype.handleChange = function () {\n        this.transitionCheckState();\n    };\n    MDCCheckboxFoundation.prototype.transitionCheckState = function () {\n        if (!this.adapter.hasNativeControl()) {\n            return;\n        }\n        var oldState = this.currentCheckState;\n        var newState = this.determineCheckState();\n        if (oldState === newState) {\n            return;\n        }\n        this.updateAriaChecked();\n        var TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n        var SELECTED = cssClasses.SELECTED;\n        if (newState === TRANSITION_STATE_UNCHECKED) {\n            this.adapter.removeClass(SELECTED);\n        }\n        else {\n            this.adapter.addClass(SELECTED);\n        }\n        // Check to ensure that there isn't a previously existing animation class, in case for example\n        // the user interacted with the checkbox before the animation was finished.\n        if (this.currentAnimationClass.length > 0) {\n            clearTimeout(this.animEndLatchTimer);\n            this.adapter.forceLayout();\n            this.adapter.removeClass(this.currentAnimationClass);\n        }\n        this.currentAnimationClass =\n            this.getTransitionAnimationClass(oldState, newState);\n        this.currentCheckState = newState;\n        // Check for parentNode so that animations are only run when the element is attached\n        // to the DOM.\n        if (this.adapter.isAttachedToDOM() &&\n            this.currentAnimationClass.length > 0) {\n            this.adapter.addClass(this.currentAnimationClass);\n            this.enableAnimationEndHandler = true;\n        }\n    };\n    MDCCheckboxFoundation.prototype.determineCheckState = function () {\n        var TRANSITION_STATE_INDETERMINATE = strings.TRANSITION_STATE_INDETERMINATE, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n        if (this.adapter.isIndeterminate()) {\n            return TRANSITION_STATE_INDETERMINATE;\n        }\n        return this.adapter.isChecked() ? TRANSITION_STATE_CHECKED :\n            TRANSITION_STATE_UNCHECKED;\n    };\n    MDCCheckboxFoundation.prototype.getTransitionAnimationClass = function (oldState, newState) {\n        var TRANSITION_STATE_INIT = strings.TRANSITION_STATE_INIT, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n        var _a = MDCCheckboxFoundation.cssClasses, ANIM_UNCHECKED_CHECKED = _a.ANIM_UNCHECKED_CHECKED, ANIM_UNCHECKED_INDETERMINATE = _a.ANIM_UNCHECKED_INDETERMINATE, ANIM_CHECKED_UNCHECKED = _a.ANIM_CHECKED_UNCHECKED, ANIM_CHECKED_INDETERMINATE = _a.ANIM_CHECKED_INDETERMINATE, ANIM_INDETERMINATE_CHECKED = _a.ANIM_INDETERMINATE_CHECKED, ANIM_INDETERMINATE_UNCHECKED = _a.ANIM_INDETERMINATE_UNCHECKED;\n        switch (oldState) {\n            case TRANSITION_STATE_INIT:\n                if (newState === TRANSITION_STATE_UNCHECKED) {\n                    return '';\n                }\n                return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n            case TRANSITION_STATE_UNCHECKED:\n                return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;\n            case TRANSITION_STATE_CHECKED:\n                return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;\n            default: // TRANSITION_STATE_INDETERMINATE\n                return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n        }\n    };\n    MDCCheckboxFoundation.prototype.updateAriaChecked = function () {\n        // Ensure aria-checked is set to mixed if checkbox is in indeterminate state.\n        if (this.adapter.isIndeterminate()) {\n            this.adapter.setNativeControlAttr(strings.ARIA_CHECKED_ATTR, strings.ARIA_CHECKED_INDETERMINATE_VALUE);\n        }\n        else {\n            // The on/off state does not need to keep track of aria-checked, since\n            // the screenreader uses the checked property on the checkbox element.\n            this.adapter.removeNativeControlAttr(strings.ARIA_CHECKED_ATTR);\n        }\n    };\n    return MDCCheckboxFoundation;\n}(MDCFoundation));\nexport { MDCCheckboxFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCheckboxFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Computes the ripple client rect for the primary action given the raw client\n * rect and the selected width graphic style property.\n */\nexport function computePrimaryActionRippleClientRect(clientRect, graphicSelectedWidthStyleValue) {\n    // parseInt is banned so we need to manually format and parse the string.\n    var graphicWidth = Number(graphicSelectedWidthStyleValue.replace('px', ''));\n    if (Number.isNaN(graphicWidth)) {\n        return clientRect;\n    }\n    // Can't use the spread operator because it has internal problems\n    return {\n        width: clientRect.width + graphicWidth,\n        height: clientRect.height,\n        top: clientRect.top,\n        right: clientRect.right,\n        bottom: clientRect.bottom,\n        left: clientRect.left,\n    };\n}\n/**\n * Provides the CSS custom property whose value is read by\n * computePrimaryRippleClientRect. The CSS custom property provides the width\n * of the chip graphic when selected. It is only set for the unselected chip\n * variant without a leadinc icon. In all other cases, it will have no value.\n */\nexport var GRAPHIC_SELECTED_WIDTH_STYLE_PROP = '--mdc-chip-graphic-selected-width';\n//# sourceMappingURL=component-ripple.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, strings } from '../constants';\nvar MDCDismissibleDrawerFoundation = /** @class */ (function (_super) {\n    __extends(MDCDismissibleDrawerFoundation, _super);\n    function MDCDismissibleDrawerFoundation(adapter) {\n        var _this = _super.call(this, __assign(__assign({}, MDCDismissibleDrawerFoundation.defaultAdapter), adapter)) || this;\n        _this.animationFrame = 0;\n        _this.animationTimer = 0;\n        return _this;\n    }\n    Object.defineProperty(MDCDismissibleDrawerFoundation, \"strings\", {\n        get: function () {\n            return strings;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDismissibleDrawerFoundation, \"cssClasses\", {\n        get: function () {\n            return cssClasses;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDismissibleDrawerFoundation, \"defaultAdapter\", {\n        get: function () {\n            // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n            return {\n                addClass: function () { return undefined; },\n                removeClass: function () { return undefined; },\n                hasClass: function () { return false; },\n                elementHasClass: function () { return false; },\n                notifyClose: function () { return undefined; },\n                notifyOpen: function () { return undefined; },\n                saveFocus: function () { return undefined; },\n                restoreFocus: function () { return undefined; },\n                focusActiveNavigationItem: function () { return undefined; },\n                trapFocus: function () { return undefined; },\n                releaseFocus: function () { return undefined; },\n            };\n            // tslint:enable:object-literal-sort-keys\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCDismissibleDrawerFoundation.prototype.destroy = function () {\n        if (this.animationFrame) {\n            cancelAnimationFrame(this.animationFrame);\n        }\n        if (this.animationTimer) {\n            clearTimeout(this.animationTimer);\n        }\n    };\n    /**\n     * Opens the drawer from the closed state.\n     */\n    MDCDismissibleDrawerFoundation.prototype.open = function () {\n        var _this = this;\n        if (this.isOpen() || this.isOpening() || this.isClosing()) {\n            return;\n        }\n        this.adapter.addClass(cssClasses.OPEN);\n        this.adapter.addClass(cssClasses.ANIMATE);\n        // Wait a frame once display is no longer \"none\", to establish basis for animation\n        this.runNextAnimationFrame(function () {\n            _this.adapter.addClass(cssClasses.OPENING);\n        });\n        this.adapter.saveFocus();\n    };\n    /**\n     * Closes the drawer from the open state.\n     */\n    MDCDismissibleDrawerFoundation.prototype.close = function () {\n        if (!this.isOpen() || this.isOpening() || this.isClosing()) {\n            return;\n        }\n        this.adapter.addClass(cssClasses.CLOSING);\n    };\n    /**\n     * Returns true if the drawer is in the open position.\n     * @return true if drawer is in open state.\n     */\n    MDCDismissibleDrawerFoundation.prototype.isOpen = function () {\n        return this.adapter.hasClass(cssClasses.OPEN);\n    };\n    /**\n     * Returns true if the drawer is animating open.\n     * @return true if drawer is animating open.\n     */\n    MDCDismissibleDrawerFoundation.prototype.isOpening = function () {\n        return this.adapter.hasClass(cssClasses.OPENING) ||\n            this.adapter.hasClass(cssClasses.ANIMATE);\n    };\n    /**\n     * Returns true if the drawer is animating closed.\n     * @return true if drawer is animating closed.\n     */\n    MDCDismissibleDrawerFoundation.prototype.isClosing = function () {\n        return this.adapter.hasClass(cssClasses.CLOSING);\n    };\n    /**\n     * Keydown handler to close drawer when key is escape.\n     */\n    MDCDismissibleDrawerFoundation.prototype.handleKeydown = function (evt) {\n        var keyCode = evt.keyCode, key = evt.key;\n        var isEscape = key === 'Escape' || keyCode === 27;\n        if (isEscape) {\n            this.close();\n        }\n    };\n    /**\n     * Handles the `transitionend` event when the drawer finishes opening/closing.\n     */\n    MDCDismissibleDrawerFoundation.prototype.handleTransitionEnd = function (evt) {\n        var OPENING = cssClasses.OPENING, CLOSING = cssClasses.CLOSING, OPEN = cssClasses.OPEN, ANIMATE = cssClasses.ANIMATE, ROOT = cssClasses.ROOT;\n        // In Edge, transitionend on ripple pseudo-elements yields a target without classList, so check for Element first.\n        var isRootElement = this.isElement(evt.target) &&\n            this.adapter.elementHasClass(evt.target, ROOT);\n        if (!isRootElement) {\n            return;\n        }\n        if (this.isClosing()) {\n            this.adapter.removeClass(OPEN);\n            this.closed();\n            this.adapter.restoreFocus();\n            this.adapter.notifyClose();\n        }\n        else {\n            this.adapter.focusActiveNavigationItem();\n            this.opened();\n            this.adapter.notifyOpen();\n        }\n        this.adapter.removeClass(ANIMATE);\n        this.adapter.removeClass(OPENING);\n        this.adapter.removeClass(CLOSING);\n    };\n    /**\n     * Extension point for when drawer finishes open animation.\n     */\n    MDCDismissibleDrawerFoundation.prototype.opened = function () { }; // tslint:disable-line:no-empty\n    /**\n     * Extension point for when drawer finishes close animation.\n     */\n    MDCDismissibleDrawerFoundation.prototype.closed = function () { }; // tslint:disable-line:no-empty\n    /**\n     * Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.\n     */\n    MDCDismissibleDrawerFoundation.prototype.runNextAnimationFrame = function (callback) {\n        var _this = this;\n        cancelAnimationFrame(this.animationFrame);\n        this.animationFrame = requestAnimationFrame(function () {\n            _this.animationFrame = 0;\n            clearTimeout(_this.animationTimer);\n            _this.animationTimer = setTimeout(callback, 0);\n        });\n    };\n    MDCDismissibleDrawerFoundation.prototype.isElement = function (element) {\n        // In Edge, transitionend on ripple pseudo-elements yields a target without classList.\n        return Boolean(element.classList);\n    };\n    return MDCDismissibleDrawerFoundation;\n}(MDCFoundation));\nexport { MDCDismissibleDrawerFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDismissibleDrawerFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { ActionType } from './constants';\nimport { MDCChipActionFoundation } from './foundation';\n/**\n * MDCChipTrailingActionFoundation provides the business logic for the trailing\n * chip action.\n */\nvar MDCChipTrailingActionFoundation = /** @class */ (function (_super) {\n    __extends(MDCChipTrailingActionFoundation, _super);\n    function MDCChipTrailingActionFoundation() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    MDCChipTrailingActionFoundation.prototype.isSelectable = function () {\n        return false;\n    };\n    MDCChipTrailingActionFoundation.prototype.actionType = function () {\n        return ActionType.TRAILING;\n    };\n    MDCChipTrailingActionFoundation.prototype.shouldEmitInteractionOnRemoveKey = function () {\n        return true;\n    };\n    return MDCChipTrailingActionFoundation;\n}(MDCChipActionFoundation));\nexport { MDCChipTrailingActionFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipTrailingActionFoundation;\n//# sourceMappingURL=trailing-foundation.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __read, __spreadArray, __values } from \"tslib\";\n/**\n * Mixin to add `MDCObserver` functionality to an optional base class.\n *\n * @deprecated Prefer MDCObserverFoundation for stricter closure compliance.\n * @template C Optional base class constructor type.\n * @param baseClass - Optional base class.\n * @return A class that extends the optional base class with `MDCObserver`\n *     functionality.\n */\nexport function mdcObserver(baseClass) {\n    if (baseClass === void 0) { baseClass = /** @class */ (function () {\n        function class_1() {\n        }\n        return class_1;\n    }()); }\n    // Mixin classes cannot use private members and Symbol() cannot be used in 3P\n    // for IE11.\n    var unobserveMap = new WeakMap();\n    return /** @class */ (function (_super) {\n        __extends(MDCObserver, _super);\n        function MDCObserver() {\n            return _super !== null && _super.apply(this, arguments) || this;\n        }\n        MDCObserver.prototype.observe = function (target, observers) {\n            var e_1, _a;\n            var _this = this;\n            var cleanup = [];\n            try {\n                for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n                    var property = _c.value;\n                    var observer = observers[property].bind(this);\n                    cleanup.push(observeProperty(target, property, observer));\n                }\n            }\n            catch (e_1_1) { e_1 = { error: e_1_1 }; }\n            finally {\n                try {\n                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                }\n                finally { if (e_1) throw e_1.error; }\n            }\n            var unobserve = function () {\n                var e_2, _a;\n                try {\n                    for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n                        var cleanupFn = cleanup_1_1.value;\n                        cleanupFn();\n                    }\n                }\n                catch (e_2_1) { e_2 = { error: e_2_1 }; }\n                finally {\n                    try {\n                        if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n                    }\n                    finally { if (e_2) throw e_2.error; }\n                }\n                var unobserves = unobserveMap.get(_this) || [];\n                var index = unobserves.indexOf(unobserve);\n                if (index > -1) {\n                    unobserves.splice(index, 1);\n                }\n            };\n            var unobserves = unobserveMap.get(this);\n            if (!unobserves) {\n                unobserves = [];\n                unobserveMap.set(this, unobserves);\n            }\n            unobserves.push(unobserve);\n            return unobserve;\n        };\n        MDCObserver.prototype.setObserversEnabled = function (target, enabled) {\n            setObserversEnabled(target, enabled);\n        };\n        MDCObserver.prototype.unobserve = function () {\n            var e_3, _a;\n            // Iterate over a copy since unobserve() will remove themselves from the\n            // array\n            var unobserves = unobserveMap.get(this) || [];\n            try {\n                for (var _b = __values(__spreadArray([], __read(unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n                    var unobserve = _c.value;\n                    unobserve();\n                }\n            }\n            catch (e_3_1) { e_3 = { error: e_3_1 }; }\n            finally {\n                try {\n                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                }\n                finally { if (e_3) throw e_3.error; }\n            }\n        };\n        return MDCObserver;\n    }(baseClass));\n}\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n *     changes.\n * @return A cleanup function that will stop observing changes for the provided\n *     `Observer`.\n */\nexport function observeProperty(target, property, observer) {\n    var targetObservers = installObserver(target, property);\n    var observers = targetObservers.getObservers(property);\n    observers.push(observer);\n    return function () {\n        observers.splice(observers.indexOf(observer), 1);\n    };\n}\n/**\n * A Map of all `TargetObservers` that have been installed.\n */\nvar allTargetObservers = new WeakMap();\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed), and replaces the given property with a getter and setter that\n * will respond to changes and call `TargetObservers`.\n *\n * Subsequent calls to `installObserver()` with the same target and property\n * will not override the property's previously installed getter/setter.\n *\n * @template T The observed target type.\n * @template K The observed property to create a getter/setter for.\n * @param target - The target to observe.\n * @param property - The property to create a getter/setter for, if needed.\n * @return The installed `TargetObservers` for the provided target.\n */\nfunction installObserver(target, property) {\n    var observersMap = new Map();\n    if (!allTargetObservers.has(target)) {\n        allTargetObservers.set(target, {\n            isEnabled: true,\n            getObservers: function (key) {\n                var observers = observersMap.get(key) || [];\n                if (!observersMap.has(key)) {\n                    observersMap.set(key, observers);\n                }\n                return observers;\n            },\n            installedProperties: new Set()\n        });\n    }\n    var targetObservers = allTargetObservers.get(target);\n    if (targetObservers.installedProperties.has(property)) {\n        // The getter/setter has already been replaced for this property\n        return targetObservers;\n    }\n    // Retrieve (or create if it's a plain property) the original descriptor from\n    // the target...\n    var descriptor = getDescriptor(target, property) || {\n        configurable: true,\n        enumerable: true,\n        value: target[property],\n        writable: true\n    };\n    // ...and create a copy that will be used for the observer.\n    var observedDescriptor = __assign({}, descriptor);\n    var descGet = descriptor.get, descSet = descriptor.set;\n    if ('value' in descriptor) {\n        // The descriptor is a simple value (not a getter/setter).\n        // For our observer descriptor that we copied, delete the value/writable\n        // properties, since they are incompatible with the get/set properties\n        // for descriptors.\n        delete observedDescriptor.value;\n        delete observedDescriptor.writable;\n        // Set up a simple getter...\n        var value_1 = descriptor.value;\n        descGet = function () { return value_1; };\n        // ...and setter (if the original property was writable).\n        if (descriptor.writable) {\n            descSet = function (newValue) {\n                value_1 = newValue;\n            };\n        }\n    }\n    if (descGet) {\n        observedDescriptor.get = function () {\n            // `this as T` needed for closure conformance\n            return descGet.call(this);\n        };\n    }\n    if (descSet) {\n        observedDescriptor.set = function (newValue) {\n            var e_4, _a;\n            // `thus as T` needed for closure conformance\n            var previous = descGet ? descGet.call(this) : newValue;\n            descSet.call(this, newValue);\n            if (targetObservers.isEnabled && (!descGet || newValue !== previous)) {\n                try {\n                    for (var _b = __values(targetObservers.getObservers(property)), _c = _b.next(); !_c.done; _c = _b.next()) {\n                        var observer = _c.value;\n                        observer(newValue, previous);\n                    }\n                }\n                catch (e_4_1) { e_4 = { error: e_4_1 }; }\n                finally {\n                    try {\n                        if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                    }\n                    finally { if (e_4) throw e_4.error; }\n                }\n            }\n        };\n    }\n    targetObservers.installedProperties.add(property);\n    Object.defineProperty(target, property, observedDescriptor);\n    return targetObservers;\n}\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param target - The target to retrieve a descriptor from.\n * @param property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n *     plain properties may not have a descriptor defined.\n */\nexport function getDescriptor(target, property) {\n    var descriptorTarget = target;\n    var descriptor;\n    while (descriptorTarget) {\n        descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n        if (descriptor) {\n            break;\n        }\n        // Walk up the instance's prototype chain in case the property is declared\n        // on a superclass.\n        descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n    }\n    return descriptor;\n}\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param target - The target to enable or disable observers for.\n * @param enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled(target, enabled) {\n    var targetObservers = allTargetObservers.get(target);\n    if (targetObservers) {\n        targetObservers.isEnabled = enabled;\n    }\n}\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends, __read, __spreadArray, __values } from \"tslib\";\nimport { MDCFoundation } from './foundation';\nimport { observeProperty, setObserversEnabled } from './observer';\nvar MDCObserverFoundation = /** @class */ (function (_super) {\n    __extends(MDCObserverFoundation, _super);\n    function MDCObserverFoundation(adapter) {\n        var _this = _super.call(this, adapter) || this;\n        /** A set of cleanup functions to unobserve changes. */\n        _this.unobserves = new Set();\n        return _this;\n    }\n    MDCObserverFoundation.prototype.destroy = function () {\n        _super.prototype.destroy.call(this);\n        this.unobserve();\n    };\n    /**\n     * Observe a target's properties for changes using the provided map of\n     * property names and observer functions.\n     *\n     * @template T The target type.\n     * @param target - The target to observe.\n     * @param observers - An object whose keys are target properties and values\n     *     are observer functions that are called when the associated property\n     *     changes.\n     * @return A cleanup function that can be called to unobserve the\n     *     target.\n     */\n    MDCObserverFoundation.prototype.observe = function (target, observers) {\n        var e_1, _a;\n        var _this = this;\n        var cleanup = [];\n        try {\n            for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n                var property = _c.value;\n                var observer = observers[property].bind(this);\n                cleanup.push(this.observeProperty(target, property, observer));\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        var unobserve = function () {\n            var e_2, _a;\n            try {\n                for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n                    var cleanupFn = cleanup_1_1.value;\n                    cleanupFn();\n                }\n            }\n            catch (e_2_1) { e_2 = { error: e_2_1 }; }\n            finally {\n                try {\n                    if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n                }\n                finally { if (e_2) throw e_2.error; }\n            }\n            _this.unobserves.delete(unobserve);\n        };\n        this.unobserves.add(unobserve);\n        return unobserve;\n    };\n    /**\n     * Observe a target's property for changes. When a property changes, the\n     * provided `Observer` function will be invoked with the properties current\n     * and previous values.\n     *\n     * The returned cleanup function will stop listening to changes for the\n     * provided `Observer`.\n     *\n     * @template T The observed target type.\n     * @template K The observed property.\n     * @param target - The target to observe.\n     * @param property - The property of the target to observe.\n     * @param observer - An observer function to invoke each time the property\n     *     changes.\n     * @return A cleanup function that will stop observing changes for the\n     *     provided `Observer`.\n     */\n    MDCObserverFoundation.prototype.observeProperty = function (target, property, observer) {\n        return observeProperty(target, property, observer);\n    };\n    /**\n     * Enables or disables all observers for the provided target. Disabling\n     * observers will prevent them from being called until they are re-enabled.\n     *\n     * @param target - The target to enable or disable observers for.\n     * @param enabled - Whether or not observers should be called.\n     */\n    MDCObserverFoundation.prototype.setObserversEnabled = function (target, enabled) {\n        setObserversEnabled(target, enabled);\n    };\n    /**\n     * Clean up all observers and stop listening for property changes.\n     */\n    MDCObserverFoundation.prototype.unobserve = function () {\n        var e_3, _a;\n        try {\n            // Iterate over a copy since unobserve() will remove themselves from the set\n            for (var _b = __values(__spreadArray([], __read(this.unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n                var unobserve = _c.value;\n                unobserve();\n            }\n        }\n        catch (e_3_1) { e_3 = { error: e_3_1 }; }\n        finally {\n            try {\n                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n            }\n            finally { if (e_3) throw e_3.error; }\n        }\n    };\n    return MDCObserverFoundation;\n}(MDCFoundation));\nexport { MDCObserverFoundation };\n//# sourceMappingURL=observer-foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Events provides the named constants for strings used by the foundation.\n */\nexport var Attributes;\n(function (Attributes) {\n    Attributes[\"ARIA_MULTISELECTABLE\"] = \"aria-multiselectable\";\n})(Attributes || (Attributes = {}));\n/**\n * CssClasses provides the named constants for class names.\n */\nexport var CssClasses;\n(function (CssClasses) {\n    CssClasses[\"CHIP\"] = \"mdc-evolution-chip\";\n})(CssClasses || (CssClasses = {}));\n/**\n * Events provides the constants for emitted events.\n */\nexport var Events;\n(function (Events) {\n    Events[\"INTERACTION\"] = \"MDCChipSet:interaction\";\n    Events[\"REMOVAL\"] = \"MDCChipSet:removal\";\n    Events[\"SELECTION\"] = \"MDCChipSet:selection\";\n})(Events || (Events = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { KEY } from '@material/dom/keyboard';\nimport { ActionType, FocusBehavior } from '../action/constants';\nimport { Animation } from '../chip/constants';\nimport { Attributes, Events } from './constants';\nvar Operator;\n(function (Operator) {\n    Operator[Operator[\"INCREMENT\"] = 0] = \"INCREMENT\";\n    Operator[Operator[\"DECREMENT\"] = 1] = \"DECREMENT\";\n})(Operator || (Operator = {}));\n/**\n * MDCChipSetFoundation provides a foundation for all chips.\n */\nvar MDCChipSetFoundation = /** @class */ (function (_super) {\n    __extends(MDCChipSetFoundation, _super);\n    function MDCChipSetFoundation(adapter) {\n        return _super.call(this, __assign(__assign({}, MDCChipSetFoundation.defaultAdapter), adapter)) || this;\n    }\n    Object.defineProperty(MDCChipSetFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                announceMessage: function () { return undefined; },\n                emitEvent: function () { return undefined; },\n                getAttribute: function () { return null; },\n                getChipActionsAtIndex: function () { return []; },\n                getChipCount: function () { return 0; },\n                getChipIdAtIndex: function () { return ''; },\n                getChipIndexById: function () { return 0; },\n                isChipFocusableAtIndex: function () { return false; },\n                isChipSelectableAtIndex: function () { return false; },\n                isChipSelectedAtIndex: function () { return false; },\n                removeChipAtIndex: function () { },\n                setChipFocusAtIndex: function () { return undefined; },\n                setChipSelectedAtIndex: function () { return undefined; },\n                startChipAnimationAtIndex: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCChipSetFoundation.prototype.handleChipAnimation = function (_a) {\n        var detail = _a.detail;\n        var chipID = detail.chipID, animation = detail.animation, isComplete = detail.isComplete, addedAnnouncement = detail.addedAnnouncement, removedAnnouncement = detail.removedAnnouncement;\n        var index = this.adapter.getChipIndexById(chipID);\n        if (animation === Animation.EXIT && isComplete) {\n            if (removedAnnouncement) {\n                this.adapter.announceMessage(removedAnnouncement);\n            }\n            this.removeAfterAnimation(index, chipID);\n            return;\n        }\n        if (animation === Animation.ENTER && isComplete && addedAnnouncement) {\n            this.adapter.announceMessage(addedAnnouncement);\n            return;\n        }\n    };\n    MDCChipSetFoundation.prototype.handleChipInteraction = function (_a) {\n        var detail = _a.detail;\n        var source = detail.source, chipID = detail.chipID, isSelectable = detail.isSelectable, isSelected = detail.isSelected, shouldRemove = detail.shouldRemove;\n        var index = this.adapter.getChipIndexById(chipID);\n        if (shouldRemove) {\n            this.removeChip(index);\n            return;\n        }\n        this.focusChip(index, source, FocusBehavior.FOCUSABLE);\n        this.adapter.emitEvent(Events.INTERACTION, {\n            chipIndex: index,\n            chipID: chipID,\n        });\n        if (isSelectable) {\n            this.setSelection(index, source, !isSelected);\n        }\n    };\n    MDCChipSetFoundation.prototype.handleChipNavigation = function (_a) {\n        var detail = _a.detail;\n        var chipID = detail.chipID, key = detail.key, isRTL = detail.isRTL, source = detail.source;\n        var index = this.adapter.getChipIndexById(chipID);\n        var toNextChip = (key === KEY.ARROW_RIGHT && !isRTL) ||\n            (key === KEY.ARROW_LEFT && isRTL);\n        if (toNextChip) {\n            // Start from the next chip so we increment the index\n            this.focusNextChipFrom(index + 1);\n            return;\n        }\n        var toPreviousChip = (key === KEY.ARROW_LEFT && !isRTL) ||\n            (key === KEY.ARROW_RIGHT && isRTL);\n        if (toPreviousChip) {\n            // Start from the previous chip so we decrement the index\n            this.focusPrevChipFrom(index - 1);\n            return;\n        }\n        if (key === KEY.ARROW_DOWN) {\n            // Start from the next chip so we increment the index\n            this.focusNextChipFrom(index + 1, source);\n            return;\n        }\n        if (key === KEY.ARROW_UP) {\n            // Start from the previous chip so we decrement the index\n            this.focusPrevChipFrom(index - 1, source);\n            return;\n        }\n        if (key === KEY.HOME) {\n            this.focusNextChipFrom(0, source);\n            return;\n        }\n        if (key === KEY.END) {\n            this.focusPrevChipFrom(this.adapter.getChipCount() - 1, source);\n            return;\n        }\n    };\n    /** Returns the unique selected indexes of the chips. */\n    MDCChipSetFoundation.prototype.getSelectedChipIndexes = function () {\n        var e_1, _a;\n        var selectedIndexes = new Set();\n        var chipCount = this.adapter.getChipCount();\n        for (var i = 0; i < chipCount; i++) {\n            var actions = this.adapter.getChipActionsAtIndex(i);\n            try {\n                for (var actions_1 = (e_1 = void 0, __values(actions)), actions_1_1 = actions_1.next(); !actions_1_1.done; actions_1_1 = actions_1.next()) {\n                    var action = actions_1_1.value;\n                    if (this.adapter.isChipSelectedAtIndex(i, action)) {\n                        selectedIndexes.add(i);\n                    }\n                }\n            }\n            catch (e_1_1) { e_1 = { error: e_1_1 }; }\n            finally {\n                try {\n                    if (actions_1_1 && !actions_1_1.done && (_a = actions_1.return)) _a.call(actions_1);\n                }\n                finally { if (e_1) throw e_1.error; }\n            }\n        }\n        return selectedIndexes;\n    };\n    /** Sets the selected state of the chip at the given index and action. */\n    MDCChipSetFoundation.prototype.setChipSelected = function (index, action, isSelected) {\n        if (this.adapter.isChipSelectableAtIndex(index, action)) {\n            this.setSelection(index, action, isSelected);\n        }\n    };\n    /** Returns the selected state of the chip at the given index and action. */\n    MDCChipSetFoundation.prototype.isChipSelected = function (index, action) {\n        return this.adapter.isChipSelectedAtIndex(index, action);\n    };\n    /** Removes the chip at the given index. */\n    MDCChipSetFoundation.prototype.removeChip = function (index) {\n        // Early exit if the index is out of bounds\n        if (index >= this.adapter.getChipCount() || index < 0)\n            return;\n        this.adapter.startChipAnimationAtIndex(index, Animation.EXIT);\n        this.adapter.emitEvent(Events.REMOVAL, {\n            chipID: this.adapter.getChipIdAtIndex(index),\n            chipIndex: index,\n            isComplete: false,\n        });\n    };\n    MDCChipSetFoundation.prototype.addChip = function (index) {\n        // Early exit if the index is out of bounds\n        if (index >= this.adapter.getChipCount() || index < 0)\n            return;\n        this.adapter.startChipAnimationAtIndex(index, Animation.ENTER);\n    };\n    /**\n     * Increments to find the first focusable chip.\n     */\n    MDCChipSetFoundation.prototype.focusNextChipFrom = function (startIndex, targetAction) {\n        var chipCount = this.adapter.getChipCount();\n        for (var i = startIndex; i < chipCount; i++) {\n            var focusableAction = this.getFocusableAction(i, Operator.INCREMENT, targetAction);\n            if (focusableAction) {\n                this.focusChip(i, focusableAction, FocusBehavior.FOCUSABLE_AND_FOCUSED);\n                return;\n            }\n        }\n    };\n    /**\n     * Decrements to find the first focusable chip. Takes an optional target\n     * action that can be used to focus the first matching focusable action.\n     */\n    MDCChipSetFoundation.prototype.focusPrevChipFrom = function (startIndex, targetAction) {\n        for (var i = startIndex; i > -1; i--) {\n            var focusableAction = this.getFocusableAction(i, Operator.DECREMENT, targetAction);\n            if (focusableAction) {\n                this.focusChip(i, focusableAction, FocusBehavior.FOCUSABLE_AND_FOCUSED);\n                return;\n            }\n        }\n    };\n    /** Returns the appropriate focusable action, or null if none exist. */\n    MDCChipSetFoundation.prototype.getFocusableAction = function (index, op, targetAction) {\n        var actions = this.adapter.getChipActionsAtIndex(index);\n        // Reverse the actions if decrementing\n        if (op === Operator.DECREMENT)\n            actions.reverse();\n        if (targetAction) {\n            return this.getMatchingFocusableAction(index, actions, targetAction);\n        }\n        return this.getFirstFocusableAction(index, actions);\n    };\n    /**\n     * Returs the first focusable action, regardless of type, or null if no\n     * focusable actions exist.\n     */\n    MDCChipSetFoundation.prototype.getFirstFocusableAction = function (index, actions) {\n        var e_2, _a;\n        try {\n            for (var actions_2 = __values(actions), actions_2_1 = actions_2.next(); !actions_2_1.done; actions_2_1 = actions_2.next()) {\n                var action = actions_2_1.value;\n                if (this.adapter.isChipFocusableAtIndex(index, action)) {\n                    return action;\n                }\n            }\n        }\n        catch (e_2_1) { e_2 = { error: e_2_1 }; }\n        finally {\n            try {\n                if (actions_2_1 && !actions_2_1.done && (_a = actions_2.return)) _a.call(actions_2);\n            }\n            finally { if (e_2) throw e_2.error; }\n        }\n        return null;\n    };\n    /**\n     * If the actions contain a focusable action that matches the target action,\n     * return that. Otherwise, return the first focusable action, or null if no\n     * focusable action exists.\n     */\n    MDCChipSetFoundation.prototype.getMatchingFocusableAction = function (index, actions, targetAction) {\n        var e_3, _a;\n        var focusableAction = null;\n        try {\n            for (var actions_3 = __values(actions), actions_3_1 = actions_3.next(); !actions_3_1.done; actions_3_1 = actions_3.next()) {\n                var action = actions_3_1.value;\n                if (this.adapter.isChipFocusableAtIndex(index, action)) {\n                    focusableAction = action;\n                }\n                // Exit and return the focusable action if it matches the target\n                if (focusableAction === targetAction) {\n                    return focusableAction;\n                }\n            }\n        }\n        catch (e_3_1) { e_3 = { error: e_3_1 }; }\n        finally {\n            try {\n                if (actions_3_1 && !actions_3_1.done && (_a = actions_3.return)) _a.call(actions_3);\n            }\n            finally { if (e_3) throw e_3.error; }\n        }\n        return focusableAction;\n    };\n    MDCChipSetFoundation.prototype.focusChip = function (index, action, focus) {\n        var e_4, _a;\n        this.adapter.setChipFocusAtIndex(index, action, focus);\n        var chipCount = this.adapter.getChipCount();\n        for (var i = 0; i < chipCount; i++) {\n            var actions = this.adapter.getChipActionsAtIndex(i);\n            try {\n                for (var actions_4 = (e_4 = void 0, __values(actions)), actions_4_1 = actions_4.next(); !actions_4_1.done; actions_4_1 = actions_4.next()) {\n                    var chipAction = actions_4_1.value;\n                    // Skip the action and index provided since we set it above\n                    if (chipAction === action && i === index)\n                        continue;\n                    this.adapter.setChipFocusAtIndex(i, chipAction, FocusBehavior.NOT_FOCUSABLE);\n                }\n            }\n            catch (e_4_1) { e_4 = { error: e_4_1 }; }\n            finally {\n                try {\n                    if (actions_4_1 && !actions_4_1.done && (_a = actions_4.return)) _a.call(actions_4);\n                }\n                finally { if (e_4) throw e_4.error; }\n            }\n        }\n    };\n    MDCChipSetFoundation.prototype.supportsMultiSelect = function () {\n        return this.adapter.getAttribute(Attributes.ARIA_MULTISELECTABLE) ===\n            'true';\n    };\n    MDCChipSetFoundation.prototype.setSelection = function (index, action, isSelected) {\n        var e_5, _a;\n        this.adapter.setChipSelectedAtIndex(index, action, isSelected);\n        this.adapter.emitEvent(Events.SELECTION, {\n            chipID: this.adapter.getChipIdAtIndex(index),\n            chipIndex: index,\n            isSelected: isSelected,\n        });\n        // Early exit if we support multi-selection\n        if (this.supportsMultiSelect()) {\n            return;\n        }\n        // If we get here, we ony support single selection. This means we need to\n        // unselect all chips\n        var chipCount = this.adapter.getChipCount();\n        for (var i = 0; i < chipCount; i++) {\n            var actions = this.adapter.getChipActionsAtIndex(i);\n            try {\n                for (var actions_5 = (e_5 = void 0, __values(actions)), actions_5_1 = actions_5.next(); !actions_5_1.done; actions_5_1 = actions_5.next()) {\n                    var chipAction = actions_5_1.value;\n                    // Skip the action and index provided since we set it above\n                    if (chipAction === action && i === index)\n                        continue;\n                    this.adapter.setChipSelectedAtIndex(i, chipAction, false);\n                }\n            }\n            catch (e_5_1) { e_5 = { error: e_5_1 }; }\n            finally {\n                try {\n                    if (actions_5_1 && !actions_5_1.done && (_a = actions_5.return)) _a.call(actions_5);\n                }\n                finally { if (e_5) throw e_5.error; }\n            }\n        }\n    };\n    MDCChipSetFoundation.prototype.removeAfterAnimation = function (index, chipID) {\n        this.adapter.removeChipAtIndex(index);\n        this.adapter.emitEvent(Events.REMOVAL, {\n            chipIndex: index,\n            isComplete: true,\n            chipID: chipID,\n        });\n        var chipCount = this.adapter.getChipCount();\n        // Early exit if we have an empty chip set\n        if (chipCount <= 0)\n            return;\n        this.focusNearestFocusableAction(index);\n    };\n    /**\n     * Find the first focusable action by moving bidirectionally horizontally\n     * from the start index.\n     *\n     * Given chip set [A, B, C, D, E, F, G]...\n     * Let's say we remove chip \"F\". We don't know where the nearest focusable\n     * action is since any of them could be disabled. The nearest focusable\n     * action could be E, it could be G, it could even be A. To find it, we\n     * start from the source index (5 for \"F\" in this case) and move out\n     * horizontally, checking each chip at each index.\n     *\n     */\n    MDCChipSetFoundation.prototype.focusNearestFocusableAction = function (index) {\n        var chipCount = this.adapter.getChipCount();\n        var decrIndex = index;\n        var incrIndex = index;\n        while (decrIndex > -1 || incrIndex < chipCount) {\n            var focusAction = this.getNearestFocusableAction(decrIndex, incrIndex, ActionType.TRAILING);\n            if (focusAction) {\n                this.focusChip(focusAction.index, focusAction.action, FocusBehavior.FOCUSABLE_AND_FOCUSED);\n                return;\n            }\n            decrIndex--;\n            incrIndex++;\n        }\n    };\n    MDCChipSetFoundation.prototype.getNearestFocusableAction = function (decrIndex, incrIndex, actionType) {\n        var decrAction = this.getFocusableAction(decrIndex, Operator.DECREMENT, actionType);\n        if (decrAction) {\n            return {\n                index: decrIndex,\n                action: decrAction,\n            };\n        }\n        // Early exit if the incremented and decremented indices are identical\n        if (incrIndex === decrIndex)\n            return null;\n        var incrAction = this.getFocusableAction(incrIndex, Operator.INCREMENT, actionType);\n        if (incrAction) {\n            return {\n                index: incrIndex,\n                action: incrAction,\n            };\n        }\n        return null;\n    };\n    return MDCChipSetFoundation;\n}(MDCFoundation));\nexport { MDCChipSetFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipSetFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssPropertyNameMap = {\n    animation: {\n        prefixed: '-webkit-animation',\n        standard: 'animation',\n    },\n    transform: {\n        prefixed: '-webkit-transform',\n        standard: 'transform',\n    },\n    transition: {\n        prefixed: '-webkit-transition',\n        standard: 'transition',\n    },\n};\nvar jsEventTypeMap = {\n    animationend: {\n        cssProperty: 'animation',\n        prefixed: 'webkitAnimationEnd',\n        standard: 'animationend',\n    },\n    animationiteration: {\n        cssProperty: 'animation',\n        prefixed: 'webkitAnimationIteration',\n        standard: 'animationiteration',\n    },\n    animationstart: {\n        cssProperty: 'animation',\n        prefixed: 'webkitAnimationStart',\n        standard: 'animationstart',\n    },\n    transitionend: {\n        cssProperty: 'transition',\n        prefixed: 'webkitTransitionEnd',\n        standard: 'transitionend',\n    },\n};\nfunction isWindow(windowObj) {\n    return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';\n}\nexport function getCorrectPropertyName(windowObj, cssProperty) {\n    if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {\n        var el = windowObj.document.createElement('div');\n        var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed;\n        var isStandard = standard in el.style;\n        return isStandard ? standard : prefixed;\n    }\n    return cssProperty;\n}\nexport function getCorrectEventName(windowObj, eventType) {\n    if (isWindow(windowObj) && eventType in jsEventTypeMap) {\n        var el = windowObj.document.createElement('div');\n        var _a = jsEventTypeMap[eventType], standard = _a.standard, prefixed = _a.prefixed, cssProperty = _a.cssProperty;\n        var isStandard = cssProperty in el.style;\n        return isStandard ? standard : prefixed;\n    }\n    return eventType;\n}\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar MDCFoundation = /** @class */ (function () {\n    function MDCFoundation(adapter) {\n        if (adapter === void 0) { adapter = {}; }\n        this.adapter = adapter;\n    }\n    Object.defineProperty(MDCFoundation, \"cssClasses\", {\n        get: function () {\n            // Classes extending MDCFoundation should implement this method to return an object which exports every\n            // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n            return {};\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCFoundation, \"strings\", {\n        get: function () {\n            // Classes extending MDCFoundation should implement this method to return an object which exports all\n            // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n            return {};\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCFoundation, \"numbers\", {\n        get: function () {\n            // Classes extending MDCFoundation should implement this method to return an object which exports all\n            // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n            return {};\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCFoundation, \"defaultAdapter\", {\n        get: function () {\n            // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n            // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n            // validation.\n            return {};\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCFoundation.prototype.init = function () {\n        // Subclasses should override this method to perform initialization routines (registering events, etc.)\n    };\n    MDCFoundation.prototype.destroy = function () {\n        // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n    };\n    return MDCFoundation;\n}());\nexport { MDCFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { FocusTrap } from '@material/dom/focus-trap';\nimport { MDCList } from '@material/list/component';\nimport { MDCDismissibleDrawerFoundation } from './dismissible/foundation';\nimport { MDCModalDrawerFoundation } from './modal/foundation';\nimport * as util from './util';\nvar cssClasses = MDCDismissibleDrawerFoundation.cssClasses, strings = MDCDismissibleDrawerFoundation.strings;\n/**\n * @events `MDCDrawer:closed {}` Emits when the navigation drawer has closed.\n * @events `MDCDrawer:opened {}` Emits when the navigation drawer has opened.\n */\nvar MDCDrawer = /** @class */ (function (_super) {\n    __extends(MDCDrawer, _super);\n    function MDCDrawer() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    MDCDrawer.attachTo = function (root) {\n        return new MDCDrawer(root);\n    };\n    Object.defineProperty(MDCDrawer.prototype, \"open\", {\n        /**\n         * @return boolean Proxies to the foundation's `open`/`close` methods.\n         * Also returns true if drawer is in the open position.\n         */\n        get: function () {\n            return this.foundation.isOpen();\n        },\n        /**\n         * Toggles the drawer open and closed.\n         */\n        set: function (isOpen) {\n            if (isOpen) {\n                this.foundation.open();\n            }\n            else {\n                this.foundation.close();\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDrawer.prototype, \"list\", {\n        // initialSyncWithDOM()\n        get: function () {\n            return this.innerList;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCDrawer.prototype.initialize = function (focusTrapFactory, listFactory) {\n        if (focusTrapFactory === void 0) { focusTrapFactory = function (el) { return new FocusTrap(el); }; }\n        if (listFactory === void 0) { listFactory = function (el) { return new MDCList(el); }; }\n        var listEl = this.root.querySelector(strings.LIST_SELECTOR);\n        if (listEl) {\n            this.innerList = listFactory(listEl);\n            this.innerList.wrapFocus = true;\n        }\n        this.focusTrapFactory = focusTrapFactory;\n    };\n    MDCDrawer.prototype.initialSyncWithDOM = function () {\n        var _this = this;\n        var MODAL = cssClasses.MODAL;\n        var SCRIM_SELECTOR = strings.SCRIM_SELECTOR;\n        this.scrim = this.root.parentNode\n            .querySelector(SCRIM_SELECTOR);\n        if (this.scrim && this.root.classList.contains(MODAL)) {\n            this.handleScrimClick = function () {\n                return _this.foundation.handleScrimClick();\n            };\n            this.scrim.addEventListener('click', this.handleScrimClick);\n            this.focusTrap = util.createFocusTrapInstance(this.root, this.focusTrapFactory);\n        }\n        this.handleKeydown = function (evt) {\n            _this.foundation.handleKeydown(evt);\n        };\n        this.handleTransitionEnd = function (evt) {\n            _this.foundation.handleTransitionEnd(evt);\n        };\n        this.listen('keydown', this.handleKeydown);\n        this.listen('transitionend', this.handleTransitionEnd);\n    };\n    MDCDrawer.prototype.destroy = function () {\n        this.unlisten('keydown', this.handleKeydown);\n        this.unlisten('transitionend', this.handleTransitionEnd);\n        if (this.innerList) {\n            this.innerList.destroy();\n        }\n        var MODAL = cssClasses.MODAL;\n        if (this.scrim && this.handleScrimClick &&\n            this.root.classList.contains(MODAL)) {\n            this.scrim.removeEventListener('click', this.handleScrimClick);\n            // Ensure drawer is closed to hide scrim and release focus\n            this.open = false;\n        }\n    };\n    MDCDrawer.prototype.getDefaultFoundation = function () {\n        var _this = this;\n        // DO NOT INLINE this variable. For backward compatibility, foundations take\n        // a Partial<MDCFooAdapter>. To ensure we don't accidentally omit any\n        // methods, we need a separate, strongly typed adapter variable.\n        // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n        var adapter = {\n            addClass: function (className) {\n                _this.root.classList.add(className);\n            },\n            removeClass: function (className) {\n                _this.root.classList.remove(className);\n            },\n            hasClass: function (className) { return _this.root.classList.contains(className); },\n            elementHasClass: function (element, className) {\n                return element.classList.contains(className);\n            },\n            saveFocus: function () {\n                _this.previousFocus = document.activeElement;\n            },\n            restoreFocus: function () {\n                var previousFocus = _this.previousFocus;\n                if (previousFocus && previousFocus.focus &&\n                    _this.root.contains(document.activeElement)) {\n                    previousFocus.focus();\n                }\n            },\n            focusActiveNavigationItem: function () {\n                var activeNavItemEl = _this.root.querySelector(strings.LIST_ITEM_ACTIVATED_SELECTOR);\n                if (activeNavItemEl) {\n                    activeNavItemEl.focus();\n                }\n            },\n            notifyClose: function () {\n                _this.emit(strings.CLOSE_EVENT, {}, true /* shouldBubble */);\n            },\n            notifyOpen: function () {\n                _this.emit(strings.OPEN_EVENT, {}, true /* shouldBubble */);\n            },\n            trapFocus: function () {\n                _this.focusTrap.trapFocus();\n            },\n            releaseFocus: function () {\n                _this.focusTrap.releaseFocus();\n            },\n        };\n        // tslint:enable:object-literal-sort-keys\n        var DISMISSIBLE = cssClasses.DISMISSIBLE, MODAL = cssClasses.MODAL;\n        if (this.root.classList.contains(DISMISSIBLE)) {\n            return new MDCDismissibleDrawerFoundation(adapter);\n        }\n        else if (this.root.classList.contains(MODAL)) {\n            return new MDCModalDrawerFoundation(adapter);\n        }\n        else {\n            throw new Error(\"MDCDrawer: Failed to instantiate component. Supported variants are \" + DISMISSIBLE + \" and \" + MODAL + \".\");\n        }\n    };\n    return MDCDrawer;\n}(MDCComponent));\nexport { MDCDrawer };\n//# sourceMappingURL=component.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport function createFocusTrapInstance(surfaceEl, focusTrapFactory) {\n    return focusTrapFactory(surfaceEl, {\n        // Component handles focusing on active nav item.\n        skipInitialFocus: true,\n    });\n}\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar FOCUS_SENTINEL_CLASS = 'mdc-dom-focus-sentinel';\n/**\n * Utility to trap focus in a given root element, e.g. for modal components such\n * as dialogs. The root should have at least one focusable child element,\n * for setting initial focus when trapping focus.\n * Also tracks the previously focused element, and restores focus to that\n * element when releasing focus.\n */\nvar FocusTrap = /** @class */ (function () {\n    function FocusTrap(root, options) {\n        if (options === void 0) { options = {}; }\n        this.root = root;\n        this.options = options;\n        // Previously focused element before trapping focus.\n        this.elFocusedBeforeTrapFocus = null;\n    }\n    /**\n     * Traps focus in `root`. Also focuses on either `initialFocusEl` if set;\n     * otherwises sets initial focus to the first focusable child element.\n     */\n    FocusTrap.prototype.trapFocus = function () {\n        var focusableEls = this.getFocusableElements(this.root);\n        if (focusableEls.length === 0) {\n            throw new Error('FocusTrap: Element must have at least one focusable child.');\n        }\n        this.elFocusedBeforeTrapFocus =\n            document.activeElement instanceof HTMLElement ? document.activeElement :\n                null;\n        this.wrapTabFocus(this.root);\n        if (!this.options.skipInitialFocus) {\n            this.focusInitialElement(focusableEls, this.options.initialFocusEl);\n        }\n    };\n    /**\n     * Releases focus from `root`. Also restores focus to the previously focused\n     * element.\n     */\n    FocusTrap.prototype.releaseFocus = function () {\n        [].slice.call(this.root.querySelectorAll(\".\" + FOCUS_SENTINEL_CLASS))\n            .forEach(function (sentinelEl) {\n            sentinelEl.parentElement.removeChild(sentinelEl);\n        });\n        if (!this.options.skipRestoreFocus && this.elFocusedBeforeTrapFocus) {\n            this.elFocusedBeforeTrapFocus.focus();\n        }\n    };\n    /**\n     * Wraps tab focus within `el` by adding two hidden sentinel divs which are\n     * used to mark the beginning and the end of the tabbable region. When\n     * focused, these sentinel elements redirect focus to the first/last\n     * children elements of the tabbable region, ensuring that focus is trapped\n     * within that region.\n     */\n    FocusTrap.prototype.wrapTabFocus = function (el) {\n        var _this = this;\n        var sentinelStart = this.createSentinel();\n        var sentinelEnd = this.createSentinel();\n        sentinelStart.addEventListener('focus', function () {\n            var focusableEls = _this.getFocusableElements(el);\n            if (focusableEls.length > 0) {\n                focusableEls[focusableEls.length - 1].focus();\n            }\n        });\n        sentinelEnd.addEventListener('focus', function () {\n            var focusableEls = _this.getFocusableElements(el);\n            if (focusableEls.length > 0) {\n                focusableEls[0].focus();\n            }\n        });\n        el.insertBefore(sentinelStart, el.children[0]);\n        el.appendChild(sentinelEnd);\n    };\n    /**\n     * Focuses on `initialFocusEl` if defined and a child of the root element.\n     * Otherwise, focuses on the first focusable child element of the root.\n     */\n    FocusTrap.prototype.focusInitialElement = function (focusableEls, initialFocusEl) {\n        var focusIndex = 0;\n        if (initialFocusEl) {\n            focusIndex = Math.max(focusableEls.indexOf(initialFocusEl), 0);\n        }\n        focusableEls[focusIndex].focus();\n    };\n    FocusTrap.prototype.getFocusableElements = function (root) {\n        var focusableEls = [].slice.call(root.querySelectorAll('[autofocus], [tabindex], a, input, textarea, select, button'));\n        return focusableEls.filter(function (el) {\n            var isDisabledOrHidden = el.getAttribute('aria-disabled') === 'true' ||\n                el.getAttribute('disabled') != null ||\n                el.getAttribute('hidden') != null ||\n                el.getAttribute('aria-hidden') === 'true';\n            var isTabbableAndVisible = el.tabIndex >= 0 &&\n                el.getBoundingClientRect().width > 0 &&\n                !el.classList.contains(FOCUS_SENTINEL_CLASS) && !isDisabledOrHidden;\n            var isProgrammaticallyHidden = false;\n            if (isTabbableAndVisible) {\n                var style = getComputedStyle(el);\n                isProgrammaticallyHidden =\n                    style.display === 'none' || style.visibility === 'hidden';\n            }\n            return isTabbableAndVisible && !isProgrammaticallyHidden;\n        });\n    };\n    FocusTrap.prototype.createSentinel = function () {\n        var sentinel = document.createElement('div');\n        sentinel.setAttribute('tabindex', '0');\n        // Don't announce in screen readers.\n        sentinel.setAttribute('aria-hidden', 'true');\n        sentinel.classList.add(FOCUS_SENTINEL_CLASS);\n        return sentinel;\n    };\n    return FocusTrap;\n}());\nexport { FocusTrap };\n//# sourceMappingURL=focus-trap.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * KEY provides normalized string values for keys.\n */\nexport var KEY = {\n    UNKNOWN: 'Unknown',\n    BACKSPACE: 'Backspace',\n    ENTER: 'Enter',\n    SPACEBAR: 'Spacebar',\n    PAGE_UP: 'PageUp',\n    PAGE_DOWN: 'PageDown',\n    END: 'End',\n    HOME: 'Home',\n    ARROW_LEFT: 'ArrowLeft',\n    ARROW_UP: 'ArrowUp',\n    ARROW_RIGHT: 'ArrowRight',\n    ARROW_DOWN: 'ArrowDown',\n    DELETE: 'Delete',\n    ESCAPE: 'Escape',\n    TAB: 'Tab',\n};\nvar normalizedKeys = new Set();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nnormalizedKeys.add(KEY.BACKSPACE);\nnormalizedKeys.add(KEY.ENTER);\nnormalizedKeys.add(KEY.SPACEBAR);\nnormalizedKeys.add(KEY.PAGE_UP);\nnormalizedKeys.add(KEY.PAGE_DOWN);\nnormalizedKeys.add(KEY.END);\nnormalizedKeys.add(KEY.HOME);\nnormalizedKeys.add(KEY.ARROW_LEFT);\nnormalizedKeys.add(KEY.ARROW_UP);\nnormalizedKeys.add(KEY.ARROW_RIGHT);\nnormalizedKeys.add(KEY.ARROW_DOWN);\nnormalizedKeys.add(KEY.DELETE);\nnormalizedKeys.add(KEY.ESCAPE);\nnormalizedKeys.add(KEY.TAB);\nvar KEY_CODE = {\n    BACKSPACE: 8,\n    ENTER: 13,\n    SPACEBAR: 32,\n    PAGE_UP: 33,\n    PAGE_DOWN: 34,\n    END: 35,\n    HOME: 36,\n    ARROW_LEFT: 37,\n    ARROW_UP: 38,\n    ARROW_RIGHT: 39,\n    ARROW_DOWN: 40,\n    DELETE: 46,\n    ESCAPE: 27,\n    TAB: 9,\n};\nvar mappedKeyCodes = new Map();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nmappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE);\nmappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER);\nmappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR);\nmappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP);\nmappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN);\nmappedKeyCodes.set(KEY_CODE.END, KEY.END);\nmappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME);\nmappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT);\nmappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP);\nmappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT);\nmappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN);\nmappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE);\nmappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE);\nmappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB);\nvar navigationKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this\n// by hand.\nnavigationKeys.add(KEY.PAGE_UP);\nnavigationKeys.add(KEY.PAGE_DOWN);\nnavigationKeys.add(KEY.END);\nnavigationKeys.add(KEY.HOME);\nnavigationKeys.add(KEY.ARROW_LEFT);\nnavigationKeys.add(KEY.ARROW_UP);\nnavigationKeys.add(KEY.ARROW_RIGHT);\nnavigationKeys.add(KEY.ARROW_DOWN);\n/**\n * normalizeKey returns the normalized string for a navigational action.\n */\nexport function normalizeKey(evt) {\n    var key = evt.key;\n    // If the event already has a normalized key, return it\n    if (normalizedKeys.has(key)) {\n        return key;\n    }\n    // tslint:disable-next-line:deprecation\n    var mappedKey = mappedKeyCodes.get(evt.keyCode);\n    if (mappedKey) {\n        return mappedKey;\n    }\n    return KEY.UNKNOWN;\n}\n/**\n * isNavigationEvent returns whether the event is a navigation event\n */\nexport function isNavigationEvent(evt) {\n    return navigationKeys.has(normalizeKey(evt));\n}\n//# sourceMappingURL=keyboard.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * CssClasses provides the named constants for class names.\n */\nexport var CssClasses;\n(function (CssClasses) {\n    CssClasses[\"SELECTING\"] = \"mdc-evolution-chip--selecting\";\n    CssClasses[\"DESELECTING\"] = \"mdc-evolution-chip--deselecting\";\n    CssClasses[\"SELECTING_WITH_PRIMARY_ICON\"] = \"mdc-evolution-chip--selecting-with-primary-icon\";\n    CssClasses[\"DESELECTING_WITH_PRIMARY_ICON\"] = \"mdc-evolution-chip--deselecting-with-primary-icon\";\n    CssClasses[\"DISABLED\"] = \"mdc-evolution-chip--disabled\";\n    CssClasses[\"ENTER\"] = \"mdc-evolution-chip--enter\";\n    CssClasses[\"EXIT\"] = \"mdc-evolution-chip--exit\";\n    CssClasses[\"SELECTED\"] = \"mdc-evolution-chip--selected\";\n    CssClasses[\"HIDDEN\"] = \"mdc-evolution-chip--hidden\";\n    CssClasses[\"WITH_PRIMARY_ICON\"] = \"mdc-evolution-chip--with-primary-icon\";\n})(CssClasses || (CssClasses = {}));\n/**\n * Events provides the named constants for emitted events.\n */\nexport var Events;\n(function (Events) {\n    Events[\"INTERACTION\"] = \"MDCChip:interaction\";\n    Events[\"NAVIGATION\"] = \"MDCChip:navigation\";\n    Events[\"ANIMATION\"] = \"MDCChip:animation\";\n})(Events || (Events = {}));\n/**\n * Events provides the named constants for strings used by the foundation.\n */\nexport var Attributes;\n(function (Attributes) {\n    Attributes[\"DATA_REMOVED_ANNOUNCEMENT\"] = \"data-mdc-removed-announcement\";\n    Attributes[\"DATA_ADDED_ANNOUNCEMENT\"] = \"data-mdc-added-announcement\";\n})(Attributes || (Attributes = {}));\n/**\n * Animation provides the names of runnable animations.\n */\nexport var Animation;\n(function (Animation) {\n    Animation[\"ENTER\"] = \"mdc-evolution-chip-enter\";\n    Animation[\"EXIT\"] = \"mdc-evolution-chip-exit\";\n})(Animation || (Animation = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * CSS class names used in component.\n */\nexport var cssClasses = {\n    INDETERMINATE_CLASS: 'mdc-circular-progress--indeterminate',\n    CLOSED_CLASS: 'mdc-circular-progress--closed',\n};\n/**\n * Attributes and selectors used in component.\n */\nexport var strings = {\n    ARIA_HIDDEN: 'aria-hidden',\n    ARIA_VALUENOW: 'aria-valuenow',\n    DETERMINATE_CIRCLE_SELECTOR: '.mdc-circular-progress__determinate-circle',\n    RADIUS: 'r',\n    STROKE_DASHOFFSET: 'stroke-dashoffset',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { ActionType, Attributes } from './constants';\nimport { MDCChipActionFoundation } from './foundation';\n/**\n * MDCChipPrimaryActionFoundation provides the business logic for the primary\n * chip action.\n */\nvar MDCChipPrimaryActionFoundation = /** @class */ (function (_super) {\n    __extends(MDCChipPrimaryActionFoundation, _super);\n    function MDCChipPrimaryActionFoundation() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    MDCChipPrimaryActionFoundation.prototype.isSelectable = function () {\n        return this.adapter.getAttribute(Attributes.ROLE) === 'option';\n    };\n    MDCChipPrimaryActionFoundation.prototype.actionType = function () {\n        return ActionType.PRIMARY;\n    };\n    MDCChipPrimaryActionFoundation.prototype.shouldEmitInteractionOnRemoveKey = function () {\n        return this.adapter.getAttribute(Attributes.DATA_DELETABLE) === 'true';\n    };\n    return MDCChipPrimaryActionFoundation;\n}(MDCChipActionFoundation));\nexport { MDCChipPrimaryActionFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipPrimaryActionFoundation;\n//# sourceMappingURL=primary-foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __read, __spreadArray } from \"tslib\";\nimport { MDCFoundation } from './foundation';\nvar MDCComponent = /** @class */ (function () {\n    function MDCComponent(root, foundation) {\n        var args = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            args[_i - 2] = arguments[_i];\n        }\n        this.root = root;\n        this.initialize.apply(this, __spreadArray([], __read(args)));\n        // Note that we initialize foundation here and not within the constructor's\n        // default param so that this.root is defined and can be used within the\n        // foundation class.\n        this.foundation =\n            foundation === undefined ? this.getDefaultFoundation() : foundation;\n        this.foundation.init();\n        this.initialSyncWithDOM();\n    }\n    MDCComponent.attachTo = function (root) {\n        // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and\n        // returns an instantiated component with its root set to that element. Also note that in the cases of\n        // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized\n        // from getDefaultFoundation().\n        return new MDCComponent(root, new MDCFoundation({}));\n    };\n    /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */\n    MDCComponent.prototype.initialize = function () {\n        var _args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            _args[_i] = arguments[_i];\n        }\n        // Subclasses can override this to do any additional setup work that would be considered part of a\n        // \"constructor\". Essentially, it is a hook into the parent constructor before the foundation is\n        // initialized. Any additional arguments besides root and foundation will be passed in here.\n    };\n    MDCComponent.prototype.getDefaultFoundation = function () {\n        // Subclasses must override this method to return a properly configured foundation class for the\n        // component.\n        throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' +\n            'foundation class');\n    };\n    MDCComponent.prototype.initialSyncWithDOM = function () {\n        // Subclasses should override this method if they need to perform work to synchronize with a host DOM\n        // object. An example of this would be a form control wrapper that needs to synchronize its internal state\n        // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM\n        // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.\n    };\n    MDCComponent.prototype.destroy = function () {\n        // Subclasses may implement this method to release any resources / deregister any listeners they have\n        // attached. An example of this might be deregistering a resize event from the window object.\n        this.foundation.destroy();\n    };\n    MDCComponent.prototype.listen = function (evtType, handler, options) {\n        this.root.addEventListener(evtType, handler, options);\n    };\n    MDCComponent.prototype.unlisten = function (evtType, handler, options) {\n        this.root.removeEventListener(evtType, handler, options);\n    };\n    /**\n     * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.\n     */\n    MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {\n        if (shouldBubble === void 0) { shouldBubble = false; }\n        var evt;\n        if (typeof CustomEvent === 'function') {\n            evt = new CustomEvent(evtType, {\n                bubbles: shouldBubble,\n                detail: evtData,\n            });\n        }\n        else {\n            evt = document.createEvent('CustomEvent');\n            evt.initCustomEvent(evtType, shouldBubble, false, evtData);\n        }\n        this.root.dispatchEvent(evt);\n    };\n    return MDCComponent;\n}());\nexport { MDCComponent };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCComponent;\n//# sourceMappingURL=component.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport function createFocusTrapInstance(surfaceEl, focusTrapFactory, initialFocusEl) {\n    return focusTrapFactory(surfaceEl, { initialFocusEl: initialFocusEl });\n}\nexport function isScrollable(el) {\n    return el ? el.scrollHeight > el.offsetHeight : false;\n}\n/**\n * For scrollable content, returns true if the content has not been scrolled\n * (that is, the scroll content is as the \"top\"). This is used in full-screen\n * dialogs, where the scroll divider is expected only to appear once the\n * content has been scrolled \"underneath\" the header bar.\n */\nexport function isScrollAtTop(el) {\n    return el ? el.scrollTop === 0 : false;\n}\n/**\n * For scrollable content, returns true if the content has been scrolled all the\n * way to the bottom. This is used in full-screen dialogs, where the footer\n * scroll divider is expected only to appear when the content is \"cut-off\" by\n * the footer bar.\n */\nexport function isScrollAtBottom(el) {\n    return el ? Math.ceil(el.scrollHeight - el.scrollTop) === el.clientHeight :\n        false;\n}\nexport function areTopsMisaligned(els) {\n    var tops = new Set();\n    [].forEach.call(els, function (el) { return tops.add(el.offsetTop); });\n    return tops.size > 1;\n}\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n    CLOSING: 'mdc-dialog--closing',\n    OPEN: 'mdc-dialog--open',\n    OPENING: 'mdc-dialog--opening',\n    SCROLLABLE: 'mdc-dialog--scrollable',\n    SCROLL_LOCK: 'mdc-dialog-scroll-lock',\n    STACKED: 'mdc-dialog--stacked',\n    FULLSCREEN: 'mdc-dialog--fullscreen',\n    // Class for showing a scroll divider on full-screen dialog header element.\n    // Should only be displayed on scrollable content, when the dialog content is\n    // scrolled \"underneath\" the header.\n    SCROLL_DIVIDER_HEADER: 'mdc-dialog-scroll-divider-header',\n    // Class for showing a scroll divider on a full-screen dialog footer element.\n    // Should only be displayed on scrolalble content, when the dialog content is\n    // obscured \"underneath\" the footer.\n    SCROLL_DIVIDER_FOOTER: 'mdc-dialog-scroll-divider-footer',\n    // The \"surface scrim\" is a scrim covering only the surface of a dialog. This\n    // is used in situations where a confirmation dialog is shown over an already\n    // opened full-screen dialog. On larger screen-sizes, the full-screen dialog\n    // is sized as a modal and so in these situations we display a \"surface scrim\"\n    // to prevent a \"double scrim\" (where the scrim from the secondary\n    // confirmation dialog would overlap with the scrim from the full-screen\n    // dialog).\n    SURFACE_SCRIM_SHOWN: 'mdc-dialog__surface-scrim--shown',\n    // \"Showing\" animating class for the surface-scrim.\n    SURFACE_SCRIM_SHOWING: 'mdc-dialog__surface-scrim--showing',\n    // \"Hiding\" animating class for the surface-scrim.\n    SURFACE_SCRIM_HIDING: 'mdc-dialog__surface-scrim--hiding',\n    // Class to hide a dialog's scrim (used in conjunction with a surface-scrim).\n    // Note that we only hide the original scrim rather than removing it entirely\n    // to prevent interactions with the content behind this scrim, and to capture\n    // scrim clicks.\n    SCRIM_HIDDEN: 'mdc-dialog__scrim--hidden',\n};\nexport var strings = {\n    ACTION_ATTRIBUTE: 'data-mdc-dialog-action',\n    BUTTON_DEFAULT_ATTRIBUTE: 'data-mdc-dialog-button-default',\n    BUTTON_SELECTOR: '.mdc-dialog__button',\n    CLOSED_EVENT: 'MDCDialog:closed',\n    CLOSE_ACTION: 'close',\n    CLOSING_EVENT: 'MDCDialog:closing',\n    CONTAINER_SELECTOR: '.mdc-dialog__container',\n    CONTENT_SELECTOR: '.mdc-dialog__content',\n    DESTROY_ACTION: 'destroy',\n    INITIAL_FOCUS_ATTRIBUTE: 'data-mdc-dialog-initial-focus',\n    OPENED_EVENT: 'MDCDialog:opened',\n    OPENING_EVENT: 'MDCDialog:opening',\n    SCRIM_SELECTOR: '.mdc-dialog__scrim',\n    SUPPRESS_DEFAULT_PRESS_SELECTOR: [\n        'textarea',\n        '.mdc-menu .mdc-list-item',\n        '.mdc-menu .mdc-deprecated-list-item',\n    ].join(', '),\n    SURFACE_SELECTOR: '.mdc-dialog__surface',\n};\nexport var numbers = {\n    DIALOG_ANIMATION_CLOSE_TIME_MS: 75,\n    DIALOG_ANIMATION_OPEN_TIME_MS: 150,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * AnimationFrame provides a user-friendly abstraction around requesting\n * and canceling animation frames.\n */\nvar AnimationFrame = /** @class */ (function () {\n    function AnimationFrame() {\n        this.rafIDs = new Map();\n    }\n    /**\n     * Requests an animation frame. Cancels any existing frame with the same key.\n     * @param {string} key The key for this callback.\n     * @param {FrameRequestCallback} callback The callback to be executed.\n     */\n    AnimationFrame.prototype.request = function (key, callback) {\n        var _this = this;\n        this.cancel(key);\n        var frameID = requestAnimationFrame(function (frame) {\n            _this.rafIDs.delete(key);\n            // Callback must come *after* the key is deleted so that nested calls to\n            // request with the same key are not deleted.\n            callback(frame);\n        });\n        this.rafIDs.set(key, frameID);\n    };\n    /**\n     * Cancels a queued callback with the given key.\n     * @param {string} key The key for this callback.\n     */\n    AnimationFrame.prototype.cancel = function (key) {\n        var rafID = this.rafIDs.get(key);\n        if (rafID) {\n            cancelAnimationFrame(rafID);\n            this.rafIDs.delete(key);\n        }\n    };\n    /**\n     * Cancels all queued callback.\n     */\n    AnimationFrame.prototype.cancelAll = function () {\n        var _this = this;\n        // Need to use forEach because it's the only iteration method supported\n        // by IE11. Suppress the underscore because we don't need it.\n        // tslint:disable-next-line:enforce-name-casing\n        this.rafIDs.forEach(function (_, key) {\n            _this.cancel(key);\n        });\n    };\n    /**\n     * Returns the queue of unexecuted callback keys.\n     */\n    AnimationFrame.prototype.getQueue = function () {\n        var queue = [];\n        // Need to use forEach because it's the only iteration method supported\n        // by IE11. Suppress the underscore because we don't need it.\n        // tslint:disable-next-line:enforce-name-casing\n        this.rafIDs.forEach(function (_, key) {\n            queue.push(key);\n        });\n        return queue;\n    };\n    return AnimationFrame;\n}());\nexport { AnimationFrame };\n//# sourceMappingURL=animationframe.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssClasses = {\n    ANIMATE: 'mdc-drawer--animate',\n    CLOSING: 'mdc-drawer--closing',\n    DISMISSIBLE: 'mdc-drawer--dismissible',\n    MODAL: 'mdc-drawer--modal',\n    OPEN: 'mdc-drawer--open',\n    OPENING: 'mdc-drawer--opening',\n    ROOT: 'mdc-drawer',\n};\nvar strings = {\n    APP_CONTENT_SELECTOR: '.mdc-drawer-app-content',\n    CLOSE_EVENT: 'MDCDrawer:closed',\n    OPEN_EVENT: 'MDCDrawer:opened',\n    SCRIM_SELECTOR: '.mdc-drawer-scrim',\n    LIST_SELECTOR: '.mdc-list,.mdc-deprecated-list',\n    LIST_ITEM_ACTIVATED_SELECTOR: '.mdc-list-item--activated,.mdc-deprecated-list-item--activated',\n};\nexport { cssClasses, strings };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nexport function applyPassive(globalObj) {\n    if (globalObj === void 0) { globalObj = window; }\n    return supportsPassiveOption(globalObj) ?\n        { passive: true } :\n        false;\n}\nfunction supportsPassiveOption(globalObj) {\n    if (globalObj === void 0) { globalObj = window; }\n    // See\n    // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n    var passiveSupported = false;\n    try {\n        var options = {\n            // This function will be called when the browser\n            // attempts to access the passive property.\n            get passive() {\n                passiveSupported = true;\n                return false;\n            }\n        };\n        var handler = function () { };\n        globalObj.document.addEventListener('test', handler, options);\n        globalObj.document.removeEventListener('test', handler, options);\n    }\n    catch (err) {\n        passiveSupported = false;\n    }\n    return passiveSupported;\n}\n//# sourceMappingURL=events.js.map","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __awaiter, __extends, __generator } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, SortValue, strings } from './constants';\n/**\n * The Foundation of data table component containing pure business logic, any\n * logic requiring DOM manipulation are delegated to adapter methods.\n */\nvar MDCDataTableFoundation = /** @class */ (function (_super) {\n    __extends(MDCDataTableFoundation, _super);\n    function MDCDataTableFoundation(adapter) {\n        return _super.call(this, __assign(__assign({}, MDCDataTableFoundation.defaultAdapter), adapter)) || this;\n    }\n    Object.defineProperty(MDCDataTableFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                addClass: function () { return undefined; },\n                addClassAtRowIndex: function () { return undefined; },\n                getAttributeByHeaderCellIndex: function () { return ''; },\n                getHeaderCellCount: function () { return 0; },\n                getHeaderCellElements: function () { return []; },\n                getRowCount: function () { return 0; },\n                getRowElements: function () { return []; },\n                getRowIdAtIndex: function () { return ''; },\n                getRowIndexByChildElement: function () { return 0; },\n                getSelectedRowCount: function () { return 0; },\n                getTableContainerHeight: function () { return 0; },\n                getTableHeaderHeight: function () { return 0; },\n                isCheckboxAtRowIndexChecked: function () { return false; },\n                isHeaderRowCheckboxChecked: function () { return false; },\n                isRowsSelectable: function () { return false; },\n                notifyRowSelectionChanged: function () { return undefined; },\n                notifySelectedAll: function () { return undefined; },\n                notifySortAction: function () { return undefined; },\n                notifyUnselectedAll: function () { return undefined; },\n                registerHeaderRowCheckbox: function () { return undefined; },\n                registerRowCheckboxes: function () { return undefined; },\n                removeClass: function () { return undefined; },\n                removeClassAtRowIndex: function () { return undefined; },\n                removeClassNameByHeaderCellIndex: function () { return undefined; },\n                setAttributeAtRowIndex: function () { return undefined; },\n                setAttributeByHeaderCellIndex: function () { return undefined; },\n                setClassNameByHeaderCellIndex: function () { return undefined; },\n                setHeaderRowCheckboxChecked: function () { return undefined; },\n                setHeaderRowCheckboxIndeterminate: function () { return undefined; },\n                setProgressIndicatorStyles: function () { return undefined; },\n                setRowCheckboxCheckedAtIndex: function () { return undefined; },\n                setSortStatusLabelByHeaderCellIndex: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Re-initializes header row checkbox and row checkboxes when selectable rows are added or removed from table.\n     * Use this if registering checkbox is synchronous.\n     */\n    MDCDataTableFoundation.prototype.layout = function () {\n        if (this.adapter.isRowsSelectable()) {\n            this.adapter.registerHeaderRowCheckbox();\n            this.adapter.registerRowCheckboxes();\n            this.setHeaderRowCheckboxState();\n        }\n    };\n    /**\n     * Re-initializes header row checkbox and row checkboxes when selectable rows are added or removed from table.\n     * Use this if registering checkbox is asynchronous.\n     */\n    MDCDataTableFoundation.prototype.layoutAsync = function () {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        if (!this.adapter.isRowsSelectable()) return [3 /*break*/, 3];\n                        return [4 /*yield*/, this.adapter.registerHeaderRowCheckbox()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, this.adapter.registerRowCheckboxes()];\n                    case 2:\n                        _a.sent();\n                        this.setHeaderRowCheckboxState();\n                        _a.label = 3;\n                    case 3: return [2 /*return*/];\n                }\n            });\n        });\n    };\n    /**\n     * @return Returns array of row elements.\n     */\n    MDCDataTableFoundation.prototype.getRows = function () {\n        return this.adapter.getRowElements();\n    };\n    /**\n     * @return Array of header cell elements.\n     */\n    MDCDataTableFoundation.prototype.getHeaderCells = function () {\n        return this.adapter.getHeaderCellElements();\n    };\n    /**\n     * Sets selected row ids. Overwrites previously selected rows.\n     * @param rowIds Array of row ids that needs to be selected.\n     */\n    MDCDataTableFoundation.prototype.setSelectedRowIds = function (rowIds) {\n        for (var rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n            var rowId = this.adapter.getRowIdAtIndex(rowIndex);\n            var isSelected = false;\n            if (rowId && rowIds.indexOf(rowId) >= 0) {\n                isSelected = true;\n            }\n            this.adapter.setRowCheckboxCheckedAtIndex(rowIndex, isSelected);\n            this.selectRowAtIndex(rowIndex, isSelected);\n        }\n        this.setHeaderRowCheckboxState();\n    };\n    /**\n     * @return Returns array of all row ids.\n     */\n    MDCDataTableFoundation.prototype.getRowIds = function () {\n        var rowIds = [];\n        for (var rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n            rowIds.push(this.adapter.getRowIdAtIndex(rowIndex));\n        }\n        return rowIds;\n    };\n    /**\n     * @return Returns array of selected row ids.\n     */\n    MDCDataTableFoundation.prototype.getSelectedRowIds = function () {\n        var selectedRowIds = [];\n        for (var rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n            if (this.adapter.isCheckboxAtRowIndexChecked(rowIndex)) {\n                selectedRowIds.push(this.adapter.getRowIdAtIndex(rowIndex));\n            }\n        }\n        return selectedRowIds;\n    };\n    /**\n     * Handles header row checkbox change event.\n     */\n    MDCDataTableFoundation.prototype.handleHeaderRowCheckboxChange = function () {\n        var isHeaderChecked = this.adapter.isHeaderRowCheckboxChecked();\n        for (var rowIndex = 0; rowIndex < this.adapter.getRowCount(); rowIndex++) {\n            this.adapter.setRowCheckboxCheckedAtIndex(rowIndex, isHeaderChecked);\n            this.selectRowAtIndex(rowIndex, isHeaderChecked);\n        }\n        if (isHeaderChecked) {\n            this.adapter.notifySelectedAll();\n        }\n        else {\n            this.adapter.notifyUnselectedAll();\n        }\n    };\n    /**\n     * Handles change event originated from row checkboxes.\n     */\n    MDCDataTableFoundation.prototype.handleRowCheckboxChange = function (event) {\n        var rowIndex = this.adapter.getRowIndexByChildElement(event.target);\n        if (rowIndex === -1) {\n            return;\n        }\n        var selected = this.adapter.isCheckboxAtRowIndexChecked(rowIndex);\n        this.selectRowAtIndex(rowIndex, selected);\n        this.setHeaderRowCheckboxState();\n        var rowId = this.adapter.getRowIdAtIndex(rowIndex);\n        this.adapter.notifyRowSelectionChanged({ rowId: rowId, rowIndex: rowIndex, selected: selected });\n    };\n    /**\n     * Handles sort action on sortable header cell.\n     */\n    MDCDataTableFoundation.prototype.handleSortAction = function (eventData) {\n        var columnId = eventData.columnId, columnIndex = eventData.columnIndex, headerCell = eventData.headerCell;\n        // Reset sort attributes / classes on other header cells.\n        for (var index = 0; index < this.adapter.getHeaderCellCount(); index++) {\n            if (index === columnIndex) {\n                continue;\n            }\n            this.adapter.removeClassNameByHeaderCellIndex(index, cssClasses.HEADER_CELL_SORTED);\n            this.adapter.removeClassNameByHeaderCellIndex(index, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n            this.adapter.setAttributeByHeaderCellIndex(index, strings.ARIA_SORT, SortValue.NONE);\n            this.adapter.setSortStatusLabelByHeaderCellIndex(index, SortValue.NONE);\n        }\n        // Set appropriate sort attributes / classes on target header cell.\n        this.adapter.setClassNameByHeaderCellIndex(columnIndex, cssClasses.HEADER_CELL_SORTED);\n        var currentSortValue = this.adapter.getAttributeByHeaderCellIndex(columnIndex, strings.ARIA_SORT);\n        var sortValue = SortValue.NONE;\n        // Set to descending if sorted on ascending order.\n        if (currentSortValue === SortValue.ASCENDING) {\n            this.adapter.setClassNameByHeaderCellIndex(columnIndex, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n            this.adapter.setAttributeByHeaderCellIndex(columnIndex, strings.ARIA_SORT, SortValue.DESCENDING);\n            sortValue = SortValue.DESCENDING;\n            // Set to ascending if sorted on descending order.\n        }\n        else if (currentSortValue === SortValue.DESCENDING) {\n            this.adapter.removeClassNameByHeaderCellIndex(columnIndex, cssClasses.HEADER_CELL_SORTED_DESCENDING);\n            this.adapter.setAttributeByHeaderCellIndex(columnIndex, strings.ARIA_SORT, SortValue.ASCENDING);\n            sortValue = SortValue.ASCENDING;\n        }\n        else {\n            // Set to ascending by default when not sorted.\n            this.adapter.setAttributeByHeaderCellIndex(columnIndex, strings.ARIA_SORT, SortValue.ASCENDING);\n            sortValue = SortValue.ASCENDING;\n        }\n        this.adapter.setSortStatusLabelByHeaderCellIndex(columnIndex, sortValue);\n        this.adapter.notifySortAction({\n            columnId: columnId,\n            columnIndex: columnIndex,\n            headerCell: headerCell,\n            sortValue: sortValue,\n        });\n    };\n    /**\n     * Shows progress indicator blocking only the table body content when in\n     * loading state.\n     */\n    MDCDataTableFoundation.prototype.showProgress = function () {\n        var tableHeaderHeight = this.adapter.getTableHeaderHeight();\n        // Calculate the height of table content (Not scroll content) excluding\n        // header row height.\n        var height = this.adapter.getTableContainerHeight() - tableHeaderHeight;\n        var top = tableHeaderHeight;\n        this.adapter.setProgressIndicatorStyles({\n            height: height + \"px\",\n            top: top + \"px\",\n        });\n        this.adapter.addClass(cssClasses.IN_PROGRESS);\n    };\n    /**\n     * Hides progress indicator when data table is finished loading.\n     */\n    MDCDataTableFoundation.prototype.hideProgress = function () {\n        this.adapter.removeClass(cssClasses.IN_PROGRESS);\n    };\n    /**\n     * Updates header row checkbox state based on number of rows selected.\n     */\n    MDCDataTableFoundation.prototype.setHeaderRowCheckboxState = function () {\n        if (this.adapter.getSelectedRowCount() === 0) {\n            this.adapter.setHeaderRowCheckboxChecked(false);\n            this.adapter.setHeaderRowCheckboxIndeterminate(false);\n        }\n        else if (this.adapter.getSelectedRowCount() === this.adapter.getRowCount()) {\n            this.adapter.setHeaderRowCheckboxChecked(true);\n            this.adapter.setHeaderRowCheckboxIndeterminate(false);\n        }\n        else {\n            this.adapter.setHeaderRowCheckboxIndeterminate(true);\n            this.adapter.setHeaderRowCheckboxChecked(false);\n        }\n    };\n    /**\n     * Sets the attributes of row element based on selection state.\n     */\n    MDCDataTableFoundation.prototype.selectRowAtIndex = function (rowIndex, selected) {\n        if (selected) {\n            this.adapter.addClassAtRowIndex(rowIndex, cssClasses.ROW_SELECTED);\n            this.adapter.setAttributeAtRowIndex(rowIndex, strings.ARIA_SELECTED, 'true');\n        }\n        else {\n            this.adapter.removeClassAtRowIndex(rowIndex, cssClasses.ROW_SELECTED);\n            this.adapter.setAttributeAtRowIndex(rowIndex, strings.ARIA_SELECTED, 'false');\n        }\n    };\n    return MDCDataTableFoundation;\n}(MDCFoundation));\nexport { MDCDataTableFoundation };\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { isNavigationEvent, KEY, normalizeKey } from '@material/dom/keyboard';\nimport { Attributes, Events, FocusBehavior, InteractionTrigger } from './constants';\nvar triggerMap = new Map();\ntriggerMap.set(KEY.SPACEBAR, InteractionTrigger.SPACEBAR_KEY);\ntriggerMap.set(KEY.ENTER, InteractionTrigger.ENTER_KEY);\ntriggerMap.set(KEY.DELETE, InteractionTrigger.DELETE_KEY);\ntriggerMap.set(KEY.BACKSPACE, InteractionTrigger.BACKSPACE_KEY);\n/**\n * MDCChipActionFoundation provides a base abstract foundation for all chip\n * actions.\n */\nvar MDCChipActionFoundation = /** @class */ (function (_super) {\n    __extends(MDCChipActionFoundation, _super);\n    function MDCChipActionFoundation(adapter) {\n        return _super.call(this, __assign(__assign({}, MDCChipActionFoundation.defaultAdapter), adapter)) || this;\n    }\n    Object.defineProperty(MDCChipActionFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                emitEvent: function () { return undefined; },\n                focus: function () { return undefined; },\n                getAttribute: function () { return null; },\n                getElementID: function () { return ''; },\n                removeAttribute: function () { return undefined; },\n                setAttribute: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCChipActionFoundation.prototype.handleClick = function () {\n        // Early exit for cases where the click comes from a source other than the\n        // user's pointer (i.e. programmatic click from AT).\n        if (this.isDisabled())\n            return;\n        this.emitInteraction(InteractionTrigger.CLICK);\n    };\n    MDCChipActionFoundation.prototype.handleKeydown = function (event) {\n        var key = normalizeKey(event);\n        if (this.shouldNotifyInteractionFromKey(key)) {\n            event.preventDefault();\n            this.emitInteraction(this.getTriggerFromKey(key));\n            return;\n        }\n        if (isNavigationEvent(event)) {\n            event.preventDefault();\n            this.emitNavigation(key);\n            return;\n        }\n    };\n    MDCChipActionFoundation.prototype.setDisabled = function (isDisabled) {\n        // Use `aria-disabled` for the selectable (listbox) disabled state\n        if (this.isSelectable()) {\n            this.adapter.setAttribute(Attributes.ARIA_DISABLED, \"\" + isDisabled);\n            return;\n        }\n        if (isDisabled) {\n            this.adapter.setAttribute(Attributes.DISABLED, 'true');\n        }\n        else {\n            this.adapter.removeAttribute(Attributes.DISABLED);\n        }\n    };\n    MDCChipActionFoundation.prototype.isDisabled = function () {\n        if (this.adapter.getAttribute(Attributes.ARIA_DISABLED) === 'true') {\n            return true;\n        }\n        if (this.adapter.getAttribute(Attributes.DISABLED) !== null) {\n            return true;\n        }\n        return false;\n    };\n    MDCChipActionFoundation.prototype.setFocus = function (behavior) {\n        // Early exit if not focusable\n        if (!this.isFocusable()) {\n            return;\n        }\n        // Add it to the tab order and give focus\n        if (behavior === FocusBehavior.FOCUSABLE_AND_FOCUSED) {\n            this.adapter.setAttribute(Attributes.TAB_INDEX, '0');\n            this.adapter.focus();\n            return;\n        }\n        // Add to the tab order\n        if (behavior === FocusBehavior.FOCUSABLE) {\n            this.adapter.setAttribute(Attributes.TAB_INDEX, '0');\n            return;\n        }\n        // Remove it from the tab order\n        if (behavior === FocusBehavior.NOT_FOCUSABLE) {\n            this.adapter.setAttribute(Attributes.TAB_INDEX, '-1');\n            return;\n        }\n    };\n    MDCChipActionFoundation.prototype.isFocusable = function () {\n        if (this.isDisabled()) {\n            return false;\n        }\n        if (this.adapter.getAttribute(Attributes.ARIA_HIDDEN) === 'true') {\n            return false;\n        }\n        return true;\n    };\n    MDCChipActionFoundation.prototype.setSelected = function (isSelected) {\n        // Early exit if not selectable\n        if (!this.isSelectable()) {\n            return;\n        }\n        this.adapter.setAttribute(Attributes.ARIA_SELECTED, \"\" + isSelected);\n    };\n    MDCChipActionFoundation.prototype.isSelected = function () {\n        return this.adapter.getAttribute(Attributes.ARIA_SELECTED) === 'true';\n    };\n    MDCChipActionFoundation.prototype.emitInteraction = function (trigger) {\n        this.adapter.emitEvent(Events.INTERACTION, {\n            actionID: this.adapter.getElementID(),\n            source: this.actionType(),\n            trigger: trigger,\n        });\n    };\n    MDCChipActionFoundation.prototype.emitNavigation = function (key) {\n        this.adapter.emitEvent(Events.NAVIGATION, {\n            source: this.actionType(),\n            key: key,\n        });\n    };\n    MDCChipActionFoundation.prototype.shouldNotifyInteractionFromKey = function (key) {\n        var isFromActionKey = key === KEY.ENTER || key === KEY.SPACEBAR;\n        var isFromRemoveKey = key === KEY.BACKSPACE || key === KEY.DELETE;\n        if (isFromActionKey) {\n            return true;\n        }\n        if (isFromRemoveKey && this.shouldEmitInteractionOnRemoveKey()) {\n            return true;\n        }\n        return false;\n    };\n    MDCChipActionFoundation.prototype.getTriggerFromKey = function (key) {\n        var trigger = triggerMap.get(key);\n        if (trigger) {\n            return trigger;\n        }\n        // Default case, should ideally never be returned\n        return InteractionTrigger.UNSPECIFIED;\n    };\n    return MDCChipActionFoundation;\n}(MDCFoundation));\nexport { MDCChipActionFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCChipActionFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, strings } from './constants';\nvar MDCCircularProgressFoundation = /** @class */ (function (_super) {\n    __extends(MDCCircularProgressFoundation, _super);\n    function MDCCircularProgressFoundation(adapter) {\n        return _super.call(this, __assign(__assign({}, MDCCircularProgressFoundation.defaultAdapter), adapter)) || this;\n    }\n    Object.defineProperty(MDCCircularProgressFoundation, \"cssClasses\", {\n        get: function () {\n            return cssClasses;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCCircularProgressFoundation, \"strings\", {\n        get: function () {\n            return strings;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCCircularProgressFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                addClass: function () { return undefined; },\n                getDeterminateCircleAttribute: function () { return null; },\n                hasClass: function () { return false; },\n                removeClass: function () { return undefined; },\n                removeAttribute: function () { return undefined; },\n                setAttribute: function () { return undefined; },\n                setDeterminateCircleAttribute: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCCircularProgressFoundation.prototype.init = function () {\n        this.closed = this.adapter.hasClass(cssClasses.CLOSED_CLASS);\n        this.determinate = !this.adapter.hasClass(cssClasses.INDETERMINATE_CLASS);\n        this.progress = 0;\n        if (this.determinate) {\n            this.adapter.setAttribute(strings.ARIA_VALUENOW, this.progress.toString());\n        }\n        this.radius =\n            Number(this.adapter.getDeterminateCircleAttribute(strings.RADIUS));\n    };\n    /**\n     * Sets whether the progress indicator is in determinate mode.\n     * @param determinate Whether the indicator should be determinate.\n     */\n    MDCCircularProgressFoundation.prototype.setDeterminate = function (determinate) {\n        this.determinate = determinate;\n        if (this.determinate) {\n            this.adapter.removeClass(cssClasses.INDETERMINATE_CLASS);\n            this.setProgress(this.progress);\n        }\n        else {\n            this.adapter.addClass(cssClasses.INDETERMINATE_CLASS);\n            this.adapter.removeAttribute(strings.ARIA_VALUENOW);\n        }\n    };\n    MDCCircularProgressFoundation.prototype.isDeterminate = function () {\n        return this.determinate;\n    };\n    /**\n     * Sets the current progress value. In indeterminate mode, this has no\n     * visual effect but will be reflected if the indicator is switched to\n     * determinate mode.\n     * @param value The current progress value, which must be between 0 and 1.\n     */\n    MDCCircularProgressFoundation.prototype.setProgress = function (value) {\n        this.progress = value;\n        if (this.determinate) {\n            var unfilledArcLength = (1 - this.progress) * (2 * Math.PI * this.radius);\n            this.adapter.setDeterminateCircleAttribute(strings.STROKE_DASHOFFSET, \"\" + unfilledArcLength);\n            this.adapter.setAttribute(strings.ARIA_VALUENOW, this.progress.toString());\n        }\n    };\n    MDCCircularProgressFoundation.prototype.getProgress = function () {\n        return this.progress;\n    };\n    /**\n     * Shows the progress indicator.\n     */\n    MDCCircularProgressFoundation.prototype.open = function () {\n        this.closed = false;\n        this.adapter.removeClass(cssClasses.CLOSED_CLASS);\n        this.adapter.removeAttribute(strings.ARIA_HIDDEN);\n    };\n    /**\n     * Hides the progress indicator\n     */\n    MDCCircularProgressFoundation.prototype.close = function () {\n        this.closed = true;\n        this.adapter.addClass(cssClasses.CLOSED_CLASS);\n        this.adapter.setAttribute(strings.ARIA_HIDDEN, 'true');\n    };\n    /**\n     * @return Returns whether the progress indicator is hidden.\n     */\n    MDCCircularProgressFoundation.prototype.isClosed = function () {\n        return this.closed;\n    };\n    return MDCCircularProgressFoundation;\n}(MDCFoundation));\nexport { MDCCircularProgressFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCircularProgressFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { AnimationFrame } from '@material/animation/animationframe';\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar AnimationKeys;\n(function (AnimationKeys) {\n    AnimationKeys[\"POLL_SCROLL_POS\"] = \"poll_scroll_position\";\n    AnimationKeys[\"POLL_LAYOUT_CHANGE\"] = \"poll_layout_change\";\n})(AnimationKeys || (AnimationKeys = {}));\nvar MDCDialogFoundation = /** @class */ (function (_super) {\n    __extends(MDCDialogFoundation, _super);\n    function MDCDialogFoundation(adapter) {\n        var _this = _super.call(this, __assign(__assign({}, MDCDialogFoundation.defaultAdapter), adapter)) || this;\n        _this.dialogOpen = false;\n        _this.isFullscreen = false;\n        _this.animationFrame = 0;\n        _this.animationTimer = 0;\n        _this.escapeKeyAction = strings.CLOSE_ACTION;\n        _this.scrimClickAction = strings.CLOSE_ACTION;\n        _this.autoStackButtons = true;\n        _this.areButtonsStacked = false;\n        _this.suppressDefaultPressSelector = strings.SUPPRESS_DEFAULT_PRESS_SELECTOR;\n        _this.animFrame = new AnimationFrame();\n        _this.contentScrollHandler = function () {\n            _this.handleScrollEvent();\n        };\n        _this.windowResizeHandler = function () {\n            _this.layout();\n        };\n        _this.windowOrientationChangeHandler = function () {\n            _this.layout();\n        };\n        return _this;\n    }\n    Object.defineProperty(MDCDialogFoundation, \"cssClasses\", {\n        get: function () {\n            return cssClasses;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDialogFoundation, \"strings\", {\n        get: function () {\n            return strings;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDialogFoundation, \"numbers\", {\n        get: function () {\n            return numbers;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MDCDialogFoundation, \"defaultAdapter\", {\n        get: function () {\n            return {\n                addBodyClass: function () { return undefined; },\n                addClass: function () { return undefined; },\n                areButtonsStacked: function () { return false; },\n                clickDefaultButton: function () { return undefined; },\n                eventTargetMatches: function () { return false; },\n                getActionFromEvent: function () { return ''; },\n                getInitialFocusEl: function () { return null; },\n                hasClass: function () { return false; },\n                isContentScrollable: function () { return false; },\n                notifyClosed: function () { return undefined; },\n                notifyClosing: function () { return undefined; },\n                notifyOpened: function () { return undefined; },\n                notifyOpening: function () { return undefined; },\n                releaseFocus: function () { return undefined; },\n                removeBodyClass: function () { return undefined; },\n                removeClass: function () { return undefined; },\n                reverseButtons: function () { return undefined; },\n                trapFocus: function () { return undefined; },\n                registerContentEventHandler: function () { return undefined; },\n                deregisterContentEventHandler: function () { return undefined; },\n                isScrollableContentAtTop: function () { return false; },\n                isScrollableContentAtBottom: function () { return false; },\n                registerWindowEventHandler: function () { return undefined; },\n                deregisterWindowEventHandler: function () { return undefined; },\n            };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MDCDialogFoundation.prototype.init = function () {\n        if (this.adapter.hasClass(cssClasses.STACKED)) {\n            this.setAutoStackButtons(false);\n        }\n        this.isFullscreen = this.adapter.hasClass(cssClasses.FULLSCREEN);\n    };\n    MDCDialogFoundation.prototype.destroy = function () {\n        if (this.animationTimer) {\n            clearTimeout(this.animationTimer);\n            this.handleAnimationTimerEnd();\n        }\n        if (this.isFullscreen) {\n            this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n        }\n        this.animFrame.cancelAll();\n        this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n        this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n    };\n    MDCDialogFoundation.prototype.open = function (dialogOptions) {\n        var _this = this;\n        this.dialogOpen = true;\n        this.adapter.notifyOpening();\n        this.adapter.addClass(cssClasses.OPENING);\n        if (this.isFullscreen) {\n            // A scroll event listener is registered even if the dialog is not\n            // scrollable on open, since the window resize event, or orientation\n            // change may make the dialog scrollable after it is opened.\n            this.adapter.registerContentEventHandler('scroll', this.contentScrollHandler);\n        }\n        if (dialogOptions && dialogOptions.isAboveFullscreenDialog) {\n            this.adapter.addClass(cssClasses.SCRIM_HIDDEN);\n        }\n        this.adapter.registerWindowEventHandler('resize', this.windowResizeHandler);\n        this.adapter.registerWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n        // Wait a frame once display is no longer \"none\", to establish basis for\n        // animation\n        this.runNextAnimationFrame(function () {\n            _this.adapter.addClass(cssClasses.OPEN);\n            _this.adapter.addBodyClass(cssClasses.SCROLL_LOCK);\n            _this.layout();\n            _this.animationTimer = setTimeout(function () {\n                _this.handleAnimationTimerEnd();\n                _this.adapter.trapFocus(_this.adapter.getInitialFocusEl());\n                _this.adapter.notifyOpened();\n            }, numbers.DIALOG_ANIMATION_OPEN_TIME_MS);\n        });\n    };\n    MDCDialogFoundation.prototype.close = function (action) {\n        var _this = this;\n        if (action === void 0) { action = ''; }\n        if (!this.dialogOpen) {\n            // Avoid redundant close calls (and events), e.g. from keydown on elements\n            // that inherently emit click\n            return;\n        }\n        this.dialogOpen = false;\n        this.adapter.notifyClosing(action);\n        this.adapter.addClass(cssClasses.CLOSING);\n        this.adapter.removeClass(cssClasses.OPEN);\n        this.adapter.removeBodyClass(cssClasses.SCROLL_LOCK);\n        if (this.isFullscreen) {\n            this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n        }\n        this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n        this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n        cancelAnimationFrame(this.animationFrame);\n        this.animationFrame = 0;\n        clearTimeout(this.animationTimer);\n        this.animationTimer = setTimeout(function () {\n            _this.adapter.releaseFocus();\n            _this.handleAnimationTimerEnd();\n            _this.adapter.notifyClosed(action);\n        }, numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);\n    };\n    /**\n     * Used only in instances of showing a secondary dialog over a full-screen\n     * dialog. Shows the \"surface scrim\" displayed over the full-screen dialog.\n     */\n    MDCDialogFoundation.prototype.showSurfaceScrim = function () {\n        var _this = this;\n        this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWING);\n        this.runNextAnimationFrame(function () {\n            _this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWN);\n        });\n    };\n    /**\n     * Used only in instances of showing a secondary dialog over a full-screen\n     * dialog. Hides the \"surface scrim\" displayed over the full-screen dialog.\n     */\n    MDCDialogFoundation.prototype.hideSurfaceScrim = function () {\n        this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWN);\n        this.adapter.addClass(cssClasses.SURFACE_SCRIM_HIDING);\n    };\n    /**\n     * Handles `transitionend` event triggered when surface scrim animation is\n     * finished.\n     */\n    MDCDialogFoundation.prototype.handleSurfaceScrimTransitionEnd = function () {\n        this.adapter.removeClass(cssClasses.SURFACE_SCRIM_HIDING);\n        this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWING);\n    };\n    MDCDialogFoundation.prototype.isOpen = function () {\n        return this.dialogOpen;\n    };\n    MDCDialogFoundation.prototype.getEscapeKeyAction = function () {\n        return this.escapeKeyAction;\n    };\n    MDCDialogFoundation.prototype.setEscapeKeyAction = function (action) {\n        this.escapeKeyAction = action;\n    };\n    MDCDialogFoundation.prototype.getScrimClickAction = function () {\n        return this.scrimClickAction;\n    };\n    MDCDialogFoundation.prototype.setScrimClickAction = function (action) {\n        this.scrimClickAction = action;\n    };\n    MDCDialogFoundation.prototype.getAutoStackButtons = function () {\n        return this.autoStackButtons;\n    };\n    MDCDialogFoundation.prototype.setAutoStackButtons = function (autoStack) {\n        this.autoStackButtons = autoStack;\n    };\n    MDCDialogFoundation.prototype.getSuppressDefaultPressSelector = function () {\n        return this.suppressDefaultPressSelector;\n    };\n    MDCDialogFoundation.prototype.setSuppressDefaultPressSelector = function (selector) {\n        this.suppressDefaultPressSelector = selector;\n    };\n    MDCDialogFoundation.prototype.layout = function () {\n        var _this = this;\n        this.animFrame.request(AnimationKeys.POLL_LAYOUT_CHANGE, function () {\n            _this.layoutInternal();\n        });\n    };\n    /** Handles click on the dialog root element. */\n    MDCDialogFoundation.prototype.handleClick = function (evt) {\n        var isScrim = this.adapter.eventTargetMatches(evt.target, strings.SCRIM_SELECTOR);\n        // Check for scrim click first since it doesn't require querying ancestors.\n        if (isScrim && this.scrimClickAction !== '') {\n            this.close(this.scrimClickAction);\n        }\n        else {\n            var action = this.adapter.getActionFromEvent(evt);\n            if (action) {\n                this.close(action);\n            }\n        }\n    };\n    /** Handles keydown on the dialog root element. */\n    MDCDialogFoundation.prototype.handleKeydown = function (evt) {\n        var isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n        if (!isEnter) {\n            return;\n        }\n        var action = this.adapter.getActionFromEvent(evt);\n        if (action) {\n            // Action button callback is handled in `handleClick`,\n            // since space/enter keydowns on buttons trigger click events.\n            return;\n        }\n        // `composedPath` is used here, when available, to account for use cases\n        // where a target meant to suppress the default press behaviour\n        // may exist in a shadow root.\n        // For example, a textarea inside a web component:\n        // <mwc-dialog>\n        //   <horizontal-layout>\n        //     #shadow-root (open)\n        //       <mwc-textarea>\n        //         #shadow-root (open)\n        //           <textarea></textarea>\n        //       </mwc-textarea>\n        //   </horizontal-layout>\n        // </mwc-dialog>\n        var target = evt.composedPath ? evt.composedPath()[0] : evt.target;\n        var isDefault = this.suppressDefaultPressSelector ?\n            !this.adapter.eventTargetMatches(target, this.suppressDefaultPressSelector) :\n            true;\n        if (isEnter && isDefault) {\n            this.adapter.clickDefaultButton();\n        }\n    };\n    /** Handles keydown on the document. */\n    MDCDialogFoundation.prototype.handleDocumentKeydown = function (evt) {\n        var isEscape = evt.key === 'Escape' || evt.keyCode === 27;\n        if (isEscape && this.escapeKeyAction !== '') {\n            this.close(this.escapeKeyAction);\n        }\n    };\n    /**\n     * Handles scroll event on the dialog's content element -- showing a scroll\n     * divider on the header or footer based on the scroll position. This handler\n     * should only be registered on full-screen dialogs with scrollable content.\n     */\n    MDCDialogFoundation.prototype.handleScrollEvent = function () {\n        var _this = this;\n        // Since scroll events can fire at a high rate, we throttle these events by\n        // using requestAnimationFrame.\n        this.animFrame.request(AnimationKeys.POLL_SCROLL_POS, function () {\n            _this.toggleScrollDividerHeader();\n            _this.toggleScrollDividerFooter();\n        });\n    };\n    MDCDialogFoundation.prototype.layoutInternal = function () {\n        if (this.autoStackButtons) {\n            this.detectStackedButtons();\n        }\n        this.toggleScrollableClasses();\n    };\n    MDCDialogFoundation.prototype.handleAnimationTimerEnd = function () {\n        this.animationTimer = 0;\n        this.adapter.removeClass(cssClasses.OPENING);\n        this.adapter.removeClass(cssClasses.CLOSING);\n    };\n    /**\n     * Runs the given logic on the next animation frame, using setTimeout to\n     * factor in Firefox reflow behavior.\n     */\n    MDCDialogFoundation.prototype.runNextAnimationFrame = function (callback) {\n        var _this = this;\n        cancelAnimationFrame(this.animationFrame);\n        this.animationFrame = requestAnimationFrame(function () {\n            _this.animationFrame = 0;\n            clearTimeout(_this.animationTimer);\n            _this.animationTimer = setTimeout(callback, 0);\n        });\n    };\n    MDCDialogFoundation.prototype.detectStackedButtons = function () {\n        // Remove the class first to let us measure the buttons' natural positions.\n        this.adapter.removeClass(cssClasses.STACKED);\n        var areButtonsStacked = this.adapter.areButtonsStacked();\n        if (areButtonsStacked) {\n            this.adapter.addClass(cssClasses.STACKED);\n        }\n        if (areButtonsStacked !== this.areButtonsStacked) {\n            this.adapter.reverseButtons();\n            this.areButtonsStacked = areButtonsStacked;\n        }\n    };\n    MDCDialogFoundation.prototype.toggleScrollableClasses = function () {\n        // Remove the class first to let us measure the natural height of the\n        // content.\n        this.adapter.removeClass(cssClasses.SCROLLABLE);\n        if (this.adapter.isContentScrollable()) {\n            this.adapter.addClass(cssClasses.SCROLLABLE);\n            if (this.isFullscreen) {\n                // If dialog is full-screen and scrollable, check if a scroll divider\n                // should be shown.\n                this.toggleScrollDividerHeader();\n                this.toggleScrollDividerFooter();\n            }\n        }\n    };\n    MDCDialogFoundation.prototype.toggleScrollDividerHeader = function () {\n        if (!this.adapter.isScrollableContentAtTop()) {\n            this.adapter.addClass(cssClasses.SCROLL_DIVIDER_HEADER);\n        }\n        else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_HEADER)) {\n            this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_HEADER);\n        }\n    };\n    MDCDialogFoundation.prototype.toggleScrollDividerFooter = function () {\n        if (!this.adapter.isScrollableContentAtBottom()) {\n            this.adapter.addClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n        }\n        else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_FOOTER)) {\n            this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n        }\n    };\n    return MDCDialogFoundation;\n}(MDCFoundation));\nexport { MDCDialogFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDialogFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCDismissibleDrawerFoundation } from '../dismissible/foundation';\n/* istanbul ignore next: subclass is not a branch statement */\nvar MDCModalDrawerFoundation = /** @class */ (function (_super) {\n    __extends(MDCModalDrawerFoundation, _super);\n    function MDCModalDrawerFoundation() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * Handles click event on scrim.\n     */\n    MDCModalDrawerFoundation.prototype.handleScrimClick = function () {\n        this.close();\n    };\n    /**\n     * Called when drawer finishes open animation.\n     */\n    MDCModalDrawerFoundation.prototype.opened = function () {\n        this.adapter.trapFocus();\n    };\n    /**\n     * Called when drawer finishes close animation.\n     */\n    MDCModalDrawerFoundation.prototype.closed = function () {\n        this.adapter.releaseFocus();\n    };\n    return MDCModalDrawerFoundation;\n}(MDCDismissibleDrawerFoundation));\nexport { MDCModalDrawerFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCModalDrawerFoundation;\n//# sourceMappingURL=foundation.js.map"],"sourceRoot":""}