Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcwv/checkbox

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcwv/checkbox - npm Package Compare versions

Comparing version 0.13.0-alpha.0 to 0.13.0-alpha.3

77

dist/mcwv.checkbox.min.js

@@ -1,5 +0,5 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.checkbox=t():(e.mcwv=e.mcwv||{},e.mcwv.checkbox=t())}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=22)}({22:function(e,t,i){i(79),e.exports=i(23)},23:function(e,t,i){},79:function(e,t,i){"use strict";i.r(t);
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.checkbox=t():(e.mcwv=e.mcwv||{},e.mcwv.checkbox=t())}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=20)}({1:function(e,t,i){"use strict";
/**
* @license
* Copyright 2016 Google Inc.
* Copyright 2019 Google Inc.
*

@@ -24,3 +24,25 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

*/
var n={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function a(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}function r(e,t){if(a(e)&&t in n){var i=e.document.createElement("div"),r=n[t],o=r.standard,s=r.prefixed;return r.cssProperty in i.style?o:s}return t}
var n;function a(e,t){if(void 0===e&&(e=window),void 0===t&&(t=!1),void 0===n||t){var i=!1;try{e.document.addEventListener("test",(function(){}),{get passive(){return i=!0}})}catch(e){}n=i}return!!n&&{passive:!0}}
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/function r(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}
/*! *****************************************************************************

@@ -39,3 +61,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function s(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var c=function(){return(c=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};
***************************************************************************** */i.r(t);var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};var s=function(){return(s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};
/**

@@ -63,6 +85,6 @@ * @license

*/
var d,u=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),l={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},h={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},p={ANIM_END_LATCH_MS:250},_=function(e){function t(i){var n=e.call(this,c({},t.defaultAdapter,i))||this;return n.currentCheckState_=h.TRANSITION_STATE_INIT,n.currentAnimationClass_="",n.animEndLatchTimer_=0,n.enableAnimationEndHandler_=!1,n}return s(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return h},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter_.addClass(l.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter_.setNativeControlDisabled(e),e?this.adapter_.addClass(l.DISABLED):this.adapter_.removeClass(l.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout((function(){e.adapter_.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1}),p.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter_.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var i=h.TRANSITION_STATE_UNCHECKED,n=l.SELECTED;t===i?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter_.forceLayout(),this.adapter_.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter_.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter_.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=h.TRANSITION_STATE_INDETERMINATE,t=h.TRANSITION_STATE_CHECKED,i=h.TRANSITION_STATE_UNCHECKED;return this.adapter_.isIndeterminate()?e:this.adapter_.isChecked()?t:i},t.prototype.getTransitionAnimationClass_=function(e,i){var n=h.TRANSITION_STATE_INIT,a=h.TRANSITION_STATE_CHECKED,r=h.TRANSITION_STATE_UNCHECKED,o=t.cssClasses,s=o.ANIM_UNCHECKED_CHECKED,c=o.ANIM_UNCHECKED_INDETERMINATE,d=o.ANIM_CHECKED_UNCHECKED,u=o.ANIM_CHECKED_INDETERMINATE,l=o.ANIM_INDETERMINATE_CHECKED,p=o.ANIM_INDETERMINATE_UNCHECKED;switch(e){case n:return i===r?"":i===a?l:p;case r:return i===a?s:c;case a:return i===r?d:u;default:return i===a?l:p}},t.prototype.updateAriaChecked_=function(){this.adapter_.isIndeterminate()?this.adapter_.setNativeControlAttr(h.ARIA_CHECKED_ATTR,h.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter_.removeNativeControlAttr(h.ARIA_CHECKED_ATTR)},t}(u);function f(e,t){if(void 0===e&&(e=window),void 0===t&&(t=!1),void 0===d||t){var i=!1;try{e.document.addEventListener("test",(function(){}),{get passive(){return i=!0}})}catch(e){}d=i}return!!d&&{passive:!0}}
var c,d=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),u={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"},l={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"},h={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
/**
* @license
* Copyright 2017 Google Inc.
* Copyright 2016 Google Inc.
*

@@ -86,3 +108,4 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

* THE SOFTWARE.
*/var m={ROOT:"mdc-form-field"},v={LABEL_SELECTOR:".mdc-form-field > label"},E=function(e){function t(i){var n=e.call(this,c({},t.defaultAdapter,i))||this;return n.clickHandler_=function(){return n.handleClick_()},n}return s(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return m},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return v},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_)},t.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_)},t.prototype.handleClick_=function(){var e=this;this.adapter_.activateInputRipple(),requestAnimationFrame((function(){return e.adapter_.deactivateInputRipple()}))},t}(u);const A={data:()=>({hasFocus:!1}),methods:{onMouseDown(){this._active=!0},onMouseUp(){this._active=!1},onFocusEvent(){setTimeout(()=>this.dispatchFocusEvent(),0)},onBlurEvent(){this._active||setTimeout(()=>this.dispatchFocusEvent(),0)},dispatchFocusEvent(){const e=this.$el===document.activeElement||this.$el.contains(document.activeElement);e!=this.hasFocus&&(this.$emit(e?"focus":"blur"),this.hasFocus=e)}},mounted(){this.$el.addEventListener("focusin",this.onFocusEvent),this.$el.addEventListener("focusout",this.onBlurEvent),this.$el.addEventListener("mousedown",this.onMouseDown),this.$el.addEventListener("mouseup",this.onMouseUp)},beforeDestroy(){this.$el.removeEventListener("focusin",this.onFocusEvent),this.$el.removeEventListener("focusout",this.onBlurEvent),this.$el.removeEventListener("mousedown",this.onMouseDown),this.$el.removeEventListener("mouseup",this.onMouseUp)}},C=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",b={beforeCreate(){this.vma_uid_=C+this._uid}};function g(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}
*/
var p=["touchstart","pointerdown","mousedown","keydown"],f=["touchend","pointerup","mouseup","contextmenu"],_=[],m=function(e){function t(i){var n=e.call(this,s({},t.defaultAdapter,i))||this;return n.activationAnimationHasEnded_=!1,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.fgScale_="0",n.frame_={width:0,height:0},n.initialSize_=0,n.layoutFrame_=0,n.maxRadius_=0,n.unboundedCoords_={left:0,top:0},n.activationState_=n.defaultActivationState_(),n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.activateHandler_=function(e){return n.activate_(e)},n.deactivateHandler_=function(){return n.deactivate_()},n.focusHandler_=function(){return n.handleFocus()},n.blurHandler_=function(){return n.handleBlur()},n.resizeHandler_=function(){return n.layout()},n}return function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return h},enumerable:!0,configurable:!0}),Object.defineProperty(t,"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}),t.prototype.init=function(){var e=this,i=this.supportsPressRipple_();if(this.registerRootHandlers_(i),i){var n=t.cssClasses,a=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.addClass(a),e.adapter_.isUnbounded()&&(e.adapter_.addClass(r),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_DEACTIVATION));var i=t.cssClasses,n=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.removeClass(n),e.adapter_.removeClass(a),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var i=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(i):this.adapter_.removeClass(i)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(p.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)})),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):f.forEach((function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;p.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_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),f.forEach((function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,i=t.strings;Object.keys(i).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(i[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var i=this.activationState_;if(!i.isActivated){var n=this.previousActivationEvent_;if(!(n&&void 0!==e&&n.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&_.length>0&&_.some((function(e){return t.adapter_.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(_.push(e.target),this.registerDeactivationHandlers_(e)),i.wasElementMadeActive=this.checkElementMadeActive_(e),i.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){_=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive_(e),i.wasElementMadeActive&&t.animateActivation_()),i.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter_.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,i=t.strings,n=i.VAR_FG_TRANSLATE_START,a=i.VAR_FG_TRANSLATE_END,r=t.cssClasses,o=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,c=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",u="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),h=l.startPoint,p=l.endPoint;d=h.x+"px, "+h.y+"px",u=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(n,d),this.adapter_.updateCssVariable(a,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(o),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),c)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,i=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var n,a,r=t.x,o=t.y,s=r+i.left,c=o+i.top;if("touchstart"===e.type){var d=e;n=d.changedTouches[0].pageX-s,a=d.changedTouches[0].pageY-c}else{var u=e;n=u.pageX-s,a=u.pageY-c}return{x:n,y:a}}(i,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,i=t.cssClasses.FG_DEACTIVATION,n=this.activationState_,a=n.hasDeactivationUXRun,r=n.isActivated;(a||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(i),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter_.removeClass(i)}),h.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var i=s({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(i)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(i),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var i=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?i:Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING;var n=Math.floor(i*t.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_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,i=e.VAR_FG_SIZE,n=e.VAR_LEFT,a=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(i,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(a,this.unboundedCoords_.top+"px"))},t}(d);class v extends m{constructor(e,t){super({addClass(t){e.$set(e.classes,t,!0)},browserSupportsCssVars:()=>(function(e,t){void 0===t&&(t=!1);var i=e.CSS,n=c;if("boolean"==typeof c&&!t)return c;if(!(i&&"function"==typeof i.supports))return!1;var a=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=!(!a&&!r)&&!function(e){var t=e.document,i=t.createElement("div");i.className="mdc-ripple-surface--test-edge-var-bug",t.head.appendChild(i);var n=e.getComputedStyle(i),a=null!==n&&"solid"===n.borderTopStyle;return i.parentNode&&i.parentNode.removeChild(i),a}(e),t||(c=n),n})(window),computeBoundingRect:()=>e.$el.getBoundingClientRect(),containsEventTarget:t=>e.$el.contains(t),deregisterDocumentInteractionHandler:(e,t)=>document.documentElement.removeEventListener(e,t,a()),deregisterInteractionHandler:(t,i)=>{e.$el.removeEventListener(t,i,a())},deregisterResizeHandler:e=>window.removeEventListener("resize",e),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>r(e.$el,":active"),isSurfaceDisabled:()=>e.disabled,isUnbounded:()=>!1,registerDocumentInteractionHandler:(e,t)=>document.documentElement.addEventListener(e,t,a()),registerInteractionHandler:(t,i)=>{e.$el.addEventListener(t,i,a())},registerResizeHandler:e=>window.addEventListener("resize",e),removeClass(t){e.$delete(e.classes,t)},updateCssVariable:(t,i)=>{e.$set(e.styles,t,i)},...t})}}const E={data:()=>({classes:{},styles:{}}),mounted(){this.ripple=new v(this),this.ripple.init()},beforeDestroy(){this.ripple.destroy()}};i.d(t,"RippleBase",(function(){return v})),i.d(t,"RippleMixin",(function(){return E}))},2:function(e,t,i){"use strict";function n(e){return{version:"__VERSION__",install:t=>{Object.entries(e).forEach(([e,i])=>{const n=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[a,...r]=n.split("-"),o=["mdc",...r].join("-"),s=["mcw",...r].join("-"),c=t.extend(i);t.component(s,c),t.component(o,c)})},components:e}}i.d(t,"a",(function(){return n}))},20:function(e,t,i){i(85),e.exports=i(21)},21:function(e,t,i){},6:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));const n=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",a={beforeCreate(){this.vma_uid_=n+this._uid}}},85:function(e,t,i){"use strict";i.r(t);var n=i(2),a={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};
/**

@@ -109,3 +132,17 @@ * @license

* THE SOFTWARE.
*/var T,y={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"},I={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"},N={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
*/function r(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}function o(e,t){if(r(e)&&t in a){var i=e.document.createElement("div"),n=a[t],o=n.standard,s=n.prefixed;return n.cssProperty in i.style?o:s}return t}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function c(e,t){function i(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var d=function(){return(d=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};
/**

@@ -133,3 +170,25 @@ * @license

*/
var D=["touchstart","pointerdown","mousedown","keydown"],S=["touchend","pointerup","mouseup","contextmenu"],k=[],R=function(e){function t(i){var n=e.call(this,c({},t.defaultAdapter,i))||this;return n.activationAnimationHasEnded_=!1,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.fgScale_="0",n.frame_={width:0,height:0},n.initialSize_=0,n.layoutFrame_=0,n.maxRadius_=0,n.unboundedCoords_={left:0,top:0},n.activationState_=n.defaultActivationState_(),n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.activateHandler_=function(e){return n.activate_(e)},n.deactivateHandler_=function(){return n.deactivate_()},n.focusHandler_=function(){return n.handleFocus()},n.blurHandler_=function(){return n.handleBlur()},n.resizeHandler_=function(){return n.layout()},n}return s(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return y},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return I},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return N},enumerable:!0,configurable:!0}),Object.defineProperty(t,"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}),t.prototype.init=function(){var e=this,i=this.supportsPressRipple_();if(this.registerRootHandlers_(i),i){var n=t.cssClasses,a=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.addClass(a),e.adapter_.isUnbounded()&&(e.adapter_.addClass(r),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_DEACTIVATION));var i=t.cssClasses,n=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.removeClass(n),e.adapter_.removeClass(a),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var i=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(i):this.adapter_.removeClass(i)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(D.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)})),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):S.forEach((function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;D.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_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),S.forEach((function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,i=t.strings;Object.keys(i).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(i[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var i=this.activationState_;if(!i.isActivated){var n=this.previousActivationEvent_;if(!(n&&void 0!==e&&n.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&k.length>0&&k.some((function(e){return t.adapter_.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(k.push(e.target),this.registerDeactivationHandlers_(e)),i.wasElementMadeActive=this.checkElementMadeActive_(e),i.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){k=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive_(e),i.wasElementMadeActive&&t.animateActivation_()),i.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter_.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,i=t.strings,n=i.VAR_FG_TRANSLATE_START,a=i.VAR_FG_TRANSLATE_END,r=t.cssClasses,o=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,c=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",u="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),h=l.startPoint,p=l.endPoint;d=h.x+"px, "+h.y+"px",u=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(n,d),this.adapter_.updateCssVariable(a,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(o),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),c)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,i=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var n,a,r=t.x,o=t.y,s=r+i.left,c=o+i.top;if("touchstart"===e.type){var d=e;n=d.changedTouches[0].pageX-s,a=d.changedTouches[0].pageY-c}else{var u=e;n=u.pageX-s,a=u.pageY-c}return{x:n,y:a}}(i,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,i=t.cssClasses.FG_DEACTIVATION,n=this.activationState_,a=n.hasDeactivationUXRun,r=n.isActivated;(a||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(i),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter_.removeClass(i)}),N.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var i=c({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(i)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(i),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var i=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?i:Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING,this.initialSize_=Math.floor(i*t.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,i=e.VAR_FG_SIZE,n=e.VAR_LEFT,a=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(i,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(a,this.unboundedCoords_.top+"px"))},t}(u);class H extends R{constructor(e,t){super({addClass(t){e.$set(e.classes,t,!0)},browserSupportsCssVars:()=>(function(e,t){void 0===t&&(t=!1);var i=e.CSS,n=T;if("boolean"==typeof T&&!t)return T;if(!(i&&"function"==typeof i.supports))return!1;var a=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=!(!a&&!r)&&!function(e){var t=e.document,i=t.createElement("div");i.className="mdc-ripple-surface--test-edge-var-bug",t.head.appendChild(i);var n=e.getComputedStyle(i),a=null!==n&&"solid"===n.borderTopStyle;return i.parentNode&&i.parentNode.removeChild(i),a}(e),t||(T=n),n})(window),computeBoundingRect:()=>e.$el.getBoundingClientRect(),containsEventTarget:t=>e.$el.contains(t),deregisterDocumentInteractionHandler:(e,t)=>document.documentElement.removeEventListener(e,t,f()),deregisterInteractionHandler:(t,i)=>{e.$el.removeEventListener(t,i,f())},deregisterResizeHandler:e=>window.removeEventListener("resize",e),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>g(e.$el,":active"),isSurfaceDisabled:()=>e.disabled,isUnbounded:()=>!1,registerDocumentInteractionHandler:(e,t)=>document.documentElement.addEventListener(e,t,f()),registerInteractionHandler:(t,i)=>{e.$el.addEventListener(t,i,f())},registerResizeHandler:e=>window.addEventListener("resize",e),removeClass(t){e.$delete(e.classes,t)},updateCssVariable:(t,i)=>{e.$set(e.styles,t,i)},...t})}}const O=["checked","indeterminate"];var w={name:"mcw-checkbox",mixins:[A,b],model:{prop:"checked",event:"change"},props:{checked:[Boolean,Array],indeterminate:Boolean,disabled:Boolean,label:String,"align-end":Boolean,value:{type:[String,Number],default:()=>"on"},name:String},data:()=>({styles:{},classes:{"mdc-checkbox":1}}),computed:{hasLabel(){return this.label||this.$slots.default},formFieldClasses(){return{"mdc-form-field":this.hasLabel,"mdc-form-field--align-end":this.hasLabel&&this.alignEnd}}},watch:{checked:"setChecked",disabled(e){this.foundation.setDisabled(e)},indeterminate:"setIndeterminate"},mounted(){const e={addClass:e=>this.$set(this.classes,e,!0),removeClass:e=>this.$delete(this.classes,e),setNativeControlAttr:(e,t)=>{this.$refs.control.setAttribute(e,t)},removeNativeControlAttr:e=>{this.$refs.control.removeAttribute(e)},isIndeterminate:()=>this.$refs.control.indeterminate,isChecked:()=>this.$refs.control.checked,hasNativeControl:()=>!0,setNativeControlDisabled:e=>this.$refs.control.disabled=e,forceLayout:()=>this.$refs.root.offsetWidth,isAttachedToDOM:()=>!0};this.foundation=new _(e),this.handleAnimationEnd_=()=>this.foundation.handleAnimationEnd(),this.$el.addEventListener(r(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_(),this.ripple=new H(this,{isUnbounded:()=>!0,isSurfaceActive:()=>H.isSurfaceActive(this.$refs.control),registerInteractionHandler:(e,t)=>{this.$refs.control.addEventListener(e,t,f())},deregisterInteractionHandler:(e,t)=>{this.$refs.control.removeEventListener(e,t,f())},computeBoundingRect:()=>this.$refs.root.getBoundingClientRect()}),this.formField=new E({registerInteractionHandler:(e,t)=>{this.$refs.label.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.$refs.label.removeEventListener(e,t)},activateInputRipple:()=>{this.ripple&&this.ripple.activate()},deactivateInputRipple:()=>{this.ripple&&this.ripple.deactivate()}}),this.foundation.init(),this.ripple.init(),this.formField.init(),this.setChecked(this.checked),this.foundation.setDisabled(this.disabled),this.setIndeterminate(this.indeterminate)},beforeDestroy(){this.$el.removeEventListener(r(window,"animationend"),this.handleAnimationEnd_),this.formField.destroy(),this.ripple.destroy(),this.uninstallPropertyChangeHooks_(),this.foundation.destroy()},methods:{setChecked(e){this.$refs.control.checked=Array.isArray(e)?e.indexOf(this.value)>-1:e},setIndeterminate(e){this.$refs.control.indeterminate=e},onChange(e,t){if(this.$emit("update:indeterminate",t),Array.isArray(this.checked)){const t=this.checked.indexOf(this.value);e?t<0&&this.$emit("change",this.checked.concat(this.value)):t>-1&&this.$emit("change",this.checked.slice(0,t).concat(this.checked.slice(t+1)))}else this.$emit("change",e)},installPropertyChangeHooks_(){const e=this.$refs.control,t=Object.getPrototypeOf(e);O.forEach(i=>{const n=Object.getOwnPropertyDescriptor(t,i);if(x(n)){const t={get:n.get,set:t=>{n.set.call(e,t),this.foundation.handleChange()},configurable:n.configurable,enumerable:n.enumerable};Object.defineProperty(e,i,t)}})},uninstallPropertyChangeHooks_(){const e=this.$refs.control,t=Object.getPrototypeOf(e);O.forEach(i=>{const n=Object.getOwnPropertyDescriptor(t,i);x(n)&&Object.defineProperty(e,i,n)})}},render(e){const{$scopedSlots:t}=this,i=e("input",{attrs:{name:this.name,value:this.value,type:"checkbox",id:this.vma_uid_,disabled:this.disabled},class:{"mdc-checkbox__native-control":1},on:{change:({target:{indeterminate:e,checked:t}})=>this.onChange(t,e)},ref:"control"}),n=e("div",{class:{"mdc-checkbox__background":1}},[e("svg",{class:{"mdc-checkbox__checkmark":1},attrs:{viewBox:"0 0 24 24"}},[e("path",{class:{"mdc-checkbox__checkmark-path":1},attrs:{fill:"none",stroke:"white",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}})]),e("div",{class:{"mdc-checkbox__mixedmark":1}})]),a=e("div",{class:this.classes,style:this.styles,ref:"root"},[i,n]),r=e("label",{attrs:{for:this.vma_uid_},ref:"label"},t.default&&t.default()||this.label);return e("div",{class:this.formFieldClasses},[a,r])}};function x(e){return!!e&&"function"==typeof e.set}i.d(t,"mcwCheckbox",(function(){return w}));var M;t.default={version:"__VERSION__",install:e=>{Object.entries(M).forEach(([t,i])=>{const n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[a,...r]=n.split("-"),o=["mdc",...r].join("-"),s=["mcw",...r].join("-"),c=e.extend(i);e.component(s,c),e.component(o,c)})},components:M={mcwCheckbox:w}}}})}));
var u,l=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),h={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},p={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},f={ANIM_END_LATCH_MS:250},_=function(e){function t(i){var n=e.call(this,d({},t.defaultAdapter,i))||this;return n.currentCheckState_=p.TRANSITION_STATE_INIT,n.currentAnimationClass_="",n.animEndLatchTimer_=0,n.enableAnimationEndHandler_=!1,n}return c(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return h},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter_.addClass(h.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter_.setNativeControlDisabled(e),e?this.adapter_.addClass(h.DISABLED):this.adapter_.removeClass(h.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout((function(){e.adapter_.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1}),f.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter_.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var i=p.TRANSITION_STATE_UNCHECKED,n=h.SELECTED;t===i?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter_.forceLayout(),this.adapter_.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter_.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter_.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=p.TRANSITION_STATE_INDETERMINATE,t=p.TRANSITION_STATE_CHECKED,i=p.TRANSITION_STATE_UNCHECKED;return this.adapter_.isIndeterminate()?e:this.adapter_.isChecked()?t:i},t.prototype.getTransitionAnimationClass_=function(e,i){var n=p.TRANSITION_STATE_INIT,a=p.TRANSITION_STATE_CHECKED,r=p.TRANSITION_STATE_UNCHECKED,o=t.cssClasses,s=o.ANIM_UNCHECKED_CHECKED,c=o.ANIM_UNCHECKED_INDETERMINATE,d=o.ANIM_CHECKED_UNCHECKED,u=o.ANIM_CHECKED_INDETERMINATE,l=o.ANIM_INDETERMINATE_CHECKED,h=o.ANIM_INDETERMINATE_UNCHECKED;switch(e){case n:return i===r?"":i===a?l:h;case r:return i===a?s:c;case a:return i===r?d:u;default:return i===a?l:h}},t.prototype.updateAriaChecked_=function(){this.adapter_.isIndeterminate()?this.adapter_.setNativeControlAttr(p.ARIA_CHECKED_ATTR,p.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter_.removeNativeControlAttr(p.ARIA_CHECKED_ATTR)},t}(l);function m(e,t){if(void 0===e&&(e=window),void 0===t&&(t=!1),void 0===u||t){var i=!1;try{e.document.addEventListener("test",(function(){}),{get passive(){return i=!0}})}catch(e){}u=i}return!!u&&{passive:!0}}
/**
* @license
* Copyright 2017 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var v={ROOT:"mdc-form-field"},E={LABEL_SELECTOR:".mdc-form-field > label"},A=function(e){function t(i){var n=e.call(this,d({},t.defaultAdapter,i))||this;return n.clickHandler_=function(){return n.handleClick_()},n}return c(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return v},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return E},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_)},t.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_)},t.prototype.handleClick_=function(){var e=this;this.adapter_.activateInputRipple(),requestAnimationFrame((function(){return e.adapter_.deactivateInputRipple()}))},t}(l),C=i(9),b=i(6),g=i(1);const y=["checked","indeterminate"];var T={name:"mcw-checkbox",mixins:[C.a,b.a],model:{prop:"checked",event:"change"},props:{checked:[Boolean,Array],indeterminate:Boolean,disabled:Boolean,label:String,"align-end":Boolean,value:{type:[String,Number],default:()=>"on"},name:String},data:()=>({styles:{},classes:{"mdc-checkbox":1}}),computed:{hasLabel(){return this.label||this.$slots.default},formFieldClasses(){return{"mdc-form-field":this.hasLabel,"mdc-form-field--align-end":this.hasLabel&&this.alignEnd}}},watch:{checked:"setChecked",disabled(e){this.foundation.setDisabled(e)},indeterminate:"setIndeterminate"},mounted(){const e={addClass:e=>this.$set(this.classes,e,!0),removeClass:e=>this.$delete(this.classes,e),setNativeControlAttr:(e,t)=>{this.$refs.control.setAttribute(e,t)},removeNativeControlAttr:e=>{this.$refs.control.removeAttribute(e)},isIndeterminate:()=>this.$refs.control.indeterminate,isChecked:()=>this.$refs.control.checked,hasNativeControl:()=>!0,setNativeControlDisabled:e=>this.$refs.control.disabled=e,forceLayout:()=>this.$refs.root.offsetWidth,isAttachedToDOM:()=>!0};this.foundation=new _(e),this.handleAnimationEnd_=()=>this.foundation.handleAnimationEnd(),this.$el.addEventListener(o(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_(),this.ripple=new g.RippleBase(this,{isUnbounded:()=>!0,isSurfaceActive:()=>g.RippleBase.isSurfaceActive(this.$refs.control),registerInteractionHandler:(e,t)=>{this.$refs.control.addEventListener(e,t,m())},deregisterInteractionHandler:(e,t)=>{this.$refs.control.removeEventListener(e,t,m())},computeBoundingRect:()=>this.$refs.root.getBoundingClientRect()}),this.formField=new A({registerInteractionHandler:(e,t)=>{this.$refs.label.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.$refs.label.removeEventListener(e,t)},activateInputRipple:()=>{this.ripple&&this.ripple.activate()},deactivateInputRipple:()=>{this.ripple&&this.ripple.deactivate()}}),this.foundation.init(),this.ripple.init(),this.formField.init(),this.setChecked(this.checked),this.foundation.setDisabled(this.disabled),this.setIndeterminate(this.indeterminate)},beforeDestroy(){this.$el.removeEventListener(o(window,"animationend"),this.handleAnimationEnd_),this.formField.destroy(),this.ripple.destroy(),this.uninstallPropertyChangeHooks_(),this.foundation.destroy()},methods:{setChecked(e){this.$refs.control.checked=Array.isArray(e)?e.indexOf(this.value)>-1:e},setIndeterminate(e){this.$refs.control.indeterminate=e},onChange(e,t){if(this.$emit("update:indeterminate",t),Array.isArray(this.checked)){const t=this.checked.indexOf(this.value);e?t<0&&this.$emit("change",this.checked.concat(this.value)):t>-1&&this.$emit("change",this.checked.slice(0,t).concat(this.checked.slice(t+1)))}else this.$emit("change",e)},installPropertyChangeHooks_(){const e=this.$refs.control,t=Object.getPrototypeOf(e);y.forEach(i=>{const n=Object.getOwnPropertyDescriptor(t,i);if(I(n)){const t={get:n.get,set:t=>{n.set.call(e,t),this.foundation.handleChange()},configurable:n.configurable,enumerable:n.enumerable};Object.defineProperty(e,i,t)}})},uninstallPropertyChangeHooks_(){const e=this.$refs.control,t=Object.getPrototypeOf(e);y.forEach(i=>{const n=Object.getOwnPropertyDescriptor(t,i);I(n)&&Object.defineProperty(e,i,n)})}},render(e){const{$scopedSlots:t}=this,i=e("input",{attrs:{name:this.name,value:this.value,type:"checkbox",id:this.vma_uid_,disabled:this.disabled},class:{"mdc-checkbox__native-control":1},on:{change:({target:{indeterminate:e,checked:t}})=>this.onChange(t,e)},ref:"control"}),n=e("div",{class:{"mdc-checkbox__background":1}},[e("svg",{class:{"mdc-checkbox__checkmark":1},attrs:{viewBox:"0 0 24 24"}},[e("path",{class:{"mdc-checkbox__checkmark-path":1},attrs:{fill:"none",stroke:"white",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}})]),e("div",{class:{"mdc-checkbox__mixedmark":1}})]),a=e("div",{class:this.classes,style:this.styles,ref:"root"},[i,n]),r=e("label",{attrs:{for:this.vma_uid_},ref:"label"},t.default&&t.default()||this.label);return e("div",{class:this.formFieldClasses},[a,r])}};function I(e){return!!e&&"function"==typeof e.set}i.d(t,"mcwCheckbox",(function(){return T}));t.default=Object(n.a)({mcwCheckbox:T})},9:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));const n={data:()=>({hasFocus:!1}),methods:{onMouseDown(){this._active=!0},onMouseUp(){this._active=!1},onFocusEvent(){setTimeout(()=>this.dispatchFocusEvent(),0)},onBlurEvent(){this._active||setTimeout(()=>this.dispatchFocusEvent(),0)},dispatchFocusEvent(){const e=this.$el===document.activeElement||this.$el.contains(document.activeElement);e!=this.hasFocus&&(this.$emit(e?"focus":"blur"),this.hasFocus=e)}},mounted(){this.$el.addEventListener("focusin",this.onFocusEvent),this.$el.addEventListener("focusout",this.onBlurEvent),this.$el.addEventListener("mousedown",this.onMouseDown),this.$el.addEventListener("mouseup",this.onMouseUp)},beforeDestroy(){this.$el.removeEventListener("focusin",this.onFocusEvent),this.$el.removeEventListener("focusout",this.onBlurEvent),this.$el.removeEventListener("mousedown",this.onMouseDown),this.$el.removeEventListener("mouseup",this.onMouseUp)}}}})}));
//# sourceMappingURL=mcwv.checkbox.min.js.map

8

package.json
{
"name": "@mcwv/checkbox",
"description": "The Vue Material Adapter for the web checkbox component",
"version": "0.13.0-alpha.0",
"version": "0.13.0-alpha.3",
"license": "MIT",

@@ -22,6 +22,6 @@ "main": "dist/mcwv.checkbox.min.js",

"@material/form-field": "^4.0.0",
"@mcwv/base": "^0.12.0",
"@mcwv/ripple": "^0.13.0-alpha.0"
"@mcwv/base": "^0.13.0-alpha.3",
"@mcwv/ripple": "^0.13.0-alpha.3"
},
"gitHead": "c3d659d8f26cd12576cfcf98f3c2b1d4845ae37a"
"gitHead": "d9bdb4858747391e6b6c31faa1c9c6f7a4ee9bf0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc