vue-luck-draw
Advanced tools
Comparing version 3.4.9 to 3.4.10
@@ -1,98 +0,16 @@ | ||
if (window.Vue && Vue.version.slice(0, 2) === '2.') { | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).VueCompositionAPI={},n.Vue)}(this,(function(n,t){"use strict";function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r=e(t);function o(n){return"function"==typeof n&&/native code/.test(n.toString())}var i="undefined"!=typeof Symbol&&o(Symbol)&&"undefined"!=typeof Reflect&&o(Reflect.ownKeys),u=function(n){return n};function f(n,t,e){var r=e.get,o=e.set;Object.defineProperty(n,t,{enumerable:!0,configurable:!0,get:r||u,set:o||u})}function a(n,t,e,r){Object.defineProperty(n,t,{value:e,enumerable:!!r,writable:!0,configurable:!0})}function c(n,t){return Object.hasOwnProperty.call(n,t)}function l(n){return Array.isArray(n)}var s=Object.prototype.toString,v=function(n){return s.call(n)};function d(n){var t=parseFloat(String(n));return t>=0&&Math.floor(t)===t&&isFinite(n)&&t<=4294967295}function p(n){return null!==n&&"object"==typeof n}function _(n){return"[object Object]"===function(n){return Object.prototype.toString.call(n)}(n)}function y(n){return"function"==typeof n}function h(n,t){r.default.util.warn(n,t)} | ||
var b=function(n,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)};var g,m=function(){return(m=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function w(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,o,i=e.call(n),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function j(n,t){for(var e=0,r=t.length,o=n.length;e<r;e++,o++)n[o]=t[e];return n}var O=[],x=function(){function n(n){this.active=!0,this.effects=[],this.cleanups=[],this.vm=n}return n.prototype.run=function(n){if(this.active)try{return this.on(),n()}finally{this.off()}},n.prototype.on=function(){this.active&&(O.push(this),g=this)},n.prototype.off=function(){this.active&&(O.pop(),g=O[O.length-1])},n.prototype.stop=function(){this.active&&(this.vm.$destroy(),this.effects.forEach((function(n){return n.stop()})),this.cleanups.forEach((function(n){return n()})),this.active=!1)},n}(),S=function(n){function t(t){void 0===t&&(t=!1);var e,r=void 0;return function(n){var t=D;D=!1;try{n()}finally{D=t}}((function(){r=K(T())})),e=n.call(this,r)||this,t||function(n,t){var e;if((t=t||g)&&t.active)return void t.effects.push(n);var r=null===(e=B())||void 0===e?void 0:e.proxy;r&&r.$on("hook:destroyed",(function(){return n.stop()}))}(e),e}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}b(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}(t,n),t}(x);function k(){return g}function E(){var n,t;return(null===(n=k())||void 0===n?void 0:n.vm)||(null===(t=B())||void 0===t?void 0:t.proxy)}var R=void 0;try{var C=require("vue");C&&A(C)?R=C:C&&"default"in C&&A(C.default)&&(R=C.default)}catch(n){}var M=null,P=null,D=!0,U="__composition_api_installed__";function A(n){return n&&y(n)&&"Vue"===n.name}function T(){return M}function V(n){if(D){var t=P;null==t||t.scope.off(),null==(P=n)||P.scope.on()}}function B(){return P}var W,z=new WeakMap;function F(n){if(z.has(n))return z.get(n);var t={proxy:n,update:n.$forceUpdate,uid:n._uid,emit:n.$emit.bind(n),parent:null,root:null};!function(n){if(!n.scope){var t=new x(n.proxy);n.scope=t,n.proxy.$on("hook:destroyed",(function(){return t.stop()}))}n.scope}(t);return["data","props","attrs","refs","vnode","slots"].forEach((function(e){f(t,e,{get:function(){return n["$"+e]}})})),f(t,"isMounted",{get:function(){return n._isMounted}}),f(t,"isUnmounted",{get:function(){return n._isDestroyed}}),f(t,"isDeactivated",{get:function(){return n._inactive}}),f(t,"emitted",{get:function(){return n._events}}),z.set(n,t),n.$parent&&(t.parent=F(n.$parent)),n.$root&&(t.root=F(n.$root)),t}function I(n,t){return t=t||B()}function K(n,t){void 0===t&&(t={});var e=n.config.silent;n.config.silent=!0;var r=new n(t);return n.config.silent=e,r}function q(n,t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(n.$scopedSlots[t])return n.$scopedSlots[t].apply(n,e)}}function Q(n){return i?Symbol.for(n):n}var G=Q("composition-api.preFlushQueue"),H=Q("composition-api.postFlushQueue"),J="composition-api.refKey",L=new WeakMap,N=new WeakMap,X=new WeakMap,Y=function(n){f(this,"value",{get:n.get,set:n.set})};function Z(n,t){void 0===t&&(t=!1);var e=new Y(n),r=Object.seal(e);return t&&X.set(r,!0),r}function nn(n){var t;if(tn(n))return n;var e=pn(((t={})[J]=n,t));return Z({get:function(){return e[J]},set:function(n){return e[J]=n}})}function tn(n){return n instanceof Y}function en(n){return tn(n)?n.value:n}function rn(n){if(!_(n))return n;var t={};for(var e in n)t[e]=on(n,e);return t}function on(n,t){var e=n[t];return tn(e)?e:Z({get:function(){return n[t]},set:function(e){return n[t]=e}})}function un(n){var t;return Boolean(n&&c(n,"__ob__")&&"object"==typeof n.__ob__&&(null===(t=n.__ob__)||void 0===t?void 0:t.__raw__))}function fn(n){var t;return Boolean(n&&c(n,"__ob__")&&"object"==typeof n.__ob__&&!(null===(t=n.__ob__)||void 0===t?void 0:t.__raw__))}function an(n){if(!(!_(n)||un(n)||l(n)||tn(n)||function(n){var t=T();return t&&n instanceof t}(n)||L.has(n))){L.set(n,!0);for(var t=Object.keys(n),e=0;e<t.length;e++)cn(n,t[e])}}function cn(n,t,e){if("__ob__"!==t&&!un(n[t])){var r,o,i=Object.getOwnPropertyDescriptor(n,t);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(e=n[t])}an(e),f(n,t,{get:function(){var o=r?r.call(n):e;return t!==J&&tn(o)?o.value:o},set:function(i){r&&!o||(t!==J&&tn(e)&&!tn(i)?e.value=i:o?(o.call(n,i),e=i):e=i,an(i))}})}}function ln(n){var t,e=M||R;e.observable?t=e.observable(n):t=K(e,{data:{$$state:n}})._data.$$state;return c(t,"__ob__")||sn(t),t}function sn(n,t){var e,r;if(void 0===t&&(t=new Set),!t.has(n)){a(n,"__ob__",function(n){void 0===n&&(n={});return{value:n,dep:{notify:u,depend:u,addSub:u,removeSub:u}}}(n)),t.add(n);try{for(var o=w(Object.keys(n)),i=o.next();!i.done;i=o.next()){var f=n[i.value];(_(f)||l(f))&&!un(f)&&Object.isExtensible(f)&&sn(f,t)}}catch(n){e={error:n}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}}function vn(){return ln({}).__ob__}function dn(n){var t,e;if(!p(n))return n;if(!_(n)&&!l(n)||un(n)||!Object.isExtensible(n))return n;var r=ln(l(n)?[]:{});an(r);var o=r.__ob__,i=function(t){var e,i,u=n[t],a=Object.getOwnPropertyDescriptor(n,t);if(a){if(!1===a.configurable)return"continue";e=a.get,i=a.set}f(r,t,{get:function(){var t,r=e?e.call(n):u;return null===(t=o.dep)||void 0===t||t.depend(),r},set:function(t){var r;e&&!i||(i?i.call(n,t):u=t,null===(r=o.dep)||void 0===r||r.notify())}})};try{for(var u=w(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){t={error:n}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}return r}function pn(n){if(!p(n))return n;if(!_(n)&&!l(n)||un(n)||!Object.isExtensible(n))return n;var t=ln(n);return an(t),t}function _n(n){return function(t,e){var r,o=I(((r=n)[0].toUpperCase(),r.slice(1)),e);return o&&function(n,t,e,r){var o=t.proxy.$options,i=n.config.optionMergeStrategies[e],u=function(n,t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=B();V(n);try{return t.apply(void 0,j([],$(e)))}finally{V(o)}}}(t,r);return o[e]=i(o[e],u),u}(T(),o,n,t)}}var yn,hn=_n("beforeMount"),bn=_n("mounted"),gn=_n("beforeUpdate"),mn=_n("updated"),wn=_n("beforeDestroy"),$n=_n("destroyed"),jn=_n("errorCaptured"),On=_n("activated"),xn=_n("deactivated"),Sn=_n("serverPrefetch");function kn(){Cn(this,G)}function En(){Cn(this,H)}function Rn(){var n=E();return n?function(n){return void 0!==n[G]}(n)||function(n){n[G]=[],n[H]=[],n.$on("hook:beforeUpdate",kn),n.$on("hook:updated",En)}(n):(yn||(yn=K(T())),n=yn),n}function Cn(n,t){for(var e=n[t],r=0;r<e.length;r++)e[r]();e.length=0}function Mn(n,t,e){var r=function(){n.$nextTick((function(){n[G].length&&Cn(n,G),n[H].length&&Cn(n,H)}))};switch(e){case"pre":r(),n[G].push(t);break;case"post":r(),n[H].push(t);break;default:!function(n,t){if(!n)throw new Error("[vue-composition-api] "+t)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+e)}}function Pn(n,t){var e=n.teardown;n.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e.apply(n,r),t()}}function Dn(n,t,e,r){var o,i,f=r.flush,a="sync"===f,c=function(n){i=function(){try{n()}catch(n){!function(n,t,e){if("undefined"==typeof window||"undefined"==typeof console)throw n;console.error(n)}(n)}}},s=function(){i&&(i(),i=null)},v=function(t){return a||n===yn?t:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Mn(n,(function(){t.apply(void 0,j([],$(e)))}),f)}};if(null===e){var d=!1,p=function(n,t,e,r){var o=n._watchers.length;return n.$watch(t,e,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),n._watchers[o]}(n,(function(){if(!d)try{d=!0,t(c)}finally{d=!1}}),u,{deep:r.deep||!1,sync:a,before:s});Pn(p,s),p.lazy=!1;var _=p.get.bind(p);return p.get=v(_),function(){p.teardown()}}var h,b=r.deep,g=!1;if(tn(t)?h=function(){return t.value}:fn(t)?(h=function(){return t},b=!0):l(t)?(g=!0,h=function(){return t.map((function(n){return tn(n)?n.value:fn(n)?An(n):y(n)?n():u}))}):h=y(t)?t:u,b){var m=h;h=function(){return An(m())}}var w=function(n,t){if(b||!g||!n.every((function(n,e){return Object.is(n,t[e])})))return s(),e(n,t,c)},O=v(w);if(r.immediate){var x=O,S=function(n,t){return S=x,w(n,l(n)?[]:t)};O=function(n,t){return S(n,t)}}var k=n.$watch(h,O,{immediate:r.immediate,deep:b,sync:a}),E=n._watchers[n._watchers.length-1];return fn(E.value)&&(null===(o=E.value.__ob__)||void 0===o?void 0:o.dep)&&b&&E.value.__ob__.dep.addSub({update:function(){E.run()}}),Pn(E,s),function(){k()}}function Un(n,t){var e=function(n){return m({flush:"pre"},n)}(t);return Dn(Rn(),n,null,e)}function An(n,t){if(void 0===t&&(t=new Set),!p(n)||t.has(n))return n;if(t.add(n),tn(n))An(n.value,t);else if(l(n))for(var e=0;e<n.length;e++)An(n[e],t);else if("[object Set]"===v(n)||function(n){return"[object Map]"===v(n)}(n))n.forEach((function(n){An(n,t)}));else if(_(n))for(var r in n)An(n[r],t);return n}var Tn={};var Vn={},Bn=function(n){var t;void 0===n&&(n="$style");var e=B();if(!e)return Vn;var r=null===(t=e.proxy)||void 0===t?void 0:t[n];return r||Vn},Wn=Bn;var zn;function Fn(){return B().setupContext}var In={set:function(n,t,e){(n.__composition_api_state__=n.__composition_api_state__||{})[t]=e},get:function(n,t){return(n.__composition_api_state__||{})[t]}};function Kn(n){var t=In.get(n,"rawBindings")||{};if(t&&Object.keys(t).length){for(var e=n.$refs,r=In.get(n,"refs")||[],o=0;o<r.length;o++){var i=t[a=r[o]];!e[a]&&i&&tn(i)&&(i.value=null)}var u=Object.keys(e),f=[];for(o=0;o<u.length;o++){var a;i=t[a=u[o]];e[a]&&i&&tn(i)&&(i.value=e[a],f.push(a))}In.set(n,"refs",f)}}function qn(n,t){var e=n.$options._parentVnode;if(e){for(var r=In.get(n,"slots")||[],o=function(n,t){var e;if(n){if(n._normalized)return n._normalized;for(var r in e={},n)n[r]&&"$"!==r[0]&&(e[r]=!0)}else e={};for(var r in t)r in e||(e[r]=!0);return e}(e.data.scopedSlots,n.$slots),i=0;i<r.length;i++){o[f=r[i]]||delete t[f]}var u=Object.keys(o);for(i=0;i<u.length;i++){var f;t[f=u[i]]||(t[f]=q(n,f))}In.set(n,"slots",u)}}function Qn(n,t,e){var r=B();V(n);try{return t(n)}catch(n){if(!e)throw n;e(n)}finally{V(r)}}function Gn(n){function t(n,e){if(void 0===e&&(e=new Set),!e.has(n)&&_(n)&&!tn(n)&&!fn(n)&&!un(n)){var r=T().util.defineReactive;Object.keys(n).forEach((function(o){var i=n[o];r(n,o,i),i&&(e.add(i),t(i,e))}))}}function e(n,t){return void 0===t&&(t=new Map),t.has(n)?t.get(n):(t.set(n,!1),l(n)&&fn(n)?(t.set(n,!0),!0):!(!_(n)||un(n)||tn(n))&&Object.keys(n).some((function(r){return e(n[r],t)})))}n.mixin({beforeCreate:function(){var n=this,r=n.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Qn(F(n),(function(){return i.apply(t,e)}))});if(!o)return;if(!y(o))return;var u=r.data;r.data=function(){return function(n,r){void 0===r&&(r={});var o,i=n.$options.setup,u=function(n){var t,e={slots:{}},r=["attrs"],o=["emit"];return["root","parent","refs","listeners","isServer","ssrContext"].forEach((function(t){var r="$"+t;f(e,t,{get:function(){return n[r]},set:function(){}})})),r.forEach((function(r){var o="$"+r;f(e,r,{get:function(){var e,r;if(t)return t;t=pn({});var i=n[o],u=function(e){f(t,e,{get:function(){return n[o][e]}})};try{for(var a=w(Object.keys(i)),c=a.next();!c.done;c=a.next()){u(c.value)}}catch(n){e={error:n}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return t},set:function(){}})})),o.forEach((function(t){var r="$"+t;f(e,t,{get:function(){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n[r].apply(n,t)}}})})),e}(n),s=F(n);if(s.setupContext=u,a(r,"__ob__",vn()),qn(n,u.slots),Qn(s,(function(){o=i(r,u)})),!o)return;if(y(o)){var v=o;return void(n.$options.render=function(){return qn(n,u.slots),Qn(s,(function(){return v()}))})}if(_(o)){fn(o)&&(o=rn(o)),In.set(n,"rawBindings",o);var d=o;Object.keys(d).forEach((function(r){var o=d[r];if(!tn(o))if(fn(o))l(o)&&(o=nn(o));else if(y(o)){var i=o;o=o.bind(n),Object.keys(i).forEach((function(n){o[n]=i[n]}))}else p(o)?e(o)&&t(o):o=nn(o);!function(n,t,e){var r=n.$options.props;t in n||r&&c(r,t)||(tn(e)?f(n,t,{get:function(){return e.value},set:function(n){e.value=n}}):f(n,t,{get:function(){return fn(e)&&e.__ob__.dep.depend(),e},set:function(n){e=n}}))}(n,r,o)}))}}(n,n.$props),y(u)?u.call(n,n):u||{}}},mounted:function(){Kn(this)},updated:function(){var n;Kn(this),(null===(n=this.$vnode)||void 0===n?void 0:n.context)&&Kn(this.$vnode.context)}})}function Hn(n,t){if(!n)return t;if(!t)return n;for(var e,r,o,u=i?Reflect.ownKeys(n):Object.keys(n),f=0;f<u.length;f++)"__ob__"!==(e=u[f])&&(r=t[e],o=n[e],c(t,e)?r!==o&&_(r)&&!tn(r)&&_(o)&&!tn(o)&&Hn(o,r):t[e]=o);return t}function Jn(n){(function(n){return c(n,U)})(n)||(n.config.optionMergeStrategies.setup=function(n,t){return function(e,r){return Hn(y(n)?n(e,r)||{}:void 0,y(t)?t(e,r)||{}:void 0)}},function(n){M=n,Object.defineProperty(n,U,{configurable:!0,writable:!0,value:!0})}(n),Gn(n))}var Ln={install:function(n){return Jn(n)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Ln),n.EffectScope=S,n.computed=function(n){var t,e,r,o,i=E();if(y(n)?t=n:(t=n.get,e=n.set),i&&!i.$isServer){var f,a=function(){if(!W){var n=K(T(),{computed:{value:function(){return 0}}}),t=n._computedWatchers.value.constructor,e=n._data.__ob__.dep.constructor;W={Watcher:t,Dep:e},n.$destroy()}return W}(),c=a.Watcher,l=a.Dep;o=function(){return f||(f=new c(i,t,u,{lazy:!0})),f.dirty&&f.evaluate(),l.target&&f.depend(),f.value},r=function(n){e&&e(n)}}else{var s=K(T(),{computed:{$$state:{get:t,set:e}}});i&&i.$on("hook:destroyed",(function(){return s.$destroy()})),o=function(){return s.$$state},r=function(n){s.$$state=n}}return Z({get:o,set:r},!e)},n.createApp=function(n,t){void 0===t&&(t=void 0);var e=T(),r=void 0;return{config:e.config,use:e.use.bind(e),mixin:e.mixin.bind(e),component:e.component.bind(e),directive:e.directive.bind(e),mount:function(o,i){return r||((r=new e(m({propsData:t},n))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},n.createRef=Z,n.customRef=function(n){var t=nn(0);return Z(n((function(){t.value}),(function(){++t.value})))},n.default=Ln,n.defineAsyncComponent=function(n){y(n)&&(n={loader:n});var t=n.loader,e=n.loadingComponent,r=n.errorComponent,o=n.delay,i=void 0===o?200:o,u=n.timeout;n.suspensible;var f=n.onError,a=null,c=0,l=function(){var n;return a||(n=a=t().catch((function(n){if(n=n instanceof Error?n:new Error(String(n)),f)return new Promise((function(t,e){f(n,(function(){return t((c++,a=null,l()))}),(function(){return e(n)}),c+1)}));throw n})).then((function(t){return n!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),t)})))};return function(){return{component:l(),delay:i,timeout:u,error:r,loading:e}}},n.defineComponent=function(n){return n},n.del=function(n,t){if(T().util.warn,l(n)&&d(t))n.splice(t,1);else{var e=n.__ob__;n._isVue||e&&e.vmCount||c(n,t)&&(delete n[t],e&&e.dep.notify())}},n.effectScope=function(n){return new S(n)},n.getCurrentInstance=B,n.getCurrentScope=k,n.h=function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=null===(n=B())||void 0===n?void 0:n.proxy;return r?r.$createElement.apply(r,t):(zn||(zn=K(T()).$createElement),zn.apply(zn,t))},n.inject=function(n,t,e){var r;void 0===e&&(e=!1);var o=null===(r=B())||void 0===r?void 0:r.proxy;if(o){if(!n)return t;var i=function(n,t){for(var e=t;e;){if(e._provided&&c(e._provided,n))return e._provided[n];e=e.$parent}return Tn}(n,o);return i!==Tn?i:e&&y(t)?t():t}},n.isRaw=un,n.isReactive=fn,n.isReadonly=function(n){return X.has(n)},n.isRef=tn,n.markRaw=function(n){if(!_(n)&&!l(n)||!Object.isExtensible(n))return n;var t=vn();return t.__raw__=!0,a(n,"__ob__",t),N.set(n,!0),n},n.nextTick=function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return null===(n=T())||void 0===n?void 0:n.nextTick.apply(this,t)},n.onActivated=On,n.onBeforeMount=hn,n.onBeforeUnmount=wn,n.onBeforeUpdate=gn,n.onDeactivated=xn,n.onErrorCaptured=jn,n.onMounted=bn,n.onScopeDispose=function(n){g&&g.cleanups.push(n)},n.onServerPrefetch=Sn,n.onUnmounted=$n,n.onUpdated=mn,n.provide=function(n,t){var e,r=null===(e=I())||void 0===e?void 0:e.proxy;if(r){if(!r._provided){var o={};f(r,"_provided",{get:function(){return o},set:function(n){return Object.assign(o,n)}})}r._provided[n]=t}},n.proxyRefs=function(n){var t,e,r;if(fn(n))return n;var o=pn(((t={})[J]=n,t)),i=function(n){f(o,n,{get:function(){return tn(o[J][n])?o[J][n].value:o[J][n]},set:function(t){if(tn(o[J][n]))return o[J][n].value=en(t);o[J][n]=en(t)}})};try{for(var u=w(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){e={error:n}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return o},n.reactive=pn,n.readonly=function(n){return X.set(n,!0),n},n.ref=nn,n.set=function(n,t,e){var r,o=T().util;o.warn;var i=o.defineReactive;if(l(n)){if(d(t))return n.length=Math.max(n.length,t),n.splice(t,1,e),e;if("length"===t&&e!==n.length)return n.length=e,null===(r=n.__ob__)||void 0===r||r.dep.notify(),e}if(t in n&&!(t in Object.prototype))return n[t]=e,e;var u=n.__ob__;return n._isVue||u&&u.vmCount?e:u?(i(u.value,t,e),cn(n,t,e),p(n[t])&&!c(n[t],"__ob__")&&sn(n[t]),u.dep.notify(),e):(n[t]=e,e)},n.shallowReactive=dn,n.shallowReadonly=function(n){var t,e;if(!p(n))return n;if(!_(n)&&!l(n)||!Object.isExtensible(n)&&!tn(n))return n;var r=tn(n)?new Y({}):fn(n)?ln({}):{},o=pn({}).__ob__,i=function(t){var e,i=n[t],u=Object.getOwnPropertyDescriptor(n,t);if(u){if(!1===u.configurable&&!tn(n))return"continue";e=u.get}f(r,t,{get:function(){var t=e?e.call(n):i;return o.dep.depend(),t},set:function(n){}})};try{for(var u=w(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){t={error:n}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}return X.set(r,!0),r},n.shallowRef=function(n){var t;if(tn(n))return n;var e=dn(((t={})[J]=n,t));return Z({get:function(){return e[J]},set:function(n){return e[J]=n}})},n.toRaw=function(n){var t,e;return un(n)||!Object.isExtensible(n)?n:(null===(e=null===(t=n)||void 0===t?void 0:t.__ob__)||void 0===e?void 0:e.value)||n},n.toRef=on,n.toRefs=rn,n.triggerRef=function(n){tn(n)&&(n.value=n.value)},n.unref=en,n.useAttrs=function(){return Fn().attrs},n.useCSSModule=Wn,n.useCssModule=Bn,n.useSlots=function(){return Fn().slots},n.version="1.1.5",n.warn=function(n){var t;h(n,null===(t=B())||void 0===t?void 0:t.proxy)},n.watch=function(n,t,e){var r=null;y(t)?r=t:(e=t,r=null);var o=function(n){return m({immediate:!1,deep:!1,flush:"pre"},n)}(e);return Dn(Rn(),n,r,o)},n.watchEffect=Un,n.watchPostEffect=function(n){return Un(n,{flush:"post"})},n.watchSyncEffect=function(n){return Un(n,{flush:"sync"})},Object.defineProperty(n,"__esModule",{value:!0})})); | ||
} | ||
;(function (window) { | ||
if (window.VueDemi) { | ||
return | ||
} | ||
var VueDemi = {} | ||
var Vue = window.Vue | ||
if (Vue) { | ||
if (Vue.version.slice(0, 2) === '2.') { | ||
var VueCompositionAPI = window.VueCompositionAPI | ||
if (VueCompositionAPI) { | ||
for (var key in VueCompositionAPI) { | ||
VueDemi[key] = VueCompositionAPI[key] | ||
} | ||
VueDemi.isVue2 = true | ||
VueDemi.isVue3 = false | ||
VueDemi.install = function (){} | ||
VueDemi.Vue = Vue | ||
VueDemi.Vue2 = Vue | ||
VueDemi.version = Vue.version | ||
} else { | ||
console.error( | ||
'[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.' | ||
) | ||
} | ||
} else if (Vue.version.slice(0, 2) === '3.') { | ||
for (var key in Vue) { | ||
VueDemi[key] = Vue[key] | ||
} | ||
VueDemi.isVue2 = false | ||
VueDemi.isVue3 = true | ||
VueDemi.install = function (){} | ||
VueDemi.Vue = Vue | ||
VueDemi.Vue2 = undefined | ||
VueDemi.version = Vue.version | ||
VueDemi.set = function(target, key, val) { | ||
if (Array.isArray(target)) { | ||
target.length = Math.max(target.length, key) | ||
target.splice(key, 1, val) | ||
return val | ||
} | ||
target[key] = val | ||
return val | ||
} | ||
VueDemi.del = function(target, key) { | ||
if (Array.isArray(target)) { | ||
target.splice(key, 1) | ||
return | ||
} | ||
delete target[key] | ||
} | ||
} else { | ||
console.error('[vue-demi] Vue version ' + Vue.version + ' is unsupported.') | ||
} | ||
} else { | ||
console.error( | ||
'[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.' | ||
) | ||
} | ||
window.VueDemi = VueDemi | ||
})(window); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue-demi")):"function"==typeof define&&define.amd?define(["exports","vue-demi"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VueLuckDraw={},t.VueDemi)}(this,(function(t,e){"use strict"; | ||
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-luck-draw"]=e():t["vue-luck-draw"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),i=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?c(t):i(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),a=n("fc6a"),c=n("c04e"),u=n("5135"),s=n("0cfb"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e,!0),s)try{return f(t,e)}catch(n){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"159b":function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("17c2"),a=n("9112");for(var c in i){var u=r[c],s=u&&u.prototype;if(s&&s.forEach!==o)try{a(s,"forEach",o)}catch(f){s.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,i=n("a640"),o=n("ae40"),a=i("forEach"),c=o("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),i=n("b622"),o=n("2d00"),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[],n=e.constructor={};return n[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,n){var r=n("a691"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),a=n("6eeb"),c=n("ce4e"),u=n("e893"),s=n("94ca");t.exports=function(t,e){var n,f,l,h,d,p,g=t.target,v=t.global,b=t.stat;if(f=v?r:b?r[g]||c(g,{}):(r[g]||{}).prototype,f)for(l in e){if(d=e[l],t.noTargetGet?(p=i(f,l),h=p&&p.value):h=f[l],n=s(v?l:g+(b?".":"#")+l,t.forced),!n&&void 0!==h){if(typeof d===typeof h)continue;u(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),a(f,l,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"2d00":function(t,e,n){var r,i,o=n("da84"),a=n("342f"),c=o.process,u=c&&c.versions,s=u&&u.v8;s?(r=s.split("."),i=r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=r[1]))),t.exports=i&&+i},"32fc":function(t,e,n){t.exports=n("358c")},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"358c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
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 i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}; | ||
/*! ***************************************************************************** | ||
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 n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var o=function(){return(o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function a(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function u(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t}String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var o=e[r];if(t.call(n,o,r,e))return o;r++}}});var c=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},h=function(t){return[].filter.call(t,(function(t){return"\n"!==t})).join("")},l=function(t){if("string"!=typeof t)return!1;if("transparent"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\s,]+)\)$/.exec(t);if(0===(null===(i=e)?0:"object"==typeof i?NaN:"number"==typeof i?i:"string"==typeof i?"%"===i[i.length-1]?Number(i.slice(0,-1))/100:Number(i):NaN))return!1}var i;return!0},f=function(t){var e=[],i=t.map((function(t){return Number(t)})).reduce((function(t,i){if(i>0){var n=t+i;return e.push(n),n}return e.push(NaN),t}),0),n=Math.random()*i;return e.findIndex((function(t){return n<=t}))},d="1.5.8",p=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),g="__proto__"in{};function m(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var y=Array.prototype,v=Object.create(y);["push","pop","shift","unshift","sort","splice","reverse"].forEach((function(t){v[t]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=y[t].apply(this,e),r=this.__luckyOb__;return["push","unshift","splice"].includes(t)&&r.walk(this),r.dep.notify(),n}}));var b=function(){function t(t){this.dep=new p,m(t,"__luckyOb__",this),Array.isArray(t)&&(g?t.__proto__=v:Object.getOwnPropertyNames(v).forEach((function(e){m(t,e,v[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){k(t,e,t[e])}))},t}();function w(t){if(t&&"object"==typeof t)return"__luckyOb__"in t?t.__luckyOb__:new b(t)}function k(t,e,i){var n=new p,r=Object.getOwnPropertyDescriptor(t,e);if(!r||!1!==r.configurable){var o=r&&r.get,s=r&&r.set;o&&!s||2!==arguments.length||(i=t[e]);var a=w(i);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):i;return p.target&&(n.addSub(p.target),a&&a.dep.addSub(p.target)),e},set:function(e){e!==i&&(i=e,o&&!s||(s?s.call(t,e):i=e,a=w(e),n.notify()))}})}}var x=0,z=function(){function t(t,e,i,n){void 0===n&&(n={}),this.id=x++,this.$lucky=t,this.expr=e,this.deep=!!n.deep,this.getter="function"==typeof e?e:function(t){t+=".";for(var e=[],i="",n=0;n<t.length;n++){var r=t[n];if(/\[|\./.test(r))e.push(i),i="";else{if(/\W/.test(r))continue;i+=r}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=i,this.value=this.get()}return t.prototype.get=function(){p.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){c(t,"array","object")&&Object.keys(t).forEach((function(i){var n=t[i];e(n)}))};e(t)}(t),p.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),I=function(){function t(t){var e=this;this.version=d,this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,"string"==typeof t?t={el:t}:1===t.nodeType&&(t={el:"",divElement:t}),t=t,this.config=t,t.flag||(t.flag="WEB"),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement("canvas"),t.divElement.appendChild(t.canvasElement)),t.canvasElement&&(t.ctx=t.canvasElement.getContext("2d"),t.canvasElement.setAttribute("package","lucky-canvas@1.5.8"),t.canvasElement.addEventListener("click",(function(t){return e.handleClick(t)}))),this.ctx=t.ctx,this.initWindowFunction(),this.config.ctx||console.error("无法获取到 CanvasContext2D"),window&&window.addEventListener("resize",function(t,e){void 0===e&&(e=300);var i=null;return function(){for(var n=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];i||(i=setTimeout((function(){t.apply(n,r),clearTimeout(i),i=null}),e))}}((function(){e.init()}),300))}return t.prototype.init=function(){},t.prototype.initLucky=function(){this.setHTMLFontSize(),this.setDpr(),this.resetWidthAndHeight(),this.zoomCanvas(),this.boxWidth&&this.boxHeight||console.error("无法获取到宽度或高度")},t.prototype.handleClick=function(t){},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,"未传入 dpr 可能会导致绘制异常"))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,i=0;t.divElement&&(e=t.divElement.offsetWidth,i=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||i,t.divElement&&(t.divElement.style.overflow="hidden",t.divElement.style.width=this.boxWidth+"px",t.divElement.style.height=this.boxHeight+"px")},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,i=t.canvasElement,n=t.dpr,r=[this.boxWidth*n,this.boxHeight*n],o=r[0],s=r[1],a=function(t){return(t*n-t)/(t*n)*(n/2)*100};i&&(i.width=o,i.height=s,i.style.width=o+"px",i.style.height=s+"px",i.style.transform="scale("+1/n+") translate("+-a(o)+"%, "+-a(s)+"%)",e.scale(n,n))},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.loadImg=function(t,e,i){var n=this;return void 0===i&&(i="$resolve"),new Promise((function(r,o){if(t||o("=> '"+e.src+"' 不能为空或不合法"),"WEB"!==n.config.flag)return e[i]=r,void(e.$reject=o);var s=new Image;s.onload=function(){return r(s)},s.onerror=function(){return o("=> '"+e.src+"' 图片加载失败")},s.src=t}))},t.prototype.drawImage=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n,r=this,o=r.config,s=r.ctx;if(["WEB","MP-WX"].includes(o.flag))n=t;else{if(!["UNI-H5","UNI-MP","TARO-H5","TARO-MP"].includes(o.flag))return console.error("意料之外的 flag, 该平台尚未兼容!");n=t.path}return s.drawImage.apply(s,u([n],e))},t.prototype.getLength=function(t){return c(t,"number")?t:c(t,"string")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var i=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,n,r){var o={"%":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*i.htmlFontSize},vw:function(t){return t/100*window.innerWidth}}[r];if(o)return o(n);var s=i.config.unitFunc;return s?s(n,r):n})))},t.prototype.$set=function(t,e,i){t&&"object"==typeof t&&k(t,e,i)},t.prototype.$computed=function(t,e,i){var n=this;Object.defineProperty(t,e,{get:function(){return i.call(n)}})},t.prototype.$watch=function(t,e,i){void 0===i&&(i={}),"object"==typeof e&&(e=(i=e).handler);var n=new z(this,t,e,i);return i.immediate&&e.call(this,n.value),function(){}},t}(),S=function(t){return Math.PI/180*t},$=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},T=function(t,e){var i=-t/e;return[i,-i*t+e]},C=function(t,e,i,n,r,o){var s;if(void 0===o&&(o=!0),Math.abs(r-n).toFixed(8)>=S(180).toFixed(8)){var a=(r+n)/2;return o?(C(t,e,i,n,a,o),C(t,e,i,a,r,o)):(C(t,e,i,a,r,o),C(t,e,i,n,a,o)),!1}o||(n=(s=[r,n])[0],r=s[1]);var u=$(n,i),c=u[0],h=u[1],l=$(r,i),f=l[0],d=l[1],p=T(c,h),g=p[0],m=p[1],y=T(f,d),v=y[0],b=y[1],w=(b-m)/(g-v),k=(v*m-g*b)/(v-g);isNaN(w)&&(Math.abs(c)===+i.toFixed(8)&&(w=c),Math.abs(f)===+i.toFixed(8)&&(w=f)),g===1/0||g===-1/0?k=v*w+b:v!==1/0&&v!==-1/0||(k=g*w+m),e.lineTo(c,h),t.indexOf("MP")>0?e.quadraticCurveTo(w,k,f,d):e.arcTo(w,k,f,d,i)},O=function(t,e,i,n,r,o,s,a){i||(i=s);var u=S(90/Math.PI/n*s),c=S(90/Math.PI/i*s),h=r+u,l=o-u,f=r+c,d=o-c;e.beginPath(),e.fillStyle=a,e.moveTo.apply(e,$(h,n)),C(t,e,n,h,l,!0),d>f?C(t,e,i,f,d,!1):e.lineTo.apply(e,$((r+o)/2,s/2/Math.abs(Math.sin((r-o)/2)))),e.closePath(),e.fill()},P=function(t,e,i,n,r,o,s){var a=Math.min(n,r);o>a/2&&(o=a/2),t.beginPath(),t.fillStyle=s,t.moveTo(e+o,i),t.lineTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath(),t.fill()},W={easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*(t/=n)*(t-2)+e}},_={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sin(t/n*(Math.PI/2))+e}},E={easeIn:function(t,e,i,n){return t>=n&&(t=n),0==t?e:i*Math.pow(2,10*(t/n-1))+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),t==n?e+i:i*(1-Math.pow(2,-10*t/n))+e}},F={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sqrt(1-(t=t/n-1)*t)+e}},D=Object.freeze({__proto__:null,quad:W,cubic:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t+1)+e}},quart:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*((t=t/n-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t*t*t+1)+e}},sine:_,expo:E,circ:F}),L=function(t){function e(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;return r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r.defaultStyle={},r._defaultConfig={},r._defaultStyle={},r.Radius=0,r.prizeRadius=0,r.prizeDeg=0,r.prizeRadian=0,r.rotateDeg=0,r.maxBtnRadius=0,r.startTime=0,r.endTime=0,r.stopDeg=0,r.endDeg=0,r.FPS=16.6,r.blockImgs=[[]],r.prizeImgs=[[]],r.btnImgs=[[]],r.initData(i),r.initWatch(),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:r.buttons.map((function(t){return t.imgs}))}),r}return r(e,t),e.prototype.initLucky=function(){t.prototype.initLucky.call(this),this.Radius=0,this.prizeRadius=0,this.prizeDeg=0,this.prizeRadian=0,this.rotateDeg=0,this.maxBtnRadius=0,this.startTime=0,this.endTime=0,this.stopDeg=0,this.endDeg=0,this.FPS=16.6,this.prizeFlag=-1},e.prototype.initData=function(t){this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},e.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){return o({gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:0},t.defaultConfig)})),this.$computed(this,"_defaultStyle",(function(){return o({fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)}))},e.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},e.prototype.init=function(t){var e,i,n=this;void 0===t&&(t={}),this.initLucky();var r=this.config,o=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(e=r.beforeInit)||void 0===e||e.call(this),o.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(t).forEach((function(e){var i;!function(t){t.blockImgs="blocks",t.prizeImgs="prizes",t.btnImgs="buttons"}(i||(i={}));var r=i[e],o=t[e],s=[];o&&o.forEach((function(t,i){t&&t.forEach((function(t,o){s.push(n.loadAndCacheImg(r,i,e,o))}))})),Promise.all(s).then((function(){n.draw()}))})),null===(i=r.afterInit)||void 0===i||i.call(this)},e.prototype.handleClick=function(t){var e,i=this.ctx;i.beginPath(),i.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),i.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},e.prototype.loadAndCacheImg=function(t,e,i,n){return s(this,void 0,void 0,(function(){var r=this;return a(this,(function(o){return[2,new Promise((function(o,s){var a=r[t][e];if(a&&a.imgs){var u=a.imgs[n];u&&(r[i][e]||(r[i][e]=[]),r.loadImg(u.src,u).then((function(t){r[i][e][n]=t,o()})).catch((function(i){console.error(t+"["+e+"].imgs["+n+"] "+i),s()})))}}))]}))}))},e.prototype.computedWidthAndHeight=function(t,e,i,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,i);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,n);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,i),this.getHeight(e.height,n)]},e.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,a=n._defaultStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,n){return l(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,r){if(i.blockImgs[n]){var s=i.blockImgs[n][r];if(s){var a=i.computedWidthAndHeight(s,e,2*t,2*t),u=a[0],c=a[1],h=[i.getOffsetX(u),i.getHeight(e.top,2*t)-t],l=h[0],f=h[1];o.save(),e.rotate&&o.rotate(S(i.rotateDeg)),i.drawImage(s,l,f,u,c),o.restore()}}})),t-i.getLength(e.padding&&e.padding.split(" ")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=S(this.prizeDeg);var u=S(this.rotateDeg-90+this.prizeDeg/2+s.offsetDegree),c=function(t){return i.getOffsetX(o.measureText(t).width)},f=function(t,e,n){var r=t.lineHeight||a.lineHeight||t.fontSize||a.fontSize;return i.getHeight(t.top,e)+(n+1)*i.getLength(r)};o.save(),this.prizes.forEach((function(t,e){var n=u+e*i.prizeRadian,d=i.prizeRadius-i.maxBtnRadius,p=t.background||a.background;l(p)&&function(t,e,i,n,r,o,s,a){s?O(t,e,i,n,r,o,s,a):(e.beginPath(),e.fillStyle=a,e.moveTo(0,0),e.arc(0,0,n,r,o,!1),e.closePath(),e.fill())}(r.flag,o,i.maxBtnRadius,i.prizeRadius,n-i.prizeRadian/2,n+i.prizeRadian/2,i.getLength(s.gutter),p);var g=Math.cos(n)*i.prizeRadius,m=Math.sin(n)*i.prizeRadius;o.translate(g,m),o.rotate(n+S(90)),t.imgs&&t.imgs.forEach((function(t,n){if(i.prizeImgs[e]){var r=i.prizeImgs[e][n];if(r){var o=i.computedWidthAndHeight(r,t,i.prizeRadian*i.prizeRadius,d),s=o[0],a=o[1],u=[i.getOffsetX(s),i.getHeight(t.top,d)],c=u[0],h=u[1];i.drawImage(r,c,h,s,a)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||a.fontColor,n=t.fontWeight||a.fontWeight,r=i.getLength(t.fontSize||a.fontSize),u=t.fontStyle||a.fontStyle;o.fillStyle=e,o.font=n+" "+(r>>0)+"px "+u;var l=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,"wordWrap")?t.wordWrap:a.wordWrap){p=h(p);for(var g="",m=0;m<p.length;m++){g+=p[m];var y=o.measureText(g).width,v=(i.prizeRadius-f(t,d,l.length))*Math.tan(i.prizeRadian/2)*2-i.getLength(s.gutter);y>i.getWidth(t.lengthLimit||a.lengthLimit,v)&&(l.push(g.slice(0,-1)),g=p[m])}g&&l.push(g),l.length||l.push(p)}else l=p.split("\n");l.filter((function(t){return!!t})).forEach((function(e,i){o.fillText(e,c(e),f(t,d,i))}))})),o.rotate(S(360)-n-S(90)),o.translate(-g,-m)})),o.restore(),this.buttons.forEach((function(t,e){var n=i.getHeight(t.radius);i.maxBtnRadius=Math.max(i.maxBtnRadius,n),l(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,n,0,2*Math.PI,!1),o.fill()),t.pointer&&l(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-n,0),o.lineTo(n,0),o.lineTo(0,2*-n),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,r){if(i.btnImgs[e]){var o=i.btnImgs[e][r];if(o){var s=i.computedWidthAndHeight(o,t,2*n,2*n),a=s[0],u=s[1],c=[i.getOffsetX(a),i.getHeight(t.top,n)],h=c[0],l=c[1];i.drawImage(o,h,l,a,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||a.fontColor,r=t.fontWeight||a.fontWeight,s=i.getLength(t.fontSize||a.fontSize),u=t.fontStyle||a.fontStyle;o.fillStyle=e,o.font=r+" "+(s>>0)+"px "+u,String(t.text).split("\n").forEach((function(e,i){o.fillText(e,c(e),f(t,n,i))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},e.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},e.prototype.stop=function(t){if(!t&&0!==t){var e=this.prizes.map((function(t){return t.range}));t=f(e)}t<0?(this.prizeFlag=-1,this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw()):this.prizeFlag=t%this.prizes.length},e.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.prizeFlag,r=e.prizeDeg,o=e.rotateDeg,s=e._defaultConfig;if(-1!==n){var a=Date.now()-this.startTime;if(a>=s.accelerationTime&&void 0!==n){this.FPS=a/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*r-r/2)*this.getLength(s.stopRange),c=0;++c;){var h=360*c-n*r-o-s.offsetDegree+u;if(D[s.speedFunction].easeOut(this.FPS,this.stopDeg,h,s.decelerationTime)-this.stopDeg>s.speed){this.endDeg=h;break}}return this.slowDown()}this.rotateDeg=(o+D[s.speedFunction].easeIn(a,0,s.speed,s.accelerationTime))%360,this.draw(),i(this.run.bind(this,t+1))}else this.startTime=0},e.prototype.slowDown=function(){var t,e=this,i=e.rAF,n=e.prizes,r=e.prizeFlag,o=e.stopDeg,s=e.endDeg,a=e._defaultConfig;if(-1!==r){var u=Date.now()-this.endTime;if(u>=a.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,n.find((function(t,e){return e===r}))||{}));this.rotateDeg=D[a.speedFunction].easeOut(u,o,s,a.decelerationTime)%360,this.draw(),i(this.slowDown.bind(this))}else this.startTime=0},e.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),c(t,"number")?t:c(t,"string")?this.changeUnits(t,e):0},e.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),c(t,"number")?t:c(t,"string")?this.changeUnits(t,e):0},e.prototype.getOffsetX=function(t){return-t/2},e.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr-this.Radius,e/i.dpr-this.Radius]},e}(I),R=function(t){function e(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;r.rows=3,r.cols=3,r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r.defaultStyle={},r.activeStyle={},r._defaultConfig={},r._defaultStyle={},r._activeStyle={},r.cellWidth=0,r.cellHeight=0,r.startTime=0,r.endTime=0,r.currIndex=0,r.stopIndex=0,r.endIndex=0,r.demo=!1,r.timer=0,r.FPS=16.6,r.prizeFlag=-1,r.cells=[],r.blockImgs=[[]],r.btnImgs=[[]],r.prizeImgs=[],r.initData(i),r.initWatch(),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r);var o=r.buttons.map((function(t){return t.imgs}));return r.button&&o.push(r.button.imgs),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:o}),r}return r(e,t),e.prototype.initLucky=function(){t.prototype.initLucky.call(this),this.cellWidth=0,this.cellHeight=0,this.startTime=0,this.endTime=0,this.currIndex=0,this.stopIndex=0,this.endIndex=0,this.demo=!1,this.timer=0,this.FPS=16.6,this.prizeFlag=-1},e.prototype.initData=function(t){this.$set(this,"rows",Number(t.rows)||3),this.$set(this,"cols",Number(t.cols)||3),this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"button",t.button),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"activeStyle",t.activeStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},e.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){var e=o({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,"_defaultStyle",(function(){return o({borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)})),this.$computed(this,"_activeStyle",(function(){return o({background:"#ffce98",shadow:""},t.activeStyle)}))},e.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){var i=e.map((function(t){return t.imgs}));return t.button&&i.push(t.button.imgs),t.init({btnImgs:i})}),{deep:!0}),this.$watch("button",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch("rows",(function(){return t.init({})})),this.$watch("cols",(function(){return t.init({})})),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("activeStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},e.prototype.init=function(t){var e,i,n=this;void 0===t&&(t={}),this.initLucky();var r=this.config;null===(e=r.beforeInit)||void 0===e||e.call(this),this.draw(),Object.keys(t).forEach((function(e){var i;!function(t){t.blockImgs="blocks",t.prizeImgs="prizes",t.btnImgs="buttons"}(i||(i={}));var r=i[e],o=t[e],s=[];o&&o.forEach((function(t,i){t&&t.forEach((function(t,o){s.push(n.loadAndCacheImg(r,i,e,o))}))})),Promise.all(s).then((function(){n.draw()}))})),null===(i=r.afterInit)||void 0===i||i.call(this)},e.prototype.handleClick=function(t){var e=this,i=this.ctx;u(u([],this.buttons),[this.button]).forEach((function(n){var r;if(n){var o=e.getGeometricProperty([n.x,n.y,n.col||1,n.row||1]),s=o[0],a=o[1],u=o[2],c=o[3];i.beginPath(),i.rect(s,a,u,c),i.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||("function"==typeof n.callback&&n.callback.call(e,n),null===(r=e.startCallback)||void 0===r||r.call(e,t,n)))}}))},e.prototype.loadAndCacheImg=function(t,e,i,n){return s(this,void 0,void 0,(function(){var r=this;return a(this,(function(o){return[2,new Promise((function(o,s){var a=r[t][e];if("buttons"===t&&!r.buttons.length&&r.button&&(a=r.button),a&&a.imgs){var u=a.imgs[n];if(u){r[i][e]||(r[i][e]=[]);var c=[r.loadImg(u.src,u),u.activeSrc&&r.loadImg(u.activeSrc,u,"$activeResolve")];Promise.all(c).then((function(t){var s=t[0],a=t[1];r[i][e][n]={defaultImg:s,activeImg:a},o()})).catch((function(i){console.error(t+"["+e+"].imgs["+n+"] "+i),s()}))}}}))]}))}))},e.prototype.computedWidthAndHeight=function(t,e,i){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var n=this.getWidth(e.width,i.col);return[n,t.height*(n/t.width)]}if(!e.width&&e.height){var r=this.getHeight(e.height,i.row);return[t.width*(r/t.height),r]}return[this.getWidth(e.width,i.col),this.getHeight(e.height,i.row)]},e.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,a=n._defaultStyle,f=n._activeStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=u(u([],this.prizes),this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var n=t.x,r=t.y,s=t.w,u=t.h,h=function(t){var e,i=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,"").split(" ").map((function(t){return~~t})))||[0],n=0,r=0,o=0,s=0;switch(i.length){case 1:n=r=o=s=i[0];break;case 2:n=r=i[0],o=s=i[1];break;case 3:n=i[0],o=s=i[1],r=i[2];break;default:n=i[0],r=i[1],o=i[2],s=i[3]}var a={paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:s};for(var u in a)a[u]=Object.prototype.hasOwnProperty.call(t,u)&&c(t[u],"string","number")?~~String(t[u]).replace(/px/g,""):a[u];return[n,r,o,s]}(e),f=h[0],d=h[1],p=h[2],g=h[3],m=e.borderRadius?i.getLength(e.borderRadius):0,y=e.background||a.background;return l(y)&&P(o,n,r,s,u,m,i.handleBackground(n,r,s,u,y)),{x:n+p,y:r+f,w:s-p-g,h:u-f-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-s.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-s.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var n=i.getGeometricProperty([t.x,t.y,t.col,t.row]),s=n[0],u=n[1],c=n[2],d=n[3],p=!1;(void 0===i.prizeFlag||i.prizeFlag>-1)&&(p=e===i.currIndex%i.prizes.length>>0);var g=p?f.background:t.background||a.background;if(l(g)){var m=(p?f.shadow:t.shadow||a.shadow).replace(/px/g,"").split(",")[0].split(" ").map((function(t,e){return e<3?Number(t):t}));4===m.length&&(o.shadowColor=m[3],o.shadowOffsetX=m[0]*r.dpr,o.shadowOffsetY=m[1]*r.dpr,o.shadowBlur=m[2],m[0]>0?c-=m[0]:(c+=m[0],s-=m[0]),m[1]>0?d-=m[1]:(d+=m[1],u-=m[1])),P(o,s,u,c,d,i.getLength(t.borderRadius?t.borderRadius:a.borderRadius),i.handleBackground(s,u,c,d,g)),o.shadowColor="rgba(0, 0, 0, 0)",o.shadowOffsetX=0,o.shadowOffsetY=0,o.shadowBlur=0}var y="prizeImgs";e>=i.prizes.length&&(y="btnImgs",e-=i.prizes.length),t.imgs&&t.imgs.forEach((function(n,r){if(i[y][e]){var o=i[y][e][r];if(o){var a=p&&o.activeImg||o.defaultImg;if(a){var c=i.computedWidthAndHeight(a,n,t),h=c[0],l=c[1],f=[s+i.getOffsetX(h,t.col),u+i.getHeight(n.top,t.row)],d=f[0],g=f[1];i.drawImage(a,d,g,h,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var n=p&&f.fontStyle?f.fontStyle:e.fontStyle||a.fontStyle,r=p&&f.fontWeight?f.fontWeight:e.fontWeight||a.fontWeight,c=p&&f.fontSize?i.getLength(f.fontSize):i.getLength(e.fontSize||a.fontSize),l=p&&f.lineHeight?f.lineHeight:e.lineHeight||a.lineHeight||e.fontSize||a.fontSize;o.font=r+" "+(c>>0)+"px "+n,o.fillStyle=p&&f.fontColor?f.fontColor:e.fontColor||a.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,"wordWrap")?e.wordWrap:a.wordWrap){g=h(g);for(var m="",y=0;y<g.length;y++){m+=g[y],o.measureText(m).width>i.getWidth(e.lengthLimit||a.lengthLimit,t.col)&&(d.push(m.slice(0,-1)),m=g[y])}m&&d.push(m),d.length||d.push(g)}else d=g.split("\n");d.forEach((function(n,r){o.fillText(n,s+i.getOffsetX(o.measureText(n).width,t.col),u+i.getHeight(e.top,t.row)+(r+1)*i.getLength(l))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},e.prototype.handleBackground=function(t,e,i,n,r){var o=this.ctx;return r.includes("linear-gradient")&&(r=function(t,e,i,n,r,o){var s=/linear-gradient\((.+)\)/.exec(o)[1].split(",").map((function(t){return t.trim()})),a=s.shift(),u=[0,0,0,0];if(a.includes("deg")){var c=function(t){return Math.tan(t/180*Math.PI)};(a=a.slice(0,-3)%360)>=0&&a<45?u=[e,i+r,e+n,i+r-n*c(a-0)]:a>=45&&a<90?u=[e,i+r,e+n-r*c(a-45),i]:a>=90&&a<135?u=[e+n,i+r,e+n-r*c(a-90),i]:a>=135&&a<180?u=[e+n,i+r,e,i+n*c(a-135)]:a>=180&&a<225?u=[e+n,i,e,i+n*c(a-180)]:a>=225&&a<270?u=[e+n,i,e+r*c(a-225),i+r]:a>=270&&a<315?u=[e,i,e+r*c(a-270),i+r]:a>=315&&a<360&&(u=[e,i,e+n,i+r-n*c(a-315)])}else a.includes("top")?u=[e,i+r,e,i]:a.includes("bottom")?u=[e,i,e,i+r]:a.includes("left")?u=[e+n,i,e,i]:a.includes("right")&&(u=[e,i,e+n,i]);var h=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return s.reduce((function(t,e,i){var n=e.split(" ");return 1===n.length?t.addColorStop(i,n[0]):2===n.length&&t.addColorStop.apply(t,n),t}),h)}(o,t,e,i,n,r)),r},e.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},e.prototype.stop=function(t){if(!t&&0!==t){var e=this.prizes.map((function(t){return t.range}));t=f(e)}t<0?(this.prizeFlag=-1,this.currIndex=0,this.draw()):this.prizeFlag=t%this.prizes.length},e.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.currIndex,r=e.prizes,o=e.prizeFlag,s=e.startTime,a=e._defaultConfig;if(-1!==o){var u=Date.now()-s;if(u>=a.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=n;for(var c=0;++c;){var h=r.length*c+o-(n>>0);if(W.easeOut(this.FPS,this.stopIndex,h,a.decelerationTime)-this.stopIndex>a.speed){this.endIndex=h;break}}return this.slowDown()}this.currIndex=(n+W.easeIn(u,.1,a.speed,a.accelerationTime))%r.length,this.draw(),i(this.run.bind(this,t+1))}else this.startTime=0},e.prototype.slowDown=function(){var t,e=this,i=e.rAF,n=e.prizes,r=e.prizeFlag,o=e.stopIndex,s=e.endIndex,a=e._defaultConfig;if(-1!==r){var u=Date.now()-this.endTime;if(u>a.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,n.find((function(t,e){return e===r}))||{}));this.currIndex=W.easeOut(u,o,s,a.decelerationTime)%n.length,this.draw(),i(this.slowDown.bind(this))}else this.startTime=0},e.prototype.walk=function(){var t=this,e=this.config,i=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=i((function(){t.currIndex+=1,t.draw()}),1300)},e.prototype.getGeometricProperty=function(t){var e=t[0],i=t[1],n=t[2],r=void 0===n?1:n,o=t[3],s=void 0===o?1:o,a=this.cellWidth,u=this.cellHeight,c=this._defaultConfig.gutter,h=[this.prizeArea.x+(a+c)*e,this.prizeArea.y+(u+c)*i];return r&&s&&h.push(a*r+c*(r-1),u*s+c*(s-1)),h},e.prototype.getWidth=function(t,e){return void 0===e&&(e=1),c(t,"number")?t:c(t,"string")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},e.prototype.getHeight=function(t,e){return void 0===e&&(e=1),c(t,"number")?t:c(t,"string")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},e.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},e.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr,e/i.dpr]},e}(I),A=function(t,n,r){if(void 0===n&&(n={}),e.isVue2)return e.h(t,n,r);var o=n.props,s=n.domProps,a=n.on,u=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}(n,["props","domProps","on"]),c=function(t){return t?Object.entries(t).reduce((function(t,e){var n,r=e[0],o=e[1];return r="on"+(r=r.charAt(0).toUpperCase()+r.slice(1)),i(i({},t),((n={})[r]=o,n))}),{}):null}(a),h=i(i(i(i({},u),o),s),c);return e.h(t,h,r)},H="vue-luck-draw",j="3.4.7",M=e.defineComponent({name:"LuckyWheel",props:{width:{type:[String,Number],default:"300px",require:!0},height:{type:[String,Number],default:"300px",require:!0},blocks:{type:Array,default:function(){return[]}},prizes:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},defaultStyle:{type:Object,default:function(){return{}}},defaultConfig:{type:Object,default:function(){return{}}}},emits:["start","end","success","error","finally"],watch:{blocks:function(t,e){this.$lucky&&(this.$lucky.blocks=t)},prizes:function(t,e){this.$lucky&&(this.$lucky.prizes=t)},buttons:function(t,e){this.$lucky&&(this.$lucky.buttons=t)}},data:function(){return{$lucky:null}},mounted:function(){this.$refs.myLucky&&this.$refs.myLucky.setAttribute("package",H+"@"+j);try{this.initLucky(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.$emit("finally")}},methods:{initLucky:function(){var t=this;this.$lucky=new L({flag:"WEB",width:String(this.width),height:String(this.height),divElement:this.$refs.myLucky,rAF:window.requestAnimationFrame,setTimeout:window.setTimeout,setInterval:window.setInterval,clearTimeout:window.clearTimeout,clearInterval:window.clearInterval},i(i({},this.$props),{start:function(){t.$emit("start")},end:function(e){t.$emit("end",e)}}))},init:function(){this.$lucky&&this.$lucky.init()},play:function(){var t;null===(t=this.$lucky)||void 0===t||t.play()},stop:function(t){var e;null===(e=this.$lucky)||void 0===e||e.stop(t)}},render:function(){return A("div",{ref:"myLucky"})}}),N=e.defineComponent({name:"LuckyGrid",props:{width:{type:[String,Number],default:"300px",require:!0},height:{type:[String,Number],default:"300px",require:!0},cols:{type:[String,Number],default:3},rows:{type:[String,Number],default:3},prizes:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},button:{type:Object},blocks:{type:Array,default:function(){return[]}},defaultStyle:{type:Object,default:function(){return{}}},activeStyle:{type:Object,default:function(){return{}}},defaultConfig:{type:Object,default:function(){return{}}}},emits:["start","end","success","error","finally"],watch:{cols:function(t,e){this.$lucky&&(this.$lucky.cols=t)},rows:function(t,e){this.$lucky&&(this.$lucky.rows=t)},blocks:function(t,e){this.$lucky&&(this.$lucky.blocks=t)},prizes:function(t,e){this.$lucky&&(this.$lucky.prizes=t)},buttons:function(t,e){this.$lucky&&(this.$lucky.buttons=t)},button:function(t,e){this.$lucky&&(this.$lucky.button=t)}},data:function(){return{$lucky:null}},mounted:function(){this.$refs.myLucky&&this.$refs.myLucky.setAttribute("package",H+"@"+j);try{this.initLucky(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.$emit("finally")}},methods:{initLucky:function(){var t=this;this.$lucky=new R({flag:"WEB",width:String(this.width),height:String(this.height),divElement:this.$refs.myLucky,rAF:window.requestAnimationFrame,setTimeout:window.setTimeout,setInterval:window.setInterval,clearTimeout:window.clearTimeout,clearInterval:window.clearInterval},i(i({},this.$props),{start:function(){t.$emit("start")},end:function(e){t.$emit("end",e)}}))},init:function(){this.$lucky&&this.$lucky.init()},play:function(){var t;null===(t=this.$lucky)||void 0===t||t.play()},stop:function(t){var e;null===(e=this.$lucky)||void 0===e||e.stop(t)}},render:function(){return A("div",{ref:"myLucky"})}}),q=function(t){t.component("LuckyWheel",M),t.component("LuckyGrid",N)};"undefined"!=typeof window&&window.Vue&&e.isVue2&&q(window.Vue);var B={install:q};t.LuckyGrid=N,t.LuckyWheel=M,t.default=B,t.install=q,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
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 r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function c(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function u(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,c=o.length;a<c;a++,i++)r[i]=o[a];return r}String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=e[i];if(t.call(r,o,i,e))return o;i++}}});var s=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},f=function(t){return[].filter.call(t,(function(t){return"\n"!==t})).join("")},l=function(t){if("string"!=typeof t)return!1;if("transparent"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\s,]+)\)$/.exec(t);if(0===(null===(n=e)?0:"object"==typeof n?NaN:"number"==typeof n?n:"string"==typeof n?"%"===n[n.length-1]?Number(n.slice(0,-1))/100:Number(n):NaN))return!1}var n;return!0},h=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),d="__proto__"in{};function p(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var g=Array.prototype,v=Object.create(g);["push","pop","shift","unshift","sort","splice","reverse"].forEach((function(t){v[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=g[t].apply(this,e),i=this.__luckyOb__;return["push","unshift","splice"].includes(t)&&i.walk(this),i.dep.notify(),r}}));var b=function(){function t(t){this.dep=new h,p(t,"__luckyOb__",this),Array.isArray(t)&&(d?t.__proto__=v:Object.getOwnPropertyNames(v).forEach((function(e){p(t,e,v[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){m(t,e,t[e])}))},t}();function y(t){if(t&&"object"==typeof t)return"__luckyOb__"in t?t.__luckyOb__:new b(t)}function m(t,e,n){var r=new h,i=Object.getOwnPropertyDescriptor(t,e);if(!i||!1!==i.configurable){var o=i&&i.get,a=i&&i.set;o&&!a||2!==arguments.length||(n=t[e]);var c=y(n);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):n;return h.target&&(r.addSub(h.target),c&&c.dep.addSub(h.target)),e},set:function(e){e!==n&&(n=e,o&&!a||(a?a.call(t,e):n=e,c=y(e),r.notify()))}})}}var w=0,x=function(){function t(t,e,n,r){void 0===r&&(r={}),this.id=w++,this.$lucky=t,this.expr=e,this.deep=!!r.deep,this.getter="function"==typeof e?e:function(t){t+=".";for(var e=[],n="",r=0;r<t.length;r++){var i=t[r];if(/\[|\./.test(i))e.push(n),n="";else{if(/\W/.test(i))continue;n+=i}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=n,this.value=this.get()}return t.prototype.get=function(){h.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){s(t,"array","object")&&Object.keys(t).forEach((function(n){var r=t[n];e(r)}))};e(t)}(t),h.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),S=function(){function t(t){var e=this;this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,this.setHTMLFontSize(),"string"==typeof t?t={el:t}:1===t.nodeType&&(t={el:"",divElement:t}),t=t,this.config=t,this.setDpr(),this.initWindowFunction(),t.flag||(t.flag="WEB"),Object.prototype.hasOwnProperty.call(t,"ob")||(t.ob=!0),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement("canvas"),t.divElement.appendChild(t.canvasElement)),this.resetWidthAndHeight(),t.canvasElement&&(t.ctx=t.canvasElement.getContext("2d"),t.canvasElement.setAttribute("package","lucky-canvas@1.5.3"),t.canvasElement.addEventListener("click",(function(t){return e.handleClick(t)})),t.canvasElement.addEventListener("mousemove",(function(t){return e.handleMouseMove(t)})),t.canvasElement.addEventListener("mousedown",(function(t){return e.handleMouseDown(t)})),t.canvasElement.addEventListener("mouseup",(function(t){return e.handleMouseUp(t)}))),this.ctx=t.ctx,t.ctx?this.boxWidth&&this.boxHeight||console.error("无法获取到宽度或高度"):console.error("无法获取到 CanvasContext2D")}return t.prototype.init=function(t){this.setDpr(),this.setHTMLFontSize(),this.resetWidthAndHeight(),this.zoomCanvas()},t.prototype.handleClick=function(t){},t.prototype.handleMouseDown=function(t){},t.prototype.handleMouseUp=function(t){},t.prototype.handleMouseMove=function(t){},t.prototype.conversionAxis=function(t,e){return[0,0]},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,"未传入 dpr 可能会导致绘制异常"))},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,n=0;t.divElement&&(e=t.divElement.offsetWidth,n=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||n,t.divElement&&(t.divElement.style.overflow="hidden",t.divElement.style.width=this.boxWidth+"px",t.divElement.style.height=this.boxHeight+"px")},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,n=t.canvasElement,r=t.dpr,i=[this.boxWidth*r,this.boxHeight*r],o=i[0],a=i[1],c=function(t){return(t*r-t)/(t*r)*(r/2)*100};n&&(n.width=o,n.height=a,n.style.width=o+"px",n.style.height=a+"px",n.style.transform="scale("+1/r+") translate("+-c(o)+"%, "+-c(a)+"%)",e.scale(r,r))},t.prototype.loadImg=function(t,e,n){var r=this;return void 0===n&&(n="$resolve"),new Promise((function(i,o){if(t||o("=> '"+e.src+"' 不能为空或不合法"),"WEB"===r.config.flag){var a=new Image;a.src=t,a.onload=function(){return i(a)},a.onerror=function(){return o("=> '"+e.src+"' 图片加载失败")}}else e[n]=i}))},t.prototype.drawImage=function(t,e,n,r,i){var o,a=this.config,c=this.ctx;return["WEB","MP-WX"].includes(a.flag)?o=t:["UNI-H5","UNI-MP","TARO-H5","TARO-MP"].includes(a.flag)&&(o=t.path),c.drawImage(o,e,n,r,i)},t.prototype.getLength=function(t){return s(t,"number")?t:s(t,"string")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var n=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,r,i){var o={"%":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*n.htmlFontSize}}[i];if(o)return o(r);var a=n.config.unitFunc;return a?a(r,i):r})))},t.prototype.$set=function(t,e,n){t&&"object"==typeof t&&m(t,e,n)},t.prototype.$computed=function(t,e,n){var r=this;Object.defineProperty(t,e,{get:function(){return n.call(r)}})},t.prototype.$watch=function(t,e,n){void 0===n&&(n={}),"object"==typeof e&&(e=(n=e).handler);var r=new x(this,t,e,n);return n.immediate&&e.call(this,r.value),function(){}},t}(),k=function(t){return Math.PI/180*t},O=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},I=function(t,e){var n=-t/e;return[n,-n*t+e]},_=function(t,e,n,r,i,o){var a;if(void 0===o&&(o=!0),Math.abs(i-r).toFixed(8)>=k(180).toFixed(8)){var c=(i+r)/2;return o?(_(t,e,n,r,c,o),_(t,e,n,c,i,o)):(_(t,e,n,c,i,o),_(t,e,n,r,c,o)),!1}o||(r=(a=[i,r])[0],i=a[1]);var u=O(r,n),s=u[0],f=u[1],l=O(i,n),h=l[0],d=l[1],p=I(s,f),g=p[0],v=p[1],b=I(h,d),y=b[0],m=b[1],w=(m-v)/(g-y),x=(y*v-g*m)/(y-g);isNaN(w)&&(Math.abs(s)===+n.toFixed(8)&&(w=s),Math.abs(h)===+n.toFixed(8)&&(w=h)),g===1/0||g===-1/0?x=y*w+m:y!==1/0&&y!==-1/0||(x=g*w+v),e.lineTo(s,f),t.indexOf("MP")>0?e.quadraticCurveTo(w,x,h,d):e.arcTo(w,x,h,d,n)},T=function(t,e,n,r,i,o,a,c){n||(n=a);var u=k(90/Math.PI/r*a),s=k(90/Math.PI/n*a),f=i+u,l=o-u,h=i+s,d=o-s;e.beginPath(),e.fillStyle=c,e.moveTo.apply(e,O(f,r)),_(t,e,r,f,l,!0),d>h?_(t,e,n,h,d,!1):e.lineTo.apply(e,O((i+o)/2,a/2/Math.abs(Math.sin((i-o)/2)))),e.closePath(),e.fill()},E=function(t,e,n,r,i,o,a){var c=Math.min(r,i);o>c/2&&(o=c/2),t.beginPath(),t.fillStyle=a,t.moveTo(e+o,n),t.lineTo(e+o,n),t.lineTo(e+r-o,n),t.quadraticCurveTo(e+r,n,e+r,n+o),t.lineTo(e+r,n+i-o),t.quadraticCurveTo(e+r,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.quadraticCurveTo(e,n+i,e,n+i-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath(),t.fill()},C={easeIn:function(t,e,n,r){return t>=r&&(t=r),n*(t/=r)*t+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),-n*(t/=r)*(t-2)+e}},z={easeIn:function(t,e,n,r){return t>=r&&(t=r),-n*Math.cos(t/r*(Math.PI/2))+n+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),n*Math.sin(t/r*(Math.PI/2))+e}},j={easeIn:function(t,e,n,r){return t>=r&&(t=r),0==t?e:n*Math.pow(2,10*(t/r-1))+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),t==r?e+n:n*(1-Math.pow(2,-10*t/r))+e}},P={easeIn:function(t,e,n,r){return t>=r&&(t=r),-n*(Math.sqrt(1-(t/=r)*t)-1)+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),n*Math.sqrt(1-(t=t/r-1)*t)+e}},$=Object.freeze({__proto__:null,quad:C,cubic:{easeIn:function(t,e,n,r){return t>=r&&(t=r),n*(t/=r)*t*t+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),n*((t=t/r-1)*t*t+1)+e}},quart:{easeIn:function(t,e,n,r){return t>=r&&(t=r),n*(t/=r)*t*t*t+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),-n*((t=t/r-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,n,r){return t>=r&&(t=r),n*(t/=r)*t*t*t*t+e},easeOut:function(t,e,n,r){return t>=r&&(t=r),n*((t=t/r-1)*t*t*t*t+1)+e}},sine:z,expo:j,circ:P}),A=function(t){function e(e,n){var r;void 0===n&&(n={});var i=t.call(this,e)||this;return i.blocks=[],i.prizes=[],i.buttons=[],i.defaultConfig={},i._defaultConfig={gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},i.defaultStyle={},i._defaultStyle={fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},i.Radius=0,i.prizeRadius=0,i.prizeDeg=0,i.prizeRadian=0,i.rotateDeg=0,i.maxBtnRadius=0,i.startTime=0,i.endTime=0,i.stopDeg=0,i.endDeg=0,i.FPS=16.6,i.blockImgs=[[]],i.prizeImgs=[[]],i.btnImgs=[[]],e.ob&&(i.initData(n),i.initWatch()),i.initComputed(),null===(r=e.beforeCreate)||void 0===r||r.call(i),i.init({blockImgs:i.blocks.map((function(t){return t.imgs})),prizeImgs:i.prizes.map((function(t){return t.imgs})),btnImgs:i.buttons.map((function(t){return t.imgs}))}),i}return i(e,t),e.prototype.initData=function(t){this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},e.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){return o({gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},t.defaultConfig)})),this.$computed(this,"_defaultStyle",(function(){return o({fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)}))},e.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},e.prototype.init=function(e){var n,r,i=this;t.prototype.init.call(this);var o=this.config,a=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(n=o.beforeInit)||void 0===n||n.call(this),a.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(e).forEach((function(t){var n=t,r={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[n],o=e[n];o&&o.forEach((function(t,e){t&&t.forEach((function(t,o){i.loadAndCacheImg(r,e,n,o,(function(){i.draw()}))}))}))})),null===(r=o.afterInit)||void 0===r||r.call(this)},e.prototype.handleClick=function(t){var e,n=this.ctx;n.beginPath(),n.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),n.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},e.prototype.loadAndCacheImg=function(t,e,n,r,i){return a(this,void 0,void 0,(function(){var o,a,u=this;return c(this,(function(c){return(o=this[t][e])&&o.imgs&&(a=o.imgs[r])?(this[n][e]||(this[n][e]=[]),this.loadImg(a.src,a).then((function(t){u[n][e][r]=t,i.call(u)})).catch((function(n){console.error(t+"["+e+"].imgs["+r+"] "+n)})),[2]):[2]}))}))},e.prototype.computedWidthAndHeight=function(t,e,n,r){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var i=this.getWidth(e.width,n);return[i,t.height*(i/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,r);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,n),this.getHeight(e.height,r)]},e.prototype.draw=function(){var t,e,n=this,r=this,i=r.config,o=r.ctx,a=r._defaultConfig,c=r._defaultStyle;null===(t=i.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,r){return l(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,i){if(n.blockImgs[r]){var a=n.blockImgs[r][i];if(a){var c=n.computedWidthAndHeight(a,e,2*t,2*t),u=c[0],s=c[1],f=[n.getOffsetX(u),n.getHeight(e.top,2*t)-t],l=f[0],h=f[1];o.save(),e.rotate&&o.rotate(k(n.rotateDeg)),n.drawImage(a,l,h,u,s),o.restore()}}})),t-n.getLength(e.padding&&e.padding.split(" ")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=k(this.prizeDeg);var u=k(-90+this.rotateDeg+a.offsetDegree),s=function(t){return n.getOffsetX(o.measureText(t).width)},h=function(t,e,r){var i=t.lineHeight||c.lineHeight||t.fontSize||c.fontSize;return n.getHeight(t.top,e)+(r+1)*n.getLength(i)};o.save(),this.prizes.forEach((function(t,e){var r=u+e*n.prizeRadian,d=n.prizeRadius-n.maxBtnRadius,p=t.background||c.background;l(p)&&function(t,e,n,r,i,o,a,c){a?T(t,e,n,r,i,o,a,c):(e.beginPath(),e.fillStyle=c,e.moveTo(0,0),e.arc(0,0,r,i,o,!1),e.closePath(),e.fill())}(i.flag,o,n.maxBtnRadius,n.prizeRadius,r-n.prizeRadian/2,r+n.prizeRadian/2,n.getLength(a.gutter),p);var g=Math.cos(r)*n.prizeRadius,v=Math.sin(r)*n.prizeRadius;o.translate(g,v),o.rotate(r+k(90)),t.imgs&&t.imgs.forEach((function(t,r){if(n.prizeImgs[e]){var i=n.prizeImgs[e][r];if(i){var o=n.computedWidthAndHeight(i,t,n.prizeRadian*n.prizeRadius,d),a=o[0],c=o[1],u=[n.getOffsetX(a),n.getHeight(t.top,d)],s=u[0],f=u[1];n.drawImage(i,s,f,a,c)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||c.fontColor,r=t.fontWeight||c.fontWeight,i=n.getLength(t.fontSize||c.fontSize),u=t.fontStyle||c.fontStyle;o.fillStyle=e,o.font=r+" "+(i>>0)+"px "+u;var l=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,"wordWrap")?t.wordWrap:c.wordWrap){p=f(p);for(var g="",v=0;v<p.length;v++){g+=p[v];var b=o.measureText(g).width,y=(n.prizeRadius-h(t,d,l.length))*Math.tan(n.prizeRadian/2)*2-n.getLength(a.gutter);b>n.getWidth(t.lengthLimit||c.lengthLimit,y)&&(l.push(g.slice(0,-1)),g=p[v])}g&&l.push(g),l.length||l.push(p)}else l=p.split("\n");l.filter((function(t){return!!t})).forEach((function(e,n){o.fillText(e,s(e),h(t,d,n))}))})),o.rotate(k(360)-r-k(90)),o.translate(-g,-v)})),o.restore(),this.buttons.forEach((function(t,e){var r=n.getHeight(t.radius);n.maxBtnRadius=Math.max(n.maxBtnRadius,r),l(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,r,0,2*Math.PI,!1),o.fill()),t.pointer&&l(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-r,0),o.lineTo(r,0),o.lineTo(0,2*-r),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,i){if(n.btnImgs[e]){var o=n.btnImgs[e][i];if(o){var a=n.computedWidthAndHeight(o,t,2*r,2*r),c=a[0],u=a[1],s=[n.getOffsetX(c),n.getHeight(t.top,r)],f=s[0],l=s[1];n.drawImage(o,f,l,c,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||c.fontColor,i=t.fontWeight||c.fontWeight,a=n.getLength(t.fontSize||c.fontSize),u=t.fontStyle||c.fontStyle;o.fillStyle=e,o.font=i+" "+(a>>0)+"px "+u,String(t.text).split("\n").forEach((function(e,n){o.fillText(e,s(e),h(t,r,n))}))}))})),null===(e=i.afterDraw)||void 0===e||e.call(this,o)},e.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},e.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw())},e.prototype.run=function(t){void 0===t&&(t=0);var e=this,n=e.rAF,r=e.prizeFlag,i=e.prizeDeg,o=e.rotateDeg,a=e._defaultConfig,c=Date.now()-this.startTime;if(c>=a.accelerationTime&&void 0!==r){this.FPS=c/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*i-i/2)*this.getLength(a.stopRange),s=0;++s;){var f=360*s-r*i-o-a.offsetDegree+u;if($[a.speedFunction].easeOut(this.FPS,this.stopDeg,f,a.decelerationTime)-this.stopDeg>a.speed){this.endDeg=f;break}}return this.slowDown()}this.rotateDeg=(o+$[a.speedFunction].easeIn(c,0,a.speed,a.accelerationTime))%360,this.draw(),n(this.run.bind(this,t+1))},e.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,i=e.prizeFlag,a=e.stopDeg,c=e.endDeg,u=e._defaultConfig,s=Date.now()-this.endTime;if(-1!==i){if(s>=u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,o({},r.find((function(t,e){return e===i})))));this.rotateDeg=$[u.speedFunction].easeOut(s,a,c,u.decelerationTime)%360,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},e.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},e.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},e.prototype.getOffsetX=function(t){return-t/2},e.prototype.conversionAxis=function(t,e){var n=this.config;return[t/n.dpr-this.Radius,e/n.dpr-this.Radius]},e}(S),L=function(t){function e(e,n){var r;void 0===n&&(n={});var i=t.call(this,e)||this;i.rows=3,i.cols=3,i.blocks=[],i.prizes=[],i.buttons=[],i.defaultConfig={},i._defaultConfig={gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},i.defaultStyle={},i._defaultStyle={borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},i.activeStyle={},i._activeStyle={background:"#ffce98",shadow:"",fontStyle:"",fontWeight:"",fontSize:"",lineHeight:"",fontColor:""},i.cellWidth=0,i.cellHeight=0,i.startTime=0,i.endTime=0,i.currIndex=0,i.stopIndex=0,i.endIndex=0,i.demo=!1,i.timer=0,i.FPS=16.6,i.prizeFlag=-1,i.cells=[],i.blockImgs=[[]],i.btnImgs=[[]],i.prizeImgs=[],e.ob&&(i.initData(n),i.initWatch()),i.initComputed(),null===(r=e.beforeCreate)||void 0===r||r.call(i);var o=i.buttons.map((function(t){return t.imgs}));return i.button&&o.push(i.button.imgs),i.init({blockImgs:i.blocks.map((function(t){return t.imgs})),prizeImgs:i.prizes.map((function(t){return t.imgs})),btnImgs:o}),i}return i(e,t),e.prototype.initData=function(t){this.$set(this,"rows",Number(t.rows)||3),this.$set(this,"cols",Number(t.cols)||3),this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"button",t.button),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"activeStyle",t.activeStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},e.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){var e=o({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,"_defaultStyle",(function(){return o({borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)})),this.$computed(this,"_activeStyle",(function(){return o({background:"#ffce98",shadow:""},t.activeStyle)}))},e.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){var n=e.map((function(t){return t.imgs}));return t.button&&n.push(t.button.imgs),t.init({btnImgs:n})}),{deep:!0}),this.$watch("button",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch("rows",(function(){return t.init({})})),this.$watch("cols",(function(){return t.init({})})),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("activeStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},e.prototype.init=function(e){var n,r,i=this;t.prototype.init.call(this);var o=this,a=o.config;o.ctx,o.button,null===(n=a.beforeInit)||void 0===n||n.call(this),this.draw(),Object.keys(e).forEach((function(t){var n=t,r=e[n],o={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[n];r&&r.forEach((function(t,e){t&&t.forEach((function(t,r){i.loadAndCacheImg(o,e,n,r,(function(){i.draw()}))}))}))})),null===(r=a.afterInit)||void 0===r||r.call(this)},e.prototype.handleClick=function(t){var e=this,n=this.ctx;u(this.buttons,[this.button]).forEach((function(r){var i;if(r){var o=e.getGeometricProperty([r.x,r.y,r.col||1,r.row||1]),a=o[0],c=o[1],u=o[2],s=o[3];n.beginPath(),n.rect(a,c,u,s),n.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||null===(i=e.startCallback)||void 0===i||i.call(e,t))}}))},e.prototype.loadAndCacheImg=function(t,e,n,r,i){return a(this,void 0,void 0,(function(){var o,a,u,s=this;return c(this,(function(c){return o=this[t][e],"buttons"===t&&!this.buttons.length&&this.button&&(o=this.button),o&&o.imgs&&(a=o.imgs[r])?(this[n][e]||(this[n][e]=[]),u=[this.loadImg(a.src,a),a.activeSrc&&this.loadImg(a.activeSrc,a,"$activeResolve")],Promise.all(u).then((function(t){var o=t[0],a=t[1];s[n][e][r]={defaultImg:o,activeImg:a},i.call(s)})).catch((function(n){console.error(t+"["+e+"].imgs["+r+"] "+n)})),[2]):[2]}))}))},e.prototype.computedWidthAndHeight=function(t,e,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,n.col);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var i=this.getHeight(e.height,n.row);return[t.width*(i/t.height),i]}return[this.getWidth(e.width,n.col),this.getHeight(e.height,n.row)]},e.prototype.draw=function(){var t,e,n=this,r=this,i=r.config,o=r.ctx,a=r._defaultConfig,c=r._defaultStyle,h=r._activeStyle;null===(t=i.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=u(this.prizes,this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var r=t.x,i=t.y,a=t.w,u=t.h,f=function(t){var e,n=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,"").split(" ").map((function(t){return~~t})))||[0],r=0,i=0,o=0,a=0;switch(n.length){case 1:r=i=o=a=n[0];break;case 2:r=i=n[0],o=a=n[1];break;case 3:r=n[0],o=a=n[1],i=n[2];break;default:r=n[0],i=n[1],o=n[2],a=n[3]}var c={paddingTop:r,paddingBottom:i,paddingLeft:o,paddingRight:a};for(var u in c)c[u]=Object.prototype.hasOwnProperty.call(t,u)&&s(t[u],"string","number")?~~String(t[u]).replace(/px/g,""):c[u];return[r,i,o,a]}(e),h=f[0],d=f[1],p=f[2],g=f[3],v=e.borderRadius?n.getLength(e.borderRadius):0,b=e.background||c.background;return l(b)&&E(o,r,i,a,u,v,n.handleBackground(r,i,a,u,b)),{x:r+p,y:i+h,w:a-p-g,h:u-h-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-a.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-a.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var r=n.getGeometricProperty([t.x,t.y,t.col,t.row]),a=r[0],u=r[1],s=r[2],d=r[3],p=!1;(void 0===n.prizeFlag||n.prizeFlag>-1)&&(p=e===n.currIndex%n.prizes.length>>0);var g=p?h.background:t.background||c.background;if(l(g)){var v=(p?h.shadow:t.shadow||c.shadow).replace(/px/g,"").split(",")[0].split(" ").map((function(t,e){return e<3?Number(t):t}));4===v.length&&(o.shadowColor=v[3],o.shadowOffsetX=v[0]*i.dpr,o.shadowOffsetY=v[1]*i.dpr,o.shadowBlur=v[2],v[0]>0?s-=v[0]:(s+=v[0],a-=v[0]),v[1]>0?d-=v[1]:(d+=v[1],u-=v[1])),E(o,a,u,s,d,n.getLength(t.borderRadius?t.borderRadius:c.borderRadius),n.handleBackground(a,u,s,d,g)),o.shadowColor="rgba(0, 0, 0, 0)",o.shadowOffsetX=0,o.shadowOffsetY=0,o.shadowBlur=0}var b="prizeImgs";e>=n.prizes.length&&(b="btnImgs",e-=n.prizes.length),t.imgs&&t.imgs.forEach((function(r,i){if(n[b][e]){var o=n[b][e][i];if(o){var c=p&&o.activeImg||o.defaultImg;if(c){var s=n.computedWidthAndHeight(c,r,t),f=s[0],l=s[1],h=[a+n.getOffsetX(f,t.col),u+n.getHeight(r.top,t.row)],d=h[0],g=h[1];n.drawImage(c,d,g,f,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var r=p&&h.fontStyle?h.fontStyle:e.fontStyle||c.fontStyle,i=p&&h.fontWeight?h.fontWeight:e.fontWeight||c.fontWeight,s=p&&h.fontSize?n.getLength(h.fontSize):n.getLength(e.fontSize||c.fontSize),l=p&&h.lineHeight?h.lineHeight:e.lineHeight||c.lineHeight||e.fontSize||c.fontSize;o.font=i+" "+(s>>0)+"px "+r,o.fillStyle=p&&h.fontColor?h.fontColor:e.fontColor||c.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,"wordWrap")?e.wordWrap:c.wordWrap){g=f(g);for(var v="",b=0;b<g.length;b++)v+=g[b],o.measureText(v).width>n.getWidth(e.lengthLimit||c.lengthLimit,t.col)&&(d.push(v.slice(0,-1)),v=g[b]);v&&d.push(v),d.length||d.push(g)}else d=g.split("\n");d.forEach((function(r,i){o.fillText(r,a+n.getOffsetX(o.measureText(r).width,t.col),u+n.getHeight(e.top,t.row)+(i+1)*n.getLength(l))}))}))})),null===(e=i.afterDraw)||void 0===e||e.call(this,o)},e.prototype.handleBackground=function(t,e,n,r,i){var o=this.ctx;return i.includes("linear-gradient")&&(i=function(t,e,n,r,i,o){var a=/linear-gradient\((.+)\)/.exec(o)[1].split(",").map((function(t){return t.trim()})),c=a.shift(),u=[0,0,0,0];if(c.includes("deg")){var s=function(t){return Math.tan(t/180*Math.PI)};(c=c.slice(0,-3)%360)>=0&&c<45?u=[e,n+i,e+r,n+i-r*s(c-0)]:c>=45&&c<90?u=[e,n+i,e+r-i*s(c-45),n]:c>=90&&c<135?u=[e+r,n+i,e+r-i*s(c-90),n]:c>=135&&c<180?u=[e+r,n+i,e,n+r*s(c-135)]:c>=180&&c<225?u=[e+r,n,e,n+r*s(c-180)]:c>=225&&c<270?u=[e+r,n,e+i*s(c-225),n+i]:c>=270&&c<315?u=[e,n,e+i*s(c-270),n+i]:c>=315&&c<360&&(u=[e,n,e+r,n+i-r*s(c-315)])}else c.includes("top")?u=[e,n+i,e,n]:c.includes("bottom")?u=[e,n,e,n+i]:c.includes("left")?u=[e+r,n,e,n]:c.includes("right")&&(u=[e,n,e+r,n]);var f=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return a.reduce((function(t,e,n){var r=e.split(" ");return 1===r.length?t.addColorStop(n,r[0]):2===r.length&&t.addColorStop.apply(t,r),t}),f)}(o,t,e,n,r,i)),i},e.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},e.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.currIndex=0,this.draw())},e.prototype.run=function(t){void 0===t&&(t=0);var e=this,n=e.rAF,r=e.currIndex,i=e.prizes,o=e.prizeFlag,a=e.startTime,c=e._defaultConfig,u=Date.now()-a;if(u>=c.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=r;for(var s=0;++s;){var f=i.length*s+o-(r>>0);if(C.easeOut(this.FPS,this.stopIndex,f,c.decelerationTime)-this.stopIndex>c.speed){this.endIndex=f;break}}return this.slowDown()}this.currIndex=(r+C.easeIn(u,.1,c.speed,c.accelerationTime))%i.length,this.draw(),n(this.run.bind(this,t+1))},e.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,i=e.prizeFlag,a=e.stopIndex,c=e.endIndex,u=e._defaultConfig,s=Date.now()-this.endTime;if(-1!==i){if(s>u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,o({},r.find((function(t,e){return e===i})))));this.currIndex=C.easeOut(s,a,c,u.decelerationTime)%r.length,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},e.prototype.walk=function(){var t=this,e=this.config,n=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=n((function(){t.currIndex+=1,t.draw()}),1300)},e.prototype.getGeometricProperty=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=this.cellWidth,a=this.cellHeight,c=this._defaultConfig.gutter,u=[this.prizeArea.x+(o+c)*e,this.prizeArea.y+(a+c)*n];return r&&i&&u.push(o*r+c*(r-1),a*i+c*(i-1)),u},e.prototype.getWidth=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},e.prototype.getHeight=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},e.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},e.prototype.conversionAxis=function(t,e){var n=this.config;return[t/n.dpr,e/n.dpr]},e}(S);e.LuckyGrid=L,e.LuckyWheel=A},"37e8":function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=a(e),c=r.length,u=0;while(c>u)i.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},4160:function(t,e,n){"use strict";var r=n("23e7"),i=n("17c2");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),i=n("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"4d64":function(t,e,n){var r=n("fc6a"),i=n("50c4"),o=n("23cb"),a=function(t){return function(e,n,a){var c,u=r(e),s=i(u.length),f=o(a,s);if(t&&n!=n){while(s>f)if(c=u[f++],c!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").filter,o=n("1dde"),a=n("ae40"),c=o("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"50c4":function(t,e,n){var r=n("a691"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),i=n("241c"),o=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),i=n("5899"),o="["+i+"]",a=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),u=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:u(1),end:u(2),trim:u(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"65f0":function(t,e,n){var r=n("861d"),i=n("e8b5"),o=n("b622"),a=o("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,i,o,a=n("7f9a"),c=n("da84"),u=n("861d"),s=n("9112"),f=n("5135"),l=n("f772"),h=n("d012"),d=c.WeakMap,p=function(t){return o(t)?i(t):r(t,{})},g=function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var v=new d,b=v.get,y=v.has,m=v.set;r=function(t,e){return m.call(v,t,e),e},i=function(t){return b.call(v,t)||{}},o=function(t){return y.call(v,t)}}else{var w=l("state");h[w]=!0,r=function(t,e){return s(t,w,e),e},i=function(t){return f(t,w)?t[w]:{}},o=function(t){return f(t,w)}}t.exports={set:r,get:i,has:o,enforce:p,getterFor:g}},"6eeb":function(t,e,n){var r=n("da84"),i=n("9112"),o=n("5135"),a=n("ce4e"),c=n("8925"),u=n("69f3"),s=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,h=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(u?!h&&t[e]&&(s=!0):delete t[e],s?t[e]=n:i(t,e,n)):s?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},7156:function(t,e,n){var r=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),i=n("5135"),o=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,i=n("825a"),o=n("37e8"),a=n("7839"),c=n("d012"),u=n("1be4"),s=n("cc12"),f=n("f772"),l=">",h="<",d="prototype",p="script",g=f("IE_PROTO"),v=function(){},b=function(t){return h+p+l+t+h+"/"+p+l},y=function(t){t.write(b("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t,e=s("iframe"),n="java"+p+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(b("document.F=Object")),t.close(),t.F},w=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}w=r?y(r):m();var t=a.length;while(t--)delete w[d][a[t]];return w()};c[g]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(v[d]=i(t),n=new v,v[d]=null,n[g]=t):n=w(),void 0===e?n:o(n,e)}},"7f9a":function(t,e,n){var r=n("da84"),i=n("8925"),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=o.exec(d.stack)||a.exec(d.stack),u=c&&c[1]||!1,s=c&&c[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");u===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var h=0;h<l.length;h++){if("interactive"===l[h].readyState)return l[h];if(l[h].src===u)return l[h];if(u===f&&l[h].innerHTML&&l[h].innerHTML.trim()===i)return l[h]}return null}}return t}))},8925:function(t,e,n){var r=n("c6cd"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("5c6c");t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"94ca":function(t,e,n){var r=n("d039"),i=/#|\.prototype\./,o=function(t,e){var n=c[a(t)];return n==s||n!=u&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",s=o.POLYFILL="P";t.exports=o},"99af":function(t,e,n){"use strict";var r=n("23e7"),i=n("d039"),o=n("e8b5"),a=n("861d"),c=n("7b0b"),u=n("50c4"),s=n("8418"),f=n("65f0"),l=n("1dde"),h=n("b622"),d=n("2d00"),p=h("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",b=d>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=l("concat"),m=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)},w=!b||!y;r({target:"Array",proto:!0,forced:w},{concat:function(t){var e,n,r,i,o,a=c(this),l=f(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?a:arguments[e],m(o)){if(i=u(o.length),h+i>g)throw TypeError(v);for(n=0;n<i;n++,h++)n in o&&s(l,h,o[n])}else{if(h>=g)throw TypeError(v);s(l,h++,o)}return l.length=h,l}})},"9bf2":function(t,e,n){var r=n("83ab"),i=n("0cfb"),o=n("825a"),a=n("c04e"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a4d3:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("d066"),a=n("c430"),c=n("83ab"),u=n("4930"),s=n("fdbf"),f=n("d039"),l=n("5135"),h=n("e8b5"),d=n("861d"),p=n("825a"),g=n("7b0b"),v=n("fc6a"),b=n("c04e"),y=n("5c6c"),m=n("7c73"),w=n("df75"),x=n("241c"),S=n("057f"),k=n("7418"),O=n("06cf"),I=n("9bf2"),_=n("d1e7"),T=n("9112"),E=n("6eeb"),C=n("5692"),z=n("f772"),j=n("d012"),P=n("90e3"),$=n("b622"),A=n("e538"),L=n("746f"),W=n("d44e"),M=n("69f3"),D=n("b727").forEach,F=z("hidden"),R="Symbol",N="prototype",H=$("toPrimitive"),G=M.set,B=M.getterFor(R),q=Object[N],X=i.Symbol,V=o("JSON","stringify"),U=O.f,Y=I.f,J=S.f,K=_.f,Q=C("symbols"),Z=C("op-symbols"),tt=C("string-to-symbol-registry"),et=C("symbol-to-string-registry"),nt=C("wks"),rt=i.QObject,it=!rt||!rt[N]||!rt[N].findChild,ot=c&&f((function(){return 7!=m(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=U(q,e);r&&delete q[e],Y(t,e,n),r&&t!==q&&Y(q,e,r)}:Y,at=function(t,e){var n=Q[t]=m(X[N]);return G(n,{type:R,tag:t,description:e}),c||(n.description=e),n},ct=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof X},ut=function(t,e,n){t===q&&ut(Z,e,n),p(t);var r=b(e,!0);return p(n),l(Q,r)?(n.enumerable?(l(t,F)&&t[F][r]&&(t[F][r]=!1),n=m(n,{enumerable:y(0,!1)})):(l(t,F)||Y(t,F,y(1,{})),t[F][r]=!0),ot(t,r,n)):Y(t,r,n)},st=function(t,e){p(t);var n=v(e),r=w(n).concat(pt(n));return D(r,(function(e){c&&!lt.call(n,e)||ut(t,e,n[e])})),t},ft=function(t,e){return void 0===e?m(t):st(m(t),e)},lt=function(t){var e=b(t,!0),n=K.call(this,e);return!(this===q&&l(Q,e)&&!l(Z,e))&&(!(n||!l(this,e)||!l(Q,e)||l(this,F)&&this[F][e])||n)},ht=function(t,e){var n=v(t),r=b(e,!0);if(n!==q||!l(Q,r)||l(Z,r)){var i=U(n,r);return!i||!l(Q,r)||l(n,F)&&n[F][r]||(i.enumerable=!0),i}},dt=function(t){var e=J(v(t)),n=[];return D(e,(function(t){l(Q,t)||l(j,t)||n.push(t)})),n},pt=function(t){var e=t===q,n=J(e?Z:v(t)),r=[];return D(n,(function(t){!l(Q,t)||e&&!l(q,t)||r.push(Q[t])})),r};if(u||(X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=P(t),n=function(t){this===q&&n.call(Z,t),l(this,F)&&l(this[F],e)&&(this[F][e]=!1),ot(this,e,y(1,t))};return c&&it&&ot(q,e,{configurable:!0,set:n}),at(e,t)},E(X[N],"toString",(function(){return B(this).tag})),E(X,"withoutSetter",(function(t){return at(P(t),t)})),_.f=lt,I.f=ut,O.f=ht,x.f=S.f=dt,k.f=pt,A.f=function(t){return at($(t),t)},c&&(Y(X[N],"description",{configurable:!0,get:function(){return B(this).description}}),a||E(q,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),D(w(nt),(function(t){L(t)})),r({target:R,stat:!0,forced:!u},{for:function(t){var e=String(t);if(l(tt,e))return tt[e];var n=X(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!ct(t))throw TypeError(t+" is not a symbol");if(l(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:ft,defineProperty:ut,defineProperties:st,getOwnPropertyDescriptor:ht}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:dt,getOwnPropertySymbols:pt}),r({target:"Object",stat:!0,forced:f((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(g(t))}}),V){var gt=!u||f((function(){var t=X();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}));r({target:"JSON",stat:!0,forced:gt},{stringify:function(t,e,n){var r,i=[t],o=1;while(arguments.length>o)i.push(arguments[o++]);if(r=e,(d(e)||void 0!==t)&&!ct(t))return h(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ct(e))return e}),i[1]=e,V.apply(null,i)}})}X[N][H]||T(X[N],H,X[N].valueOf),W(X,R),j[F]=!0},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a9e3:function(t,e,n){"use strict";var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("6eeb"),c=n("5135"),u=n("c6b6"),s=n("7156"),f=n("c04e"),l=n("d039"),h=n("7c73"),d=n("241c").f,p=n("06cf").f,g=n("9bf2").f,v=n("58a8").trim,b="Number",y=i[b],m=y.prototype,w=u(h(m))==b,x=function(t){var e,n,r,i,o,a,c,u,s=f(t,!1);if("string"==typeof s&&s.length>2)if(s=v(s),e=s.charCodeAt(0),43===e||45===e){if(n=s.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+s}for(o=s.slice(2),a=o.length,c=0;c<a;c++)if(u=o.charCodeAt(c),u<48||u>i)return NaN;return parseInt(o,r)}return+s};if(o(b,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var S,k=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof k&&(w?l((function(){m.valueOf.call(n)})):u(n)!=b)?s(new y(x(e)),n,k):x(e)},O=r?d(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),I=0;O.length>I;I++)c(y,S=O[I])&&!c(k,S)&&g(k,S,p(y,S));k.prototype=m,m.constructor=k,a(i,b,k)}},ae40:function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("5135"),a=Object.defineProperty,c={},u=function(t){throw t};t.exports=function(t,e){if(o(c,t))return c[t];e||(e={});var n=[][t],s=!!o(e,"ACCESSORS")&&e.ACCESSORS,f=o(e,0)?e[0]:u,l=o(e,1)?e[1]:void 0;return c[t]=!!n&&!i((function(){if(s&&!r)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,f,l)}))}},b2a2:function(t){t.exports=JSON.parse('{"a":"vue-luck-draw","b":"3.4.5"}')},b622:function(t,e,n){var r=n("da84"),i=n("5692"),o=n("5135"),a=n("90e3"),c=n("4930"),u=n("fdbf"),s=i("wks"),f=r.Symbol,l=u?f:f&&f.withoutSetter||a;t.exports=function(t){return o(s,t)||(c&&o(f,t)?s[t]=f[t]:s[t]=l("Symbol."+t)),s[t]}},b64b:function(t,e,n){var r=n("23e7"),i=n("7b0b"),o=n("df75"),a=n("d039"),c=a((function(){o(1)}));r({target:"Object",stat:!0,forced:c},{keys:function(t){return o(i(t))}})},b727:function(t,e,n){var r=n("0366"),i=n("44ad"),o=n("7b0b"),a=n("50c4"),c=n("65f0"),u=[].push,s=function(t){var e=1==t,n=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l;return function(d,p,g,v){for(var b,y,m=o(d),w=i(m),x=r(p,g,3),S=a(w.length),k=0,O=v||c,I=e?O(d,S):n?O(d,0):void 0;S>k;k++)if((h||k in w)&&(b=w[k],y=x(b,k,m),t))if(e)I[k]=y;else if(y)switch(t){case 3:return!0;case 5:return b;case 6:return k;case 2:u.call(I,b)}else if(f)return!1;return l?-1:s||f?f:I}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca84:function(t,e,n){var r=n("5135"),i=n("fc6a"),o=n("4d64").indexOf,a=n("d012");t.exports=function(t,e){var n,c=i(t),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);while(e.length>u)r(c,n=e[u++])&&(~o(s,n)||s.push(n));return s}},cc12:function(t,e,n){var r=n("da84"),i=n("861d"),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},ce4e:function(t,e,n){var r=n("da84"),i=n("9112");t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("428f"),i=n("da84"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},d2bb:function(t,e,n){var r=n("825a"),i=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},d44e:function(t,e,n){var r=n("9bf2").f,i=n("5135"),o=n("b622"),a=o("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),i=n("83ab"),o=n("56ef"),a=n("fc6a"),c=n("06cf"),u=n("8418");r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){var e,n,r=a(t),i=c.f,s=o(r),f={},l=0;while(s.length>l)n=i(r,e=s[l++]),void 0!==n&&u(f,e,n);return f}})},df75:function(t,e,n){var r=n("ca84"),i=n("7839");t.exports=Object.keys||function(t){return r(t,i)}},e439:function(t,e,n){var r=n("23e7"),i=n("d039"),o=n("fc6a"),a=n("06cf").f,c=n("83ab"),u=i((function(){a(1)})),s=!c||u;r({target:"Object",stat:!0,forced:s,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},e538:function(t,e,n){var r=n("b622");e.f=r},e893:function(t,e,n){var r=n("5135"),i=n("56ef"),o=n("06cf"),a=n("9bf2");t.exports=function(t,e){for(var n=i(e),c=a.f,u=o.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||c(t,f,u(e,f))}}},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},f772:function(t,e,n){var r=n("5692"),i=n("90e3"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"LuckyGrid",(function(){return k})),n.d(e,"LuckyWheel",(function(){return C})),"undefined"!==typeof window){var r=window.document.currentScript,i=n("8875");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var a=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},c=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{background:"#ff4a4c","border-radius":"4px",color:"#eee","text-align":"center",padding:"10px 20px"}},[n("p",[t._v("请使用<luckyWheel /> 或 <luckyGrid />组件")]),n("p",[t._v("新增图片引入机制")]),n("p",[t._v("新增自动根据dpr优化清晰度")]),n("p",[t._v("新增九宫格抽奖")]),n("p",[n("a",{staticStyle:{color:"#eee"},attrs:{href:"https://100px.net?luckDraw",target:"_blank"}},[t._v("官方文档")]),t._v(" | "),n("a",{staticStyle:{color:"#eee"},attrs:{href:"https://github.com/buuing/vue-luck-draw/issues?luckDraw",target:"_blank"}},[t._v("bug 反馈")]),t._v(" | "),n("a",{staticStyle:{color:"#eee"},attrs:{href:"https://github.com/buuing/vue-luck-draw?luckDraw",target:"_blank"}},[t._v("github 地址")])])])}],u={},s=u;function f(t,e,n,r,i,o,a,c){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),a?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},s._ssrRegister=u):i&&(u=c?function(){i.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var l=f(s,a,c,!1,null,null,null),h=l.exports,d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"luckyGrid"})},p=[];n("99af"),n("a9e3"),n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y=n("b2a2"),m=n("32fc"),w={props:{width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},cols:{type:[String,Number],default:3},rows:{type:[String,Number],default:3},prizes:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},button:{type:Object},blocks:{type:Array,default:function(){return[]}},defaultStyle:{type:Object,default:function(){return{}}},activeStyle:{type:Object,default:function(){return{}}},defaultConfig:{type:Object,default:function(){return{}}},demo:{type:Boolean,default:!1}},data:function(){return{$lucky:null}},watch:{cols:function(t,e){this.$lucky.cols=t},rows:function(t,e){this.$lucky.rows=t},blocks:function(t,e){this.$lucky.blocks=t},prizes:function(t,e){this.$lucky.prizes=t},buttons:function(t,e){this.$lucky.buttons=t},button:function(t,e){this.$lucky.button=t}},mounted:function(){this.$refs.luckyGrid.setAttribute("package","".concat(y["a"],"@").concat(y["b"]));try{this.initLucky(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.$emit("finally")}},methods:{initLucky:function(){var t=this;this.$lucky=new m["LuckyGrid"]({flag:"WEB",width:this.width,height:this.height,divElement:this.$refs.luckyGrid,rAF:window.requestAnimationFrame,setTimeout:window.setTimeout,setInterval:window.setInterval,clearInterval:window.clearInterval},b(b({},this.$props),{},{start:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.$emit.apply(t,["start"].concat(n))},end:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.$emit.apply(t,["end"].concat(n))}}))},init:function(){this.$lucky&&this.$lucky.init({})},play:function(){var t;(t=this.$lucky).play.apply(t,arguments)},stop:function(){var t;(t=this.$lucky).stop.apply(t,arguments)}}},x=w,S=f(x,d,p,!1,null,null,null),k=S.exports,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"luckyWheel"})},I=[],_={props:{width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},blocks:{type:Array,default:function(){return[]}},prizes:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},defaultStyle:{type:Object,default:function(){return{}}},defaultConfig:{type:Object,default:function(){return{}}}},data:function(){return{$lucky:null}},watch:{blocks:function(t,e){this.$lucky.blocks=t},prizes:function(t,e){this.$lucky.prizes=t},buttons:function(t,e){this.$lucky.buttons=t}},mounted:function(){this.$refs.luckyWheel.setAttribute("package","".concat(y["a"],"@").concat(y["b"]));try{this.initLucky(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.$emit("finally")}},methods:{initLucky:function(){var t=this;this.$lucky=new m["LuckyWheel"]({flag:"WEB",width:this.width,height:this.height,divElement:this.$refs.luckyWheel,rAF:window.requestAnimationFrame,setTimeout:window.setTimeout,setInterval:window.setInterval,clearInterval:window.clearInterval},b(b({},this.$props),{},{start:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.$emit.apply(t,["start"].concat(n))},end:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.$emit.apply(t,["end"].concat(n))}}))},init:function(){this.$lucky&&this.$lucky.init({})},play:function(){var t;(t=this.$lucky).play.apply(t,arguments)},stop:function(){var t;(t=this.$lucky).stop.apply(t,arguments)}}},T=_,E=f(T,O,I,!1,null,null,null),C=E.exports,z=function(t,e){t.component("LuckDraw",h),t.component("LuckyGrid",k),t.component("LuckyWheel",C)};"undefined"!==typeof window&&window.Vue&&z(window.Vue);var j={install:z};e["default"]=j},fc6a:function(t,e,n){var r=n("44ad"),i=n("1d80");t.exports=function(t){return r(i(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})})); |
{ | ||
"name": "vue-luck-draw", | ||
"version": "3.4.9", | ||
"author": { | ||
"name": "ldq", | ||
"email": "ldq404@qq.com" | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"lucky-canvas": "^1.5.4" | ||
}, | ||
"deprecated": false, | ||
"description": "一个支持 vue2 / vue3 的(大转盘抽奖 / 九宫格抽奖)luckydraw 插件", | ||
"module": "dist/vue-luck-draw.esm", | ||
"browser": "dist/vue-luck-draw.umd", | ||
"types": "types/index.d.ts", | ||
"files": [ | ||
"package.json", | ||
"dist", | ||
"vue3", | ||
"types", | ||
"index.js" | ||
], | ||
"homepage": "https://100px.net", | ||
"keywords": [ | ||
@@ -17,45 +29,6 @@ "vue3抽奖", | ||
], | ||
"author": "ldq <ldq404@qq.com>", | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"dist", | ||
"vue3", | ||
"types", | ||
"index.js", | ||
"package.json" | ||
], | ||
"scripts": { | ||
"dev": "rollup --config rollup.config.dev.js -w", | ||
"build": "rollup --config rollup.config.build.js", | ||
"switch:2": "vue-demi-switch 2 vue2", | ||
"switch:3": "vue-demi-switch 3" | ||
}, | ||
"homepage": "https://100px.net", | ||
"dependencies": { | ||
"lucky-canvas": "^1.5.5", | ||
"vue-demi": "^0.7.4" | ||
}, | ||
"peerDependencies": { | ||
"@vue/composition-api": "^1.0.0-beta.1", | ||
"vue": "^2.0.0 || >=3.0.0-rc.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@vue/composition-api": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.0.5", | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@vue/compiler-sfc": "^3.0.11", | ||
"acorn-jsx": "^5.3.1", | ||
"postcss": "^8.2.8", | ||
"rollup": "^2.43.0", | ||
"rollup-plugin-postcss": "^4.0.0", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"typescript": "^4.2.3", | ||
"vue": "^3.0.11" | ||
} | ||
"main": "index.js", | ||
"name": "vue-luck-draw", | ||
"version": "3.4.10" | ||
} |
<div align="center"> | ||
<img src="https://cdn.jsdelivr.net/gh/buuing/cdn/imgs/lucky-canvas.png" width="128" alt="logo" /> | ||
<img src="https://raw.githubusercontent.com/LuckDraw/lucky-canvas/master/logo.png" width="128" alt="logo" /> | ||
<h1>lucky-canvas 抽奖插件</h1> | ||
@@ -18,13 +18,2 @@ <p>一个基于 JavaScript 的 ( 大转盘 / 九宫格 ) 抽奖插件</p> | ||
</a> | ||
<a href="https://www.npmjs.com/package/lucky-canvas" target="_black"> | ||
<img src="https://img.shields.io/npm/v/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="version" /> | ||
</a> | ||
<a href="https://www.npmjs.com/package/lucky-canvas" target="_black"> | ||
<img src="https://img.shields.io/npm/dm/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" /> | ||
</a> | ||
<a href="https://www.jsdelivr.com/package/npm/lucky-canvas" target="_black"> | ||
<img src="https://data.jsdelivr.com/v1/package/npm/lucky-canvas/badge" alt="downloads" /> | ||
</a> | ||
</p> | ||
<p> | ||
<a href="https://github.com/buuing" target="_black"> | ||
@@ -39,2 +28,14 @@ <img src="https://img.shields.io/badge/Author-%20buuing%20-7289da.svg?&logo=github&style=flat-square" alt="author" /> | ||
<div align="center"> | ||
|适配框架|npm包|npm下载量|CDN使用量| | ||
| :-: | :-: | :-: | :-: | | ||
|`JS` / `JQ`|[lucky-canvas](https://100px.net/usage/js.html)|<img src="https://img.shields.io/npm/dm/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/lucky-canvas/badge" alt="downloads" />| | ||
|`Vue2.x` / `Vue3.x`|[vue-luck-draw](https://100px.net/usage/vue.html)|<img src="https://img.shields.io/npm/dm/vue-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/vue-luck-draw/badge" alt="downloads" />| | ||
|`React`|[react-luck-draw](https://100px.net/usage/react.html)|<img src="https://img.shields.io/npm/dm/react-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/react-luck-draw/badge" alt="downloads" />| | ||
|`UniApp`|[uni-luck-draw](https://100px.net/usage/uni.html)|<img src="https://img.shields.io/npm/dm/uni-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
|`Taro3.x`|[taro-luck-draw](https://100px.net/usage/taro.html)|<img src="https://img.shields.io/npm/dm/taro-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
|`微信小程序`|[mini-luck-draw](https://100px.net/usage/wx.html)|<img src="https://img.shields.io/npm/dm/mini-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
</div> | ||
<br /> | ||
@@ -50,10 +51,2 @@ | ||
|适配框架|npm包|npm下载量|CDN使用量| | ||
| :-: | :-: | :-: | :-: | | ||
|`JS` / `JQ`|[lucky-canvas](https://100px.net/usage/js.html)|<img src="https://img.shields.io/npm/dm/lucky-canvas?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/lucky-canvas/badge" alt="downloads" />| | ||
|`Vue2.x` / `Vue3.x`|[vue-luck-draw](https://100px.net/usage/vue.html)|<img src="https://img.shields.io/npm/dm/vue-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/vue-luck-draw/badge" alt="downloads" />| | ||
|`React`|[react-luck-draw](https://100px.net/usage/react.html)|<img src="https://img.shields.io/npm/dm/react-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|<img src="https://data.jsdelivr.com/v1/package/npm/react-luck-draw/badge" alt="downloads" />| | ||
|`UniApp`|[uni-luck-draw](https://100px.net/usage/uni.html)|<img src="https://img.shields.io/npm/dm/uni-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
|`Taro3.x`|[taro-luck-draw](https://100px.net/usage/taro.html)|<img src="https://img.shields.io/npm/dm/taro-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
|`微信小程序`|[mini-luck-draw](https://100px.net/usage/wx.html)|<img src="https://img.shields.io/npm/dm/mini-luck-draw?color=%23ffca28&logo=npm&style=flat-square" alt="downloads" />|/| | ||
@@ -113,5 +106,5 @@ ## 在 vue2.x / vue3.x 中使用 | ||
- **vue2.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/dist/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/dist/vue-luck-draw.umd.min.js) | ||
- **vue2.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4.6/dist/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4.6/dist/vue-luck-draw.umd.min.js) | ||
- **vue3.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/vue3/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4/vue3/vue-luck-draw.umd.min.js) | ||
- **vue3.x:** [https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4.6/vue3/vue-luck-draw.umd.min.js](https://cdn.jsdelivr.net/npm/vue-luck-draw@3.4.6/vue3/vue-luck-draw.umd.min.js) | ||
@@ -118,0 +111,0 @@ |
@@ -0,0 +0,0 @@ import * as vue_demi from 'vue-demi'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
0
14
9789
596659
2
139
4
- Removedvue-demi@^0.7.4
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/parser@7.26.2(transitive)
- Removed@babel/types@7.26.0(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@vue/compiler-core@3.5.13(transitive)
- Removed@vue/compiler-dom@3.5.13(transitive)
- Removed@vue/compiler-sfc@3.5.13(transitive)
- Removed@vue/compiler-ssr@3.5.13(transitive)
- Removed@vue/composition-api@1.7.2(transitive)
- Removed@vue/reactivity@3.5.13(transitive)
- Removed@vue/runtime-core@3.5.13(transitive)
- Removed@vue/runtime-dom@3.5.13(transitive)
- Removed@vue/server-renderer@3.5.13(transitive)
- Removed@vue/shared@3.5.13(transitive)
- Removedcsstype@3.1.3(transitive)
- Removedentities@4.5.0(transitive)
- Removedestree-walker@2.0.2(transitive)
- Removedmagic-string@0.30.13(transitive)
- Removednanoid@3.3.7(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpostcss@8.4.49(transitive)
- Removedsource-map-js@1.2.1(transitive)
- Removedvue@2.6.143.5.13(transitive)
- Removedvue-demi@0.7.5(transitive)
Updatedlucky-canvas@^1.5.4