require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/activity/liveRoom/components/verifyCode"],{2341:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=(t._self._c,t.cursorVisible&&"middle"!==t.type?t.code.length:null),n=t.__map(t.itemSize,(function(e,i){var n=t.__get_orig(e),o=t.code.length===i&&t.cursorVisible,r=t._f("codeFormat")(t.code[i],t.isPassword);return{$orig:n,g1:o,f0:r}}));t.$mp.data=Object.assign({},{$root:{g0:i,l0:n}})},o=[]},"3faa":function(t,e,i){"use strict";var n=i("de43"),o=i.n(n);o.a},"70c6":function(t,e,i){"use strict";i.r(e);var n=i("2341"),o=i("c789");for(var r in o)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("3faa");var u=i("828b"),s=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=s.exports},"890f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("2d2f"),o={name:"verifyCode",props:{value:{type:String,default:function(){return""}},type:{type:String,default:function(){return"box"}},inputType:{type:String,default:function(){return"number"}},size:{type:Number,default:function(){return 6}},isFocus:{type:Boolean,default:function(){return!0}},isPassword:{type:Boolean,default:function(){return!1}},cursorColor:{type:String,default:function(){return"#cccccc"}},boxNormalColor:{type:String,default:function(){return"#f5f5f5"}},boxActiveColor:{type:String,default:function(){return"#f5f5f5"}},color:{type:String,default:function(){return"#333333"}}},model:{prop:"value",event:"input"},data:function(){return{cursorVisible:!1,cursorHeight:35,code:"",codeCursorLeft:[],itemSize:6,getElement:(0,n.getElementRect)(this),isPatch:!1}},created:function(){this.cursorVisible=this.isFocus,this.validatorSize()},mounted:function(){this.refreshLayout()},methods:{validatorSize:function(){if(!(this.size>0))throw"methods of 'size' is integer";this.itemSize=Math.floor(this.size)},init:function(){this.getCodeCursorLeft(),this.setCursorHeight()},refreshLayout:function(){var t=this;this.$nextTick((function(){t.init(),setTimeout((function(){t.init()}),80),setTimeout((function(){t.init()}),250)}))},setCursorHeight:function(){var t=this;this.getElement(".xt__box","single",(function(e){t.cursorHeight=.6*e.height}))},getCodeCursorLeft:function(){var t=this;this.getElement("#xt__input-ground","single",(function(e){if(e){var i=e.left;t.getElement(".xt__box","array",(function(e){t.codeCursorLeft=[],(e||[]).forEach((function(e){t.codeCursorLeft.push(e.left-i+e.width/2)}))}))}}))},onInput:function(t){var e=t.detail,i=e.value;e.keyCode;this.cursorVisible=i.length<this.itemSize,this.code=i,this.$emit("input",i),this.inputSuccess(i)},inputSuccess:function(t){t.length!==this.itemSize||this.isPatch?this.isPatch=!1:this.$emit("confirm",t)},inputFocus:function(){this.refreshLayout(),this.cursorVisible=this.code.length<this.itemSize},inputBlur:function(){this.cursorVisible=!1}},watch:{value:function(t){t!==this.code&&(this.code=t)},itemSize:function(){var t=this;this.$nextTick((function(){t.refreshLayout()}))}},filters:{codeFormat:function(t,e){return t?e?"*":t:""}}};e.default=o},c789:function(t,e,i){"use strict";i.r(e);var n=i("890f"),o=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a},de43:function(t,e,i){}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'pages/activity/liveRoom/components/verifyCode-create-component',
    {
        'pages/activity/liveRoom/components/verifyCode-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("70c6"))
        })
    },
    [['pages/activity/liveRoom/components/verifyCode-create-component']]
]);
