material-components-vue
Version:
Material Design components for Vue.js
2 lines • 39.2 kB
JavaScript
/*! For license information please see list.min.js.LICENSE */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,function(){return n={},t.m=e={0:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return s}),n.d(e,"e",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"d",function(){return c});var 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)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,s=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}},1:function(t,e,n){"use strict";var i={inheritAttrs:!1},r=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],s={props:{theming:{type:String,default:""}},mounted:function(){-1<r.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",function(){return i}),n.d(e,"b",function(){return s})},10:function(t,e,n){"use strict";var i=n(0),r=n(2),s={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"},o={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"},a={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},c=n(6);n.d(e,"a",function(){return f});var d,u=["touchstart","pointerdown","mousedown","keydown"],l=["touchend","pointerup","mouseup","contextmenu"],_=[],f=(d=r.a,i.b(h,d),Object.defineProperty(h,"cssClasses",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(h,"strings",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(h,"numbers",{get:function(){return a},enumerable:!0,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:!0,configurable:!0}),h.prototype.init=function(){var t=this,e=this.supportsPressRipple_();if(this.registerRootHandlers_(e),e){var n=h.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(i),t.adapter_.isUnbounded()&&(t.adapter_.addClass(r),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&&(u.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_):l.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},h.prototype.deregisterRootHandlers_=function(){var t=this;u.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.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 t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),l.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},h.prototype.removeCssVars_=function(){var t=this,e=h.strings;Object.keys(e).forEach(function(n){0===n.indexOf("VAR_")&&t.adapter_.updateCssVariable(e[n],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<_.length&&_.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_())})))}}},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,r=h.cssClasses,s=r.FG_DEACTIVATION,o=r.FG_ACTIVATION,a=h.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter_.isUnbounded()){var u=this.getFgTranslationCoordinates_(),l=u.startPoint,_=u.endPoint;c=l.x+"px, "+l.y+"px",d=_.x+"px, "+_.y+"px"}this.adapter_.updateCssVariable(n,c),this.adapter_.updateCssVariable(i,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(s),this.adapter_.computeBoundingRect(),this.adapter_.addClass(o),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},a)},h.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?Object(c.b)(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,r=n.isActivated;!i&&r||!this.activationAnimationHasEnded_||(this.rmBoundedActivationClasses_(),this.adapter_.addClass(e),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(e)},a.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=i.a({},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(){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))+h.numbers.PADDING,this.initialSize_=Math.floor(t*h.numbers.INITIAL_ORIGIN_SCALE),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,r=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(e,this.initialSize_+"px"),this.adapter_.updateCssVariable(r,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=d.call(this,i.a({},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}},12:function(t,e,n){"use strict";n.d(e,"a",function(){return d});var i,r=n(0),s=n(5),o=n(8),a=n(10),c=n(6),d=(i=s.a,r.b(u,i),u.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var n=new u(t);return void 0!==e.isUnbounded&&(n.unbounded=e.isUnbounded),n},u.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return c.c(window)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},containsEventTarget:function(e){return t.root_.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,c.a())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,c.a())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Object(o.b)(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,c.a())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,c.a())},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(u.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),u.prototype.activate=function(){this.foundation_.activate()},u.prototype.deactivate=function(){this.foundation_.deactivate()},u.prototype.layout=function(){this.foundation_.layout()},u.prototype.getDefaultFoundation=function(){return new a.a(u.createAdapter(this))},u.prototype.initialSyncWithDOM=function(){var t=this.root_;this.unbounded="mdcRippleIsUnbounded"in t.dataset},u.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},u);function u(){var t=null!==i&&i.apply(this,arguments)||this;return t.disabled=!1,t}},13:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var i,r=n(0),s=n(2),o=n(3),a=["input","button","textarea","select"],c=(i=s.a,r.b(d,i),Object.defineProperty(d,"strings",{get:function(){return o.c},enumerable:!0,configurable:!0}),Object.defineProperty(d,"cssClasses",{get:function(){return o.a},enumerable:!0,configurable:!0}),Object.defineProperty(d,"numbers",{get:function(){return o.b},enumerable:!0,configurable:!0}),Object.defineProperty(d,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),d.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},d.prototype.setWrapFocus=function(t){this.wrapFocus_=t},d.prototype.setVerticalOrientation=function(t){this.isVertical_=t},d.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},d.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},d.prototype.getSelectedIndex=function(){return this.selectedIndex_},d.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},d.prototype.handleFocusIn=function(t,e){0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"0")},d.prototype.handleFocusOut=function(t,e){var n=this;0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout(function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()},0)},d.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,r="ArrowUp"===t.key||38===t.keyCode,s="ArrowRight"===t.key||39===t.keyCode,o="ArrowDown"===t.key||40===t.keyCode,a="Home"===t.key||36===t.keyCode,c="End"===t.key||35===t.keyCode,d="Enter"===t.key||13===t.keyCode,u="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())r||c?(t.preventDefault(),this.focusLastElement()):(o||a)&&(t.preventDefault(),this.focusFirstElement());else{var l=this.adapter_.getFocusedElementIndex();if(!(-1===l&&(l=n)<0)){var _;if(this.isVertical_&&o||!this.isVertical_&&s)this.preventDefaultEvent_(t),_=this.focusNextElement(l);else if(this.isVertical_&&r||!this.isVertical_&&i)this.preventDefaultEvent_(t),_=this.focusPrevElement(l);else if(a)this.preventDefaultEvent_(t),_=this.focusFirstElement();else if(c)this.preventDefaultEvent_(t),_=this.focusLastElement();else if((d||u)&&e){var f=t.target;if(f&&"A"===f.tagName&&d)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,void 0!==_&&(this.setTabindexAtIndex_(_),this.focusedItemIndex_=_)}}},d.prototype.handleClick=function(t,e){t!==o.b.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},d.prototype.focusNextElement=function(t){var e=t+1;if(this.adapter_.getListItemCount()<=e){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},d.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},d.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},d.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},d.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===a.indexOf(e)&&t.preventDefault()},d.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=o.a.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=o.a.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==o.b.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},d.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===o.b.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,o.c.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?o.c.ARIA_CURRENT:o.c.ARIA_SELECTED;this.selectedIndex_!==o.b.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},d.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==o.b.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,o.c.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,o.c.ARIA_CHECKED,"true"),this.selectedIndex_=t},d.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e<this.adapter_.getListItemCount();e++){var n=!1;0<=t.indexOf(e)&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,o.c.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},d.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===o.b.UNSET_INDEX&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):0<=this.focusedItemIndex_&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},d.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},d.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==o.b.UNSET_INDEX?t=this.selectedIndex_:function(t){return t instanceof Array}(this.selectedIndex_)&&0<this.selectedIndex_.length&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),this.setTabindexAtIndex_(t)},d.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"!=typeof t)return!1;if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)},d.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return 0<=t&&t<e},d.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},d.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.adapter_.isCheckboxCheckedAtIndex(t);e&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter_.setAttributeForElementIndex(t,o.c.ARIA_CHECKED,n?"true":"false");var i=this.selectedIndex_===o.b.UNSET_INDEX?[]:this.selectedIndex_.slice();n?i.push(t):i=i.filter(function(e){return e!==t}),this.selectedIndex_=i},d);function d(t){var e=i.call(this,r.a({},d.defaultAdapter,t))||this;return e.wrapFocus_=!1,e.isVertical_=!0,e.isSingleSelectionList_=!1,e.selectedIndex_=o.b.UNSET_INDEX,e.focusedItemIndex_=o.b.UNSET_INDEX,e.useActivatedClass_=!1,e.ariaCurrentAttrValue_=null,e.isCheckboxList_=!1,e.isRadioList_=!1,e}},17:function(t,e,n){"use strict";n.d(e,"a",function(){return d});var i,r=n(0),s=n(5),o=n(8),a=n(3),c=n(13),d=(i=s.a,r.b(u,i),Object.defineProperty(u.prototype,"vertical",{set:function(t){this.foundation_.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"listElements",{get:function(){return[].slice.call(this.root_.querySelectorAll("."+a.a.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"wrapFocus",{set:function(t){this.foundation_.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"singleSelection",{set:function(t){this.foundation_.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedIndex",{get:function(){return this.foundation_.getSelectedIndex()},set:function(t){this.foundation_.setSelectedIndex(t)},enumerable:!0,configurable:!0}),u.attachTo=function(t){return new u(t)},u.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},u.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},u.prototype.layout=function(){var t=this.root_.getAttribute(a.c.ARIA_ORIENTATION);this.vertical=t!==a.c.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(t){t.setAttribute("tabindex","-1")}),[].slice.call(this.root_.querySelectorAll(a.c.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(t){return t.setAttribute("tabindex","-1")}),this.foundation_.layout()},u.prototype.initializeListType=function(){var t=this,e=this.root_.querySelectorAll(a.c.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root_.querySelector("\n ."+a.a.LIST_ITEM_ACTIVATED_CLASS+",\n ."+a.a.LIST_ITEM_SELECTED_CLASS+"\n "),i=this.root_.querySelector(a.c.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var r=this.root_.querySelectorAll(a.c.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(r,function(e){return t.listElements.indexOf(e)})}else n?(n.classList.contains(a.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(n)):i&&(this.selectedIndex=this.listElements.indexOf(i))},u.prototype.getDefaultFoundation=function(){var t=this,e={addClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.add(n)},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},getAttributeForElementIndex:function(e,n){return t.listElements[e].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(a.c.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(a.c.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(a.c.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root_.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root_},notifyAction:function(e){t.emit(a.c.ACTION_EVENT,{index:e},!0)},removeClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.remove(n)},setAttributeForElementIndex:function(e,n,i){var r=t.listElements[e];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(e,n){var i=t.listElements[e].querySelector(a.c.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(e,n){var i=t.listElements[e];[].slice.call(i.querySelectorAll(a.c.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",n)})}};return new c.a(e)},u.prototype.getListItemIndex_=function(t){var e=t.target,n=Object(o.a)(e,"."+a.a.LIST_ITEM_CLASS+", ."+a.a.ROOT);return n&&Object(o.b)(n,"."+a.a.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},u.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusIn(t,e)},u.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusOut(t,e)},u.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation_.handleKeydown(t,n.classList.contains(a.a.LIST_ITEM_CLASS),e)},u.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!Object(o.b)(n,a.c.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(e,i)},u);function u(){return null!==i&&i.apply(this,arguments)||this}},2:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i=(Object.defineProperty(r,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),r.prototype.init=function(){},r.prototype.destroy=function(){},r);function r(t){void 0===t&&(t={}),this.adapter_=t}},3:function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"a",function(){return i}),n.d(e,"b",function(){return s});var i={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},r={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHECKBOX_SELECTOR:'input[type="checkbox"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]:not(:disabled)'},s={UNSET_INDEX:-1}},4:function(t,e,n){"use strict";function i(t,e,n,i,r,s,o,a){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),s&&(d._scopeId="data-v-"+s),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=c):r&&(c=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),c)if(d.functional){d._injectStyles=c;var u=d.render;d.render=function(t,e){return c.call(e),u(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:d}}n.d(e,"a",function(){return i})},42:function(t,e,n){},5:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(0),r=n(2),s=(o.attachTo=function(t){return new o(t,new r.a({}))},o.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},o.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},o.prototype.initialSyncWithDOM=function(){},o.prototype.destroy=function(){this.foundation_.destroy()},o.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},o.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},o.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)},o);function o(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.root_=t,this.initialize.apply(this,i.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}},6:function(t,e,n){"use strict";var i,r;function s(t,e){void 0===e&&(e=!1);var n,r=t.CSS;if("boolean"==typeof i&&!e)return i;if(!r||"function"!=typeof r.supports)return!1;var s=r.supports("--css-vars","yes"),o=r.supports("(--css-vars: yes)")&&r.supports("color","#00000000");return n=!(!s&&!o||function(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var i=t.getComputedStyle(n),r=null!==i&&"solid"===i.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),r}(t)),e||(i=n),n}function o(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===r||e){var n=!1;try{t.document.addEventListener("test",function(){},{get passive(){return n=!0}})}catch(t){}r=n}return!!r&&{passive:!0}}function a(t,e,n){if(!t)return{x:0,y:0};var i,r,s=e.x,o=e.y,a=s+n.left,c=o+n.top;if("touchstart"===t.type){var d=t;i=d.changedTouches[0].pageX-a,r=d.changedTouches[0].pageY-c}else{var u=t;i=u.pageX-a,r=u.pageY-c}return{x:i,y:r}}n.d(e,"c",function(){return s}),n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a})},62:function(t,e,n){"use strict";n.r(e);var i=n(1),r=n(17),s={mixins:[i.a,i.b],props:{avatar:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},twoLine:{type:Boolean,default:!1},nonInteractive:{type:Boolean,default:!1},singleSelection:{type:Boolean,default:!1},vertical:{type:Boolean,default:!0},wrapFocus:{type:Boolean,default:!0}},data:function(){return{mdcList:void 0}},computed:{classes:function(){return{"mdc-list--dense":this.dense,"mdc-list--two-line":this.twoLine,"mdc-list--avatar-list":this.avatar,"mdc-list--non-interactive":this.nonInteractive}}},watch:{singleSelection:function(){this.mdcList&&(this.mdcList.singleSelection=this.singleSelection)},vertical:function(){this.mdcList&&(this.mdcList.vertical=this.vertical)},wrapFocus:function(){this.mdcList&&(this.mdcList.wrapFocus=this.wrapFocus)}},mounted:function(){"m-menu"!==this.$parent.$options._componentTag?(this.mdcList=r.a.attachTo(this.$el),this.mdcList.singleSelection=this.singleSelection,this.mdcList.wrapFocus=this.wrapFocus,this.mdcList.vertical=this.vertical):this.$el.setAttribute("tabindex","0")},beforeDestroy:function(){this.mdcList&&this.mdcList.destroy()}},o=n(4),a=Object(o.a)(s,function(){var t=this,e=t.$createElement;return(t._self._c||e)("ul",t._b({staticClass:"mdc-list",class:t.classes},"ul",t.$attrs,!1),[t._t("default")],2)},[],!1,null,null,null).exports,c={mixins:[i.a,i.b],props:{inset:{type:Boolean,required:!1,default:!1},padded:{type:Boolean,required:!1,default:!1}},computed:{classes:function(){return{"mdc-list-divider--inset":this.inset,"mdc-list-divider--padded":this.padded}}}},d=Object(o.a)(c,function(){var t=this.$createElement;return(this._self._c||t)("li",{staticClass:"mdc-list-divider",class:this.classes,attrs:{role:"separator"}})},[],!1,null,null,null).exports,u={mixins:[i.a,i.b]},l=Object(o.a)(u,function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-list-group"},[this._t("default")],2)},[],!1,null,null,null).exports,_={mixins:[i.a,i.b]},f=Object(o.a)(_,function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"mdc-list-divider"})},[],!1,null,null,null).exports,h={mixins:[i.a,i.b]},p=Object(o.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return"m-drawer-list"===t.$parent.$options._componentTag?n("h6",{staticClass:"mdc-list-group__subheader"},[t._t("default")],2):n("h3",{staticClass:"mdc-list-group__subheader"},[t._t("default")],2)},[],!1,null,null,null).exports,m=n(12),v={mixins:[i.a,i.b],props:{activated:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},href:{type:String,default:""},disabled:{type:Boolean,default:!1}},data:function(){return{mdcRipple:void 0,slotObserver:void 0}},computed:{classes:function(){return{"mdc-list-item--activated":this.activated,"mdc-list-item--selected":this.selected,"mdc-list-item--disabled":this.disabled}}},watch:{classes:function(){this.mdcRipple.destroy(),this.mdcRipple=m.a.attachTo(this.$el)}},mounted:function(){var t=this;this.updateSlots(),this.slotObserver=new MutationObserver(function(){return t.updateSlots()}),this.slotObserver.observe(this.$el,{childList:!0,subtree:!0}),this.mdcRipple=m.a.attachTo(this.$el)},beforeDestroy:function(){this.slotObserver.disconnect(),void 0!==this.mdcRipple&&this.mdcRipple.destroy()},methods:{updateSlots:function(){var t=this;this.$slots.graphic&&this.$slots.graphic.map(function(e){e.elm.classList.add("mdc-list-item__graphic"),"menuitem"===t.$el.getAttribute("role")&&e.elm.classList.add("mdc-menu__selection-group-icon")}),this.$slots.meta&&this.$slots.meta.map(function(t){t.elm.classList.add("mdc-list-item__meta")})}}},I=Object(o.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.href?n("a",t._g(t._b({staticClass:"mdc-list-item",class:t.classes,attrs:{"aria-selected":t.activated,href:t.href}},"a",t.$attrs,!1),t.$listeners),[t.$slots.graphic?t._t("graphic"):t._e(),t._v(" "),t._t("default"),t._v(" "),t.$slots.text||t.$slots.primaryText||t.$slots.secondaryText?n("span",{staticClass:"mdc-list-item__text"},[t._t("text"),t._v(" "),t.$slots.primaryText?n("span",{staticClass:"mdc-list-item__primary-text"},[t._t("primaryText")],2):t._e(),t._v(" "),t.$slots.secondaryText?n("span",{staticClass:"mdc-list-item__secondary-text"},[t._t("secondaryText")],2):t._e()],2):t._e(),t._v(" "),t.$slots.meta?t._t("meta"):t._e()],2):n("li",t._g(t._b({staticClass:"mdc-list-item",class:t.classes},"li",t.$attrs,!1),t.$listeners),[t._t("graphic"),t._v(" "),t._t("default"),t._v(" "),t.$slots.text||t.$slots.primaryText||t.$slots.secondaryText?n("span",{staticClass:"mdc-list-item__text"},[t._t("text"),t._v(" "),t.$slots.primaryText?n("span",{staticClass:"mdc-list-item__primary-text"},[t._t("primaryText")],2):t._e(),t._v(" "),t.$slots.secondaryText?n("span",{staticClass:"mdc-list-item__secondary-text"},[t._t("secondaryText")],2):t._e()],2):t._e(),t._v(" "),t._t("meta")],2)},[],!1,null,null,null).exports,E=(n(42),n(7)),y={install:function(t){t.component("m-list",a),t.component("m-list-divider",d),t.component("m-list-group",l),t.component("m-list-group-divider",f),t.component("m-list-group-subheader",p),t.component("m-list-item",I)}};e.default=y,Object(E.a)(y)},7:function(t,e,n){"use strict";function i(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",function(){return i})},8:function(t,e,n){"use strict";function i(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(r(n,e))return n;n=n.parentElement}return null}function r(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r})}},t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(i,r,function(t){return e[t]}.bind(null,r));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=62);function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,n});