UNPKG

jzzx-directives

Version:
24 lines (21 loc) 27.7 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).file={})}(this,(function(t){"use strict";var e,n=(e=new Date,function(t){return function(n){console.log(n,"[".concat(e.getHours()," : ").concat(e.getMinutes()," : ").concat(e.getSeconds(),"] [").concat(t,"] "))}}),r=n("RESOURCES"),o=n("DEBUG"),i=n("FEATURE"),u=function(t){return"config"in t&&"globalProperties"in t.config},a={log:r,debugLog:o,featLog:i};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function c(t,e){return t(e={exports:{}},e.exports),e.exports}var s=c((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",u="hour",a="day",c="week",s="month",l="quarter",f="year",d="date",v="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,s),i=n-o<0,u=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-u:u-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:f,w:c,d:a,D:d,h:u,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",$={};$[b]=y;var S=function(t){return t instanceof _},w=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();$[i]&&(o=i),n&&($[i]=n,o=i);var u=e.split("-");if(!o&&u.length>1)return t(u[0])}else{var a=e.name;$[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},M=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},E=g;E.l=w,E.i=S,E.w=function(t,e){return M(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return E},m.isValid=function(){return!(this.$d.toString()===v)},m.isSame=function(t,e){var n=M(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return M(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<M(t)},m.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),v=function(t,e){var o=E.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},h=function(t,e){return E.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return r?v(1,0):v(31,11);case s:return r?v(1,y):v(0,y+1);case c:var b=this.$locale().weekStart||0,$=(p<b?p+7:p)-b;return v(r?m-$:m+(6-$),y);case a:case d:return h(g+"Hours",0);case u:return h(g+"Minutes",1);case i:return h(g+"Seconds",2);case o:return h(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,c=E.p(t),l="set"+(this.$u?"UTC":""),v=(n={},n[a]=l+"Date",n[d]=l+"Date",n[s]=l+"Month",n[f]=l+"FullYear",n[u]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],h=c===a?this.$D+(e-this.$W):e;if(c===s||c===f){var p=this.clone().set(d,1);p.$d[v](h),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else v&&this.$d[v](h);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[E.p(t)]()},m.add=function(r,l){var d,v=this;r=Number(r);var h=E.p(l),p=function(t){var e=M(v);return E.w(e.date(e.date()+Math.round(t*r)),v)};if(h===s)return this.set(s,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===a)return p(1);if(h===c)return p(7);var y=(d={},d[i]=e,d[u]=n,d[o]=t,d)[h]||1,m=this.$d.getTime()+r*y;return E.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||v;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,u=this.$m,a=this.$M,c=n.weekdays,s=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},f=function(t){return E.s(i%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:E.s(a+1,2,"0"),MMM:l(n.monthsShort,a,s,3),MMMM:l(s,a),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:E.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,u,!0),A:d(i,u,!1),m:String(u),mm:E.s(u,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:o};return r.replace(p,(function(t,e){return e||h[t]||o.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,v){var h,p=E.p(d),y=M(r),m=(y.utcOffset()-this.utcOffset())*e,g=this-y,b=E.m(this,y);return b=(h={},h[f]=b/12,h[s]=b,h[l]=b/3,h[c]=(g-m)/6048e5,h[a]=(g-m)/864e5,h[u]=g/n,h[i]=g/e,h[o]=g/t,h)[p]||g,v?b:E.a(b)},m.daysInMonth=function(){return this.endOf(s).$D},m.$locale=function(){return $[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return E.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),T=_.prototype;return M.prototype=T,[["$ms",r],["$s",o],["$m",i],["$H",u],["$W",a],["$M",s],["$y",f],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),M.extend=function(t,e){return t.$i||(t(e,_,M),t.$i=!0),M},M.locale=w,M.isDayjs=S,M.unix=function(t){return M(1e3*t)},M.en=$[b],M.Ls=$,M.p={},M}()})),l=c((function(t,e){var n,r,o;t.exports=(n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g,function(t,e,i){var u=e.prototype;i.utc=function(t){return new e({date:t,utc:!0,args:arguments})},u.utc=function(t){var e=i(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},u.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var s=u.utcOffset;u.utcOffset=function(t,e){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?s.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(r);if(!e)return null;var n=(""+e[0]).match(o)||["-",0,0],i=n[0],u=60*+n[1]+ +n[2];return 0===u?0:"+"===i?u:-u}(t),null===t))return this;var u=Math.abs(t)<=16?60*t:t,a=this;if(e)return a.$offset=u,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(u+c,n)).$offset=u,a.$x.$localOffset=c}else a=this.utc();return a};var l=u.format;u.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var f=u.toDate;u.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=u.diff;u.diff=function(t,e,n){if(t&&this.$u===t.$u)return d.call(this,t,e,n);var r=this.local(),o=i(t).local();return d.call(r,o,e,n)}})}));s.extend(l);function f(t,e){return void 0===e&&(e="YYYY-MM-DD HH:mm:ss"),s.utc(t).utcOffset(8).format(e)}var d=function(t,e){var n=e||{},r=Object.prototype.toString;for(var o in t)t.hasOwnProperty(o)&&("object"==typeof t[o]&&null!==t[o]?(n[o]="[object Array]"===r.call(t[o])?[]:{},d(t[o],n[o])):n[o]=t[o]);return n}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var v=function(){return v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},v.apply(this,arguments)},h=function(t){return u(t)?{created:"created",mounted:"mounted",updated:"updated",unMounted:"unmounted"}:{created:"bind",mounted:"inserted",updated:"updated",unMounted:"unbind"}},p=void 0,y={directive:"debounce",event:"click",headExecution:!1,delay:1e3,callback:null},m=function(t){var e,n=h(t),r=v({},y);t.directive(r.directive,((e={})[n.mounted]=function(t,e){var n=e.value;!function(t,e,n,r,o){var i;void 0===t&&(t="click"),void 0===n&&(n=1e3),void 0===o&&(o=!1);var u=!1;e.addEventListener(t,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i&&clearTimeout(i),o&&!u?(r.apply(p,t),u=!0):i=setTimeout((function(){!o&&r.apply(p,t),u=!1}),n)}))}(n.event,t,n.delay,n.callback,n.headExecution)},e))},g={install:function(t,e){m(t)}},b=function(t,e,n){e&&!n.includes(e)&&t.parentNode&&t.parentNode.removeChild(t)},$={directive:"permission"},S=function(t){var e,n=h(t),r=v({},$);t.directive(r.directive,((e={})[n.mounted]=function(t,e){var n=e.value;b(t,n.permission,n.systemPermission)},e[n.updated]=function(t,e){var n=e.value;b(t,n.permission,n.systemPermission)},e))},w={install:function(t,e){S(t)}},M=function(t,e){document.addEventListener("click",(function(n){!t.contains(n.target)&&e()}),!1)},E={directive:"clickoutside"},_=function(t){var e,n=h(t),r=v({},E);t.directive(r.directive,((e={})[n.mounted]=function(t,e){var n=e.value;M(t,n)},e[n.updated]=function(t,e){var n=e.value;M(t,n)},e[n.unMounted]=function(){document.removeEventListener("click",(function(){}))},e))},T={install:function(t,e){_(t)}};function O(t,e,n,r){var o=t-n,i=e-r;return Math.sqrt(o*o+i*i)}var D="vRippleCountInternal";function x(t,e){t.dataset[D]=e.toString()}function L(t){var e;return parseInt(null!==(e=t.dataset[D])&&void 0!==e?e:"0",10)}var C,k=function(t,e,n){var r=e.getBoundingClientRect(),o=window.getComputedStyle(e),i=function(t,e){var n=t.x,r=t.y,o=e.top;return{x:n-e.left,y:r-o}}(t,r),u=i.x,a=i.y,c=2.05*function(t,e,n){var r=n.width,o=n.height,i=O(t,e,0,0),u=O(t,e,r,0),a=O(t,e,0,o),c=O(t,e,r,o);return Math.max(i,u,a,c)}(u,a,r),s=function(t){var e=t.borderTopLeftRadius,n=t.borderTopRightRadius,r=t.borderBottomLeftRadius,o=t.borderBottomRightRadius,i=document.createElement("div");return i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.borderRadius="".concat(e," ").concat(n," ").concat(o," ").concat(r),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.webkitMaskImage="-webkit-radial-gradient(white, black)",i}(o),l=function(t,e,n,r){var o=document.createElement("div");return o.style.position="absolute",o.style.width="".concat(n,"px"),o.style.height="".concat(n,"px"),o.style.top="".concat(e,"px"),o.style.left="".concat(t,"px"),o.style.background=r.color,o.style.borderRadius="50%",o.style.opacity="".concat(r.initialOpacity),o.style.transform="translate(-50%,-50%) scale(0)",o.style.transition="transform ".concat(r.duration,"s ").concat(r.easing,", opacity ").concat(r.duration,"s ").concat(r.easing),o}(u,a,c,n);!function(t){x(t,L(t)+1)}(e);var f="";"static"===o.position&&(e.style.position&&(f=e.style.position),e.style.position="relative"),s.appendChild(l),e.appendChild(s);var d=!1,v=function(t){void 0!==t&&(document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v)),d?h():d=!0},h=function(){l.style.transition="opacity 150ms linear",l.style.opacity="0",setTimeout((function(){s.remove(),function(t){x(t,L(t)-1)}(e),0===L(e)&&(!function(t){delete t.dataset[D]}(e),e.style.position=f)}),150)};document.addEventListener("pointerup",v),document.addEventListener("pointercancel",v);var p=setTimeout((function(){document.removeEventListener("pointercancel",y),requestAnimationFrame((function(){l.style.transform="translate(-50%,-50%) scale(1)",l.style.opacity="".concat(n.finalOpacity),setTimeout((function(){return v()}),1e3*n.duration)}))}),n.delayTime),y=function(){clearTimeout(p),s.remove(),document.removeEventListener("pointerup",v),document.removeEventListener("pointercancel",v),document.removeEventListener("pointercancel",y)};document.addEventListener("pointercancel",y)},Y=new WeakMap,A=v({},{directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.5,duration:.2,easing:"ease-in-out",delayTime:75,disabled:!1}),j=function(t){var e,n=h(t);t.directive("ripple",((e={})[n.mounted]=function(t,e){var n;Y.set(t,null!==(n=e.value)&&void 0!==n?n:{}),t.addEventListener("pointerdown",(function(n){var r,o=Y.get(t);(null===(r=e.value)||void 0===r?void 0:r.disabled)||!1!==o&&k(n,t,v(v({},A),o))}))},e.updated=function(t,e){var n;Y.set(t,null!==(n=e.value)&&void 0!==n?n:{})},e))},H={install:function(t,e){j(t)}},R=function(t){var e,n=h(t);t.directive("format-time",((e={})[n.created]=function(t,e){!function(t,e){e.formatString="YYYY-MM-DD HH:mm:ss",e.value&&(e.formatString=e.value)}(0,e)},e[n.mounted]=function(t,e){!function(t,e){var n=t.textContent,r=parseInt(n);10===n.length&&(r*=1e3),t.textContent=s(r).format(e.formatString)}(t,e)},e[n.updated]=function(t,e){console.log("时间数据发生动态改变~")},e))},P={install:function(t,e){R(t)}},U=c((function(t,e){ /*! * clipboard.js v2.0.10 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */ var n;n=function(){return function(){var t={686:function(t,e,n){n.d(e,{default:function(){return M}});var r=n(279),o=n.n(r),i=n(370),u=n.n(i),a=n(817),c=n.n(a);function s(t){try{return document.execCommand(t)}catch(t){return!1}}var l=function(t){var e=c()(t);return s("cut"),e};function f(t){var e="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[e?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=t,n}var d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";if("string"==typeof t){var r=f(t);e.container.appendChild(r),n=c()(r),s("copy"),r.remove()}else n=c()(t),s("copy");return n};function v(t){return v="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},v(t)}var h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,r=t.container,o=t.target,i=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==v(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?d(i,{container:r}):o?"cut"===n?l(o):d(o,{container:r}):void 0};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},p(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$(t);if(e){var o=$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}function S(t,e){var n="data-clipboard-".concat(t);if(e.hasAttribute(n))return e.getAttribute(n)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(i,t);var e,n,r,o=g(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return e=i,n=[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",r=h({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(r?"success":"error",{action:n,text:r,trigger:e,clearSelection:function(){e&&e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return S("action",t)}},{key:"defaultTarget",value:function(t){var e=S("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return S("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(t,e)}},{key:"cut",value:function(t){return l(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}],n&&y(e.prototype,n),r&&y(e,r),i}(o()),M=w},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var r=n(828);function o(t,e,n,r,o){var u=i.apply(this,arguments);return t.addEventListener(n,u,o),{destroy:function(){t.removeEventListener(n,u,o)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&o.call(t,n)}}t.exports=function(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return o(t,e,n,r,i)})))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var r=n(879),o=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!r.string(e))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(t))return function(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}(t,e,n);if(r.nodeList(t))return function(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}(t,e,n);if(r.string(t))return function(t,e,n){return o(document.body,t,e,n)}(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(t),r.removeAllRanges(),r.addRange(o),e=r.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,u=r.length;i<u;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(686)}().default},t.exports=n()})),I=(C=U)&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C,N=function(t){var e,n=h(t);t.directive("copy",((e={})[n.mounted]=function(t,e){if("success"===e.arg)t._vClipboard_success=e.value;else if("error"===e.arg)t._vClipboard_error=e.value;else{var n=new I(t,{text:function(){return e.value},action:function(){return"cut"===e.arg?"cut":"copy"},container:void 0});n.on("success",(function(e){var n=t._vClipboard_success;"function"==typeof n&&n(e)})),n.on("error",(function(e){var n=t._vClipboard_error;"function"==typeof n&&n(e)})),t._vClipboard=n}},e[n.updated]=function(t,e){"success"===e.arg?t._vClipboard_success=e.value:"error"===e.arg?t._vClipboard_error=e.value:(t._vClipboard.text=function(){return e.value},t._vClipboard.action=function(){return"cut"===e.arg?"cut":"copy"})},e[n.unMounted]=function(t,e){"success"===e.arg?delete t._vClipboard_success:"error"===e.arg?delete t._vClipboard_error:(t._vClipboard.destroy(),delete t._vClipboard)},e))},F={install:function(t,e){N(t)}},V=function(t){var e,n=h(t);t.directive("throttle",((e={})[n.mounted]=function(t,e){var n=e.value;!function(t,e,n,r){void 0===t&&(t="click"),void 0===n&&(n=1e3),e.addEventListener(t,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=0,i=(new Date).getTime();n-(i-o)<=0&&(r(),o=i)}))}(n.event,t,n.delay,n.callback)},e))},W={install:function(t,e){V(t)}},q=function(t){var e,n=h(t);t.directive("longpress",((e={})[n.mounted]=function(t,e){var n=e.value,r=n.fn,o=n.time;"function"==typeof r&&(t._timer=null,t._start=function(e){"mousedown"===e.type&&e.button&&0!==e.button||"touchstart"===e.type&&e.touches&&e.touches.length>1||null===t._timer&&(t._timer=setTimeout((function(){r()}),o),t.addEventListener("contextmenu",(function(t){t.preventDefault()})))},t._cancel=function(e){null!==t._timer&&(clearTimeout(t._timer),t._timer=null)},t.addEventListener("mousedown",t._start),t.addEventListener("touchstart",t._start),t.addEventListener("click",t._cancel),t.addEventListener("mouseout",t._cancel),t.addEventListener("touchend",t._cancel),t.addEventListener("touchcancel",t._cancel))},e[n.unMounted]=function(t,e){e.value,t.removeEventListener("mousedown",t._start),t.removeEventListener("touchstart",t._start),t.removeEventListener("click",t._cancel),t.removeEventListener("mouseout",t._cancel),t.removeEventListener("touchend",t._cancel),t.removeEventListener("touchcancel",t._cancel)},e))},z={install:function(t,e){q(t)}},B={install:function(t,e){!function(t){u(t)?Object.keys(a).forEach((function(e){t.config.globalProperties[e]=a[e]})):Object.keys(a).forEach((function(e){t.prototype[e]=a[e]}))}(t),function(t){u(t)?t.config.globalProperties.$format=f:t.prototype.$format=f}(t),function(t){u(t)?t.config.globalProperties.$deepClone=d:t.prototype.$deepClone=d}(t),m(t),S(t),_(t),j(t),N(t),V(t),q(t),R(t)}};t.VClickoutside=T,t.VClipBoard=F,t.VDebounce=g,t.VFormatTime=P,t.VLongPress=z,t.VPermission=w,t.VRipple=H,t.VThrottle=W,t.default=B,Object.defineProperty(t,"__esModule",{value:!0})}));