UNPKG

40.7 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dialog=e():(t.mdc=t.mdc||{},t.mdc.dialog=e())}(this,function(){return i={},o.m=n={0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MDCFoundation=void 0;var i=(Object.defineProperty(o,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),o.prototype.init=function(){},o.prototype.destroy=function(){},o);function o(t){void 0===t&&(t={}),this.adapter=t}e.MDCFoundation=i,e.default=i},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 i,o,r=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=this&&this.__spreadArray||function(t,e){for(var n=0,i=e.length,o=t.length;n<i;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCComponent=void 0;var i=n(0),a=(s.attachTo=function(t){return new s(t,new i.MDCFoundation({}))},s.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},s.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},s.prototype.initialSyncWithDOM=function(){},s.prototype.destroy=function(){this.foundation.destroy()},s.prototype.listen=function(t,e,n){this.root.addEventListener(t,e,n)},s.prototype.unlisten=function(t,e,n){this.root.removeEventListener(t,e,n)},s.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(i)},s);function s(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=t,this.initialize.apply(this,r([],o(n))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}e.MDCComponent=a,e.default=a},152:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e},a=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.util=void 0;var s=r(n(80));e.util=s,a(n(153),e),a(n(154),e),a(n(82),e),a(n(81),e),a(n(155),e)},153:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},154:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return a(e,t),e},c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCDialog=void 0;var u,l=n(1),d=n(20),p=n(2),f=n(6),h=n(81),v=s(n(80)),m=h.MDCDialogFoundation.strings,_=(u=l.MDCComponent,o(y,u),Object.defineProperty(y.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!1,configurable:!0}),y.attachTo=function(t){return new y(t)},y.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new d.FocusTrap(t,e)});var i=this.root.querySelector(m.CONTAINER_SELECTOR);if(!i)throw new Error("Dialog component requires a "+m.CONTAINER_SELECTOR+" container element");this.container=i,this.content=this.root.querySelector(m.CONTENT_SELECTOR),this.buttons=[].slice.call(this.root.querySelectorAll(m.BUTTON_SELECTOR)),this.defaultButton=this.root.querySelector("["+m.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory=t,this.buttonRipples=[];try{for(var o=c(this.buttons),r=o.next();!r.done;r=o.next()){var a=r.value;this.buttonRipples.push(new f.MDCRipple(a))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},y.prototype.initialSyncWithDOM=function(){var t=this;this.focusTrap=v.createFocusTrapInstance(this.container,this.focusTrapFactory,this.getInitialFocusEl()||void 0),this.handleClick=this.foundation.handleClick.bind(this.foundation),this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleOpening=function(){document.addEventListener("keydown",t.handleDocumentKeydown)},this.handleClosing=function(){document.removeEventListener("keydown",t.handleDocumentKeydown)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown),this.listen(m.OPENING_EVENT,this.handleOpening),this.listen(m.CLOSING_EVENT,this.handleClosing)},y.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),this.unlisten(m.OPENING_EVENT,this.handleOpening),this.unlisten(m.CLOSING_EVENT,this.handleClosing),this.handleClosing(),this.buttonRipples.forEach(function(t){t.destroy()}),u.prototype.destroy.call(this)},y.prototype.layout=function(){this.foundation.layout()},y.prototype.open=function(){this.foundation.open()},y.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},y.prototype.getDefaultFoundation=function(){var n=this,t={addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(t){return n.root.classList.add(t)},areButtonsStacked:function(){return v.areTopsMisaligned(n.buttons)},clickDefaultButton:function(){n.defaultButton&&n.defaultButton.click()},eventTargetMatches:function(t,e){return!!t&&p.matches(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=p.closest(t.target,"["+m.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(m.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return n.getInitialFocusEl()},hasClass:function(t){return n.root.classList.contains(t)},isContentScrollable:function(){return v.isScrollable(n.content)},notifyClosed:function(t){return n.emit(m.CLOSED_EVENT,t?{action:t}:{})},notifyClosing:function(t){return n.emit(m.CLOSING_EVENT,t?{action:t}:{})},notifyOpened:function(){return n.emit(m.OPENED_EVENT,{})},notifyOpening:function(){return n.emit(m.OPENING_EVENT,{})},releaseFocus:function(){n.focusTrap.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(t){return n.root.classList.remove(t)},reverseButtons:function(){n.buttons.reverse(),n.buttons.forEach(function(t){t.parentElement.appendChild(t)})},trapFocus:function(){n.focusTrap.trapFocus()},registerContentEventHandler:function(t,e){n.content instanceof HTMLElement&&n.content.addEventListener(t,e)},deregisterContentEventHandler:function(t,e){n.content instanceof HTMLElement&&n.content.removeEventListener(t,e)},isScrollableContentAtTop:function(){return v.isScrollAtTop(n.content)},isScrollableContentAtBottom:function(){return v.isScrollAtBottom(n.content)},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}};return new h.MDCDialogFoundation(t)},y.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+m.INITIAL_FOCUS_ATTRIBUTE+"]")},y);function y(){return null!==u&&u.apply(this,arguments)||this}e.MDCDialog=_},155:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},19:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrame=void 0;var i=(o.prototype.request=function(e,n){var i=this;this.cancel(e);var t=requestAnimationFrame(function(t){i.rafIDs.delete(e),n(t)});this.rafIDs.set(e,t)},o.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},o.prototype.cancelAll=function(){var n=this;this.rafIDs.forEach(function(t,e){n.cancel(e)})},o.prototype.getQueue=function(){var n=[];return this.rafIDs.forEach(function(t,e){n.push(e)}),n},o);function o(){this.rafIDs=new Map}e.AnimationFrame=i},2:function(t,e,n){"use strict";function i(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(i(n,e))return n;n=n.parentElement}return null},e.matches=i,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 i=n.scrollWidth;return document.documentElement.removeChild(n),i}},20:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusTrap=void 0;var r="mdc-dom-focus-sentinel",i=(o.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)},o.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+r)).forEach(function(t){t.parentElement.removeChild(t)}),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},o.prototype.wrapTabFocus=function(e){var n=this,t=this.createSentinel(),i=this.createSentinel();t.addEventListener("focus",function(){var t=n.getFocusableElements(e);0<t.length&&t[t.length-1].focus()}),i.addEventListener("focus",function(){var t=n.getFocusableElements(e);0<t.length&&t[0].focus()}),e.insertBefore(t,e.children[0]),e.appendChild(i)},o.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},o.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,i=!1;if(n){var o=getComputedStyle(t);i="none"===o.display||"hidden"===o.visibility}return n&&!i})},o.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add(r),t},o);function o(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}e.FocusTrap=i},3:function(t,e,n){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizedEventCoords=e.supportsCssVariables=void 0,e.supportsCssVariables=function(t,e){void 0===e&&(e=!1);var n,i=t.CSS;if("boolean"==typeof a&&!e)return a;if(!(i&&"function"==typeof i.supports))return!1;var o=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=o||r,e||(a=n),n},e.getNormalizedEventCoords=function(t,e,n){if(!t)return{x:0,y:0};var i,o,r=e.x,a=e.y,s=r+n.left,c=a+n.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,o=u.changedTouches[0].pageY-c}else{var l=t;i=l.pageX-s,o=l.pageY-c}return{x:i,y:o}}},4:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=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}i(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,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRippleFoundation=void 0;var a,s=n(0),c=n(7),u=n(3),l=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup","contextmenu"],p=[],f=(a=s.MDCFoundation,o(h,a),Object.defineProperty(h,"cssClasses",{get:function(){return c.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(h,"strings",{get:function(){return c.strings},enumerable:!1,configurable:!0}),Object.defineProperty(h,"numbers",{get:function(){return c.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(h,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),h.prototype.init=function(){var t=this,e=this.supportsPressRipple_();if(this.registerRootHandlers_(e),e){var n=h.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(i),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal_())})}},h.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(h.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(h.cssClasses.FG_DEACTIVATION));var e=h.cssClasses,n=e.ROOT,i=e.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(n),t.adapter.removeClass(i),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},h.prototype.activate=function(t){this.activate_(t)},h.prototype.deactivate=function(){this.deactivate_()},h.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},h.prototype.setUnbounded=function(t){var e=h.cssClasses.UNBOUNDED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},h.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(h.cssClasses.BG_FOCUSED)})},h.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(h.cssClasses.BG_FOCUSED)})},h.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},h.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},h.prototype.registerRootHandlers_=function(t){var e=this;t&&(l.forEach(function(t){e.adapter.registerInteractionHandler(t,e.activateHandler_)}),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},h.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach(function(t){e.adapter.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},h.prototype.deregisterRootHandlers_=function(){var e=this;l.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.activateHandler_)}),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},h.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach(function(t){e.adapter.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)})},h.prototype.removeCssVars_=function(){var e=this,n=h.strings;Object.keys(n).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)})},h.prototype.activate_=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;i&&void 0!==t&&i.type!==t.type||(n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&0<p.length&&p.some(function(t){return e.adapter.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(p.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){p=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})))}}},h.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},h.prototype.animateActivation_=function(){var t=this,e=h.strings,n=e.VAR_FG_TRANSLATE_START,i=e.VAR_FG_TRANSLATE_END,o=h.cssClasses,r=o.FG_DEACTIVATION,a=o.FG_ACTIVATION,s=h.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",u="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates_(),d=l.startPoint,p=l.endPoint;c=d.x+"px, "+d.y+"px",u=p.x+"px, "+p.y+"px"}this.adapter.updateCssVariable(n,c),this.adapter.updateCssVariable(i,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(r),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},s)},h.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?u.getNormalizedEventCoords(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},h.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,e=h.cssClasses.FG_DEACTIVATION,n=this.activationState_,i=n.hasDeactivationUXRun,o=n.isActivated;!i&&o||!this.activationAnimationHasEnded_||(this.rmBoundedActivationClasses_(),this.adapter.addClass(e),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter.removeClass(e)},c.numbers.FG_DEACTIVATION_MS))},h.prototype.rmBoundedActivationClasses_=function(){var t=h.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},h.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},h.numbers.TAP_DELAY_MS)},h.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=r({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},h.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},h.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+h.numbers.PADDING;var n=Math.floor(e*h.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize_=n-1:this.initialSize_=n,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},h.prototype.updateLayoutCssVars_=function(){var t=h.strings,e=t.VAR_FG_SIZE,n=t.VAR_LEFT,i=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(e,this.initialSize_+"px"),this.adapter.updateCssVariable(o,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(n,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(i,this.unboundedCoords_.top+"px"))},h);function h(t){var e=a.call(this,r(r({},h.defaultAdapter),t))||this;return e.activationAnimationHasEnded_=!1,e.activationTimer_=0,e.fgDeactivationRemovalTimer_=0,e.fgScale_="0",e.frame_={width:0,height:0},e.initialSize_=0,e.layoutFrame_=0,e.maxRadius_=0,e.unboundedCoords_={left:0,top:0},e.activationState_=e.defaultActivationState_(),e.activationTimerCallback_=function(){e.activationAnimationHasEnded_=!0,e.runDeactivationUXLogicIfReady_()},e.activateHandler_=function(t){return e.activate_(t)},e.deactivateHandler_=function(){return e.deactivate_()},e.focusHandler_=function(){return e.handleFocus()},e.blurHandler_=function(){return e.handleBlur()},e.resizeHandler_=function(){return e.layout()},e}e.MDCRippleFoundation=f,e.default=f},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyPassive=void 0,e.applyPassive=function(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return!(e=!0)}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch(t){e=!1}return e}(t)&&{passive:!0}}},6:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRipple=void 0;var c,u=n(1),l=n(5),d=n(2),p=n(4),f=s(n(3)),h=(c=u.MDCComponent,o(v,c),v.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var n=new v(t);return void 0!==e.isUnbounded&&(n.unbounded=e.isUnbounded),n},v.createAdapter=function(n){return{addClass:function(t){return n.root.classList.add(t)},browserSupportsCssVars:function(){return f.supportsCssVariables(window)},computeBoundingRect:function(){return n.root.getBoundingClientRect()},containsEventTarget:function(t){return n.root.contains(t)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,l.applyPassive())},deregisterInteractionHandler:function(t,e){return n.root.removeEventListener(t,e,l.applyPassive())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return d.matches(n.root,":active")},isSurfaceDisabled:function(){return Boolean(n.disabled)},isUnbounded:function(){return Boolean(n.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,l.applyPassive())},registerInteractionHandler:function(t,e){return n.root.addEventListener(t,e,l.applyPassive())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(t){return n.root.classList.remove(t)},updateCssVariable:function(t,e){return n.root.style.setProperty(t,e)}}},Object.defineProperty(v.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!1,configurable:!0}),v.prototype.activate=function(){this.foundation.activate()},v.prototype.deactivate=function(){this.foundation.deactivate()},v.prototype.layout=function(){this.foundation.layout()},v.prototype.getDefaultFoundation=function(){return new p.MDCRippleFoundation(v.createAdapter(this))},v.prototype.initialSyncWithDOM=function(){var t=this.root;this.unbounded="mdcRippleIsUnbounded"in t.dataset},v.prototype.setUnbounded_=function(){this.foundation.setUnbounded(Boolean(this.unbounded_))},v);function v(){var t=null!==c&&c.apply(this,arguments)||this;return t.disabled=!1,t}e.MDCRipple=h},7:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.numbers=e.strings=e.cssClasses=void 0,e.cssClasses={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},e.strings={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},e.numbers={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}},80:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.areTopsMisaligned=e.isScrollAtBottom=e.isScrollAtTop=e.isScrollable=e.createFocusTrapInstance=void 0,e.createFocusTrapInstance=function(t,e,n){return e(t,{initialFocusEl:n})},e.isScrollable=function(t){return!!t&&t.scrollHeight>t.offsetHeight},e.isScrollAtTop=function(t){return!!t&&0===t.scrollTop},e.isScrollAtBottom=function(t){return!!t&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight},e.areTopsMisaligned=function(t){var e=new Set;return[].forEach.call(t,function(t){return e.add(t.offsetTop)}),1<e.size}},81:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=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}i(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,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCDialogFoundation=void 0;var a,s,c=n(19),u=n(0),l=n(82);(s=a=a||{}).POLL_SCROLL_POS="poll_scroll_position",s.POLL_LAYOUT_CHANGE="poll_layout_change";var d,p=(d=u.MDCFoundation,o(f,d),Object.defineProperty(f,"cssClasses",{get:function(){return l.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(f,"strings",{get:function(){return l.strings},enumerable:!1,configurable:!0}),Object.defineProperty(f,"numbers",{get:function(){return l.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(f,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),f.prototype.init=function(){this.adapter.hasClass(l.cssClasses.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(l.cssClasses.FULLSCREEN)},f.prototype.destroy=function(){this.dialogOpen&&this.close(l.strings.DESTROY_ACTION),this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},f.prototype.open=function(t){var e=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(l.cssClasses.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),t&&t.isAboveFullscreenDialog&&this.adapter.addClass(l.cssClasses.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame(function(){e.adapter.addClass(l.cssClasses.OPEN),e.adapter.addBodyClass(l.cssClasses.SCROLL_LOCK),e.layout(),e.animationTimer=setTimeout(function(){e.handleAnimationTimerEnd(),e.adapter.trapFocus(e.adapter.getInitialFocusEl()),e.adapter.notifyOpened()},l.numbers.DIALOG_ANIMATION_OPEN_TIME_MS)})},f.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(t),this.adapter.addClass(l.cssClasses.CLOSING),this.adapter.removeClass(l.cssClasses.OPEN),this.adapter.removeBodyClass(l.cssClasses.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout(function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)},l.numbers.DIALOG_ANIMATION_CLOSE_TIME_MS))},f.prototype.showSurfaceScrim=function(){var t=this;this.adapter.addClass(l.cssClasses.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame(function(){t.adapter.addClass(l.cssClasses.SURFACE_SCRIM_SHOWN)})},f.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(l.cssClasses.SURFACE_SCRIM_SHOWN),this.adapter.addClass(l.cssClasses.SURFACE_SCRIM_HIDING)},f.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(l.cssClasses.SURFACE_SCRIM_HIDING),this.adapter.removeClass(l.cssClasses.SURFACE_SCRIM_SHOWING)},f.prototype.isOpen=function(){return this.dialogOpen},f.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},f.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction=t},f.prototype.getScrimClickAction=function(){return this.scrimClickAction},f.prototype.setScrimClickAction=function(t){this.scrimClickAction=t},f.prototype.getAutoStackButtons=function(){return this.autoStackButtons},f.prototype.setAutoStackButtons=function(t){this.autoStackButtons=t},f.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},f.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},f.prototype.layout=function(){var t=this;this.animFrame.request(a.POLL_LAYOUT_CHANGE,function(){t.layoutInternal()})},f.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,l.strings.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},f.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,i=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&i&&this.adapter.clickDefaultButton()}},f.prototype.handleDocumentKeydown=function(t){"Escape"!==t.key&&27!==t.keyCode||""===this.escapeKeyAction||this.close(this.escapeKeyAction)},f.prototype.handleScrollEvent=function(){var t=this;this.animFrame.request(a.POLL_SCROLL_POS,function(){t.toggleScrollDividerHeader(),t.toggleScrollDividerFooter()})},f.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},f.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(l.cssClasses.OPENING),this.adapter.removeClass(l.cssClasses.CLOSING)},f.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)})},f.prototype.detectStackedButtons=function(){this.adapter.removeClass(l.cssClasses.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(l.cssClasses.STACKED),t!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=t)},f.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(l.cssClasses.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(l.cssClasses.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},f.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(l.cssClasses.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(l.cssClasses.SCROLL_DIVIDER_HEADER):this.adapter.addClass(l.cssClasses.SCROLL_DIVIDER_HEADER)},f.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(l.cssClasses.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(l.cssClasses.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(l.cssClasses.SCROLL_DIVIDER_FOOTER)},f);function f(t){var e=d.call(this,r(r({},f.defaultAdapter),t))||this;return e.dialogOpen=!1,e.isFullscreen=!1,e.animationFrame=0,e.animationTimer=0,e.escapeKeyAction=l.strings.CLOSE_ACTION,e.scrimClickAction=l.strings.CLOSE_ACTION,e.autoStackButtons=!0,e.areButtonsStacked=!1,e.suppressDefaultPressSelector=l.strings.SUPPRESS_DEFAULT_PRESS_SELECTOR,e.animFrame=new c.AnimationFrame,e.contentScrollHandler=function(){e.handleScrollEvent()},e.windowResizeHandler=function(){e.layout()},e.windowOrientationChangeHandler=function(){e.layout()},e}e.MDCDialogFoundation=p,e.default=p},82:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.numbers=e.strings=e.cssClasses=void 0,e.cssClasses={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},e.strings={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},e.numbers={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150}}},o.c=i,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=152);function o(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,i});
\No newline at end of file