(window.webpackJsonp=window.webpackJsonp||[]).push([[617],{851:function(t,e,n){"use strict";n.r(e);n(4),n(8);var o=n(210),r=n.n(o),l={},d={name:"VueAutonumeric",props:{value:{default:function(){return null},required:!1,validator:function(t){return"number"==typeof t||"string"==typeof t||""===t||null===t}},options:{type:[Object,String,Array],required:!1,default:function(){return l}},resetOnOptions:{type:Boolean,required:!1,default:!0},placeholder:{type:String,required:!1,default:null},tag:{type:String,required:!1,default:"input"}},data:function(){return{anElement:null,initialOptions:null,hasContentEditable:!0}},computed:{anInfo:function(){return{value:this.value,options:this.options}}},watch:{anInfo:function(t,e){var n;e.options&&JSON.stringify(t.options)!==JSON.stringify(e.options)&&(this.resetOnOptions&&this.anElement.options.reset(),n=Array.isArray(t.options)?r.a.mergeOptions(t.options):r.a._getOptionObject(t.options),this.anElement.update(n));void 0!==t.value&&this.anElement.getNumber()!==t.value&&t.value!==e.value&&this.anElement.set(t.value)}},created:function(){var t=this;if(Array.isArray(this.options)){var e={};this.options.forEach((function(n){t.initialOptions=t.manageOptionElement(n),e=Object.assign(e,t.initialOptions)})),this.initialOptions=e}else this.initialOptions=this.manageOptionElement(this.options);this.hasContentEditable=!this.initialOptions.readOnly},mounted:function(){this.anElement=new r.a(this.$refs.autoNumericElement,this.initialOptions),null!==this.value&&""!==this.value&&(this.anElement.set(this.value),this.updateVModel())},methods:{updateVModel:function(t){null!==this.anElement&&this.$emit("input",this.anElement.getNumber(),t)},manageOptionElement:function(t){var e;return"string"==typeof t||t instanceof String?null==(e=r.a.getPredefinedOptions()[t])&&(console.warn("The given pre-defined options [".concat(t,"] is not recognized by AutoNumeric.\nSwitching back to the default options.")),e=l):e=t,e}},render:function(t){var e;return e="input"===this.tag?{type:"text",placeholder:this.placeholder}:{contenteditable:this.hasContentEditable},t(this.tag,{attrs:e,ref:"autoNumericElement",on:{"autoNumeric:rawValueModified":this.updateVModel}})}},h=n(42),component=Object(h.a)(d,undefined,undefined,!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=a6f0ceb-1.2.11.js.map