/*! For license information please see material.js.LICENSE.txt */ (()=>{"use strict";var t={};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&(e=n.currentScript.src),!e)){var i=n.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})(),t.p,(()=>{var t=function(e,n){return(t=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])})(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return(n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0)&&!(i=a.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function r(t,e,n){if(n||2===arguments.length)for(var i,r=0,a=e.length;r0&&_.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState_():(void 0!==t&&(_.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){_=[],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_())}))))}}},i.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},i.prototype.animateActivation_=function(){var t=this,e=i.strings,n=e.VAR_FG_TRANSLATE_START,r=e.VAR_FG_TRANSLATE_END,a=i.cssClasses,o=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,u=i.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",l="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates_(),p=d.startPoint,h=d.endPoint;c=p.x+"px, "+p.y+"px",l=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(n,c),this.adapter.updateCssVariable(r,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout((function(){return t.activationTimerCallback_()}),u)},i.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,r,a=e.x,o=e.y,s=a+n.left,u=o+n.top;if("touchstart"===t.type){var c=t;i=c.changedTouches[0].pageX-s,r=c.changedTouches[0].pageY-u}else{var l=t;i=l.pageX-s,r=l.pageY-u}return{x:i,y:r}}(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}}},i.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,e=i.cssClasses.FG_DEACTIVATION,n=this.activationState_,r=n.hasDeactivationUXRun,a=n.isActivated;(r||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(e),this.fgDeactivationRemovalTimer_=setTimeout((function(){t.adapter.removeClass(e)}),p.FG_DEACTIVATION_MS))},i.prototype.rmBoundedActivationClasses_=function(){var t=i.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},i.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return t.previousActivationEvent_=void 0}),i.numbers.TAP_DELAY_MS)},i.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var i=n({},e);e.isProgrammatic?(requestAnimationFrame((function(){return t.animateDeactivation_(i)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(i),t.resetActivationState_()})))}},i.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},i.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+i.numbers.PADDING;var e=Math.floor(t*i.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&e%2!=0?this.initialSize_=e-1:this.initialSize_=e,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},i.prototype.updateLayoutCssVars_=function(){var t=i.strings,e=t.VAR_FG_SIZE,n=t.VAR_LEFT,r=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter.updateCssVariable(e,this.initialSize_+"px"),this.adapter.updateCssVariable(a,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(r,this.unboundedCoords_.top+"px"))},i}(a),g=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return e(n,t),n.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var i=new n(t);return void 0!==e.isUnbounded&&(i.unbounded=e.isUnbounded),i},n.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var n,i=window.CSS;if("boolean"==typeof c&&!e)return c;if(!i||"function"!=typeof i.supports)return!1;var r=i.supports("--css-vars","yes"),a=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=r||a,e||(c=n),n}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,s())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,s())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return u(t.root,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,s())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,s())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,n){return t.root.style.setProperty(e,n)}}},Object.defineProperty(n.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!1,configurable:!0}),n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.layout=function(){this.foundation.layout()},n.prototype.getDefaultFoundation=function(){return new v(n.createAdapter(this))},n.prototype.initialSyncWithDOM=function(){var t=this.root;this.unbounded="mdcRippleIsUnbounded"in t.dataset},n.prototype.setUnbounded_=function(){this.foundation.setUnbounded(Boolean(this.unbounded_))},n}(o),y={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},m=function(t){function i(e){var r=t.call(this,n(n({},i.defaultAdapter),e))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return e(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},i.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},i.prototype.getWidth=function(){return this.adapter.getWidth()},i.prototype.shake=function(t){var e=i.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},i.prototype.float=function(t){var e=i.cssClasses,n=e.LABEL_FLOAT_ABOVE,r=e.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(r))},i.prototype.setRequired=function(t){var e=i.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},i.prototype.handleShakeAnimationEnd_=function(){var t=i.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},i}(a),b=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},n.prototype.shake=function(t){this.foundation.shake(t)},n.prototype.float=function(t){this.foundation.float(t)},n.prototype.setRequired=function(t){this.foundation.setRequired(t)},n.prototype.getWidth=function(){return this.foundation.getWidth()},n.prototype.getDefaultFoundation=function(){var t=this;return new m({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},getWidth:function(){return 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}(t.root)},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)}})},n}(o),E={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},I=function(t){function i(e){var r=t.call(this,n(n({},i.defaultAdapter),e))||this;return r.transitionEndHandler_=function(t){return r.handleTransitionEnd(t)},r}return e(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},i.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},i.prototype.activate=function(){this.adapter.removeClass(E.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(E.LINE_RIPPLE_ACTIVE)},i.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},i.prototype.deactivate=function(){this.adapter.addClass(E.LINE_RIPPLE_DEACTIVATING)},i.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(E.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(E.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(E.LINE_RIPPLE_DEACTIVATING))},i}(a),A=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},n.prototype.getDefaultFoundation=function(){var t=this;return new I({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},setStyle:function(e,n){return t.root.style.setProperty(e,n)},registerEventHandler:function(e,n){return t.listen(e,n)},deregisterEventHandler:function(e,n){return t.unlisten(e,n)}})},n}(o),C={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},T={NOTCH_ELEMENT_PADDING:8},L={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},O=function(t){function i(e){return t.call(this,n(n({},i.defaultAdapter),e))||this}return e(i,t),Object.defineProperty(i,"strings",{get:function(){return C},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),i.prototype.notch=function(t){var e=i.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=T.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(e)},i.prototype.closeNotch=function(){var t=i.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},i}(a),R=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(C.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+m.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(L.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(L.NO_LABEL)},n.prototype.notch=function(t){this.foundation.notch(t)},n.prototype.closeNotch=function(){this.foundation.closeNotch()},n.prototype.getDefaultFoundation=function(){var t=this;return new O({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},setNotchWidthProperty:function(e){return t.notchElement_.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}})},n}(o),S={ROOT:"mdc-text-field-character-counter"},H={ROOT_SELECTOR:"."+S.ROOT},N=function(t){function i(e){return t.call(this,n(n({},i.defaultAdapter),e))||this}return e(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return S},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),i.prototype.setCounterValue=function(t,e){t=Math.min(t,e),this.adapter.setContent(t+" / "+e)},i}(a),x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new N({setContent:function(e){t.root.textContent=e}})},n}(o),P={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},F={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},D={LABEL_SCALE:.75},V=["pattern","min","max","required","step","minlength","maxlength"],w=["color","date","datetime-local","month","range","time","week"],j=["mousedown","touchstart"],B=["click","keydown"],U=function(t){function i(e,r){void 0===r&&(r={});var a=t.call(this,n(n({},i.defaultAdapter),e))||this;return a.isFocused_=!1,a.receivedUserInput_=!1,a.isValid_=!0,a.useNativeValidation_=!0,a.validateOnValueChange_=!0,a.helperText_=r.helperText,a.characterCounter_=r.characterCounter,a.leadingIcon_=r.leadingIcon,a.trailingIcon_=r.trailingIcon,a.inputFocusHandler_=function(){return a.activateFocus()},a.inputBlurHandler_=function(){return a.deactivateFocus()},a.inputInputHandler_=function(){return a.handleInput()},a.setPointerXOffset_=function(t){return a.setTransformOrigin(t)},a.textFieldInteractionHandler_=function(){return a.handleTextFieldInteraction()},a.validationAttributeChangeHandler_=function(t){return a.handleValidationAttributeChange(t)},a}return e(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return D},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"shouldAlwaysFloat_",{get:function(){var t=this.getNativeInput_().type;return w.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){var t=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),j.forEach((function(e){t.adapter.registerInputInteractionHandler(e,t.setPointerXOffset_)})),B.forEach((function(e){t.adapter.registerTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},i.prototype.destroy=function(){var t=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),j.forEach((function(e){t.adapter.deregisterInputInteractionHandler(e,t.setPointerXOffset_)})),B.forEach((function(e){t.adapter.deregisterTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},i.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput_=!0)},i.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return V.indexOf(t)>-1&&(e.styleValidity_(!0),e.adapter.setLabelRequired(e.getNativeInput_().required),!0)})),t.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},i.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*D.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},i.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText_||!this.helperText_.isPersistent()&&this.helperText_.isValidation()&&this.isValid_||this.helperText_.showToScreenReader()},i.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,n=e?e[0]:t,i=n.target.getBoundingClientRect(),r=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(r)}},i.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},i.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},i.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity_(t),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},i.prototype.getValue=function(){return this.getNativeInput_().value},i.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput_().value=t),this.setCharacterCounter_(t.length),this.validateOnValueChange_){var e=this.isValid();this.styleValidity_(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},i.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},i.prototype.setValid=function(t){this.isValid_=t,this.styleValidity_(t);var e=!t&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},i.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange_=t},i.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},i.prototype.setUseNativeValidation=function(t){this.useNativeValidation_=t},i.prototype.isDisabled=function(){return this.getNativeInput_().disabled},i.prototype.setDisabled=function(t){this.getNativeInput_().disabled=t,this.styleDisabled_(t)},i.prototype.setHelperTextContent=function(t){this.helperText_&&this.helperText_.setContent(t)},i.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)},i.prototype.setLeadingIconContent=function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)},i.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(t)},i.prototype.setTrailingIconContent=function(t){this.trailingIcon_&&this.trailingIcon_.setContent(t)},i.prototype.setCharacterCounter_=function(t){if(this.characterCounter_){var e=this.getNativeInput_().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(t,e)}},i.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},i.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},i.prototype.styleValidity_=function(t){var e=i.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText_){if(this.helperText_.setValidity(t),!this.helperText_.isValidation())return;var n=this.helperText_.isVisible(),r=this.helperText_.getId();n&&r?this.adapter.setInputAttr(P.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(P.ARIA_DESCRIBEDBY)}},i.prototype.styleFocused_=function(t){var e=i.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},i.prototype.styleDisabled_=function(t){var e=i.cssClasses,n=e.DISABLED,r=e.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(r)):this.adapter.removeClass(n),this.leadingIcon_&&this.leadingIcon_.setDisabled(t),this.trailingIcon_&&this.trailingIcon_.setDisabled(t)},i.prototype.styleFloating_=function(t){var e=i.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},i.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},i}(a),M={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},G={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+M.ROOT},k=function(t){function i(e){return t.call(this,n(n({},i.defaultAdapter),e))||this}return e(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),i.prototype.getId=function(){return this.adapter.getAttr("id")},i.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(G.ARIA_HIDDEN)},i.prototype.setContent=function(t){this.adapter.setContent(t)},i.prototype.isPersistent=function(){return this.adapter.hasClass(M.HELPER_TEXT_PERSISTENT)},i.prototype.setPersistent=function(t){t?this.adapter.addClass(M.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(M.HELPER_TEXT_PERSISTENT)},i.prototype.isValidation=function(){return this.adapter.hasClass(M.HELPER_TEXT_VALIDATION_MSG)},i.prototype.setValidation=function(t){t?this.adapter.addClass(M.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(M.HELPER_TEXT_VALIDATION_MSG)},i.prototype.showToScreenReader=function(){this.adapter.removeAttr(G.ARIA_HIDDEN)},i.prototype.setValidity=function(t){var e=this.adapter.hasClass(M.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(M.HELPER_TEXT_VALIDATION_MSG)&&!t;n?(this.showToScreenReader(),this.adapter.setAttr(G.ROLE,"alert")):this.adapter.removeAttr(G.ROLE),e||n||this.hide_()},i.prototype.hide_=function(){this.adapter.setAttr(G.ARIA_HIDDEN,"true")},i}(a),q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new k({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){return t.root.setAttribute(e,n)},removeAttr:function(e){return t.root.removeAttribute(e)},setContent:function(e){t.root.textContent=e}})},n}(o),X={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},W={ROOT:"mdc-text-field__icon"},z=["click","keydown"],Y=function(t){function i(e){var r=t.call(this,n(n({},i.defaultAdapter),e))||this;return r.savedTabIndex_=null,r.interactionHandler_=function(t){return r.handleInteraction(t)},r}return e(i,t),Object.defineProperty(i,"strings",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return W},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),z.forEach((function(e){t.adapter.registerInteractionHandler(e,t.interactionHandler_)}))},i.prototype.destroy=function(){var t=this;z.forEach((function(e){t.adapter.deregisterInteractionHandler(e,t.interactionHandler_)}))},i.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",X.ICON_ROLE)))},i.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},i.prototype.setContent=function(t){this.adapter.setContent(t)},i.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&(t.preventDefault(),this.adapter.notifyIconAction())},i}(a),K=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new Y({getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){return t.root.setAttribute(e,n)},removeAttr:function(e){return t.root.removeAttribute(e)},setContent:function(e){t.root.textContent=e},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},notifyIconAction:function(){return t.emit(Y.strings.ICON_EVENT,{},!0)}})},n}(o),$=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.attachTo=function(t){return new i(t)},i.prototype.initialize=function(t,e,n,i,r,a,o){void 0===t&&(t=function(t,e){return new g(t,e)}),void 0===e&&(e=function(t){return new A(t)}),void 0===n&&(n=function(t){return new q(t)}),void 0===i&&(i=function(t){return new x(t)}),void 0===r&&(r=function(t){return new K(t)}),void 0===a&&(a=function(t){return new b(t)}),void 0===o&&(o=function(t){return new R(t)}),this.input_=this.root.querySelector(P.INPUT_SELECTOR);var s=this.root.querySelector(P.LABEL_SELECTOR);this.label_=s?a(s):null;var u=this.root.querySelector(P.LINE_RIPPLE_SELECTOR);this.lineRipple_=u?e(u):null;var c=this.root.querySelector(P.OUTLINE_SELECTOR);this.outline_=c?o(c):null;var l=k.strings,d=this.root.nextElementSibling,p=d&&d.classList.contains(F.HELPER_LINE),h=p&&d&&d.querySelector(l.ROOT_SELECTOR);this.helperText_=h?n(h):null;var f=N.strings,_=this.root.querySelector(f.ROOT_SELECTOR);!_&&p&&d&&(_=d.querySelector(f.ROOT_SELECTOR)),this.characterCounter_=_?i(_):null;var v=this.root.querySelector(P.LEADING_ICON_SELECTOR);this.leadingIcon_=v?r(v):null;var y=this.root.querySelector(P.TRAILING_ICON_SELECTOR);this.trailingIcon_=y?r(y):null,this.prefix_=this.root.querySelector(P.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(P.SUFFIX_SELECTOR),this.ripple=this.createRipple_(t)},i.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),t.prototype.destroy.call(this)},i.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(i.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"required",{get:function(){return this.input_.required},set:function(t){this.input_.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(t){this.input_.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(t){this.input_.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(t){t<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"min",{get:function(){return this.input_.min},set:function(t){this.input_.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this.input_.max},set:function(t){this.input_.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this.input_.step},set:function(t){this.input_.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(t){this.prefix_&&(this.prefix_.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(t){this.suffix_&&(this.suffix_.textContent=t)},enumerable:!1,configurable:!0}),i.prototype.focus=function(){this.input_.focus()},i.prototype.layout=function(){var t=this.foundation.shouldFloat;this.foundation.notchOutline(t)},i.prototype.getDefaultFoundation=function(){var t=n(n(n(n(n({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_());return new U(t,this.getFoundationMap_())},i.prototype.getRootAdapterMethods_=function(){var t=this;return{addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},registerTextFieldInteractionHandler:function(e,n){t.listen(e,n)},deregisterTextFieldInteractionHandler:function(e,n){t.unlisten(e,n)},registerValidationAttributeChangeHandler:function(e){var n=new MutationObserver((function(t){return e(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return n.observe(t.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},i.prototype.getInputAdapterMethods_=function(){var t=this;return{getNativeInput:function(){return t.input_},setInputAttr:function(e,n){t.input_.setAttribute(e,n)},removeInputAttr:function(e){t.input_.removeAttribute(e)},isFocused:function(){return document.activeElement===t.input_},registerInputInteractionHandler:function(e,n){t.input_.addEventListener(e,n,s())},deregisterInputInteractionHandler:function(e,n){t.input_.removeEventListener(e,n,s())}}},i.prototype.getLabelAdapterMethods_=function(){var t=this;return{floatLabel:function(e){return t.label_&&t.label_.float(e)},getLabelWidth:function(){return t.label_?t.label_.getWidth():0},hasLabel:function(){return Boolean(t.label_)},shakeLabel:function(e){return t.label_&&t.label_.shake(e)},setLabelRequired:function(e){return t.label_&&t.label_.setRequired(e)}}},i.prototype.getLineRippleAdapterMethods_=function(){var t=this;return{activateLineRipple:function(){t.lineRipple_&&t.lineRipple_.activate()},deactivateLineRipple:function(){t.lineRipple_&&t.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(e){t.lineRipple_&&t.lineRipple_.setRippleCenter(e)}}},i.prototype.getOutlineAdapterMethods_=function(){var t=this;return{closeOutline:function(){return t.outline_&&t.outline_.closeNotch()},hasOutline:function(){return Boolean(t.outline_)},notchOutline:function(e){return t.outline_&&t.outline_.notch(e)}}},i.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},i.prototype.createRipple_=function(t){var e=this,i=this.root.classList.contains(F.TEXTAREA),r=this.root.classList.contains(F.OUTLINED);if(i||r)return null;var a=n(n({},g.createAdapter(this)),{isSurfaceActive:function(){return u(e.input_,":active")},registerInteractionHandler:function(t,n){return e.input_.addEventListener(t,n,s())},deregisterInteractionHandler:function(t,n){return e.input_.removeEventListener(t,n,s())}});return t(this.root,new v(a))},i}(o);document.querySelectorAll("[matRipple]").forEach((function(t){return new g(t)})),document.querySelectorAll(".mdc-text-field").forEach((function(t){return new $(t)}))})()})();