@mcwv/dialog
Advanced tools
Comparing version 0.1.12 to 0.2.0
@@ -1,24 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dialog=e():(t.mcwv=t.mcwv||{},t.mcwv.dialog=e())}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28)}({0:function(t,e,n){"use strict";function i(t,e,n,i,a,o,r,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),r?(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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):a&&(c=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",function(){return i})},10:function(t,e,n){"use strict";n.r(e);var i=n(3),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("custom-button",t._g({ref:"root",class:t.classes,style:t.styles,attrs:{href:t.href,link:t.link,disabled:t.disabled}},t.listeners),[n("span",{staticClass:"mdc-button__label"},[t._t("default")],2)])};a._withStripped=!0;var o=n(6),r=n(12),s=n(2),c={name:"mdc-button-base",mixins:[o.a,r.b,s.RippleMixin],data:()=>({classes:{},styles:{}})},u=n(0),d=Object(u.a)(c,a,[],!1,null,null,null);d.options.__file="packages/mcwv-button/mdc-button-base.vue";var l=d.exports,p={name:"mdc-button",extends:l,props:{raised:Boolean,unelevated:Boolean,outlined:Boolean,dense:Boolean},data(){return{classes:{"mdc-button":!0,"mdc-button--raised":this.raised,"mdc-button--unelevated":this.unelevated,"mdc-button--outlined":this.outlined,"mdc-button--dense":this.dense}}},watch:{raised(){this.$set(this.classes,"mdc-button--raised",this.raised)},unelevated(){this.$set(this.classes,"mdc-button--unelevated",this.unelevated)},outlined(){this.$set(this.classes,"mdc-button--outlined",this.outlined)},dense(){this.$set(this.classes,"mdc-button--dense",this.dense)}}},f=Object(u.a)(p,void 0,void 0,!1,null,null,null);f.options.__file="packages/mcwv-button/mdc-button.vue";var _=f.exports;n.d(e,"mdcButtonBase",function(){return l}),n.d(e,"mdcButton",function(){return _});e.default=Object(i.a)({mdcButton:_})},12:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});const i={name:"custom-button",functional:!0,props:{link:Object},render(t,e){let n;const i=Object.assign({},e.data);return e.props.link&&e.parent.$router?(n=e.parent.$root.$options.components.RouterLink,i.props=Object.assign({tag:e.props.tag},e.props.link),i.attrs.role="button",i.on.click&&(i.nativeOn={click:i.on.click})):i.attrs&&i.attrs.href?(n="a",i.attrs.role="button"):n="button",t(n,i,e.children)}},a={props:{href:String,disabled:Boolean,to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomButton:i}}},15:function(t,e,n){var i,a=n(29),o=n(30),r=(i=[],{activateTrap:function(t){if(i.length>0){var e=i[i.length-1];e!==t&&e.pause()}var n=i.indexOf(t);-1===n?i.push(t):(i.splice(n,1),i.push(t))},deactivateTrap:function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1),i.length>0&&i[i.length-1].unpause()}});function s(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,i="string"==typeof t?n.querySelector(t):t,c=o({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},d={activate:function(t){if(!u.active){b(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:c.onActivate;return e&&e(),p(),d}},deactivate:l,pause:function(){!u.paused&&u.active&&(u.paused=!0,f())},unpause:function(){u.paused&&u.active&&(u.paused=!1,p())}};return d;function l(t){if(u.active){f(),u.active=!1,u.paused=!1,r.deactivateTrap(d);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:c.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:c.returnFocusOnDeactivate)&&s(function(){C(u.nodeFocusedBeforeActivation)}),d}}function p(){if(u.active)return r.activateTrap(d),b(),s(function(){C(h())}),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,!0),n.addEventListener("touchstart",m,!0),n.addEventListener("click",g,!0),n.addEventListener("keydown",y,!0),d}function f(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",g,!0),n.removeEventListener("keydown",y,!0),d}function _(t){var e=c[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function h(){var t;if(!(t=null!==_("initialFocus")?_("initialFocus"):i.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||_("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function m(t){i.contains(t.target)||(c.clickOutsideDeactivates?l({returnFocus:!a.isFocusable(t.target)}):t.preventDefault())}function v(t){i.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),C(u.mostRecentlyFocusedNode||h()))}function y(t){if(!1!==c.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void l();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){if(b(),t.shiftKey&&t.target===u.firstTabbableNode)return t.preventDefault(),void C(u.lastTabbableNode);t.shiftKey||t.target!==u.lastTabbableNode||(t.preventDefault(),C(u.firstTabbableNode))}(t)}function g(t){c.clickOutsideDeactivates||i.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function b(){var t=a(i);u.firstTabbableNode=t[0]||h(),u.lastTabbableNode=t[t.length-1]||h()}function C(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),u.mostRecentlyFocusedNode=t,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(t)&&t.select()):C(h()))}}},2:function(t,e,n){"use strict";n.r(e);var i=n(3),a=function(){var t=this.$createElement;return(this._self._c||t)("custom-element",{staticClass:"mdc-ripple",attrs:{tag:this.tag,classes:this.classes,styles:this.styles}},[this._t("default")],2)};a._withStripped=!0;var o=n(4); | ||
/** | ||
* @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(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)} | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dialog=e():(t.mcwv=t.mcwv||{},t.mcwv.dialog=e())}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=27)}({1:function(t,e,n){"use strict";n.r(e);var i=n(2),a=n(3);function o(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)} | ||
/*! ***************************************************************************** | ||
@@ -37,3 +15,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
and limitations under the License. | ||
***************************************************************************** */var s=function(t,e){return(s=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)};var c=function(){return(c=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)}; | ||
***************************************************************************** */var r=function(t,e){return(r=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)};var s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)}; | ||
/** | ||
@@ -61,3 +39,3 @@ * @license | ||
*/ | ||
var u,d,l=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),p={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"},f={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"},_={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};function h(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===d||e){var n=!1;try{t.document.addEventListener("test",function(){},{get passive(){return n=!0}})}catch(t){}d=n}return!!d&&{passive:!0}} | ||
var c,u,d=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),l={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"},p={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"},f={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};function h(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===u||e){var n=!1;try{t.document.addEventListener("test",function(){},{get passive(){return n=!0}})}catch(t){}u=n}return!!u&&{passive:!0}} | ||
/** | ||
@@ -85,3 +63,3 @@ * @license | ||
*/ | ||
var m=["touchstart","pointerdown","mousedown","keydown"],v=["touchend","pointerup","mouseup","contextmenu"],y=[],g=function(t){function e(n){var i=t.call(this,c({},e.defaultAdapter,n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(t){return i.activate_(t)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _},enumerable:!0,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,a=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(a),t.adapter_.isUnbounded()&&(t.adapter_.addClass(o),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,a=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(a),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(m.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_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):v.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;m.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_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),v.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(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&&y.length>0&&y.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(y.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){y=[],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_())}))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,a=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,r=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var u="",d="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),p=l.startPoint,f=l.endPoint;u=p.x+"px, "+p.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter_.updateCssVariable(i,u),this.adapter_.updateCssVariable(a,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(r),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,a,o=e.x,r=e.y,s=o+n.left,c=r+n.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,a=u.changedTouches[0].pageY-c}else{var d=t;i=d.pageX-s,a=d.pageY-c}return{x:i,y:a}}(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}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,a=i.hasDeactivationUXRun,o=i.isActivated;(a||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},_.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=c({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(a,this.unboundedCoords_.top+"px"))},e}(l);class b extends g{static get MATCHES(){return b._matches||(b._matches=r(HTMLElement.prototype))}static isSurfaceActive(t){return t[b.MATCHES](":active")}constructor(t,e){super(Object.assign({browserSupportsCssVars:()=>(function(t,e){void 0===e&&(e=!1);var n=t.CSS,i=u;if("boolean"==typeof u&&!e)return u;if(!n||"function"!=typeof n.supports)return!1;var a=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!a&&!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),a=null!==i&&"solid"===i.borderTopStyle;return n.remove(),a}(t)),e||(u=i),i})(window),isUnbounded:()=>!1,isSurfaceActive:()=>t.$el[b.MATCHES](":active"),isSurfaceDisabled:()=>t.disabled,addClass(e){t.$set(t.classes,e,!0)},removeClass(e){t.$delete(t.classes,e)},containsEventTarget:e=>t.$el.contains(e),registerInteractionHandler:(e,n)=>{t.$el.addEventListener(e,n,h())},deregisterInteractionHandler:(e,n)=>{t.$el.removeEventListener(e,n,h())},registerDocumentInteractionHandler:(t,e)=>document.documentElement.addEventListener(t,e,h()),deregisterDocumentInteractionHandler:(t,e)=>document.documentElement.removeEventListener(t,e,h()),registerResizeHandler:t=>window.addEventListener("resize",t),deregisterResizeHandler:t=>window.removeEventListener("resize",t),updateCssVariable:(e,n)=>{t.$set(t.styles,e,n)},computeBoundingRect:()=>t.$el.getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})},e))}}const C={data:()=>({classes:{},styles:{}}),mounted(){this.ripple=new b(this),this.ripple.init()},beforeDestroy(){this.ripple.destroy()}};var E={name:"mdc-ripple",mixins:[o.b,C],props:{tag:String}},A=n(0),T=Object(A.a)(E,a,[],!1,null,null,null);T.options.__file="packages/mcwv-ripple/mdc-ripple.vue";var O=T.exports;n.d(e,"RippleBase",function(){return b}),n.d(e,"RippleMixin",function(){return C}),n.d(e,"mdcRipple",function(){return O});e.default=Object(i.a)({mdcRipple:O})},28:function(t,e,n){n(94),t.exports=n(31)},29:function(t,e){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],i=n.join(","),a="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(t,e){e=e||{};var n,o,s,c=[],l=[],f=new p(t.ownerDocument||t),_=t.querySelectorAll(i);for(e.includeContainer&&a.call(t,i)&&(_=Array.prototype.slice.apply(_)).unshift(t),n=0;n<_.length;n++)r(o=_[n],f)&&(0===(s=u(o))?c.push(o):l.push({documentOrder:n,tabIndex:s,node:o}));return l.sort(d).map(function(t){return t.node}).concat(c)}function r(t,e){return!(!s(t,e)||function(t){return function(t){return l(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e=function(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}(t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'));return!e||e===t}(t)}(t)||u(t)<0)}function s(t,e){return e=e||new p(t.ownerDocument||t),!(t.disabled||function(t){return l(t)&&"hidden"===t.type}(t)||e.isUntouchable(t))}o.isTabbable=function(t,e){if(!t)throw new Error("No node provided");return!1!==a.call(t,i)&&r(t,e)},o.isFocusable=function(t,e){if(!t)throw new Error("No node provided");return!1!==a.call(t,c)&&s(t,e)};var c=n.concat("iframe").join(",");function u(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:t.tabIndex:e}function d(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function l(t){return"INPUT"===t.tagName}function p(t){this.doc=t,this.cache=[]}p.prototype.hasDisplayNone=function(t,e){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=function(t,e){for(var n=0,i=t.length;n<i;n++)if(e(t[n]))return t[n]}(this.cache,function(e){return e===t});if(n)return n[1];var i=!1;return"none"===(e=e||this.doc.defaultView.getComputedStyle(t)).display?i=!0:t.parentNode&&(i=this.hasDisplayNone(t.parentNode)),this.cache.push([t,i]),i},p.prototype.isUntouchable=function(t){if(t===this.doc.documentElement)return!1;var e=this.doc.defaultView.getComputedStyle(t);return!!this.hasDisplayNone(t,e)||"hidden"===e.visibility},t.exports=o},3:function(t,e,n){"use strict";function i(t){return{version:"__VERSION__",install:e=>{for(let n in t){let i=t[n];e.component(i.name,i)}},components:t}}n.d(e,"a",function(){return i})},30:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var a in i)n.call(i,a)&&(t[a]=i[a])}return t};var n=Object.prototype.hasOwnProperty},31:function(t,e,n){},4:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});const i={functional:!0,render:(t,e)=>t(e.props.is||e.props.tag||"div",e.data,e.children)},a={components:{CustomElement:i}}},6:function(t,e,n){"use strict";n.d(e,"a",function(){return i});const i={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){let t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}}},7:function(t,e,n){"use strict";n.d(e,"a",function(){return a});const i=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",a={beforeCreate(){this.vma_uid_=i+this._uid}}},94:function(t,e,n){"use strict";n.r(e);var i=n(3),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"root",staticClass:"mdc-dialog",class:t.classes,style:t.styles,attrs:{"aria-modal":"true","aria-labelledby":"label"+t.vma_uid_,"aria-describedby":"desc"+t.vma_uid_,role:"alertdialog"},on:{click:t.onClick,keydown:t.onClick}},[n("div",{ref:"container",staticClass:"mdc-dialog__container"},[n("div",{ref:"surface",staticClass:"mdc-dialog__surface",class:t.surfaceClasses},[t.title?n("h2",{staticClass:"mdc-dialog__title",attrs:{id:"label"+t.vma_uid_}},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),n("div",{ref:"content",staticClass:"mdc-dialog__content",attrs:{id:"desc"+t.vma_uid_}},[t._t("default")],2),t._v(" "),t.accept||t.cancel?n("footer",{staticClass:"mdc-dialog__actions"},[t.cancel?n("button",{staticClass:"mdc-button mdc-dialog__button",attrs:{type:"button","data-mdc-dialog-action":"no"}},[t._v(t._s(t.cancel))]):t._e(),t._v(" "),n("button",{ref:"defaultButton",staticClass:"mdc-button mdc-dialog__button",attrs:{type:"button",disabled:t.acceptDisabled,"data-mdc-dialog-action":"yes"}},[t._v(t._s(t.accept))])]):t._e()])]),t._v(" "),n("div",{staticClass:"mdc-dialog__scrim"})])};a._withStripped=!0; | ||
var _=["touchstart","pointerdown","mousedown","keydown"],m=["touchend","pointerup","mouseup","contextmenu"],v=[],y=function(t){function e(n){var i=t.call(this,s({},e.defaultAdapter,n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(t){return i.activate_(t)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,a=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(a),t.adapter_.isUnbounded()&&(t.adapter_.addClass(o),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,a=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(a),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(_.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_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):m.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;_.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_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),m.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(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&&v.length>0&&v.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(v.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){v=[],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_())}))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,a=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,r=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var u="",d="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),p=l.startPoint,f=l.endPoint;u=p.x+"px, "+p.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter_.updateCssVariable(i,u),this.adapter_.updateCssVariable(a,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(r),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,a,o=e.x,r=e.y,s=o+n.left,c=r+n.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,a=u.changedTouches[0].pageY-c}else{var d=t;i=d.pageX-s,a=d.pageY-c}return{x:i,y:a}}(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}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,a=i.hasDeactivationUXRun,o=i.isActivated;(a||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},f.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=s({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(a,this.unboundedCoords_.top+"px"))},e}(d);class g extends y{static get MATCHES(){return g._matches||(g._matches=o(HTMLElement.prototype))}static isSurfaceActive(t){return t[g.MATCHES](":active")}constructor(t,e){super(Object.assign({browserSupportsCssVars:()=>(function(t,e){void 0===e&&(e=!1);var n=t.CSS,i=c;if("boolean"==typeof c&&!e)return c;if(!n||"function"!=typeof n.supports)return!1;var a=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!a&&!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),a=null!==i&&"solid"===i.borderTopStyle;return n.remove(),a}(t)),e||(c=i),i})(window),isUnbounded:()=>!1,isSurfaceActive:()=>t.$el[g.MATCHES](":active"),isSurfaceDisabled:()=>t.disabled,addClass(e){t.$set(t.classes,e,!0)},removeClass(e){t.$delete(t.classes,e)},containsEventTarget:e=>t.$el.contains(e),registerInteractionHandler:(e,n)=>{t.$el.addEventListener(e,n,h())},deregisterInteractionHandler:(e,n)=>{t.$el.removeEventListener(e,n,h())},registerDocumentInteractionHandler:(t,e)=>document.documentElement.addEventListener(t,e,h()),deregisterDocumentInteractionHandler:(t,e)=>document.documentElement.removeEventListener(t,e,h()),registerResizeHandler:t=>window.addEventListener("resize",t),deregisterResizeHandler:t=>window.removeEventListener("resize",t),updateCssVariable:(e,n)=>{t.$set(t.styles,e,n)},computeBoundingRect:()=>t.$el.getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})},e))}}const b={data:()=>({classes:{},styles:{}}),mounted(){this.ripple=new g(this),this.ripple.init()},beforeDestroy(){this.ripple.destroy()}};var E={name:"mdc-ripple",mixins:[a.b,b],props:{tag:String},render(t){return t("custom-element",{class:{...this.classes,"mdc-ripple":1},style:this.styles,props:{tag:this.tag}},this.$slots.default)}};n.d(e,"RippleBase",function(){return g}),n.d(e,"RippleMixin",function(){return b}),n.d(e,"mdcRipple",function(){return E});e.default=Object(i.a)({mdcRipple:E})},11:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});const i={name:"custom-button",functional:!0,props:{link:Object},render(t,e){let n;const i=Object.assign({},e.data);return e.props.link&&e.parent.$router?(n=e.parent.$root.$options.components.RouterLink,i.props=Object.assign({tag:e.props.tag},e.props.link),i.attrs.role="button",i.on.click&&(i.nativeOn={click:i.on.click})):i.attrs&&i.attrs.href?(n="a",i.attrs.role="button"):n="button",t(n,i,e.children)}},a={props:{href:String,disabled:Boolean,to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomButton:i}}},14:function(t,e,n){var i,a=n(28),o=n(29),r=(i=[],{activateTrap:function(t){if(i.length>0){var e=i[i.length-1];e!==t&&e.pause()}var n=i.indexOf(t);-1===n?i.push(t):(i.splice(n,1),i.push(t))},deactivateTrap:function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1),i.length>0&&i[i.length-1].unpause()}});function s(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,i="string"==typeof t?n.querySelector(t):t,c=o({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},d={activate:function(t){if(!u.active){b(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:c.onActivate;return e&&e(),p(),d}},deactivate:l,pause:function(){!u.paused&&u.active&&(u.paused=!0,f())},unpause:function(){u.paused&&u.active&&(u.paused=!1,p())}};return d;function l(t){if(u.active){f(),u.active=!1,u.paused=!1,r.deactivateTrap(d);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:c.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:c.returnFocusOnDeactivate)&&s(function(){E(u.nodeFocusedBeforeActivation)}),d}}function p(){if(u.active)return r.activateTrap(d),b(),s(function(){E(_())}),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,!0),n.addEventListener("touchstart",m,!0),n.addEventListener("click",g,!0),n.addEventListener("keydown",y,!0),d}function f(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",g,!0),n.removeEventListener("keydown",y,!0),d}function h(t){var e=c[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function _(){var t;if(!(t=null!==h("initialFocus")?h("initialFocus"):i.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||h("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function m(t){i.contains(t.target)||(c.clickOutsideDeactivates?l({returnFocus:!a.isFocusable(t.target)}):t.preventDefault())}function v(t){i.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||_()))}function y(t){if(!1!==c.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void l();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){if(b(),t.shiftKey&&t.target===u.firstTabbableNode)return t.preventDefault(),void E(u.lastTabbableNode);t.shiftKey||t.target!==u.lastTabbableNode||(t.preventDefault(),E(u.firstTabbableNode))}(t)}function g(t){c.clickOutsideDeactivates||i.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function b(){var t=a(i);u.firstTabbableNode=t[0]||_(),u.lastTabbableNode=t[t.length-1]||_()}function E(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),u.mostRecentlyFocusedNode=t,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(t)&&t.select()):E(_()))}}},2:function(t,e,n){"use strict";function i(t){return{version:"__VERSION__",install:e=>{for(const n in t){const i=t[n];e.component(i.name,i)}},components:t}}n.d(e,"a",function(){return i})},27:function(t,e,n){n(88),t.exports=n(30)},28:function(t,e){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],i=n.join(","),a="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(t,e){e=e||{};var n,o,s,c=[],l=[],f=new p(t.ownerDocument||t),h=t.querySelectorAll(i);for(e.includeContainer&&a.call(t,i)&&(h=Array.prototype.slice.apply(h)).unshift(t),n=0;n<h.length;n++)r(o=h[n],f)&&(0===(s=u(o))?c.push(o):l.push({documentOrder:n,tabIndex:s,node:o}));return l.sort(d).map(function(t){return t.node}).concat(c)}function r(t,e){return!(!s(t,e)||function(t){return function(t){return l(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e=function(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}(t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'));return!e||e===t}(t)}(t)||u(t)<0)}function s(t,e){return e=e||new p(t.ownerDocument||t),!(t.disabled||function(t){return l(t)&&"hidden"===t.type}(t)||e.isUntouchable(t))}o.isTabbable=function(t,e){if(!t)throw new Error("No node provided");return!1!==a.call(t,i)&&r(t,e)},o.isFocusable=function(t,e){if(!t)throw new Error("No node provided");return!1!==a.call(t,c)&&s(t,e)};var c=n.concat("iframe").join(",");function u(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:t.tabIndex:e}function d(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function l(t){return"INPUT"===t.tagName}function p(t){this.doc=t,this.cache=[]}p.prototype.hasDisplayNone=function(t,e){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=function(t,e){for(var n=0,i=t.length;n<i;n++)if(e(t[n]))return t[n]}(this.cache,function(e){return e===t});if(n)return n[1];var i=!1;return"none"===(e=e||this.doc.defaultView.getComputedStyle(t)).display?i=!0:t.parentNode&&(i=this.hasDisplayNone(t.parentNode)),this.cache.push([t,i]),i},p.prototype.isUntouchable=function(t){if(t===this.doc.documentElement)return!1;var e=this.doc.defaultView.getComputedStyle(t);return!!this.hasDisplayNone(t,e)||"hidden"===e.visibility},t.exports=o},29:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var a in i)n.call(i,a)&&(t[a]=i[a])}return t};var n=Object.prototype.hasOwnProperty},3:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});const i={functional:!0,render:(t,e)=>t(e.props.is||e.props.tag||"div",e.data,e.children)},a={components:{CustomElement:i}}},30:function(t,e,n){},5:function(t,e,n){"use strict";n.d(e,"a",function(){return i});const i={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){const t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}}},6:function(t,e,n){"use strict";n.d(e,"a",function(){return a});const i=Math.floor(Math.random()*Math.floor(268435456)).toString()+"-",a={beforeCreate(){this.vma_uid_=i+this._uid}}},88:function(t,e,n){"use strict";n.r(e);var i=n(2),a=function(t,e){return(a=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)}; | ||
/*! ***************************************************************************** | ||
@@ -100,3 +78,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
and limitations under the License. | ||
***************************************************************************** */var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var r=function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)}; | ||
***************************************************************************** */var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)}; | ||
/** | ||
@@ -124,3 +102,3 @@ * @license | ||
*/ | ||
var s=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),c={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},u={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DEFAULT_BUTTON_SELECTOR:".mdc-dialog__button--default",DESTROY_ACTION:"destroy",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},d={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},l=function(t){function e(n){var i=t.call(this,r({},e.defaultAdapter,n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=u.CLOSE_ACTION,i.scrimClickAction_=u.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i}return function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return d},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.hasClass(c.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(u.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter_.notifyOpening(),this.adapter_.addClass(c.OPENING),this.runNextAnimationFrame_(function(){t.adapter_.addClass(c.OPEN),t.adapter_.addBodyClass(c.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout(function(){t.handleAnimationTimerEnd_(),t.adapter_.trapFocus(),t.adapter_.notifyOpened()},d.DIALOG_ANIMATION_OPEN_TIME_MS)})},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter_.notifyClosing(t),this.adapter_.addClass(c.CLOSING),this.adapter_.removeClass(c.OPEN),this.adapter_.removeBodyClass(c.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout(function(){e.adapter_.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter_.notifyClosed(t)},d.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.handleInteraction=function(t){var e="click"===t.type,n="Enter"===t.key||13===t.keyCode,i="Space"===t.key||32===t.keyCode,a=this.adapter_.eventTargetMatches(t.target,u.SCRIM_SELECTOR),o=!this.adapter_.eventTargetMatches(t.target,u.SUPPRESS_DEFAULT_PRESS_SELECTOR);if(e&&a&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else if(e||i||n){var r=this.adapter_.getActionFromEvent(t);r?this.close(r):n&&o&&this.adapter_.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter_.removeClass(c.OPENING),this.adapter_.removeClass(c.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},e.prototype.detectStackedButtons_=function(){this.adapter_.removeClass(c.STACKED);var t=this.adapter_.areButtonsStacked();t&&this.adapter_.addClass(c.STACKED),t!==this.areButtonsStacked_&&(this.adapter_.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter_.removeClass(c.SCROLLABLE),this.adapter_.isContentScrollable()&&this.adapter_.addClass(c.SCROLLABLE)},e}(s),p=n(15),f=n.n(p);var _=n(10),h=n(7);function m(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}const v=l.strings;var y={name:"mdc-dialog",components:{mdcButton:_.mdcButton},mixins:[h.a],model:{prop:"open",event:"change"},props:{title:{type:String},accept:{type:String,default:"Ok"},acceptDisabled:Boolean,acceptRaised:{type:Boolean,default:!1},cancel:{type:String},cancelRaised:{type:Boolean,default:!1},accent:Boolean,scrollable:Boolean,open:Boolean},data(){return{classes:{"mdc-theme--dark":this.dark},styles:{},surfaceClasses:{},bodyClasses:{"mdc-dialog__body--scrollable":this.scrollable}}},watch:{open:"onOpen_"},mounted(){ | ||
var r=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),s={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},c={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DEFAULT_BUTTON_SELECTOR:".mdc-dialog__button--default",DESTROY_ACTION:"destroy",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},u={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},d=function(t){function e(n){var i=t.call(this,o({},e.defaultAdapter,n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=c.CLOSE_ACTION,i.scrimClickAction_=c.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i}return function(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.hasClass(s.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(c.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter_.notifyOpening(),this.adapter_.addClass(s.OPENING),this.runNextAnimationFrame_(function(){t.adapter_.addClass(s.OPEN),t.adapter_.addBodyClass(s.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout(function(){t.handleAnimationTimerEnd_(),t.adapter_.trapFocus(),t.adapter_.notifyOpened()},u.DIALOG_ANIMATION_OPEN_TIME_MS)})},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter_.notifyClosing(t),this.adapter_.addClass(s.CLOSING),this.adapter_.removeClass(s.OPEN),this.adapter_.removeBodyClass(s.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout(function(){e.adapter_.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter_.notifyClosed(t)},u.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.handleInteraction=function(t){var e="click"===t.type,n="Enter"===t.key||13===t.keyCode,i="Space"===t.key||32===t.keyCode,a=this.adapter_.eventTargetMatches(t.target,c.SCRIM_SELECTOR),o=!this.adapter_.eventTargetMatches(t.target,c.SUPPRESS_DEFAULT_PRESS_SELECTOR);if(e&&a&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else if(e||i||n){var r=this.adapter_.getActionFromEvent(t);r?this.close(r):n&&o&&this.adapter_.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter_.removeClass(s.OPENING),this.adapter_.removeClass(s.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},e.prototype.detectStackedButtons_=function(){this.adapter_.removeClass(s.STACKED);var t=this.adapter_.areButtonsStacked();t&&this.adapter_.addClass(s.STACKED),t!==this.areButtonsStacked_&&(this.adapter_.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter_.removeClass(s.SCROLLABLE),this.adapter_.isContentScrollable()&&this.adapter_.addClass(s.SCROLLABLE)},e}(r),l=n(14),p=n.n(l);var f=n(9),h=n(6);function _(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}const m=d.strings;var v={name:"mdc-dialog",template:'<div\n ref="root"\n :class="classes"\n :style="styles"\n aria-modal="true"\n :aria-labelledby="\'label\' + vma_uid_"\n :aria-describedby="\'desc\' + vma_uid_"\n class="mdc-dialog"\n role="alertdialog"\n @click="onClick"\n @keydown="onClick"\n >\n <div ref="container" class="mdc-dialog__container">\n <div ref="surface" :class="surfaceClasses" class="mdc-dialog__surface">\n <h2 v-if="title" class="mdc-dialog__title" :id="\'label\' + vma_uid_">\n \x3c!--\n --\x3e\n {{ title\n }}\n \x3c!----\x3e\n </h2>\n <div ref="content" class="mdc-dialog__content" :id="\'desc\' + vma_uid_">\n <slot/>\n </div>\n <footer v-if="accept || cancel" class="mdc-dialog__actions">\n <button\n type="button"\n v-if="cancel"\n class="mdc-button mdc-dialog__button"\n data-mdc-dialog-action="no"\n >{{ cancel }}</button>\n <button\n type="button"\n ref="defaultButton"\n :disabled="acceptDisabled"\n class="mdc-button mdc-dialog__button"\n data-mdc-dialog-action="yes"\n >{{ accept }}</button>\n </footer>\n </div>\n </div>\n <div class="mdc-dialog__scrim"/>\n </div>',components:{mdcButton:f.mdcButton},mixins:[h.a],model:{prop:"open",event:"change"},props:{title:{type:String},accept:{type:String,default:"Ok"},acceptDisabled:Boolean,acceptRaised:{type:Boolean,default:!1},cancel:{type:String},cancelRaised:{type:Boolean,default:!1},accent:Boolean,scrollable:Boolean,open:Boolean},data(){return{classes:{"mdc-theme--dark":this.dark},styles:{},surfaceClasses:{},bodyClasses:{"mdc-dialog__body--scrollable":this.scrollable}}},watch:{open:"onOpen_"},mounted(){ | ||
/** | ||
@@ -148,3 +126,3 @@ * @license | ||
*/ | ||
var t,e,n;this.accept&&(this.focusTrap=(t=this.$refs.container,void 0===(e=f.a)&&(e=f.a),e(t,{clickOutsideDeactivates:!0,escapeDeactivates:!1,initialFocus:n}))),this.buttons_=[].slice.call(this.$el.querySelectorAll(v.BUTTON_SELECTOR)),this.foundation=new l({addClass:t=>this.$set(this.classes,t,!0),removeClass:t=>this.$delete(this.classes,t),hasClass:t=>this.$el.classList.contains(t),addBodyClass:t=>document.body.classList.add(t),removeBodyClass:t=>document.body.classList.remove(t),eventTargetMatches:(t,e)=>m(t,e),trapFocus:()=>this.focusTrap&&this.focusTrap.activate(),releaseFocus:()=>this.focusTrap&&this.focusTrap.deactivate(),isContentScrollable:()=>!!this.$refs.content&&function(t){return!!t&&t.scrollHeight>t.offsetHeight}(this.$refs.content),areButtonsStacked:()=>(function(t){var e=new Set;return[].forEach.call(t,function(t){return e.add(t.offsetTop)}),e.size>1})(this.buttons_),getActionFromEvent:t=>{const e= | ||
var t,e,n;this.accept&&(this.focusTrap=(t=this.$refs.container,void 0===(e=p.a)&&(e=p.a),e(t,{clickOutsideDeactivates:!0,escapeDeactivates:!1,initialFocus:n}))),this.buttons_=[].slice.call(this.$el.querySelectorAll(m.BUTTON_SELECTOR)),this.foundation=new d({addClass:t=>this.$set(this.classes,t,!0),removeClass:t=>this.$delete(this.classes,t),hasClass:t=>this.$el.classList.contains(t),addBodyClass:t=>document.body.classList.add(t),removeBodyClass:t=>document.body.classList.remove(t),eventTargetMatches:(t,e)=>_(t,e),trapFocus:()=>this.focusTrap&&this.focusTrap.activate(),releaseFocus:()=>this.focusTrap&&this.focusTrap.deactivate(),isContentScrollable:()=>!!this.$refs.content&&function(t){return!!t&&t.scrollHeight>t.offsetHeight}(this.$refs.content),areButtonsStacked:()=>(function(t){var e=new Set;return[].forEach.call(t,function(t){return e.add(t.offsetTop)}),e.size>1})(this.buttons_),getActionFromEvent:t=>{const e= | ||
/** | ||
@@ -172,3 +150,3 @@ * @license | ||
*/ | ||
function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(m(n,e))return n;n=n.parentElement}return null}(t.target,`[${v.ACTION_ATTRIBUTE}]`);return e&&e.getAttribute(v.ACTION_ATTRIBUTE)},clickDefaultButton:()=>{this.$refs.defaultButton&&this.$refs.defaultButton.click()},reverseButtons:()=>{this.buttons_.reverse(),this.buttons_.forEach(t=>t.parentElement.appendChild(t))},notifyOpening:()=>this.$emit(v.OPENING_EVENT,{}),notifyOpened:()=>this.$emit(v.OPENED_EVENT,{}),notifyClosing:t=>{this.$emit("change",!1),this.$emit(v.CLOSING_EVENT,t?{action:t}:{})},notifyClosed:t=>this.$emit(v.CLOSED_EVENT,t?{action:t}:{})}),this.foundation.init(),this.open&&this.foundation.open()},beforeDestroy(){this.foundation.destroy()},methods:{onOpen_(t){t?this.foundation.open():this.foundation.close()},onClick(t){this.foundation.handleInteraction(t)},onCancel(){this.$listeners.validateCancel?this.$emit("validateCancel",{cancel:(t=!0)=>{t||this.$emit("change",!1),this.foundation.cancel(t)}}):this.foundation.cancel(!0)},onAccept(){this.$listeners.validate?this.$emit("validate",{accept:(t=!0)=>{t||this.$emit("change",!1),this.foundation.accept(t)}}):this.foundation.accept(!0)},show(){this.foundation.open()},close(){this.foundation.close()}}},g=n(0),b=Object(g.a)(y,a,[],!1,null,null,null);b.options.__file="packages/mcwv-dialog/mdc-dialog.vue";var C=b.exports;n.d(e,"mdcDialog",function(){return C});e.default=Object(i.a)({mdcDialog:C})}})}); | ||
function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(_(n,e))return n;n=n.parentElement}return null}(t.target,`[${m.ACTION_ATTRIBUTE}]`);return e&&e.getAttribute(m.ACTION_ATTRIBUTE)},clickDefaultButton:()=>{this.$refs.defaultButton&&this.$refs.defaultButton.click()},reverseButtons:()=>{this.buttons_.reverse(),this.buttons_.forEach(t=>t.parentElement.appendChild(t))},notifyOpening:()=>this.$emit(m.OPENING_EVENT,{}),notifyOpened:()=>this.$emit(m.OPENED_EVENT,{}),notifyClosing:t=>{this.$emit("change",!1),this.$emit(m.CLOSING_EVENT,t?{action:t}:{})},notifyClosed:t=>this.$emit(m.CLOSED_EVENT,t?{action:t}:{})}),this.foundation.init(),this.open&&this.foundation.open()},beforeDestroy(){this.foundation.destroy()},methods:{onOpen_(t){t?this.foundation.open():this.foundation.close()},onClick(t){this.foundation.handleInteraction(t)},onCancel(){this.$listeners.validateCancel?this.$emit("validateCancel",{cancel:(t=!0)=>{t||this.$emit("change",!1),this.foundation.cancel(t)}}):this.foundation.cancel(!0)},onAccept(){this.$listeners.validate?this.$emit("validate",{accept:(t=!0)=>{t||this.$emit("change",!1),this.foundation.accept(t)}}):this.foundation.accept(!0)},show(){this.foundation.open()},close(){this.foundation.close()}}};n.d(e,"mdcDialog",function(){return v});e.default=Object(i.a)({mdcDialog:v})},9:function(t,e,n){"use strict";n.r(e);var i=n(2),a=n(5),o=n(11),r=n(1),s={name:"mdc-button-base",mixins:[a.a,o.b,r.RippleMixin],data:()=>({classes:{},styles:{}}),render(t){return t("custom-button",{class:this.classes,style:this.styles,attrs:{disabled:this.disabled},props:{href:this.href,link:this.link},on:this.listeners,ref:"root"},[t("span",{class:{"mdc-button__label":1}},this.$slots.default)])}},c={name:"mdc-button",extends:s,props:{raised:Boolean,unelevated:Boolean,outlined:Boolean,dense:Boolean},data(){return{classes:{"mdc-button":!0,"mdc-button--raised":this.raised,"mdc-button--unelevated":this.unelevated,"mdc-button--outlined":this.outlined,"mdc-button--dense":this.dense}}},watch:{raised(){this.$set(this.classes,"mdc-button--raised",this.raised)},unelevated(){this.$set(this.classes,"mdc-button--unelevated",this.unelevated)},outlined(){this.$set(this.classes,"mdc-button--outlined",this.outlined)},dense(){this.$set(this.classes,"mdc-button--dense",this.dense)}}};n.d(e,"mdcButtonBase",function(){return s}),n.d(e,"mdcButton",function(){return c});e.default=Object(i.a)({mdcButton:c})}})}); | ||
//# sourceMappingURL=mcwv.dialog.min.js.map |
import { BasePlugin } from '@mcwv/base'; | ||
import mdcDialog from './mdc-dialog.vue'; | ||
import mdcDialog from './mdc-dialog.js'; | ||
@@ -4,0 +4,0 @@ export { mdcDialog }; |
{ | ||
"name": "@mcwv/dialog", | ||
"description": "The Vue Material Adapter for the web dialog component", | ||
"version": "0.1.12", | ||
"version": "0.2.0", | ||
"license": "MIT", | ||
@@ -20,6 +20,6 @@ "main": "dist/mcwv.dialog.min.js", | ||
"@material/dialog": "^1.1.1", | ||
"@mcwv/base": "^0.1.12", | ||
"@mcwv/button": "^0.1.12" | ||
"@mcwv/base": "^0.2.0", | ||
"@mcwv/button": "^0.2.0" | ||
}, | ||
"gitHead": "516181cd3c220adeba5b786e766711dde9fbdde4" | ||
"gitHead": "ee9e1817a5b8674903562bb203af777ae22a9993" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
505
207361
1
+ Added@mcwv/base@0.2.3(transitive)
+ Added@mcwv/button@0.2.3(transitive)
+ Added@mcwv/ripple@0.2.3(transitive)
- Removed@mcwv/base@0.1.12(transitive)
- Removed@mcwv/button@0.1.12(transitive)
- Removed@mcwv/ripple@0.1.12(transitive)
Updated@mcwv/base@^0.2.0
Updated@mcwv/button@^0.2.0