text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.snackbar=e():(t.mdc=t.mdc||{},t.mdc.snackbar=e())}(this,function(){return o={},i.m=n={0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=(Object.defineProperty(i,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),i.prototype.init=function(){},i.prototype.destroy=function(){},i);function i(t){void 0===t&&(t={}),this.adapter_=t}e.MDCFoundation=o,e.default=o},1:function(t,e,n){"use strict";var o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=r.next()).done;)s.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),s=(a.attachTo=function(t){return new a(t,new r.MDCFoundation({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation_.destroy()},a.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},a.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},a.prototype.emit=function(t,e,n){var o;void 0===n&&(n=!1),"function"==typeof CustomEvent?o=new CustomEvent(t,{bubbles:n,detail:e}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(o)},a);function a(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root_=t,this.initialize.apply(this,i(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}e.MDCComponent=s,e.default=s},149:function(t,n,e){"use strict";function o(t){for(var e in t)n.hasOwnProperty(e)||(n[e]=t[e])}var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var r=i(e(89));n.util=r,o(e(150)),o(e(39)),o(e(90))},150:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s,a=n(1),u=n(2),c=n(39),l=n(90),f=r(n(89)),_=c.strings.SURFACE_SELECTOR,p=c.strings.LABEL_SELECTOR,d=c.strings.ACTION_SELECTOR,m=c.strings.DISMISS_SELECTOR,h=c.strings.OPENING_EVENT,y=c.strings.OPENED_EVENT,E=c.strings.CLOSING_EVENT,b=c.strings.CLOSED_EVENT,O=(s=a.MDCComponent,i(T,s),T.attachTo=function(t){return new T(t)},T.prototype.initialize=function(t){void 0===t&&(t=function(){return f.announce}),this.announce_=t()},T.prototype.initialSyncWithDOM=function(){var n=this;this.surfaceEl_=this.root_.querySelector(_),this.labelEl_=this.root_.querySelector(p),this.actionEl_=this.root_.querySelector(d),this.handleKeyDown_=function(t){return n.foundation_.handleKeyDown(t)},this.handleSurfaceClick_=function(t){var e=t.target;n.isActionButton_(e)?n.foundation_.handleActionButtonClick(t):n.isActionIcon_(e)&&n.foundation_.handleActionIconClick(t)},this.registerKeyDownHandler_(this.handleKeyDown_),this.registerSurfaceClickHandler_(this.handleSurfaceClick_)},T.prototype.destroy=function(){s.prototype.destroy.call(this),this.deregisterKeyDownHandler_(this.handleKeyDown_),this.deregisterSurfaceClickHandler_(this.handleSurfaceClick_)},T.prototype.open=function(){this.foundation_.open()},T.prototype.close=function(t){void 0===t&&(t=""),this.foundation_.close(t)},T.prototype.getDefaultFoundation=function(){var e=this,t={addClass:function(t){return e.root_.classList.add(t)},announce:function(){return e.announce_(e.labelEl_)},notifyClosed:function(t){return e.emit(b,t?{reason:t}:{})},notifyClosing:function(t){return e.emit(E,t?{reason:t}:{})},notifyOpened:function(){return e.emit(y,{})},notifyOpening:function(){return e.emit(h,{})},removeClass:function(t){return e.root_.classList.remove(t)}};return new l.MDCSnackbarFoundation(t)},Object.defineProperty(T.prototype,"timeoutMs",{get:function(){return this.foundation_.getTimeoutMs()},set:function(t){this.foundation_.setTimeoutMs(t)},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"closeOnEscape",{get:function(){return this.foundation_.getCloseOnEscape()},set:function(t){this.foundation_.setCloseOnEscape(t)},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"isOpen",{get:function(){return this.foundation_.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"labelText",{get:function(){return this.labelEl_.textContent},set:function(t){this.labelEl_.textContent=t},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"actionButtonText",{get:function(){return this.actionEl_.textContent},set:function(t){this.actionEl_.textContent=t},enumerable:!0,configurable:!0}),T.prototype.registerKeyDownHandler_=function(t){this.listen("keydown",t)},T.prototype.deregisterKeyDownHandler_=function(t){this.unlisten("keydown",t)},T.prototype.registerSurfaceClickHandler_=function(t){this.surfaceEl_.addEventListener("click",t)},T.prototype.deregisterSurfaceClickHandler_=function(t){this.surfaceEl_.removeEventListener("click",t)},T.prototype.isActionButton_=function(t){return Boolean(u.closest(t,d))},T.prototype.isActionIcon_=function(t){return Boolean(u.closest(t,m))},T);function T(){return null!==s&&s.apply(this,arguments)||this}e.MDCSnackbar=O},2:function(t,e,n){"use strict";function o(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.closest=function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(o(n,e))return n;n=n.parentElement}return null},e.matches=o},39:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.cssClasses={CLOSING:"mdc-snackbar--closing",OPEN:"mdc-snackbar--open",OPENING:"mdc-snackbar--opening"};e.strings={ACTION_SELECTOR:".mdc-snackbar__action",ARIA_LIVE_LABEL_TEXT_ATTR:"data-mdc-snackbar-label-text",CLOSED_EVENT:"MDCSnackbar:closed",CLOSING_EVENT:"MDCSnackbar:closing",DISMISS_SELECTOR:".mdc-snackbar__dismiss",LABEL_SELECTOR:".mdc-snackbar__label",OPENED_EVENT:"MDCSnackbar:opened",OPENING_EVENT:"MDCSnackbar:opening",REASON_ACTION:"action",REASON_DISMISS:"dismiss",SURFACE_SELECTOR:".mdc-snackbar__surface"};e.numbers={DEFAULT_AUTO_DISMISS_TIMEOUT_MS:5e3,INDETERMINATE:-1,MAX_AUTO_DISMISS_TIMEOUT_MS:1e4,MIN_AUTO_DISMISS_TIMEOUT_MS:4e3,SNACKBAR_ANIMATION_CLOSE_TIME_MS:75,SNACKBAR_ANIMATION_OPEN_TIME_MS:150,ARIA_LIVE_DELAY_MS:1e3}},89:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(39),i=o.numbers.ARIA_LIVE_DELAY_MS,r=o.strings.ARIA_LIVE_LABEL_TEXT_ATTR;e.announce=function(t,e){void 0===e&&(e=t);var n=t.getAttribute("aria-live"),o=e.textContent.trim();o&&n&&(t.setAttribute("aria-live","off"),e.textContent="",e.innerHTML='<span style="display: inline-block; width: 0; height: 1px;">&nbsp;</span>',e.setAttribute(r,o),setTimeout(function(){t.setAttribute("aria-live",n),e.removeAttribute(r),e.textContent=o},i))}},90:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s,a=n(0),u=n(39),c=u.cssClasses.OPENING,l=u.cssClasses.OPEN,f=u.cssClasses.CLOSING,_=u.strings.REASON_ACTION,p=u.strings.REASON_DISMISS,d=(s=a.MDCFoundation,i(m,s),Object.defineProperty(m,"cssClasses",{get:function(){return u.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(m,"strings",{get:function(){return u.strings},enumerable:!0,configurable:!0}),Object.defineProperty(m,"numbers",{get:function(){return u.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(m,"defaultAdapter",{get:function(){return{addClass:function(){},announce:function(){},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},removeClass:function(){}}},enumerable:!0,configurable:!0}),m.prototype.destroy=function(){this.clearAutoDismissTimer_(),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=0,this.adapter_.removeClass(c),this.adapter_.removeClass(l),this.adapter_.removeClass(f)},m.prototype.open=function(){var e=this;this.clearAutoDismissTimer_(),this.isOpen_=!0,this.adapter_.notifyOpening(),this.adapter_.removeClass(f),this.adapter_.addClass(c),this.adapter_.announce(),this.runNextAnimationFrame_(function(){e.adapter_.addClass(l),e.animationTimer_=setTimeout(function(){var t=e.getTimeoutMs();e.handleAnimationTimerEnd_(),e.adapter_.notifyOpened(),t!==u.numbers.INDETERMINATE&&(e.autoDismissTimer_=setTimeout(function(){e.close(p)},t))},u.numbers.SNACKBAR_ANIMATION_OPEN_TIME_MS)})},m.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,this.clearAutoDismissTimer_(),this.isOpen_=!1,this.adapter_.notifyClosing(t),this.adapter_.addClass(u.cssClasses.CLOSING),this.adapter_.removeClass(u.cssClasses.OPEN),this.adapter_.removeClass(u.cssClasses.OPENING),clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout(function(){e.handleAnimationTimerEnd_(),e.adapter_.notifyClosed(t)},u.numbers.SNACKBAR_ANIMATION_CLOSE_TIME_MS))},m.prototype.isOpen=function(){return this.isOpen_},m.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs_},m.prototype.setTimeoutMs=function(t){var e=u.numbers.MIN_AUTO_DISMISS_TIMEOUT_MS,n=u.numbers.MAX_AUTO_DISMISS_TIMEOUT_MS,o=u.numbers.INDETERMINATE;if(!(t===u.numbers.INDETERMINATE||t<=n&&e<=t))throw new Error("\n        timeoutMs must be an integer in the range "+e+"–"+n+"\n        (or "+o+" to disable), but got '"+t+"'");this.autoDismissTimeoutMs_=t},m.prototype.getCloseOnEscape=function(){return this.closeOnEscape_},m.prototype.setCloseOnEscape=function(t){this.closeOnEscape_=t},m.prototype.handleKeyDown=function(t){"Escape"!==t.key&&27!==t.keyCode||!this.getCloseOnEscape()||this.close(p)},m.prototype.handleActionButtonClick=function(t){this.close(_)},m.prototype.handleActionIconClick=function(t){this.close(p)},m.prototype.clearAutoDismissTimer_=function(){clearTimeout(this.autoDismissTimer_),this.autoDismissTimer_=0},m.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter_.removeClass(u.cssClasses.OPENING),this.adapter_.removeClass(u.cssClasses.CLOSING)},m.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},m);function m(t){var e=s.call(this,r({},m.defaultAdapter,t))||this;return e.isOpen_=!1,e.animationFrame_=0,e.animationTimer_=0,e.autoDismissTimer_=0,e.autoDismissTimeoutMs_=u.numbers.DEFAULT_AUTO_DISMISS_TIMEOUT_MS,e.closeOnEscape_=!0,e}e.MDCSnackbarFoundation=d,e.default=d}},i.c=o,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=149);function i(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,o});