text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.banner=e():(t.mdc=t.mdc||{},t.mdc.banner=e())}(this,function(){return o={},i.m=n={0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MDCFoundation=void 0;var o=(Object.defineProperty(i,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{}},enumerable:!1,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 i=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},r=this&&this.__spreadArray||function(t,e){for(var n=0,o=e.length,i=t.length;n<o;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCComponent=void 0;var o=n(0),s=(a.attachTo=function(t){return new a(t,new o.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,r([],i(n))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}e.MDCComponent=s,e.default=s},126:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(127),e),i(n(128),e),i(n(50),e),i(n(71),e)},127:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},128: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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MDCBanner=void 0;var r,s=n(1),a=n(20),c=n(2),u=n(50),l=n(71),p=(r=s.MDCComponent,i(f,r),f.attachTo=function(t){return new f(t)},f.prototype.initialize=function(t){var n=this;void 0===t&&(t=function(t,e){return new a.FocusTrap(t,e)}),this.contentEl=this.root.querySelector(u.selectors.CONTENT),this.textEl=this.root.querySelector(u.selectors.TEXT),this.primaryActionEl=this.root.querySelector(u.selectors.PRIMARY_ACTION),this.secondaryActionEl=this.root.querySelector(u.selectors.SECONDARY_ACTION),this.focusTrapFactory=t,this.handleContentClick=function(t){var e=t.target;c.closest(e,u.selectors.PRIMARY_ACTION)?n.foundation.handlePrimaryActionClick():c.closest(e,u.selectors.SECONDARY_ACTION)&&n.foundation.handleSecondaryActionClick()}},f.prototype.initialSyncWithDOM=function(){this.registerContentClickHandler(this.handleContentClick),this.focusTrap=this.focusTrapFactory(this.root,{initialFocusEl:this.primaryActionEl})},f.prototype.destroy=function(){r.prototype.destroy.call(this),this.deregisterContentClickHandler(this.handleContentClick)},f.prototype.layout=function(){this.foundation.layout()},f.prototype.open=function(){this.foundation.open()},f.prototype.close=function(t){this.foundation.close(t)},f.prototype.getDefaultFoundation=function(){var n=this,t={addClass:function(t){n.root.classList.add(t)},getContentHeight:function(){return n.contentEl.offsetHeight},notifyClosed:function(t){n.emit(u.events.CLOSED,{reason:t})},notifyClosing:function(t){n.emit(u.events.CLOSING,{reason:t})},notifyOpened:function(){n.emit(u.events.OPENED,{})},notifyOpening:function(){n.emit(u.events.OPENING,{})},releaseFocus:function(){n.focusTrap.releaseFocus()},removeClass:function(t){n.root.classList.remove(t)},setStyleProperty:function(t,e){n.root.style.setProperty(t,e)},trapFocus:function(){n.focusTrap.trapFocus()}};return new l.MDCBannerFoundation(t)},Object.defineProperty(f.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),f.prototype.getText=function(){return this.textEl.textContent||""},f.prototype.setText=function(t){this.textEl.textContent=t},f.prototype.getPrimaryActionText=function(){return this.primaryActionEl.textContent||""},f.prototype.setPrimaryActionText=function(t){this.primaryActionEl.textContent=t},f.prototype.getSecondaryActionText=function(){return this.secondaryActionEl?this.secondaryActionEl.textContent||"":null},f.prototype.setSecondaryActionText=function(t){this.secondaryActionEl&&(this.secondaryActionEl.textContent=t)},f.prototype.registerContentClickHandler=function(t){this.contentEl.addEventListener("click",t)},f.prototype.deregisterContentClickHandler=function(t){this.contentEl.removeEventListener("click",t)},f);function f(){return null!==r&&r.apply(this,arguments)||this}e.MDCBanner=p},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.estimateScrollWidth=e.matches=e.closest=void 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,e.estimateScrollWidth=function(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var o=n.scrollWidth;return document.documentElement.removeChild(n),o}},20:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusTrap=void 0;var r="mdc-dom-focus-sentinel",o=(i.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},i.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+r)).forEach(function(t){t.parentElement.removeChild(t)}),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},i.prototype.wrapTabFocus=function(e){var n=this,t=this.createSentinel(),o=this.createSentinel();t.addEventListener("focus",function(){var t=n.getFocusableElements(e);0<t.length&&t[t.length-1].focus()}),o.addEventListener("focus",function(){var t=n.getFocusableElements(e);0<t.length&&t[0].focus()}),e.insertBefore(t,e.children[0]),e.appendChild(o)},i.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},i.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter(function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=0<=t.tabIndex&&0<t.getBoundingClientRect().width&&!t.classList.contains(r)&&!e,o=!1;if(n){var i=getComputedStyle(t);o="none"===i.display||"hidden"===i.visibility}return n&&!o})},i.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add(r),t},i);function i(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}e.FocusTrap=o},50:function(t,e,n){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.CloseReason=e.selectors=e.events=e.numbers=e.cssClasses=void 0,e.cssClasses={CLOSING:"mdc-banner--closing",OPEN:"mdc-banner--open",OPENING:"mdc-banner--opening"},e.numbers={BANNER_ANIMATION_CLOSE_TIME_MS:250,BANNER_ANIMATION_OPEN_TIME_MS:300},e.events={CLOSED:"MDCBanner:closed",CLOSING:"MDCBanner:closing",OPENED:"MDCBanner:opened",OPENING:"MDCBanner:opening"},e.selectors={CONTENT:".mdc-banner__content",PRIMARY_ACTION:".mdc-banner__primary-action",SECONDARY_ACTION:".mdc-banner__secondary-action",TEXT:".mdc-banner__text"},(o=e.CloseReason||(e.CloseReason={}))[o.PRIMARY=0]="PRIMARY",o[o.SECONDARY=1]="SECONDARY",o[o.UNSPECIFIED=2]="UNSPECIFIED"},71: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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");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}),e.MDCBannerFoundation=void 0;var s,a=n(0),c=n(50),u=c.cssClasses.OPENING,l=c.cssClasses.OPEN,p=c.cssClasses.CLOSING,f=(s=a.MDCFoundation,i(d,s),Object.defineProperty(d,"defaultAdapter",{get:function(){return{addClass:function(){},getContentHeight:function(){return 0},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeClass:function(){},setStyleProperty:function(){},trapFocus:function(){}}},enumerable:!1,configurable:!0}),d.prototype.destroy=function(){cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=0},d.prototype.open=function(){var t=this;this.isOpened=!0,this.adapter.notifyOpening(),this.adapter.removeClass(p),this.adapter.addClass(u);var e=this.adapter.getContentHeight();this.animationFrame=requestAnimationFrame(function(){t.adapter.addClass(l),t.adapter.setStyleProperty("height",e+"px"),t.animationTimer=setTimeout(function(){t.handleAnimationTimerEnd(),t.adapter.trapFocus(),t.adapter.notifyOpened()},c.numbers.BANNER_ANIMATION_OPEN_TIME_MS)})},d.prototype.close=function(t){var e=this;this.isOpened&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=0,this.isOpened=!1,this.adapter.notifyClosing(t),this.adapter.addClass(p),this.adapter.setStyleProperty("height","0"),this.adapter.removeClass(l),this.adapter.removeClass(u),clearTimeout(this.animationTimer),this.animationTimer=setTimeout(function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)},c.numbers.BANNER_ANIMATION_CLOSE_TIME_MS))},d.prototype.isOpen=function(){return this.isOpened},d.prototype.handlePrimaryActionClick=function(){this.close(c.CloseReason.PRIMARY)},d.prototype.handleSecondaryActionClick=function(){this.close(c.CloseReason.SECONDARY)},d.prototype.layout=function(){var t=this.adapter.getContentHeight();this.adapter.setStyleProperty("height",t+"px")},d.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(u),this.adapter.removeClass(p)},d);function d(t){var e=s.call(this,r(r({},d.defaultAdapter),t))||this;return e.isOpened=!1,e.animationFrame=0,e.animationTimer=0,e}e.MDCBannerFoundation=f}},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=126);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});