diff --git a/dist/index.js b/dist/index.js index e8b69b2c..6a4c0938 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,8 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["vue-js-modal"]=e():t["vue-js-modal"]=e()}(window,function(){return i={},o.m=n=[function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(4).default)("d763679c",i,!1,{})},function(t,e,n){var i=n(10);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(4).default)("6b9cc0e0",i,!1,{})},function(t,e,n){var i=n(12);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(4).default)("663c004e",i,!1,{})},function(t,e){t.exports=function(n){var s=[];return s.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(i),r=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(r).concat([o]).join("\n")}return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},s.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},i=0;in.parts.length&&(i.parts.length=n.parts.length)}else{var r=[];for(o=0;othis.viewportWidth||t.clientX<0)&&!(t.clientY>this.viewportHeight||t.clientY<0)&&e){switch(this.targetClass){case"vue-modal-right":n-=e.offsetLeft,i=r;break;case"vue-modal-left":i=r,n=o+(this.initialX-t.clientX);break;case"vue-modal-top":n=o,i=r+(this.initialY-t.clientY);break;case"vue-modal-bottom":n=o,i-=e.offsetTop;break;case"vue-modal-bottomRight":n-=e.offsetLeft,i-=e.offsetTop;break;case"vue-modal-topRight":n-=e.offsetLeft,i=r+(this.initialY-t.clientY);break;case"vue-modal-bottomLeft":n=o+(this.initialX-t.clientX),i-=e.offsetTop;break;case"vue-modal-topLeft":n=o+(this.initialX-t.clientX),i=r+(this.initialY-t.clientY);break;default:console.error("Incorrrect/no resize direction.")}var s=Math.min(u(),this.maxWidth),a=Math.min(window.innerHeight,this.maxHeight);n=h(this.minWidth,s,n),i=h(this.minHeight,a,i),this.initialX=t.clientX,this.initialY=t.clientY,this.size={width:n,height:i};var l={width:n-o,height:i-r};e.style.width=n+"px",e.style.height=i+"px",this.$emit("resize",{element:e,size:this.size,direction:this.targetClass,dimGrowth:l})}}}};n(6);function d(t,e,n,i,o,r,s,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(l=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}var p=d(l,o,[],!1,null,null,null);p.options.__file="src/components/Resizer.vue";var m=p.exports;function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){switch(b(t)){case"number":return{type:"px",value:t};case"string":return function(e){if("auto"===e)return{type:e,value:0};var t=_.find(function(t){return t.regexp.test(e)});return t?{type:t.name,value:parseFloat(e)}:{type:"",value:e}}(t);default:return{type:"",value:t}}}function y(t){if("string"!=typeof t)return 0<=t;var e=g(t);return("%"===e.type||"px"===e.type)&&0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass:function(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass:function(){return["vm--modal",this.classes]},stylesProp:function(){return"string"==typeof this.styles?a(this.styles):this.styles},modalStyle:function(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed:function(){return this.overlayTransitionState===A&&this.modalTransitionState===A}},watch:{isComponentReadyToBeDestroyed:function(t){t&&(this.visible=!1)}},methods:{startTransitionEnter:function(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave:function(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter:function(){this.overlayTransitionState=$},afterOverlayTransitionEnter:function(){this.overlayTransitionState=C},beforeOverlayTransitionLeave:function(){this.overlayTransitionState=j},afterOverlayTransitionLeave:function(){this.overlayTransitionState=A},beforeModalTransitionEnter:function(){var t=this;this.modalTransitionState=$,this.$nextTick(function(){t.resizeObserver.observe(t.$refs.modal)})},afterModalTransitionEnter:function(){this.modalTransitionState=C,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var t=this.createModalEvent({state:"opened"});this.$emit("opened",t)},beforeModalTransitionLeave:function(){this.modalTransitionState=j,this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave:function(){this.modalTransitionState=A;var t=this.createModalEvent({state:"closed"});this.$emit("closed",t)},onToggle:function(t,e,n){if(this.name===t){var i=void 0===e?!this.visible:e;this.toggle(i,n)}},setInitialSize:function(){var t=g(this.width),e=g(this.height);this.modal.width=t.value,this.modal.widthType=t.type,this.modal.height=e.value,this.modal.heightType=e.type},onEscapeKeyUp:function(t){27===t.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize:function(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent:function(t){var e=0{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-js-modal"]=t():e["vue-js-modal"]=t()})(window,function(){return n=[function(e,t,n){n=n(15);e.exports=new n},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(n){var a=[];return a.toString=function(){return this.map(function(e){var t=((e,t)=>{var n=e[1]||"",r=e[3];return r?(t&&"function"==typeof btoa?(e=(e=>"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */")(r),t=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}),[n].concat(t).concat([e])):[n]).join("\n"):n})(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},a.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;rn.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i{function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e})(),r=P,xe=0,u=function(){this.id=xe++,this.subs=[]},Oe=(u.prototype.addSub=function(e){this.subs.push(e)},u.prototype.removeSub=function(e){A(this.subs,e)},u.prototype.depend=function(){u.target&&u.target.addDep(this)},u.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t{for(var t=[],n=0;n{var r;if(L(t,"default"))return r=t.default,e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==Ve(t.type)?r.call(e):r})(r,t,e),o=Le,N(!0),z(n),N(o)),n}function Ve(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Xe(e,t){return Ve(e)===Ve(t)}function Ye(e,t){if(!Array.isArray(t))return Xe(t,e)?0:-1;for(var n=0,r=t.length;n{function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:dt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r})(t,l,e[l]))}else r={};for(i in t)i in r||(r[i]=((e,t)=>function(){return e[t]})(t,i));return e&&Object.isExtensible(e)&&(e._normalized=r),ae(r,"$stable",a),ae(r,"$key",s),ae(r,"$hasNormal",o),r}function yt(e,t){var n,r,i,o;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n{l="class"===t||"style"===t||$(t)?r:(e=r.attrs&&r.attrs.type,a||c.mustUseProp(i,e,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=x(t),n=K(t);e in l||n in l||(l[t]=o[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){o[t]=e}))})(e)}return r}function Ot(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Ct(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Et(e,t,n){return Ct(e,"__once__"+t+(n?"_"+n:""),!0),e}function Ct(e,t,n){if(Array.isArray(e))for(var r=0;r{var t={_isComponent:!0,_parentVnode:e,parent:t},n=e.data.inlineTemplate;return I(n)&&(t.render=n.render,t.staticRenderFns=n.staticRenderFns),new e.componentOptions.Ctor(t)})(e,Kt)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions,r=t.componentInstance=e.componentInstance,i=n.propsData,e=n.listeners,n=n.children,o=t.data.scopedSlots,a=r.$scopedSlots,a=!!(o&&!o.$stable||a!==T&&!a.$stable||o&&r.$scopedSlots.$key!==o.$key),o=!!(n||r.$options._renderChildren||a);if(r.$options._parentVnode=t,r.$vnode=t,r._vnode&&(r._vnode.parent=t),r.$options._renderChildren=n,r.$attrs=t.data.attrs||T,r.$listeners=e||T,i&&r.$options.props){N(!1);for(var s=r._props,l=r.$options._propKeys||[],c=0;c{var e,r,i,o,a,s,l,c,u;return k(t.error)&&I(t.errorComp)?t.errorComp:I(t.resolved)?t.resolved:((e=Wt)&&I(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e),k(t.loading)&&I(t.loadingComp)?t.loadingComp:e&&!I(t.owners)?(r=t.owners=[e],i=!0,a=o=null,e.$on("hook:destroyed",function(){return A(r,e)}),s=function(e){for(var t=0,n=r.length;t{if(!M(t=t.options.props)){var n={},r=e.attrs,i=e.props;if(I(r)||I(i))for(var o in t){var a=K(o);ut(n,i,o,a,!0)||ut(n,r,o,a,!1)}return n}})(t,e);if(!k(e.options.functional)){for(var u=t.on,l=(t.on=t.nativeOn,k(e.options.abstract)&&(l=t.slot,t={},l)&&(t.slot=l),t),d=l.hook||(l.hook={}),f=0;f{function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e})(v,h):v)}l=e.options.name||i;return new S("vue-component-"+e.cid+(l?"-"+l:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:c,listeners:u,tag:i,children:r},g)}var l=e,m=c,y=t,i=n,g=r,b=l.options,_={},w=b.props;if(I(w))for(var x in w)_[x]=Ue(x,w,m||T);else I(y.attrs)&&It(_,y.attrs),I(y.props)&&It(_,y.props);var O=new Lt(y,_,g,i,l);if((g=b.render.call(null,O._c,O))instanceof S)return Mt(g,y,O.parent,b);if(Array.isArray(g)){for(var E=dt(g)||[],C=new Array(E.length),$=0;${for(var t=0;tdocument.createEvent("Event").timeStamp&&(ln=function(){return an.now()});var un=0,F=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++un,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new we,this.newDepIds=new we,this.expression="","function"==typeof t?this.getter=t:(this.getter=(e=>{var n;if(!se.test(e))return n=e.split("."),function(e){for(var t=0;te.id;)n--;f.splice(n+1,0,e)}else f.push(e);nn||(nn=!0,it(cn))}}},F.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||D(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){R(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},F.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},F.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},F.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||A(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}},{enumerable:!0,configurable:!0,get:P,set:P});function dn(e,t,n){s.get=function(){return this[t][n]},s.set=function(e){this[t][n]=e},Object.defineProperty(e,n,s)}function fn(e){e._watchers=[];var t=e.$options;if(t.props){var n,r=e,i=t.props,o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[];for(n in r.$parent&&N(!1),i){l=void 0;c=void 0;var l=n;s.push(l);var c=Ue(l,i,o,r);Ie(a,l,c),l in r||dn(r,"_props",l)}N(!0)}if(t.methods){var u,d=e,f=t.methods;for(u in d.$options.props,f)d[u]="function"!=typeof f[u]?P:J(f[u],d)}if(t.data){for(var p=e,h=p.$options.data,v=(j(h=p._data="function"==typeof h?((e,t)=>{Ee();try{return e.call(t,t)}catch(e){return R(e,t,"data()"),{}}finally{Ce()}})(h,p):h||{})||(h={}),Object.keys(h)),m=p.$options.props,y=(p.$options.methods,v.length);y--;){var g=v[y];m&&L(m,g)||(e=>36===(e=(e+"").charCodeAt(0))||95===e)(g)||dn(p,"_data",g)}z(h,!0)}else z(e._data={},!0);if(t.computed){var b,_=e,w=t.computed,x=_._computedWatchers=Object.create(null),O=ye();for(b in w){var E=w[b],C="function"==typeof E?E:E.get;O||(x[b]=new F(_,C||P,P,pn)),b in _||hn(_,b,E)}}if(t.watch&&t.watch!==ve){var $,T=e,k=t.watch;for($ in k){var A=k[$];if(Array.isArray(A))for(var S=0;S{var t,n,r=e.options,i=e.sealedOptions;for(n in r)r[n]!==i[n]&&((t=t||{})[n]=r[n]);return t})(e))&&O(e.extendOptions,n),(r=e.options=We(t,e.extendOptions)).name)&&(r.components[r.name]=e),r}function p(e){this._init(e)}function wn(e){e.cid=0;var d=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];function i(e){this._init(e)}var o=e.name||t.options.name;if(((i.prototype=Object.create(t.prototype)).constructor=i).cid=d++,i.options=We(t.options,e),i.super=t,i.options.props){var a,s=i;for(a in s.options.props)dn(s.prototype,"_props",a)}if(i.options.computed){var l,c=i,u=c.options.computed;for(l in u)hn(c.prototype,l,u[l])}return i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,oe.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=O({},i.options),r[n]=i}}function xn(e){return e&&(e.Ctor.options.name||e.tag)}function On(e,t){return Array.isArray(e)?-1parseInt(this.max)&&Cn(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};h=p,t={get:function(){return c}},Object.defineProperty(h,"config",t),h.util={warn:r,extend:O,mergeOptions:We,defineReactive:Ie},h.set=De,h.delete=Pe,h.nextTick=it,h.observable=function(e){return z(e),e},h.options=Object.create(null),oe.forEach(function(e){h.options[e+"s"]=Object.create(null)}),O((h.options._base=h).options.components,m),h.use=function(e){var t,n=this._installedPlugins||(this._installedPlugins=[]);return-1{var n;return"input"!==e.tag||(n=I(e=e.data)&&I(e=e.attrs)&&e.type,t=I(e=t.data)&&I(e=e.attrs)&&e.type,n===t)||Vn(n)&&Vn(t)})(e,t)||k(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}m={create:Kn,update:Kn,destroy:function(e){Kn(e,Yn)}};function Kn(e,t){if(e.data.directives||t.data.directives){var n,r,i,o=e,a=t,e=o===Yn,s=a===Yn,l=Zn(o.data.directives,o.context),c=Zn(a.data.directives,a.context),u=[],d=[];for(n in c)r=l[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,Qn(i,"update",a,o),i.def&&i.def.componentUpdated&&d.push(i)):(Qn(i,"bind",a,o),i.def&&i.def.inserted&&u.push(i));if(u.length&&(t=function(){for(var e=0;e=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}),ir.addEventListener(e,t,me?{capture:n,passive:r}:n)}function dr(e,t,n,r){(r||ir).removeEventListener(e,t._wrapper||t,n)}function fr(e,t){var n,r,i;M(e.data.on)&&M(t.data.on)||(n=t.data.on||{},e=e.data.on||{},ir=t.elm,I((r=n)[ar])&&(r[i=de?"change":"input"]=[].concat(r[ar],r[i]||[]),delete r[ar]),I(r[sr])&&(r.change=[].concat(r[sr],r.change||[]),delete r[sr]),ct(n,e,ur,dr,lr,t.context),ir=void 0)}var pr,a={create:fr,update:fr};function hr(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};for(n in I(l.__ob__)&&(l=t.data.domProps=O({},l)),s)n in l||(a[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var c=M(a._value=r)?"":String(r);o=c,(i=a).composing||"OPTION"!==i.tagName&&!((e,t)=>{var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t})(i,o)&&!((e,t)=>{var n=e.value;if(I(e=e._vModifiers)){if(e.number)return V(n)!==V(t);if(e.trim)return n.trim()!==t.trim()}return n!==t})(i,o)||(a.value=c)}else if("innerHTML"===n&&Bn(a.tagName)&&M(a.innerHTML)){(pr=pr||document.createElement("div")).innerHTML=""+r+"";for(var u=pr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var n={create:hr,update:hr},vr=e(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){e&&1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function mr(e){var t=yr(e.style);return e.staticStyle?O(e.staticStyle,t):t}function yr(e){return Array.isArray(e)?Q(e):"string"==typeof e?vr(e):e}function gr(e,t,n){if(_r.test(t))e.style.setProperty(t,n);else if(wr.test(n))e.style.setProperty(K(t),n.replace(wr,""),"important");else{var r=Or(t);if(Array.isArray(n))for(var i=0,o=n.length;i{var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=mr(i.data))&&O(r,n);(n=mr(e.data))&&O(r,n);for(var o=e;o=o.parent;)o.data&&(n=mr(o.data))&&O(r,n);return r})(t,!0));for(i in a)M(s[i])&&gr(o,i,"");for(i in s)(r=s[i])!==a[i]&&gr(o,i,null==r?"":r)}}var Cr={create:Er,update:Er},$r=/\s+/;function Tr(t,e){var n;(e=e&&e.trim())&&(t.classList?-1=o&&c()}var s=r===Lr?Dr:Nr,l=0,c=function(){t.removeEventListener(s,a),n()};setTimeout(function(){l{for(var t,p={},n=e.modules,y=e.nodeOps,r=0;r{var i=e.data;if(I(i)){a=I(e.componentInstance)&&i.keepAlive,I(i=i.hook)&&I(i=i.init)&&i(e,!1);if(I(e.componentInstance)){h(e,t),c(n,e.elm,r);if(k(a)){i=e;var o=t;var a=n;e=r;for(var s,l=i;l.componentInstance;)if(l=l.componentInstance._vnode,I(s=l.data)&&I(s=s.transition)){for(s=0;s{for(var r,i={},o=t;o<=n;++o)I(r=e[o].key)&&(i[r]=o);return i})(t,l,u)),!M(a=I(h.key)?o[h.key]:((e,t,n,r)=>{for(var i=n;i{for(;e=e.parent;)if(e.data.transition)return 1})(this.$vnode)){var i=ai(n);if(i){if(this._leaving)return li(e,n);var o="__transition-"+this._uid+"-",o=(i.key=null==i.key?i.isComment?o+"comment":o+i.tag:!B(i.key)||0===String(i.key).indexOf(o)?i.key:o+i.key,(i.data||(i.data={})).transition=si(this)),a=this._vnode,s=ai(a);if(i.data.directives&&i.data.directives.some(ui)&&(i.data.show=!0),s&&s.data&&(u=i,(l=s).key!==u.key||l.tag!==u.tag)&&!Ut(s)&&(!s.componentInstance||!s.componentInstance._vnode.isComment)){var l=s.data.transition=O({},o);if("out-in"===r)return this._leaving=!0,H(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),li(e,n);if("in-out"===r){if(Ut(i))return a;var c,u=function(){c()};H(o,"afterEnter",u),H(o,"enterCancelled",u),H(l,"delayLeave",function(e){c=e})}}}}return n}}},n=O({tag:String,moveClass:String},or);function di(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function fi(e){e.data.newPos=e.elm.getBoundingClientRect()}function pi(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,t=t.top-n.top;(r||t)&&(e.data.moved=!0,(n=e.elm.style).transform=n.WebkitTransform="translate("+r+"px,"+t+"px)",n.transitionDuration="0s")}delete n.mode;Cr={Transition:a,TransitionGroup:{props:n,beforeMount:function(){var r=this,i=this._update;this._update=function(e,t){var n=Jt(r);r.__patch__(r._vnode,r.kept,!1,!0),r._vnode=r.kept,n(),i.call(r,e,t)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=si(this),s=0;s{for(var t={},n=0,r=["top","right","bottom","left"];n{var e,t;return r.postMessage&&!r.importScripts&&(e=!0,t=r.onmessage,r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e)})()?n():d=r.MessageChannel?((p=new MessageChannel).port1.onmessage=function(e){a(e.data)},function(e){p.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(f=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){a(e),t.onreadystatechange=null,f.removeChild(t),t=null},f.appendChild(t)}):function(e){setTimeout(a,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nn"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let c=["INPUT","TEXTAREA","SELECT"],s=function(e){let t=0(t++).toString()}(),u=()=>{var e=window.innerWidth,t=document.documentElement.clientWidth;return e&&t?Math.min(e,t):t||e},d=e=>e.touches&&0this.viewportWidth||e.clientX<0)&&!(e.clientY>this.viewportHeight||e.clientY<0)&&t){switch(this.targetClass){case"vue-modal-right":n-=t.offsetLeft,r=o;break;case"vue-modal-left":r=o,n=i+(this.initialX-e.clientX);break;case"vue-modal-top":n=i,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottom":n=i,r-=t.offsetTop;break;case"vue-modal-bottomRight":n-=t.offsetLeft,r-=t.offsetTop;break;case"vue-modal-topRight":n-=t.offsetLeft,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottomLeft":n=i+(this.initialX-e.clientX),r-=t.offsetTop;break;case"vue-modal-topLeft":n=i+(this.initialX-e.clientX),r=o+(this.initialY-e.clientY);break;default:console.error("Incorrrect/no resize direction.")}var a=Math.min(u(),this.maxWidth),s=Math.min(window.innerHeight,this.maxHeight),n=l(this.minWidth,a,n),r=l(this.minHeight,s,r),a=(this.initialX=e.clientX,this.initialY=e.clientY,this.size={width:n,height:r},{width:n-i,height:r-o});t.style.width=n+"px",t.style.height=r+"px",this.$emit("resize",{element:t,size:this.size,direction:this.targetClass,dimGrowth:a})}}}},f=a;t(9);function p(e,t,n,r,i,o,a,s){var l,c,u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):i&&(l=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l&&(u.functional?(u._injectStyles=l,c=u.render,u.render=function(e,t){return l.call(t),c(e,t)}):(t=u.beforeCreate,u.beforeCreate=t?[].concat(t,l):[l])),{exports:e,options:u}}var h=p(f,r,[],!1,null,null,null).exports,v="[-+]?[0-9]*.?[0-9]+";let m=[{name:"px",regexp:new RegExp("^".concat(v,"px$"))},{name:"%",regexp:new RegExp("^".concat(v,"%$"))},{name:"px",regexp:new RegExp("^".concat(v,"$"))}],y=t=>{var e;return"auto"===t?{type:t,value:0}:(e=m.find(e=>e.regexp.test(t)))?{type:e.name,value:parseFloat(t)}:{type:"",value:t}},g=e=>{switch(typeof e){case"number":return{type:"px",value:e};case"string":return y(e);default:return{type:"",value:e}}},b=e=>{var t;return"string"==typeof e?("%"===(t=g(e)).type||"px"===t.type)&&0e==document.activeElement;class N{constructor(){this.root=null,this.elements=[],this.onKeyDown=this.onKeyDown.bind(this),this.enable=this.enable.bind(this),this.disable=this.disable.bind(this),this.firstElement=this.firstElement.bind(this),this.lastElement=this.lastElement.bind(this)}lastElement(){return this.elements[this.elements.length-1]||null}firstElement(){return this.elements[0]||null}onKeyDown(e){var t;"Tab"!==(t=e).key&&9!==t.keyCode||(e.shiftKey&&x(this.firstElement())?(this.lastElement().focus(),e.preventDefault()):document.activeElement&&(e.shiftKey||!x(this.lastElement()))||(this.firstElement().focus(),e.preventDefault()))}enabled(){return!!this.root}enable(e){var t;e&&(this.root=e,this.elements=(e=this.root,t='button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=""]:not([disabled]), [contentEditable="true"]:not([disabled]), [contentEditable="TRUE"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex="-1"])',[...e.querySelectorAll(t)||[]]),(e=this.firstElement())&&e.focus(),this.root.addEventListener("keydown",this.onKeyDown))}disable(){this.root.removeEventListener("keydown",this.onKeyDown),this.root=null}}var z=N;function O(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function R(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let E="vm-transition--default",C={Enter:"enter",Entering:"entering",Leave:"leave",Leaving:"leavng"},H={name:"VueJsModal",inject:["$modal"],props:{name:{required:!0,type:String},resizable:{type:Boolean,default:!1},resizeEdges:{default:()=>["r","br","b","bl","l","tl","t","tr"],validator:t=>["r","br","b","bl","l","tl","t","tr"].filter(e=>-1!==t.indexOf(e)).length===t.length,type:Array},centerResize:{type:Boolean,default:!0},resizeIndicator:{type:Boolean,default:!0},adaptive:{type:Boolean,default:!1},draggable:{type:[Boolean,String],default:!1},scrollable:{type:Boolean,default:!1},focusTrap:{type:Boolean,default:!1},reset:{type:Boolean,default:!1},overlayTransition:{type:String,default:"vm-transition--overlay"},transition:{type:String,default:"vm-transition--modal"},clickToClose:{type:Boolean,default:!0},classes:{type:[String,Array],default:()=>[]},styles:{type:[String,Array,Object]},minWidth:{type:Number,default:0,validator(e){return 0<=e}},minHeight:{type:Number,default:0,validator(e){return 0<=e}},maxWidth:{type:Number,default:Number.MAX_SAFE_INTEGER},maxHeight:{type:Number,default:Number.MAX_SAFE_INTEGER},width:{type:[Number,String],default:600,validator(e){return"auto"===e||b(e)}},height:{type:[Number,String],default:300,validator(e){return"auto"===e||b(e)}},shiftX:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}},shiftY:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}}},components:{Resizer:h},data(){return{visible:!1,visibility:{modal:!1,overlay:!1},overlayTransitionState:null,modalTransitionState:null,shiftLeft:0,shiftTop:0,modal:{width:0,widthType:"px",height:0,heightType:"px",renderedHeight:0},viewportHeight:0,viewportWidth:0}},created(){this.setInitialSize()},beforeMount(){this.$modal.subscription.$on("toggle",this.onToggle),window.addEventListener("resize",this.onWindowResize),window.addEventListener("orientationchange",this.onWindowResize),this.onWindowResize(),this.scrollable&&!this.isAutoHeight&&console.warn('Modal "'.concat(this.name,'" has scrollable flag set to true ')+'but height is not "auto" ('.concat(this.height,")")),this.clickToClose&&window.addEventListener("keyup",this.onEscapeKeyUp)},mounted(){this.resizeObserver=new w(e=>{0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass(){return["vm--modal",this.classes]},stylesProp(){return"string"==typeof this.styles?this.styles.split(";").map(e=>e.trim()).filter(Boolean).map(e=>e.split(":")).reduce((e,t)=>{var[t,n]=t;return i(i({},e),{},{[t]:n})},{}):this.styles},modalStyle(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed(){return this.overlayTransitionState===C.Leave&&this.modalTransitionState===C.Leave}},watch:{isComponentReadyToBeDestroyed(e){e&&(this.visible=!1)}},methods:{startTransitionEnter(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter(){this.overlayTransitionState=C.Entering},afterOverlayTransitionEnter(){this.overlayTransitionState=C.Enter},beforeOverlayTransitionLeave(){this.overlayTransitionState=C.Leaving},afterOverlayTransitionLeave(){this.overlayTransitionState=C.Leave},beforeModalTransitionEnter(){this.modalTransitionState=C.Entering,this.$nextTick(()=>{this.resizeObserver.observe(this.$refs.modal)})},afterModalTransitionEnter(){this.modalTransitionState=C.Enter,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var e=this.createModalEvent({state:"opened"});this.$emit("opened",e)},beforeModalTransitionLeave(){this.modalTransitionState=C.Leaving,this.$refs.modal&&this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave(){this.modalTransitionState=C.Leave;var e=this.createModalEvent({state:"closed"});this.$emit("closed",e)},onToggle(e,t,n){this.name===e&&(e=void 0===t?!this.visible:t,this.toggle(e,n))},setInitialSize(){var e=g(this.width),t=g(this.height);this.modal.width=e.value,this.modal.widthType=e.type,this.modal.height=t.value,this.modal.heightType=t.type},onEscapeKeyUp(e){27===e.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent(){return R({name:this.name,ref:this.$refs.modal||null},0{t=!0},state:"before-open",params:e});this.$emit("before-open",e),t?this.scrollable&&document.body.classList.remove("vm--block-scroll"):("undefined"!=typeof document&&document.activeElement&&"BODY"!==document.activeElement.tagName&&document.activeElement.blur&&document.activeElement.blur(),this.visible=!0,this.$nextTick(()=>{this.startTransitionEnter()}))},close(e){this.scrollable&&document.body.classList.remove("vm--block-scroll");let t=!1;e=this.createModalEvent({cancel:()=>{t=!0},state:"before-close",params:e});this.$emit("before-close",e),t||this.startTransitionLeave()},toggle(e,t){var n=this.visible;n!==e&&(e?this.open(t):this.close(t))},getDraggableElement(){return!0===this.draggable?this.$refs.modal:"string"==typeof this.draggable?this.$refs.modal.querySelector(this.draggable):null},onOverlayClick(){this.clickToClose&&this.toggle(!1)},addDraggableListeners(){var e=this.getDraggableElement();if(e){let r=0,i=0,o=0,a=0;var t=e=>{var t=e.target;(t=t)&&-1!==c.indexOf(t.nodeName)||({clientX:t,clientY:e}=d(e),document.addEventListener("mousemove",n),document.addEventListener("touchmove",n),document.addEventListener("mouseup",s),document.addEventListener("touchend",s),r=t,i=e,o=this.shiftLeft,a=this.shiftTop)};let n=e=>{var{clientX:t,clientY:n}=d(e);this.shiftLeft=o+t-r,this.shiftTop=a+n-i,e.preventDefault()},s=e=>{this.ensureShiftInWindowBounds(),document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchend",s),e.preventDefault()};e.addEventListener("mousedown",t),e.addEventListener("touchstart",t)}},ensureShiftInWindowBounds(){var{viewportHeight:e,viewportWidth:t,shiftLeft:n,shiftTop:r,shiftX:i,shiftY:o,trueModalWidth:a,trueModalHeight:s}=this,t=t-a,a=Math.max(e-s,0),e=n+i*t,s=r+o*a;this.shiftLeft-=e-l(0,t,e),this.shiftTop-=s-l(0,a,s)}}},F=H,W=(t(11),p(F,n,[],!1,null,null,null));function $(){var n=this,e=n.$createElement,r=n._self._c||e;return r(n.$modal.context.componentName,{tag:"component",attrs:{name:"dialog",height:"auto",classes:["vue-dialog",n.params.class],width:n.width,"shift-y":.3,adaptive:!0,"focus-trap":!0,clickToClose:n.clickToClose,transition:n.transition},on:{"before-open":n.beforeOpened,"before-close":n.beforeClosed,opened:function(e){return n.$emit("opened",e)},closed:function(e){return n.$emit("closed",e)}}},[r("div",{staticClass:"vue-dialog-content"},[n.params.title?r("div",{staticClass:"vue-dialog-content-title",domProps:{innerHTML:n._s(n.params.title||"")}}):n._e(),n._v(" "),n.params.component?r(n.params.component,n._b({tag:"component"},"component",n.params.props,!1)):r("div",{domProps:{innerHTML:n._s(n.params.text||"")}})],1),n._v(" "),n.buttons?r("div",{staticClass:"vue-dialog-buttons"},n._l(n.buttons,function(e,t){return r("button",{key:t,class:e.class||"vue-dialog-button",style:n.buttonStyle,attrs:{type:"button",tabindex:"0"},domProps:{innerHTML:n._s(e.title)},on:{click:function(e){return e.stopPropagation(),n.click(t,e)}}})}),0):r("div",{staticClass:"vue-dialog-buttons-none"})])}var T=W.exports;$._withStripped=!0;var v={name:"VueJsDialog",props:{width:{type:[Number,String],default:400},clickToClose:{type:Boolean,default:!0},transition:{type:String}},inject:["$modal"],data(){return{params:{}}},computed:{buttons(){return this.params.buttons||[]},buttonStyle(){return{flex:"1 1 ".concat(100/this.buttons.length,"%")}}},methods:{beforeOpened(e){this.params=e.params||{},this.$emit("before-opened",e)},beforeClosed(e){this.params={},this.$emit("before-closed",e)},click(e,t){var n=this.buttons[e],n=null==n?void 0:n.handler;"function"==typeof n&&n(e,t,{source:2({})}},render(){return"function"==typeof this.node?this.node(this.scope):this.node}},U=B,V=p(U,void 0,void 0,!1,null,null,null),X=V.exports;function S(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function j(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let Y={data(){return{modals:[]}},components:{VNode:X},created(){(this.$root.__modalContainer=this).$modal.subscription.$emit("set-modal-container",this)},mounted(){this.$modal.subscription.$on("hide-all",()=>{this.modals=[]})},methods:{add(e){var t=1{this.$modal.show(a)})},remove(t){var e=this.modals.findIndex(e=>e.id===t);-1!==e&&this.modals.splice(e,1)}}},q=Y,G=p(q,A,[],!1,null,null,null);var K=G.exports,h=t(0),L=t.n(h),M=t(4);function I(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function D(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var J=function(e){let s=1{l.root.__modalContainer=e});return{context:l,subscription:a,show:function(){for(var e=arguments.length,t=new Array(e),n=0;n{a.$emit("toggle",e,!1,t)},hideAll:()=>{a.$emit("hide-all")},toggle:(e,t)=>{a.$emit("toggle",e,void 0,t)},setDynamicModalContainer:e=>{if(l.root=e){t=document.createElement("div"),document.body.appendChild(t);var t,n=Object(M.createVNode)(K);n.appContext=e.$.appContext;try{return Object(M.render)(n,t)}catch(e){console.error("Error rendering vnode:",e)}}else console.warn("Root component is undefined. Make sure the root instance is passed correctly.")}}};let Z="__VERSION__";e.default={install(t){var n=1this.viewportWidth||t.clientX<0)&&!(t.clientY>this.viewportHeight||t.clientY<0)&&e){switch(this.targetClass){case"vue-modal-right":i-=e.offsetLeft,n=r;break;case"vue-modal-left":n=r,i=o+(this.initialX-t.clientX);break;case"vue-modal-top":i=o,n=r+(this.initialY-t.clientY);break;case"vue-modal-bottom":i=o,n-=e.offsetTop;break;case"vue-modal-bottomRight":i-=e.offsetLeft,n-=e.offsetTop;break;case"vue-modal-topRight":i-=e.offsetLeft,n=r+(this.initialY-t.clientY);break;case"vue-modal-bottomLeft":i=o+(this.initialX-t.clientX),n-=e.offsetTop;break;case"vue-modal-topLeft":i=o+(this.initialX-t.clientX),n=r+(this.initialY-t.clientY);break;default:console.error("Incorrrect/no resize direction.")}var s=Math.min(u(),this.maxWidth),a=Math.min(window.innerHeight,this.maxHeight);i=h(this.minWidth,s,i),n=h(this.minHeight,a,n),this.initialX=t.clientX,this.initialY=t.clientY,this.size={width:i,height:n};var l={width:i-o,height:n-r};e.style.width=i+"px",e.style.height=n+"px",this.$emit("resize",{element:e,size:this.size,direction:this.targetClass,dimGrowth:l})}}}};i(4);function d(t,e,i,n,o,r,s,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(l=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}var m=d(l,o,[],!1,null,null,null);m.options.__file="src/components/Resizer.vue";var p=m.exports;function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t){switch(b(t)){case"number":return{type:"px",value:t};case"string":return function(e){if("auto"===e)return{type:e,value:0};var t=_.find(function(t){return t.regexp.test(e)});return t?{type:t.name,value:parseFloat(e)}:{type:"",value:e}}(t);default:return{type:"",value:t}}}function g(t){if("string"!=typeof t)return 0<=t;var e=y(t);return("%"===e.type||"px"===e.type)&&0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass:function(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass:function(){return["vm--modal",this.classes]},stylesProp:function(){return"string"==typeof this.styles?a(this.styles):this.styles},modalStyle:function(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed:function(){return this.overlayTransitionState===A&&this.modalTransitionState===A}},watch:{isComponentReadyToBeDestroyed:function(t){t&&(this.visible=!1)}},methods:{startTransitionEnter:function(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave:function(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter:function(){this.overlayTransitionState=R},afterOverlayTransitionEnter:function(){this.overlayTransitionState=C},beforeOverlayTransitionLeave:function(){this.overlayTransitionState=H},afterOverlayTransitionLeave:function(){this.overlayTransitionState=A},beforeModalTransitionEnter:function(){var t=this;this.modalTransitionState=R,this.$nextTick(function(){t.resizeObserver.observe(t.$refs.modal)})},afterModalTransitionEnter:function(){this.modalTransitionState=C,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var t=this.createModalEvent({state:"opened"});this.$emit("opened",t)},beforeModalTransitionLeave:function(){this.modalTransitionState=H,this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave:function(){this.modalTransitionState=A;var t=this.createModalEvent({state:"closed"});this.$emit("closed",t)},onToggle:function(t,e,i){if(this.name===t){var n=void 0===e?!this.visible:e;this.toggle(n,i)}},setInitialSize:function(){var t=y(this.width),e=y(this.height);this.modal.width=t.value,this.modal.widthType=t.type,this.modal.height=e.value,this.modal.heightType=e.type},onEscapeKeyUp:function(t){27===t.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize:function(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent:function(t){var e=0{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-js-modal"]=t():e["vue-js-modal"]=t()})(window,function(){return n=[function(e,t,n){n=n(10);e.exports=new n},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){!function(y,g){ +/*! + * Vue.js v2.6.11 + * (c) 2014-2019 Evan You + * Released under the MIT License. + */ +var T=Object.freeze({});function M(e){return null==e}function I(e){return null!=e}function A(e){return!0===e}function B(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var b=Object.prototype.toString;function j(e){return"[object Object]"===b.call(e)}function _(e){return"[object RegExp]"===b.call(e)}function w(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function V(e){return I(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function $(e){return null==e?"":Array.isArray(e)||j(e)&&e.toString===b?JSON.stringify(e,null,2):String(e)}function X(e){var t=parseFloat(e);return isNaN(t)?e:t}function i(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i{function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e})(),r=D,Oe=0,u=function(){this.id=Oe++,this.subs=[]},Ee=(u.prototype.addSub=function(e){this.subs.push(e)},u.prototype.removeSub=function(e){k(this.subs,e)},u.prototype.depend=function(){u.target&&u.target.addDep(this)},u.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t{for(var t=[],n=0;n{var r;if(L(t,"default"))return r=t.default,e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==Xe(t.type)?r.call(e):r})(r,t,e),o=Le,N(!0),z(n),N(o)),n}function Xe(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Ue(e,t){return Xe(e)===Xe(t)}function Ye(e,t){if(!Array.isArray(t))return Ue(t,e)?0:-1;for(var n=0,r=t.length;n{function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:dt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r})(t,l,e[l]))}else r={};for(i in t)i in r||(r[i]=((e,t)=>function(){return e[t]})(t,i));return e&&Object.isExtensible(e)&&(e._normalized=r),ae(r,"$stable",a),ae(r,"$key",s),ae(r,"$hasNormal",o),r}function yt(e,t){var n,r,i,o;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n{l="class"===t||"style"===t||C(t)?r:(e=r.attrs&&r.attrs.type,a||c.mustUseProp(i,e,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=O(t),n=K(t);e in l||n in l||(l[t]=o[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){o[t]=e}))})(e)}return r}function Et(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||$t(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function xt(e,t,n){return $t(e,"__once__"+t+(n?"_"+n:""),!0),e}function $t(e,t,n){if(Array.isArray(e))for(var r=0;r{var t={_isComponent:!0,_parentVnode:e,parent:t},n=e.data.inlineTemplate;return I(n)&&(t.render=n.render,t.staticRenderFns=n.staticRenderFns),new e.componentOptions.Ctor(t)})(e,Kt)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions,r=t.componentInstance=e.componentInstance,i=n.propsData,e=n.listeners,n=n.children,o=t.data.scopedSlots,a=r.$scopedSlots,a=!!(o&&!o.$stable||a!==T&&!a.$stable||o&&r.$scopedSlots.$key!==o.$key),o=!!(n||r.$options._renderChildren||a);if(r.$options._parentVnode=t,r.$vnode=t,r._vnode&&(r._vnode.parent=t),r.$options._renderChildren=n,r.$attrs=t.data.attrs||T,r.$listeners=e||T,i&&r.$options.props){N(!1);for(var s=r._props,l=r.$options._propKeys||[],c=0;c{var e,r,i,o,a,s,l,c,u;return A(t.error)&&I(t.errorComp)?t.errorComp:I(t.resolved)?t.resolved:((e=Wt)&&I(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e),A(t.loading)&&I(t.loadingComp)?t.loadingComp:e&&!I(t.owners)?(r=t.owners=[e],i=!0,a=o=null,e.$on("hook:destroyed",function(){return k(r,e)}),s=function(e){for(var t=0,n=r.length;t{if(!M(t=t.options.props)){var n={},r=e.attrs,i=e.props;if(I(r)||I(i))for(var o in t){var a=K(o);ut(n,i,o,a,!0)||ut(n,r,o,a,!1)}return n}})(t,e);if(!A(e.options.functional)){for(var u=t.on,l=(t.on=t.nativeOn,A(e.options.abstract)&&(l=t.slot,t={},l)&&(t.slot=l),t),d=l.hook||(l.hook={}),f=0;f{function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e})(v,h):v)}l=e.options.name||i;return new S("vue-component-"+e.cid+(l?"-"+l:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:c,listeners:u,tag:i,children:r},g)}var l=e,m=c,y=t,i=n,g=r,b=l.options,_={},w=b.props;if(I(w))for(var O in w)_[O]=Ve(O,w,m||T);else I(y.attrs)&&It(_,y.attrs),I(y.props)&&It(_,y.props);var E=new Lt(y,_,g,i,l);if((g=b.render.call(null,E._c,E))instanceof S)return Mt(g,y,E.parent,b);if(Array.isArray(g)){for(var x=dt(g)||[],$=new Array(x.length),C=0;C{for(var t=0;tdocument.createEvent("Event").timeStamp&&(ln=function(){return an.now()});var un=0,F=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++un,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new we,this.newDepIds=new we,this.expression="","function"==typeof t?this.getter=t:(this.getter=(e=>{var n;if(!se.test(e))return n=e.split("."),function(e){for(var t=0;te.id;)n--;f.splice(n+1,0,e)}else f.push(e);nn||(nn=!0,it(cn))}}},F.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||P(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){R(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},F.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},F.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},F.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||k(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}},{enumerable:!0,configurable:!0,get:D,set:D});function dn(e,t,n){s.get=function(){return this[t][n]},s.set=function(e){this[t][n]=e},Object.defineProperty(e,n,s)}function fn(e){e._watchers=[];var t=e.$options;if(t.props){var n,r=e,i=t.props,o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[];for(n in r.$parent&&N(!1),i){l=void 0;c=void 0;var l=n;s.push(l);var c=Ve(l,i,o,r);Ie(a,l,c),l in r||dn(r,"_props",l)}N(!0)}if(t.methods){var u,d=e,f=t.methods;for(u in d.$options.props,f)d[u]="function"!=typeof f[u]?D:J(f[u],d)}if(t.data){for(var p=e,h=p.$options.data,v=(j(h=p._data="function"==typeof h?((e,t)=>{xe();try{return e.call(t,t)}catch(e){return R(e,t,"data()"),{}}finally{$e()}})(h,p):h||{})||(h={}),Object.keys(h)),m=p.$options.props,y=(p.$options.methods,v.length);y--;){var g=v[y];m&&L(m,g)||(e=>36===(e=(e+"").charCodeAt(0))||95===e)(g)||dn(p,"_data",g)}z(h,!0)}else z(e._data={},!0);if(t.computed){var b,_=e,w=t.computed,O=_._computedWatchers=Object.create(null),E=ye();for(b in w){var x=w[b],$="function"==typeof x?x:x.get;E||(O[b]=new F(_,$||D,D,pn)),b in _||hn(_,b,x)}}if(t.watch&&t.watch!==ve){var C,T=e,A=t.watch;for(C in A){var k=A[C];if(Array.isArray(k))for(var S=0;S{var t,n,r=e.options,i=e.sealedOptions;for(n in r)r[n]!==i[n]&&((t=t||{})[n]=r[n]);return t})(e))&&E(e.extendOptions,n),(r=e.options=We(t,e.extendOptions)).name)&&(r.components[r.name]=e),r}function p(e){this._init(e)}function wn(e){e.cid=0;var d=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];function i(e){this._init(e)}var o=e.name||t.options.name;if(((i.prototype=Object.create(t.prototype)).constructor=i).cid=d++,i.options=We(t.options,e),i.super=t,i.options.props){var a,s=i;for(a in s.options.props)dn(s.prototype,"_props",a)}if(i.options.computed){var l,c=i,u=c.options.computed;for(l in u)hn(c.prototype,l,u[l])}return i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,oe.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=E({},i.options),r[n]=i}}function On(e){return e&&(e.Ctor.options.name||e.tag)}function En(e,t){return Array.isArray(e)?-1parseInt(this.max)&&$n(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};h=p,t={get:function(){return c}},Object.defineProperty(h,"config",t),h.util={warn:r,extend:E,mergeOptions:We,defineReactive:Ie},h.set=Pe,h.delete=De,h.nextTick=it,h.observable=function(e){return z(e),e},h.options=Object.create(null),oe.forEach(function(e){h.options[e+"s"]=Object.create(null)}),E((h.options._base=h).options.components,m),h.use=function(e){var t,n=this._installedPlugins||(this._installedPlugins=[]);return-1{var n;return"input"!==e.tag||(n=I(e=e.data)&&I(e=e.attrs)&&e.type,t=I(e=t.data)&&I(e=e.attrs)&&e.type,n===t)||Xn(n)&&Xn(t)})(e,t)||A(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}m={create:Kn,update:Kn,destroy:function(e){Kn(e,Yn)}};function Kn(e,t){if(e.data.directives||t.data.directives){var n,r,i,o=e,a=t,e=o===Yn,s=a===Yn,l=Zn(o.data.directives,o.context),c=Zn(a.data.directives,a.context),u=[],d=[];for(n in c)r=l[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,Qn(i,"update",a,o),i.def&&i.def.componentUpdated&&d.push(i)):(Qn(i,"bind",a,o),i.def&&i.def.inserted&&u.push(i));if(u.length&&(t=function(){for(var e=0;e=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}),ir.addEventListener(e,t,me?{capture:n,passive:r}:n)}function dr(e,t,n,r){(r||ir).removeEventListener(e,t._wrapper||t,n)}function fr(e,t){var n,r,i;M(e.data.on)&&M(t.data.on)||(n=t.data.on||{},e=e.data.on||{},ir=t.elm,I((r=n)[ar])&&(r[i=de?"change":"input"]=[].concat(r[ar],r[i]||[]),delete r[ar]),I(r[sr])&&(r.change=[].concat(r[sr],r.change||[]),delete r[sr]),ct(n,e,ur,dr,lr,t.context),ir=void 0)}var pr,a={create:fr,update:fr};function hr(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};for(n in I(l.__ob__)&&(l=t.data.domProps=E({},l)),s)n in l||(a[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var c=M(a._value=r)?"":String(r);o=c,(i=a).composing||"OPTION"!==i.tagName&&!((e,t)=>{var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t})(i,o)&&!((e,t)=>{var n=e.value;if(I(e=e._vModifiers)){if(e.number)return X(n)!==X(t);if(e.trim)return n.trim()!==t.trim()}return n!==t})(i,o)||(a.value=c)}else if("innerHTML"===n&&Bn(a.tagName)&&M(a.innerHTML)){(pr=pr||document.createElement("div")).innerHTML=""+r+"";for(var u=pr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var n={create:hr,update:hr},vr=e(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){e&&1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function mr(e){var t=yr(e.style);return e.staticStyle?E(e.staticStyle,t):t}function yr(e){return Array.isArray(e)?Q(e):"string"==typeof e?vr(e):e}function gr(e,t,n){if(_r.test(t))e.style.setProperty(t,n);else if(wr.test(n))e.style.setProperty(K(t),n.replace(wr,""),"important");else{var r=Er(t);if(Array.isArray(n))for(var i=0,o=n.length;i{var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=mr(i.data))&&E(r,n);(n=mr(e.data))&&E(r,n);for(var o=e;o=o.parent;)o.data&&(n=mr(o.data))&&E(r,n);return r})(t,!0));for(i in a)M(s[i])&&gr(o,i,"");for(i in s)(r=s[i])!==a[i]&&gr(o,i,null==r?"":r)}}var $r={create:xr,update:xr},Cr=/\s+/;function Tr(t,e){var n;(e=e&&e.trim())&&(t.classList?-1=o&&c()}var s=r===Lr?Pr:Nr,l=0,c=function(){t.removeEventListener(s,a),n()};setTimeout(function(){l{for(var t,p={},n=e.modules,y=e.nodeOps,r=0;r{var i=e.data;if(I(i)){a=I(e.componentInstance)&&i.keepAlive,I(i=i.hook)&&I(i=i.init)&&i(e,!1);if(I(e.componentInstance)){h(e,t),c(n,e.elm,r);if(A(a)){i=e;var o=t;var a=n;e=r;for(var s,l=i;l.componentInstance;)if(l=l.componentInstance._vnode,I(s=l.data)&&I(s=s.transition)){for(s=0;s{for(var r,i={},o=t;o<=n;++o)I(r=e[o].key)&&(i[r]=o);return i})(t,l,u)),!M(a=I(h.key)?o[h.key]:((e,t,n,r)=>{for(var i=n;i{for(;e=e.parent;)if(e.data.transition)return 1})(this.$vnode)){var i=ai(n);if(i){if(this._leaving)return li(e,n);var o="__transition-"+this._uid+"-",o=(i.key=null==i.key?i.isComment?o+"comment":o+i.tag:!B(i.key)||0===String(i.key).indexOf(o)?i.key:o+i.key,(i.data||(i.data={})).transition=si(this)),a=this._vnode,s=ai(a);if(i.data.directives&&i.data.directives.some(ui)&&(i.data.show=!0),s&&s.data&&(u=i,(l=s).key!==u.key||l.tag!==u.tag)&&!Vt(s)&&(!s.componentInstance||!s.componentInstance._vnode.isComment)){var l=s.data.transition=E({},o);if("out-in"===r)return this._leaving=!0,H(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),li(e,n);if("in-out"===r){if(Vt(i))return a;var c,u=function(){c()};H(o,"afterEnter",u),H(o,"enterCancelled",u),H(l,"delayLeave",function(e){c=e})}}}}return n}}},n=E({tag:String,moveClass:String},or);function di(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function fi(e){e.data.newPos=e.elm.getBoundingClientRect()}function pi(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,t=t.top-n.top;(r||t)&&(e.data.moved=!0,(n=e.elm.style).transform=n.WebkitTransform="translate("+r+"px,"+t+"px)",n.transitionDuration="0s")}delete n.mode;$r={Transition:a,TransitionGroup:{props:n,beforeMount:function(){var r=this,i=this._update;this._update=function(e,t){var n=Jt(r);r.__patch__(r._vnode,r.kept,!1,!0),r._vnode=r.kept,n(),i.call(r,e,t)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=si(this),s=0;s{for(var t={},n=0,r=["top","right","bottom","left"];n{var e,t;return r.postMessage&&!r.importScripts&&(e=!0,t=r.onmessage,r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e)})()?n():d=r.MessageChannel?((p=new MessageChannel).port1.onmessage=function(e){a(e.data)},function(e){p.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(f=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){a(e),t.onreadystatechange=null,f.removeChild(t),t=null},f.appendChild(t)}):function(e){setTimeout(a,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nn"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let c=["INPUT","TEXTAREA","SELECT"],s=function(e){let t=0(t++).toString()}(),u=()=>{var e=window.innerWidth,t=document.documentElement.clientWidth;return e&&t?Math.min(e,t):t||e},d=e=>e.touches&&0this.viewportWidth||e.clientX<0)&&!(e.clientY>this.viewportHeight||e.clientY<0)&&t){switch(this.targetClass){case"vue-modal-right":n-=t.offsetLeft,r=o;break;case"vue-modal-left":r=o,n=i+(this.initialX-e.clientX);break;case"vue-modal-top":n=i,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottom":n=i,r-=t.offsetTop;break;case"vue-modal-bottomRight":n-=t.offsetLeft,r-=t.offsetTop;break;case"vue-modal-topRight":n-=t.offsetLeft,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottomLeft":n=i+(this.initialX-e.clientX),r-=t.offsetTop;break;case"vue-modal-topLeft":n=i+(this.initialX-e.clientX),r=o+(this.initialY-e.clientY);break;default:console.error("Incorrrect/no resize direction.")}var a=Math.min(u(),this.maxWidth),s=Math.min(window.innerHeight,this.maxHeight),n=l(this.minWidth,a,n),r=l(this.minHeight,s,r),a=(this.initialX=e.clientX,this.initialY=e.clientY,this.size={width:n,height:r},{width:n-i,height:r-o});t.style.width=n+"px",t.style.height=r+"px",this.$emit("resize",{element:t,size:this.size,direction:this.targetClass,dimGrowth:a})}}}},f=a;t(7);function p(e,t,n,r,i,o,a,s){var l,c,u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):i&&(l=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l&&(u.functional?(u._injectStyles=l,c=u.render,u.render=function(e,t){return l.call(t),c(e,t)}):(t=u.beforeCreate,u.beforeCreate=t?[].concat(t,l):[l])),{exports:e,options:u}}var h=p(f,r,[],!1,null,null,null).exports,v="[-+]?[0-9]*.?[0-9]+";let m=[{name:"px",regexp:new RegExp("^".concat(v,"px$"))},{name:"%",regexp:new RegExp("^".concat(v,"%$"))},{name:"px",regexp:new RegExp("^".concat(v,"$"))}],y=t=>{var e;return"auto"===t?{type:t,value:0}:(e=m.find(e=>e.regexp.test(t)))?{type:e.name,value:parseFloat(t)}:{type:"",value:t}},g=e=>{switch(typeof e){case"number":return{type:"px",value:e};case"string":return y(e);default:return{type:"",value:e}}},b=e=>{var t;return"string"==typeof e?("%"===(t=g(e)).type||"px"===t.type)&&0e==document.activeElement;class N{constructor(){this.root=null,this.elements=[],this.onKeyDown=this.onKeyDown.bind(this),this.enable=this.enable.bind(this),this.disable=this.disable.bind(this),this.firstElement=this.firstElement.bind(this),this.lastElement=this.lastElement.bind(this)}lastElement(){return this.elements[this.elements.length-1]||null}firstElement(){return this.elements[0]||null}onKeyDown(e){var t;"Tab"!==(t=e).key&&9!==t.keyCode||(e.shiftKey&&O(this.firstElement())?(this.lastElement().focus(),e.preventDefault()):document.activeElement&&(e.shiftKey||!O(this.lastElement()))||(this.firstElement().focus(),e.preventDefault()))}enabled(){return!!this.root}enable(e){var t;e&&(this.root=e,this.elements=(e=this.root,t='button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=""]:not([disabled]), [contentEditable="true"]:not([disabled]), [contentEditable="TRUE"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex="-1"])',[...e.querySelectorAll(t)||[]]),(e=this.firstElement())&&e.focus(),this.root.addEventListener("keydown",this.onKeyDown))}disable(){this.root.removeEventListener("keydown",this.onKeyDown),this.root=null}}var z=N;function E(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function R(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):E(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let x="vm-transition--default",$={Enter:"enter",Entering:"entering",Leave:"leave",Leaving:"leavng"},H={name:"VueJsModal",inject:["$modal"],props:{name:{required:!0,type:String},resizable:{type:Boolean,default:!1},resizeEdges:{default:()=>["r","br","b","bl","l","tl","t","tr"],validator:t=>["r","br","b","bl","l","tl","t","tr"].filter(e=>-1!==t.indexOf(e)).length===t.length,type:Array},centerResize:{type:Boolean,default:!0},resizeIndicator:{type:Boolean,default:!0},adaptive:{type:Boolean,default:!1},draggable:{type:[Boolean,String],default:!1},scrollable:{type:Boolean,default:!1},focusTrap:{type:Boolean,default:!1},reset:{type:Boolean,default:!1},overlayTransition:{type:String,default:"vm-transition--overlay"},transition:{type:String,default:"vm-transition--modal"},clickToClose:{type:Boolean,default:!0},classes:{type:[String,Array],default:()=>[]},styles:{type:[String,Array,Object]},minWidth:{type:Number,default:0,validator(e){return 0<=e}},minHeight:{type:Number,default:0,validator(e){return 0<=e}},maxWidth:{type:Number,default:Number.MAX_SAFE_INTEGER},maxHeight:{type:Number,default:Number.MAX_SAFE_INTEGER},width:{type:[Number,String],default:600,validator(e){return"auto"===e||b(e)}},height:{type:[Number,String],default:300,validator(e){return"auto"===e||b(e)}},shiftX:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}},shiftY:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}}},components:{Resizer:h},data(){return{visible:!1,visibility:{modal:!1,overlay:!1},overlayTransitionState:null,modalTransitionState:null,shiftLeft:0,shiftTop:0,modal:{width:0,widthType:"px",height:0,heightType:"px",renderedHeight:0},viewportHeight:0,viewportWidth:0}},created(){this.setInitialSize()},beforeMount(){this.$modal.subscription.$on("toggle",this.onToggle),window.addEventListener("resize",this.onWindowResize),window.addEventListener("orientationchange",this.onWindowResize),this.onWindowResize(),this.scrollable&&!this.isAutoHeight&&console.warn('Modal "'.concat(this.name,'" has scrollable flag set to true ')+'but height is not "auto" ('.concat(this.height,")")),this.clickToClose&&window.addEventListener("keyup",this.onEscapeKeyUp)},mounted(){this.resizeObserver=new w(e=>{0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass(){return["vm--modal",this.classes]},stylesProp(){return"string"==typeof this.styles?this.styles.split(";").map(e=>e.trim()).filter(Boolean).map(e=>e.split(":")).reduce((e,t)=>{var[t,n]=t;return i(i({},e),{},{[t]:n})},{}):this.styles},modalStyle(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed(){return this.overlayTransitionState===$.Leave&&this.modalTransitionState===$.Leave}},watch:{isComponentReadyToBeDestroyed(e){e&&(this.visible=!1)}},methods:{startTransitionEnter(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter(){this.overlayTransitionState=$.Entering},afterOverlayTransitionEnter(){this.overlayTransitionState=$.Enter},beforeOverlayTransitionLeave(){this.overlayTransitionState=$.Leaving},afterOverlayTransitionLeave(){this.overlayTransitionState=$.Leave},beforeModalTransitionEnter(){this.modalTransitionState=$.Entering,this.$nextTick(()=>{this.resizeObserver.observe(this.$refs.modal)})},afterModalTransitionEnter(){this.modalTransitionState=$.Enter,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var e=this.createModalEvent({state:"opened"});this.$emit("opened",e)},beforeModalTransitionLeave(){this.modalTransitionState=$.Leaving,this.$refs.modal&&this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave(){this.modalTransitionState=$.Leave;var e=this.createModalEvent({state:"closed"});this.$emit("closed",e)},onToggle(e,t,n){this.name===e&&(e=void 0===t?!this.visible:t,this.toggle(e,n))},setInitialSize(){var e=g(this.width),t=g(this.height);this.modal.width=e.value,this.modal.widthType=e.type,this.modal.height=t.value,this.modal.heightType=t.type},onEscapeKeyUp(e){27===e.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent(){return R({name:this.name,ref:this.$refs.modal||null},0{t=!0},state:"before-open",params:e});this.$emit("before-open",e),t?this.scrollable&&document.body.classList.remove("vm--block-scroll"):("undefined"!=typeof document&&document.activeElement&&"BODY"!==document.activeElement.tagName&&document.activeElement.blur&&document.activeElement.blur(),this.visible=!0,this.$nextTick(()=>{this.startTransitionEnter()}))},close(e){this.scrollable&&document.body.classList.remove("vm--block-scroll");let t=!1;e=this.createModalEvent({cancel:()=>{t=!0},state:"before-close",params:e});this.$emit("before-close",e),t||this.startTransitionLeave()},toggle(e,t){var n=this.visible;n!==e&&(e?this.open(t):this.close(t))},getDraggableElement(){return!0===this.draggable?this.$refs.modal:"string"==typeof this.draggable?this.$refs.modal.querySelector(this.draggable):null},onOverlayClick(){this.clickToClose&&this.toggle(!1)},addDraggableListeners(){var e=this.getDraggableElement();if(e){let r=0,i=0,o=0,a=0;var t=e=>{var t=e.target;(t=t)&&-1!==c.indexOf(t.nodeName)||({clientX:t,clientY:e}=d(e),document.addEventListener("mousemove",n),document.addEventListener("touchmove",n),document.addEventListener("mouseup",s),document.addEventListener("touchend",s),r=t,i=e,o=this.shiftLeft,a=this.shiftTop)};let n=e=>{var{clientX:t,clientY:n}=d(e);this.shiftLeft=o+t-r,this.shiftTop=a+n-i,e.preventDefault()},s=e=>{this.ensureShiftInWindowBounds(),document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchend",s),e.preventDefault()};e.addEventListener("mousedown",t),e.addEventListener("touchstart",t)}},ensureShiftInWindowBounds(){var{viewportHeight:e,viewportWidth:t,shiftLeft:n,shiftTop:r,shiftX:i,shiftY:o,trueModalWidth:a,trueModalHeight:s}=this,t=t-a,a=Math.max(e-s,0),e=n+i*t,s=r+o*a;this.shiftLeft-=e-l(0,t,e),this.shiftTop-=s-l(0,a,s)}}},F=H,W=(t(8),p(F,n,[],!1,null,null,null));function C(){var n=this,e=n.$createElement,r=n._self._c||e;return r(n.$modal.context.componentName,{tag:"component",attrs:{name:"dialog",height:"auto",classes:["vue-dialog",n.params.class],width:n.width,"shift-y":.3,adaptive:!0,"focus-trap":!0,clickToClose:n.clickToClose,transition:n.transition},on:{"before-open":n.beforeOpened,"before-close":n.beforeClosed,opened:function(e){return n.$emit("opened",e)},closed:function(e){return n.$emit("closed",e)}}},[r("div",{staticClass:"vue-dialog-content"},[n.params.title?r("div",{staticClass:"vue-dialog-content-title",domProps:{innerHTML:n._s(n.params.title||"")}}):n._e(),n._v(" "),n.params.component?r(n.params.component,n._b({tag:"component"},"component",n.params.props,!1)):r("div",{domProps:{innerHTML:n._s(n.params.text||"")}})],1),n._v(" "),n.buttons?r("div",{staticClass:"vue-dialog-buttons"},n._l(n.buttons,function(e,t){return r("button",{key:t,class:e.class||"vue-dialog-button",style:n.buttonStyle,attrs:{type:"button",tabindex:"0"},domProps:{innerHTML:n._s(e.title)},on:{click:function(e){return e.stopPropagation(),n.click(t,e)}}})}),0):r("div",{staticClass:"vue-dialog-buttons-none"})])}var T=W.exports;C._withStripped=!0;var v={name:"VueJsDialog",props:{width:{type:[Number,String],default:400},clickToClose:{type:Boolean,default:!0},transition:{type:String}},inject:["$modal"],data(){return{params:{}}},computed:{buttons(){return this.params.buttons||[]},buttonStyle(){return{flex:"1 1 ".concat(100/this.buttons.length,"%")}}},methods:{beforeOpened(e){this.params=e.params||{},this.$emit("before-opened",e)},beforeClosed(e){this.params={},this.$emit("before-closed",e)},click(e,t){var n=this.buttons[e],n=null==n?void 0:n.handler;"function"==typeof n&&n(e,t,{source:2({})}},render(){return"function"==typeof this.node?this.node(this.scope):this.node}},V=B,X=p(V,void 0,void 0,!1,null,null,null),U=X.exports;function S(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function j(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let Y={data(){return{modals:[]}},components:{VNode:U},created(){(this.$root.__modalContainer=this).$modal.subscription.$emit("set-modal-container",this)},mounted(){this.$modal.subscription.$on("hide-all",()=>{this.modals=[]})},methods:{add(e){var t=1{this.$modal.show(a)})},remove(t){var e=this.modals.findIndex(e=>e.id===t);-1!==e&&this.modals.splice(e,1)}}},q=Y,G=p(q,k,[],!1,null,null,null);var K=G.exports,h=t(0),L=t.n(h),M=t(2);function I(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function P(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var J=function(e){let s=1{l.root.__modalContainer=e});return{context:l,subscription:a,show:function(){for(var e=arguments.length,t=new Array(e),n=0;n{a.$emit("toggle",e,!1,t)},hideAll:()=>{a.$emit("hide-all")},toggle:(e,t)=>{a.$emit("toggle",e,void 0,t)},setDynamicModalContainer:e=>{if(l.root=e){t=document.createElement("div"),document.body.appendChild(t);var t,n=Object(M.createVNode)(K);n.appContext=e.$.appContext;try{return Object(M.render)(n,t)}catch(e){console.error("Error rendering vnode:",e)}}else console.warn("Root component is undefined. Make sure the root instance is passed correctly.")}}};let Z="__VERSION__";e.default={install(t){var n=1"+i.css+""}return e}n.r(e),n.d(e,"default",function(){return i})},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-modal-top,\n.vue-modal-bottom,\n.vue-modal-left,\n.vue-modal-right,\n.vue-modal-topRight,\n.vue-modal-topLeft,\n.vue-modal-bottomLeft,\n.vue-modal-bottomRight {\n display: block;\n overflow: hidden;\n position: absolute;\n background: transparent;\n z-index: 9999999;\n}\n.vue-modal-topRight,\n.vue-modal-topLeft,\n.vue-modal-bottomLeft,\n.vue-modal-bottomRight {\n width: 12px;\n height: 12px;\n}\n.vue-modal-top {\n right: 12;\n top: 0;\n width: 100%;\n height: 12px;\n cursor: n-resize;\n}\n.vue-modal-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n height: 12px;\n cursor: s-resize;\n}\n.vue-modal-left {\n left: 0;\n top: 0;\n width: 12px;\n height: 100%;\n cursor: w-resize;\n}\n.vue-modal-right {\n right: 0;\n top: 0;\n width: 12px;\n height: 100%;\n cursor: e-resize;\n}\n.vue-modal-topRight {\n right: 0;\n top: 0;\n background: transparent;\n cursor: ne-resize;\n}\n.vue-modal-topLeft {\n left: 0;\n top: 0;\n cursor: nw-resize;\n}\n.vue-modal-bottomLeft {\n left: 0;\n bottom: 0;\n cursor: sw-resize;\n}\n.vue-modal-bottomRight {\n right: 0;\n bottom: 0;\n cursor: se-resize;\n}\n#vue-modal-triangle::after {\n display: block;\n position: absolute;\n content: '';\n background: transparent;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n border-bottom: 10px solid #ddd;\n border-left: 10px solid transparent;\n}\n#vue-modal-triangle.clicked::after {\n border-bottom: 10px solid #369be9;\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(1),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vm--block-scroll {\n overflow: hidden;\n width: 100vw;\n}\n.vm--container {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n z-index: 999;\n}\n.vm--overlay {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n background: rgba(0, 0, 0, 0.2);\n /* z-index: 999; */\n opacity: 1;\n}\n.vm--container.scrollable {\n height: 100%;\n min-height: 100vh;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n.vm--modal {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n\n background-color: white;\n border-radius: 3px;\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\n}\n.vm--container.scrollable .vm--modal {\n margin-bottom: 2px;\n}\n.vm--top-right-slot {\n display: block;\n position: absolute;\n right: 0;\n top: 0;\n}\n.vm-transition--overlay-enter-active,\n.vm-transition--overlay-leave-active {\n transition: all 50ms;\n}\n.vm-transition--overlay-enter,\n.vm-transition--overlay-leave-active {\n opacity: 0;\n}\n.vm-transition--modal-enter-active,\n.vm-transition--modal-leave-active {\n transition: all 400ms;\n}\n.vm-transition--modal-enter,\n.vm-transition--modal-leave-active {\n opacity: 0;\n transform: translateY(-20px);\n}\n.vm-transition--default-enter-active,\n.vm-transition--default-leave-active {\n transition: all 2ms;\n}\n.vm-transition--default-enter,\n.vm-transition--default-leave-active {\n opacity: 0;\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(2),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-dialog {\n font-size: 14px;\n}\n.vue-dialog div {\n box-sizing: border-box;\n}\n.vue-dialog-content {\n flex: 1 0 auto;\n width: 100%;\n padding: 14px;\n}\n.vue-dialog-content-title {\n font-weight: 600;\n padding-bottom: 14px;\n}\n.vue-dialog-buttons {\n display: flex;\n flex: 0 1 auto;\n width: 100%;\n border-top: 1px solid #eee;\n}\n.vue-dialog-buttons-none {\n width: 100%;\n padding-bottom: 14px;\n}\n.vue-dialog-button {\n font-size: inherit;\n background: transparent;\n padding: 0;\n margin: 0;\n border: 0;\n cursor: pointer;\n box-sizing: border-box;\n line-height: 40px;\n height: 40px;\n color: inherit;\n font: inherit;\n outline: none;\n}\n.vue-dialog-button:hover {\n background: #f9f9f9;\n}\n.vue-dialog-button:active {\n background: #f3f3f3;\n}\n.vue-dialog-button:not(:first-of-type) {\n border-left: 1px solid #eee;\n}\n",""])},function(t,e,n){"use strict";n.r(e),n.d(e,"Modal",function(){return lt}),n.d(e,"Dialog",function(){return dt}),n.d(e,"version",function(){return yt});function i(){var e=this,t=e.$createElement,n=e._self._c||t;return e.visible?n("div",{class:e.containerClass},[n("transition",{attrs:{name:e.guaranteedOverlayTransition},on:{"before-enter":e.beforeOverlayTransitionEnter,"after-enter":e.afterOverlayTransitionEnter,"before-leave":e.beforeOverlayTransitionLeave,"after-leave":e.afterOverlayTransitionLeave}},[e.visibility.overlay?n("div",{staticClass:"vm--overlay",attrs:{"data-modal":e.name,"aria-expanded":e.visibility.overlay.toString()},on:{click:function(t){return t.target!==t.currentTarget?null:(t.stopPropagation(),e.onOverlayClick(t))}}},[n("div",{staticClass:"vm--top-right-slot"},[e._t("top-right")],2)]):e._e()]),e._ssrNode(" "),n("transition",{attrs:{name:e.guaranteedModalTransition},on:{"before-enter":e.beforeModalTransitionEnter,"after-enter":e.afterModalTransitionEnter,"before-leave":e.beforeModalTransitionLeave,"after-leave":e.afterModalTransitionLeave}},[e.visibility.modal?n("div",{ref:"modal",class:e.modalClass,style:e.modalStyle,attrs:{"aria-expanded":e.visibility.modal.toString(),role:"dialog","aria-modal":"true"}},[e._t("default"),e._v(" "),e.resizable&&!e.isAutoHeight?n("resizer",{attrs:{"min-width":e.minWidth,"min-height":e.minHeight,"max-width":e.maxWidth,"max-height":e.maxHeight,"viewport-height":e.viewportHeight,"viewport-width":e.viewportWidth,"resize-indicator":e.resizeIndicator,"resize-edges":e.resizeEdges},on:{resize:e.onModalResize}}):e._e()],2):e._e()])],2):e._e()}function o(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._ssrNode((this.resizeEdges.includes("t")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("b")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("l")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("r")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("tr")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("tl")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("br")?"":"\x3c!----\x3e")+" "+(this.resizeEdges.includes("bl")?'
':"\x3c!----\x3e"))])}o._withStripped=i._withStripped=!0;function h(t,e,n){return nthis.viewportWidth||t.clientX<0)&&!(t.clientY>this.viewportHeight||t.clientY<0)&&e){switch(this.targetClass){case"vue-modal-right":n-=e.offsetLeft,i=r;break;case"vue-modal-left":i=r,n=o+(this.initialX-t.clientX);break;case"vue-modal-top":n=o,i=r+(this.initialY-t.clientY);break;case"vue-modal-bottom":n=o,i-=e.offsetTop;break;case"vue-modal-bottomRight":n-=e.offsetLeft,i-=e.offsetTop;break;case"vue-modal-topRight":n-=e.offsetLeft,i=r+(this.initialY-t.clientY);break;case"vue-modal-bottomLeft":n=o+(this.initialX-t.clientX),i-=e.offsetTop;break;case"vue-modal-topLeft":n=o+(this.initialX-t.clientX),i=r+(this.initialY-t.clientY);break;default:console.error("Incorrrect/no resize direction.")}var s=Math.min(u(),this.maxWidth),a=Math.min(window.innerHeight,this.maxHeight);n=h(this.minWidth,s,n),i=h(this.minHeight,a,i),this.initialX=t.clientX,this.initialY=t.clientY,this.size={width:n,height:i};var l={width:n-o,height:i-r};e.style.width=n+"px",e.style.height=i+"px",this.$emit("resize",{element:e,size:this.size,direction:this.targetClass,dimGrowth:l})}}}},o,[],!1,function(t){var e=n(5);e.__inject__&&e.__inject__(t)},null,"3d775b36");d.options.__file="src/components/Resizer.vue";var p=d.exports;function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(t){switch(m(t)){case"number":return{type:"px",value:t};case"string":return function(e){if("auto"===e)return{type:e,value:0};var t=_.find(function(t){return t.regexp.test(e)});return t?{type:t.name,value:parseFloat(e)}:{type:"",value:e}}(t);default:return{type:"",value:t}}}function g(t){if("string"!=typeof t)return 0<=t;var e=b(t);return("%"===e.type||"px"===e.type)&&0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass:function(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass:function(){return["vm--modal",this.classes]},stylesProp:function(){return"string"==typeof this.styles?a(this.styles):this.styles},modalStyle:function(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed:function(){return this.overlayTransitionState===ot&&this.modalTransitionState===ot}},watch:{isComponentReadyToBeDestroyed:function(t){t&&(this.visible=!1)}},methods:{startTransitionEnter:function(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave:function(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter:function(){this.overlayTransitionState=it},afterOverlayTransitionEnter:function(){this.overlayTransitionState=nt},beforeOverlayTransitionLeave:function(){this.overlayTransitionState=rt},afterOverlayTransitionLeave:function(){this.overlayTransitionState=ot},beforeModalTransitionEnter:function(){var t=this;this.modalTransitionState=it,this.$nextTick(function(){t.resizeObserver.observe(t.$refs.modal)})},afterModalTransitionEnter:function(){this.modalTransitionState=nt,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var t=this.createModalEvent({state:"opened"});this.$emit("opened",t)},beforeModalTransitionLeave:function(){this.modalTransitionState=rt,this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave:function(){this.modalTransitionState=ot;var t=this.createModalEvent({state:"closed"});this.$emit("closed",t)},onToggle:function(t,e,n){if(this.name===t){var i=void 0===e?!this.visible:e;this.toggle(i,n)}},setInitialSize:function(){var t=b(this.width),e=b(this.height);this.modal.width=t.value,this.modal.widthType=t.type,this.modal.height=e.value,this.modal.heightType=e.type},onEscapeKeyUp:function(t){27===t.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize:function(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent:function(t){var e=0{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-js-modal"]=t():e["vue-js-modal"]=t()})(global,function(){return n=[function(e,t,n){n=n(12);e.exports=new n},function(e,t){e.exports=function(n){var a=[];return a.toString=function(){return this.map(function(e){var t=((e,t)=>{var n=e[1]||"",r=e[3];return r?(t&&"function"==typeof btoa?(e=(e=>"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */")(r),t=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}),[n].concat(t).concat([e])):[n]).join("\n"):n})(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},a.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r{for(var n=[],r={},i=0;i"+r.css+""}return n}n.r(t),n.d(t,"default",function(){return r})},function(e,t,n){var r=n(7),i=((r="string"==typeof(r=r.__esModule?r.default:r)?[[e.i,r,""]]:r).locals&&(e.exports=r.locals),n(2).default);e.exports.__inject__=function(e){i("2d846f3a",r,!1,e)}},function(e,t,n){var r=n(9),i=((r="string"==typeof(r=r.__esModule?r.default:r)?[[e.i,r,""]]:r).locals&&(e.exports=r.locals),n(2).default);e.exports.__inject__=function(e){i("e5143200",r,!1,e)}},function(e,t,n){var r=n(11),i=((r="string"==typeof(r=r.__esModule?r.default:r)?[[e.i,r,""]]:r).locals&&(e.exports=r.locals),n(2).default);e.exports.__inject__=function(e){i("70ac89b8",r,!1,e)}},function(e,t,n){n.r(t);var r,i=n(3);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.vue-modal-top,\n.vue-modal-bottom,\n.vue-modal-left,\n.vue-modal-right,\n.vue-modal-topRight,\n.vue-modal-topLeft,\n.vue-modal-bottomLeft,\n.vue-modal-bottomRight {\n display: block;\n overflow: hidden;\n position: absolute;\n background: transparent;\n z-index: 9999999;\n}\n.vue-modal-topRight,\n.vue-modal-topLeft,\n.vue-modal-bottomLeft,\n.vue-modal-bottomRight {\n width: 12px;\n height: 12px;\n}\n.vue-modal-top {\n right: 12;\n top: 0;\n width: 100%;\n height: 12px;\n cursor: n-resize;\n}\n.vue-modal-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n height: 12px;\n cursor: s-resize;\n}\n.vue-modal-left {\n left: 0;\n top: 0;\n width: 12px;\n height: 100%;\n cursor: w-resize;\n}\n.vue-modal-right {\n right: 0;\n top: 0;\n width: 12px;\n height: 100%;\n cursor: e-resize;\n}\n.vue-modal-topRight {\n right: 0;\n top: 0;\n background: transparent;\n cursor: ne-resize;\n}\n.vue-modal-topLeft {\n left: 0;\n top: 0;\n cursor: nw-resize;\n}\n.vue-modal-bottomLeft {\n left: 0;\n bottom: 0;\n cursor: sw-resize;\n}\n.vue-modal-bottomRight {\n right: 0;\n bottom: 0;\n cursor: se-resize;\n}\n#vue-modal-triangle::after {\n display: block;\n position: absolute;\n content: '';\n background: transparent;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n border-bottom: 10px solid #ddd;\n border-left: 10px solid transparent;\n}\n#vue-modal-triangle.clicked::after {\n border-bottom: 10px solid #369be9;\n}\n",""])},function(e,t,n){n.r(t);var r,i=n(4);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.vm--block-scroll {\n overflow: hidden;\n width: 100vw;\n}\n.vm--container {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n z-index: 999;\n}\n.vm--overlay {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n background: rgba(0, 0, 0, 0.2);\n /* z-index: 999; */\n opacity: 1;\n}\n.vm--container.scrollable {\n height: 100%;\n min-height: 100vh;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n.vm--modal {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n\n background-color: white;\n border-radius: 3px;\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\n}\n.vm--container.scrollable .vm--modal {\n margin-bottom: 2px;\n}\n.vm--top-right-slot {\n display: block;\n position: absolute;\n right: 0;\n top: 0;\n}\n.vm-transition--overlay-enter-active,\n.vm-transition--overlay-leave-active {\n transition: all 50ms;\n}\n.vm-transition--overlay-enter,\n.vm-transition--overlay-leave-active {\n opacity: 0;\n}\n.vm-transition--modal-enter-active,\n.vm-transition--modal-leave-active {\n transition: all 400ms;\n}\n.vm-transition--modal-enter,\n.vm-transition--modal-leave-active {\n opacity: 0;\n transform: translateY(-20px);\n}\n.vm-transition--default-enter-active,\n.vm-transition--default-leave-active {\n transition: all 2ms;\n}\n.vm-transition--default-enter,\n.vm-transition--default-leave-active {\n opacity: 0;\n}\n",""])},function(e,t,n){n.r(t);var r,i=n(5);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.vue-dialog {\n font-size: 14px;\n}\n.vue-dialog div {\n box-sizing: border-box;\n}\n.vue-dialog-content {\n flex: 1 0 auto;\n width: 100%;\n padding: 14px;\n}\n.vue-dialog-content-title {\n font-weight: 600;\n padding-bottom: 14px;\n}\n.vue-dialog-buttons {\n display: flex;\n flex: 0 1 auto;\n width: 100%;\n border-top: 1px solid #eee;\n}\n.vue-dialog-buttons-none {\n width: 100%;\n padding-bottom: 14px;\n}\n.vue-dialog-button {\n font-size: inherit;\n background: transparent;\n padding: 0;\n margin: 0;\n border: 0;\n cursor: pointer;\n box-sizing: border-box;\n line-height: 40px;\n height: 40px;\n color: inherit;\n font: inherit;\n outline: none;\n}\n.vue-dialog-button:hover {\n background: #f9f9f9;\n}\n.vue-dialog-button:active {\n background: #f3f3f3;\n}\n.vue-dialog-button:not(:first-of-type) {\n border-left: 1px solid #eee;\n}\n",""])},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("b")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("l")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("r")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("tr")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("tl")?'
':"\x3c!----\x3e")+" "+(this.resizeEdges.includes("br")?"":"\x3c!----\x3e")+" "+(this.resizeEdges.includes("bl")?'
':"\x3c!----\x3e"))])}$._withStripped=E._withStripped=!0;let l=(e,t,n)=>n"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let W=["INPUT","TEXTAREA","SELECT"],B=function(e){let t=0(t++).toString()}(),V=()=>{var e=window.innerWidth,t=document.documentElement.clientWidth;return e&&t?Math.min(e,t):t||e},U=e=>e.touches&&0this.viewportWidth||e.clientX<0)&&!(e.clientY>this.viewportHeight||e.clientY<0)&&t){switch(this.targetClass){case"vue-modal-right":n-=t.offsetLeft,r=o;break;case"vue-modal-left":r=o,n=i+(this.initialX-e.clientX);break;case"vue-modal-top":n=i,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottom":n=i,r-=t.offsetTop;break;case"vue-modal-bottomRight":n-=t.offsetLeft,r-=t.offsetTop;break;case"vue-modal-topRight":n-=t.offsetLeft,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottomLeft":n=i+(this.initialX-e.clientX),r-=t.offsetTop;break;case"vue-modal-topLeft":n=i+(this.initialX-e.clientX),r=o+(this.initialY-e.clientY);break;default:console.error("Incorrrect/no resize direction.")}var a=Math.min(V(),this.maxWidth),s=Math.min(window.innerHeight,this.maxHeight),n=l(this.minWidth,a,n),r=l(this.minHeight,s,r),a=(this.initialX=e.clientX,this.initialY=e.clientY,this.size={width:n,height:r},{width:n-i,height:r-o});t.style.width=n+"px",t.style.height=r+"px",this.$emit("resize",{element:t,size:this.size,direction:this.targetClass,dimGrowth:a})}}}},Y=X;function q(e,t,n,r,i,o,a,s){var l,c,u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):i&&(l=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l&&(u.functional?(u._injectStyles=l,c=u.render,u.render=function(e,t){return l.call(t),c(e,t)}):(t=u.beforeCreate,u.beforeCreate=t?[].concat(t,l):[l])),{exports:e,options:u}}var e=q(Y,$,[],!1,function(e){var t=n(6);t.__inject__&&t.__inject__(e)},null,"a70e918a").exports,t="[-+]?[0-9]*.?[0-9]+";let G=[{name:"px",regexp:new RegExp("^".concat(t,"px$"))},{name:"%",regexp:new RegExp("^".concat(t,"%$"))},{name:"px",regexp:new RegExp("^".concat(t,"$"))}],K=t=>{var e;return"auto"===t?{type:t,value:0}:(e=G.find(e=>e.regexp.test(t)))?{type:e.name,value:parseFloat(t)}:{type:"",value:t}},J=e=>{switch(typeof e){case"number":return{type:"px",value:e};case"string":return K(e);default:return{type:"",value:e}}},Z=e=>{var t;return"string"==typeof e?("%"===(t=J(e)).type||"px"===t.type)&&0{for(var t={},n=0,r=["top","right","bottom","left"];ne==document.activeElement;class $e{constructor(){this.root=null,this.elements=[],this.onKeyDown=this.onKeyDown.bind(this),this.enable=this.enable.bind(this),this.disable=this.disable.bind(this),this.firstElement=this.firstElement.bind(this),this.lastElement=this.lastElement.bind(this)}lastElement(){return this.elements[this.elements.length-1]||null}firstElement(){return this.elements[0]||null}onKeyDown(e){var t;"Tab"!==(t=e).key&&9!==t.keyCode||(e.shiftKey&&Ee(this.firstElement())?(this.lastElement().focus(),e.preventDefault()):document.activeElement&&(e.shiftKey||!Ee(this.lastElement()))||(this.firstElement().focus(),e.preventDefault()))}enabled(){return!!this.root}enable(e){var t;e&&(this.root=e,this.elements=(e=this.root,t='button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=""]:not([disabled]), [contentEditable="true"]:not([disabled]), [contentEditable="TRUE"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex="-1"])',[...e.querySelectorAll(t)||[]]),(e=this.firstElement())&&e.focus(),this.root.addEventListener("keydown",this.onKeyDown))}disable(){this.root.removeEventListener("keydown",this.onKeyDown),this.root=null}}var Ce=$e;function ke(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ke(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let Se="vm-transition--default",a={Enter:"enter",Entering:"entering",Leave:"leave",Leaving:"leavng"},Te={name:"VueJsModal",inject:["$modal"],props:{name:{required:!0,type:String},resizable:{type:Boolean,default:!1},resizeEdges:{default:()=>["r","br","b","bl","l","tl","t","tr"],validator:t=>["r","br","b","bl","l","tl","t","tr"].filter(e=>-1!==t.indexOf(e)).length===t.length,type:Array},centerResize:{type:Boolean,default:!0},resizeIndicator:{type:Boolean,default:!0},adaptive:{type:Boolean,default:!1},draggable:{type:[Boolean,String],default:!1},scrollable:{type:Boolean,default:!1},focusTrap:{type:Boolean,default:!1},reset:{type:Boolean,default:!1},overlayTransition:{type:String,default:"vm-transition--overlay"},transition:{type:String,default:"vm-transition--modal"},clickToClose:{type:Boolean,default:!0},classes:{type:[String,Array],default:()=>[]},styles:{type:[String,Array,Object]},minWidth:{type:Number,default:0,validator(e){return 0<=e}},minHeight:{type:Number,default:0,validator(e){return 0<=e}},maxWidth:{type:Number,default:Number.MAX_SAFE_INTEGER},maxHeight:{type:Number,default:Number.MAX_SAFE_INTEGER},width:{type:[Number,String],default:600,validator(e){return"auto"===e||Z(e)}},height:{type:[Number,String],default:300,validator(e){return"auto"===e||Z(e)}},shiftX:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}},shiftY:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}}},components:{Resizer:e},data(){return{visible:!1,visibility:{modal:!1,overlay:!1},overlayTransitionState:null,modalTransitionState:null,shiftLeft:0,shiftTop:0,modal:{width:0,widthType:"px",height:0,heightType:"px",renderedHeight:0},viewportHeight:0,viewportWidth:0}},created(){this.setInitialSize()},beforeMount(){this.$modal.subscription.$on("toggle",this.onToggle),window.addEventListener("resize",this.onWindowResize),window.addEventListener("orientationchange",this.onWindowResize),this.onWindowResize(),this.scrollable&&!this.isAutoHeight&&console.warn('Modal "'.concat(this.name,'" has scrollable flag set to true ')+'but height is not "auto" ('.concat(this.height,")")),this.clickToClose&&window.addEventListener("keyup",this.onEscapeKeyUp)},mounted(){this.resizeObserver=new Oe(e=>{0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass(){return["vm--modal",this.classes]},stylesProp(){return"string"==typeof this.styles?this.styles.split(";").map(e=>e.trim()).filter(Boolean).map(e=>e.split(":")).reduce((e,t)=>{var[t,n]=t;return F(F({},e),{},{[t]:n})},{}):this.styles},modalStyle(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed(){return this.overlayTransitionState===a.Leave&&this.modalTransitionState===a.Leave}},watch:{isComponentReadyToBeDestroyed(e){e&&(this.visible=!1)}},methods:{startTransitionEnter(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter(){this.overlayTransitionState=a.Entering},afterOverlayTransitionEnter(){this.overlayTransitionState=a.Enter},beforeOverlayTransitionLeave(){this.overlayTransitionState=a.Leaving},afterOverlayTransitionLeave(){this.overlayTransitionState=a.Leave},beforeModalTransitionEnter(){this.modalTransitionState=a.Entering,this.$nextTick(()=>{this.resizeObserver.observe(this.$refs.modal)})},afterModalTransitionEnter(){this.modalTransitionState=a.Enter,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var e=this.createModalEvent({state:"opened"});this.$emit("opened",e)},beforeModalTransitionLeave(){this.modalTransitionState=a.Leaving,this.$refs.modal&&this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave(){this.modalTransitionState=a.Leave;var e=this.createModalEvent({state:"closed"});this.$emit("closed",e)},onToggle(e,t,n){this.name===e&&(e=void 0===t?!this.visible:t,this.toggle(e,n))},setInitialSize(){var e=J(this.width),t=J(this.height);this.modal.width=e.value,this.modal.widthType=e.type,this.modal.height=t.value,this.modal.heightType=t.type},onEscapeKeyUp(e){27===e.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize(){this.viewportWidth=V(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent(){return Ae({name:this.name,ref:this.$refs.modal||null},0{t=!0},state:"before-open",params:e});this.$emit("before-open",e),t?this.scrollable&&document.body.classList.remove("vm--block-scroll"):("undefined"!=typeof document&&document.activeElement&&"BODY"!==document.activeElement.tagName&&document.activeElement.blur&&document.activeElement.blur(),this.visible=!0,this.$nextTick(()=>{this.startTransitionEnter()}))},close(e){this.scrollable&&document.body.classList.remove("vm--block-scroll");let t=!1;e=this.createModalEvent({cancel:()=>{t=!0},state:"before-close",params:e});this.$emit("before-close",e),t||this.startTransitionLeave()},toggle(e,t){var n=this.visible;n!==e&&(e?this.open(t):this.close(t))},getDraggableElement(){return!0===this.draggable?this.$refs.modal:"string"==typeof this.draggable?this.$refs.modal.querySelector(this.draggable):null},onOverlayClick(){this.clickToClose&&this.toggle(!1)},addDraggableListeners(){var e=this.getDraggableElement();if(e){let r=0,i=0,o=0,a=0;var t=e=>{var t=e.target;(t=t)&&-1!==W.indexOf(t.nodeName)||({clientX:t,clientY:e}=U(e),document.addEventListener("mousemove",n),document.addEventListener("touchmove",n),document.addEventListener("mouseup",s),document.addEventListener("touchend",s),r=t,i=e,o=this.shiftLeft,a=this.shiftTop)};let n=e=>{var{clientX:t,clientY:n}=U(e);this.shiftLeft=o+t-r,this.shiftTop=a+n-i,e.preventDefault()},s=e=>{this.ensureShiftInWindowBounds(),document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchend",s),e.preventDefault()};e.addEventListener("mousedown",t),e.addEventListener("touchstart",t)}},ensureShiftInWindowBounds(){var{viewportHeight:e,viewportWidth:t,shiftLeft:n,shiftTop:r,shiftX:i,shiftY:o,trueModalWidth:a,trueModalHeight:s}=this,t=t-a,a=Math.max(e-s,0),e=n+i*t,s=r+o*a;this.shiftLeft-=e-l(0,t,e),this.shiftTop-=s-l(0,a,s)}}},je=Te;function Le(){var n=this,e=n.$createElement,r=n._self._c||e;return r(n.$modal.context.componentName,{tag:"component",attrs:{name:"dialog",height:"auto",classes:["vue-dialog",n.params.class],width:n.width,"shift-y":.3,adaptive:!0,"focus-trap":!0,clickToClose:n.clickToClose,transition:n.transition},on:{"before-open":n.beforeOpened,"before-close":n.beforeClosed,opened:function(e){return n.$emit("opened",e)},closed:function(e){return n.$emit("closed",e)}}},[r("div",{staticClass:"vue-dialog-content"},[n.params.title?r("div",{staticClass:"vue-dialog-content-title",domProps:{innerHTML:n._s(n.params.title||"")}}):n._e(),n._v(" "),n.params.component?r(n.params.component,n._b({tag:"component"},"component",n.params.props,!1)):r("div",{domProps:{innerHTML:n._s(n.params.text||"")}})],1),n._v(" "),n.buttons?r("div",{staticClass:"vue-dialog-buttons"},n._l(n.buttons,function(e,t){return r("button",{key:t,class:e.class||"vue-dialog-button",style:n.buttonStyle,attrs:{type:"button",tabindex:"0"},domProps:{innerHTML:n._s(e.title)},on:{click:function(e){return e.stopPropagation(),n.click(t,e)}}})}),0):r("div",{staticClass:"vue-dialog-buttons-none"})])}var Me=q(je,E,[],!1,function(e){var t=n(8);t.__inject__&&t.__inject__(e)},null,"8278052c").exports;Le._withStripped=!0;var Pe=q({name:"VueJsDialog",props:{width:{type:[Number,String],default:400},clickToClose:{type:Boolean,default:!0},transition:{type:String}},inject:["$modal"],data(){return{params:{}}},computed:{buttons(){return this.params.buttons||[]},buttonStyle(){return{flex:"1 1 ".concat(100/this.buttons.length,"%")}}},methods:{beforeOpened(e){this.params=e.params||{},this.$emit("before-opened",e)},beforeClosed(e){this.params={},this.$emit("before-closed",e)},click(e,t){var n=this.buttons[e],n=null==n?void 0:n.handler;"function"==typeof n&&n(e,t,{source:2({})}},render(){return"function"==typeof this.node?this.node(this.scope):this.node}},Ne=ze,Ie=q(Ne,void 0,void 0,!1,null,null,"4874e656"),Re=Ie.exports;function He(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Fe(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let We={data(){return{modals:[]}},components:{VNode:Re},created(){(this.$root.__modalContainer=this).$modal.subscription.$emit("set-modal-container",this)},mounted(){this.$modal.subscription.$on("hide-all",()=>{this.modals=[]})},methods:{add(e){var t=1{this.$modal.show(a)})},remove(t){var e=this.modals.findIndex(e=>e.id===t);-1!==e&&this.modals.splice(e,1)}}},Be=We,Ve=q(Be,De,[],!1,null,null,"65200538");var Ue=Ve.exports,t=n(0),Xe=n.n(t),k=Object.freeze({});function M(e){return null==e}function P(e){return null!=e}function A(e){return!0===e}function Ye(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function D(e){return null!==e&&"object"==typeof e}var qe=Object.prototype.toString;function j(e){return"[object Object]"===qe.call(e)}function Ge(e){return"[object RegExp]"===qe.call(e)}function Ke(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function Je(e){return P(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function Ze(e){return null==e?"":Array.isArray(e)||j(e)&&e.toString===qe?JSON.stringify(e,null,2):String(e)}function Qe(e){var t=parseFloat(e);return isNaN(t)?e:t}function d(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i{function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e})(),u=z,Pt=0,p=function(){this.id=Pt++,this.subs=[]},Dt=(p.prototype.addSub=function(e){this.subs.push(e)},p.prototype.removeSub=function(e){S(this.subs,e)},p.prototype.depend=function(){p.target&&p.target.addDep(this)},p.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t{for(var t=[],n=0;n{var r;if(L(t,"default"))return r=t.default,e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==on(t.type)?r.call(e):r})(r,t,e),o=Vt,N(!0),Xt(n),N(o)),n}function on(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function an(e,t){return on(e)===on(t)}function sn(e,t){if(!Array.isArray(t))return an(t,e)?0:-1;for(var n=0,r=t.length;n{function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:Cn(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r})(t,l,e[l]))}else r={};for(i in t)i in r||(r[i]=((e,t)=>function(){return e[t]})(t,i));return e&&Object.isExtensible(e)&&(e._normalized=r),gt(r,"$stable",a),gt(r,"$key",s),gt(r,"$hasNormal",o),r}function Ln(e,t){var n,r,i,o;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n{l="class"===t||"style"===t||et(t)?r:(e=r.attrs&&r.attrs.type,a||c.mustUseProp(i,e,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=it(t),n=st(t);e in l||n in l||(l[t]=o[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){o[t]=e}))})(e)}return r}function In(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Hn(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Rn(e,t,n){return Hn(e,"__once__"+t+(n?"_"+n:""),!0),e}function Hn(e,t,n){if(Array.isArray(e))for(var r=0;r{var t={_isComponent:!0,_parentVnode:e,parent:t},n=e.data.inlineTemplate;return P(n)&&(t.render=n.render,t.staticRenderFns=n.staticRenderFns),new e.componentOptions.Ctor(t)})(e,dr)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions,r=t.componentInstance=e.componentInstance,i=n.propsData,e=n.listeners,n=n.children,o=t.data.scopedSlots,a=r.$scopedSlots,a=!!(o&&!o.$stable||a!==k&&!a.$stable||o&&r.$scopedSlots.$key!==o.$key),o=!!(n||r.$options._renderChildren||a);if(r.$options._parentVnode=t,r.$vnode=t,r._vnode&&(r._vnode.parent=t),r.$options._renderChildren=n,r.$attrs=t.data.attrs||k,r.$listeners=e||k,i&&r.$options.props){N(!1);for(var s=r._props,l=r.$options._propKeys||[],c=0;c{var e,r,i,o,a,s,l,c,u;return A(t.error)&&P(t.errorComp)?t.errorComp:P(t.resolved)?t.resolved:((e=rr)&&P(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e),A(t.loading)&&P(t.loadingComp)?t.loadingComp:e&&!P(t.owners)?(r=t.owners=[e],i=!0,a=o=null,e.$on("hook:destroyed",function(){return S(r,e)}),s=function(e){for(var t=0,n=r.length;t{if(!M(t=t.options.props)){var n={},r=e.attrs,i=e.props;if(P(r)||P(i))for(var o in t){var a=st(o);$n(n,i,o,a,!0)||$n(n,r,o,a,!1)}return n}})(t,e);if(!A(e.options.functional)){for(var u=t.on,l=(t.on=t.nativeOn,A(e.options.abstract)&&(l=t.slot,t={},l)&&(t.slot=l),t),d=l.hook||(l.hook={}),f=0;f{function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e})(v,h):v)}l=e.options.name||i;return new T("vue-component-"+e.cid+(l?"-"+l:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:c,listeners:u,tag:i,children:r},g)}var l=e,m=c,y=t,i=n,g=r,b=l.options,_={},w=b.props;if(P(w))for(var x in w)_[x]=rn(x,w,m||k);else P(y.attrs)&&Gn(_,y.attrs),P(y.props)&&Gn(_,y.props);var O=new Yn(y,_,g,i,l);if((g=b.render.call(null,O._c,O))instanceof T)return qn(g,y,O.parent,b);if(Array.isArray(g)){for(var E=Cn(g)||[],$=new Array(E.length),C=0;C{for(var t=0;tdocument.createEvent("Event").timeStamp&&(xr=function(){return _r.now()});var Er=0,R=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Mt,this.newDepIds=new Mt,this.expression="","function"==typeof t?this.getter=t:(this.getter=(e=>{var n;if(!bt.test(e))return n=e.split("."),function(e){for(var t=0;te.id;)n--;v.splice(n+1,0,e)}else v.push(e);yr||(yr=!0,gn(Or))}}},R.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||D(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){I(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},R.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},R.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},R.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||S(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}},{enumerable:!0,configurable:!0,get:z,set:z});function Cr(e,t,n){$r.get=function(){return this[t][n]},$r.set=function(e){this[t][n]=e},Object.defineProperty(e,n,$r)}function kr(e){e._watchers=[];var t=e.$options;if(t.props){var n,r=e,i=t.props,o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[];for(n in r.$parent&&N(!1),i){l=void 0;c=void 0;var l=n;s.push(l);var c=rn(l,i,o,r);Yt(a,l,c),l in r||Cr(r,"_props",l)}N(!0)}if(t.methods){var u,d=e,f=t.methods;for(u in d.$options.props,f)d[u]="function"!=typeof f[u]?z:lt(f[u],d)}if(t.data){for(var p=e,h=p.$options.data,v=(j(h=p._data="function"==typeof h?((e,t)=>{zt();try{return e.call(t,t)}catch(e){return I(e,t,"data()"),{}}finally{Nt()}})(h,p):h||{})||(h={}),Object.keys(h)),m=p.$options.props,y=(p.$options.methods,v.length);y--;){var g=v[y];m&&L(m,g)||(e=>36===(e=(e+"").charCodeAt(0))||95===e)(g)||Cr(p,"_data",g)}Xt(h,!0)}else Xt(e._data={},!0);if(t.computed){var b,_=e,w=t.computed,x=_._computedWatchers=Object.create(null),O=St();for(b in w){var E=w[b],$="function"==typeof E?E:E.get;O||(x[b]=new R(_,$||z,z,Ar)),b in _||Sr(_,b,E)}}if(t.watch&&t.watch!==kt){var C,k=e,A=t.watch;for(C in A){var S=A[C];if(Array.isArray(S))for(var T=0;T{var t,n,r=e.options,i=e.sealedOptions;for(n in r)r[n]!==i[n]&&((t=t||{})[n]=r[n]);return t})(e))&&x(e.extendOptions,n),(r=e.options=tn(t,e.extendOptions)).name)&&(r.components[r.name]=e),r}function m(e){this._init(e)}function zr(e){e.cid=0;var d=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];function i(e){this._init(e)}var o=e.name||t.options.name;if(((i.prototype=Object.create(t.prototype)).constructor=i).cid=d++,i.options=tn(t.options,e),i.super=t,i.options.props){var a,s=i;for(a in s.options.props)Cr(s.prototype,"_props",a)}if(i.options.computed){var l,c=i,u=c.options.computed;for(l in u)Sr(c.prototype,l,u[l])}return i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,yt.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=x({},i.options),r[n]=i}}function Nr(e){return e&&(e.Ctor.options.name||e.tag)}function Ir(e,t){return Array.isArray(e)?-1parseInt(this.max)&&Hr(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};y=m,e={get:function(){return c}},Object.defineProperty(y,"config",e),y.util={warn:u,extend:x,mergeOptions:tn,defineReactive:Yt},y.set=qt,y.delete=Gt,y.nextTick=gn,y.observable=function(e){return Xt(e),e},y.options=Object.create(null),yt.forEach(function(e){y.options[e+"s"]=Object.create(null)}),x((y.options._base=y).options.components,b),y.use=function(e){var t,n=this._installedPlugins||(this._installedPlugins=[]);return-1{var n;return"input"!==e.tag||(n=P(e=e.data)&&P(e=e.attrs)&&e.type,t=P(e=t.data)&&P(e=e.attrs)&&e.type,n===t)||ai(n)&&ai(t)})(e,t)||A(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}b={create:di,update:di,destroy:function(e){di(e,li)}};function di(e,t){if(e.data.directives||t.data.directives){var n,r,i,o=e,a=t,e=o===li,s=a===li,l=pi(o.data.directives,o.context),c=pi(a.data.directives,a.context),u=[],d=[];for(n in c)r=l[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,hi(i,"update",a,o),i.def&&i.def.componentUpdated&&d.push(i)):(hi(i,"bind",a,o),i.def&&i.def.inserted&&u.push(i));if(u.length&&(t=function(){for(var e=0;e=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}),bi.addEventListener(e,t,At?{capture:n,passive:r}:n)}function Ci(e,t,n,r){(r||bi).removeEventListener(e,t._wrapper||t,n)}function ki(e,t){var n,r,i;M(e.data.on)&&M(t.data.on)||(n=t.data.on||{},e=e.data.on||{},bi=t.elm,P((r=n)[wi])&&(r[i=Ot?"change":"input"]=[].concat(r[wi],r[i]||[]),delete r[wi]),P(r[xi])&&(r.change=[].concat(r[xi],r.change||[]),delete r[xi]),On(n,e,$i,Ci,Oi,t.context),bi=void 0)}var Ai,f={create:ki,update:ki};function Si(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};for(n in P(l.__ob__)&&(l=t.data.domProps=x({},l)),s)n in l||(a[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var c=M(a._value=r)?"":String(r);o=c,(i=a).composing||"OPTION"!==i.tagName&&!((e,t)=>{var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t})(i,o)&&!((e,t)=>{var n=e.value;if(P(e=e._vModifiers)){if(e.number)return Qe(n)!==Qe(t);if(e.trim)return n.trim()!==t.trim()}return n!==t})(i,o)||(a.value=c)}else if("innerHTML"===n&&ii(a.tagName)&&M(a.innerHTML)){(Ai=Ai||document.createElement("div")).innerHTML=""+r+"";for(var u=Ai.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var t={create:Si,update:Si},Ti=nt(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){e&&1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function ji(e){var t=Li(e.style);return e.staticStyle?x(e.staticStyle,t):t}function Li(e){return Array.isArray(e)?ut(e):"string"==typeof e?Ti(e):e}function Mi(e,t,n){if(Di.test(t))e.style.setProperty(t,n);else if(zi.test(n))e.style.setProperty(st(t),n.replace(zi,""),"important");else{var r=Ii(t);if(Array.isArray(n))for(var i=0,o=n.length;i{var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ji(i.data))&&x(r,n);(n=ji(e.data))&&x(r,n);for(var o=e;o=o.parent;)o.data&&(n=ji(o.data))&&x(r,n);return r})(t,!0));for(i in a)M(s[i])&&Mi(o,i,"");for(i in s)(r=s[i])!==a[i]&&Mi(o,i,null==r?"":r)}}var Hi={create:Ri,update:Ri},Fi=/\s+/;function Wi(t,e){var n;(e=e&&e.trim())&&(t.classList?-1=o&&c()}var s=r===Yi?Ki:Zi,l=0,c=function(){t.removeEventListener(s,a),n()};setTimeout(function(){l{for(var t,p={},n=e.modules,y=e.nodeOps,r=0;r{var i=e.data;if(P(i)){a=P(e.componentInstance)&&i.keepAlive,P(i=i.hook)&&P(i=i.init)&&i(e,!1);if(P(e.componentInstance)){h(e,t),c(n,e.elm,r);if(A(a)){i=e;var o=t;var a=n;e=r;for(var s,l=i;l.componentInstance;)if(l=l.componentInstance._vnode,P(s=l.data)&&P(s=s.transition)){for(s=0;s{for(var r,i={},o=t;o<=n;++o)P(r=e[o].key)&&(i[r]=o);return i})(t,l,u)),!M(a=P(h.key)?o[h.key]:((e,t,n,r)=>{for(var i=n;i{for(;e=e.parent;)if(e.data.transition)return 1})(this.$vnode)){var i=xo(n);if(i){if(this._leaving)return Eo(e,n);var o="__transition-"+this._uid+"-",o=(i.key=null==i.key?i.isComment?o+"comment":o+i.tag:!Ye(i.key)||0===String(i.key).indexOf(o)?i.key:o+i.key,(i.data||(i.data={})).transition=Oo(this)),a=this._vnode,s=xo(a);if(i.data.directives&&i.data.directives.some(Co)&&(i.data.show=!0),s&&s.data&&(u=i,(l=s).key!==u.key||l.tag!==u.tag)&&!or(s)&&(!s.componentInstance||!s.componentInstance._vnode.isComment)){var l=s.data.transition=x({},o);if("out-in"===r)return this._leaving=!0,En(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Eo(e,n);if("in-out"===r){if(or(i))return a;var c,u=function(){c()};En(o,"afterEnter",u),En(o,"enterCancelled",u),En(l,"delayLeave",function(e){c=e})}}}}return n}}},t=x({tag:String,moveClass:String},_i);function ko(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ao(e){e.data.newPos=e.elm.getBoundingClientRect()}function So(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,t=t.top-n.top;(r||t)&&(e.data.moved=!0,(n=e.elm.style).transform=n.WebkitTransform="translate("+r+"px,"+t+"px)",n.transitionDuration="0s")}delete t.mode;Hi={Transition:f,TransitionGroup:{props:t,beforeMount:function(){var r=this,i=this._update;this._update=function(e,t){var n=fr(r);r.__patch__(r._vnode,r.kept,!1,!0),r._vnode=r.kept,n(),i.call(r,e,t)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Oo(this),s=0;s"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):To(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var Lo=function(e){let s=1{l.root.__modalContainer=e});return{context:l,subscription:a,show:function(){for(var e=arguments.length,t=new Array(e),n=0;n{a.$emit("toggle",e,!1,t)},hideAll:()=>{a.$emit("hide-all")},toggle:(e,t)=>{a.$emit("toggle",e,void 0,t)},setDynamicModalContainer:e=>{if(l.root=e){t=document.createElement("div"),document.body.appendChild(t);var t,n=(void 0)(Ue);n.appContext=e.$.appContext;try{return(void 0)(n,t)}catch(e){console.error("Error rendering vnode:",e)}}else console.warn("Root component is undefined. Make sure the root instance is passed correctly.")}}};let Mo="__VERSION__";w.default={install(t){var n=1this.viewportWidth||t.clientX<0)&&!(t.clientY>this.viewportHeight||t.clientY<0)&&e){switch(this.targetClass){case"vue-modal-right":i-=e.offsetLeft,n=r;break;case"vue-modal-left":n=r,i=o+(this.initialX-t.clientX);break;case"vue-modal-top":i=o,n=r+(this.initialY-t.clientY);break;case"vue-modal-bottom":i=o,n-=e.offsetTop;break;case"vue-modal-bottomRight":i-=e.offsetLeft,n-=e.offsetTop;break;case"vue-modal-topRight":i-=e.offsetLeft,n=r+(this.initialY-t.clientY);break;case"vue-modal-bottomLeft":i=o+(this.initialX-t.clientX),n-=e.offsetTop;break;case"vue-modal-topLeft":i=o+(this.initialX-t.clientX),n=r+(this.initialY-t.clientY);break;default:console.error("Incorrrect/no resize direction.")}var s=Math.min(u(),this.maxWidth),a=Math.min(window.innerHeight,this.maxHeight);i=h(this.minWidth,s,i),n=h(this.minHeight,a,n),this.initialX=t.clientX,this.initialY=t.clientY,this.size={width:i,height:n};var l={width:i-o,height:n-r};e.style.width=i+"px",e.style.height=n+"px",this.$emit("resize",{element:e,size:this.size,direction:this.targetClass,dimGrowth:l})}}}},o,[],!1,function(t){var e=i(3);e.__inject__&&e.__inject__(t)},null,"3d775b36");d.options.__file="src/components/Resizer.vue";var m=d.exports;function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(t){switch(p(t)){case"number":return{type:"px",value:t};case"string":return function(e){if("auto"===e)return{type:e,value:0};var t=_.find(function(t){return t.regexp.test(e)});return t?{type:t.name,value:parseFloat(e)}:{type:"",value:e}}(t);default:return{type:"",value:t}}}function y(t){if("string"!=typeof t)return 0<=t;var e=b(t);return("%"===e.type||"px"===e.type)&&0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass:function(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass:function(){return["vm--modal",this.classes]},stylesProp:function(){return"string"==typeof this.styles?a(this.styles):this.styles},modalStyle:function(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed:function(){return this.overlayTransitionState===ot&&this.modalTransitionState===ot}},watch:{isComponentReadyToBeDestroyed:function(t){t&&(this.visible=!1)}},methods:{startTransitionEnter:function(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave:function(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter:function(){this.overlayTransitionState=nt},afterOverlayTransitionEnter:function(){this.overlayTransitionState=it},beforeOverlayTransitionLeave:function(){this.overlayTransitionState=rt},afterOverlayTransitionLeave:function(){this.overlayTransitionState=ot},beforeModalTransitionEnter:function(){var t=this;this.modalTransitionState=nt,this.$nextTick(function(){t.resizeObserver.observe(t.$refs.modal)})},afterModalTransitionEnter:function(){this.modalTransitionState=it,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var t=this.createModalEvent({state:"opened"});this.$emit("opened",t)},beforeModalTransitionLeave:function(){this.modalTransitionState=rt,this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave:function(){this.modalTransitionState=ot;var t=this.createModalEvent({state:"closed"});this.$emit("closed",t)},onToggle:function(t,e,i){if(this.name===t){var n=void 0===e?!this.visible:e;this.toggle(n,i)}},setInitialSize:function(){var t=b(this.width),e=b(this.height);this.modal.width=t.value,this.modal.widthType=t.type,this.modal.height=e.value,this.modal.heightType=e.type},onEscapeKeyUp:function(t){27===t.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize:function(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent:function(t){var e=0{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-js-modal"]=t():e["vue-js-modal"]=t()})(global,function(){return n=[function(e,t,n){n=n(7);e.exports=new n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t);var r,i=n(1);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t,n){n.r(t);var r,i=n(2);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t,n){n.r(t);var r,i=n(3);for(r in i)["default"].indexOf(r)<0&&(e=>{n.d(t,e,function(){return i[e]})})(r)},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;rn"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let W=["INPUT","TEXTAREA","SELECT"],B=function(e){let t=0(t++).toString()}(),V=()=>{var e=window.innerWidth,t=document.documentElement.clientWidth;return e&&t?Math.min(e,t):t||e},X=e=>e.touches&&0this.viewportWidth||e.clientX<0)&&!(e.clientY>this.viewportHeight||e.clientY<0)&&t){switch(this.targetClass){case"vue-modal-right":n-=t.offsetLeft,r=o;break;case"vue-modal-left":r=o,n=i+(this.initialX-e.clientX);break;case"vue-modal-top":n=i,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottom":n=i,r-=t.offsetTop;break;case"vue-modal-bottomRight":n-=t.offsetLeft,r-=t.offsetTop;break;case"vue-modal-topRight":n-=t.offsetLeft,r=o+(this.initialY-e.clientY);break;case"vue-modal-bottomLeft":n=i+(this.initialX-e.clientX),r-=t.offsetTop;break;case"vue-modal-topLeft":n=i+(this.initialX-e.clientX),r=o+(this.initialY-e.clientY);break;default:console.error("Incorrrect/no resize direction.")}var a=Math.min(V(),this.maxWidth),s=Math.min(window.innerHeight,this.maxHeight),n=l(this.minWidth,a,n),r=l(this.minHeight,s,r),a=(this.initialX=e.clientX,this.initialY=e.clientY,this.size={width:n,height:r},{width:n-i,height:r-o});t.style.width=n+"px",t.style.height=r+"px",this.$emit("resize",{element:t,size:this.size,direction:this.targetClass,dimGrowth:a})}}}},Y=U;function q(e,t,n,r,i,o,a,s){var l,c,u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):i&&(l=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l&&(u.functional?(u._injectStyles=l,c=u.render,u.render=function(e,t){return l.call(t),c(e,t)}):(t=u.beforeCreate,u.beforeCreate=t?[].concat(t,l):[l])),{exports:e,options:u}}var e=q(Y,$,[],!1,function(e){var t=n(4);t.__inject__&&t.__inject__(e)},null,"a70e918a").exports,t="[-+]?[0-9]*.?[0-9]+";let G=[{name:"px",regexp:new RegExp("^".concat(t,"px$"))},{name:"%",regexp:new RegExp("^".concat(t,"%$"))},{name:"px",regexp:new RegExp("^".concat(t,"$"))}],K=t=>{var e;return"auto"===t?{type:t,value:0}:(e=G.find(e=>e.regexp.test(t)))?{type:e.name,value:parseFloat(t)}:{type:"",value:t}},J=e=>{switch(typeof e){case"number":return{type:"px",value:e};case"string":return K(e);default:return{type:"",value:e}}},Z=e=>{var t;return"string"==typeof e?("%"===(t=J(e)).type||"px"===t.type)&&0{for(var t={},n=0,r=["top","right","bottom","left"];ne==document.activeElement;class $e{constructor(){this.root=null,this.elements=[],this.onKeyDown=this.onKeyDown.bind(this),this.enable=this.enable.bind(this),this.disable=this.disable.bind(this),this.firstElement=this.firstElement.bind(this),this.lastElement=this.lastElement.bind(this)}lastElement(){return this.elements[this.elements.length-1]||null}firstElement(){return this.elements[0]||null}onKeyDown(e){var t;"Tab"!==(t=e).key&&9!==t.keyCode||(e.shiftKey&&Ee(this.firstElement())?(this.lastElement().focus(),e.preventDefault()):document.activeElement&&(e.shiftKey||!Ee(this.lastElement()))||(this.firstElement().focus(),e.preventDefault()))}enabled(){return!!this.root}enable(e){var t;e&&(this.root=e,this.elements=(e=this.root,t='button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=""]:not([disabled]), [contentEditable="true"]:not([disabled]), [contentEditable="TRUE"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex="-1"])',[...e.querySelectorAll(t)||[]]),(e=this.firstElement())&&e.focus(),this.root.addEventListener("keydown",this.onKeyDown))}disable(){this.root.removeEventListener("keydown",this.onKeyDown),this.root=null}}var Ce=$e;function Ae(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ke(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Ae(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let Se="vm-transition--default",a={Enter:"enter",Entering:"entering",Leave:"leave",Leaving:"leavng"},Te={name:"VueJsModal",inject:["$modal"],props:{name:{required:!0,type:String},resizable:{type:Boolean,default:!1},resizeEdges:{default:()=>["r","br","b","bl","l","tl","t","tr"],validator:t=>["r","br","b","bl","l","tl","t","tr"].filter(e=>-1!==t.indexOf(e)).length===t.length,type:Array},centerResize:{type:Boolean,default:!0},resizeIndicator:{type:Boolean,default:!0},adaptive:{type:Boolean,default:!1},draggable:{type:[Boolean,String],default:!1},scrollable:{type:Boolean,default:!1},focusTrap:{type:Boolean,default:!1},reset:{type:Boolean,default:!1},overlayTransition:{type:String,default:"vm-transition--overlay"},transition:{type:String,default:"vm-transition--modal"},clickToClose:{type:Boolean,default:!0},classes:{type:[String,Array],default:()=>[]},styles:{type:[String,Array,Object]},minWidth:{type:Number,default:0,validator(e){return 0<=e}},minHeight:{type:Number,default:0,validator(e){return 0<=e}},maxWidth:{type:Number,default:Number.MAX_SAFE_INTEGER},maxHeight:{type:Number,default:Number.MAX_SAFE_INTEGER},width:{type:[Number,String],default:600,validator(e){return"auto"===e||Z(e)}},height:{type:[Number,String],default:300,validator(e){return"auto"===e||Z(e)}},shiftX:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}},shiftY:{type:Number,default:.5,validator(e){return 0<=e&&e<=1}}},components:{Resizer:e},data(){return{visible:!1,visibility:{modal:!1,overlay:!1},overlayTransitionState:null,modalTransitionState:null,shiftLeft:0,shiftTop:0,modal:{width:0,widthType:"px",height:0,heightType:"px",renderedHeight:0},viewportHeight:0,viewportWidth:0}},created(){this.setInitialSize()},beforeMount(){this.$modal.subscription.$on("toggle",this.onToggle),window.addEventListener("resize",this.onWindowResize),window.addEventListener("orientationchange",this.onWindowResize),this.onWindowResize(),this.scrollable&&!this.isAutoHeight&&console.warn('Modal "'.concat(this.name,'" has scrollable flag set to true ')+'but height is not "auto" ('.concat(this.height,")")),this.clickToClose&&window.addEventListener("keyup",this.onEscapeKeyUp)},mounted(){this.resizeObserver=new xe(e=>{0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass(){return["vm--modal",this.classes]},stylesProp(){return"string"==typeof this.styles?this.styles.split(";").map(e=>e.trim()).filter(Boolean).map(e=>e.split(":")).reduce((e,t)=>{var[t,n]=t;return F(F({},e),{},{[t]:n})},{}):this.styles},modalStyle(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed(){return this.overlayTransitionState===a.Leave&&this.modalTransitionState===a.Leave}},watch:{isComponentReadyToBeDestroyed(e){e&&(this.visible=!1)}},methods:{startTransitionEnter(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter(){this.overlayTransitionState=a.Entering},afterOverlayTransitionEnter(){this.overlayTransitionState=a.Enter},beforeOverlayTransitionLeave(){this.overlayTransitionState=a.Leaving},afterOverlayTransitionLeave(){this.overlayTransitionState=a.Leave},beforeModalTransitionEnter(){this.modalTransitionState=a.Entering,this.$nextTick(()=>{this.resizeObserver.observe(this.$refs.modal)})},afterModalTransitionEnter(){this.modalTransitionState=a.Enter,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var e=this.createModalEvent({state:"opened"});this.$emit("opened",e)},beforeModalTransitionLeave(){this.modalTransitionState=a.Leaving,this.$refs.modal&&this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave(){this.modalTransitionState=a.Leave;var e=this.createModalEvent({state:"closed"});this.$emit("closed",e)},onToggle(e,t,n){this.name===e&&(e=void 0===t?!this.visible:t,this.toggle(e,n))},setInitialSize(){var e=J(this.width),t=J(this.height);this.modal.width=e.value,this.modal.widthType=e.type,this.modal.height=t.value,this.modal.heightType=t.type},onEscapeKeyUp(e){27===e.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize(){this.viewportWidth=V(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent(){return ke({name:this.name,ref:this.$refs.modal||null},0{t=!0},state:"before-open",params:e});this.$emit("before-open",e),t?this.scrollable&&document.body.classList.remove("vm--block-scroll"):("undefined"!=typeof document&&document.activeElement&&"BODY"!==document.activeElement.tagName&&document.activeElement.blur&&document.activeElement.blur(),this.visible=!0,this.$nextTick(()=>{this.startTransitionEnter()}))},close(e){this.scrollable&&document.body.classList.remove("vm--block-scroll");let t=!1;e=this.createModalEvent({cancel:()=>{t=!0},state:"before-close",params:e});this.$emit("before-close",e),t||this.startTransitionLeave()},toggle(e,t){var n=this.visible;n!==e&&(e?this.open(t):this.close(t))},getDraggableElement(){return!0===this.draggable?this.$refs.modal:"string"==typeof this.draggable?this.$refs.modal.querySelector(this.draggable):null},onOverlayClick(){this.clickToClose&&this.toggle(!1)},addDraggableListeners(){var e=this.getDraggableElement();if(e){let r=0,i=0,o=0,a=0;var t=e=>{var t=e.target;(t=t)&&-1!==W.indexOf(t.nodeName)||({clientX:t,clientY:e}=X(e),document.addEventListener("mousemove",n),document.addEventListener("touchmove",n),document.addEventListener("mouseup",s),document.addEventListener("touchend",s),r=t,i=e,o=this.shiftLeft,a=this.shiftTop)};let n=e=>{var{clientX:t,clientY:n}=X(e);this.shiftLeft=o+t-r,this.shiftTop=a+n-i,e.preventDefault()},s=e=>{this.ensureShiftInWindowBounds(),document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchend",s),e.preventDefault()};e.addEventListener("mousedown",t),e.addEventListener("touchstart",t)}},ensureShiftInWindowBounds(){var{viewportHeight:e,viewportWidth:t,shiftLeft:n,shiftTop:r,shiftX:i,shiftY:o,trueModalWidth:a,trueModalHeight:s}=this,t=t-a,a=Math.max(e-s,0),e=n+i*t,s=r+o*a;this.shiftLeft-=e-l(0,t,e),this.shiftTop-=s-l(0,a,s)}}},je=Te;function Le(){var n=this,e=n.$createElement,r=n._self._c||e;return r(n.$modal.context.componentName,{tag:"component",attrs:{name:"dialog",height:"auto",classes:["vue-dialog",n.params.class],width:n.width,"shift-y":.3,adaptive:!0,"focus-trap":!0,clickToClose:n.clickToClose,transition:n.transition},on:{"before-open":n.beforeOpened,"before-close":n.beforeClosed,opened:function(e){return n.$emit("opened",e)},closed:function(e){return n.$emit("closed",e)}}},[r("div",{staticClass:"vue-dialog-content"},[n.params.title?r("div",{staticClass:"vue-dialog-content-title",domProps:{innerHTML:n._s(n.params.title||"")}}):n._e(),n._v(" "),n.params.component?r(n.params.component,n._b({tag:"component"},"component",n.params.props,!1)):r("div",{domProps:{innerHTML:n._s(n.params.text||"")}})],1),n._v(" "),n.buttons?r("div",{staticClass:"vue-dialog-buttons"},n._l(n.buttons,function(e,t){return r("button",{key:t,class:e.class||"vue-dialog-button",style:n.buttonStyle,attrs:{type:"button",tabindex:"0"},domProps:{innerHTML:n._s(e.title)},on:{click:function(e){return e.stopPropagation(),n.click(t,e)}}})}),0):r("div",{staticClass:"vue-dialog-buttons-none"})])}var Me=q(je,E,[],!1,function(e){var t=n(5);t.__inject__&&t.__inject__(e)},null,"8278052c").exports;Le._withStripped=!0;var De=q({name:"VueJsDialog",props:{width:{type:[Number,String],default:400},clickToClose:{type:Boolean,default:!0},transition:{type:String}},inject:["$modal"],data(){return{params:{}}},computed:{buttons(){return this.params.buttons||[]},buttonStyle(){return{flex:"1 1 ".concat(100/this.buttons.length,"%")}}},methods:{beforeOpened(e){this.params=e.params||{},this.$emit("before-opened",e)},beforeClosed(e){this.params={},this.$emit("before-closed",e)},click(e,t){var n=this.buttons[e],n=null==n?void 0:n.handler;"function"==typeof n&&n(e,t,{source:2({})}},render(){return"function"==typeof this.node?this.node(this.scope):this.node}},Ne=Ie,ze=q(Ne,void 0,void 0,!1,null,null,"4874e656"),Re=ze.exports;function He(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Fe(r){for(var e=1;e"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}let We={data(){return{modals:[]}},components:{VNode:Re},created(){(this.$root.__modalContainer=this).$modal.subscription.$emit("set-modal-container",this)},mounted(){this.$modal.subscription.$on("hide-all",()=>{this.modals=[]})},methods:{add(e){var t=1{this.$modal.show(a)})},remove(t){var e=this.modals.findIndex(e=>e.id===t);-1!==e&&this.modals.splice(e,1)}}},Be=We,Ve=q(Be,Pe,[],!1,null,null,"65200538");var Xe=Ve.exports,t=n(0),Ue=n.n(t),A=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function k(e){return!0===e}function Ye(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var qe=Object.prototype.toString;function j(e){return"[object Object]"===qe.call(e)}function Ge(e){return"[object RegExp]"===qe.call(e)}function Ke(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function Je(e){return D(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function Ze(e){return null==e?"":Array.isArray(e)||j(e)&&e.toString===qe?JSON.stringify(e,null,2):String(e)}function Qe(e){var t=parseFloat(e);return isNaN(t)?e:t}function d(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i{function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e})(),u=I,Dt=0,p=function(){this.id=Dt++,this.subs=[]},Pt=(p.prototype.addSub=function(e){this.subs.push(e)},p.prototype.removeSub=function(e){S(this.subs,e)},p.prototype.depend=function(){p.target&&p.target.addDep(this)},p.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t{for(var t=[],n=0;n{var r;if(L(t,"default"))return r=t.default,e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==on(t.type)?r.call(e):r})(r,t,e),o=Vt,N(!0),Ut(n),N(o)),n}function on(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function an(e,t){return on(e)===on(t)}function sn(e,t){if(!Array.isArray(t))return an(t,e)?0:-1;for(var n=0,r=t.length;n{function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:Cn(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r})(t,l,e[l]))}else r={};for(i in t)i in r||(r[i]=((e,t)=>function(){return e[t]})(t,i));return e&&Object.isExtensible(e)&&(e._normalized=r),gt(r,"$stable",a),gt(r,"$key",s),gt(r,"$hasNormal",o),r}function Ln(e,t){var n,r,i,o;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n{l="class"===t||"style"===t||et(t)?r:(e=r.attrs&&r.attrs.type,a||c.mustUseProp(i,e,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=it(t),n=st(t);e in l||n in l||(l[t]=o[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){o[t]=e}))})(e)}return r}function zn(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Hn(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Rn(e,t,n){return Hn(e,"__once__"+t+(n?"_"+n:""),!0),e}function Hn(e,t,n){if(Array.isArray(e))for(var r=0;r{var t={_isComponent:!0,_parentVnode:e,parent:t},n=e.data.inlineTemplate;return D(n)&&(t.render=n.render,t.staticRenderFns=n.staticRenderFns),new e.componentOptions.Ctor(t)})(e,dr)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions,r=t.componentInstance=e.componentInstance,i=n.propsData,e=n.listeners,n=n.children,o=t.data.scopedSlots,a=r.$scopedSlots,a=!!(o&&!o.$stable||a!==A&&!a.$stable||o&&r.$scopedSlots.$key!==o.$key),o=!!(n||r.$options._renderChildren||a);if(r.$options._parentVnode=t,r.$vnode=t,r._vnode&&(r._vnode.parent=t),r.$options._renderChildren=n,r.$attrs=t.data.attrs||A,r.$listeners=e||A,i&&r.$options.props){N(!1);for(var s=r._props,l=r.$options._propKeys||[],c=0;c{var e,r,i,o,a,s,l,c,u;return k(t.error)&&D(t.errorComp)?t.errorComp:D(t.resolved)?t.resolved:((e=rr)&&D(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e),k(t.loading)&&D(t.loadingComp)?t.loadingComp:e&&!D(t.owners)?(r=t.owners=[e],i=!0,a=o=null,e.$on("hook:destroyed",function(){return S(r,e)}),s=function(e){for(var t=0,n=r.length;t{if(!M(t=t.options.props)){var n={},r=e.attrs,i=e.props;if(D(r)||D(i))for(var o in t){var a=st(o);$n(n,i,o,a,!0)||$n(n,r,o,a,!1)}return n}})(t,e);if(!k(e.options.functional)){for(var u=t.on,l=(t.on=t.nativeOn,k(e.options.abstract)&&(l=t.slot,t={},l)&&(t.slot=l),t),d=l.hook||(l.hook={}),f=0;f{function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e})(v,h):v)}l=e.options.name||i;return new T("vue-component-"+e.cid+(l?"-"+l:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:c,listeners:u,tag:i,children:r},g)}var l=e,m=c,y=t,i=n,g=r,b=l.options,_={},w=b.props;if(D(w))for(var O in w)_[O]=rn(O,w,m||A);else D(y.attrs)&&Gn(_,y.attrs),D(y.props)&&Gn(_,y.props);var x=new Yn(y,_,g,i,l);if((g=b.render.call(null,x._c,x))instanceof T)return qn(g,y,x.parent,b);if(Array.isArray(g)){for(var E=Cn(g)||[],$=new Array(E.length),C=0;C{for(var t=0;tdocument.createEvent("Event").timeStamp&&(Or=function(){return _r.now()});var Er=0,R=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Mt,this.newDepIds=new Mt,this.expression="","function"==typeof t?this.getter=t:(this.getter=(e=>{var n;if(!bt.test(e))return n=e.split("."),function(e){for(var t=0;te.id;)n--;v.splice(n+1,0,e)}else v.push(e);yr||(yr=!0,gn(xr))}}},R.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||P(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){z(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},R.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},R.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},R.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||S(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}},{enumerable:!0,configurable:!0,get:I,set:I});function Cr(e,t,n){$r.get=function(){return this[t][n]},$r.set=function(e){this[t][n]=e},Object.defineProperty(e,n,$r)}function Ar(e){e._watchers=[];var t=e.$options;if(t.props){var n,r=e,i=t.props,o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[];for(n in r.$parent&&N(!1),i){l=void 0;c=void 0;var l=n;s.push(l);var c=rn(l,i,o,r);Yt(a,l,c),l in r||Cr(r,"_props",l)}N(!0)}if(t.methods){var u,d=e,f=t.methods;for(u in d.$options.props,f)d[u]="function"!=typeof f[u]?I:lt(f[u],d)}if(t.data){for(var p=e,h=p.$options.data,v=(j(h=p._data="function"==typeof h?((e,t)=>{It();try{return e.call(t,t)}catch(e){return z(e,t,"data()"),{}}finally{Nt()}})(h,p):h||{})||(h={}),Object.keys(h)),m=p.$options.props,y=(p.$options.methods,v.length);y--;){var g=v[y];m&&L(m,g)||(e=>36===(e=(e+"").charCodeAt(0))||95===e)(g)||Cr(p,"_data",g)}Ut(h,!0)}else Ut(e._data={},!0);if(t.computed){var b,_=e,w=t.computed,O=_._computedWatchers=Object.create(null),x=St();for(b in w){var E=w[b],$="function"==typeof E?E:E.get;x||(O[b]=new R(_,$||I,I,kr)),b in _||Sr(_,b,E)}}if(t.watch&&t.watch!==At){var C,A=e,k=t.watch;for(C in k){var S=k[C];if(Array.isArray(S))for(var T=0;T{var t,n,r=e.options,i=e.sealedOptions;for(n in r)r[n]!==i[n]&&((t=t||{})[n]=r[n]);return t})(e))&&O(e.extendOptions,n),(r=e.options=tn(t,e.extendOptions)).name)&&(r.components[r.name]=e),r}function m(e){this._init(e)}function Ir(e){e.cid=0;var d=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];function i(e){this._init(e)}var o=e.name||t.options.name;if(((i.prototype=Object.create(t.prototype)).constructor=i).cid=d++,i.options=tn(t.options,e),i.super=t,i.options.props){var a,s=i;for(a in s.options.props)Cr(s.prototype,"_props",a)}if(i.options.computed){var l,c=i,u=c.options.computed;for(l in u)Sr(c.prototype,l,u[l])}return i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,yt.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=O({},i.options),r[n]=i}}function Nr(e){return e&&(e.Ctor.options.name||e.tag)}function zr(e,t){return Array.isArray(e)?-1parseInt(this.max)&&Hr(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};y=m,e={get:function(){return c}},Object.defineProperty(y,"config",e),y.util={warn:u,extend:O,mergeOptions:tn,defineReactive:Yt},y.set=qt,y.delete=Gt,y.nextTick=gn,y.observable=function(e){return Ut(e),e},y.options=Object.create(null),yt.forEach(function(e){y.options[e+"s"]=Object.create(null)}),O((y.options._base=y).options.components,b),y.use=function(e){var t,n=this._installedPlugins||(this._installedPlugins=[]);return-1{var n;return"input"!==e.tag||(n=D(e=e.data)&&D(e=e.attrs)&&e.type,t=D(e=t.data)&&D(e=e.attrs)&&e.type,n===t)||ai(n)&&ai(t)})(e,t)||k(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}b={create:di,update:di,destroy:function(e){di(e,li)}};function di(e,t){if(e.data.directives||t.data.directives){var n,r,i,o=e,a=t,e=o===li,s=a===li,l=pi(o.data.directives,o.context),c=pi(a.data.directives,a.context),u=[],d=[];for(n in c)r=l[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,hi(i,"update",a,o),i.def&&i.def.componentUpdated&&d.push(i)):(hi(i,"bind",a,o),i.def&&i.def.inserted&&u.push(i));if(u.length&&(t=function(){for(var e=0;e=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}),bi.addEventListener(e,t,kt?{capture:n,passive:r}:n)}function Ci(e,t,n,r){(r||bi).removeEventListener(e,t._wrapper||t,n)}function Ai(e,t){var n,r,i;M(e.data.on)&&M(t.data.on)||(n=t.data.on||{},e=e.data.on||{},bi=t.elm,D((r=n)[wi])&&(r[i=xt?"change":"input"]=[].concat(r[wi],r[i]||[]),delete r[wi]),D(r[Oi])&&(r.change=[].concat(r[Oi],r.change||[]),delete r[Oi]),xn(n,e,$i,Ci,xi,t.context),bi=void 0)}var ki,f={create:Ai,update:Ai};function Si(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};for(n in D(l.__ob__)&&(l=t.data.domProps=O({},l)),s)n in l||(a[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var c=M(a._value=r)?"":String(r);o=c,(i=a).composing||"OPTION"!==i.tagName&&!((e,t)=>{var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t})(i,o)&&!((e,t)=>{var n=e.value;if(D(e=e._vModifiers)){if(e.number)return Qe(n)!==Qe(t);if(e.trim)return n.trim()!==t.trim()}return n!==t})(i,o)||(a.value=c)}else if("innerHTML"===n&&ii(a.tagName)&&M(a.innerHTML)){(ki=ki||document.createElement("div")).innerHTML=""+r+"";for(var u=ki.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var t={create:Si,update:Si},Ti=nt(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){e&&1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function ji(e){var t=Li(e.style);return e.staticStyle?O(e.staticStyle,t):t}function Li(e){return Array.isArray(e)?ut(e):"string"==typeof e?Ti(e):e}function Mi(e,t,n){if(Pi.test(t))e.style.setProperty(t,n);else if(Ii.test(n))e.style.setProperty(st(t),n.replace(Ii,""),"important");else{var r=zi(t);if(Array.isArray(n))for(var i=0,o=n.length;i{var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ji(i.data))&&O(r,n);(n=ji(e.data))&&O(r,n);for(var o=e;o=o.parent;)o.data&&(n=ji(o.data))&&O(r,n);return r})(t,!0));for(i in a)M(s[i])&&Mi(o,i,"");for(i in s)(r=s[i])!==a[i]&&Mi(o,i,null==r?"":r)}}var Hi={create:Ri,update:Ri},Fi=/\s+/;function Wi(t,e){var n;(e=e&&e.trim())&&(t.classList?-1=o&&c()}var s=r===Yi?Ki:Zi,l=0,c=function(){t.removeEventListener(s,a),n()};setTimeout(function(){l{for(var t,p={},n=e.modules,y=e.nodeOps,r=0;r{var i=e.data;if(D(i)){a=D(e.componentInstance)&&i.keepAlive,D(i=i.hook)&&D(i=i.init)&&i(e,!1);if(D(e.componentInstance)){h(e,t),c(n,e.elm,r);if(k(a)){i=e;var o=t;var a=n;e=r;for(var s,l=i;l.componentInstance;)if(l=l.componentInstance._vnode,D(s=l.data)&&D(s=s.transition)){for(s=0;s{for(var r,i={},o=t;o<=n;++o)D(r=e[o].key)&&(i[r]=o);return i})(t,l,u)),!M(a=D(h.key)?o[h.key]:((e,t,n,r)=>{for(var i=n;i{for(;e=e.parent;)if(e.data.transition)return 1})(this.$vnode)){var i=Oo(n);if(i){if(this._leaving)return Eo(e,n);var o="__transition-"+this._uid+"-",o=(i.key=null==i.key?i.isComment?o+"comment":o+i.tag:!Ye(i.key)||0===String(i.key).indexOf(o)?i.key:o+i.key,(i.data||(i.data={})).transition=xo(this)),a=this._vnode,s=Oo(a);if(i.data.directives&&i.data.directives.some(Co)&&(i.data.show=!0),s&&s.data&&(u=i,(l=s).key!==u.key||l.tag!==u.tag)&&!or(s)&&(!s.componentInstance||!s.componentInstance._vnode.isComment)){var l=s.data.transition=O({},o);if("out-in"===r)return this._leaving=!0,En(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Eo(e,n);if("in-out"===r){if(or(i))return a;var c,u=function(){c()};En(o,"afterEnter",u),En(o,"enterCancelled",u),En(l,"delayLeave",function(e){c=e})}}}}return n}}},t=O({tag:String,moveClass:String},_i);function Ao(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ko(e){e.data.newPos=e.elm.getBoundingClientRect()}function So(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,t=t.top-n.top;(r||t)&&(e.data.moved=!0,(n=e.elm.style).transform=n.WebkitTransform="translate("+r+"px,"+t+"px)",n.transitionDuration="0s")}delete t.mode;Hi={Transition:f,TransitionGroup:{props:t,beforeMount:function(){var r=this,i=this._update;this._update=function(e,t){var n=fr(r);r.__patch__(r._vnode,r.kept,!1,!0),r._vnode=r.kept,n(),i.call(r,e,t)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=xo(this),s=0;s"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:e+"")(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):To(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var Lo=function(e){let s=1{l.root.__modalContainer=e});return{context:l,subscription:a,show:function(){for(var e=arguments.length,t=new Array(e),n=0;n{a.$emit("toggle",e,!1,t)},hideAll:()=>{a.$emit("hide-all")},toggle:(e,t)=>{a.$emit("toggle",e,void 0,t)},setDynamicModalContainer:e=>{if(l.root=e){t=document.createElement("div"),document.body.appendChild(t);var t,n=(void 0)(Xe);n.appContext=e.$.appContext;try{return(void 0)(n,t)}catch(e){console.error("Error rendering vnode:",e)}}else console.warn("Root component is undefined. Make sure the root instance is passed correctly.")}}};let Mo="__VERSION__";w.default={install(t){var n=1 0.25%, not dead", "devDependencies": { "@babel/core": "^7.2.0", - "@babel/preset-env": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/plugin-proposal-optional-chaining": "^7.10.3", + "@babel/preset-env": "^7.2.0", "@vue/eslint-config-prettier": "^6.0.0", "@vue/test-utils": "1.0.0-beta.31", "babel-jest": "^23.6.0", @@ -60,7 +61,7 @@ "jest": "^23.6.0", "jest-serializer-vue": "^2.0.2", "mini-css-extract-plugin": "^0.4.5", - "node-sass": "^4.13.1", + "node-sass": "^9.0.0", "optimize-css-assets-webpack-plugin": "^5.0.1", "sass-loader": "^7.1.0", "ts-loader": "^6.2.2", @@ -81,6 +82,7 @@ "vue": "^2.6.11" }, "dependencies": { - "resize-observer-polyfill": "^1.5.1" + "resize-observer-polyfill": "^1.5.1", + "tiny-emitter": "^2.1.0" } } diff --git a/src/Plugin.js b/src/Plugin.js index 5043c87a..fa7a233e 100644 --- a/src/Plugin.js +++ b/src/Plugin.js @@ -3,45 +3,37 @@ import Dialog from './components/Dialog.vue' import PluginCore from './PluginCore' const Plugin = { - install(Vue, options = {}) { - if (Vue.prototype.$modal) { + install(app, options = {}) { + if (app.config.globalProperties.$modal) { return } - const plugin = new PluginCore(Vue, options) + const plugin = PluginCore(options) - Object.defineProperty(Vue.prototype, '$modal', { - get: function() { - /** - * The "this" scope is the scope of the component that calls this.$modal - */ - const caller = this - /** - * The this.$modal can be called only from inside the vue components so this check is not really needed... - */ - if (caller instanceof Vue) { - const root = caller.$root + app.config.globalProperties.$modal = plugin + app.provide('$modal', plugin) + app.mixin({ + mounted() { + if (this.$root === this) { if (!plugin.context.root) { - plugin.setDynamicModalContainer(root) + plugin.setDynamicModalContainer(this) } } - - return plugin } }) /** * Sets custom component name (if provided) */ - Vue.component(plugin.context.componentName, Modal) + app.component(plugin.context.componentName, Modal) /** * Registration of component */ if (options.dialog) { - const componentName = options.dialogComponentName || 'VDialog'; - Vue.component(componentName, Dialog); + const componentName = options.dialogComponentName || 'VDialog' + app.component(componentName, Dialog) } } } diff --git a/src/PluginCore.js b/src/PluginCore.js index bf0cd6c8..27a5ec60 100644 --- a/src/PluginCore.js +++ b/src/PluginCore.js @@ -1,14 +1,24 @@ import { UNSUPPORTED_ARGUMENT_ERROR } from './utils/errors' import { createDivInBody } from './utils' import ModalsContainer from './components/ModalsContainer.vue' - -const PluginCore = (Vue, options = {}) => { - const subscription = new Vue() +import emitter from 'tiny-emitter/instance' +import { createVNode, render } from 'vue' + +const PluginCore = (app, options = {}) => { + const subscription = { + $on: (...args) => emitter.on(...args), + $once: (...args) => emitter.once(...args), + $off: (...args) => emitter.off(...args), + $emit: (...args) => emitter.emit(...args) + } const context = { root: null, componentName: options.componentName || 'Modal' } + subscription.$on('set-modal-container', (container) => { + context.root.__modalContainer = container + }) const showStaticModal = (name, params) => { subscription.$emit('toggle', name, true, params) @@ -18,13 +28,19 @@ const PluginCore = (Vue, options = {}) => { component, componentProps, componentSlots, - modalProps = {}, + modalProps = componentSlots || {}, modalEvents ) => { const container = context.root?.__modalContainer const defaults = options.dynamicDefaults || {} - container?.add( + if (!container) { + console.warn( + 'Modal container not found. Make sure the dynamic modal container is set.' + ) + return + } + container.add( component, componentProps, componentSlots, @@ -37,16 +53,28 @@ const PluginCore = (Vue, options = {}) => { * Creates a container for modals in the root Vue component. * * @param {Vue} parent + * @param {Vue} app */ - const setDynamicModalContainer = parent => { - context.root = parent + const setDynamicModalContainer = (root) => { + context.root = root + + if (!root) { + console.warn( + 'Root component is undefined. Make sure the root instance is passed correctly.' + ) + return + } const element = createDivInBody() - new Vue({ - parent, - render: h => h(ModalsContainer) - }).$mount(element) + const vnode = createVNode(ModalsContainer) + vnode.appContext = root.$.appContext + + try { + return render(vnode, element) + } catch (error) { + console.error('Error rendering vnode:', error) + } } const show = (...args) => { diff --git a/src/components/Dialog.vue b/src/components/Dialog.vue index 7c3e784e..888bafb3 100644 --- a/src/components/Dialog.vue +++ b/src/components/Dialog.vue @@ -31,7 +31,7 @@ :key="index" v-html="button.title" @click.stop="click(index, $event)" - >{{ button.title }} + />
@@ -52,6 +52,7 @@ export default { type: String } }, + inject: ['$modal'], data() { return { params: {} diff --git a/src/components/Modal.vue b/src/components/Modal.vue index a36c9a5b..0b25a848 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -77,6 +77,7 @@ const TransitionState = { export default { name: 'VueJsModal', + inject: ['$modal'], props: { name: { required: true, @@ -263,7 +264,7 @@ export default { /** * Removes global listeners */ - beforeDestroy() { + beforeUnmount() { this.$modal.subscription.$off('toggle', this.onToggle) window.removeEventListener('resize', this.onWindowResize) @@ -498,7 +499,9 @@ export default { beforeModalTransitionLeave() { this.modalTransitionState = TransitionState.Leaving - this.resizeObserver.unobserve(this.$refs.modal) + if (this.$refs.modal) { + this.resizeObserver.unobserve(this.$refs.modal) + } if (this.$focusTrap.enabled()) { this.$focusTrap.disable() diff --git a/src/components/ModalsContainer.vue b/src/components/ModalsContainer.vue index a27cb6cd..5675082a 100644 --- a/src/components/ModalsContainer.vue +++ b/src/components/ModalsContainer.vue @@ -10,7 +10,7 @@