text: /*! angular-income.min.js 10-03-2015 */
  !function(a,b){"use strict";function c(){function a(a){return b.isUndefined(a)?"":a.toString().replace(/,/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}function c(a){var b=a.keyCode,c=a.ctrlKey,d=[8,9,13,27,46].indexOf(b),e=[65,67,86,88,90].indexOf(b),f=b>=35&&39>=b,g=a.metaKey||a.ctrlKey||a.altKey;return-1!==d||-1!==e&&c||f||g}function d(a){return!((a.keyCode<48||a.keyCode>57)&&(a.keyCode<96||a.keyCode>105))}function e(a){if("selectionStart"in a)return a.selectionStart;if(document.selection){a.focus();var b=document.selection.createRange(),c=document.selection.createRange().text.length;return b.moveStart("character",-a.value.length),b.text.length-c}}function f(a,c){b.forEach(a,function(a){if(a.setSelectionRange)a.setSelectionRange(c,c);else if(a.createTextRange){var b=a.createTextRange();b.collapse(!0),b.moveEnd("character",c),b.moveStart("character",c),b.select()}})}function g(a,b){a.on("keydown",function(a){b.keydown&&b.keydown(a)}),a.on("keyup",function(a){b.keyup&&b.keyup(a)})}var h={bind:g,addCommas:a,numberOnly:d,specialKeys:c,getCursorPosition:e,setCursorPosition:f};return h}function d(a,c){function d(d,e,f){var g=c(f.angularIncome),h=c(f.aiError),i=10,j="";f.aiMaxLength&&f.aiMaxLength.length>0&&(i=parseInt(f.aiMaxLength,10)),f.aiValue&&f.aiValue.length>0&&(j=f.aiValue,e.val(a.addCommas(j))),a.bind(e,{keydown:function(b){if(!a.specialKeys(b)){var c=e.val(),f=c.replace(/[^0-9]/g,"");if(f.length>=i)h(d,{data:{type:"maxLength",value:c,keyCode:b.keyCode}});else{if(a.numberOnly(b))return;h(d,{data:{type:"NaN",value:c,keyCode:b.keyCode}})}b.preventDefault()}},keyup:function(c){var f=a.getCursorPosition(e[0]),h=e.val().length,i=a.addCommas(e.val());if(d.$apply(function(){e.val(i),b.extend(c,{val:i,value:parseInt(i.replace(/,/g,""),10)}),g(d,{$event:c})}),!c.ctrlKey){var j=f+e.val().length-h;a.setCursorPosition(e,j)}}})}var e={link:d};return e}b.module("angular.income",[]).factory("angular.income.service",c).directive("angularIncome",d),c.$inject=[],d.$inject=["angular.income.service","$parse"]}(window,window.angular);