!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.VueFormular=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o-1?"input":this.fieldType}},methods:{setValue:function(value){this.value=value,this.dirty=!0},reset:function(){this.wasReset=!0,this.value=""},focus:function(){this.$el.getElementsByTagName(this.tagName)[0].focus()}}}}},{"../../templates/field.html":65,"../mixins/computed":32,"../mixins/data":33,"../mixins/methods":34,"../mixins/props":35,"../mixins/ready":36}],14:[function(require,module,exports){var merge=require("merge"),clone=require("clone"),Field=require("./field");module.exports=function(){return merge.recursive(Field(),{data:function(){return{fieldType:"file"}},props:{options:{type:Object,required:!1,"default":function(){return{}}},ajax:{type:Boolean},dest:{type:String,"default":"/"},done:{type:Function},error:{type:Function},valueKey:{type:String,"default":"value"}},ready:function(){if(this.ajax){var self=this,parentOptions=this.inForm()?clone(this.getForm().options.fileOptions):{},options=merge.recursive(parentOptions,this.options);options.hasOwnProperty("formData")||(options.formData={}),options.formData.rules=JSON.stringify(this.rules),options.formData.hasOwnProperty("dest")||(options.formData.dest=this.dest),options.hasOwnProperty("done")||(options.done=this.done?this.done:function(e,data){self.setValue(data.result[self.valueKey])}),options.hasOwnProperty("error")||(options.error=this.error?this.error:function(e,data){bootbox.alert(e.responseJSON.error.message)}),$(this.$el).find("input[type=file]").fileupload(options)}}})}},{"./field":13,clone:96,merge:98}],15:[function(require,module,exports){var merge=require("merge"),Field=require("./field");module.exports=function(){return merge.recursive(Field(),{props:{placeholder:{type:String,required:!1,"default":""},debounce:{type:Number,"default":300},lazy:{type:Boolean}}})}},{"./field":13,merge:98}],16:[function(require,module,exports){var merge=require("merge"),Input=require("./input");module.exports=function(){return merge.recursive(Input(),{data:function(){return{fieldType:"number"}},ready:function(){this.$set("rules.number",!0)}})}},{"./input":15,merge:98}],17:[function(require,module,exports){var merge=require("merge"),Input=require("./input");module.exports=function(){return merge.recursive(Input(),{data:function(){return{fieldType:"password"}}})}},{"./input":15,merge:98}],18:[function(require,module,exports){function unique(arr){for(var u={},a=[],i=0,l=arr.length;l>i;++i)u.hasOwnProperty(arr[i])||(a.push(arr[i]),u[arr[i]]=1);return a}var merge=require("merge"),clone=require("clone"),Field=require("./field");module.exports=function(){return merge.recursive(Field(),{props:{items:{type:Array,required:!1,"default":function(){return[]}},multiple:{type:Boolean,required:!1,"default":!1},select2:{type:Boolean},options:{type:Object,"default":function(){return{}}},containerClass:{required:!1},placeholder:{type:String,required:!1,"default":"Select Option"},noDefault:{type:Boolean},filterBy:{type:String,"default":""},ajaxUrl:{type:String,"default":""},callback:{type:Function,required:!1},html:{type:Boolean}},ready:function(){var value,that=this,callback=this.callback,filterBy=this.filterBy;if(!this.value&&this.noDefault&&setTimeout(function(){this.value=this.filteredItems[0].id}.bind(this),0),this.filterBy&&(this.html=!0,this.filteringField=this.getField(this.filterBy),this.$watch("filterValue",function(val){val&&this.setValue(this.noDefault?this.filteredItems[0].id:"")}.bind(this))),(this.select2||this.ajaxUrl)&&"undefined"!=typeof $){var options=this.inForm()?clone(this.getForm().options.select2Options):{};options=merge.recursive(options,{placeholder:this.placeholder}),this.html||(options.data=this.items),this.ajaxUrl&&(options=merge.recursive(options,{ajax:{url:this.ajaxUrl,dataType:"json",delay:250,data:function(params){var query={q:params.term,selected:that.value};if(filterBy){var filterValue=$("[name="+filterBy+"]").val();filterValue&&(query[filterBy]=filterValue)}return query},processResults:function(data){return{results:callback?$.map(data,callback):data}},cache:!0},minimumInputLength:3})),options=merge.recursive(options,this.options),this.el=$(this.$el).find("select"),this.el.select2(options).on("select2:select",function(e){if(that.ajaxUrl){var items=$(this).select2("data").map(function(item){return{id:item.id,text:item.text}}),ids=[];items=items.filter(function(item){return-1==ids.indexOf(item.id)?(ids.push(item.id),!0):!1}),that.items=items}var value=$(this).val();that.value=that.multiple?unique(value):value}).on("select2:unselecting",function(e){if(that.multiple){var $this=$(this);setTimeout(function(){value=$this.val(),that.value=value?unique(value):[]},0)}else that.value=""}),this.el.select2("val",this.value),setTimeout(function(){this.el.trigger("change")}.bind(this),0),this.containerClass&&(this.el.data("select2").$container.addClass("container-"+this.containerClass),this.el.data("select2").$dropdown.addClass("dropdown-"+this.containerClass))}},computed:{arraySymbol:require("../computed/array-symbol"),filterValue:function(){return this.filteringField?this.filteringField.value:null},filteredItems:function(){return!this.select2||this.ajaxUrl||this.html?this.filterBy?(this.select2&&setTimeout(function(){$(this.$el).find("select").val(this.value).trigger("change")}.bind(this),0),this.items.filter(function(item){return this.passesFilter(item)}.bind(this))):this.items:[]}},data:function(){return{filteringField:null,fieldType:"select",tagName:"select"}},methods:{setValue:function(value){this.value=value,this.dirty=!0,this.multiple&&(this.value=unique(this.value)),this.select2&&this.el.select2("val",value)},reset:function(){var value=this.multiple?[]:"";this.wasReset=!0,this.value=value,this.select2&&this.el.select2("val",value)},passesFilter:function(item){return this.filterBy&&this.filterValue&&item[this.filterBy]?item[this.filterBy]==this.filterValue:!0}}})}},{"../computed/array-symbol":1,"./field":13,clone:96,merge:98}],19:[function(require,module,exports){var merge=require("merge"),Input=require("./input");module.exports=function(){return merge.recursive(Input(),{data:function(){return{fieldType:"text"}}})}},{"./input":15,merge:98}],20:[function(require,module,exports){var merge=require("merge"),clone=require("clone"),Field=require("./field");module.exports=function(){return merge.recursive(Field(),{props:{placeholder:{type:String,required:!1,"default":""},disabled:{type:Boolean},tinymce:{"default":!1},debounce:{type:Number,"default":300},lazy:{type:Boolean}},data:function(){return{editor:null,fieldType:"textarea",tagName:"textarea"}},ready:function(){if(this.tinymce!==!1){var that=this,setup=that.tinymce&&that.tinymce.hasOwnProperty("setup")?that.tinymce.setup:function(){},parentSetup=that.getForm().options.tinymceOptions.hasOwnProperty("setup")?that.getForm().options.tinymceOptions.setup:function(){},options="object"==typeof this.tinymce?merge.recursive(clone(this.getForm().options.tinymceOptions),this.tinymce):this.getForm().options.tinymceOptions;options=merge.recursive(options,{selector:"textarea[name="+this.name+"]",setup:function(ed){that.editor=ed,parentSetup(ed),setup(ed),ed.on("change",function(e){that.value=ed.getContent()}.bind(this))}}),tinymce.init(options),this.$watch("value",function(val){val!=tinymce.get("textarea_"+this.name).getContent()&&tinymce.get("textarea_"+this.name).setContent(val)})}}})}},{"./field":13,clone:96,merge:98}],21:[function(require,module,exports){module.exports=function(item,show,rule){var unique=!0;this.getForm().errors.forEach(function(error,i){error.name==item.name&&error.rule==rule&&(this.getForm().errors[i].show=show,unique=!1)}.bind(this)),unique&&this.getForm().errors.push(item)}},{}],22:[function(require,module,exports){module.exports=function(event,payload){event="vue-formular."+event,this.$dispatch(event,payload)}},{}],23:[function(require,module,exports){module.exports=function(name){return this.$root.$refs.hasOwnProperty(name)?this.$root.$refs[name]:this.getForm().getField(name)}},{}],24:[function(require,module,exports){function getForm(instance){return instance&&instance.hasOwnProperty("$parent")?instance.hasOwnProperty("isForm")&&instance.isForm?instance:getForm(instance.$parent):!1}module.exports=function(){return getForm(this.$parent)}},{}],25:[function(require,module,exports){function extractMessage(rule,message,field){return field.rules.number||field.rules.integer?message.number:"between"==rule&&"object"==typeof field.rules[rule][0]||["min","max"].indexOf(rule)>-1&&"object"==typeof field.rules[rule]?message.date:message.string}function stripLabel(label){return label.replace(/<(?:.|\n)*?>/gm,"")}function isMomentObject(param){return"undefined"!=typeof param.isValid}module.exports=function(rule){var messages=this.getForm().options.messages,message=this.messages[rule]?this.messages[rule]:messages[rule];"object"==typeof message&&(message=extractMessage(rule,message,this));var params=this.rules[rule];if(isMomentObject(params))message=message.replace("{0}",params.format(this.format));else if(Array.isArray(params))params.forEach(function(param,index){message=message.replace("{"+index+"}",isMomentObject(param)?param.format(this.format):param)}.bind(this));else if(("number"==typeof params||"string"==typeof params)&&(message=message.replace("{0}",params),"string"==typeof params)){var relatedField=this.getField(params);relatedField&&(message=message.replace(":relatedField",stripLabel(relatedField.label)))}return message=message.replace(":field",this.label?stripLabel(this.label):this.name)},Array.isArray||(Array.isArray=function(arg){return"[object Array]"===Object.prototype.toString.call(arg)})},{}],26:[function(require,module,exports){module.exports=function(){"undefined"!=typeof this.triggeredFields&&this.triggeredFields.forEach(function(field){field.triggerOn()})}},{}],27:[function(require,module,exports){module.exports=function(){return this.getForm()&&this.getForm().isForm}},{}],28:[function(require,module,exports){module.exports=function(item){var index;this.getForm().errors.forEach(function(error,i){error.name==item.name&&error.rule==item.rule&&(index=i)}),index>=0&&this.getForm().errors.splice(index,1)}},{}],29:[function(require,module,exports){var isTriggerOn=require("../../trigger/trigger-on");module.exports=function(){if(!this.trigger)return void(this.shouldShow=!0);var params=this.trigger.split(":"),triggerName=params[0],values=params.length>1?params[1]:!1;setTimeout(function(){this.shouldShow=isTriggerOn(this,this.getField(triggerName),values)}.bind(this),0)}},{"../../trigger/trigger-on":73}],30:[function(require,module,exports){module.exports=function(){if(this.rules.remote){var formError={name:this.name,rule:"remote",show:!0};this.$http.get(this.rules.remote,{params:{value:this.value}}).then(function(data){var valid=data.data.valid;valid?(this.errors.$remove("remote"),this.inForm()&&this.removeFormError(formError)):-1==this.errors.indexOf("remote")&&(this.errors.push("remote"),this.inForm()&&this.addFormError(formError,!0))})}}},{}],31:[function(require,module,exports){function shouldShow(that,rule){return!that.pristine||["greaterThan","smallerThan"].indexOf(rule)>-1}var validator={between:require("../../validation/rules/between"),digits:require("../../validation/rules/digits"),email:require("../../validation/rules/email"),greaterThan:require("../../validation/rules/greater-than"),smallerThan:require("../../validation/rules/smaller-than"),integer:require("../../validation/rules/integer"),max:require("../../validation/rules/max"),min:require("../../validation/rules/min"),number:require("../../validation/rules/number"),requiredIf:require("../../validation/rules/required-if"),requiredAndShownIf:require("../../validation/rules/required-if-and-shown"),required:require("../../validation/rules/required"),url:require("../../validation/rules/url"),date:require("../../validation/rules/date"),daterange:require("../../validation/rules/daterange")},merge=require("merge");module.exports=function(){var formError,isValid;validator=merge.recursive(validator,this.getForm().options.customRules);for(var rule in this.rules)validator[rule]&&(isValid=!this.value&&"required"!=rule&&"requiredIf"!=rule&&"requiredAndShownIf"!=rule||validator[rule](this),formError={name:this.name,rule:rule,show:shouldShow(this,rule)},isValid?(this.errors.$remove(rule),this.inForm()&&this.removeFormError(formError)):(shouldShow(this,rule)&&-1==this.errors.indexOf(rule)&&this.errors.push(rule),this.inForm()&&this.addFormError(formError,!this.pristine,rule)));this.errors.length&&(this.hadErrors=!0)}},{"../../validation/rules/between":75,"../../validation/rules/date":76,"../../validation/rules/daterange":77,"../../validation/rules/digits":78,"../../validation/rules/email":79,"../../validation/rules/greater-than":81,"../../validation/rules/integer":83,"../../validation/rules/max":84,"../../validation/rules/min":85,"../../validation/rules/number":86,"../../validation/rules/required":90,"../../validation/rules/required-if":89,"../../validation/rules/required-if-and-shown":87,"../../validation/rules/smaller-than":91,"../../validation/rules/url":92,merge:98}],32:[function(require,module,exports){module.exports={computed:{fieldClasses:require("../computed/field-classes"),hasFeedback:require("../computed/has-feedback"),feedbackIcon:require("../computed/feedback-icon"),validationError:require("../computed/validation-error"),success:require("../computed/success"),hasLabel:require("../computed/has-label"),trigger:require("../computed/trigger")}}},{"../computed/feedback-icon":2,"../computed/field-classes":3,"../computed/has-feedback":4,"../computed/has-label":5,"../computed/success":6,"../computed/trigger":7,"../computed/validation-error":8}],33:[function(require,module,exports){var clone=require("clone");module.exports={data:function(){return{isField:!0,tagName:"input",messages:{},isRequired:!1,shouldShow:!0,dirty:!1,pristine:!0,wasReset:!1,initialValue:clone(this.value),hadErrors:!1,errors:[],relatedFields:[],triggeredFields:[]}}}},{clone:96}],34:[function(require,module,exports){module.exports={methods:{getMessage:require("../methods/get-message"),validateRemote:require("../methods/validate-remote"),validate:require("../methods/validate"),addFormError:require("../methods/add-form-error"),removeFormError:require("../methods/remove-form-error"),inForm:require("../methods/in-form"),triggerOn:require("../methods/trigger-on"),handleTriggeredFields:require("../methods/handle-triggered-fields"),getForm:require("../methods/get-form"),getField:require("../methods/get-field"),dispatch:require("../methods/dispatch")}}},{"../methods/add-form-error":21,"../methods/dispatch":22,"../methods/get-field":23,"../methods/get-form":24,"../methods/get-message":25,"../methods/handle-triggered-fields":26,"../methods/in-form":27,"../methods/remove-form-error":28,"../methods/trigger-on":29,"../methods/validate":31,"../methods/validate-remote":30}],35:[function(require,module,exports){module.exports={props:{name:{type:String,required:!0},value:{required:!1,"default":""},label:{type:String,required:!1},hideLabel:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},rules:{type:Object,required:!1,"default":function(){return{}}}}}},{}],36:[function(require,module,exports){var isEqual=require("../../helpers/is-equal");module.exports={ready:function(){this.required&&this.$set("rules.required",!0);var inForm=this.inForm();if(inForm){this.getForm().options.sendOnlyDirtyFields||this.getForm().fields.push(this),this.getForm().options.sendOnlyDirtyFields&&this.$watch("dirty",function(isDirty){var method=isDirty?"push":"$remove";this.getForm().fields[method](this)});var form=this.getForm(),v=this.getForm().validation;v.rules&&v.rules.hasOwnProperty(this.name)&&(this.rules=v.rules[this.name]),"undefined"!=typeof v.messages&&v.messages.hasOwnProperty(this.name)&&(this.messages=v.messages[this.name]),setTimeout(function(){this.validate()}.bind(this),0),form.relatedFields.hasOwnProperty(this.name)&&(this.foreignFields=form.relatedFields[this.name].map(function(name){return form.getField(name)})),form.triggeredFields.hasOwnProperty(this.name)&&(this.triggeredFields=form.triggeredFields[this.name].map(function(name){return form.getField(name)})),this.handleTriggeredFields()}setTimeout(function(){this.$watch("value",function(newVal,oldVal){var dispatcher=inForm?form:this;dispatcher.dispatch("change::"+this.name,{name:this.name,field:this,value:newVal,oldValue:oldVal}),dispatcher.dispatch("change",{name:this.name,field:this,value:newVal,oldValue:oldVal}),"undefined"!=typeof this.foreignFields&&this.foreignFields.forEach(function(field){field.validate()}),this.handleTriggeredFields(),this.dirty=this.wasReset?!1:!isEqual(this.value,this.initialValue),this.pristine=this.wasReset,this.wasReset=!1,inForm&&this.validate()},{deep:!0})}.bind(this),0)}}},{"../../helpers/is-equal":43}],37:[function(require,module,exports){module.exports={props:["status"],template:require("../templates/status-bar.html"),methods:{getForm:require("./methods/get-form"),showError:function(error){var field=this.getForm().getField(error.name);return error.hasOwnProperty("message")?error.message.replace(":field",field.label):field.getMessage(error.rule)},getLink:function(error){return"#"+error.name},goToField:function(field){this.getForm().dispatch("clicked-error",field)}},computed:{errors:function(){return this.showableErrors.length?(this.getForm().serverErrors="",this.getForm().statusbarMessage="",this.getForm().status="danger",this.showableErrors):this.getForm().serverErrors.length?this.getForm().serverErrors:[]},showableErrors:function(){var errors=[];return this.getForm().options.showClientErrorsInStatusBar?(this.getForm().errors.forEach(function(error){error.show&&errors.push(error)}),errors):[]},errorText:function(){var texts=this.getForm().options.texts,count=this.showableErrors.length?this.showableErrors.length:this.getForm().serverErrors.length;return 1==count?texts.singleError:texts.errors.replace("{0}",count)}}}},{"../templates/status-bar.html":70,"./methods/get-form":24}],38:[function(require,module,exports){module.exports={template:require("../templates/submit.html"),props:{text:{type:String,required:!1,"default":"Submit"}},methods:{getForm:require("./methods/get-form")},computed:{disabled:function(){return this.getForm().sending||this.getForm().options.sendOnlyDirtyFields&&this.getForm().pristine}}}},{"../templates/submit.html":71,"./methods/get-form":24}],39:[function(require,module,exports){module.exports=function(){return"form-horizontal"==this.options.layout?"col-sm-"+(12-this.options.labelWidth):""}},{}],40:[function(require,module,exports){module.exports=function(){return this.errors.length>0}},{}],41:[function(require,module,exports){module.exports=function(){return"form-horizontal"==this.options.layout?"col-sm-"+this.options.labelWidth:""}},{}],42:[function(require,module,exports){function isDateString(str){return"string"==typeof str&&/\d{4}-\d{2}-\d{2}/.test(str)}module.exports=function(rules){return rules.min&&isDateString(rules.min)&&(rules.min=moment(rules.min,"YYYY-MM-DD")),rules.max&&isDateString(rules.max)&&(rules.max=moment(rules.max,"YYYY-MM-DD")),rules.between&&isDateString(rules.between[0])&&(rules.between[0]=moment(rules.between[0],"YYYY-MM-DD"),rules.between[1]=moment(rules.between[1],"YYYY-MM-DD")),rules}},{}],43:[function(require,module,exports){function arraysEqual(arr1,arr2){var equal=!0;return arr1&&!arr2?!1:arr1.length!=arr2.length?!1:(arr1.forEach(function(item){"object"!=typeof item&&-1==arr2.indexOf(item)&&(equal=!1)}),equal)}module.exports=function(value1,value2){if(value1&&value1.format&&(value1=value1.format("YYYY-MM-DD")),value2&&value2.format&&(value2=value2.format("YYYY-MM-DD")),"object"!=typeof value1&&"object"!=typeof value2)return value1==value2;var what=Object.prototype.toString;if("[object Array]"==what.call(value1))return arraysEqual(value1,value2);if(value1&&value1.start&&value2&&value2.start){var value1start=value1.start.format?value1.start.format("YYYY-MM-DD"):value1.start,value1end=value1.end.format?value1.end.format("YYYY-MM-DD"):value1.end,value2start=value2.start.format?value2.start.format("YYYY-MM-DD"):value2.start,value2end=value2.end.format?value2.end.format("YYYY-MM-DD"):value2.end;return value1start==value2start&&value1end==value2end}return!1}},{}],44:[function(require,module,exports){module.exports=function(n){return!isNaN(parseFloat(n))&&isFinite(n)}},{}],45:[function(require,module,exports){module.exports=function(){return this.charAt(0).toUpperCase()+this.slice(1)}},{}],46:[function(require,module,exports){function getFields(children,result){return children.forEach(function(child){child.hasOwnProperty("isField")&&child.isField?result.push(child):child.hasOwnProperty("$children")&&getFields(child.$children,result)}),result}module.exports=function(ref){if(!this.$root.$refs.hasOwnProperty(ref))throw'vue-formular: error in childrenOf method: ref "'+ref+'" was not found.';return getFields(this.$root.$refs[ref].$children,[])}},{}],47:[function(require,module,exports){module.exports=function(event,payload){var pieces=event.split("::"),eventName=pieces[0];pieces[0]=this.name?this.name+"."+eventName:eventName,event="vue-formular."+pieces.join("::"),this.$dispatch(event,payload)}},{}],48:[function(require,module,exports){function isValidMomentObject(value){return"object"==typeof value&&value.isValid&&value.isValid()}function isArray(value){return"[object Array]"===Object.prototype.toString.call(value)}function getValue(value){return!value||"object"!=typeof value||isArray(value)?value:isValidMomentObject(value)?value.format():"object"==typeof value&&value.start&&isValidMomentObject(value.start)&&value.end&&isValidMomentObject(value.end)?{start:value.start.format(),end:value.end.format()}:void 0}var merge=require("merge");module.exports=function(){var value,data={};return this.fields.forEach(function(field){value=getValue(field.value),data[field.name]=value}),data=merge.recursive(data,this.options.additionalPayload); }},{merge:98}],49:[function(require,module,exports){function getField(parent,name){if(parent.name==name)return parent;if(parent.$children&&parent.$children.length){var i,result=null;for(i=0;null==result&&i-1){field=field.split(":")[0];var foreignField=this.validation.rules[field][rule].split(":")[0];"undefined"==typeof this.relatedFields[foreignField]&&(this.relatedFields[foreignField]=[]),this.relatedFields[foreignField].push(field)}}},{}],52:[function(require,module,exports){module.exports=function(){for(var trigger in this.triggers){var triggerField=this.triggers[trigger].split(":")[0];"undefined"==typeof this.triggeredFields[triggerField]&&(this.triggeredFields[triggerField]=[]),this.triggeredFields[triggerField].push(trigger)}}},{}],53:[function(require,module,exports){var clone=require("clone");module.exports=function(){this.fields.forEach(function(field){field.initialValue=clone(field.value),field.dirty=!1})}},{clone:96}],54:[function(require,module,exports){module.exports=function(){this.errors.forEach(function(error){var field=this.getField(error.name);-1==field.errors.indexOf(error.rule)&&(field.errors.push(error.rule),field.hadErrors=!0),error.show=!0}.bind(this))}},{}],55:[function(require,module,exports){function handleErrors(vm){return vm.showAllErrors(),vm.dispatch("invalid.client",vm.errors),!1}var getSubmitter=require("./get-submitter");module.exports=function(e){e&&e.preventDefault(),setTimeout(function(){if(this.errors.length>0)return handleErrors(this);if(this.sending||this.options.sendOnlyDirtyFields&&this.pristine)return!1;var beforeSubmit=this.options.beforeSubmit(this);if("boolean"==typeof beforeSubmit&&beforeSubmit)return getSubmitter(this).submit(e);var resolveMethod=beforeSubmit.done?"done":"then",rejectMethod=beforeSubmit["catch"]?"catch":"fail";beforeSubmit[resolveMethod](function(){return getSubmitter(this).submit(e)}.bind(this))[rejectMethod](function(){})}.bind(this),0)}},{"./get-submitter":50}],56:[function(require,module,exports){function getData(method,data){return["head","get","delete"].indexOf(method)>-1?{params:data}:data}module.exports=function(vm){return{submit:function(e){e&&e.preventDefault(),vm.sending=!0,vm.dispatch("sending");var data=vm.formData();vm.serverErrors="",vm.status="info",vm.statusbarMessage=vm.options.texts.sending;var method=vm.method.toLowerCase();return vm.$http[method](vm.action,getData(method,data)).then(function(data){vm.reinitForm(),vm.dispatch("sent",data),vm.status="success",vm.sending=!1,vm.statusbarMessage="string"==typeof data.data?data.data:vm.options.texts.sent,setTimeout(function(){vm.statusbarMessage=""},vm.options.successTimeout)})["catch"](function(response){vm.dispatch("invalid.server",response),vm.status="danger",vm.sending=!1;var errors=response.data;return"string"==typeof errors?void(vm.statusbarMessage=errors):("object"==typeof errors&&errors.forEach(function(error,i){errors[i].show=!0}),vm.statusbarMessage="",void(vm.serverErrors=errors))}),!0}}}},{}],57:[function(require,module,exports){module.exports=function(vm){return{submit:function(e){e.preventDefault();var data=vm.formData();return vm.reinitForm(),vm.dispatch("sent",data),vm.status="success",vm.statusbarMessage=vm.options.texts.sent,!0}}}},{}],58:[function(require,module,exports){module.exports=function(vm){return{submit:function(e){return vm.sending?(e.preventDefault(),!1):(vm.sending=!0,vm.$els.form.submit(),!0)}}}},{}],59:[function(require,module,exports){module.exports=function(){var options={labelWidth:3,layout:"",showErrorsInStatusBar:!1,sendOnlyDirtyFields:!1,successTimeout:4e3,additionalPayload:{},customRules:{},fileOptions:{},dateOptions:{},select2Options:{},tinymceOptions:{},beforeSubmit:function(){return!0},texts:{sending:"Sending Form...",sent:"Form was successfully sent",singleError:"an error was found:",errors:"{0} errors were found:",selectAll:"Select All",unselectAll:"Unselect All"}};return options.messages=require("../validation/messages/messages")(),options}},{"../validation/messages/messages":74}],60:[function(require,module,exports){module.exports='{{toggleText}}\n
\n
\n \n
\n
\n\n'},{}],61:[function(require,module,exports){module.exports='\n\n'},{}],62:[function(require,module,exports){module.exports=' \n'},{}],63:[function(require,module,exports){module.exports=' \n {{formattedDate}} \n\n'},{}],64:[function(require,module,exports){module.exports="
\n \n
\n"},{}],65:[function(require,module,exports){module.exports='
\n \n
\n \n \n \n {{validationError}}\n \n
\n
\n\n'},{}],66:[function(require,module,exports){module.exports='\n \n \n \n\n'},{}],67:[function(require,module,exports){module.exports='
\n\n
\n \n
\n\n \n
\n'},{}],68:[function(require,module,exports){module.exports=' \n'},{}],69:[function(require,module,exports){module.exports=' \n\n\n'},{}],70:[function(require,module,exports){module.exports='
\n
\n

{{{errorText}}}

\n

\n
\n

\n
\n'},{}],71:[function(require,module,exports){module.exports="\n\n"},{}],72:[function(require,module,exports){module.exports='\n'},{}],73:[function(require,module,exports){module.exports=function(that,trigger,values){if(!trigger)return!0;var triggerValue=trigger.value;if(!values)return!!triggerValue;if(null==triggerValue)return!1;values=values.split(",");var value="object"==typeof triggerValue?triggerValue:[triggerValue];return!!values.filter(function(n){return-1!=value.indexOf(n)}).length}},{}],74:[function(require,module,exports){module.exports=function(){return{required:"The :field field is required",number:"The :field field must be a number",integer:"The :field field must be an integer",digits:"The :field field must have digits only",email:"The :field field must be a valid email address",date:"The :field field must be a valid date",daterange:"The :field field must be a valid date range",between:{string:"The field :field must contain between {0} and {1} characters",number:"The field :field must be a number between {0} and {1}",date:"The field :field must be a date between {0} and {1}"},min:{string:"The :field field must contain at least {0} characters",number:"The :field field must be equal to or greater than {0}",date:"The field :field must be a date equal to or greater than {0}"},max:{string:"The field :field must contain no more than {0} characters",number:"The field :field must be equal to or smaller than {0}",date:"The field :field must be a date equal to or smaller than {0}"},remote:"Remote Error",requiredIf:"The field :field is required",requiredAndShownIf:"The field :field is required",url:"Please enter a valid URL",greaterThan:"The field :field must be greater than :relatedField",smallerThan:"The field :field must be smaller than :relatedField"}}},{}],75:[function(require,module,exports){module.exports=function(that){var value=that.rules.number||that.rules.integer||"object"==typeof that.rules.between[0]?that.value:that.value.length;return(that.rules.number||that.rules.integer)&&(value=parseFloat(value)),value>=that.rules.between[0]&&value<=that.rules.between[1]}},{}],76:[function(require,module,exports){module.exports=function(field){if("object"==typeof field.value)return!0;var format=field.isTimepicker&&field.value&&1==field.value.split(" ").length?field.format.split(" ")[0]:field.format;return moment(field.value,format).isValid()}},{}],77:[function(require,module,exports){module.exports=function(field){if(!field.value.split)return!0;var values=field.value.split("-");return moment(values[0],this.format).isValid()&&moment(values[1],this.format).isValid()}},{}],78:[function(require,module,exports){module.exports=function(that){return/^[0-9]*$/.test(that.value.trim())}},{}],79:[function(require,module,exports){module.exports=function(that){var re=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return!that.value.trim()||re.test(that.value)}},{}],80:[function(require,module,exports){var isNumeric=require("../../helpers/is-numeric");module.exports=function(value){return"object"==typeof value?value:isNumeric(value)?parseFloat(value):moment(value)}},{"../../helpers/is-numeric":44}],81:[function(require,module,exports){var getValue=require("./get-comparative-rule-value");module.exports=function(that){if(!that.value)return!0;var otherField=that.getField(that.rules.greaterThan);if(!otherField||!otherField.value)return!0;var value1=getValue(that.value),value2=getValue(otherField.value);return value1>value2}},{"./get-comparative-rule-value":80}],82:[function(require,module,exports){function isMultipleList(that){return("select"==that.fieldType||"buttons"==that.fieldType)&&that.multiple&&that.value.length>0}function isString(value){return"string"==typeof value&&value.trim().length>0}function isValidMoment(val){return"function"==typeof val.isValid&&val.isValid()}var isNumeric=require("../../helpers/is-numeric");module.exports=function(that){return!(!that.value||!(isString(that.value)||"checkbox"==that.fieldType||"date"==that.fieldType||isValidMoment(that.value)||isMultipleList(that)||isNumeric(that.value)))}},{"../../helpers/is-numeric":44}],83:[function(require,module,exports){module.exports=function(that){return!isNaN(that.value)&&that.value%1===0}},{}],84:[function(require,module,exports){module.exports=function(that){var value=that.rules.number||that.rules.integer||"object"==typeof that.rules.max?that.value:that.value.length;return(that.rules.number||that.rules.integer)&&(value=parseFloat(value)),value<=that.rules.max}},{}],85:[function(require,module,exports){module.exports=function(that){var value=that.rules.number||that.rules.integer||"object"==typeof that.rules.min?that.value:that.value.length;return(that.rules.number||that.rules.integer)&&(value=parseFloat(value)),value>=that.rules.min}},{}],86:[function(require,module,exports){var isNumeric=require("../../helpers/is-numeric");module.exports=function(that){return isNumeric(that.value)}},{"../../helpers/is-numeric":44}],87:[function(require,module,exports){var requiredIfBase=require("./required-if-base"),hasValue=require("./has-value");module.exports=function(that){var required=requiredIfBase(that,"requiredAndShownIf");return that.shouldShow=required,!required||hasValue(that)||"checkbox"==that.fieldType}},{"./has-value":82,"./required-if-base":88}],88:[function(require,module,exports){var isTriggerOn=require("../../trigger/trigger-on");module.exports=function(that,rule){if(!that.inForm())return!0;var params=that.rules[rule].split(":"),triggerName=params[0],values=params.length>1?params[1]:!1,trigger=that.getField(triggerName),required=isTriggerOn(that,trigger,values);return that.isRequired=required,required}},{"../../trigger/trigger-on":73}],89:[function(require,module,exports){var requiredIfBase=require("./required-if-base"),hasValue=require("./has-value");module.exports=function(that){var required=requiredIfBase(that,"requiredIf");return!required||hasValue(that)||"checkbox"==that.fieldType}},{"./has-value":82,"./required-if-base":88}],90:[function(require,module,exports){var hasValue=require("./has-value");module.exports=function(that){return that.rules.required?hasValue(that):!0}},{"./has-value":82}],91:[function(require,module,exports){var getValue=require("./get-comparative-rule-value");module.exports=function(that){if(!that.value)return!0;var otherField=that.getField(that.rules.smallerThan);if(!otherField||!otherField.value)return!0;var value1=getValue(that.value),value2=getValue(otherField.value);return value2>value1}},{"./get-comparative-rule-value":80}],92:[function(require,module,exports){module.exports=function(that){return/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(that.value.trim())}},{}],93:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(exports){"use strict";function decode(elt){var code=elt.charCodeAt(0);return code===PLUS||code===PLUS_URL_SAFE?62:code===SLASH||code===SLASH_URL_SAFE?63:NUMBER>code?-1:NUMBER+10>code?code-NUMBER+26+26:UPPER+26>code?code-UPPER:LOWER+26>code?code-LOWER+26:void 0}function b64ToByteArray(b64){function push(v){arr[L++]=v}var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0,arr=new Arr(3*b64.length/4-placeHolders),l=placeHolders>0?b64.length-4:b64.length;var L=0;for(i=0,j=0;l>i;i+=4,j+=3)tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3)),push((16711680&tmp)>>16),push((65280&tmp)>>8),push(255&tmp);return 2===placeHolders?(tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4,push(255&tmp)):1===placeHolders&&(tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2,push(tmp>>8&255),push(255&tmp)),arr}function uint8ToBase64(uint8){function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(63&num)}var i,temp,length,extraBytes=uint8.length%3,output="";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=encode(temp>>2),output+=encode(temp<<4&63),output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1],output+=encode(temp>>10),output+=encode(temp>>4&63),output+=encode(temp<<2&63),output+="="}return output}var Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,PLUS="+".charCodeAt(0),SLASH="/".charCodeAt(0),NUMBER="0".charCodeAt(0),LOWER="a".charCodeAt(0),UPPER="A".charCodeAt(0),PLUS_URL_SAFE="-".charCodeAt(0),SLASH_URL_SAFE="_".charCodeAt(0);exports.toByteArray=b64ToByteArray,exports.fromByteArray=uint8ToBase64}("undefined"==typeof exports?this.base64js={}:exports)},{}],94:[function(require,module,exports){(function(global){"use strict";function typedArraySupport(){function Bar(){}try{var arr=new Uint8Array(1);return arr.foo=function(){return 42},arr.constructor=Bar,42===arr.foo()&&arr.constructor===Bar&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){return this instanceof Buffer?(Buffer.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof arg?fromNumber(this,arg):"string"==typeof arg?fromString(this,arg,arguments.length>1?arguments[1]:"utf8"):fromObject(this,arg)):arguments.length>1?new Buffer(arg,arguments[1]):new Buffer(arg)}function fromNumber(that,length){if(that=allocate(that,0>length?0:0|checked(length)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;length>i;i++)that[i]=0;return that}function fromString(that,string,encoding){("string"!=typeof encoding||""===encoding)&&(encoding="utf8");var length=0|byteLength(string,encoding);return that=allocate(that,length),that.write(string,encoding),that}function fromObject(that,object){if(Buffer.isBuffer(object))return fromBuffer(that,object);if(isArray(object))return fromArray(that,object);if(null==object)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(object.buffer instanceof ArrayBuffer)return fromTypedArray(that,object);if(object instanceof ArrayBuffer)return fromArrayBuffer(that,object)}return object.length?fromArrayLike(that,object):fromJsonObject(that,object)}function fromBuffer(that,buffer){var length=0|checked(buffer.length);return that=allocate(that,length),buffer.copy(that,0,0,length),that}function fromArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromTypedArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array){return Buffer.TYPED_ARRAY_SUPPORT?(array.byteLength,that=Buffer._augment(new Uint8Array(array))):that=fromTypedArray(that,new Uint8Array(array)),that}function fromArrayLike(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromJsonObject(that,object){var array,length=0;"Buffer"===object.type&&isArray(object.data)&&(array=object.data,length=0|checked(array.length)),that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function allocate(that,length){Buffer.TYPED_ARRAY_SUPPORT?(that=Buffer._augment(new Uint8Array(length)),that.__proto__=Buffer.prototype):(that.length=length,that._isBuffer=!0);var fromPool=0!==length&&length<=Buffer.poolSize>>>1;return fromPool&&(that.parent=rootParent),that}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);return delete buf.parent,buf}function byteLength(string,encoding){"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"binary":case"raw":case"raws":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if(start=0|start,end=void 0===end||end===1/0?this.length:0|end,encoding||(encoding="utf8"),0>start&&(start=0),end>this.length&&(end=this.length),start>=end)return"";for(;;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))throw new Error("Invalid hex string");buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;end>i;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(end>=i+bytesPerSequence){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:128>firstByte&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128===(192&secondByte)&&128===(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(55296>tempCodePoint||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128===(192&secondByte)&&128===(192&thirdByte)&&128===(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&1114112>tempCodePoint&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(MAX_ARGUMENTS_LENGTH>=len)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;len>i;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(127&buf[i]);return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;end>i;i++)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;ioffset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){0>value&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);j>i;i++)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){0>value&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);j>i;i++)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");if(0>offset)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;length>i;i++){if(codePoint=string.charCodeAt(i),codePoint>55295&&57344>codePoint){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(56320>codePoint){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,128>codePoint){if((units-=1)<0)break;bytes.push(codePoint)}else if(2048>codePoint){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(65536>codePoint){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(1114112>codePoint))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);i++)dst[i+offset]=src[i];return i}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT?(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array):(Buffer.prototype.length=void 0,Buffer.prototype.parent=void 0),Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);len>i&&a[i]===b[i];)++i;return i!==len&&(x=a[i],y=b[i]),y>x?-1:x>y?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError("list argument must be an Array of Buffers.");if(0===list.length)return new Buffer(0);var i;if(void 0===length)for(length=0,i=0;i0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")), ""},Buffer.prototype.compare=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:Buffer.compare(this,b)},Buffer.prototype.indexOf=function(val,byteOffset){function arrayIndexOf(arr,val,byteOffset){for(var foundIndex=-1,i=0;byteOffset+i2147483647?byteOffset=2147483647:-2147483648>byteOffset&&(byteOffset=-2147483648),byteOffset>>=0,0===this.length)return-1;if(byteOffset>=this.length)return-1;if(0>byteOffset&&(byteOffset=Math.max(this.length+byteOffset,0)),"string"==typeof val)return 0===val.length?-1:String.prototype.indexOf.call(this,val,byteOffset);if(Buffer.isBuffer(val))return arrayIndexOf(this,val,byteOffset);if("number"==typeof val)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,val,byteOffset):arrayIndexOf(this,[val],byteOffset);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(offset){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(offset)},Buffer.prototype.set=function(v,offset){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(v,offset)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset=0|offset,isFinite(length)?(length=0|length,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=0|length,length=swap}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(0>length||0>offset)||offset>this.length)throw new RangeError("attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),start>end&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=Buffer._augment(this.subarray(start,end));else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;sliceLen>i;i++)newBuf[i]=this[i+start]}return newBuf.length&&(newBuf.parent=this.parent||this),newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value,offset=0|offset,byteLength=0|byteLength,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0>value?1:0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0>value?1:0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),0>value&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&start>end&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(0>targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("sourceStart out of bounds");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStartstart&&end>targetStart)for(i=len-1;i>=0;i--)target[i+targetStart]=this[i+start];else if(1e3>len||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;len>i;i++)target[i+targetStart]=this[i+start];else target._set(this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),start>end)throw new RangeError("end < start");if(end!==start&&0!==this.length){if(0>start||start>=this.length)throw new RangeError("start out of bounds");if(0>end||end>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof value)for(i=start;end>i;i++)this[i]=value;else{var bytes=utf8ToBytes(value.toString()),len=bytes.length;for(i=start;end>i;i++)this[i]=bytes[i%len]}return this}},Buffer.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(Buffer.TYPED_ARRAY_SUPPORT)return new Buffer(this).buffer;for(var buf=new Uint8Array(this.length),i=0,len=buf.length;len>i;i+=1)buf[i]=this[i];return buf.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var BP=Buffer.prototype;Buffer._augment=function(arr){return arr.constructor=Buffer,arr._isBuffer=!0,arr._set=arr.set,arr.get=BP.get,arr.set=BP.set,arr.write=BP.write,arr.toString=BP.toString,arr.toLocaleString=BP.toString,arr.toJSON=BP.toJSON,arr.equals=BP.equals,arr.compare=BP.compare,arr.indexOf=BP.indexOf,arr.copy=BP.copy,arr.slice=BP.slice,arr.readUIntLE=BP.readUIntLE,arr.readUIntBE=BP.readUIntBE,arr.readUInt8=BP.readUInt8,arr.readUInt16LE=BP.readUInt16LE,arr.readUInt16BE=BP.readUInt16BE,arr.readUInt32LE=BP.readUInt32LE,arr.readUInt32BE=BP.readUInt32BE,arr.readIntLE=BP.readIntLE,arr.readIntBE=BP.readIntBE,arr.readInt8=BP.readInt8,arr.readInt16LE=BP.readInt16LE,arr.readInt16BE=BP.readInt16BE,arr.readInt32LE=BP.readInt32LE,arr.readInt32BE=BP.readInt32BE,arr.readFloatLE=BP.readFloatLE,arr.readFloatBE=BP.readFloatBE,arr.readDoubleLE=BP.readDoubleLE,arr.readDoubleBE=BP.readDoubleBE,arr.writeUInt8=BP.writeUInt8,arr.writeUIntLE=BP.writeUIntLE,arr.writeUIntBE=BP.writeUIntBE,arr.writeUInt16LE=BP.writeUInt16LE,arr.writeUInt16BE=BP.writeUInt16BE,arr.writeUInt32LE=BP.writeUInt32LE,arr.writeUInt32BE=BP.writeUInt32BE,arr.writeIntLE=BP.writeIntLE,arr.writeIntBE=BP.writeIntBE,arr.writeInt8=BP.writeInt8,arr.writeInt16LE=BP.writeInt16LE,arr.writeInt16BE=BP.writeInt16BE,arr.writeInt32LE=BP.writeInt32LE,arr.writeInt32BE=BP.writeInt32BE,arr.writeFloatLE=BP.writeFloatLE,arr.writeFloatBE=BP.writeFloatBE,arr.writeDoubleLE=BP.writeDoubleLE,arr.writeDoubleBE=BP.writeDoubleBE,arr.fill=BP.fill,arr.inspect=BP.inspect,arr.toArrayBuffer=BP.toArrayBuffer,arr};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":93,ieee754:97,isarray:95}],95:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},{}],96:[function(require,module,exports){(function(Buffer){var clone=function(){"use strict";function clone(parent,circular,depth,prototype){function _clone(parent,depth){if(null===parent)return null;if(0==depth)return parent;var child,proto;if("object"!=typeof parent)return parent;if(clone.__isArray(parent))child=[];else if(clone.__isRegExp(parent))child=new RegExp(parent.source,__getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(clone.__isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=new Buffer(parent.length),parent.copy(child),child;"undefined"==typeof prototype?(proto=Object.getPrototypeOf(parent),child=Object.create(proto)):(child=Object.create(prototype),proto=prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in parent){var attrs;proto&&(attrs=Object.getOwnPropertyDescriptor(proto,i)),attrs&&null==attrs.set||(child[i]=_clone(parent[i],depth-1))}return child}var filter;"object"==typeof circular&&(depth=circular.depth,prototype=circular.prototype,filter=circular.filter,circular=circular.circular);var allParents=[],allChildren=[],useBuffer="undefined"!=typeof Buffer;return"undefined"==typeof circular&&(circular=!0),"undefined"==typeof depth&&(depth=1/0),_clone(parent,depth)}function __objToStr(o){return Object.prototype.toString.call(o)}function __isDate(o){return"object"==typeof o&&"[object Date]"===__objToStr(o)}function __isArray(o){return"object"==typeof o&&"[object Array]"===__objToStr(o)}function __isRegExp(o){return"object"==typeof o&&"[object RegExp]"===__objToStr(o)}function __getRegExpFlags(re){var flags="";return re.global&&(flags+="g"),re.ignoreCase&&(flags+="i"),re.multiline&&(flags+="m"),flags}return clone.clonePrototype=function(parent){if(null===parent)return null;var c=function(){};return c.prototype=parent,new c},clone.__objToStr=__objToStr,clone.__isDate=__isDate,clone.__isArray=__isArray,clone.__isRegExp=__isRegExp,clone.__getRegExpFlags=__getRegExpFlags,clone}();"object"==typeof module&&module.exports&&(module.exports=clone)}).call(this,require("buffer").Buffer)},{buffer:94}],97:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],98:[function(require,module,exports){!function(isNode){function merge_recursive(base,extend){if("object"!==typeOf(base))return extend;for(var key in extend)"object"===typeOf(base[key])&&"object"===typeOf(extend[key])?base[key]=merge_recursive(base[key],extend[key]):base[key]=extend[key];return base}function merge(clone,recursive,argv){var result=argv[0],size=argv.length;(clone||"object"!==typeOf(result))&&(result={});for(var index=0;size>index;++index){var item=argv[index],type=typeOf(item);if("object"===type)for(var key in item){var sitem=clone?Public.clone(item[key]):item[key];recursive?result[key]=merge_recursive(result[key],sitem):result[key]=sitem}}return result}function typeOf(input){return{}.toString.call(input).slice(8,-1).toLowerCase()}var Public=function(clone){return merge(clone===!0,!1,arguments)},publicName="merge";Public.recursive=function(clone){return merge(clone===!0,!0,arguments)},Public.clone=function(input){var index,size,output=input,type=typeOf(input);if("array"===type)for(output=[],size=input.length,index=0;size>index;++index)output[index]=Public.clone(input[index]);else if("object"===type){output={};for(index in input)output[index]=Public.clone(input[index])}return output},isNode?module.exports=Public:window[publicName]=Public}("object"==typeof module&&module&&"object"==typeof module.exports&&module.exports)},{}],99:[function(require,module,exports){String.prototype.ucfirst=require("./lib/helpers/ucfirst");var merge=require("merge");exports.install=function(Vue,globalOptions){var vfForm={template:require("./lib/templates/form.html"),props:{name:{type:String},client:{type:Boolean,required:!1,"default":!1},ajax:{type:Boolean,required:!1,"default":!1},action:{type:String},method:{type:String,required:!1,"default":"POST"},validation:{type:Object,required:!1,"default":function(){return{}}},triggers:{type:Object,required:!1,"default":function(){return{}}},options:{type:Object,required:!1,"default":function(){return{}}}},created:function(){globalOptions=globalOptions?globalOptions:{};var defaultOptions=require("./lib/options/options")(),options=merge.recursive(defaultOptions,globalOptions);if(this.options=merge.recursive(options,this.options),!this.ajax&&!this.client){var payload=this.options.additionalPayload;for(var key in payload)this.additionalValues.push({name:key,value:payload[key]})}this.registerInterfieldsRules(),this.registerTriggers()},data:function(){return{isForm:!0,fields:[],additionalValues:[],errors:[],serverErrors:[],relatedFields:{},triggeredFields:{},status:"danger",statusbarMessage:"",sending:!1}},computed:{labelClass:require("./lib/computed/label-class"),fieldClass:require("./lib/computed/field-class"),hasErrors:require("./lib/computed/has-errors"),pristine:function(){return 0==this.fields.length}},methods:{submit:require("./lib/methods/submit"),formData:require("./lib/methods/form-data"),getField:require("./lib/methods/get-field"),showAllErrors:require("./lib/methods/show-all-errors"),reinitForm:require("./lib/methods/reinit-form"),registerInterfieldsRules:require("./lib/methods/register-interfields-rules"),registerTriggers:require("./lib/methods/register-triggers"),childrenOf:require("./lib/methods/children-of"),dispatch:require("./lib/methods/dispatch")}};Vue.component("vf-form",vfForm),Vue.component("vf-text",require("./lib/components/fields/text")()),Vue.component("vf-email",require("./lib/components/fields/email")()),Vue.component("vf-number",require("./lib/components/fields/number")()),Vue.component("vf-password",require("./lib/components/fields/password")()),Vue.component("vf-file",require("./lib/components/fields/file")()),Vue.component("vf-textarea",require("./lib/components/fields/textarea")()),Vue.component("vf-select",require("./lib/components/fields/select")()),Vue.component("vf-buttons-list",require("./lib/components/fields/buttons-list")()),Vue.component("vf-date",require("./lib/components/fields/date")()),Vue.component("vf-checkbox",require("./lib/components/fields/checkbox")()),Vue.component("vf-status-bar",require("./lib/components/status-bar")),Vue.component("vf-submit",require("./lib/components/submit")),Vue.partial("input",require("./lib/templates/input.html")),Vue.partial("buttons",require("./lib/templates/buttons-list.html")),Vue.partial("checkbox",require("./lib/templates/checkbox.html")),Vue.partial("date",require("./lib/templates/date.html")),Vue.partial("file",require("./lib/templates/file.html")),Vue.partial("select",require("./lib/templates/select.html")),Vue.partial("textarea",require("./lib/templates/textarea.html")),Vue.partial("date-span",require("./lib/templates/date-span.html")),Vue.partial("date-input",require("./lib/templates/date-input.html"))}},{"./lib/components/fields/buttons-list":9,"./lib/components/fields/checkbox":10,"./lib/components/fields/date":11,"./lib/components/fields/email":12,"./lib/components/fields/file":14,"./lib/components/fields/number":16,"./lib/components/fields/password":17,"./lib/components/fields/select":18,"./lib/components/fields/text":19,"./lib/components/fields/textarea":20,"./lib/components/status-bar":37,"./lib/components/submit":38,"./lib/computed/field-class":39,"./lib/computed/has-errors":40,"./lib/computed/label-class":41,"./lib/helpers/ucfirst":45,"./lib/methods/children-of":46,"./lib/methods/dispatch":47,"./lib/methods/form-data":48,"./lib/methods/get-field":49,"./lib/methods/register-interfields-rules":51,"./lib/methods/register-triggers":52,"./lib/methods/reinit-form":53,"./lib/methods/show-all-errors":54,"./lib/methods/submit":55,"./lib/options/options":59,"./lib/templates/buttons-list.html":60,"./lib/templates/checkbox.html":61,"./lib/templates/date-input.html":62,"./lib/templates/date-span.html":63,"./lib/templates/date.html":64,"./lib/templates/file.html":66,"./lib/templates/form.html":67,"./lib/templates/input.html":68,"./lib/templates/select.html":69,"./lib/templates/textarea.html":72,merge:98}]},{},[99])(99)});