text: /*!
  * inputmask.min.js
  * https://github.com/RobinHerbots/jquery.inputmask
  * Copyright (c) 2010 - 2016 Robin Herbots
  * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  * Version: 3.3.4-108
  */
  !function(a){"function"==typeof define&&define.amd?define("inputmask",["inputmask.dependencyLib"],a):"object"==typeof exports?module.exports=a(require("./inputmask.dependencyLib")):a(window.dependencyLib||jQuery)}(function(a){function b(c,d){return this instanceof b?(a.isPlainObject(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||{},this.events={},this.dataAttribute="data-inputmask",void this.resolveAlias(this.opts.alias,d,this.opts)):new b(c,d)}function c(c,d){function e(c,e,f){if(null!==c&&""!==c){if(1===c.length&&f.greedy===!1&&0!==f.repeat&&(f.placeholder=""),f.repeat>0||"*"===f.repeat||"+"===f.repeat){var g="*"===f.repeat?0:"+"===f.repeat?1:f.repeat;c=f.groupmarker.start+c+f.groupmarker.end+f.quantifiermarker.start+g+","+f.repeat+f.quantifiermarker.end}var h;return void 0===b.prototype.masksCache[c]||d===!0?(h={mask:c,maskToken:b.prototype.analyseMask(c,f),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:e,maskLength:void 0},d!==!0&&(b.prototype.masksCache[f.numericInput?c.split("").reverse().join(""):c]=h,h=a.extend(!0,{},b.prototype.masksCache[f.numericInput?c.split("").reverse().join(""):c]))):h=a.extend(!0,{},b.prototype.masksCache[f.numericInput?c.split("").reverse().join(""):c]),h}}var f;if(a.isFunction(c.mask)&&(c.mask=c.mask(c)),a.isArray(c.mask)){if(c.mask.length>1){c.keepStatic=null===c.keepStatic||c.keepStatic;var g=c.groupmarker.start;return a.each(c.numericInput?c.mask.reverse():c.mask,function(b,d){g.length>1&&(g+=c.groupmarker.end+c.alternatormarker+c.groupmarker.start),g+=void 0===d.mask||a.isFunction(d.mask)?d:d.mask}),g+=c.groupmarker.end,e(g,c.mask,c)}c.mask=c.mask.pop()}return c.mask&&(f=void 0===c.mask.mask||a.isFunction(c.mask.mask)?e(c.mask,c.mask,c):e(c.mask.mask,c.mask,c)),f}function d(c,e,j){function k(a,b,c){b=b||0;var d,e,f,g=[],h=0,i=n();ga=void 0!==ea?ea.maxLength:void 0,ga===-1&&(ga=void 0);do a===!0&&l().validPositions[h]?(f=l().validPositions[h],e=f.match,d=f.locator.slice(),g.push(c===!0?f.input:c===!1?e.nativeDef:F(h,e))):(f=q(h,d,h-1),e=f.match,d=f.locator.slice(),(j.jitMasking===!1||h<i||Number.isFinite(j.jitMasking)&&j.jitMasking>h)&&g.push(c===!1?e.nativeDef:F(h,e))),h++;while((void 0===ga||h<ga)&&(null!==e.fn||""!==e.def)||b>h);return""===g[g.length-1]&&g.pop(),l().maskLength=h+1,g}function l(){return e}function m(a){var b=l();b.buffer=void 0,a!==!0&&(b._buffer=void 0,b.validPositions={},b.p=0)}function n(a,b,c){var d=-1,e=-1,f=c||l().validPositions;void 0===a&&(a=-1);for(var g in f){var h=parseInt(g);f[h]&&(b||null!==f[h].match.fn)&&(h<=a&&(d=h),h>=a&&(e=h))}return d!==-1&&a-d>1||e<a?d:e}function o(b,c,d,e){function f(a){var b=l().validPositions[a];if(void 0!==b&&null===b.match.fn){var c=l().validPositions[a-1],d=l().validPositions[a+1];return void 0!==c&&void 0!==d}return!1}var g,h=b,i=a.extend(!0,{},l().validPositions),k=!1;for(l().p=b,g=c-1;g>=h;g--)void 0!==l().validPositions[g]&&(d!==!0&&(!l().validPositions[g].match.optionality&&f(g)||j.canClearPosition(l(),g,n(),e,j)===!1)||delete l().validPositions[g]);for(m(!0),g=h+1;g<=n();){for(;void 0!==l().validPositions[h];)h++;var o=l().validPositions[h];if(g<h&&(g=h+1),void 0===l().validPositions[g]&&A(g)||void 0!==o)g++;else{var p=q(g);k===!1&&i[h]&&i[h].match.def===p.match.def?(l().validPositions[h]=a.extend(!0,{},i[h]),l().validPositions[h].input=p.input,delete l().validPositions[g],g++):s(h,p.match.def)?z(h,p.input||F(g),!0)!==!1&&(delete l().validPositions[g],g++,k=!0):A(g)||(g++,h--),h++}}m(!0)}function p(a,b){for(var c,d=a,e=n(),f=l().validPositions[e]||t(0)[0],g=void 0!==f.alternation?f.locator[f.alternation].toString().split(","):[],h=0;h<d.length&&(c=d[h],!(c.match&&(j.greedy&&c.match.optionalQuantifier!==!0||(c.match.optionality===!1||c.match.newBlockMarker===!1)&&c.match.optionalQuantifier!==!0)&&(void 0===f.alternation||f.alternation!==c.alternation||void 0!==c.locator[f.alternation]&&y(c.locator[f.alternation].toString().split(","),g)))||b===!0&&(null!==c.match.fn||/[0-9a-bA-Z]/.test(c.match.def)));h++);return c}function q(a,b,c){return l().validPositions[a]||p(t(a,b?b.slice():b,c))}function r(a){return l().validPositions[a]?l().validPositions[a]:t(a)[0]}function s(a,b){for(var c=!1,d=t(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function t(b,c,d){function e(c,d,f,g){function i(f,g,m){function p(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(e.isQuantifier===!0&&(d=p(b,c.matches[a-1])))return!1}),d}function r(b,c,d){var e,f;return(l().tests[b]||l().validPositions[b])&&a.each(l().tests[b]||[l().validPositions[b]],function(a,b){var g=void 0!==d?d:b.alternation,h=b.locator[g]?b.locator[g].toString().indexOf(c):-1;(void 0===f||h<f)&&h!==-1&&(e=b,f=h)}),e?e.locator.slice(e.alternation+1):void 0!==d?r(b,c):void 0}function s(a,c){return null===a.match.fn&&null!==c.match.fn&&c.match.fn.test(a.match.def,l(),b,!1,j,!1)}if(k>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. "+l().mask;if(k===b&&void 0===f.matches)return n.push({match:f,locator:g.reverse(),cd:q}),!0;if(void 0!==f.matches){if(f.isGroup&&m!==f){if(f=i(c.matches[a.inArray(f,c.matches)+1],g))return!0}else if(f.isOptional){var t=f;if(f=e(f,d,g,m)){if(h=n[n.length-1].match,!p(h,t))return!0;o=!0,k=b}}else if(f.isAlternator){var u,v=f,w=[],x=n.slice(),y=g.length,z=d.length>0?d.shift():-1;if(z===-1||"string"==typeof z){var A,B=k,C=d.slice(),D=[];if("string"==typeof z)D=z.split(",");else for(A=0;A<v.matches.length;A++)D.push(A);for(var E=0;E<D.length;E++){if(A=parseInt(D[E]),n=[],d=r(k,A,y)||C.slice(),f=i(v.matches[A]||c.matches[A],[A].concat(g),m)||f,f!==!0&&void 0!==f&&D[D.length-1]<v.matches.length){var F=a.inArray(f,c.matches)+1;c.matches.length>F&&(f=i(c.matches[F],[F].concat(g.slice(1,g.length)),m),f&&(D.push(F.toString()),a.each(n,function(a,b){b.alternation=g.length-1})))}u=n.slice(),k=B,n=[];for(var G=0;G<u.length;G++){var H=u[G],I=!1;H.alternation=H.alternation||y;for(var J=0;J<w.length;J++){var K=w[J];if(("string"!=typeof z||a.inArray(H.locator[H.alternation].toString(),D)!==-1)&&(H.match.def===K.match.def||s(H,K))){I=H.match.nativeDef===K.match.nativeDef,H.alternation==K.alternation&&K.locator[K.alternation].toString().indexOf(H.locator[H.alternation])===-1&&(K.locator[K.alternation]=K.locator[K.alternation]+","+H.locator[H.alternation],K.alternation=H.alternation,null==H.match.fn&&(K.na=K.na||H.locator[H.alternation].toString(),K.na.indexOf(H.locator[H.alternation])===-1&&(K.na=K.na+","+H.locator[H.alternation])));break}}I||w.push(H)}}"string"==typeof z&&(w=a.map(w,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=a.inArray(f[g],D)!==-1,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}})),n=x.concat(w),k=b,o=n.length>0,d=C.slice()}else f=i(v.matches[z]||c.matches[z],[z].concat(g),m);if(f)return!0}else if(f.isQuantifier&&m!==c.matches[a.inArray(f,c.matches)-1])for(var L=f,M=d.length>0?d.shift():0;M<(isNaN(L.quantifier.max)?M+1:L.quantifier.max)&&k<=b;M++){var N=c.matches[a.inArray(L,c.matches)-1];if(f=i(N,[M].concat(g),N)){if(h=n[n.length-1].match,h.optionalQuantifier=M>L.quantifier.min-1,p(h,N)){if(M>L.quantifier.min-1){o=!0,k=b;break}return!0}return!0}}else if(f=e(f,d,g,m))return!0}else k++}for(var m=d.length>0?d.shift():0;m<c.matches.length;m++)if(c.matches[m].isQuantifier!==!0){var p=i(c.matches[m],[m].concat(f),g);if(p&&k===b)return p;if(k>b)break}}function f(b){var c=[];return a.isArray(b)||(b=[b]),b.length>0&&(void 0===b[0].alternation?(c=p(b.slice()).locator.slice(),0===c.length&&(c=b[0].locator.slice())):a.each(b,function(a,b){if(""!==b.def)if(0===c.length)c=b.locator.slice();else for(var d=0;d<c.length;d++)b.locator[d]&&c[d].toString().indexOf(b.locator[d])===-1&&(c[d]+=","+b.locator[d])})),c}function g(a){return j.keepStatic&&b>0&&a.length>1+(""===a[a.length-1].match.def?1:0)&&a[0].match.optionality!==!0&&a[0].match.optionalQuantifier!==!0&&null===a[0].match.fn&&!/[0-9a-bA-Z]/.test(a[0].match.def)?[p(a)]:a}var h,i=l().maskToken,k=c?d:0,m=c?c.slice():[0],n=[],o=!1,q=c?c.join(""):"";if(b>-1){if(void 0===c){for(var r,s=b-1;void 0===(r=l().validPositions[s]||l().tests[s])&&s>-1;)s--;void 0!==r&&s>-1&&(m=f(r),q=m.join(""),k=s)}if(l().tests[b]&&l().tests[b][0].cd===q)return g(l().tests[b]);for(var t=m.shift();t<i.length;t++){var u=e(i[t],m,[t]);if(u&&k===b||k>b)break}}return(0===n.length||o)&&n.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:q}),void 0!==c&&l().tests[b]?g(a.extend(!0,[],n)):(l().tests[b]=a.extend(!0,[],n),g(l().tests[b]))}function u(){return void 0===l()._buffer&&(l()._buffer=k(!1,1),void 0===l().buffer&&l()._buffer.slice()),l()._buffer}function v(a){return void 0!==l().buffer&&a!==!0||(l().buffer=k(!0,n(),!0)),l().buffer}function w(a,b,c){var d;if(a===!0)m(),a=0,b=c.length;else for(d=a;d<b;d++)delete l().validPositions[d];for(d=a;d<b;d++)m(!0),c[d]!==j.skipOptionalPartCharacter&&z(d,c[d],!0,!0)}function x(a,c,d){switch(j.casing||c.casing){case"upper":a=a.toUpperCase();break;case"lower":a=a.toLowerCase();break;case"title":var e=l().validPositions[d-1];a=0===d||e&&e.input===String.fromCharCode(b.keyCode.SPACE)?a.toUpperCase():a.toLowerCase()}return a}function y(b,c){for(var d=j.greedy?c:c.slice(0,1),e=!1,f=0;f<b.length;f++)if(a.inArray(b[f],d)!==-1){e=!0;break}return e}function z(c,d,e,f,g){function h(a){var b=ja?a.begin-a.end>1||a.begin-a.end===1&&j.insertMode:a.end-a.begin>1||a.end-a.begin===1&&j.insertMode;return b&&0===a.begin&&a.end===l().maskLength?"full":b}function i(b,d,e){var g=!1;return a.each(t(b),function(i,k){for(var p=k.match,q=d?1:0,r="",s=p.cardinality;s>q;s--)r+=D(b-(s-1));if(d&&(r+=d),v(!0),g=null!=p.fn?p.fn.test(r,l(),b,e,j,h(c)):(d===p.def||d===j.skipOptionalPartCharacter)&&""!==p.def&&{c:p.placeholder||p.def,pos:b},g!==!1){var t=void 0!==g.c?g.c:d;t=t===j.skipOptionalPartCharacter&&null===p.fn?p.placeholder||p.def:t;var y=b,A=v();if(void 0!==g.remove&&(a.isArray(g.remove)||(g.remove=[g.remove]),a.each(g.remove.sort(function(a,b){return b-a}),function(a,b){o(b,b+1,!0)})),void 0!==g.insert&&(a.isArray(g.insert)||(g.insert=[g.insert]),a.each(g.insert.sort(function(a,b){return a-b}),function(a,b){z(b.pos,b.c,!0,f)})),g.refreshFromBuffer){var B=g.refreshFromBuffer;if(e=!0,w(B===!0?B:B.start,B.end,A),void 0===g.pos&&void 0===g.c)return g.pos=n(),!1;if(y=void 0!==g.pos?g.pos:b,y!==b)return g=a.extend(g,z(y,t,!0,f)),!1}else if(g!==!0&&void 0!==g.pos&&g.pos!==b&&(y=g.pos,w(b,y,v().slice()),y!==b))return g=a.extend(g,z(y,t,!0)),!1;return(g===!0||void 0!==g.pos||void 0!==g.c)&&(i>0&&m(!0),u(y,a.extend({},k,{input:x(t,p,y)}),f,h(c))||(g=!1),!1)}}),g}function k(b,c,d){var e,g,h,i,k,o,p,q,r=a.extend(!0,{},l().validPositions),s=!1,u=n();for(i=l().validPositions[u];u>=0;u--)if(h=l().validPositions[u],h&&void 0!==h.alternation){if(e=u,g=l().validPositions[e].alternation,i.locator[h.alternation]!==h.locator[h.alternation])break;i=h}if(void 0!==g){q=parseInt(e);var v=void 0!==i.locator[i.alternation||g]?i.locator[i.alternation||g]:p[0];v.length>0&&(v=v.split(",")[0]);var w=l().validPositions[q],x=l().validPositions[q-1];a.each(t(q,x?x.locator:void 0,q-1),function(e,h){p=h.locator[g]?h.locator[g].toString().split(","):[];for(var i=0;i<p.length;i++){var t=[],u=0,x=0,y=!1;if(v<p[i]&&(void 0===h.na||a.inArray(p[i],h.na.split(","))===-1)){l().validPositions[q]=a.extend(!0,{},h);var A=l().validPositions[q].locator;for(l().validPositions[q].locator[g]=parseInt(p[i]),null==h.match.fn?(w.input!==h.match.def&&(y=!0,w.generatedInput!==!0&&t.push(w.input)),x++,l().validPositions[q].generatedInput=!/[0-9a-bA-Z]/.test(h.match.def),l().validPositions[q].input=h.match.def):l().validPositions[q].input=w.input,k=q+1;k<n(void 0,!0)+1;k++)o=l().validPositions[k],o&&o.generatedInput!==!0&&/[0-9a-bA-Z]/.test(o.input)?t.push(o.input):k<b&&u++,delete l().validPositions[k];for(y&&t[0]===h.match.def&&t.shift(),m(!0),s=!0;t.length>0;){var B=t.shift();if(B!==j.skipOptionalPartCharacter&&!(s=z(n(void 0,!0)+1,B,!1,f,!0)))break}if(s){l().validPositions[q].locator=A;var C=n(b)+1;for(k=q+1;k<n()+1;k++)o=l().validPositions[k],(void 0===o||null==o.match.fn)&&k<b+(x-u)&&x++;b+=x-u,s=z(b>C?C:b,c,d,f,!0)}if(s)return!1;m(),l().validPositions=a.extend(!0,{},r)}}})}return s}function r(b,c){var d=l().validPositions[c];if(d)for(var e=d.locator,f=e.length,g=b;g<c;g++)if(void 0===l().validPositions[g]&&!A(g,!0)){var h=t(g),i=h[0],j=-1;a.each(h,function(a,b){for(var c=0;c<f&&(void 0!==b.locator[c]&&y(b.locator[c].toString().split(","),e[c].toString().split(",")));c++)j<c&&(j=c,i=b)}),u(g,a.extend({},i,{input:i.match.placeholder||i.match.def}),!0)}}function u(b,c,d,e){if(e||j.insertMode&&void 0!==l().validPositions[b]&&void 0===d){var f,g=a.extend(!0,{},l().validPositions),h=n(void 0,!0);for(f=b;f<=h;f++)delete l().validPositions[f];l().validPositions[b]=a.extend(!0,{},c);var i,k=!0,o=l().validPositions,p=!1,q=l().maskLength;for(f=i=b;f<=h;f++){var r=g[f];if(void 0!==r)for(var t=i;t<l().maskLength&&(null==r.match.fn&&o[f]&&(o[f].match.optionalQuantifier===!0||o[f].match.optionality===!0)||null!=r.match.fn);){if(t++,p===!1&&g[t]&&g[t].match.def===r.match.def)l().validPositions[t]=a.extend(!0,{},g[t]),l().validPositions[t].input=r.input,C(t),i=t,k=!0;else if(s(t,r.match.def)){var u=z(t,r.input,!0,!0);k=u!==!1,i=u.caret||u.insert?n():t,p=!0}else k=r.generatedInput===!0;if(l().maskLength<q&&(l().maskLength=q),k)break}if(!k)break}if(!k)return l().validPositions=a.extend(!0,{},g),m(!0),!1}else l().validPositions[b]=a.extend(!0,{},c);return m(!0),!0}function C(b){for(var c=b-1;c>-1&&!l().validPositions[c];c--);var d,e;for(c++;c<b;c++)void 0===l().validPositions[c]&&(j.jitMasking===!1||j.jitMasking>c)&&(e=t(c,q(c-1).locator,c-1).slice(),""===e[e.length-1].match.def&&e.pop(),d=p(e),d&&(d.match.def===j.radixPointDefinitionSymbol||!A(c,!0)||a.inArray(j.radixPoint,v())<c&&d.match.fn&&d.match.fn.test(F(c),l(),c,!1,j))&&(G=i(c,d.match.placeholder||(null==d.match.fn?d.match.def:""!==F(c)?F(c):v()[c]),!0),G!==!1&&(l().validPositions[G.pos||c].generatedInput=!0)))}e=e===!0;var E=c;void 0!==c.begin&&(E=ja&&!h(c)?c.end:c.begin);var G=!1,H=a.extend(!0,{},l().validPositions);if(C(E),h(c)&&(N(void 0,b.keyCode.DELETE,c),E=l().p),E<l().maskLength&&(G=i(E,d,e),(!e||f===!0)&&G===!1)){var I=l().validPositions[E];if(!I||null!==I.match.fn||I.match.def!==d&&d!==j.skipOptionalPartCharacter){if((j.insertMode||void 0===l().validPositions[B(E)])&&!A(E,!0)){var J=t(E).slice();""===J[J.length-1].match.def&&J.pop();var K=p(J,!0);K&&null===K.match.fn&&(K=K.match.placeholder||K.match.def,i(E,K,e),l().validPositions[E].generatedInput=!0);for(var L=E+1,M=B(E);L<=M;L++)if(G=i(L,d,e),G!==!1){r(E,void 0!==G.pos?G.pos:L),E=L;break}}}else G={caret:B(E)}}return G===!1&&j.keepStatic&&!e&&g!==!0&&(G=k(E,d,e)),G===!0&&(G={pos:E}),a.isFunction(j.postValidation)&&G!==!1&&!e&&f!==!0&&(G=!!j.postValidation(v(!0),G,j)&&G),void 0===G.pos&&(G.pos=E),G===!1&&(m(!0),l().validPositions=a.extend(!0,{},H)),G}function A(a,b){var c;if(b?(c=q(a).match,""===c.def&&(c=r(a).match)):c=r(a).match,null!=c.fn)return c.fn;if(b!==!0&&a>-1){var d=t(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function B(a,b){var c=l().maskLength;if(a>=c)return c;for(var d=a;++d<c&&(b===!0&&(r(d).match.newBlockMarker!==!0||!A(d))||b!==!0&&!A(d)););return d}function C(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(b===!0&&r(d).match.newBlockMarker!==!0||b!==!0&&!A(d)&&(c=t(d),c.length<2||2===c.length&&""===c[1].match.def)););return d}function D(a){return void 0===l().validPositions[a]?F(a):l().validPositions[a].input}function E(b,c,d,e,f){if(e&&a.isFunction(j.onBeforeWrite)){var g=j.onBeforeWrite(e,c,d,j);if(g){if(g.refreshFromBuffer){var h=g.refreshFromBuffer;w(h===!0?h:h.start,h.end,g.buffer||c),c=v(!0)}void 0!==d&&(d=void 0!==g.caret?g.caret:d)}}b.inputmask._valueSet(c.join("")),void 0===d||void 0!==e&&"blur"===e.type?ba(b,c,d):I(b,d),f===!0&&(la=!0,a(b).trigger("input"))}function F(a,b){if(b=b||r(a).match,void 0!==b.placeholder)return b.placeholder;if(null===b.fn){if(a>-1&&void 0===l().validPositions[a]){var c,d=t(a),e=[];if(d.length>1+(""===d[d.length-1].match.def?1:0))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,l(),a,!0,j)!==!1)&&(e.push(d[f]),null===d[f].match.fn&&(c=d[f]),e.length>1&&/[0-9a-bA-Z]/.test(e[0].match.def)))return j.placeholder.charAt(a%j.placeholder.length)}return b.def}return j.placeholder.charAt(a%j.placeholder.length)}function G(c,d,e,f,g,h){function i(){var a=!1,b=u().slice(p,B(p)).join("").indexOf(o);if(b!==-1&&!A(p)){a=!0;for(var c=u().slice(p,p+b),d=0;d<c.length;d++)if(" "!==c[d]){a=!1;break}}return a}var k=f.slice(),o="",p=0,r=void 0;if(m(),l().p=B(-1),!e)if(j.autoUnmask!==!0){var s=u().slice(0,B(-1)).join(""),t=k.join("").match(new RegExp("^"+b.escapeRegex(s),"g"));t&&t.length>0&&(k.splice(0,t.length*s.length),p=B(p))}else p=B(p);if(a.each(k,function(b,d){if(void 0!==d){var f=new a.Event("keypress");f.which=d.charCodeAt(0),o+=d;var g=n(void 0,!0),h=l().validPositions[g],k=q(g+1,h?h.locator.slice():void 0,g);if(!i()||e||j.autoUnmask){var s=e?b:null==k.match.fn&&k.match.optionality&&g+1<l().p?g+1:l().p;r=P.call(c,f,!0,!1,e,s),p=s+1,o=""}else r=P.call(c,f,!0,!1,!0,g+1);if(!e&&a.isFunction(j.onBeforeWrite)&&(r=j.onBeforeWrite(f,v(),r.forwardPosition,j),r&&r.refreshFromBuffer)){var t=r.refreshFromBuffer;w(t===!0?t:t.start,t.end,r.buffer),m(!0),r.caret&&(l().p=r.caret)}}}),d){var x=void 0,y=n();document.activeElement===c&&(g||r)&&(x=I(c).begin,g&&r===!1&&(x=B(n(x))),r&&h!==!0&&(x<y+1||y===-1)&&(x=j.numericInput&&void 0===r.caret?C(r.forwardPosition):r.forwardPosition)),E(c,v(),x,g||new a.Event("checkval"))}}function H(b){if(b&&void 0===b.inputmask)return b.value;var c=[],d=l().validPositions;for(var e in d)d[e].match&&null!=d[e].match.fn&&c.push(d[e].input);var f=0===c.length?"":(ja?c.reverse():c).join("");if(a.isFunction(j.onUnMask)){var g=(ja?v().slice().reverse():v()).join("");f=j.onUnMask(g,f,j)||f}return f}function I(a,b,c,d){function e(a){if(d!==!0&&ja&&"number"==typeof a&&(!j.greedy||""!==j.placeholder)){var b=v().join("").length;a=b-a}return a}var g;if("number"!=typeof b)return a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):window.getSelection?(g=window.getSelection().getRangeAt(0),g.commonAncestorContainer.parentNode!==a&&g.commonAncestorContainer!==a||(b=g.startOffset,c=g.endOffset)):document.selection&&document.selection.createRange&&(g=document.selection.createRange(),b=0-g.duplicate().moveStart("character",-a.inputmask._valueGet().length),c=b+g.text.length),{begin:e(b),end:e(c)};b=e(b),c=e(c),c="number"==typeof c?c:b;var h=parseInt(((a.ownerDocument.defaultView||window).getComputedStyle?(a.ownerDocument.defaultView||window).getComputedStyle(a,null):a.currentStyle).fontSize)*c;if(a.scrollLeft=h>a.scrollWidth?h:0,f||j.insertMode!==!1||b!==c||c++,a.setSelectionRange)a.selectionStart=b,a.selectionEnd=c;else if(window.getSelection){if(g=document.createRange(),void 0===a.firstChild||null===a.firstChild){var i=document.createTextNode("");a.appendChild(i)}g.setStart(a.firstChild,b<a.inputmask._valueGet().length?b:a.inputmask._valueGet().length),g.setEnd(a.firstChild,c<a.inputmask._valueGet().length?c:a.inputmask._valueGet().length),g.collapse(!0);var k=window.getSelection();k.removeAllRanges(),k.addRange(g)}else a.createTextRange&&(g=a.createTextRange(),g.collapse(!0),g.moveEnd("character",c),g.moveStart("character",b),g.select());ba(a,void 0,{begin:b,end:c})}function J(b){var c,d,e=v(),f=e.length,g=n(),h={},i=l().validPositions[g],j=void 0!==i?i.locator.slice():void 0;for(c=g+1;c<e.length;c++)d=q(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]&&y(d.locator[i.alternation].toString().split(","),k.toString().split(","))&&""!==t(c)[0].def))&&e[c]===F(c,d.match));c--)f--;return b?{l:f,def:h[f]?h[f].match:void 0}:f}function K(a){for(var b=J(),c=a.length-1;c>b&&!A(c);c--);return a.splice(b,c+1-b),a}function L(b){if(a.isFunction(j.isComplete))return j.isComplete(b,j);if("*"!==j.repeat){var c=!1,d=J(!0),e=C(d.l);if(void 0===d.def||d.def.newBlockMarker||d.def.optionality||d.def.optionalQuantifier){c=!0;for(var f=0;f<=e;f++){var g=q(f).match;if(null!==g.fn&&void 0===l().validPositions[f]&&g.optionality!==!0&&g.optionalQuantifier!==!0||null===g.fn&&b[f]!==F(f,g)){c=!1;break}}}return c}}function M(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);return n(void 0,void 0,a.inputmask.maskset.validPositions)!==-1||j.nullable!==!0?b:""}return c(a)},set:function(b,c){var e,f=a(b);return e=d(b,c),b.inputmask&&f.trigger("setvalue"),e},inputmaskpatch:!0}}}function d(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():n()!==-1||j.nullable!==!0?document.activeElement===this&&j.clearMaskOnLostFocus?(ja?K(v().slice()).reverse():K(v().slice())).join(""):g.call(this):"":g.call(this)}function e(b){h.call(this,b),this.inputmask&&a(this).trigger("setvalue")}function f(b){oa.on(b,"mouseenter",function(b){var c=a(this),d=this,e=d.inputmask._valueGet();e!==v().join("")&&c.trigger("setvalue")})}var g,h;if(!b.inputmask.__valueGet){if(j.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var i=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):void 0;i&&i.get&&i.set?(g=i.get,h=i.set,Object.defineProperty(b,"value",{get:d,set:e,configurable:!0})):"INPUT"!==b.tagName&&(g=function(){return this.textContent},h=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:d,set:e,configurable:!0}))}else document.__lookupGetter__&&b.__lookupGetter__("value")&&(g=b.__lookupGetter__("value"),h=b.__lookupSetter__("value"),b.__defineGetter__("value",d),b.__defineSetter__("value",e));b.inputmask.__valueGet=g,b.inputmask.__valueSet=h}b.inputmask._valueGet=function(a){return ja&&a!==!0?g.call(this.el).split("").reverse().join(""):g.call(this.el)},b.inputmask._valueSet=function(a,b){h.call(this.el,null===a||void 0===a?"":b!==!0&&ja?a.split("").reverse().join(""):a)},void 0===g&&(g=function(){return this.value},h=function(a){this.value=a},c(b.type),f(b))}}function N(c,d,e,f){function g(){if(j.keepStatic){for(var b=[],d=n(-1,!0),e=a.extend(!0,{},l().validPositions),f=l().validPositions[d];d>=0;d--){var g=l().validPositions[d];if(g){if(g.generatedInput!==!0&&/[0-9a-bA-Z]/.test(g.input)&&b.push(g.input),delete l().validPositions[d],void 0!==g.alternation&&g.locator[g.alternation]!==f.locator[g.alternation])break;f=g}}if(d>-1)for(l().p=B(n(-1,!0));b.length>0;){var h=new a.Event("keypress");h.which=b.pop().charCodeAt(0),P.call(c,h,!0,!1,!1,l().p)}else l().validPositions=a.extend(!0,{},e)}}if((j.numericInput||ja)&&(d===b.keyCode.BACKSPACE?d=b.keyCode.DELETE:d===b.keyCode.DELETE&&(d=b.keyCode.BACKSPACE),ja)){var h=e.end;e.end=e.begin,e.begin=h}d===b.keyCode.BACKSPACE&&(e.end-e.begin<1||j.insertMode===!1)?(e.begin=C(e.begin),void 0===l().validPositions[e.begin]||l().validPositions[e.begin].input!==j.groupSeparator&&l().validPositions[e.begin].input!==j.radixPoint||e.begin--):d===b.keyCode.DELETE&&e.begin===e.end&&(e.end=A(e.end,!0)?e.end+1:B(e.end)+1,void 0===l().validPositions[e.begin]||l().validPositions[e.begin].input!==j.groupSeparator&&l().validPositions[e.begin].input!==j.radixPoint||e.end++),o(e.begin,e.end,!1,f),f!==!0&&g();var i=n(e.begin,!0);i<e.begin?l().p=B(i):f!==!0&&(l().p=e.begin)}function O(c){function d(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}var e=this,f=a(e),g=c.keyCode,i=I(e);if(g===b.keyCode.BACKSPACE||g===b.keyCode.DELETE||h&&g===b.keyCode.BACKSPACE_SAFARI||c.ctrlKey&&g===b.keyCode.X&&!d("cut"))c.preventDefault(),N(e,g,i),E(e,v(!0),l().p,c,e.inputmask._valueGet()!==v().join("")),e.inputmask._valueGet()===u().join("")?f.trigger("cleared"):L(v())===!0&&f.trigger("complete"),j.showTooltip&&(e.title=j.tooltip||l().mask);else if(g===b.keyCode.END||g===b.keyCode.PAGE_DOWN){c.preventDefault();var k=B(n());j.insertMode||k!==l().maskLength||c.shiftKey||k--,I(e,c.shiftKey?i.begin:k,k,!0)}else g===b.keyCode.HOME&&!c.shiftKey||g===b.keyCode.PAGE_UP?(c.preventDefault(),I(e,0,c.shiftKey?i.begin:0,!0)):(j.undoOnEscape&&g===b.keyCode.ESCAPE||90===g&&c.ctrlKey)&&c.altKey!==!0?(G(e,!0,!1,da.split("")),f.trigger("click")):g!==b.keyCode.INSERT||c.shiftKey||c.ctrlKey?j.tabThrough===!0&&g===b.keyCode.TAB?(c.shiftKey===!0?(null===r(i.begin).match.fn&&(i.begin=B(i.begin)),i.end=C(i.begin,!0),i.begin=C(i.end,!0)):(i.begin=B(i.begin,!0),i.end=B(i.begin,!0),i.end<l().maskLength&&i.end--),i.begin<l().maskLength&&(c.preventDefault(),I(e,i.begin,i.end))):c.shiftKey||(j.insertMode===!1?g===b.keyCode.RIGHT?setTimeout(function(){var a=I(e);I(e,a.begin)},0):g===b.keyCode.LEFT&&setTimeout(function(){var a=I(e);I(e,ja?a.begin+1:a.begin-1)},0):setTimeout(function(){ba(e)},0)):(j.insertMode=!j.insertMode,I(e,j.insertMode||i.begin!==l().maskLength?i.begin:i.begin-1));j.onKeyDown.call(this,c,v(),I(e).begin,j),ma=a.inArray(g,j.ignorables)!==-1}function P(c,d,e,f,g){var h=this,i=a(h),k=c.which||c.charCode||c.keyCode;if(!(d===!0||c.ctrlKey&&c.altKey)&&(c.ctrlKey||c.metaKey||ma))return k===b.keyCode.ENTER&&da!==v().join("")&&(da=v().join(""),setTimeout(function(){i.trigger("change")},0)),!0;if(k){46===k&&c.shiftKey===!1&&","===j.radixPoint&&(k=44);var n,o=d?{begin:g,end:g}:I(h),p=String.fromCharCode(k);l().writeOutBuffer=!0;var q=z(o,p,f);if(q!==!1&&(m(!0),n=void 0!==q.caret?q.caret:d?q.pos+1:B(q.pos),l().p=n),e!==!1){var r=this;if(setTimeout(function(){j.onKeyValidation.call(r,k,q,j)},0),l().writeOutBuffer&&q!==!1){var s=v();E(h,s,j.numericInput&&void 0===q.caret?C(n):n,c,d!==!0),d!==!0&&setTimeout(function(){L(s)===!0&&i.trigger("complete")},0)}}if(j.showTooltip&&(h.title=j.tooltip||l().mask),c.preventDefault(),d)return q.forwardPosition=n,q}}function Q(b){var c,d=this,e=b.originalEvent||b,f=a(d),g=d.inputmask._valueGet(!0),h=I(d);ja&&(c=h.end,h.end=h.begin,h.begin=c);var i=g.substr(0,h.begin),k=g.substr(h.end,g.length);if(i===(ja?u().reverse():u()).slice(0,h.begin).join("")&&(i=""),k===(ja?u().reverse():u()).slice(h.end).join("")&&(k=""),ja&&(c=i,i=k,k=c),window.clipboardData&&window.clipboardData.getData)g=i+window.clipboardData.getData("Text")+k;else{if(!e.clipboardData||!e.clipboardData.getData)return!0;g=i+e.clipboardData.getData("text/plain")+k}var l=g;if(a.isFunction(j.onBeforePaste)){if(l=j.onBeforePaste(g,j),l===!1)return b.preventDefault();l||(l=g)}return G(d,!1,!1,ja?l.split("").reverse():l.toString().split("")),E(d,v(),B(n()),b,da!==v().join("")),L(v())===!0&&f.trigger("complete"),b.preventDefault()}function R(c){var d=this,e=d.inputmask._valueGet();if(v().join("")!==e){var f=I(d);if(e=e.replace(new RegExp("("+b.escapeRegex(u().join(""))+")*"),""),g){var h=e.replace(v().join(""),"");if(1===h.length){var i=new a.Event("keypress");return i.which=h.charCodeAt(0),P.call(d,i,!0,!0,!1,l().validPositions[f.begin-1]?f.begin:f.begin-1),!1}}if(f.begin>e.length&&(I(d,e.length),f=I(d)),v().length-e.length!==1||e.charAt(f.begin)===v()[f.begin]||e.charAt(f.begin+1)===v()[f.begin]||A(f.begin)){for(var j=n()+1,k=u().join("");null===e.match(b.escapeRegex(k)+"$");)k=k.slice(1);e=e.replace(k,""),e=e.split(""),G(d,!0,!1,e,c,f.begin<j),L(v())===!0&&a(d).trigger("complete")}else c.keyCode=b.keyCode.BACKSPACE,O.call(d,c);c.preventDefault()}}function S(b){var c=this,d=c.inputmask._valueGet();G(c,!0,!1,(a.isFunction(j.onBeforeMask)?j.onBeforeMask(d,j)||d:d).split("")),da=v().join(""),(j.clearMaskOnLostFocus||j.clearIncomplete)&&c.inputmask._valueGet()===u().join("")&&c.inputmask._valueSet("")}function T(a){var b=this,c=b.inputmask._valueGet();j.showMaskOnFocus&&(!j.showMaskOnHover||j.showMaskOnHover&&""===c)&&(b.inputmask._valueGet()!==v().join("")?E(b,v(),B(n())):na===!1&&I(b,B(n()))),j.positionCaretOnTab===!0&&setTimeout(function(){V.apply(this,[a])},0),da=v().join("")}function U(a){var b=this;if(na=!1,j.clearMaskOnLostFocus&&document.activeElement!==b){var c=v().slice(),d=b.inputmask._valueGet();d!==b.getAttribute("placeholder")&&""!==d&&(n()===-1&&d===u().join("")?c=[]:K(c),E(b,c))}}function V(b){function c(b){if(""!==j.radixPoint){var c=l().validPositions;if(void 0===c[b]||c[b].input===F(b)){if(b<B(-1))return!0;var d=a.inArray(j.radixPoint,v());if(d!==-1){for(var e in c)if(d<e&&c[e].input!==F(e))return!1;return!0}}}return!1}var d=this;setTimeout(function(){if(document.activeElement===d){var b=I(d);if(b.begin===b.end)switch(j.positionCaretOnClick){case"none":break;case"radixFocus":if(c(b.begin)){var e=a.inArray(j.radixPoint,v().join(""));I(d,j.numericInput?B(e):e);break}default:var f=b.begin,g=n(f,!0),h=B(g);if(f<h)I(d,A(f)||A(f-1)?f:B(f));else{var i=F(h);(""!==i&&v()[h]!==i&&r(h).match.optionalQuantifier!==!0||!A(h)&&r(h).match.def===i)&&(h=B(h)),I(d,h)}}}},0)}function W(a){var b=this;setTimeout(function(){I(b,0,B(n()))},0)}function X(c){var d=this,e=a(d),f=I(d),g=c.originalEvent||c,h=window.clipboardData||g.clipboardData,i=ja?v().slice(f.end,f.begin):v().slice(f.begin,f.end);h.setData("text",ja?i.reverse().join(""):i.join("")),document.execCommand&&document.execCommand("copy"),N(d,b.keyCode.DELETE,f),E(d,v(),l().p,c,da!==v().join("")),d.inputmask._valueGet()===u().join("")&&e.trigger("cleared"),j.showTooltip&&(d.title=j.tooltip||l().mask)}function Y(b){var c=a(this),d=this;if(d.inputmask){var e=d.inputmask._valueGet(),f=v().slice();da!==f.join("")&&setTimeout(function(){c.trigger("change"),da=f.join("")},0),""!==e&&(j.clearMaskOnLostFocus&&(n()===-1&&e===u().join("")?f=[]:K(f)),L(f)===!1&&(setTimeout(function(){c.trigger("incomplete")},0),j.clearIncomplete&&(m(),f=j.clearMaskOnLostFocus?[]:u().slice())),E(d,f,void 0,b))}}function Z(a){var b=this;na=!0,document.activeElement!==b&&j.showMaskOnHover&&b.inputmask._valueGet()!==v().join("")&&E(b,v())}function $(a){da!==v().join("")&&fa.trigger("change"),j.clearMaskOnLostFocus&&n()===-1&&ea.inputmask._valueGet&&ea.inputmask._valueGet()===u().join("")&&ea.inputmask._valueSet(""),j.removeMaskOnSubmit&&(ea.inputmask._valueSet(ea.inputmask.unmaskedvalue(),!0),setTimeout(function(){E(ea,v())},0))}function _(a){setTimeout(function(){fa.trigger("setvalue")},0)}function aa(b){function c(a){var c,d=document.createElement("span");for(var e in f)isNaN(e)&&e.indexOf("font")!==-1&&(d.style[e]=f[e]);d.style.textTransform=f.textTransform,d.style.letterSpacing=f.letterSpacing,d.style.position="absolute",d.style.height="auto",d.style.width="auto",d.style.visibility="hidden",d.style.whiteSpace="nowrap",document.body.appendChild(d);var g,h=b.inputmask._valueGet(),i=0;for(c=0,g=h.length;c<=g;c++){if(d.innerHTML+=h.charAt(c)||"_",d.offsetWidth>=a){var j=a-i,k=d.offsetWidth-a;d.innerHTML=h.charAt(c),j-=d.offsetWidth/3,c=j<k?c-1:c;break}i=d.offsetWidth}return document.body.removeChild(d),c}function d(){ha.style.position="absolute",ha.style.top=e.top+"px",ha.style.left=e.left+"px",
  ha.style.width=parseInt(b.offsetWidth)-parseInt(f.paddingLeft)-parseInt(f.paddingRight)-parseInt(f.borderLeftWidth)-parseInt(f.borderRightWidth)+"px",ha.style.height=parseInt(b.offsetHeight)-parseInt(f.paddingTop)-parseInt(f.paddingBottom)-parseInt(f.borderTopWidth)-parseInt(f.borderBottomWidth)+"px",ha.style.lineHeight=ha.style.height,ha.style.zIndex=isNaN(f.zIndex)?-1:f.zIndex-1,ha.style.webkitAppearance="textfield",ha.style.mozAppearance="textfield",ha.style.Appearance="textfield"}var e=a(b).position(),f=(b.ownerDocument.defaultView||window).getComputedStyle(b,null);b.parentNode;ha=document.createElement("div"),document.body.appendChild(ha);for(var g in f)isNaN(g)&&"cssText"!==g&&g.indexOf("webkit")==-1&&(ha.style[g]=f[g]);b.style.backgroundColor="transparent",b.style.color="transparent",b.style.webkitAppearance="caret",b.style.mozAppearance="caret",b.style.Appearance="caret",d(),a(window).on("resize",function(c){e=a(b).position(),f=(b.ownerDocument.defaultView||window).getComputedStyle(b,null),d()}),a(b).on("click",function(a){return I(b,c(a.clientX)),V.call(this,[a])})}function ba(a,b,c){function d(){f||null!==h.fn&&void 0!==i.input?f&&null!==h.fn&&void 0!==i.input&&(f=!1,e+="</span>"):(f=!0,e+="<span class='im-static''>")}if(void 0!==ha){b=b||v(),void 0===c?c=I(a):void 0===c.begin&&(c={begin:c,end:c});var e="",f=!1;if(""!=b){var g,h,i,k=0,m=n();do k===c.begin&&document.activeElement===a&&(e+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>"),l().validPositions[k]?(i=l().validPositions[k],h=i.match,g=i.locator.slice(),d(),e+=i.input):(i=q(k,g,k-1),h=i.match,g=i.locator.slice(),(j.jitMasking===!1||k<m||Number.isFinite(j.jitMasking)&&j.jitMasking>k)&&(d(),e+=F(k,h))),k++;while((void 0===ga||k<ga)&&(null!==h.fn||""!==h.def)||m>k)}ha.innerHTML=e}}function ca(b){function c(b,c){var d=b.getAttribute("type"),e="INPUT"===b.tagName&&a.inArray(d,c.supportsInputType)!==-1||b.isContentEditable||"TEXTAREA"===b.tagName;if(!e&&"INPUT"===b.tagName){var f=document.createElement("input");f.setAttribute("type",d),e="text"===f.type,f=null}return e}if(c(b,j)&&(ea=b,fa=a(ea),j.showTooltip&&(ea.title=j.tooltip||l().mask),("rtl"===ea.dir||j.rightAlign)&&(ea.style.textAlign="right"),("rtl"===ea.dir||j.numericInput)&&(ea.dir="ltr",ea.removeAttribute("dir"),ea.inputmask.isRTL=!0,ja=!0),j.colorMask===!0&&aa(ea),i&&(ea.hasOwnProperty("inputmode")&&(ea.inputmode=j.inputmode,ea.setAttribute("inputmode",j.inputmode)),"rtfm"===j.androidHack&&(j.colorMask!==!0&&aa(ea),ea.type="password")),oa.off(ea),M(ea),oa.on(ea,"submit",$),oa.on(ea,"reset",_),oa.on(ea,"mouseenter",Z),oa.on(ea,"blur",Y),oa.on(ea,"focus",T),oa.on(ea,"mouseleave",U),j.colorMask!==!0&&oa.on(ea,"click",V),oa.on(ea,"dblclick",W),oa.on(ea,"paste",Q),oa.on(ea,"dragdrop",Q),oa.on(ea,"drop",Q),oa.on(ea,"cut",X),oa.on(ea,"complete",j.oncomplete),oa.on(ea,"incomplete",j.onincomplete),oa.on(ea,"cleared",j.oncleared),j.inputEventOnly!==!0&&(oa.on(ea,"keydown",O),oa.on(ea,"keypress",P)),oa.on(ea,"compositionstart",a.noop),oa.on(ea,"compositionupdate",a.noop),oa.on(ea,"compositionend",a.noop),oa.on(ea,"keyup",a.noop),oa.on(ea,"input",R),oa.on(ea,"setvalue",S),u(),""!==ea.inputmask._valueGet()||j.clearMaskOnLostFocus===!1||document.activeElement===ea)){var d=a.isFunction(j.onBeforeMask)?j.onBeforeMask(ea.inputmask._valueGet(),j)||ea.inputmask._valueGet():ea.inputmask._valueGet();G(ea,!0,!1,d.split(""));var e=v().slice();da=e.join(""),L(e)===!1&&j.clearIncomplete&&m(),j.clearMaskOnLostFocus&&document.activeElement!==ea&&(n()===-1?e=[]:K(e)),E(ea,e),document.activeElement===ea&&I(ea,B(n()))}}var da,ea,fa,ga,ha,ia,ja=!1,ka=!1,la=!1,ma=!1,na=!1,oa={on:function(c,d,e){var f=function(c){if(void 0===this.inputmask&&"FORM"!==this.nodeName){var d=a.data(this,"_inputmask_opts");d?new b(d).mask(this):oa.off(this)}else{if("setvalue"===c.type||!(this.disabled||this.readOnly&&!("keydown"===c.type&&c.ctrlKey&&67===c.keyCode||j.tabThrough===!1&&c.keyCode===b.keyCode.TAB))){switch(c.type){case"input":if(la===!0)return la=!1,c.preventDefault();break;case"keydown":ka=!1,la=!1;break;case"keypress":if(ka===!0)return c.preventDefault();ka=!0;break;case"click":if(g||h){var f=this,i=arguments;return setTimeout(function(){e.apply(f,i)},0),!1}}var k=e.apply(this,arguments);return k===!1&&(c.preventDefault(),c.stopPropagation()),k}c.preventDefault()}};c.inputmask.events[d]=c.inputmask.events[d]||[],c.inputmask.events[d].push(f),a.inArray(d,["submit","reset"])!==-1?null!=c.form&&a(c.form).on(d,f):a(c).on(d,f)},off:function(b,c){if(b.inputmask&&b.inputmask.events){var d;c?(d=[],d[c]=b.inputmask.events[c]):d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();a.inArray(c,["submit","reset"])!==-1?null!=b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]})}}};if(void 0!==c)switch(c.action){case"isComplete":return ea=c.el,L(v());case"unmaskedvalue":return ea=c.el,void 0!==ea&&void 0!==ea.inputmask?(e=ea.inputmask.maskset,j=ea.inputmask.opts,ja=ea.inputmask.isRTL):(ia=c.value,j.numericInput&&(ja=!0),ia=(a.isFunction(j.onBeforeMask)?j.onBeforeMask(ia,j)||ia:ia).split(""),G(void 0,!1,!1,ja?ia.reverse():ia),a.isFunction(j.onBeforeWrite)&&j.onBeforeWrite(void 0,v(),0,j)),H(ea);case"mask":ea=c.el,e=ea.inputmask.maskset,j=ea.inputmask.opts,ja=ea.inputmask.isRTL,ca(ea);break;case"format":return j.numericInput&&(ja=!0),ia=(a.isFunction(j.onBeforeMask)?j.onBeforeMask(c.value,j)||c.value:c.value).split(""),G(void 0,!1,!1,ja?ia.reverse():ia),a.isFunction(j.onBeforeWrite)&&j.onBeforeWrite(void 0,v(),0,j),c.metadata?{value:ja?v().slice().reverse().join(""):v().join(""),metadata:d({action:"getmetadata"},e,j)}:ja?v().slice().reverse().join(""):v().join("");case"isValid":j.numericInput&&(ja=!0),c.value?(ia=c.value.split(""),G(void 0,!1,!0,ja?ia.reverse():ia)):c.value=v().join("");for(var pa=v(),qa=J(),ra=pa.length-1;ra>qa&&!A(ra);ra--);return pa.splice(qa,ra+1-qa),L(pa)&&c.value===v().join("");case"getemptymask":return u().join("");case"remove":ea=c.el,fa=a(ea),e=ea.inputmask.maskset,j=ea.inputmask.opts,ea.inputmask._valueSet(H(ea)),oa.off(ea);var sa;Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?(sa=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(ea),"value"),sa&&ea.inputmask.__valueGet&&Object.defineProperty(ea,"value",{get:ea.inputmask.__valueGet,set:ea.inputmask.__valueSet,configurable:!0})):document.__lookupGetter__&&ea.__lookupGetter__("value")&&ea.inputmask.__valueGet&&(ea.__defineGetter__("value",ea.inputmask.__valueGet),ea.__defineSetter__("value",ea.inputmask.__valueSet)),ea.inputmask=void 0;break;case"getmetadata":if(a.isArray(e.metadata)){var ta=k(!0,0,!1).join("");return a.each(e.metadata,function(a,b){if(b.mask===ta)return ta=b,!1}),ta}return e.metadata}}var e=navigator.userAgent,f=/mobile/i.test(e),g=/iemobile/i.test(e),h=/iphone/i.test(e)&&!g,i=/android/i.test(e)&&!g;return 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:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],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,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1},masksCache:{},mask:function(e){function f(b,c,d,e){function f(a,c){c=void 0!==c?c:b.getAttribute(e+"-"+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 h,i,j,k,l=b.getAttribute(e);if(l&&""!==l&&(l=l.replace(new RegExp("'","g"),'"'),i=JSON.parse("{"+l+"}")),i){j=void 0;for(k in i)if("alias"===k.toLowerCase()){j=i[k];break}}f("alias",j),d.alias&&g.resolveAlias(d.alias,d,c);for(h in c){if(i){j=void 0;for(k in i)if(k.toLowerCase()===h.toLowerCase()){j=i[k];break}}f(h,j)}return a.extend(!0,c,d),c}var g=this;return"string"==typeof e&&(e=document.getElementById(e)||document.querySelectorAll(e)),e=e.nodeName?[e]:e,a.each(e,function(e,h){var i=a.extend(!0,{},g.opts);f(h,i,a.extend(!0,{},g.userOptions),g.dataAttribute);var j=c(i,g.noMasksCache);void 0!==j&&(void 0!==h.inputmask&&h.inputmask.remove(),h.inputmask=new b,h.inputmask.opts=i,h.inputmask.noMasksCache=g.noMasksCache,h.inputmask.userOptions=a.extend(!0,{},g.userOptions),h.inputmask.el=h,h.inputmask.maskset=j,h.inputmask.isRTL=!1,a.data(h,"_inputmask_opts",i),d({action:"mask",el:h}))}),e&&e[0]?e[0].inputmask||this:this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"==typeof b?(a.extend(this.userOptions,b),this.el&&c!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return d({action:"unmaskedvalue",el:this.el,value:a},this.el&&this.el.inputmask?this.el.inputmask.maskset:c(this.opts,this.noMasksCache),this.opts)},remove:function(){if(this.el)return d({action:"remove",el:this.el}),this.el.inputmask=void 0,this.el},getemptymask:function(){return d({action:"getemptymask"},this.maskset||c(this.opts,this.noMasksCache),this.opts)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return d({action:"isComplete",el:this.el},this.maskset||c(this.opts,this.noMasksCache),this.opts)},getmetadata:function(){return d({action:"getmetadata"},this.maskset||c(this.opts,this.noMasksCache),this.opts)},isValid:function(a){return d({action:"isValid",value:a},this.maskset||c(this.opts,this.noMasksCache),this.opts)},format:function(a,b){return d({action:"format",value:a,metadata:b},this.maskset||c(this.opts,this.noMasksCache),this.opts)},analyseMask:function(b,c){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,nativeDef: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,nativeDef:d})}else b.matches.splice(e++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:void 0===g||g.def!==d,casing:null,def:c.staticDefinitionSymbol||d,placeholder:void 0!==c.staticDefinitionSymbol?d:void 0,nativeDef:d}),r=!1}function f(a,b){a&&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:f(s.matches[s.matches.length-1]),t.push(new d((!1),(!0)));break;case c.groupmarker.start:f(s.matches[s.matches.length-1]),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},resolveAlias:function(b,c,d){var e=d.aliases[b];return e?(e.alias&&this.resolveAlias(e.alias,void 0,d),a.extend(!0,d,e),a.extend(!0,d,c),!0):(null===d.mask&&(d.mask=b),!1)}},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,BACKSPACE_SAFARI:127,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,X:88},window.Inputmask=b,b});