text: /*!
  * inputmask.min.js
  * http://github.com/RobinHerbots/jquery.inputmask
  * Copyright (c) 2010 - 2015 Robin Herbots
  * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  * Version: 3.2.5
  */
  !function(a){"function"==typeof define&&define.amd?define(["inputmask.dependencyLib"],a):"object"==typeof exports?module.exports=a(require("./inputmask.dependencyLib.jquery")):a(window.dependencyLib||jQuery)}(function(a){function b(c,d){return this instanceof b?("object"==typeof c?d=c:(d=d||{},d.alias=c),this.el=void 0,this.opts=a.extend(!0,{},this.defaults,d),this.noMasksCache=d&&void 0!==d.definitions,this.userOptions=d||{},void e(this.opts.alias,d,this.opts)):new b(c,d)}function c(a){var b=document.createElement("input"),c="on"+a,d=c in b;return d||(b.setAttribute(c,"return;"),d="function"==typeof b[c]),b=null,d}function d(a){var b="text"===a||"tel"===a||"password"===a;if(!b){var c=document.createElement("input");c.setAttribute("type",a),b="text"===c.type,c=null}return b}function e(b,c,d){var f=d.aliases[b];return f?(f.alias&&e(f.alias,void 0,d),a.extend(!0,d,f),a.extend(!0,d,c),!0):(null===d.mask&&(d.mask=b),!1)}function f(b,c,d){function f(a,c){c=void 0!==c?c:b.getAttribute("data-inputmask-"+a),null!==c&&("string"==typeof c&&(0===a.indexOf("on")?c=window[c]:"false"===c?c=!1:"true"===c&&(c=!0)),d[a]=c)}var g,h,i,j,k=b.getAttribute("data-inputmask");if(k&&""!==k&&(k=k.replace(new RegExp("'","g"),'"'),h=JSON.parse("{"+k+"}")),h){i=void 0;for(j in h)if("alias"===j.toLowerCase()){i=h[j];break}}f("alias",i),d.alias&&e(d.alias,d,c);for(g in c){if(h){i=void 0;for(j in h)if(j.toLowerCase()===g.toLowerCase()){i=h[j];break}}f(g,i)}return a.extend(!0,c,d),c}function g(c,d){function e(b){function d(a,b,c,d){this.matches=[],this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function e(b,d,e){var f=c.definitions[d];e=void 0!==e?e:b.matches.length;var g=b.matches[e-1];if(f&&!r){f.placeholder=a.isFunction(f.placeholder)?f.placeholder(c):f.placeholder;for(var h=f.prevalidator,i=h?h.length:0,j=1;j<f.cardinality;j++){var k=i>=j?h[j-1]:[],l=k.validator,m=k.cardinality;b.matches.splice(e++,0,{fn:l?"string"==typeof l?new RegExp(l):new function(){this.test=l}:new RegExp("."),cardinality:m?m:1,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==(f.definitionSymbol||d),casing:f.casing,def:f.definitionSymbol||d,placeholder:f.placeholder,mask:d}),g=b.matches[e-1]}b.matches.splice(e++,0,{fn:f.validator?"string"==typeof f.validator?new RegExp(f.validator):new function(){this.test=f.validator}:new RegExp("."),cardinality:f.cardinality,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==(f.definitionSymbol||d),casing:f.casing,def:f.definitionSymbol||d,placeholder:f.placeholder,mask:d})}else b.matches.splice(e++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==d,casing:null,def:d,placeholder:void 0,mask:d}),r=!1}function f(a,b){a.isGroup&&(a.isGroup=!1,e(a,c.groupmarker.start,0),b!==!0&&e(a,c.groupmarker.end))}function g(a,b,c,d){b.matches.length>0&&(void 0===d||d)&&(c=b.matches[b.matches.length-1],f(c)),e(b,a)}function h(){if(t.length>0){if(m=t[t.length-1],g(k,m,o,!m.isAlternator),m.isAlternator){n=t.pop();for(var a=0;a<n.matches.length;a++)n.matches[a].isGroup=!1;t.length>0?(m=t[t.length-1],m.matches.push(n)):s.matches.push(n)}}else g(k,s,o)}function i(a){function b(a){return a===c.optionalmarker.start?a=c.optionalmarker.end:a===c.optionalmarker.end?a=c.optionalmarker.start:a===c.groupmarker.start?a=c.groupmarker.end:a===c.groupmarker.end&&(a=c.groupmarker.start),a}a.matches=a.matches.reverse();for(var d in a.matches){var e=parseInt(d);if(a.matches[d].isQuantifier&&a.matches[e+1]&&a.matches[e+1].isGroup){var f=a.matches[d];a.matches.splice(d,1),a.matches.splice(e+1,0,f)}void 0!==a.matches[d].matches?a.matches[d]=i(a.matches[d]):a.matches[d]=b(a.matches[d])}return a}for(var j,k,l,m,n,o,p,q=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,r=!1,s=new d,t=[],u=[];j=q.exec(b);)if(k=j[0],r)h();else switch(k.charAt(0)){case c.escapeChar:r=!0;break;case c.optionalmarker.end:case c.groupmarker.end:if(l=t.pop(),void 0!==l)if(t.length>0){if(m=t[t.length-1],m.matches.push(l),m.isAlternator){n=t.pop();for(var v=0;v<n.matches.length;v++)n.matches[v].isGroup=!1;t.length>0?(m=t[t.length-1],m.matches.push(n)):s.matches.push(n)}}else s.matches.push(l);else h();break;case c.optionalmarker.start:t.push(new d(!1,!0));break;case c.groupmarker.start:t.push(new d(!0));break;case c.quantifiermarker.start:var w=new d(!1,!1,!0);k=k.replace(/[{}]/g,"");var x=k.split(","),y=isNaN(x[0])?x[0]:parseInt(x[0]),z=1===x.length?y:isNaN(x[1])?x[1]:parseInt(x[1]);if(("*"===z||"+"===z)&&(y="*"===z?0:1),w.quantifier={min:y,max:z},t.length>0){var A=t[t.length-1].matches;j=A.pop(),j.isGroup||(p=new d(!0),p.matches.push(j),j=p),A.push(j),A.push(w)}else j=s.matches.pop(),j.isGroup||(p=new d(!0),p.matches.push(j),j=p),s.matches.push(j),s.matches.push(w);break;case c.alternatormarker:t.length>0?(m=t[t.length-1],o=m.matches.pop()):o=s.matches.pop(),o.isAlternator?t.push(o):(n=new d(!1,!1,!1,!0),n.matches.push(o),t.push(n));break;default:h()}for(;t.length>0;)l=t.pop(),f(l,!0),s.matches.push(l);return s.matches.length>0&&(o=s.matches[s.matches.length-1],f(o),u.push(s)),c.numericInput&&i(u[0]),u}function f(f,g){if(null===f||""===f)return void 0;if(1===f.length&&c.greedy===!1&&0!==c.repeat&&(c.placeholder=""),c.repeat>0||"*"===c.repeat||"+"===c.repeat){var h="*"===c.repeat?0:"+"===c.repeat?1:c.repeat;f=c.groupmarker.start+f+c.groupmarker.end+c.quantifiermarker.start+h+","+c.repeat+c.quantifiermarker.end}var i;return void 0===b.prototype.masksCache[f]||d===!0?(i={mask:f,maskToken:e(f),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:g},d!==!0&&(b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]=i,i=a.extend(!0,{},b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]))):i=a.extend(!0,{},b.prototype.masksCache[c.numericInput?f.split("").reverse().join(""):f]),i}function g(a){return a=a.toString()}var h;if(a.isFunction(c.mask)&&(c.mask=c.mask(c)),a.isArray(c.mask)){if(c.mask.length>1){c.keepStatic=null===c.keepStatic?!0:c.keepStatic;var i="(";return a.each(c.numericInput?c.mask.reverse():c.mask,function(b,c){i.length>1&&(i+=")|("),i+=g(void 0===c.mask||a.isFunction(c.mask)?c:c.mask)}),i+=")",f(i,c.mask)}c.mask=c.mask.pop()}return c.mask&&(h=void 0===c.mask.mask||a.isFunction(c.mask.mask)?f(g(c.mask),c.mask):f(g(c.mask.mask),c.mask)),h}function h(e,f,g){function i(a,b,c){b=b||0;var d,e,f,g=[],h=0;do{if(a===!0&&p().validPositions[h]){var i=p().validPositions[h];e=i.match,d=i.locator.slice(),g.push(c===!0?i.input:K(h,e))}else f=u(h,d,h-1),e=f.match,d=f.locator.slice(),g.push(K(h,e));h++}while((void 0===qa||qa>h-1)&&null!==e.fn||null===e.fn&&""!==e.def||b>=h);return g.pop(),g}function p(){return f}function q(a){var b=p();b.buffer=void 0,b.tests={},a!==!0&&(b._buffer=void 0,b.validPositions={},b.p=0)}function r(a,b){var c=p(),d=-1,e=c.validPositions;void 0===a&&(a=-1);var f=d,g=d;for(var h in e){var i=parseInt(h);e[i]&&(b||null!==e[i].match.fn)&&(a>=i&&(f=i),i>=a&&(g=i))}return d=-1!==f&&a-f>1||a>g?f:g}function s(b,c,d){if(g.insertMode&&void 0!==p().validPositions[b]&&void 0===d){var e,f=a.extend(!0,{},p().validPositions),h=r();for(e=b;h>=e;e++)delete p().validPositions[e];p().validPositions[b]=c;var i,j=!0,k=p().validPositions;for(e=i=b;h>=e;e++){var l=f[e];if(void 0!==l)for(var m=i,n=-1;m<F()&&(null==l.match.fn&&k[e]&&(k[e].match.optionalQuantifier===!0||k[e].match.optionality===!0)||null!=l.match.fn);){if(null===l.match.fn||!g.keepStatic&&k[e]&&(void 0!==k[e+1]&&x(e+1,k[e].locator.slice(),e).length>1||void 0!==k[e].alternation)?m++:m=G(i),w(m,l.match.def)){j=D(m,l.input,!0,!0)!==!1,i=m;break}if(j=null==l.match.fn,n===m)break;n=m}if(!j)break}if(!j)return p().validPositions=a.extend(!0,{},f),q(!0),!1}else p().validPositions[b]=c;return q(!0),!0}function t(a,b,c,d){var e,f=a;for(p().p=a,e=f;b>e;e++)void 0!==p().validPositions[e]&&(c===!0||g.canClearPosition(p(),e,r(),d,g)!==!1)&&delete p().validPositions[e];for(e=f+1;e<=r();){for(;void 0!==p().validPositions[f];)f++;var h=p().validPositions[f];if(f>e&&(e=f+1),void 0===p().validPositions[e]&&E(e)||void 0!==h)e++;else{var i=u(e);w(f,i.match.def)?D(f,i.input||K(e),!0)!==!1&&(delete p().validPositions[e],e++):E(e)||(e++,f--),f++}}var j=r(),k=F();for(d!==!0&&c!==!0&&void 0!==p().validPositions[j]&&p().validPositions[j].input===g.radixPoint&&delete p().validPositions[j],e=j+1;k>=e;e++)p().validPositions[e]&&delete p().validPositions[e];q(!0)}function u(a,b,c){var d=p().validPositions[a];if(void 0===d)for(var e=x(a,b,c),f=r(),h=p().validPositions[f]||x(0)[0],i=void 0!==h.alternation?h.locator[h.alternation].toString().split(","):[],j=0;j<e.length&&(d=e[j],!(d.match&&(g.greedy&&d.match.optionalQuantifier!==!0||(d.match.optionality===!1||d.match.newBlockMarker===!1)&&d.match.optionalQuantifier!==!0)&&(void 0===h.alternation||h.alternation!==d.alternation||void 0!==d.locator[h.alternation]&&C(d.locator[h.alternation].toString().split(","),i))));j++);return d}function v(a){return p().validPositions[a]?p().validPositions[a].match:x(a)[0].match}function w(a,b){for(var c=!1,d=x(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function x(b,c,d,e){function f(c,d,e,i){function k(e,i,n){function o(b,c){var d=p().validPositions[b];return void 0===d&&p().tests[b]&&a.each(p().tests[b],function(a,b){return b.alternation&&-1!==b.locator[b.alternation].toString().indexOf(c)?(d=b,!1):void 0}),d?d.locator.slice(d.alternation+1):[]}if(j>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(j===b&&void 0===e.matches)return l.push({match:e,locator:i.reverse()}),!0;if(void 0!==e.matches){if(e.isGroup&&n!==e){if(e=k(c.matches[a.inArray(e,c.matches)+1],i))return!0}else if(e.isOptional){var q=e;if(e=f(e,d,i,n)){if(g=l[l.length-1].match,h=0===a.inArray(g,q.matches),!h)return!0;m=!0,j=b}}else if(e.isAlternator){var r,s=e,t=[],u=l.slice(),v=i.length,w=d.length>0?d.shift():-1;if(-1===w||"string"==typeof w){var x,y=j,z=d.slice(),A=[];if("string"==typeof w)A=w.split(",");else for(x=0;x<s.matches.length;x++)A.push(x);for(var B=0;B<A.length;B++){if(x=parseInt(A[B]),l=[],d=o(j,x),e=k(s.matches[x]||c.matches[x],[x].concat(i),n)||e,e!==!0&&void 0!==e&&A[A.length-1]<s.matches.length){var C=c.matches.indexOf(e)+1;c.matches.length>C&&(e=k(c.matches[C],[C].concat(i.slice(1,i.length)),n),e&&(A.push(C.toString()),a.each(l,function(a,b){b.alternation=i.length-1})))}r=l.slice(),j=y,l=[];for(var D=0;D<z.length;D++)d[D]=z[D];for(var E=0;E<r.length;E++){var F=r[E];F.alternation=F.alternation||v;for(var G=0;G<t.length;G++){var H=t[G];if(F.match.def===H.match.def&&("string"!=typeof w||-1!==a.inArray(F.locator[F.alternation].toString(),A))){F.match.mask===H.match.mask&&(r.splice(E,1),E--),-1===H.locator[F.alternation].toString().indexOf(F.locator[F.alternation])&&(H.locator[F.alternation]=H.locator[F.alternation]+","+F.locator[F.alternation],H.alternation=F.alternation);break}}}t=t.concat(r)}"string"==typeof w&&(t=a.map(t,function(b,c){if(isFinite(c)){var d,e=b.alternation,f=b.locator[e].toString().split(",");b.locator[e]=void 0,b.alternation=void 0;for(var g=0;g<f.length;g++)d=-1!==a.inArray(f[g],A),d&&(void 0!==b.locator[e]?(b.locator[e]+=",",b.locator[e]+=f[g]):b.locator[e]=parseInt(f[g]),b.alternation=e);if(void 0!==b.locator[e])return b}})),l=u.concat(t),j=b,m=l.length>0}else e=k(s.matches[w]||c.matches[w],[w].concat(i),n);if(e)return!0}else if(e.isQuantifier&&n!==c.matches[a.inArray(e,c.matches)-1])for(var I=e,J=d.length>0?d.shift():0;J<(isNaN(I.quantifier.max)?J+1:I.quantifier.max)&&b>=j;J++){var K=c.matches[a.inArray(I,c.matches)-1];if(e=k(K,[J].concat(i),K)){if(g=l[l.length-1].match,g.optionalQuantifier=J>I.quantifier.min-1,h=0===a.inArray(g,K.matches)){if(J>I.quantifier.min-1){m=!0,j=b;break}return!0}return!0}}else if(e=f(e,d,i,n))return!0}else j++}for(var n=d.length>0?d.shift():0;n<c.matches.length;n++)if(c.matches[n].isQuantifier!==!0){var o=k(c.matches[n],[n].concat(e),i);if(o&&j===b)return o;if(j>b)break}}var g,h,i=p().maskToken,j=c?d:0,k=c||[0],l=[],m=!1;if(b>-1){if(e===!0&&p().tests[b])return p().tests[b];if(void 0===c){for(var n,o=b-1;void 0===(n=p().validPositions[o])&&o>-1&&(!p().tests[o]||void 0===(n=p().tests[o][0]));)o--;void 0!==n&&o>-1&&(j=o,k=n.locator.slice())}for(var q=k.shift();q<i.length;q++){var r=f(i[q],k,[q]);if(r&&j===b||j>b)break}return(0===l.length||m)&&l.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]}),p().tests[b]=a.extend(!0,[],l),p().tests[b]}}function y(){return void 0===p()._buffer&&(p()._buffer=i(!1,1)),p()._buffer}function z(a){return(void 0===p().buffer||a===!0)&&(a===!0&&(p().tests={}),p().buffer=i(!0,r(),!0)),p().buffer}function A(a,b,c){var d;if(c=c,a===!0)q(),a=0,b=c.length;else for(d=a;b>d;d++)delete p().validPositions[d],delete p().tests[d];for(d=a;b>d;d++)q(!0),c[d]!==g.skipOptionalPartCharacter&&D(d,c[d],!0,!0)}function B(a,b){switch(b.casing){case"upper":a=a.toUpperCase();break;case"lower":a=a.toLowerCase()}return a}function C(b,c){for(var d=g.greedy?c:c.slice(0,1),e=!1,f=0;f<b.length;f++)if(-1!==a.inArray(b[f],d)){e=!0;break}return e}function D(b,c,d,e){function f(b,c,d,e){var f=!1;return a.each(x(b),function(h,i){for(var j=i.match,k=c?1:0,l="",m=j.cardinality;m>k;m--)l+=I(b-(m-1));if(c&&(l+=c),z(!0),f=null!=j.fn?j.fn.test(l,p(),b,d,g):c!==j.def&&c!==g.skipOptionalPartCharacter||""===j.def?!1:{c:j.def,pos:b},f!==!1){var n=void 0!==f.c?f.c:c;n=n===g.skipOptionalPartCharacter&&null===j.fn?j.def:n;var o=b,u=z();if(void 0!==f.remove&&(a.isArray(f.remove)||(f.remove=[f.remove]),a.each(f.remove.sort(function(a,b){return b-a}),function(a,b){t(b,b+1,!0)})),void 0!==f.insert&&(a.isArray(f.insert)||(f.insert=[f.insert]),a.each(f.insert.sort(function(a,b){return a-b}),function(a,b){D(b.pos,b.c,!0)})),f.refreshFromBuffer){var v=f.refreshFromBuffer;if(d=!0,A(v===!0?v:v.start,v.end,u),void 0===f.pos&&void 0===f.c)return f.pos=r(),!1;if(o=void 0!==f.pos?f.pos:b,o!==b)return f=a.extend(f,D(o,n,!0)),!1}else if(f!==!0&&void 0!==f.pos&&f.pos!==b&&(o=f.pos,A(b,o,z().slice()),o!==b))return f=a.extend(f,D(o,n,!0)),!1;return f!==!0&&void 0===f.pos&&void 0===f.c?!1:(h>0&&q(!0),s(o,a.extend({},i,{input:B(n,j)}),e)||(f=!1),!1)}}),f}function h(b,c,d,e){for(var f,h,i,j,k,l,m=a.extend(!0,{},p().validPositions),n=r();n>=0&&(j=p().validPositions[n],!j||void 0===j.alternation||(f=n,h=p().validPositions[f].alternation,u(f).locator[j.alternation]===j.locator[j.alternation]));n--);if(void 0!==h){f=parseInt(f);for(var o in p().validPositions)if(o=parseInt(o),j=p().validPositions[o],o>=f&&void 0!==j.alternation){var s=p().validPositions[f].locator[h].toString().split(","),t=void 0!==j.locator[h]?j.locator[h]:s[0];t.length>0&&(t=t.split(",")[0]);for(var v=0;v<s.length;v++)if(t<s[v]){for(var w,x,y=o;y>=0;y--)if(w=p().validPositions[y],void 0!==w){x=w.locator[h],w.locator[h]=parseInt(s[v]);break}if(t!==w.locator[h]){var z=[],A=0;for(k=o+1;k<r()+1;k++)l=p().validPositions[k],l&&null!=l.match.fn?z.push(l.input):b>k&&A++,delete p().validPositions[k],delete p().tests[k];for(q(!0),g.keepStatic=!g.keepStatic,i=!0;z.length>0;){var B=z.shift();if(B!==g.skipOptionalPartCharacter&&!(i=D(r()+1,B,!1,!0)))break}if(w.alternation=h,w.locator[h]=x,i){var C=r(b)+1,E=0;for(k=o+1;k<r()+1;k++)l=p().validPositions[k],(void 0===l||null==l.match.fn)&&b>k&&E++;b+=E-A,i=D(b>C?C:b,c,d,e)}if(g.keepStatic=!g.keepStatic,i)return i;q(),p().validPositions=a.extend(!0,{},m)}}break}}return!1}function i(b,c){for(var d=p().validPositions[c],e=d.locator,f=e.length,g=b;c>g;g++)if(!E(g,!0)){var h=x(g),i=h[0],j=-1;a.each(h,function(a,b){for(var c=0;f>c;c++)b.locator[c]&&C(b.locator[c].toString().split(","),e[c].toString().split(","))&&c>j&&(j=c,i=b)}),s(g,a.extend({},i,{input:i.match.def}),!0)}}d=d===!0;for(var j=z(),k=b-1;k>-1&&!p().validPositions[k];k--);for(k++;b>k;k++)void 0===p().validPositions[k]&&((!E(k)||j[k]!==K(k))&&x(k).length>1||j[k]===g.radixPoint||"0"===j[k]&&a.inArray(g.radixPoint,j)<k)&&f(k,j[k],!0);var l=b,m=!1,n=a.extend(!0,{},p().validPositions);if(l<F()&&(m=f(l,c,d,e),(!d||e)&&m===!1)){var o=p().validPositions[l];if(!o||null!==o.match.fn||o.match.def!==c&&c!==g.skipOptionalPartCharacter){if((g.insertMode||void 0===p().validPositions[G(l)])&&!E(l,!0))for(var v=l+1,w=G(l);w>=v;v++)if(m=f(v,c,d,e),m!==!1){i(l,v),l=v;break}}else m={caret:G(l)}}if(m===!1&&g.keepStatic&&(m=h(b,c,d,e)),m===!0&&(m={pos:l}),a.isFunction(g.postValidation)&&m!==!1&&!d){var y=g.postValidation(z(!0),g);if(y){if(y.refreshFromBuffer){var H=y.refreshFromBuffer;A(H===!0?H:H.start,H.end,y.buffer),q(!0),m=y}}else q(!0),p().validPositions=a.extend(!0,{},n),m=!1}return m}function E(a,b){var c=v(a);if(null!=c.fn)return c.fn;if(b!==!0&&a>-1&&!g.keepStatic&&void 0===p().validPositions[a]){var d=x(a,void 0,void 0,!0);return d.length>2}return!1}function F(){var a;qa=void 0!==oa?oa.maxLength:void 0,-1===qa&&(qa=void 0);var b,c=r(),d=p().validPositions[c],e=void 0!==d?d.locator.slice():void 0;for(b=c+1;void 0===d||null!==d.match.fn||null===d.match.fn&&""!==d.match.def;b++)d=u(b,e,b-1),e=d.locator.slice();var f=v(b-1);return a=""!==f.def?b:b-1,void 0===qa||qa>a?a:qa}function G(a,b){var c=F();if(a>=c)return c;for(var d=a;++d<c&&(b===!0&&(v(d).newBlockMarker!==!0||!E(d))||b!==!0&&!E(d)&&(g.nojumps!==!0||g.nojumpsThreshold>d)););return d}function H(a,b){var c=a;if(0>=c)return 0;for(;--c>0&&(b===!0&&v(c).newBlockMarker!==!0||b!==!0&&!E(c)););return c}function I(a){return void 0===p().validPositions[a]?K(a):p().validPositions[a].input}function J(b,c,d,e,f){if(e&&a.isFunction(g.onBeforeWrite)){var h=g.onBeforeWrite(e,c,d,g);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;A(i===!0?i:i.start,i.end,h.buffer||c),c=z(!0)}void 0!==d&&(d=void 0!==h.caret?h.caret:d)}}b.inputmask._valueSet(c.join("")),void 0===d||void 0!==e&&"blur"===e.type||N(b,d),f===!0&&(ua=!0,a(b).trigger("input"))}function K(a,b){if(b=b||v(a),void 0!==b.placeholder)return b.placeholder;if(null===b.fn){if(a>-1&&!g.keepStatic&&void 0===p().validPositions[a]){var c,d=x(a),e=0;if(d.length>2)for(var f=0;f<d.length;f++)if(d[f].match.optionality!==!0&&d[f].match.optionalQuantifier!==!0&&(null===d[f].match.fn||void 0===c||d[f].match.fn.test(c.match.def,p(),a,!0,g)!==!1)&&(e++,null===d[f].match.fn&&(c=d[f]),e>1))return g.placeholder.charAt(a%g.placeholder.length)}return b.def}return g.placeholder.charAt(a%g.placeholder.length)}function L(c,d,e,f){function h(){var a=!1,b=y().slice(k,G(k)).join("").indexOf(j);if(-1!==b&&!E(k)){a=!0;for(var c=y().slice(k,k+b),d=0;d<c.length;d++)if(" "!==c[d]){a=!1;break}}return a}var i=f.slice(),j="",k=0;if(q(),p().p=G(-1),!e)if(g.autoUnmask!==!0){var l=y().slice(0,G(-1)).join(""),m=i.join("").match(new RegExp("^"+b.escapeRegex(l),"g"));m&&m.length>0&&(i.splice(0,m.length*l.length),k=G(k))}else k=G(k);a.each(i,function(b,d){var f=a.Event("keypress");f.which=d.charCodeAt(0),j+=d;var i=r(void 0,!0),l=p().validPositions[i],m=u(i+1,l?l.locator.slice():void 0,i);if(!h()||e||g.autoUnmask){var n=e?b:null==m.match.fn&&m.match.optionality&&i+1<p().p?i+1:p().p;W.call(c,f,!0,!1,e,n),k=n+1,j=""}else W.call(c,f,!0,!1,!0,i+1)}),d&&J(c,z(),document.activeElement===c?G(r(0)):void 0,a.Event("checkval"))}function M(b){if(b&&void 0===b.inputmask)return b.value;var c=[],d=p().validPositions;for(var e in d)d[e].match&&null!=d[e].match.fn&&c.push(d[e].input);var f=0===c.length?null:(sa?c.reverse():c).join("");if(null!==f){var h=(sa?z().slice().reverse():z()).join("");a.isFunction(g.onUnMask)&&(f=g.onUnMask(h,f,g)||f)}return f}function N(a,b,c){function d(a){if(sa&&"number"==typeof a&&(!g.greedy||""!==g.placeholder)){var b=z().join("").length;a=b-a}return a}var e;if("number"!=typeof b)return a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):window.getSelection?(e=window.getSelection().getRangeAt(0),(e.commonAncestorContainer.parentNode===a||e.commonAncestorContainer===a)&&(b=e.startOffset,c=e.endOffset)):document.selection&&document.selection.createRange&&(e=document.selection.createRange(),b=0-e.duplicate().moveStart("character",-1e5),c=b+e.text.length),{begin:d(b),end:d(c)};b=d(b),c=d(c),c="number"==typeof c?c:b;var f=parseInt(((a.ownerDocument.defaultView||window).getComputedStyle?(a.ownerDocument.defaultView||window).getComputedStyle(a,null):a.currentStyle).fontSize)*c;if(a.scrollLeft=f>a.scrollWidth?f:0,l||g.insertMode!==!1||b!==c||c++,a.setSelectionRange)a.selectionStart=b,a.selectionEnd=c;else if(window.getSelection){if(e=document.createRange(),void 0===a.firstChild){var h=document.createTextNode("");a.appendChild(h)}e.setStart(a.firstChild,b<a.inputmask._valueGet().length?b:a.inputmask._valueGet().length),e.setEnd(a.firstChild,c<a.inputmask._valueGet().length?c:a.inputmask._valueGet().length),e.collapse(!0);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else a.createTextRange&&(e=a.createTextRange(),e.collapse(!0),e.moveEnd("character",c),e.moveStart("character",b),e.select())}function O(b){var c,d,e=z(),f=e.length,g=r(),h={},i=p().validPositions[g],j=void 0!==i?i.locator.slice():void 0;for(c=g+1;c<e.length;c++)d=u(c,j,c-1),j=d.locator.slice(),h[c]=a.extend(!0,{},d);var k=i&&void 0!==i.alternation?i.locator[i.alternation]:void 0;for(c=f-1;c>g&&(d=h[c],(d.match.optionality||d.match.optionalQuantifier||k&&(k!==h[c].locator[i.alternation]&&null!=d.match.fn||null===d.match.fn&&d.locator[i.alternation]&&C(d.locator[i.alternation].toString().split(","),k.toString().split(","))&&""!==x(c)[0].def))&&e[c]===K(c,d.match));c--)f--;return b?{l:f,def:h[f]?h[f].match:void 0}:f}function P(a){for(var b=O(),c=a.length-1;c>b&&!E(c);c--);return a.splice(b,c+1-b),a}function Q(b){if(a.isFunction(g.isComplete))return g.isComplete(b,g);if("*"===g.repeat)return void 0;var c=!1,d=O(!0),e=H(d.l);if(void 0===d.def||d.def.newBlockMarker||d.def.optionality||d.def.optionalQuantifier){c=!0;for(var f=0;e>=f;f++){var h=u(f).match;if(null!==h.fn&&void 0===p().validPositions[f]&&h.optionality!==!0&&h.optionalQuantifier!==!0||null===h.fn&&b[f]!==K(f,h)){c=!1;break}}}return c}function R(a,b){return sa?a-b>1||a-b===1&&g.insertMode:b-a>1||b-a===1&&g.insertMode}function S(c){return function(d){var e=!1,f=!1;if(void 0===this.inputmask){var h=a.data(this,"_inputmask_opts");h?new b(h).mask(this):a(this).off(".inputmask")}else{if("setvalue"===d.type||!(this.disabled||this.readOnly&&!("keydown"===d.type&&d.ctrlKey&&67===d.keyCode||g.tabThrough===!1&&d.keyCode===b.keyCode.TAB))){switch(d.type){case"input":if(ua===!0||e===!0)return ua=!1,d.preventDefault();f=!1;break;case"keydown":ta=!1,e=!1,f=!0;break;case"keypress":if(ta===!0)return d.preventDefault();ta=!0;break;case"compositionstart":e=!0;break;case"compositionupdate":ua=f;break;case"compositionend":e=!1,f=!1;break;case"cut":ua=!0}return c.apply(this,arguments)}d.preventDefault()}}}function T(b){function c(b){if(a.valHooks&&(void 0===a.valHooks[b]||a.valHooks[b].inputmaskpatch!==!0)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},d=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a),d=a.inputmask.maskset,e=d._buffer;return e=e?e.join(""):"",b!==e?b:""}return c(a)},set:function(b,c){var e,f=a(b);return e=d(b,c),b.inputmask&&f.trigger("setvalue.inputmask"),e},inputmaskpatch:!0}}}function d(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():h.call(this)!==y().join("")?document.activeElement===this&&g.clearMaskOnLostFocus?(sa?P(z().slice()).reverse():P(z().slice())).join(""):h.call(this):"":h.call(this)}function e(b){i.call(this,b),this.inputmask&&a(this).trigger("setvalue.inputmask")}function f(b){a(b).on("mouseenter.inputmask",S(function(b){var c=a(this),d=this,e=d.inputmask._valueGet();""!==e&&e!==z().join("")&&c.trigger("setvalue.inputmask")}))}var h,i;b.inputmask.__valueGet||(Object.getOwnPropertyDescriptor&&void 0===b.value?(h=function(){return this.textContent},i=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:d,set:e})):document.__lookupGetter__&&b.__lookupGetter__("value")?(h=b.__lookupGetter__("value"),i=b.__lookupSetter__("value"),b.__defineGetter__("value",d),b.__defineSetter__("value",e)):(h=function(){return b.value},i=function(a){b.value=a},c(b.type),f(b)),b.inputmask.__valueGet=h,b.inputmask._valueGet=function(a){return sa&&a!==!0?h.call(this.el).split("").reverse().join(""):h.call(this.el)},b.inputmask.__valueSet=i,b.inputmask._valueSet=function(a,b){i.call(this.el,null===a||void 0===a?"":b!==!0&&sa?a.split("").reverse().join(""):a)})}function U(c,d,e,f){function h(){if(g.keepStatic){q(!0);var b,d=[],e=a.extend(!0,{},p().validPositions);for(b=r();b>=0;b--){var f=p().validPositions[b];if(f&&(null!=f.match.fn&&d.push(f.input),delete p().validPositions[b],void 0!==f.alternation&&f.locator[f.alternation]===u(b).locator[f.alternation]))break}if(b>-1)for(;d.length>0;){p().p=G(r());var h=a.Event("keypress");h.which=d.pop().charCodeAt(0),W.call(c,h,!0,!1,!1,p().p)}else p().validPositions=a.extend(!0,{},e)}}if((g.numericInput||sa)&&(d===b.keyCode.BACKSPACE?d=b.keyCode.DELETE:d===b.keyCode.DELETE&&(d=b.keyCode.BACKSPACE),sa)){var i=e.end;e.end=e.begin,e.begin=i}d===b.keyCode.BACKSPACE&&(e.end-e.begin<1||g.insertMode===!1)?(e.begin=H(e.begin),void 0===p().validPositions[e.begin]||p().validPositions[e.begin].input!==g.groupSeparator&&p().validPositions[e.begin].input!==g.radixPoint||e.begin--):d===b.keyCode.DELETE&&e.begin===e.end&&(e.end=E(e.end)?e.end+1:G(e.end)+1,void 0===p().validPositions[e.begin]||p().validPositions[e.begin].input!==g.groupSeparator&&p().validPositions[e.begin].input!==g.radixPoint||e.end++),t(e.begin,e.end,!1,f),f!==!0&&h();var j=r(e.begin);j<e.begin?(-1===j&&q(),p().p=G(j)):f!==!0&&(p().p=e.begin)}function V(d){var e=this,f=a(e),h=d.keyCode,i=N(e);h===b.keyCode.BACKSPACE||h===b.keyCode.DELETE||j&&127===h||d.ctrlKey&&88===h&&!c("cut")?(d.preventDefault(),88===h&&(ma=z().join("")),U(e,h,i),J(e,z(),p().p,d,ma!==z().join("")),e.inputmask._valueGet()===y().join("")?f.trigger("cleared"):Q(z())===!0&&f.trigger("complete"),g.showTooltip&&(e.title=g.tooltip||p().mask)):h===b.keyCode.END||h===b.keyCode.PAGE_DOWN?setTimeout(function(){var a=G(r());g.insertMode||a!==F()||d.shiftKey||a--,N(e,d.shiftKey?i.begin:a,a)},0):h===b.keyCode.HOME&&!d.shiftKey||h===b.keyCode.PAGE_UP?N(e,0,d.shiftKey?i.begin:0):(g.undoOnEscape&&h===b.keyCode.ESCAPE||90===h&&d.ctrlKey)&&d.altKey!==!0?(L(e,!0,!1,ma.split("")),f.trigger("click")):h!==b.keyCode.INSERT||d.shiftKey||d.ctrlKey?g.tabThrough===!0&&h===b.keyCode.TAB?(d.shiftKey===!0?(null===v(i.begin).fn&&(i.begin=G(i.begin)),i.end=H(i.begin,!0),i.begin=H(i.end,!0)):(i.begin=G(i.begin,!0),i.end=G(i.begin,!0),i.end<F()&&i.end--),i.begin<F()&&(d.preventDefault(),N(e,i.begin,i.end))):g.insertMode!==!1||d.shiftKey||(h===b.keyCode.RIGHT?setTimeout(function(){var a=N(e);N(e,a.begin)},0):h===b.keyCode.LEFT&&setTimeout(function(){var a=N(e);N(e,sa?a.begin+1:a.begin-1)},0)):(g.insertMode=!g.insertMode,N(e,g.insertMode||i.begin!==F()?i.begin:i.begin-1)),g.onKeyDown.call(this,d,z(),N(e).begin,g),va=-1!==a.inArray(h,g.ignorables)}function W(c,d,e,f,h){var i=this,j=a(i),k=c.which||c.charCode||c.keyCode;if(!(d===!0||c.ctrlKey&&c.altKey)&&(c.ctrlKey||c.metaKey||va))return k===b.keyCode.ENTER&&ma!==z().join("")&&(ma=z().join(""),c.preventDefault(),setTimeout(function(){j.trigger("change")},0)),!0;if(k){46===k&&c.shiftKey===!1&&","===g.radixPoint&&(k=44);var l,m=d?{begin:h,end:h}:N(i),n=String.fromCharCode(k),o=R(m.begin,m.end);o&&(p().undoPositions=a.extend(!0,{},p().validPositions),U(i,b.keyCode.DELETE,m,!0),m.begin=p().p,g.insertMode||(g.insertMode=!g.insertMode,s(m.begin,f),g.insertMode=!g.insertMode),o=!g.multi),p().writeOutBuffer=!0;var r=sa&&!o?m.end:m.begin,t=D(r,n,f);if(t!==!1){if(t!==!0&&(r=void 0!==t.pos?t.pos:r,n=void 0!==t.c?t.c:n),q(!0),void 0!==t.caret)l=t.caret;else{var u=p().validPositions;l=!g.keepStatic&&(void 0!==u[r+1]&&x(r+1,u[r].locator.slice(),r).length>1||void 0!==u[r].alternation)?r+1:G(r)}p().p=l}if(e!==!1){var v=this;if(setTimeout(function(){g.onKeyValidation.call(v,k,t,g)},0),p().writeOutBuffer&&t!==!1){var w=z();J(i,w,d?void 0:g.numericInput?H(l):l,c,d!==!0),d!==!0&&setTimeout(function(){Q(w)===!0&&j.trigger("complete")},0)}else o&&(p().buffer=void 0,p().validPositions=p().undoPositions)}else o&&(p().buffer=void 0,p().validPositions=p().undoPositions);if(g.showTooltip&&(i.title=g.tooltip||p().mask),d&&a.isFunction(g.onBeforeWrite)){var y=g.onBeforeWrite(c,z(),l,g);if(y&&y.refreshFromBuffer){var B=y.refreshFromBuffer;A(B===!0?B:B.start,B.end,y.buffer),q(!0),y.caret&&(p().p=y.caret)}}if(c.preventDefault(),d)return t}}function X(b){var c=this,d=b.originalEvent||b,e=a(c),f=c.inputmask._valueGet(!0),h=N(c);if("propertychange"===b.type&&c.inputmask._valueGet().length<=F())return!0;if("paste"===b.type){var i=f.substr(0,h.begin),j=f.substr(h.end,f.length);i===y().slice(0,h.begin).join("")&&(i=""),j===y().slice(h.end).join("")&&(j=""),window.clipboardData&&window.clipboardData.getData?f=i+window.clipboardData.getData("Text")+j:d.clipboardData&&d.clipboardData.getData&&(f=i+d.clipboardData.getData("text/plain")+j)}var k=f;if(a.isFunction(g.onBeforePaste)){if(k=g.onBeforePaste(f,g),k===!1)return b.preventDefault(),!1;k||(k=f)}return L(c,!1,!1,sa?k.split("").reverse():k.toString().split("")),J(c,z(),void 0,b,!0),e.trigger("click"),Q(z())===!0&&e.trigger("complete"),!1}function Y(b){var c=this;L(c,!0,!1,c.inputmask._valueGet().split("")),Q(z())===!0&&a(c).trigger("complete"),b.preventDefault()}function Z(a){var c=this,d=N(c),e=c._valueGet();e=e.replace(new RegExp("("+b.escapeRegex(y().join(""))+")*"),""),d.begin>e.length&&(N(c,e.length),d=N(c)),z().length-e.length!==1||e.charAt(d.begin)===z()[d.begin]||e.charAt(d.begin+1)===z()[d.begin]||E(d.begin)?Y.call(this,a):(a.keyCode=g.keyCode.BACKSPACE,V.call(c,a)),a.preventDefault()}function $(a){var b=a.originalEvent||a;ma=z().join(""),""===na||0!==b.data.indexOf(na)}function _(b){var c=this,d=b.originalEvent||b;0===d.data.indexOf(na)&&(q(),p().p=G(-1),ua=!0);for(var e=d.data,f=0;f<e.length;f++){var h=a.Event("keypress");h.which=e.charCodeAt(f),ta=!1,va=!1,W.call(c,h,!0,!1,!1,p().p)}setTimeout(function(){var a=p().p;J(c,z(),g.numericInput?H(a):a)},0),na=d.data}function aa(a){}function ba(b){var c=this,d=c.inputmask._valueGet();L(c,!0,!1,(a.isFunction(g.onBeforeMask)?g.onBeforeMask(d,g)||d:d).split("")),ma=z().join(""),(g.clearMaskOnLostFocus||g.clearIncomplete)&&c.inputmask._valueGet()===y().join("")&&c.inputmask._valueSet("")}function ca(a){var b=this,c=b.inputmask._valueGet();g.showMaskOnFocus&&(!g.showMaskOnHover||g.showMaskOnHover&&""===c)?b.inputmask._valueGet()!==z().join("")&&J(b,z(),G(r())):wa===!1&&N(b,G(r())),g.positionCaretOnTab===!0&&setTimeout(function(){N(b,G(r()))},0),ma=z().join("")}function da(a){var b=this;if(wa=!1,g.clearMaskOnLostFocus){var c=z().slice(),d=b.inputmask._valueGet();document.activeElement!==b&&d!==b.getAttribute("placeholder")&&""!==d&&(-1===r()&&d===y().join("")?c=[]:P(c),J(b,c))}}function ea(b){function c(b){if(g.radixFocus&&""!==g.radixPoint){var c=p().validPositions;if(void 0===c[b]||c[b].input===K(b)){if(b<G(-1))return!0;var d=a.inArray(g.radixPoint,z());if(-1!==d){for(var e in c)if(e>d&&c[e].input!==K(e))return!1;return!0}}}return!1}var d=this;if(document.activeElement===d){var e=N(d);if(e.begin===e.end)if(c(e.begin))N(d,a.inArray(g.radixPoint,z()));else{var f=e.begin,h=r(f),i=G(h);i>f?N(d,E(f)||E(f-1)?f:G(f)):((z()[i]!==K(i)||!E(i,!0)&&v(i).def===K(i))&&(i=G(i)),N(d,g.numericInput?0:i))}}}function fa(a){var b=this;setTimeout(function(){N(b,0,G(r()))},0)}function ga(c){var d=this,e=a(d),f=N(d),h=c.originalEvent||c,i=window.clipboardData||h.clipboardData,j=sa?z().slice(f.end,f.begin):z().slice(f.begin,f.end);i.setData("text",sa?j.reverse().join(""):j.join("")),document.execCommand&&document.execCommand("copy"),
  U(d,b.keyCode.DELETE,f),J(d,z(),p().p,c,ma!==z().join("")),d.inputmask._valueGet()===y().join("")&&e.trigger("cleared"),g.showTooltip&&(d.title=g.tooltip||p().mask)}function ha(b){var c=a(this),d=this;if(d.inputmask){var e=d.inputmask._valueGet(),f=z().slice();ma!==f.join("")&&setTimeout(function(){c.trigger("change"),ma=f.join("")},0),""!==e&&(g.clearMaskOnLostFocus&&(-1===r()&&e===y().join("")?f=[]:P(f)),Q(f)===!1&&(setTimeout(function(){c.trigger("incomplete")},0),g.clearIncomplete&&(q(),f=g.clearMaskOnLostFocus?[]:y().slice())),J(d,f,void 0,b))}}function ia(a){var b=this;wa=!0,document.activeElement!==b&&g.showMaskOnHover&&b.inputmask._valueGet()!==z().join("")&&J(b,z())}function ja(a){ma!==z().join("")&&pa.trigger("change"),g.clearMaskOnLostFocus&&-1===r()&&oa.inputmask._valueGet&&oa.inputmask._valueGet()===y().join("")&&oa.inputmask._valueSet(""),g.removeMaskOnSubmit&&(oa.inputmask._valueSet(oa.inputmask.unmaskedvalue(),!0),setTimeout(function(){J(oa,z())},0))}function ka(a){setTimeout(function(){pa.trigger("setvalue.inputmask")},0)}function la(b){if(oa=b,pa=a(oa),g.showTooltip&&(oa.title=g.tooltip||p().mask),("rtl"===oa.dir||g.rightAlign)&&(oa.style.textAlign="right"),("rtl"===oa.dir||g.numericInput)&&(oa.dir="ltr",oa.removeAttribute("dir"),oa.inputmask.isRTL=!0,sa=!0),pa.off(".inputmask"),T(oa),("INPUT"===oa.tagName&&d(oa.getAttribute("type"))||oa.isContentEditable)&&(a(oa.form).on("submit.inputmask",ja).on("reset.inputmask",ka),pa.on("mouseenter.inputmask",S(ia)).on("blur.inputmask",S(ha)).on("focus.inputmask",S(ca)).on("mouseleave.inputmask",S(da)).on("click.inputmask",S(ea)).on("dblclick.inputmask",S(fa)).on(o+".inputmask dragdrop.inputmask drop.inputmask",S(X)).on("cut.inputmask",S(ga)).on("complete.inputmask",S(g.oncomplete)).on("incomplete.inputmask",S(g.onincomplete)).on("cleared.inputmask",S(g.oncleared)).on("keydown.inputmask",S(V)).on("keypress.inputmask",S(W)),m||pa.on("compositionstart.inputmask",S($)).on("compositionupdate.inputmask",S(_)).on("compositionend.inputmask",S(aa)),"paste"===o&&pa.on("input.inputmask",S(Y)),(k||m||l||n)&&(pa.off("input.inputmask"),pa.on("input.inputmask",S(Z)))),pa.on("setvalue.inputmask",S(ba)),""!==oa.inputmask._valueGet()||g.clearMaskOnLostFocus===!1){var c=a.isFunction(g.onBeforeMask)?g.onBeforeMask(oa.inputmask._valueGet(),g)||oa.inputmask._valueGet():oa.inputmask._valueGet();L(oa,!0,!1,c.split(""));var e=z().slice();ma=e.join(""),Q(e)===!1&&g.clearIncomplete&&q(),g.clearMaskOnLostFocus&&(e.join("")===y().join("")?e=[]:P(e)),J(oa,e),document.activeElement===oa&&N(oa,G(r()))}}var ma,na,oa,pa,qa,ra,sa=!1,ta=!1,ua=!1,va=!1,wa=!0;if(void 0!==e)switch(e.action){case"isComplete":return oa=e.el,Q(z());case"unmaskedvalue":return oa=e.el,void 0!==oa&&void 0!==oa.inputmask?(f=oa.inputmask.maskset,g=oa.inputmask.opts,sa=oa.inputmask.isRTL):(ra=e.value,g.numericInput&&(sa=!0),ra=(a.isFunction(g.onBeforeMask)?g.onBeforeMask(ra,g)||ra:ra).split(""),L(void 0,!1,!1,sa?ra.reverse():ra),a.isFunction(g.onBeforeWrite)&&g.onBeforeWrite(void 0,z(),0,g)),M(oa);case"mask":oa=e.el,f=oa.inputmask.maskset,g=oa.inputmask.opts,sa=oa.inputmask.isRTL,ma=z().join(""),la(oa);break;case"format":return g.numericInput&&(sa=!0),ra=(a.isFunction(g.onBeforeMask)?g.onBeforeMask(e.value,g)||e.value:e.value).split(""),L(void 0,!1,!1,sa?ra.reverse():ra),a.isFunction(g.onBeforeWrite)&&g.onBeforeWrite(void 0,z(),0,g),e.metadata?{value:sa?z().slice().reverse().join(""):z().join(""),metadata:h({action:"getmetadata"},f,g)}:sa?z().slice().reverse().join(""):z().join("");case"isValid":g.numericInput&&(sa=!0),e.value?(ra=e.value.split(""),L(void 0,!1,!0,sa?ra.reverse():ra)):e.value=z().join("");for(var xa=z(),ya=O(),za=xa.length-1;za>ya&&!E(za);za--);return xa.splice(ya,za+1-ya),Q(xa)&&e.value===z().join("");case"getemptymask":return y();case"remove":oa=e.el,pa=a(oa),f=oa.inputmask.maskset,g=oa.inputmask.opts,oa.inputmask._valueSet(M(oa)),pa.off(".inputmask");var Aa;Object.getOwnPropertyDescriptor&&(Aa=Object.getOwnPropertyDescriptor(oa,"value")),Aa&&Aa.get?oa.inputmask.__valueGet&&Object.defineProperty(oa,"value",{get:oa.inputmask.__valueGet,set:oa.inputmask.__valueSet}):document.__lookupGetter__&&oa.__lookupGetter__("value")&&oa.inputmask.__valueGet&&(oa.__defineGetter__("value",oa.inputmask.__valueGet),oa.__defineSetter__("value",oa.inputmask.__valueSet)),oa.inputmask=void 0;break;case"getmetadata":if(a.isArray(f.metadata)){for(var Ba,Ca=r(),Da=Ca;Da>=0;Da--)if(p().validPositions[Da]&&void 0!==p().validPositions[Da].alternation){Ba=p().validPositions[Da].alternation;break}return void 0!==Ba?f.metadata[p().validPositions[Ca].locator[Ba]]:f.metadata[0]}return f.metadata}}b.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask(b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",showTooltip:!1,tooltip:void 0,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",groupSeparator:"",radixFocus:!1,nojumps:!1,nojumpsThreshold:0,keepStatic:null,positionCaretOnTab:!1,tabThrough:!1,supportsInputType:[],definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:null,canClearPosition:a.noop,postValidation:null},masksCache:{},mask:function(c){var d=this;return"string"==typeof c&&(c=document.getElementById(c)||document.querySelectorAll(c)),c=c.nodeName?[c]:c,a.each(c,function(c,e){var i=a.extend(!0,{},d.opts);f(e,i,a.extend(!0,{},d.userOptions));var j=g(i,d.noMasksCache);void 0!==j&&(void 0!==e.inputmask&&e.inputmask.remove(),e.inputmask=new b,e.inputmask.opts=i,e.inputmask.noMasksCache=d.noMasksCache,e.inputmask.userOptions=a.extend(!0,{},d.userOptions),e.inputmask.el=e,e.inputmask.maskset=j,e.inputmask.isRTL=!1,a.data(e,"_inputmask_opts",i),h({action:"mask",el:e}))}),c?c[0].inputmask||this:this},option:function(b){return"string"==typeof b?this.opts[b]:"object"==typeof b?(a.extend(this.opts,b),a.extend(this.userOptions,b),this.el&&(void 0!==b.mask||void 0!==b.alias?this.mask(this.el):(a.data(this.el,"_inputmask_opts",this.opts),h({action:"mask",el:this.el}))),this):void 0},unmaskedvalue:function(a){return h({action:"unmaskedvalue",el:this.el,value:a},this.el&&this.el.inputmask?this.el.inputmask.maskset:g(this.opts,this.noMasksCache),this.opts)},remove:function(){return this.el?(h({action:"remove",el:this.el}),this.el.inputmask=void 0,this.el):void 0},getemptymask:function(){return h({action:"getemptymask"},this.maskset||g(this.opts,this.noMasksCache),this.opts)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return h({action:"isComplete",el:this.el},this.maskset||g(this.opts,this.noMasksCache),this.opts)},getmetadata:function(){return h({action:"getmetadata"},this.maskset||g(this.opts,this.noMasksCache),this.opts)},isValid:function(a){return h({action:"isValid",value:a},this.maskset||g(this.opts,this.noMasksCache),this.opts)},format:function(a,b){return h({action:"format",value:a,metadata:b},this.maskset||g(this.opts,this.noMasksCache),this.opts)}},b.extendDefaults=function(c){a.extend(!0,b.prototype.defaults,c)},b.extendDefinitions=function(c){a.extend(!0,b.prototype.defaults.definitions,c)},b.extendAliases=function(c){a.extend(!0,b.prototype.defaults.aliases,c)},b.format=function(a,c,d){return b(c).format(a,d)},b.unmask=function(a,c){return b(c).unmaskedvalue(a)},b.isValid=function(a,c){return b(c).isValid(a)},b.remove=function(b){a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},b.escapeRegex=function(a){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return a.replace(new RegExp("(\\"+b.join("|\\")+")","gim"),"\\$1")},b.keyCode={ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91};var i=navigator.userAgent,j=null!==i.match(new RegExp("iphone","i")),k=null!==i.match(new RegExp("android.*safari.*","i")),l=null!==i.match(new RegExp("android.*chrome.*","i")),m=null!==i.match(new RegExp("android.*firefox.*","i")),n=/Kindle/i.test(i)||/Silk/i.test(i)||/KFTT/i.test(i)||/KFOT/i.test(i)||/KFJWA/i.test(i)||/KFJWI/i.test(i)||/KFSOWI/i.test(i)||/KFTHWA/i.test(i)||/KFTHWI/i.test(i)||/KFAPWA/i.test(i)||/KFAPWI/i.test(i),o=c("paste")?"paste":c("input")?"input":"propertychange";return window.Inputmask=b,b});