CRMEB/crmeb/public/admin/js/chunk-afbd234c.5ba93b89.js
2022-12-19 18:40:49 +08:00

1 line
34 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-afbd234c"],{"0b3b":function(t,e,n){"use strict";var i=n("8fe4b");n.n(i).a},1069:function(t,e,n){t.exports=function(){"use strict";var t={358:function(t,e,n){var i=n(81),a=(i=n.n(i),n(645));n=n.n(a)()(i());n.push([t.id,".vue-puzzle-vcode {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: 999;\n opacity: 0;\n pointer-events: none;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n}\n.vue-puzzle-vcode.show_ {\n opacity: 1;\n pointer-events: auto;\n}\n.vue-auth-box_ {\n position: absolute;\n top: 40%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n padding: 20px;\n background: #fff;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-radius: 3px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.vue-auth-box_ .auth-body_ {\n position: relative;\n overflow: hidden;\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.8);\n z-index: 20;\n opacity: 1;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ {\n opacity: 0;\n pointer-events: none;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ .loading-gif_ span {\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ {\n -webkit-box-flex: 0;\n -webkit-flex: none;\n flex: none;\n height: 5px;\n line-height: 0;\n}\n@-webkit-keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n@keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span {\n display: inline-block;\n width: 5px;\n height: 100%;\n margin-left: 2px;\n border-radius: 50%;\n background-color: #888;\n -webkit-animation: load 1.04s ease infinite;\n animation: load 1.04s ease infinite;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(1) {\n margin-left: 0;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(2) {\n -webkit-animation-delay: 0.13s;\n animation-delay: 0.13s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(3) {\n -webkit-animation-delay: 0.26s;\n animation-delay: 0.26s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(4) {\n -webkit-animation-delay: 0.39s;\n animation-delay: 0.39s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(5) {\n -webkit-animation-delay: 0.52s;\n animation-delay: 0.52s;\n}\n.vue-auth-box_ .auth-body_ .info-box_ {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 24px;\n line-height: 24px;\n text-align: center;\n overflow: hidden;\n font-size: 13px;\n background-color: #83ce3f;\n opacity: 0;\n -webkit-transform: translateY(24px);\n transform: translateY(24px);\n -webkit-transition: all 200ms;\n transition: all 200ms;\n color: #fff;\n z-index: 10;\n}\n.vue-auth-box_ .auth-body_ .info-box_.show {\n opacity: 0.95;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n}\n.vue-auth-box_ .auth-body_ .info-box_.fail {\n background-color: #ce594b;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas2_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 60px;\n height: 100%;\n z-index: 2;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_ {\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n -webkit-transition: opacity 600ms;\n transition: opacity 600ms;\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_.show {\n opacity: 1;\n}\n.vue-auth-box_ .auth-body_ .flash_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 30px;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.1);\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .flash_.show {\n -webkit-transition: -webkit-transform 600ms;\n transition: -webkit-transform 600ms;\n transition: transform 600ms;\n transition: transform 600ms, -webkit-transform 600ms;\n}\n.vue-auth-box_ .auth-body_ .reset_ {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 35px;\n height: auto;\n z-index: 12;\n cursor: pointer;\n -webkit-transition: -webkit-transform 200ms;\n transition: -webkit-transform 200ms;\n transition: transform 200ms;\n transition: transform 200ms, -webkit-transform 200ms;\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n}\n.vue-auth-box_ .auth-body_ .reset_:hover {\n -webkit-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.vue-auth-box_ .auth-control_ .range-box {\n position: relative;\n width: 100%;\n background-color: #eef1f8;\n margin-top: 20px;\n border-radius: 3px;\n box-shadow: 0 0 8px rgba(240, 240, 240, 0.6) inset;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-text {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n font-size: 14px;\n color: #b7bcd1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n width: 100%;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider {\n position: absolute;\n height: 100%;\n width: 50px;\n background-color: rgba(106, 160, 255, 0.8);\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn {\n position: absolute;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n right: 0;\n width: 50px;\n height: 100%;\n background-color: #fff;\n border-radius: 3px;\n box-shadow: 0 0 4px #ccc;\n cursor: pointer;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div {\n width: 0;\n height: 40%;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border: solid 1px #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div:nth-child(2) {\n margin: 0 4px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:first-child,\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:first-child {\n border: solid 4px transparent;\n height: 0;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(2),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(2) {\n border-width: 3px;\n height: 0;\n border-radius: 3px;\n margin: 0 6px;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(3),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(3) {\n border: solid 4px transparent;\n height: 0;\n border-left-color: #6aa0ff;\n}\n.vue-puzzle-overflow {\n overflow: hidden !important;\n}\n",""]),e.Z=n},645:function(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(0<e[5].length?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,a,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var r=0;r<this.length;r++){var c=this[r][0];null!=c&&(o[c]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);i&&o[l[0]]||(void 0!==s&&(void 0!==l[5]&&(l[1]="@layer".concat(0<l[5].length?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),n&&(l[2]&&(l[1]="@media ".concat(l[2]," {").concat(l[1],"}")),l[2]=n),a&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=a):l[4]="".concat(a)),e.push(l))}},e}},81:function(t){t.exports=function(t){return t[1]}},379:function(t){var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var a={},s=[],o=0;o<t.length;o++){var r=t[o],c=i.base?r[0]+i.base:r[0],h=a[c]||0,l="".concat(c," ").concat(h);c=(a[c]=h+1,n(l)),h={css:r[1],media:r[2],sourceMap:r[3],supports:r[4],layer:r[5]};-1!==c?(e[c].references++,e[c].updater(h)):(r=function(t,e){var n=e.domAPI(e);return n.update(t),function(e){e?e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer||n.update(t=e):n.remove()}}(h,i),i.byIndex=o,e.splice(o,0,{identifier:l,updater:r,references:1})),s.push(l)}return s}t.exports=function(t,a){var s=i(t=t||[],a=a||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var r=n(s[o]);e[r].references--}t=i(t,a);for(var c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=t}}},569:function(t){var e={};t.exports=function(t,n){if(t=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t),!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(n)}},216:function(t){t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:function(t,e,n){t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:function(t){t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){var i,a,s,o;i=e,a=t,s="",(n=n).supports&&(s+="@supports (".concat(n.supports,") {")),n.media&&(s+="@media ".concat(n.media," {")),(o=void 0!==n.layer)&&(s+="@layer".concat(0<n.layer.length?" ".concat(n.layer):""," {")),s+=n.css,o&&(s+="}"),n.media&&(s+="}"),n.supports&&(s+="}"),(o=n.sourceMap)&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),a.styleTagTransform(s,i,a.options)},remove:function(){var t;null!==(t=e).parentNode&&t.parentNode.removeChild(t)}}}},589:function(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(i){var a=e[i];return void 0!==a||(a=e[i]={id:i,exports:{}},t[i](a,a.exports,n)),a.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){function t(){var t=this,e=t.$createElement;return(e=t._self._c||e)("div",{class:["vue-puzzle-vcode",{show_:t.show}],on:{mousedown:t.onCloseMouseDown,mouseup:t.onCloseMouseUp,touchstart:t.onCloseMouseDown,touchend:t.onCloseMouseUp}},[e("div",{staticClass:"vue-auth-box_",on:{mousedown:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},[e("div",{staticClass:"auth-body_",style:"height: "+t.canvasHeight+"px"},[e("canvas",{ref:"canvas1",style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),e("canvas",{ref:"canvas3",class:["auth-canvas3_",{show:t.isSuccess}],style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),e("canvas",{ref:"canvas2",staticClass:"auth-canvas2_",style:"width:"+t.puzzleBaseSize+"px;height:"+t.canvasHeight+"px;transform:translateX("+(t.styleWidth-t.sliderBaseSize-(t.puzzleBaseSize-t.sliderBaseSize)*((t.styleWidth-t.sliderBaseSize)/(t.canvasWidth-t.sliderBaseSize)))+"px)",attrs:{width:t.puzzleBaseSize,height:t.canvasHeight}}),t._v(" "),e("div",{class:["loading-box_",{hide_:!t.loading}]},[t._m(0)]),t._v(" "),e("div",{class:["info-box_",{show:t.infoBoxShow},{fail:t.infoBoxFail}]},[t._v("\n "+t._s(t.infoText)+"\n ")]),t._v(" "),e("div",{class:["flash_",{show:t.isSuccess}],style:"transform: translateX("+(t.isSuccess?t.canvasWidth+.578*t.canvasHeight+"px":"-"+.578*t.canvasHeight+"px")+") skew(-30deg, 0);"}),t._v(" "),e("img",{staticClass:"reset_",attrs:{src:t.resetSvg},on:{click:t.reset}})]),t._v(" "),e("div",{staticClass:"auth-control_"},[e("div",{staticClass:"range-box",style:"height:"+t.sliderBaseSize+"px"},[e("div",{staticClass:"range-text"},[t._v(t._s(t.sliderText))]),t._v(" "),e("div",{ref:"range-slider",staticClass:"range-slider",style:"width:"+t.styleWidth+"px"},[e("div",{class:["range-btn",{isDown:t.mouseDown}],style:"width:"+t.sliderBaseSize+"px",on:{mousedown:function(e){return t.onRangeMouseDown(e)},touchstart:function(e){return t.onRangeMouseDown(e)}}},[e("div"),t._v(" "),e("div"),t._v(" "),e("div")])])])])])])}n.r(i),n.d(i,{default:function(){return u}}),t._withStripped=!0;var e={props:{canvasWidth:{type:Number,default:310},canvasHeight:{type:Number,default:160},show:{type:Boolean,default:!1},puzzleScale:{type:Number,default:1},sliderSize:{type:Number,default:50},range:{type:Number,default:10},imgs:{type:Array},successText:{type:String,default:"验证通过!"},failText:{type:String,default:"验证失败,请重试"},sliderText:{type:String,default:"拖动滑块完成拼图"}},data:()=>({mouseDown:!1,startWidth:50,startX:0,newX:0,pinX:0,pinY:0,loading:!1,isCanSlide:!1,error:!1,infoBoxShow:!1,infoText:"",infoBoxFail:!1,timer1:null,closeDown:!1,isSuccess:!1,imgIndex:-1,isSubmting:!1,resetSvg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAELklEQVRYR+2YW2wUZRTH//9vtlCoF9IoIklT3PqgPGi326hoetuaGEhIr9SgCYkkgt2WGOQVCca+GavWdr0GjD4YhG3RB3hply1LQA1tEQIxEXapGI2pEkys9LIzx2ylYWfY6e5sF0oi+7hzzvl+3/9855xvhrjNf7zN+XAHcL4Z+n8o6JWTeYt++W25S596AIZy6TB+n3yo+Nchlk8vmIIVowdXU9c3Q1gDSilBlQwjgBAYFGDvdF58/4milqvZwDpOcXWsb5Uh8hmBqkwXFMhlCN8aX5LXNbRy/T+Z+iXsHAFWRXs3QGQPyLucLDJrK5DgUXdTsxPfjAEro8E3Ce50EtxsKxPTwCPH3U2jTmJkBJgWTnAMxDeGMEoa0xQ+LJQnCD4HYFkCyAC3RdwN3U7gMkpxRTTYrMD91sCJIgCxV5R6O1Jcfy7VwonqLoj9/CqB2kF341qncGkBvRe+ureAWpRgoalCBecMFzcdK24YymZRJz5zprgq1tsJwXYL3CVZGvdGHmwZc7JQtra2gE+f712ep2QUYP714DJhaJrXLqXZQszlZwtYdSHoB9ljVk/ePVrSZFL0ZkAlxzQBVseCT8WhZhRThtFB8plk9Zi/qCi8cv0fNxvKFrDy4oF11NXXIFy2EII4iBcG3Y03VLZT8OqRd5aFPduvOEpxRayvXolxAKB2g6NgEhobBlc1HHYKY7WvHf5wtVAPgegIlbbZ9seUZ7AyFnwewi9pGoUyDmhrB931kfnC1ZwOeKlLP8GZJi6QLSFP2yep4toXSbT3ZQAfX3O6omt8Nhd9r/aHQAUMOQywYBZo5uZD2ThQ2rbPCjlnH6yI9rUryE5DU75ctJaake46Be4DuDjF8dFBNA94/AdtiySVxIlpMlTS8td801o70vMigM9huTda2lhcKHVHPO2HZv/P6LIwX7hk/+qzPSvUJGMkrg8AQYTkroRdXMlE+HH/twsG6BsOdJHYZlaO/lBZ6weOiiSXqs3Gqj0TeAxx+T75DIpgwjC0onD51pQD4JaluPrkR/cpFT9DcoVp84LOgTL/DjtBbglgou+puHwB8lEznPxJw1XSX77VtgizBvQNBw4RMqB7xt4Lc3c8lQKJaQHoO4R8ydz0/7MWoCXk8c85MrMC9J3qaafw/WtQlwXST+F3BnAeYB4obgJ1BJIuG+YtiKAjVOZ/Pd1ZdwzoG+4uBtSPpjaRbhXLcwF3hzytb2TilgVgT5BkYybBrTYC+Rvg5nRpdTRJrIs8+VPXPQXj2i4ItxC4O2NQQUQnN4U9rRcz9nH64p4ceM2lziX5Y4s3KHCdUHwE77ecMkMEp6BwhIa2Z6DslZRvfulgHafYLuCas58WLp2aLCFUga70qxOFU6dPFL2W1feYeaU43Y5z/TxnCuYabMEuC043ckdBp4pZ7f8FE5psOI1g6fwAAAAASUVORK5CYII="}),mounted(){document.body.appendChild(this.$el),document.addEventListener("mousemove",this.onRangeMouseMove,!1),document.addEventListener("mouseup",this.onRangeMouseUp,!1),document.addEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.addEventListener("touchend",this.onRangeMouseUp,!1),this.show&&(document.body.classList.add("vue-puzzle-overflow"),this.reset())},beforeDestroy(){clearTimeout(this.timer1),document.body.removeChild(this.$el),document.removeEventListener("mousemove",this.onRangeMouseMove,!1),document.removeEventListener("mouseup",this.onRangeMouseUp,!1),document.removeEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onRangeMouseUp,!1)},watch:{show(t){t?(document.body.classList.add("vue-puzzle-overflow"),this.reset()):(this.isSubmting=!1,this.isSuccess=!1,this.infoBoxShow=!1,document.body.classList.remove("vue-puzzle-overflow"))}},computed:{styleWidth(){var t=this.startWidth+this.newX-this.startX;return t<this.sliderBaseSize?this.sliderBaseSize:t>this.canvasWidth?this.canvasWidth:t},puzzleBaseSize(){return Math.round(52.5*Math.max(Math.min(this.puzzleScale,2),.2)+6)},sliderBaseSize(){return Math.max(Math.min(Math.round(this.sliderSize),Math.round(.5*this.canvasWidth)),10)}},methods:{onClose(){this.mouseDown||(clearTimeout(this.timer1),this.$emit("close"))},onCloseMouseDown(){this.closeDown=!0},onCloseMouseUp(){this.closeDown&&this.onClose(),this.closeDown=!1},onRangeMouseDown(t){this.isCanSlide&&(this.mouseDown=!0,this.startWidth=this.$refs["range-slider"].clientWidth,this.newX=t.clientX||t.changedTouches[0].clientX,this.startX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseMove(t){this.mouseDown&&(t.preventDefault(),this.newX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseUp(){this.mouseDown&&(this.mouseDown=!1,this.submit())},init(t){if(!this.loading||t){this.loading=!0,this.isCanSlide=!1;const e=this.$refs.canvas1,n=this.$refs.canvas2,i=this.$refs.canvas3,a=e.getContext("2d"),s=n.getContext("2d"),o=i.getContext("2d"),r=0<=navigator.userAgent.indexOf("Firefox")&&0<=navigator.userAgent.indexOf("Windows"),c=document.createElement("img");if(a.fillStyle="rgba(255,255,255,1)",o.fillStyle="rgba(255,255,255,1)",a.clearRect(0,0,this.canvasWidth,this.canvasHeight),s.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.pinX=this.getRandom(this.puzzleBaseSize,this.canvasWidth-this.puzzleBaseSize-20),this.pinY=this.getRandom(20,this.canvasHeight-this.puzzleBaseSize-20),c.crossOrigin="anonymous",c.onload=()=>{var[t,e,n,i]=this.makeImgSize(c),h=(a.save(),this.paintBrick(a),a.closePath(),r?(a.clip(),a.save(),a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.restore()):(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.clip()),a.drawImage(c,t,e,n,i),o.fillRect(0,0,this.canvasWidth,this.canvasHeight),o.drawImage(c,t,e,n,i),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.closePath(),a.shadowColor="rgba(255, 255, 255, .8)",a.shadowOffsetX=-1,a.shadowOffsetY=-1,a.shadowBlur=Math.min(Math.ceil(8*this.puzzleScale),12),a.fillStyle="#ffffaa",a.fill(),a.getImageData(this.pinX-3,this.pinY-20,this.pinX+this.puzzleBaseSize+5,this.pinY+this.puzzleBaseSize+5));s.putImageData(h,0,this.pinY-20),a.restore(),a.clearRect(0,0,this.canvasWidth,this.canvasHeight),a.save(),this.paintBrick(a),a.globalAlpha=.8,a.fillStyle="#ffffff",a.fill(),a.restore(),a.save(),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.shadowColor="#000",a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=16,a.fill(),a.restore(),a.save(),a.globalCompositeOperation="destination-over",a.drawImage(c,t,e,n,i),a.restore(),this.loading=!1,this.isCanSlide=!0},c.onerror=()=>{this.init(!0)},!t&&this.imgs&&this.imgs.length){let t=this.getRandom(0,this.imgs.length-1);t===this.imgIndex&&(t===this.imgs.length-1?t=0:t++),this.imgIndex=t,c.src=this.imgs[t]}else c.src=this.makeImgWithCanvas()}},getRandom:(t,e)=>Math.ceil(Math.random()*(e-t)+t),makeImgSize(t){t=t.width/t.height;let e=0,n=0,i=0,a=0;return t>this.canvasWidth/this.canvasHeight?(a=this.canvasHeight,i=t*a,n=0,e=(this.canvasWidth-i)/2):(i=this.canvasWidth,a=i/t,e=0,n=(this.canvasHeight-a)/2),[e,n,i,a]},paintBrick(t){var e=Math.ceil(15*this.puzzleScale);t.beginPath(),t.moveTo(this.pinX,this.pinY),t.lineTo(this.pinX+e,this.pinY),t.arcTo(this.pinX+e,this.pinY-e/2,this.pinX+e+e/2,this.pinY-e/2,e/2),t.arcTo(this.pinX+e+e,this.pinY-e/2,this.pinX+e+e,this.pinY,e/2),t.lineTo(this.pinX+e+e+e,this.pinY),t.lineTo(this.pinX+e+e+e,this.pinY+e),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e,this.pinX+e+e+e+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e+e,this.pinX+e+e+e,this.pinY+e+e,e/2),t.lineTo(this.pinX+e+e+e,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e),t.arcTo(this.pinX+e/2,this.pinY+e+e,this.pinX+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e/2,this.pinY+e,this.pinX,this.pinY+e,e/2),t.lineTo(this.pinX,this.pinY)},makeImgWithCanvas(){const t=document.createElement("canvas"),e=t.getContext("2d");t.width=this.canvasWidth,t.height=this.canvasHeight,e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.fillRect(0,0,this.canvasWidth,this.canvasHeight);for(let i=0;i<12;i++){var n;e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.strokeStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,1<this.getRandom(0,2)?(e.save(),e.rotate(this.getRandom(-90,90)*Math.PI/180),e.fillRect(this.getRandom(-20,t.width-20),this.getRandom(-20,t.height-20),this.getRandom(10,t.width/2+10),this.getRandom(10,t.height/2+10)),e.restore()):(e.beginPath(),n=this.getRandom(-Math.PI,Math.PI),e.arc(this.getRandom(0,t.width),this.getRandom(0,t.height),this.getRandom(10,t.height/2+10),n,n+1.5*Math.PI),e.closePath(),e.fill())}return t.toDataURL("image/png")},submit(){this.isSubmting=!0;const t=Math.abs(this.pinX-(this.styleWidth-this.sliderBaseSize)+(this.puzzleBaseSize-this.sliderBaseSize)*((this.styleWidth-this.sliderBaseSize)/(this.canvasWidth-this.sliderBaseSize))-3);t<this.range?(this.infoText=this.successText,this.infoBoxFail=!1,this.infoBoxShow=!0,this.isCanSlide=!1,this.isSuccess=!0,clearTimeout(this.timer1),this.timer1=setTimeout(()=>{this.isSubmting=!1,this.$emit("success",t)},800)):(this.infoText=this.failText,this.infoBoxFail=!0,this.infoBoxShow=!0,this.isCanSlide=!1,this.$emit("fail",t),clearTimeout(this.timer1),this.timer1=setTimeout(()=>{this.isSubmting=!1,this.reset()},800))},resetState(){this.infoBoxFail=!1,this.infoBoxShow=!1,this.isCanSlide=!1,this.isSuccess=!1,this.startWidth=this.sliderBaseSize,this.startX=0,this.newX=0},reset(){this.isSubmting||(this.resetState(),this.init())}}},a=n(379),s=(a=n.n(a),n(795)),o=(s=n.n(s),n(569)),r=(o=n.n(o),n(565)),c=(r=n.n(r),n(216)),h=(c=n.n(c),n(589)),l=(h=n.n(h),n(358)),d={},u=(s=(d.styleTagTransform=h(),d.setAttributes=r(),d.insert=o().bind(null,"head"),d.domAPI=s(),d.insertStyleElement=c(),a()(l.Z,d),l.Z&&l.Z.locals&&l.Z.locals,h=t,(o="function"==typeof(r=e)?r.options:r).render=h,o.staticRenderFns=[function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"loading-gif_"},[e("span"),t._v(" "),e("span"),t._v(" "),e("span"),t._v(" "),e("span"),t._v(" "),e("span")])}],o._compiled=!0,{exports:r,options:o}),s.options.__file="src/app.vue",s.exports)}(),i}()},"2c3e":function(t,e,n){var i=n("da84"),a=n("83ab"),s=n("9f7f").MISSED_STICKY,o=n("c6b6"),r=n("edd0"),c=n("69f3").get,h=RegExp.prototype,l=i.TypeError;a&&s&&r(h,"sticky",{configurable:!0,get:function(){if(this!==h){if("RegExp"===o(this))return!!c(this).sticky;throw l("Incompatible receiver, RegExp required")}}})},"4d63":function(t,e,n){var i=n("83ab"),a=n("da84"),s=n("e330"),o=n("94ca"),r=n("7156"),c=n("9112"),h=n("241c").f,l=n("3a9b"),d=n("44e7"),u=n("577e"),p=n("90d8"),g=n("9f7f"),f=n("aeb0"),v=n("cb2d"),b=n("d039"),m=n("1a2d"),x=n("69f3").enforce,w=n("2626"),y=n("b622"),_=n("fce3"),C=n("107c"),z=y("match"),S=a.RegExp,k=S.prototype,T=a.SyntaxError,M=s(k.exec),R=s("".charAt),B=s("".replace),X=s("".indexOf),P=s("".slice),Y=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,E=/a/g,I=/a/g,A=(n=new S(E)!==E,g.MISSED_STICKY),O=g.UNSUPPORTED_Y;y=i&&(!n||A||_||C||b((function(){return I[z]=!1,S(E)!=E||S(I)==I||"/a/i"!=S(E,"i")})));if(o("RegExp",y)){function D(t,e){var n,i,a=l(k,this),s=d(t),o=void 0===e,h=[],g=t;if(!a&&s&&o&&t.constructor===D)return t;if((s||l(k,t))&&(t=t.source,o&&(e=p(g))),t=void 0===t?"":u(t),e=void 0===e?"":u(e),g=t,s=e=_&&"dotAll"in E&&(n=!!e&&-1<X(e,"s"))?B(e,/s/g,""):e,A&&"sticky"in E&&(i=!!e&&-1<X(e,"y"))&&O&&(e=B(e,/y/g,"")),C&&(t=(o=function(t){for(var e,n=t.length,i=0,a="",s=[],o={},r=!1,c=!1,h=0,l="";i<=n;i++){if("\\"===(e=R(t,i)))e+=R(t,++i);else if("]"===e)r=!1;else if(!r)switch(!0){case"["===e:r=!0;break;case"("===e:M(Y,P(t,i+1))&&(i+=2,c=!0),a+=e,h++;continue;case">"===e&&c:if(""===l||m(o,l))throw new T("Invalid capture group name");o[l]=!0,c=!(s[s.length]=[l,h]),l="";continue}c?l+=e:a+=e}return[a,s]}(t))[0],h=o[1]),o=r(S(t,e),a?this:k,D),(n||i||h.length)&&(e=x(o),n&&(e.dotAll=!0,e.raw=D(function(t){for(var e,n=t.length,i=0,a="",s=!1;i<=n;i++)"\\"===(e=R(t,i))?a+=e+R(t,++i):s||"."!==e?("["===e?s=!0:"]"===e&&(s=!1),a+=e):a+="[\\s\\S]";return a}(t),s)),i&&(e.sticky=!0),h.length&&(e.groups=h)),t!==g)try{c(o,"source",""===g?"(?:)":g)}catch(t){}return o}for(var W=h(S),H=0;W.length>H;)f(D,S,W[H++]);(k.constructor=D).prototype=k,v(a,"RegExp",D,{constructor:!0})}w("RegExp")},"61f7":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return h}));var i=n("fc11"),a=n("f3f3");function s(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n,i,a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(n in a)new RegExp("(".concat(n,")")).test(e)&&(i=a[n]+"",e=e.replace(RegExp.$1,1===RegExp.$1.length?i:("00"+i).substr(i.length)));return e}n("ac1f"),n("00b4"),n("5319"),n("4d63"),n("c607"),n("2c3e"),n("25f0"),n("498a"),n("d3b7"),n("b64b"),n("99af");var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function r(t,e){t.message=function(t){return e.replace("%s",t||"")}}function c(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)({required:!0,message:t,type:"string"},e)}function h(t){return l.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}r(c,"请输入%s"),r(h,"%s格式不正确");var l=Object.keys(o).reduce((function(t,e){return t[e]=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(i.a)({},e,t);return Object(a.a)(Object(a.a)({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),s)},r(t[e],o[e]),t}),{})},"8fe4b":function(t,e,n){},c2b5:function(t,e,n){"use strict";n.r(e);var i=n("f3f3"),a=(n("ac1f"),n("1276"),n("5319"),n("b0e7")),s=n("8593"),o=n("2f62"),r=n("61f7"),c=(n("d044"),n("1069"));c=n.n(c),i={name:"system_auth",computed:Object(i.a)(Object(i.a)(Object(i.a)({},Object(o.e)("admin/layout",["isMobile"])),Object(o.e)("admin/userLevel",["categoryId"])),{},{labelWidth:function(){return this.isMobile?void 0:85},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{baseUrl:"https://shop.crmeb.net/html/index.html",iframeUrl:"",captchs:"http://authorize.crmeb.net/api/captchs/",authCode:"",status:1,dayNum:0,copyright:"",isTemplate:!1,price:"",proPrice:"",productStatus:!1,copyrightText:"",success:!1,payType:"",disabled:!1,isShow:!1,active:0,timer:null,version:"",label:"",productType:"",modalPic:!1,isChoice:"单选",authorizedPicture:"",gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8}}},filters:{formatDate:function(t){if(0!==t)return t=new Date(1e3*t),Object(r.a)(t,"yyyy-MM-dd hh:mm")}},components:{Vcode:c.a,uploadPictures:a.a},mounted:function(){var t=this;this.getAuth(),this.getVersion(),window.addEventListener("message",(function(e){"onCancel"===e.data.event&&t.cancel()}))},methods:{getVersion:function(){var t=this;Object(s.B)().then((function(e){t.version=e.data.version,t.label=e.data.label}))},getCrmebCopyRight:function(){var t=this;Object(s.y)().then((function(e){return t.getAuth(),t.$Message.success(e.msg)}))},saveCopyRight:function(){var t=this;Object(s.U)({copyright:this.copyrightText,copyright_img:this.authorizedPicture}).then((function(e){return t.$Message.success(e.msg)}))},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.authorizedPicture=t.att_dir,this.modalPic=!1},getCopyRight:function(){var t=this;Object(s.y)().then((function(e){t.copyrightText=e.data.copyrightContext||"",t.authorizedPicture=e.data.copyrightImage||""}))},cancel:function(){"copyright"===this.productType?this.getCrmebCopyRight():this.getAuth(),this.iframeUrl="",this.isTemplate=!1},loginTabSwitch:function(t){this.active=t},getAuth:function(){var t=this;Object(s.a)().then((function(e){e=e.data||{},t.authCode=e.authCode||"",t.status=void 0===e.status?-1:e.status,t.dayNum=e.day||0,t.copyright=e.copyright,t.copyright&&t.getCopyRight()})).catch((function(e){t.$Message.error(e.msg)}))},toCrmeb:function(){window.open("http://www.crmeb.com")},getProduct:function(){var t=this;Object(s.p)({type:"copyright"}).then((function(e){t.price=e.data.attr.price,t.productStatus=!0})).catch((function(e){t.$Message.error(e.msg)})),Object(s.p)({type:"pro"}).then((function(e){t.proPrice=e.data.attr.price})).catch((function(e){t.$Message.error(e.msg)}))},payment:function(t){this.productType=t;var e=location.host,n=e.split(".");"test"===n[0]&&4===n.length?e=e.replace("test.",""):"www"===n[0]&&3===n.length&&(e=e.replace("www.","")),this.iframeUrl=this.baseUrl+"?url="+e+"&product="+t+"&version="+this.version+"&label="+this.label,this.isTemplate=!0},onClose:function(){this.isShow=!1}},destroyed:function(){}},n("0b3b"),o=n("2877"),c=Object(o.a)(i,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("Icon",{staticClass:"iconIos blue",attrs:{type:"ios-bulb-outline"}}),1===t.status?e("div",{staticClass:"text"},[e("div",[t._v("商业授权")]),e("div",{staticClass:"code"},[t._v("授权码:"+t._s(t.authCode))])]):e("div",{staticClass:"text"},[e("div",[t._v("商业授权")]),e("div",{staticClass:"code"},[t._v("未授权")])])],1),e("div",[1===t.status?e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.toCrmeb()}}},[t._v("进入官网")]):t._e(),1!==t.status?e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.payment("bz")}}},[t._v("购买授权")]):t._e()],1)])]),t.copyright||1!=t.status?t._e():e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"iconfont iconbanquan iconIos blue"}),e("div",{staticClass:"text"},[e("div",[t._v("去版权服务")]),e("div",{staticClass:"code"},[t._v("购买之后可以设置")]),t.productStatus?e("div",{staticClass:"pro_price"},[t._v("¥"+t._s(t.price))]):t._e()])]),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.payment("copyright")}}},[t._v("立即购买")])],1)]),t.copyright?e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"iconfont iconbanquan iconIos blue"}),e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"update"},[t._v("修改授权信息:")]),e("Input",{staticStyle:{width:"460px"},model:{value:t.copyrightText,callback:function(e){t.copyrightText=e},expression:"copyrightText"}})],1)]),e("Button",{attrs:{type:"primary"},on:{click:t.saveCopyRight}},[t._v("保存")])],1),e("div",{staticClass:"authorized"},[e("div",[e("span",{staticClass:"update"},[t._v("上传授权图片:")])]),t.authorizedPicture?e("div",{staticClass:"uploadPictrue",on:{click:function(e){return t.modalPicTap("单选")}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.authorizedPicture,expression:"authorizedPicture"}]})]):e("div",{staticClass:"upload",on:{click:function(e){return t.modalPicTap("单选")}}},[e("div",{staticClass:"iconfont"},[t._v("+")])])]),e("span",{staticClass:"prompt"},[t._v("建议尺寸宽290px*高100px")])]):t._e(),e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"商业授权","z-index":1,width:"447"},on:{"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[e("iframe",{attrs:{width:"100%",height:"580",src:t.iframeUrl,frameborder:"0"}})]),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传授权图片","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1)],1)}),[],!1,null,"25188615",null);e.default=c.exports},c607:function(t,e,n){var i=n("da84"),a=n("83ab"),s=n("fce3"),o=n("c6b6"),r=n("edd0"),c=n("69f3").get,h=RegExp.prototype,l=i.TypeError;a&&s&&r(h,"dotAll",{configurable:!0,get:function(){if(this!==h){if("RegExp"===o(this))return!!c(this).dotAll;throw l("Incompatible receiver, RegExp required")}}})},edd0:function(t,e,n){var i=n("13d2"),a=n("9bf2");t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),a.f(t,e,n)}}}]);