<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,7 @@
+/**
+ * @version: 1.1.3
+ * Created by Fabio M. Costa on 2008-09-16. Please report any bug at http://www.meiocodigo.com
+ * Copyright (c) 2008 Fabio M. Costa http://www.meiocodigo.com
+ * The MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
 (function(D){var C=(window.orientation!=undefined),A=((D.browser.opera||(D.browser.mozilla&amp;&amp;parseFloat(D.browser.version.substr(0,3))&lt;1.9))?&quot;input&quot;:&quot;paste&quot;);D.event.special.paste={setup:function(){if(this.addEventListener){this.addEventListener(A,B,false)}else{if(this.attachEvent){this.attachEvent(A,B)}}},teardown:function(){if(this.removeEventListener){this.removeEventListener(A,B,false)}else{if(this.detachEvent){this.detachEvent(A,B)}}}};function B(F){var E=this;F=D.event.fix(F||window.e);F.type=&quot;paste&quot;;setTimeout(function(){D.event.handle.call(E,F)},1)}D.extend({mask:{rules:{&quot;z&quot;:/[a-z]/,&quot;Z&quot;:/[A-Z]/,&quot;a&quot;:/[a-zA-Z]/,&quot;*&quot;:/[0-9a-zA-Z]/,&quot;@&quot;:/[0-9a-zA-Z&#231;&#199;&#225;&#224;&#227;&#226;&#233;&#232;&#234;&#237;&#236;&#243;&#242;&#244;&#245;&#250;&#249;&#252;]/},keyRepresentation:{8:&quot;backspace&quot;,9:&quot;tab&quot;,13:&quot;enter&quot;,16:&quot;shift&quot;,17:&quot;control&quot;,18:&quot;alt&quot;,27:&quot;esc&quot;,33:&quot;page up&quot;,34:&quot;page down&quot;,35:&quot;end&quot;,36:&quot;home&quot;,37:&quot;left&quot;,38:&quot;up&quot;,39:&quot;right&quot;,40:&quot;down&quot;,45:&quot;insert&quot;,46:&quot;delete&quot;,116:&quot;f5&quot;,123:&quot;f12&quot;,224:&quot;command&quot;},iphoneKeyRepresentation:{10:&quot;go&quot;,127:&quot;delete&quot;},signals:{&quot;+&quot;:&quot;&quot;,&quot;-&quot;:&quot;-&quot;},options:{attr:&quot;alt&quot;,mask:null,type:&quot;fixed&quot;,maxLength:-1,defaultValue:&quot;&quot;,signal:false,textAlign:true,selectCharsOnFocus:true,autoTab:true,setSize:false,fixedChars:&quot;[(),.:/ -]&quot;,onInvalid:function(){},onValid:function(){},onOverflow:function(){}},masks:{&quot;phone&quot;:{mask:&quot;(99) 9999-9999&quot;},&quot;phone-us&quot;:{mask:&quot;(999) 999-9999&quot;},&quot;cpf&quot;:{mask:&quot;999.999.999-99&quot;},&quot;cnpj&quot;:{mask:&quot;99.999.999/9999-99&quot;},&quot;date&quot;:{mask:&quot;39/19/9999&quot;},&quot;date-us&quot;:{mask:&quot;19/39/9999&quot;},&quot;cep&quot;:{mask:&quot;99999-999&quot;},&quot;time&quot;:{mask:&quot;29:59&quot;},&quot;cc&quot;:{mask:&quot;9999 9999 9999 9999&quot;},&quot;integer&quot;:{mask:&quot;999.999.999.999&quot;,type:&quot;reverse&quot;},&quot;decimal&quot;:{mask:&quot;99,999.999.999.999&quot;,type:&quot;reverse&quot;,defaultValue:&quot;000&quot;},&quot;decimal-us&quot;:{mask:&quot;99.999,999,999,999&quot;,type:&quot;reverse&quot;,defaultValue:&quot;000&quot;},&quot;signed-decimal&quot;:{mask:&quot;99,999.999.999.999&quot;,type:&quot;reverse&quot;,defaultValue:&quot;+000&quot;},&quot;signed-decimal-us&quot;:{mask:&quot;99,999.999.999.999&quot;,type:&quot;reverse&quot;,defaultValue:&quot;+000&quot;}},init:function(){if(!this.hasInit){var E=this,F,G=(C)?this.iphoneKeyRepresentation:this.keyRepresentation;this.ignore=false;for(F=0;F&lt;=9;F++){this.rules[F]=new RegExp(&quot;[0-&quot;+F+&quot;]&quot;)}this.keyRep=G;this.ignoreKeys=[];D.each(G,function(H){E.ignoreKeys.push(parseInt(H))});this.hasInit=true}},set:function(I,F){var E=this,G=D(I),H=&quot;maxLength&quot;;F=F||{};this.init();return G.each(function(){if(F.attr){E.options.attr=F.attr}var O=D(this),Q=D.extend({},E.options),N=O.attr(Q.attr),J=&quot;&quot;;J=(typeof F==&quot;string&quot;)?F:(N!=&quot;&quot;)?N:null;if(J){Q.mask=J}if(E.masks[J]){Q=D.extend(Q,E.masks[J])}if(typeof F==&quot;object&quot;&amp;&amp;F.constructor!=Array){Q=D.extend(Q,F)}if(D.metadata){Q=D.extend(Q,O.metadata())}if(Q.mask!=null){if(O.data(&quot;mask&quot;)){E.unset(O)}var K=Q.defaultValue,L=(Q.type==&quot;reverse&quot;),M=new RegExp(Q.fixedChars,&quot;g&quot;);if(Q.maxLength==-1){Q.maxLength=O.attr(H)}Q=D.extend({},Q,{fixedCharsReg:new RegExp(Q.fixedChars),fixedCharsRegG:M,maskArray:Q.mask.split(&quot;&quot;),maskNonFixedCharsArray:Q.mask.replace(M,&quot;&quot;).split(&quot;&quot;)});if((Q.type==&quot;fixed&quot;||L)&amp;&amp;Q.setSize&amp;&amp;!O.attr(&quot;size&quot;)){O.attr(&quot;size&quot;,Q.mask.length)}if(L&amp;&amp;Q.textAlign){O.css(&quot;text-align&quot;,&quot;right&quot;)}if(this.value!=&quot;&quot;||K!=&quot;&quot;){var P=E.string((this.value!=&quot;&quot;)?this.value:K,Q);this.defaultValue=P;O.val(P)}if(Q.type==&quot;infinite&quot;){Q.type=&quot;repeat&quot;}O.data(&quot;mask&quot;,Q);O.removeAttr(H);O.bind(&quot;keydown.mask&quot;,{func:E._onKeyDown,thisObj:E},E._onMask).bind(&quot;keypress.mask&quot;,{func:E._onKeyPress,thisObj:E},E._onMask).bind(&quot;keyup.mask&quot;,{func:E._onKeyUp,thisObj:E},E._onMask).bind(&quot;paste.mask&quot;,{func:E._onPaste,thisObj:E},E._onMask).bind(&quot;focus.mask&quot;,E._onFocus).bind(&quot;blur.mask&quot;,E._onBlur).bind(&quot;change.mask&quot;,E._onChange)}})},unset:function(F){var E=D(F);return E.each(function(){var H=D(this);if(H.data(&quot;mask&quot;)){var G=H.data(&quot;mask&quot;).maxLength;if(G!=-1){H.attr(&quot;maxLength&quot;,G)}H.unbind(&quot;.mask&quot;).removeData(&quot;mask&quot;)}})},string:function(J,F){this.init();var I={};if(typeof J!=&quot;string&quot;){J=String(J)}switch(typeof F){case&quot;string&quot;:if(this.masks[F]){I=D.extend(I,this.masks[F])}else{I.mask=F}break;case&quot;object&quot;:I=F}if(!I.fixedChars){I.fixedChars=this.options.fixedChars}var E=new RegExp(I.fixedChars),G=new RegExp(I.fixedChars,&quot;g&quot;);if((I.type==&quot;reverse&quot;)&amp;&amp;I.defaultValue){if(typeof this.signals[I.defaultValue.charAt(0)]!=&quot;undefined&quot;){var H=J.charAt(0);I.signal=(typeof this.signals[H]!=&quot;undefined&quot;)?this.signals[H]:this.signals[I.defaultValue.charAt(0)];I.defaultValue=I.defaultValue.substring(1)}}return this.__maskArray(J.split(&quot;&quot;),I.mask.replace(G,&quot;&quot;).split(&quot;&quot;),I.mask.split(&quot;&quot;),I.type,I.maxLength,I.defaultValue,E,I.signal)},_onFocus:function(G){var F=D(this),E=F.data(&quot;mask&quot;);E.inputFocusValue=F.val();E.changed=false;if(E.selectCharsOnFocus){F.select()}},_onBlur:function(G){var F=D(this),E=F.data(&quot;mask&quot;);if(E.inputFocusValue!=F.val()&amp;&amp;!E.changed){F.trigger(&quot;change&quot;)}},_onChange:function(E){D(this).data(&quot;mask&quot;).changed=true},_onMask:function(E){var G=E.data.thisObj,F={};F._this=E.target;F.$this=D(F._this);if(F.$this.attr(&quot;readonly&quot;)){return true}F.data=F.$this.data(&quot;mask&quot;);F[F.data.type]=true;F.value=F.$this.val();F.nKey=G.__getKeyNumber(E);F.range=G.__getRange(F._this);F.valueArray=F.value.split(&quot;&quot;);return E.data.func.call(G,E,F)},_onKeyDown:function(F,G){this.ignore=D.inArray(G.nKey,this.ignoreKeys)&gt;-1||F.ctrlKey||F.metaKey||F.altKey;if(this.ignore){var E=this.keyRep[G.nKey];G.data.onValid.call(G._this,E?E:&quot;&quot;,G.nKey)}return C?this._keyPress(F,G):true},_onKeyUp:function(E,F){if(F.nKey==9||F.nKey==16){return true}if(F.data.type==&quot;repeat&quot;){this.__autoTab(F);return true}return this._onPaste(E,F)},_onPaste:function(F,G){if(G.reverse){this.__changeSignal(F.type,G)}var E=this.__maskArray(G.valueArray,G.data.maskNonFixedCharsArray,G.data.maskArray,G.data.type,G.data.maxLength,G.data.defaultValue,G.data.fixedCharsReg,G.data.signal);G.$this.val(E);if(!G.reverse&amp;&amp;G.data.defaultValue.length&amp;&amp;(G.range.start==G.range.end)){this.__setRange(G._this,G.range.start,G.range.end)}if((D.browser.msie||D.browser.safari)&amp;&amp;!G.reverse){this.__setRange(G._this,G.range.start,G.range.end)}if(this.ignore){return true}this.__autoTab(G);return true},_onKeyPress:function(L,E){if(this.ignore){return true}if(E.reverse){this.__changeSignal(L.type,E)}var M=String.fromCharCode(E.nKey),O=E.range.start,I=E.value,G=E.data.maskArray;if(E.reverse){var H=I.substr(0,O),K=I.substr(E.range.end,I.length);I=H+M+K;if(E.data.signal&amp;&amp;(O-E.data.signal.length&gt;0)){O-=E.data.signal.length}}var N=I.replace(E.data.fixedCharsRegG,&quot;&quot;).split(&quot;&quot;),F=this.__extraPositionsTill(O,G,E.data.fixedCharsReg);E.rsEp=O+F;if(E.repeat){E.rsEp=0}if(!this.rules[G[E.rsEp]]||(E.data.maxLength!=-1&amp;&amp;N.length&gt;=E.data.maxLength&amp;&amp;E.repeat)){E.data.onOverflow.call(E._this,M,E.nKey);return false}else{if(!this.rules[G[E.rsEp]].test(M)){E.data.onInvalid.call(E._this,M,E.nKey);return false}else{E.data.onValid.call(E._this,M,E.nKey)}}var J=this.__maskArray(N,E.data.maskNonFixedCharsArray,G,E.data.type,E.data.maxLength,E.data.defaultValue,E.data.fixedCharsReg,E.data.signal,F);E.$this.val(J);return(E.reverse)?this._keyPressReverse(L,E):(E.fixed)?this._keyPressFixed(L,E):true},_keyPressFixed:function(E,F){if(F.range.start==F.range.end){if((F.rsEp==0&amp;&amp;F.value.length==0)||F.rsEp&lt;F.value.length){this.__setRange(F._this,F.rsEp,F.rsEp+1)}}else{this.__setRange(F._this,F.range.start,F.range.end)}return true},_keyPressReverse:function(E,F){if(D.browser.msie&amp;&amp;((F.range.start==0&amp;&amp;F.range.end==0)||F.range.start!=F.range.end)){this.__setRange(F._this,F.value.length)}return false},__autoTab:function(F){if(F.data.autoTab&amp;&amp;((F.$this.val().length&gt;=F.data.maskArray.length&amp;&amp;!F.repeat)||(F.data.maxLength!=-1&amp;&amp;F.valueArray.length&gt;=F.data.maxLength&amp;&amp;F.repeat))){var E=this.__getNextInput(F._this,F.data.autoTab);if(E){F.$this.trigger(&quot;blur&quot;);E.focus().select()}}},__changeSignal:function(F,G){if(G.data.signal!==false){var E=(F==&quot;paste&quot;)?G.value.charAt(0):String.fromCharCode(G.nKey);if(this.signals&amp;&amp;(typeof this.signals[E]!=&quot;undefined&quot;)){G.data.signal=this.signals[E]}}},__getKeyNumber:function(E){return(E.charCode||E.keyCode||E.which)},__maskArray:function(M,H,G,J,E,K,N,L,F){if(J==&quot;reverse&quot;){M.reverse()}M=this.__removeInvalidChars(M,H,J==&quot;repeat&quot;||J==&quot;infinite&quot;);if(K){M=this.__applyDefaultValue.call(M,K)}M=this.__applyMask(M,G,F,N);switch(J){case&quot;reverse&quot;:M.reverse();return(L||&quot;&quot;)+M.join(&quot;&quot;).substring(M.length-G.length);case&quot;infinite&quot;:case&quot;repeat&quot;:var I=M.join(&quot;&quot;);return(E!=-1&amp;&amp;M.length&gt;=E)?I.substring(0,E):I;default:return M.join(&quot;&quot;).substring(0,G.length)}return&quot;&quot;},__applyDefaultValue:function(G){var E=G.length,F=this.length,H;for(H=F-1;H&gt;=0;H--){if(this[H]==G.charAt(0)){this.pop()}else{break}}for(H=0;H&lt;E;H++){if(!this[H]){this[H]=G.charAt(H)}}return this},__removeInvalidChars:function(H,G,E){for(var F=0,I=0;F&lt;H.length;F++){if(G[I]&amp;&amp;this.rules[G[I]]&amp;&amp;!this.rules[G[I]].test(H[F])){H.splice(F,1);if(!E){I--}F--}if(!E){I++}}return H},__applyMask:function(H,F,I,E){if(typeof I==&quot;undefined&quot;){I=0}for(var G=0;G&lt;H.length+I;G++){if(F[G]&amp;&amp;E.test(F[G])){H.splice(G,0,F[G])}}return H},__extraPositionsTill:function(H,F,E){var G=0;while(E.test(F[H++])){G++}return G},__getNextInput:function(N,F){var I=N.form.elements,H=D.inArray(N,I)+1,M=null,J;for(J=H;J&lt;I.length;J++){M=D(I[J]);if(this.__isNextInput(M,F)){return M}}var E=document.forms,G=D.inArray(N.form,E)+1,L,K=null;for(L=G;L&lt;E.length;L++){K=E[L].elements;for(J=0;J&lt;K.length;J++){M=D(K[J]);if(this.__isNextInput(M,F)){return M}}}return null},__isNextInput:function(G,E){var F=G.get(0);return F&amp;&amp;(F.offsetWidth&gt;0||F.offsetHeight&gt;0)&amp;&amp;F.nodeName!=&quot;FIELDSET&quot;&amp;&amp;(E===true||(typeof E==&quot;string&quot;&amp;&amp;G.is(E)))},__setRange:function(G,H,E){if(typeof E==&quot;undefined&quot;){E=H}if(G.setSelectionRange){G.setSelectionRange(H,E)}else{var F=G.createTextRange();F.collapse();F.moveStart(&quot;character&quot;,H);F.moveEnd(&quot;character&quot;,E-H);F.select()}},__getRange:function(F){if(!D.browser.msie){return{start:F.selectionStart,end:F.selectionEnd}}var G={start:0,end:0},E=document.selection.createRange();G.start=0-E.duplicate().moveStart(&quot;character&quot;,-100000);G.end=G.start+E.text.length;return G},unmaskedVal:function(E){return D(E).val().replace(D.mask.fixedCharsRegG,&quot;&quot;)}}});D.fn.extend({setMask:function(E){return D.mask.set(this,E)},unsetMask:function(){return D.mask.unset(this)},unmaskedVal:function(){return D.mask.unmaskedVal(this[0])}})})(jQuery)
\ No newline at end of file</diff>
      <filename>jquery.meio.mask.min.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b5e20d167948ae374573d13ce594d2caafa23469</id>
    </parent>
  </parents>
  <author>
    <name>F&#225;bio M. Costa</name>
    <email>fabio@meiocodigo.com</email>
  </author>
  <url>http://github.com/fabiomcosta/jquery-meiomask/commit/08b92c411a60ace9131de697179fda433178b8d9</url>
  <id>08b92c411a60ace9131de697179fda433178b8d9</id>
  <committed-date>2009-06-30T20:56:16-07:00</committed-date>
  <authored-date>2009-06-30T20:56:16-07:00</authored-date>
  <message>forgot comments on minified file
version is still 1.1.3 (i wont release 1.1.4 just for this little fix, but it will be there if you download now from the site, sorry for this inconsistency but i kinda release 1.1.3 after 1 day i released 1.1.2 so i wont release a new version in a too small space of time again)</message>
  <tree>90d7bbe2b1d1292bc98ffa545897b3f4f2d28b35</tree>
  <committer>
    <name>F&#225;bio M. Costa</name>
    <email>fabio@meiocodigo.com</email>
  </committer>
</commit>
