(function(n){"use strict";function k(n){var t={},i;return n.selectionStart===undefined?(n.focus(),i=document.selection.createRange(),t.length=i.text.length,i.moveStart("character",-n.value.length),t.end=i.text.length,t.start=t.end-t.length):(t.start=n.selectionStart,t.end=n.selectionEnd,t.length=t.end-t.start),t}function o(n,t,i){if(n.selectionStart===undefined){n.focus();var r=n.createTextRange();r.collapse(!0);r.moveEnd("character",i);r.moveStart("character",t);r.select()}else n.selectionStart=t,n.selectionEnd=i}function d(t,i){n.each(i,function(n,r){typeof r=="function"?i[n]=r(t,i,n):typeof t.autoNumeric[r]=="function"&&(i[n]=t.autoNumeric[r](t,i,n))})}function u(n,t){typeof n[t]=="string"&&(n[t]*=1)}function v(n,t){var i,r,e,o,f,s;return d(n,t),t.tagList=["b","caption","cite","code","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","ins","kdb","label","li","output","p","q","s","sample","span","strong","td","th","u","var"],i=t.vMax.toString().split("."),r=!t.vMin&&t.vMin!==0?[]:t.vMin.toString().split("."),u(t,"vMax"),u(t,"vMin"),u(t,"mDec"),t.mDec=t.mRound==="CHF"?"2":t.mDec,t.allowLeading=!0,t.aNeg=t.vMin<0?"-":"",i[0]=i[0].replace("-",""),r[0]=r[0].replace("-",""),t.mInt=Math.max(i[0].length,r[0].length,1),t.mDec===null&&(e=0,o=0,i[1]&&(e=i[1].length),r[1]&&(o=r[1].length),t.mDec=Math.max(e,o)),t.altDec===null&&t.mDec>0&&(t.aDec==="."&&t.aSep!==","?t.altDec=",":t.aDec===","&&t.aSep!=="."&&(t.altDec=".")),f=t.aNeg?"([-\\"+t.aNeg+"]?)":"(-?)",t.aNegRegAutoStrip=f,t.skipFirstAutoStrip=new RegExp(f+"[^-"+(t.aNeg?"\\"+t.aNeg:"")+"\\"+t.aDec+"\\d].*?(\\d|\\"+t.aDec+"\\d)"),t.skipLastAutoStrip=new RegExp("(\\d\\"+t.aDec+"?)[^\\"+t.aDec+"\\d]\\D*$"),s="-"+t.aNum+"\\"+t.aDec,t.allowedAutoStrip=new RegExp("[^"+s+"]","gi"),t.numRegAutoStrip=new RegExp(f+"(?:\\"+t.aDec+"?(\\d+\\"+t.aDec+"\\d+)|(\\d*(?:\\"+t.aDec+"\\d*)?))"),t}function t(n,t,i){var u,r,e,f;if(t.aSign)while(n.indexOf(t.aSign)>-1)n=n.replace(t.aSign,"");return n=n.replace(t.skipFirstAutoStrip,"$1$2"),n=n.replace(t.skipLastAutoStrip,"$1"),n=n.replace(t.allowedAutoStrip,""),t.altDec&&(n=n.replace(t.altDec,t.aDec)),u=n.match(t.numRegAutoStrip),n=u?[u[1],u[2],u[3]].join(""):"",(t.lZero==="allow"||t.lZero==="keep")&&i!=="strip"&&(r=[],e="",r=n.split(t.aDec),r[0].indexOf("-")!==-1&&(e="-",r[0]=r[0].replace("-","")),r[0].length>t.mInt&&r[0].charAt(0)==="0"&&(r[0]=r[0].slice(1)),n=e+r.join(t.aDec)),(i&&t.lZero==="deny"||i&&t.lZero==="allow"&&t.allowLeading===!1)&&(f="^"+t.aNegRegAutoStrip+"0*(\\d"+(i==="leading"?")":"|$)"),f=new RegExp(f),n=n.replace(f,"$1$2")),n}function s(n,t){if(t.pSign==="p"){var i=t.nBracket.split(",");t.hasFocus||t.removeBrackets?(t.hasFocus&&n.charAt(0)===i[0]||t.removeBrackets&&n.charAt(0)===i[0])&&(n=n.replace(i[0],t.aNeg),n=n.replace(i[1],"")):(n=n.replace(t.aNeg,""),n=i[0]+n+i[1])}return n}function y(n,t){var r,i;return n&&(r=+n,r<1e-6&&r>-1?(n=+n,n<1e-6&&n>0&&(n=(n+10).toString(),n=n.substring(1)),n<0&&n>-1&&(n=(n-10).toString(),n="-"+n.substring(2)),n=n.toString()):(i=n.split("."),i[1]!==undefined&&(+i[1]==0?n=i[0]:(i[1]=i[1].replace(/0*$/,""),n=i.join("."))))),t.lZero==="keep"?n:n.replace(/^0*(\d)/,"$1")}function h(n,t,i){return t&&t!=="."&&(n=n.replace(t,".")),i&&i!=="-"&&(n=n.replace(i,"-")),n.match(/\d/)||(n+="0"),n}function p(n,t,i){return i&&i!=="-"&&(n=n.replace("-",i)),t&&t!=="."&&(n=n.replace(".",t)),n}function f(n,t,i){return n===""||n===t.aNeg?t.wEmpty==="zero"?n+"0":t.wEmpty==="sign"||i?n+t.aSign:n:null}function c(n,i){var h,o,e,r,u,c;if(n=t(n,i),h=n.replace(",","."),o=f(n,i,!0),o!==null)return o;if(e="",e=i.dGroup===2?/(\d)((\d)(\d{2}?)+)$/:i.dGroup===4?/(\d)((\d{4}?)+)$/:/(\d)((\d{3}?)+)$/,r=n.split(i.aDec),i.altDec&&r.length===1&&(r=n.split(i.altDec)),u=r[0],i.aSep)while(e.test(u))u=u.replace(e,"$1"+i.aSep+"$2");return i.mDec!==0&&r.length>1?(r[1].length>i.mDec&&(r[1]=r[1].substring(0,i.mDec)),n=u+i.aDec+r[1]):n=u,i.aSign&&(c=n.indexOf(i.aNeg)!==-1,n=n.replace(i.aNeg,""),n=i.pSign==="p"?i.aSign+n:n+i.aSign,c&&(n=i.aNeg+n)),h<0&&i.nBracket!==null&&(n=s(n,i)),n}function e(n,t){var v;n=n===""?"0":n.toString();u(t,"mDec");t.mRound==="CHF"&&(n=(Math.round(n*20)/20).toString());var i="",r=0,e="",s=typeof t.aPad=="boolean"||t.aPad===null?t.aPad?t.mDec:0:+t.aPad,p=function(n){var t=s===0?/(\.(?:\d*[1-9])?)0*$/:s===1?/(\.\d(?:\d*[1-9])?)0*$/:new RegExp("(\\.\\d{"+s+"}(?:\\d*[1-9])?)0*$");return n=n.replace(t,"$1"),s===0&&(n=n.replace(/\.$/,"")),n};n.charAt(0)==="-"&&(e="-",n=n.replace("-",""));n.match(/^\d/)||(n="0"+n);e==="-"&&+n==0&&(e="");(+n>0&&t.lZero!=="keep"||n.length>0&&t.lZero==="allow")&&(n=n.replace(/^0*(\d)/,"$1"));var a=n.lastIndexOf("."),w=a===-1?n.length-1:a,h=n.length-1-w;if(h<=t.mDec){if(i=n,h<s)for(a===-1&&(i+="."),v="000000";h<s;)v=v.substring(0,s-h),i+=v,h+=v.length;else h>s?i=p(i):h===0&&s===0&&(i=i.replace(/\.$/,""));if(t.mRound!=="CHF")return+i==0?i:e+i;t.mRound==="CHF"&&(a=i.lastIndexOf("."),n=i)}var c=a+t.mDec,o=+n.charAt(c+1),f=n.substring(0,c+1).split(""),y=n.charAt(c)==="."?n.charAt(c-1)%2:n.charAt(c)%2,l=!0;if(y!==1&&(y=y===0&&n.substring(c+2,n.length)>0?1:0),o>4&&t.mRound==="S"||o>4&&t.mRound==="A"&&e===""||o>5&&t.mRound==="A"&&e==="-"||o>5&&t.mRound==="s"||o>5&&t.mRound==="a"&&e===""||o>4&&t.mRound==="a"&&e==="-"||o>5&&t.mRound==="B"||o===5&&t.mRound==="B"&&y===1||o>0&&t.mRound==="C"&&e===""||o>0&&t.mRound==="F"&&e==="-"||o>0&&t.mRound==="U"||t.mRound==="CHF")for(r=f.length-1;r>=0;r-=1)if(f[r]!=="."){if(t.mRound==="CHF"&&f[r]<=2&&l){f[r]=0;l=!1;break}if(t.mRound==="CHF"&&f[r]<=7&&l){f[r]=5;l=!1;break}if(t.mRound==="CHF"&&l?(f[r]=10,l=!1):f[r]=+f[r]+1,f[r]<10)break;r>0&&(f[r]="0")}return f=f.slice(0,c+1),i=p(f.join("")),+i==0?i:e+i}function w(n,t,i){var f=t.aDec,u=t.mDec,r;return n=i==="paste"?e(n,t):n,f&&u&&(r=n.split(f),r[1]&&r[1].length>u&&(u>0?(r[1]=r[1].substring(0,u),n=r.join(f)):n=r[0])),n}function l(n,i){n=t(n,i);n=w(n,i);n=h(n,i.aDec,i.aNeg);var r=+n;return r>=i.vMin&&r<=i.vMax}function b(t,i){this.settings=i;this.that=t;this.$that=n(t);this.formatted=!1;this.settingsClone=v(this.$that,this.settings);this.value=t.value}function r(t){return typeof t=="string"&&(t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),t="#"+t.replace(/(:|\.)/g,"\\$1")),n(t)}function i(n,t,i){var r=n.data("autoNumeric"),u;return r||(r={},n.data("autoNumeric",r)),u=r.holder,(u===undefined&&t||i)&&(u=new b(n.get(0),t),r.holder=u),u}b.prototype={init:function(n){this.value=this.that.value;this.settingsClone=v(this.$that,this.settings);this.ctrlKey=n.ctrlKey;this.cmdKey=n.metaKey;this.shiftKey=n.shiftKey;this.selection=k(this.that);(n.type==="keydown"||n.type==="keyup")&&(this.kdCode=n.keyCode);this.which=n.which;this.processed=!1;this.formatted=!1},setSelection:function(n,t,i){n=Math.max(n,0);t=Math.min(t,this.that.value.length);this.selection={start:n,end:t,length:t-n};(i===undefined||i)&&o(this.that,n,t)},setPosition:function(n,t){this.setSelection(n,n,t)},getBeforeAfter:function(){var n=this.value,t=n.substring(0,this.selection.start),i=n.substring(this.selection.end,n.length);return[t,i]},getBeforeAfterStriped:function(){var n=this.getBeforeAfter();return n[0]=t(n[0],this.settingsClone),n[1]=t(n[1],this.settingsClone),n},normalizeParts:function(n,i){var r=this.settingsClone,e,u,f;return i=t(i,r),e=i.match(/^\d/)?!0:"leading",n=t(n,r,e),(n===""||n===r.aNeg)&&r.lZero==="deny"&&i>""&&(i=i.replace(/^0*(\d)/,"$1")),u=n+i,r.aDec&&(f=u.match(new RegExp("^"+r.aNegRegAutoStrip+"\\"+r.aDec)),f&&(n=n.replace(f[1],f[1]+"0"),u=n+i)),r.wEmpty==="zero"&&(u===r.aNeg||u==="")&&(n+="0"),[n,i]},setValueParts:function(n,t,i){var f=this.settingsClone,e=this.normalizeParts(n,t),r=e.join(""),u=e[0].length;return l(r,f)?(r=w(r,f,i),u>r.length&&(u=r.length),this.value=r,this.setPosition(u,!1),!0):!1},signPosition:function(){var n=this.settingsClone,u=n.aSign,i=this.that,t,f,r;return u?(t=u.length,n.pSign==="p")?(f=n.aNeg&&i.value&&i.value.charAt(0)===n.aNeg,f?[1,t+1]:[0,t]):(r=i.value.length,[r-t,r]):[1e3,-1]},expandSelectionOnSign:function(n){var t=this.signPosition(),i=this.selection;i.start<t[1]&&i.end>t[0]&&((i.start<t[0]||i.end>t[1])&&this.value.substring(Math.max(i.start,t[0]),Math.min(i.end,t[1])).match(/^\s*$/)?i.start<t[0]?this.setSelection(i.start,t[0],n):this.setSelection(t[1],i.end,n):this.setSelection(Math.min(i.start,t[0]),Math.max(i.end,t[1]),n))},checkPaste:function(){if(this.valuePartsBeforePaste!==undefined){var n=this.getBeforeAfter(),i=this.valuePartsBeforePaste;delete this.valuePartsBeforePaste;n[0]=n[0].substr(0,i[0].length)+t(n[0].substr(i[0].length),this.settingsClone);this.setValueParts(n[0],n[1],"paste")||(this.value=i.join(""),this.setPosition(i[0].length,!1))}},skipAllways:function(n){var t=this.kdCode,e=this.which,i=this.ctrlKey,r=this.cmdKey,s=this.shiftKey;if((i||r)&&n.type==="keyup"&&this.valuePartsBeforePaste!==undefined||s&&t===45)return this.checkPaste(),!1;if(t>=112&&t<=123||t>=91&&t<=93||t>=9&&t<=31||t<8&&(e===0||e===t)||t===144||t===145||t===45||t===224||(i||r)&&t===65)return!0;if((i||r)&&(t===67||t===86||t===88))return n.type==="keydown"&&this.expandSelectionOnSign(),(t===86||t===45)&&(n.type==="keydown"||n.type==="keypress"?this.valuePartsBeforePaste===undefined&&(this.valuePartsBeforePaste=this.getBeforeAfter()):this.checkPaste()),n.type==="keydown"||n.type==="keypress"||t===67;if(i||r)return!0;if(t===37||t===39){var f=this.settingsClone.aSep,u=this.selection.start,o=this.that.value;return n.type==="keydown"&&f&&!this.shiftKey&&(t===37&&o.charAt(u-2)===f?this.setPosition(u-1):t===39&&o.charAt(u+1)===f&&this.setPosition(u+1)),!0}return t>=34&&t<=40?!0:!1},processAllways:function(){var n;return this.kdCode===8||this.kdCode===46?(this.selection.length?(this.expandSelectionOnSign(!1),n=this.getBeforeAfterStriped(),this.setValueParts(n[0],n[1])):(n=this.getBeforeAfterStriped(),this.kdCode===8?n[0]=n[0].substring(0,n[0].length-1):n[1]=n[1].substring(1,n[1].length),this.setValueParts(n[0],n[1])),!0):!1},processKeypress:function(){var n=this.settingsClone,r=String.fromCharCode(this.which),u=this.getBeforeAfterStriped(),t=u[0],i=u[1];return r===n.aDec||n.altDec&&r===n.altDec||(r==="."||r===",")&&this.kdCode===110?!n.mDec||!n.aDec?!0:n.aNeg&&i.indexOf(n.aNeg)>-1?!0:t.indexOf(n.aDec)>-1?!0:i.indexOf(n.aDec)>0?!0:(i.indexOf(n.aDec)===0&&(i=i.substr(1)),this.setValueParts(t+n.aDec,i),!0):r==="-"||r==="+"?n.aNeg?(t===""&&i.indexOf(n.aNeg)>-1&&(t=n.aNeg,i=i.substring(1,i.length)),t=t.charAt(0)===n.aNeg?t.substring(1,t.length):r==="-"?n.aNeg+t:t,this.setValueParts(t,i),!0):!0:r>="0"&&r<="9"?(n.aNeg&&t===""&&i.indexOf(n.aNeg)>-1&&(t=n.aNeg,i=i.substring(1,i.length)),n.vMax<=0&&n.vMin<n.vMax&&this.value.indexOf(n.aNeg)===-1&&r!=="0"&&(t=n.aNeg+t),this.setValueParts(t+r,i),!0):!0},formatQuick:function(){var n=this.settingsClone,t=this.getBeforeAfterStriped(),o=this.value,f,s,i,r,e,u,l,h;if((n.aSep===""||n.aSep!==""&&o.indexOf(n.aSep)===-1)&&(n.aSign===""||n.aSign!==""&&o.indexOf(n.aSign)===-1)&&(f=[],s="",f=o.split(n.aDec),f[0].indexOf("-")>-1&&(s="-",f[0]=f[0].replace("-",""),t[0]=t[0].replace("-","")),f[0].length>n.mInt&&t[0].charAt(0)==="0"&&(t[0]=t[0].slice(1)),t[0]=s+t[0]),i=c(this.value,this.settingsClone),r=i.length,i){for(e=t[0].split(""),u=0,u;u<e.length;u+=1)e[u].match("\\d")||(e[u]="\\"+e[u]);l=new RegExp("^.*?"+e.join(".*?"));h=i.match(l);h?(r=h[0].length,(r===0&&i.charAt(0)!==n.aNeg||r===1&&i.charAt(0)===n.aNeg)&&n.aSign&&n.pSign==="p"&&(r=this.settingsClone.aSign.length+(i.charAt(0)==="-"?1:0))):n.aSign&&n.pSign==="s"&&(r-=n.aSign.length)}this.that.value=i;this.setPosition(r);this.formatted=!0}};var a={init:function(r){return this.each(function(){var u=n(this),v=u.data("autoNumeric"),b=u.data(),w=u.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])"),a,y;if(typeof v!="object")v=n.extend({},n.fn.autoNumeric.defaults,b,r,{aNum:"0123456789",hasFocus:!1,removeBrackets:!1,runOnce:!1,tagList:["b","caption","cite","code","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","ins","kdb","label","li","output","p","q","s","sample","span","strong","td","th","u","var"]}),v.aDec===v.aSep&&n.error("autoNumeric will not function properly when the decimal character aDec: '"+v.aDec+"' and thousand separator aSep: '"+v.aSep+"' are the same character"),u.data("autoNumeric",v);else return this;if(a=i(u,v),w||u.prop("tagName").toLowerCase()!=="input"||n.error('The input type "'+u.prop("type")+'" is not supported by autoNumeric()'),n.inArray(u.prop("tagName").toLowerCase(),v.tagList)===-1&&u.prop("tagName").toLowerCase()!=="input"&&n.error("The <"+u.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),v.runOnce===!1&&v.aForm&&(w&&(y=!0,u[0].value===""&&v.wEmpty==="empty"&&(u[0].value="",y=!1),u[0].value===""&&v.wEmpty==="sign"&&(u[0].value=v.aSign,y=!1),y&&u.val()!==""&&(v.anDefault===null&&u[0].value===u.prop("defaultValue")||v.anDefault!==null&&v.anDefault.toString()===u.val())&&u.autoNumeric("set",u.val())),n.inArray(u.prop("tagName").toLowerCase(),v.tagList)!==-1&&u.text()!==""&&u.autoNumeric("set",u.text())),v.runOnce=!0,u.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")){u.on("keydown.autoNumeric",function(t){return(a=i(u),a.settings.aDec===a.settings.aSep&&n.error("autoNumeric will not function properly when the decimal character aDec: '"+a.settings.aDec+"' and thousand separator aSep: '"+a.settings.aSep+"' are the same character"),a.that.readOnly)?(a.processed=!0,!0):(a.init(t),a.skipAllways(t))?(a.processed=!0,!0):a.processAllways()?(a.processed=!0,a.formatQuick(),t.preventDefault(),!1):(a.formatted=!1,!0)});u.on("keypress.autoNumeric",function(n){a=i(u);var t=a.processed;if(a.init(n),a.skipAllways(n))return!0;if(t)return n.preventDefault(),!1;if(a.processAllways()||a.processKeypress())return a.formatQuick(),n.preventDefault(),!1;a.formatted=!1});u.on("keyup.autoNumeric",function(n){a=i(u);a.init(n);var t=a.skipAllways(n);if((a.kdCode=0,delete a.valuePartsBeforePaste,u[0].value===a.settings.aSign&&(a.settings.pSign==="s"?o(this,0,0):o(this,a.settings.aSign.length,a.settings.aSign.length)),t)||this.value==="")return!0;a.formatted||a.formatQuick()});u.on("focusin.autoNumeric",function(){var n,r,t;a=i(u);n=a.settingsClone;n.hasFocus=!0;n.nBracket!==null&&(r=u.val(),u.val(s(r,n)));a.inVal=u.val();t=f(a.inVal,n,!0);t!==null&&t!==""&&u.val(t)});u.on("focusout.autoNumeric",function(){var s,o;a=i(u);var r=a.settingsClone,n=u.val(),v=n;r.hasFocus=!1;s="";r.lZero==="allow"&&(r.allowLeading=!1,s="leading");n!==""&&(n=t(n,r,s),f(n,r)===null&&l(n,r,u[0])?(n=h(n,r.aDec,r.aNeg),n=e(n,r),n=p(n,r.aDec,r.aNeg)):n="");o=f(n,r,!1);o===null&&(o=c(n,r));(o!==a.inVal||o!==v)&&(u.val(o),u.change(),delete a.inVal)})}})},destroy:function(){return n(this).each(function(){var t=n(this);t.off(".autoNumeric");t.removeData("autoNumeric")})},update:function(t){return n(this).each(function(){var f=r(n(this)),u=f.data("autoNumeric"),e;if(typeof u!="object"&&n.error("You must initialize autoNumeric('init', {options}) prior to calling the 'update' method"),e=f.autoNumeric("get"),u=n.extend(u,t),i(f,u,!0),u.aDec===u.aSep&&n.error("autoNumeric will not function properly when the decimal character aDec: '"+u.aDec+"' and thousand separator aSep: '"+u.aSep+"' are the same character"),f.data("autoNumeric",u),f.val()!==""||f.text()!=="")return f.autoNumeric("set",e)})},set:function(t){if(t!==null)return n(this).each(function(){var f=r(n(this)),u=f.data("autoNumeric"),i=t.toString(),o=t.toString(),s=f.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])");return(typeof u!="object"&&n.error("You must initialize autoNumeric('init', {options}) prior to calling the 'set' method"),(o===f.attr("value")||o===f.text())&&u.runOnce===!1&&(i=i.replace(",",".")),n.isNumeric(+i)||n.error("The value ("+i+") being 'set' is not numeric and has caused a error to be thrown"),i=y(i,u),u.setEvent=!0,i.toString(),i!==""&&(i=e(i,u)),i=p(i,u.aDec,u.aNeg),l(i,u)||(i=e("",u)),i=c(i,u),s)?f.val(i):n.inArray(f.prop("tagName").toLowerCase(),u.tagList)!==-1?f.text(i):!1})},get:function(){var f=r(n(this)),i=f.data("autoNumeric"),u;return(typeof i!="object"&&n.error("You must initialize autoNumeric('init', {options}) prior to calling the 'get' method"),u="",f.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")?u=f.eq(0).val():n.inArray(f.prop("tagName").toLowerCase(),i.tagList)!==-1?u=f.eq(0).text():n.error("The <"+f.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),u===""&&i.wEmpty==="empty"||u===i.aSign&&(i.wEmpty==="sign"||i.wEmpty==="empty"))?"":(u!==""&&i.nBracket!==null&&(i.removeBrackets=!0,u=s(u,i),i.removeBrackets=!1),(i.runOnce||i.aForm===!1)&&(u=t(u,i)),u=h(u,i.aDec,i.aNeg),+u==0&&i.lZero!=="keep"&&(u="0"),i.lZero==="keep")?u:y(u,i)},getString:function(){var o=!1,s=r(n(this)),c=s.serialize(),u=c.split("&"),f=n("form").index(s),h=n("form:eq("+f+")"),i=[],e=[],l=/^(?:submit|button|image|reset|file)$/i,a=/^(?:input|select|textarea|keygen)/i,v=/^(?:checkbox|radio)$/i,y=/^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i,t=0;return n.each(h[0],function(n,i){i.name===""||!a.test(i.localName)||l.test(i.type)||i.disabled||!i.checked&&v.test(i.type)?e.push(-1):(e.push(t),t=t+1)}),t=0,n.each(h[0],function(n,r){r.localName==="input"&&(r.type===""||r.type==="text"||r.type==="hidden"||r.type==="tel")?(i.push(t),t=t+1):(i.push(-1),r.localName==="input"&&y.test(r.type)&&(t=t+1))}),n.each(u,function(t,r){var s,h,c;r=u[t].split("=");s=n.inArray(t,e);s>-1&&i[s]>-1&&(h=n("form:eq("+f+") input:eq("+i[s]+")"),c=h.data("autoNumeric"),typeof c=="object"&&r[1]!==null&&(r[1]=n("form:eq("+f+") input:eq("+i[s]+")").autoNumeric("get").toString(),u[t]=r.join("="),o=!0))}),o||n.error("You must initialize autoNumeric('init', {options}) prior to calling the 'getString' method"),u.join("&")},getArray:function(){var e=!1,o=r(n(this)),s=o.serializeArray(),u=n("form").index(o),h=n("form:eq("+u+")"),i=[],f=[],c=/^(?:submit|button|image|reset|file)$/i,l=/^(?:input|select|textarea|keygen)/i,a=/^(?:checkbox|radio)$/i,v=/^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i,t=0;return n.each(h[0],function(n,i){i.name===""||!l.test(i.localName)||c.test(i.type)||i.disabled||!i.checked&&a.test(i.type)?f.push(-1):(f.push(t),t=t+1)}),t=0,n.each(h[0],function(n,r){r.localName==="input"&&(r.type===""||r.type==="text"||r.type==="hidden"||r.type==="tel")?(i.push(t),t=t+1):(i.push(-1),r.localName==="input"&&v.test(r.type)&&(t=t+1))}),n.each(s,function(t,r){var o=n.inArray(t,f),s,h;o>-1&&i[o]>-1&&(s=n("form:eq("+u+") input:eq("+i[o]+")"),h=s.data("autoNumeric"),typeof h=="object"&&(r.value=n("form:eq("+u+") input:eq("+i[o]+")").autoNumeric("get").toString(),e=!0))}),e||n.error("None of the successful form inputs are initialized by autoNumeric."),s},getSettings:function(){var t=r(n(this));return t.eq(0).data("autoNumeric")}};n.fn.autoNumeric=function(t){if(a[t])return a[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return a.init.apply(this,arguments);n.error('Method "'+t+'" is not supported by autoNumeric()')};n.fn.autoNumeric.defaults={aSep:",",dGroup:"3",aDec:".",altDec:null,aSign:"",pSign:"p",vMax:"9999999999999.99",vMin:"-9999999999999.99",mDec:null,mRound:"S",aPad:!0,nBracket:null,wEmpty:"empty",lZero:"allow",sNumber:!0,aForm:!0,anDefault:null}})(jQuery)