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YAAW,WAEPU,EAAOK,aAAa,YAAaH,GAEjCD,EAAQM,gBAAgBxC,GAExBkC,EAAQhD,YAAcC,CAC1B,GAAGsB,GACP","sources":["webpack://ch.enlightware.gamecreator/./node_modules/@material/snackbar/component.js","webpack://ch.enlightware.gamecreator/./node_modules/@material/snackbar/constants.js","webpack://ch.enlightware.gamecreator/./node_modules/@material/snackbar/foundation.js","webpack://ch.enlightware.gamecreator/./node_modules/@material/snackbar/util.js"],"sourcesContent":["/**\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 * as tslib_1 from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { closest } from '@material/dom/ponyfill';\nimport { strings } from './constants';\nimport { MDCSnackbarFoundation } from './foundation';\nimport * as util from './util';\nvar SURFACE_SELECTOR = strings.SURFACE_SELECTOR, LABEL_SELECTOR = strings.LABEL_SELECTOR, ACTION_SELECTOR = strings.ACTION_SELECTOR, DISMISS_SELECTOR = strings.DISMISS_SELECTOR, OPENING_EVENT = strings.OPENING_EVENT, OPENED_EVENT = strings.OPENED_EVENT, CLOSING_EVENT = strings.CLOSING_EVENT, CLOSED_EVENT = strings.CLOSED_EVENT;\nvar MDCSnackbar = /** @class */ (function (_super) {\n tslib_1.__extends(MDCSnackbar, _super);\n function MDCSnackbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCSnackbar.attachTo = function (root) {\n return new MDCSnackbar(root);\n };\n MDCSnackbar.prototype.initialize = function (announcerFactory) {\n if (announcerFactory === void 0) { announcerFactory = function () { return util.announce; }; }\n this.announce_ = announcerFactory();\n };\n MDCSnackbar.prototype.initialSyncWithDOM = function () {\n var _this = this;\n this.surfaceEl_ = this.root_.querySelector(SURFACE_SELECTOR);\n this.labelEl_ = this.root_.querySelector(LABEL_SELECTOR);\n this.actionEl_ = this.root_.querySelector(ACTION_SELECTOR);\n this.handleKeyDown_ = function (evt) { return _this.foundation_.handleKeyDown(evt); };\n this.handleSurfaceClick_ = function (evt) {\n var target = evt.target;\n if (_this.isActionButton_(target)) {\n _this.foundation_.handleActionButtonClick(evt);\n }\n else if (_this.isActionIcon_(target)) {\n _this.foundation_.handleActionIconClick(evt);\n }\n };\n this.registerKeyDownHandler_(this.handleKeyDown_);\n this.registerSurfaceClickHandler_(this.handleSurfaceClick_);\n };\n MDCSnackbar.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.deregisterKeyDownHandler_(this.handleKeyDown_);\n this.deregisterSurfaceClickHandler_(this.handleSurfaceClick_);\n };\n MDCSnackbar.prototype.open = function () {\n this.foundation_.open();\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbar.prototype.close = function (reason) {\n if (reason === void 0) { reason = ''; }\n this.foundation_.close(reason);\n };\n MDCSnackbar.prototype.getDefaultFoundation = function () {\n var _this = this;\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n var adapter = {\n addClass: function (className) { return _this.root_.classList.add(className); },\n announce: function () { return _this.announce_(_this.labelEl_); },\n notifyClosed: function (reason) { return _this.emit(CLOSED_EVENT, reason ? { reason: reason } : {}); },\n notifyClosing: function (reason) { return _this.emit(CLOSING_EVENT, reason ? { reason: reason } : {}); },\n notifyOpened: function () { return _this.emit(OPENED_EVENT, {}); },\n notifyOpening: function () { return _this.emit(OPENING_EVENT, {}); },\n removeClass: function (className) { return _this.root_.classList.remove(className); },\n };\n return new MDCSnackbarFoundation(adapter);\n };\n Object.defineProperty(MDCSnackbar.prototype, \"timeoutMs\", {\n get: function () {\n return this.foundation_.getTimeoutMs();\n },\n set: function (timeoutMs) {\n this.foundation_.setTimeoutMs(timeoutMs);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"closeOnEscape\", {\n get: function () {\n return this.foundation_.getCloseOnEscape();\n },\n set: function (closeOnEscape) {\n this.foundation_.setCloseOnEscape(closeOnEscape);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"isOpen\", {\n get: function () {\n return this.foundation_.isOpen();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"labelText\", {\n get: function () {\n // This property only returns null if the node is a document, DOCTYPE, or notation.\n // On Element nodes, it always returns a string.\n return this.labelEl_.textContent;\n },\n set: function (labelText) {\n this.labelEl_.textContent = labelText;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"actionButtonText\", {\n get: function () {\n return this.actionEl_.textContent;\n },\n set: function (actionButtonText) {\n this.actionEl_.textContent = actionButtonText;\n },\n enumerable: true,\n configurable: true\n });\n MDCSnackbar.prototype.registerKeyDownHandler_ = function (handler) {\n this.listen('keydown', handler);\n };\n MDCSnackbar.prototype.deregisterKeyDownHandler_ = function (handler) {\n this.unlisten('keydown', handler);\n };\n MDCSnackbar.prototype.registerSurfaceClickHandler_ = function (handler) {\n this.surfaceEl_.addEventListener('click', handler);\n };\n MDCSnackbar.prototype.deregisterSurfaceClickHandler_ = function (handler) {\n this.surfaceEl_.removeEventListener('click', handler);\n };\n MDCSnackbar.prototype.isActionButton_ = function (target) {\n return Boolean(closest(target, ACTION_SELECTOR));\n };\n MDCSnackbar.prototype.isActionIcon_ = function (target) {\n return Boolean(closest(target, DISMISS_SELECTOR));\n };\n return MDCSnackbar;\n}(MDCComponent));\nexport { MDCSnackbar };\n//# sourceMappingURL=component.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 */\nvar cssClasses = {\n CLOSING: 'mdc-snackbar--closing',\n OPEN: 'mdc-snackbar--open',\n OPENING: 'mdc-snackbar--opening',\n};\nvar strings = {\n ACTION_SELECTOR: '.mdc-snackbar__action',\n ARIA_LIVE_LABEL_TEXT_ATTR: 'data-mdc-snackbar-label-text',\n CLOSED_EVENT: 'MDCSnackbar:closed',\n CLOSING_EVENT: 'MDCSnackbar:closing',\n DISMISS_SELECTOR: '.mdc-snackbar__dismiss',\n LABEL_SELECTOR: '.mdc-snackbar__label',\n OPENED_EVENT: 'MDCSnackbar:opened',\n OPENING_EVENT: 'MDCSnackbar:opening',\n REASON_ACTION: 'action',\n REASON_DISMISS: 'dismiss',\n SURFACE_SELECTOR: '.mdc-snackbar__surface',\n};\nvar numbers = {\n DEFAULT_AUTO_DISMISS_TIMEOUT_MS: 5000,\n MAX_AUTO_DISMISS_TIMEOUT_MS: 10000,\n MIN_AUTO_DISMISS_TIMEOUT_MS: 4000,\n // These variables need to be kept in sync with the values in _variables.scss.\n SNACKBAR_ANIMATION_CLOSE_TIME_MS: 75,\n SNACKBAR_ANIMATION_OPEN_TIME_MS: 150,\n /**\n * Number of milliseconds to wait between temporarily clearing the label text\n * in the DOM and subsequently restoring it. This is necessary to force IE 11\n * to pick up the `aria-live` content change and announce it to the user.\n */\n ARIA_LIVE_DELAY_MS: 1000,\n};\nexport { cssClasses, strings, numbers };\n//# sourceMappingURL=constants.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 * as tslib_1 from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar OPENING = cssClasses.OPENING, OPEN = cssClasses.OPEN, CLOSING = cssClasses.CLOSING;\nvar REASON_ACTION = strings.REASON_ACTION, REASON_DISMISS = strings.REASON_DISMISS;\nvar MDCSnackbarFoundation = /** @class */ (function (_super) {\n tslib_1.__extends(MDCSnackbarFoundation, _super);\n function MDCSnackbarFoundation(adapter) {\n var _this = _super.call(this, tslib_1.__assign({}, MDCSnackbarFoundation.defaultAdapter, adapter)) || this;\n _this.isOpen_ = false;\n _this.animationFrame_ = 0;\n _this.animationTimer_ = 0;\n _this.autoDismissTimer_ = 0;\n _this.autoDismissTimeoutMs_ = numbers.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;\n _this.closeOnEscape_ = true;\n return _this;\n }\n Object.defineProperty(MDCSnackbarFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n announce: function () { return undefined; },\n notifyClosed: function () { return undefined; },\n notifyClosing: function () { return undefined; },\n notifyOpened: function () { return undefined; },\n notifyOpening: function () { return undefined; },\n removeClass: function () { return undefined; },\n };\n },\n enumerable: true,\n configurable: true\n });\n MDCSnackbarFoundation.prototype.destroy = function () {\n this.clearAutoDismissTimer_();\n cancelAnimationFrame(this.animationFrame_);\n this.animationFrame_ = 0;\n clearTimeout(this.animationTimer_);\n this.animationTimer_ = 0;\n this.adapter_.removeClass(OPENING);\n this.adapter_.removeClass(OPEN);\n this.adapter_.removeClass(CLOSING);\n };\n MDCSnackbarFoundation.prototype.open = function () {\n var _this = this;\n this.clearAutoDismissTimer_();\n this.isOpen_ = true;\n this.adapter_.notifyOpening();\n this.adapter_.removeClass(CLOSING);\n this.adapter_.addClass(OPENING);\n this.adapter_.announce();\n // Wait a frame once display is no longer \"none\", to establish basis for animation\n this.runNextAnimationFrame_(function () {\n _this.adapter_.addClass(OPEN);\n _this.animationTimer_ = setTimeout(function () {\n _this.handleAnimationTimerEnd_();\n _this.adapter_.notifyOpened();\n _this.autoDismissTimer_ = setTimeout(function () {\n _this.close(REASON_DISMISS);\n }, _this.getTimeoutMs());\n }, numbers.SNACKBAR_ANIMATION_OPEN_TIME_MS);\n });\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbarFoundation.prototype.close = function (reason) {\n var _this = this;\n if (reason === void 0) { reason = ''; }\n if (!this.isOpen_) {\n // Avoid redundant close calls (and events), e.g. repeated interactions as the snackbar is animating closed\n return;\n }\n cancelAnimationFrame(this.animationFrame_);\n this.animationFrame_ = 0;\n this.clearAutoDismissTimer_();\n this.isOpen_ = false;\n this.adapter_.notifyClosing(reason);\n this.adapter_.addClass(cssClasses.CLOSING);\n this.adapter_.removeClass(cssClasses.OPEN);\n this.adapter_.removeClass(cssClasses.OPENING);\n clearTimeout(this.animationTimer_);\n this.animationTimer_ = setTimeout(function () {\n _this.handleAnimationTimerEnd_();\n _this.adapter_.notifyClosed(reason);\n }, numbers.SNACKBAR_ANIMATION_CLOSE_TIME_MS);\n };\n MDCSnackbarFoundation.prototype.isOpen = function () {\n return this.isOpen_;\n };\n MDCSnackbarFoundation.prototype.getTimeoutMs = function () {\n return this.autoDismissTimeoutMs_;\n };\n MDCSnackbarFoundation.prototype.setTimeoutMs = function (timeoutMs) {\n // Use shorter variable names to make the code more readable\n var minValue = numbers.MIN_AUTO_DISMISS_TIMEOUT_MS;\n var maxValue = numbers.MAX_AUTO_DISMISS_TIMEOUT_MS;\n if (timeoutMs <= maxValue && timeoutMs >= minValue) {\n this.autoDismissTimeoutMs_ = timeoutMs;\n }\n else {\n throw new Error(\"timeoutMs must be an integer in the range \" + minValue + \"\\u2013\" + maxValue + \", but got '\" + timeoutMs + \"'\");\n }\n };\n MDCSnackbarFoundation.prototype.getCloseOnEscape = function () {\n return this.closeOnEscape_;\n };\n MDCSnackbarFoundation.prototype.setCloseOnEscape = function (closeOnEscape) {\n this.closeOnEscape_ = closeOnEscape;\n };\n MDCSnackbarFoundation.prototype.handleKeyDown = function (evt) {\n var isEscapeKey = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscapeKey && this.getCloseOnEscape()) {\n this.close(REASON_DISMISS);\n }\n };\n MDCSnackbarFoundation.prototype.handleActionButtonClick = function (_evt) {\n this.close(REASON_ACTION);\n };\n MDCSnackbarFoundation.prototype.handleActionIconClick = function (_evt) {\n this.close(REASON_DISMISS);\n };\n MDCSnackbarFoundation.prototype.clearAutoDismissTimer_ = function () {\n clearTimeout(this.autoDismissTimer_);\n this.autoDismissTimer_ = 0;\n };\n MDCSnackbarFoundation.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 factor in Firefox reflow behavior.\n */\n MDCSnackbarFoundation.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 return MDCSnackbarFoundation;\n}(MDCFoundation));\nexport { MDCSnackbarFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCSnackbarFoundation;\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 { numbers, strings } from './constants';\nvar ARIA_LIVE_DELAY_MS = numbers.ARIA_LIVE_DELAY_MS;\nvar ARIA_LIVE_LABEL_TEXT_ATTR = strings.ARIA_LIVE_LABEL_TEXT_ATTR;\nfunction announce(ariaEl, labelEl) {\n if (labelEl === void 0) { labelEl = ariaEl; }\n var priority = ariaEl.getAttribute('aria-live');\n // Trim text to ignore ` ` (see below).\n // textContent is only null if the node is a document, DOCTYPE, or notation.\n var labelText = labelEl.textContent.trim();\n if (!labelText || !priority) {\n return;\n }\n // Temporarily disable `aria-live` to prevent JAWS+Firefox from announcing the message twice.\n ariaEl.setAttribute('aria-live', 'off');\n // Temporarily clear `textContent` to force a DOM mutation event that will be detected by screen readers.\n // `aria-live` elements are only announced when the element's `textContent` *changes*, so snackbars\n // sent to the browser in the initial HTML response won't be read unless we clear the element's `textContent` first.\n // Similarly, displaying the same snackbar message twice in a row doesn't trigger a DOM mutation event,\n // so screen readers won't announce the second message unless we first clear `textContent`.\n //\n // We have to clear the label text two different ways to make it work in all browsers and screen readers:\n //\n // 1. `textContent = ''` is required for IE11 + JAWS\n // 2. `innerHTML = ' '` is required for Chrome + JAWS and NVDA\n //\n // All other browser/screen reader combinations support both methods.\n //\n // The wrapper `` visually hides the space character so that it doesn't cause jank when added/removed.\n // N.B.: Setting `position: absolute`, `opacity: 0`, or `height: 0` prevents Chrome from detecting the DOM change.\n //\n // This technique has been tested in:\n //\n // * JAWS 2019:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * NVDA 2018:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * ChromeVox 53\n labelEl.textContent = '';\n labelEl.innerHTML = ' ';\n // Prevent visual jank by temporarily displaying the label text in the ::before pseudo-element.\n // CSS generated content is normally announced by screen readers\n // (except in IE 11; see https://tink.uk/accessibility-support-for-css-generated-content/);\n // however, `aria-live` is turned off, so this DOM update will be ignored by screen readers.\n labelEl.setAttribute(ARIA_LIVE_LABEL_TEXT_ATTR, labelText);\n setTimeout(function () {\n // Allow screen readers to announce changes to the DOM again.\n ariaEl.setAttribute('aria-live', priority);\n // Remove the message from the ::before pseudo-element.\n labelEl.removeAttribute(ARIA_LIVE_LABEL_TEXT_ATTR);\n // Restore the original label text, which will be announced by screen readers.\n labelEl.textContent = labelText;\n }, ARIA_LIVE_DELAY_MS);\n}\nexport { announce };\n//# sourceMappingURL=util.js.map"],"names":["SURFACE_SELECTOR","LABEL_SELECTOR","ACTION_SELECTOR","DISMISS_SELECTOR","OPENING_EVENT","OPENED_EVENT","CLOSING_EVENT","CLOSED_EVENT","MDCSnackbar","_super","apply","this","arguments","attachTo","root","prototype","initialize","announcerFactory","announce_","initialSyncWithDOM","_this","surfaceEl_","root_","querySelector","labelEl_","actionEl_","handleKeyDown_","evt","foundation_","handleKeyDown","handleSurfaceClick_","target","isActionButton_","handleActionButtonClick","isActionIcon_","handleActionIconClick","registerKeyDownHandler_","registerSurfaceClickHandler_","destroy","call","deregisterKeyDownHandler_","deregisterSurfaceClickHandler_","open","close","reason","getDefaultFoundation","adapter","addClass","className","classList","add","announce","notifyClosed","emit","notifyClosing","notifyOpened","notifyOpening","removeClass","remove","Object","defineProperty","get","getTimeoutMs","set","timeoutMs","setTimeoutMs","enumerable","configurable","getCloseOnEscape","closeOnEscape","setCloseOnEscape","isOpen","textContent","labelText","actionButtonText","handler","listen","unlisten","addEventListener","removeEventListener","Boolean","cssClasses","CLOSING","OPEN","OPENING","strings","ARIA_LIVE_LABEL_TEXT_ATTR","REASON_ACTION","REASON_DISMISS","numbers","DEFAULT_AUTO_DISMISS_TIMEOUT_MS","MAX_AUTO_DISMISS_TIMEOUT_MS","MIN_AUTO_DISMISS_TIMEOUT_MS","SNACKBAR_ANIMATION_CLOSE_TIME_MS","SNACKBAR_ANIMATION_OPEN_TIME_MS","ARIA_LIVE_DELAY_MS","MDCSnackbarFoundation","defaultAdapter","isOpen_","animationFrame_","animationTimer_","autoDismissTimer_","autoDismissTimeoutMs_","closeOnEscape_","clearAutoDismissTimer_","cancelAnimationFrame","clearTimeout","adapter_","runNextAnimationFrame_","setTimeout","handleAnimationTimerEnd_","minValue","maxValue","Error","key","keyCode","_evt","callback","requestAnimationFrame","ariaEl","labelEl","priority","getAttribute","trim","setAttribute","innerHTML","removeAttribute"],"sourceRoot":""}