text: !function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("VueNumber",[],e):"object"==typeof exports?exports.VueNumber=e():n.VueNumber=e()}(this,function(){return function(n){function e(l){if(t[l])return t[l].exports;var i=t[l]={i:l,l:!1,exports:{}};return n[l].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var t={};return e.m=n,e.c=t,e.d=function(n,t,l){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:l})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="/dist/",e(e.s=0)}([function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.plugin=e.component=void 0;var l=function(){var n="D:\\project\\vue-number\\src\\index.js",e="057b9ceaf8c8d2c60f8b2d1c137ef6f17520ab2f",t=new Function("return this")(),l="__coverage__",i={path:"D:\\project\\vue-number\\src\\index.js",statementMap:{0:{start:{line:3,column:15},end:{line:7,column:1}},1:{start:{line:5,column:4},end:{line:5,column:42}},2:{start:{line:9,column:0},end:{line:11,column:1}},3:{start:{line:10,column:4},end:{line:10,column:30}},4:{start:{line:13,column:0},end:{line:13,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:11},end:{line:4,column:12}},loc:{start:{line:4,column:18},end:{line:6,column:3}},line:4}},branchMap:{0:{loc:{start:{line:9,column:0},end:{line:11,column:1}},type:"if",locations:[{start:{line:9,column:0},end:{line:11,column:1}},{start:{line:9,column:0},end:{line:11,column:1}}],line:9},1:{loc:{start:{line:9,column:4},end:{line:9,column:47}},type:"binary-expr",locations:[{start:{line:9,column:4},end:{line:9,column:33}},{start:{line:9,column:37},end:{line:9,column:47}}],line:9}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},o=t[l]||(t[l]={});return o[n]&&o[n].hash===e?o[n]:(i.hash=e,o[n]=i)}(),i=t(1),o=function(n){return n&&n.__esModule?n:{default:n}}(i),r=(l.s[0]++,{install:function(n){l.f[0]++,l.s[1]++,n.component("vue-number",o.default)}});l.s[2]++,l.b[1][0]++,"undefined"!=typeof window&&(l.b[1][1]++,window.Vue)?(l.b[0][0]++,l.s[3]++,window.Vue.use(o.default)):l.b[0][1]++,l.s[4]++,o.default.install=r.install,e.default=o.default,e.component=o.default,e.plugin=r},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=t(3),i=t.n(l),o=t(5),r=t(2),u=r(i.a,o.a,null,null,null);e.default=u.exports},function(n,e){n.exports=function(n,e,t,l,i){var o,r=n=n||{},u=typeof n.default;"object"!==u&&"function"!==u||(o=n,r=n.default);var c="function"==typeof r?r.options:r;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns),l&&(c._scopeId=l);var a;if(i?(a=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),t&&t.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(i)},c._ssrRegister=a):t&&(a=t),a){var s=c.functional,m=s?c.render:c.beforeCreate;s?c.render=function(n,e){return a.call(e),m(n,e)}:c.beforeCreate=m?[].concat(m,a):[a]}return{esModule:o,exports:r,options:c}}},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=function(){var n="D:\\project\\vue-number\\src\\vue-number.vue",e="3c322594174504dc30ecccc50bc27ed3af24257a",t=new Function("return this")(),l="__coverage__",i={path:"D:\\project\\vue-number\\src\\vue-number.vue",statementMap:{0:{start:{line:119,column:15},end:{line:125,column:3}},1:{start:{line:134,column:6},end:{line:134,column:73}},2:{start:{line:145,column:6},end:{line:148,column:7}},3:{start:{line:146,column:8},end:{line:146,column:48}},4:{start:{line:146,column:36},end:{line:146,column:48}},5:{start:{line:147,column:8},end:{line:147,column:19}},6:{start:{line:149,column:6},end:{line:149,column:18}},7:{start:{line:158,column:6},end:{line:161,column:7}},8:{start:{line:159,column:8},end:{line:159,column:48}},9:{start:{line:159,column:36},end:{line:159,column:48}},10:{start:{line:160,column:8},end:{line:160,column:19}},11:{start:{line:162,column:6},end:{line:162,column:18}},12:{start:{line:169,column:6},end:{line:169,column:38}},13:{start:{line:175,column:6},end:{line:175,column:27}},14:{start:{line:176,column:6},end:{line:176,column:39}},15:{start:{line:177,column:6},end:{line:177,column:51}},16:{start:{line:183,column:6},end:{line:183,column:41}},17:{start:{line:184,column:6},end:{line:184,column:38}},18:{start:{line:185,column:6},end:{line:185,column:26}},19:{start:{line:188,column:6},end:{line:190,column:7}},20:{start:{line:189,column:8},end:{line:189,column:38}},21:{start:{line:191,column:6},end:{line:191,column:41}},22:{start:{line:194,column:6},end:{line:196,column:7}},23:{start:{line:195,column:8},end:{line:195,column:15}},24:{start:{line:197,column:6},end:{line:197,column:41}},25:{start:{line:198,column:6},end:{line:198,column:33}},26:{start:{line:201,column:19},end:{line:205,column:8}},27:{start:{line:206,column:6},end:{line:206,column:20}},28:{start:{line:218,column:6},end:{line:222,column:7}},29:{start:{line:219,column:8},end:{line:221,column:10}},30:{start:{line:220,column:10},end:{line:220,column:60}},31:{start:{line:226,column:22},end:{line:226,column:93}},32:{start:{line:227,column:6},end:{line:237,column:7}},33:{start:{line:228,column:8},end:{line:236,column:9}},34:{start:{line:229,column:10},end:{line:229,column:32}},35:{start:{line:230,column:10},end:{line:232,column:13}},36:{start:{line:231,column:12},end:{line:231,column:37}},37:{start:{line:234,column:10},end:{line:234,column:30}},38:{start:{line:235,column:10},end:{line:235,column:45}},39:{start:{line:241,column:6},end:{line:243,column:7}},40:{start:{line:242,column:8},end:{line:242,column:29}},41:{start:{line:248,column:4},end:{line:248,column:82}},42:{start:{line:249,column:4},end:{line:249,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:119,column:8},end:{line:119,column:9}},loc:{start:{line:119,column:15},end:{line:125,column:3}},line:119},1:{name:"(anonymous_1)",decl:{start:{line:219,column:23},end:{line:219,column:24}},loc:{start:{line:219,column:29},end:{line:221,column:9}},line:219},2:{name:"(anonymous_2)",decl:{start:{line:230,column:25},end:{line:230,column:26}},loc:{start:{line:230,column:31},end:{line:232,column:11}},line:230}},branchMap:{0:{loc:{start:{line:134,column:13},end:{line:134,column:73}},type:"cond-expr",locations:[{start:{line:134,column:56},end:{line:134,column:63}},{start:{line:134,column:66},end:{line:134,column:73}}],line:134},1:{loc:{start:{line:145,column:6},end:{line:148,column:7}},type:"if",locations:[{start:{line:145,column:6},end:{line:148,column:7}},{start:{line:145,column:6},end:{line:148,column:7}}],line:145},2:{loc:{start:{line:146,column:8},end:{line:146,column:48}},type:"if",locations:[{start:{line:146,column:8},end:{line:146,column:48}},{start:{line:146,column:8},end:{line:146,column:48}}],line:146},3:{loc:{start:{line:158,column:6},end:{line:161,column:7}},type:"if",locations:[{start:{line:158,column:6},end:{line:161,column:7}},{start:{line:158,column:6},end:{line:161,column:7}}],line:158},4:{loc:{start:{line:159,column:8},end:{line:159,column:48}},type:"if",locations:[{start:{line:159,column:8},end:{line:159,column:48}},{start:{line:159,column:8},end:{line:159,column:48}}],line:159},5:{loc:{start:{line:188,column:6},end:{line:190,column:7}},type:"if",locations:[{start:{line:188,column:6},end:{line:190,column:7}},{start:{line:188,column:6},end:{line:190,column:7}}],line:188},6:{loc:{start:{line:194,column:6},end:{line:196,column:7}},type:"if",locations:[{start:{line:194,column:6},end:{line:196,column:7}},{start:{line:194,column:6},end:{line:196,column:7}}],line:194},7:{loc:{start:{line:218,column:6},end:{line:222,column:7}},type:"if",locations:[{start:{line:218,column:6},end:{line:222,column:7}},{start:{line:218,column:6},end:{line:222,column:7}}],line:218},8:{loc:{start:{line:218,column:10},end:{line:218,column:42}},type:"binary-expr",locations:[{start:{line:218,column:10},end:{line:218,column:26}},{start:{line:218,column:30},end:{line:218,column:42}}],line:218},9:{loc:{start:{line:227,column:6},end:{line:237,column:7}},type:"if",locations:[{start:{line:227,column:6},end:{line:237,column:7}},{start:{line:227,column:6},end:{line:237,column:7}}],line:227},10:{loc:{start:{line:228,column:8},end:{line:236,column:9}},type:"if",locations:[{start:{line:228,column:8},end:{line:236,column:9}},{start:{line:228,column:8},end:{line:236,column:9}}],line:228},11:{loc:{start:{line:228,column:12},end:{line:228,column:89}},type:"binary-expr",locations:[{start:{line:228,column:12},end:{line:228,column:32}},{start:{line:228,column:37},end:{line:228,column:44}},{start:{line:228,column:48},end:{line:228,column:63}},{start:{line:228,column:67},end:{line:228,column:71}},{start:{line:228,column:75},end:{line:228,column:88}}],line:228},12:{loc:{start:{line:241,column:6},end:{line:243,column:7}},type:"if",locations:[{start:{line:241,column:6},end:{line:243,column:7}},{start:{line:241,column:6},end:{line:243,column:7}}],line:241}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0,0,0,0],12:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},o=t[l]||(t[l]={});return o[n]&&o[n].hash===e?o[n]:(i.hash=e,o[n]=i)}(),i=t(4),o=function(n){return n&&n.__esModule?n:{default:n}}(i);e.default={name:"vue-number",props:{currency:{default:"",required:!1,type:String},max:{required:!1,type:[Number,String]},min:{default:0,required:!1,type:[Number,String]},minus:{default:!1,required:!1,type:Boolean},placeholder:{required:!1,type:String},integral:{default:9,required:!1,type:[Number,String]},precision:{default:2,required:!1,type:[Number,String]},value:{required:!0,type:[Number,String]},readOnly:{default:!1,required:!1,type:Boolean},readOnlyClass:{default:"",required:!1,type:String},currencySymbolPosition:{default:"prefix",required:!1,type:String}},data:function(){return l.f[0]++,l.s[0]++,{amount:"",inputValue:"",inputNaN:!1,rawValue:"",editing:!1}},computed:{formatString:function(){return l.s[1]++,"suffix"===this.currencySymbolPosition?(l.b[0][0]++,"%v %s"):(l.b[0][1]++,"%s %v")}},methods:{checkMaxValue:function(n){return l.s[2]++,this.max?(l.b[1][0]++,l.s[3]++,n<=this.maxValue?(l.b[2][0]++,l.s[4]++,!1):(l.b[2][1]++,l.s[5]++,!0)):(l.b[1][1]++,l.s[6]++,!1)},checkMinValue:function(n){return l.s[7]++,this.min?(l.b[3][0]++,l.s[8]++,n>=this.minValue?(l.b[4][0]++,l.s[9]++,!1):(l.b[4][1]++,l.s[10]++,!0)):(l.b[3][1]++,l.s[11]++,!1)},onTextInput:function(n){l.s[12]++,this.inputNaN=isNaN(n.data)},onBlur:function(){l.s[13]++,this.editing=!1,l.s[14]++,this.$refs.numeric.type="text",l.s[15]++,this.inputValue=this.format(this.rawValue)},onFocus:function(){l.s[16]++,this.$refs.numeric.type="number",l.s[17]++,this.inputValue=this.rawValue,l.s[18]++,this.editing=!0},onInput:function(n){l.s[19]++,""===n.target.value?(l.b[5][0]++,l.s[20]++,this.$refs.numeric.value=""):l.b[5][1]++,l.s[21]++,this.inputValue=n.target.value},update:function(n){if(l.s[22]++,isNaN(n))return l.b[6][0]++,void l.s[23]++;l.b[6][1]++,l.s[24]++,this.inputValue=this.format(n),l.s[25]++,this.rawValue=this.value},format:function(n){var e=(l.s[26]++,o.default.formatMoney(n,{symbol:this.currency,format:this.formatString,precision:Number(this.precision)}));return l.s[27]++,e}},watch:{readOnly:function(n,e){var t=this;l.s[28]++,l.b[8][0]++,!1===e&&(l.b[8][1]++,!0===n)?(l.b[7][0]++,l.s[29]++,this.$nextTick(function(){l.f[1]++,l.s[30]++,t.$refs.readOnly.className=t.readOnlyClass})):l.b[7][1]++},inputValue:function(n,e){var t=this,i=(l.s[31]++,new RegExp("^-?\\d{0,"+this.integral+"}(\\.\\d{0,"+this.precision+"})?$"));l.s[32]++,this.editing?(l.b[9][0]++,l.s[33]++,l.b[11][0]++,i.test(n)&&(l.b[11][1]++,!+e||(l.b[11][2]++,isNaN(+e))||(l.b[11][3]++,n)||(l.b[11][4]++,!this.inputNaN))?(l.b[10][1]++,l.s[37]++,this.rawValue=n,l.s[38]++,this.$emit("input",this.rawValue)):(l.b[10][0]++,l.s[34]++,this.inputNaN=!1,l.s[35]++,this.$nextTick(function(){l.f[2]++,l.s[36]++,t.inputValue=e}))):l.b[9][1]++},value:function(n){l.s[39]++,""===n?(l.b[12][0]++,l.s[40]++,this.inputValue=""):l.b[12][1]++}},mounted:function(){l.s[41]++,this.$refs.numeric.addEventListener("textInput",this.onTextInput.bind(this)),l.s[42]++,this.update(parseInt(this.value.replace(/,/g,"")))}}},function(n,e,t){!function(n,t){t(e)}(0,function(n){"use strict";function e(n,e){return e={exports:{}},n(e,e.exports),e.exports}function t(n){var e=arguments.length<=1||void 0===arguments[1]?s.decimal:arguments[1],l=arguments.length<=2||void 0===arguments[2]?s.fallback:arguments[2];if(Array.isArray(n))return n.map(function(n){return t(n,e,l)});if("number"==typeof n)return n;var i=new RegExp("[^0-9-(-)-"+e+"]",["g"]),o=(""+n).replace(i,"").replace(e,".").replace(/\(([-]*\d*[^)]?\d+)\)/g,"-$1").replace(/\((.*)\)/,""),r=(o.match(/-/g)||2).length%2,u=parseFloat(o.replace(/-/g,"")),c=u*(r?-1:1);return isNaN(c)?l:c}function l(n,e){return n=Math.round(Math.abs(n)),isNaN(n)?e:n}function i(n,e){e=l(e,s.precision);var t=Math.pow(10,e);return(Math.round((n+1e-8)*t)/t).toFixed(e)}function o(n,e){var t=n.split(e),l=t[0],i=t[1].replace(/0+$/,"");return i.length>0?l+e+i:l}function r(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(Array.isArray(n))return n.map(function(n){return r(n,e)});e=d({},s,e);var t=n<0?"-":"",l=parseInt(i(Math.abs(n),e.precision),10)+"",u=l.length>3?l.length%3:0,c=t+(u?l.substr(0,u)+e.thousand:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+e.thousand)+(e.precision>0?e.decimal+i(Math.abs(n),e.precision).split(".")[1]:"");return e.stripZeros?o(c,e.decimal):c}function u(n){return p(n)&&n.match("%v")?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:n}function c(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(Array.isArray(n))return n.map(function(n){return c(n,e)});e=d({},s,e);var t=u(e.format),l=void 0;return l=n>0?t.pos:n<0?t.neg:t.zero,l.replace("%s",e.symbol).replace("%v",r(Math.abs(n),e))}function a(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!n)return[];e=d({},s,e);var l=u(e.format),i=l.pos.indexOf("%s")<l.pos.indexOf("%v"),o=0;return n.map(function(n){if(Array.isArray(n))return a(n,e);n=t(n,e.decimal);var i=void 0;i=n>0?l.pos:n<0?l.neg:l.zero;var u=i.replace("%s",e.symbol).replace("%v",r(Math.abs(n),e));return u.length>o&&(o=u.length),u}).map(function(n){return p(n)&&n.length<o?i?n.replace(e.symbol,e.symbol+new Array(o-n.length+1).join(" ")):new Array(o-n.length+1).join(" ")+n:n})}var s={symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3,stripZeros:!1,fallback:0},m=e(function(n){function e(n){if(null===n||void 0===n)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}var t=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;n.exports=Object.assign||function(n,i){for(var o,r,u=e(n),c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var a in o)t.call(o,a)&&(u[a]=o[a]);if(Object.getOwnPropertySymbols){r=Object.getOwnPropertySymbols(o);for(var s=0;s<r.length;s++)l.call(o,r[s])&&(u[r[s]]=o[r[s]])}}return u}}),d=m&&"object"==typeof m&&"default"in m?m.default:m,f=e(function(n){var e=String.prototype.valueOf,t=function(n){try{return e.call(n),!0}catch(n){return!1}},l=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;n.exports=function(n){return"string"==typeof n||"object"==typeof n&&(i?t(n):"[object String]"===l.call(n))}}),p=f&&"object"==typeof f&&"default"in f?f.default:f;n.settings=s,n.unformat=t,n.toFixed=i,n.formatMoney=c,n.formatNumber=r,n.formatColumn=a,n.format=c,n.parse=t})},function(n,e,t){"use strict";var l=function(){var n=this,e=n.$createElement;return(n._self._c||e)("input",{directives:[{name:"model",rawName:"v-model",value:n.inputValue,expression:"inputValue"}],ref:"numeric",attrs:{placeholder:n.placeholder,type:"text"},domProps:{value:n.value,value:n.inputValue},on:{blur:n.onBlur,input:[function(e){e.target.composing||(n.inputValue=e.target.value)},n.onInput],focus:n.onFocus}})},i=[],o={render:l,staticRenderFns:i};e.a=o}])});