var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(n,t,i){var f,r,u;for(n instanceof String&&(n=String(n)),f=n.length,r=0;r<f;r++)if(u=n[r],t.call(i,u,r,n))return{i:r,v:u};return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(n,t,i){n!=Array.prototype&&n!=Object.prototype&&(n[t]=i.value)};$jscomp.getGlobal=function(n){return"undefined"!=typeof window&&window===n?n:"undefined"!=typeof global&&null!=global?global:n};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(n,t,i,r){if(t){for(i=$jscomp.global,n=n.split("."),r=0;r<n.length-1;r++){var u=n[r];u in i||(i[u]={});i=i[u]}n=n[n.length-1];r=i[n];t=t(r);t!=r&&null!=t&&$jscomp.defineProperty(i,n,{configurable:!0,writable:!0,value:t})}};$jscomp.polyfill("Array.prototype.find",function(n){return n?n:function(n,t){return $jscomp.findInternal(this,n,t).v}},"es6","es3"),function(n,t,i){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports&&"undefined"==typeof Meteor?module.exports=n(require("jquery")):n(t||i)}(function(n){var i=function(t,i,r){var u={invalid:[],getCaret:function(){var r;try{var n=0,e=t.get(0),f=document.selection,i=e.selectionStart;return f&&-1===navigator.appVersion.indexOf("MSIE 10")?(r=f.createRange(),r.moveStart("character",-u.val().length),n=r.text.length):(i||"0"===i)&&(n=i),n}catch(o){}},setCaret:function(n){var r,i;try{t.is(":focus")&&(r=t.get(0),r.setSelectionRange?r.setSelectionRange(n,n):(i=r.createTextRange(),i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",n),i.select()))}catch(u){}},events:function(){t.on("keydown.mask",function(n){t.data("mask-keycode",n.keyCode||n.which);t.data("mask-previus-value",t.val());t.data("mask-previus-caret-pos",u.getCaret());u.maskDigitPosMapOld=u.maskDigitPosMap}).on(n.jMaskGlobals.useInput?"input.mask":"keyup.mask",u.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){t.keydown().keyup()},100)}).on("change.mask",function(){t.data("changed",!0)}).on("blur.mask",function(){e===u.val()||t.data("changed")||t.trigger("change");t.data("changed",!1)}).on("blur.mask",function(){e=u.val()}).on("focus.mask",function(t){!0===r.selectOnFocus&&n(t.target).select()}).on("focusout.mask",function(){r.clearIfNotMatch&&!o.test(u.val())&&u.val("")})},getRegexMask:function(){for(var n=[],t,e,o,r,u=0;u<i.length;u++)(t=f.translation[i.charAt(u)])?(e=t.pattern.toString().replace(/.{1}$|^.{1}/g,""),o=t.optional,(t=t.recursive)?(n.push(i.charAt(u)),r={digit:i.charAt(u),pattern:e}):n.push(o||t?e+"?":e)):n.push(i.charAt(u).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return n=n.join(""),r&&(n=n.replace(new RegExp("("+r.digit+"(.*"+r.digit+")?)"),"($1)?").replace(new RegExp(r.digit,"g"),r.pattern)),new RegExp(n)},destroyEvents:function(){t.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(n){var i=t.is("input")?"val":"text";return 0<arguments.length?(t[i]()!==n&&t[i](n),i=t):i=t[i](),i},calculateCaretPosition:function(n){var e=u.getMasked(),i=u.getCaret(),f;if(n!==e){f=t.data("mask-previus-caret-pos")||0;e=e.length;for(var h=n.length,c=n=0,o=0,s=0,r=i;r<e&&u.maskDigitPosMap[r];r++)c++;for(r=i-1;0<=r&&u.maskDigitPosMap[r];r--)n++;for(r=i-1;0<=r;r--)u.maskDigitPosMap[r]&&o++;for(r=f-1;0<=r;r--)u.maskDigitPosMapOld[r]&&s++;i>h?i=10*e:f>=i&&f!==h?u.maskDigitPosMapOld[i]||(f=i,i=i-(s-o)-n,u.maskDigitPosMap[i]&&(i=f)):i>f&&(i=i+(o-s)+c)}return i},behaviour:function(i){var r,e,o;return i=i||window.event,u.invalid=[],r=t.data("mask-keycode"),-1===n.inArray(r,f.byPassKeys)?(r=u.getMasked(),e=u.getCaret(),o=t.data("mask-previus-value")||"",setTimeout(function(){u.setCaret(u.calculateCaretPosition(o))},n.jMaskGlobals.keyStrokeCompensation),u.val(r),u.setCaret(e),u.callbacks(i)):void 0},getMasked:function(n,t){var h=[],nt=void 0===t?u.val():t+"",e=0,y=i.length,o=0,p=nt.length,s=1,w="push",l=-1,k=0,a,d,g;for(t=[],r.reverse?(w="unshift",s=-1,a=0,e=y-1,o=p-1,d=function(){return-1<e&&-1<o}):(a=y-1,d=function(){return e<y&&o<p});d();){var b=i.charAt(e),v=nt.charAt(o),c=f.translation[b];c?(v.match(c.pattern)?(h[w](v),c.recursive&&(-1===l?l=e:e===a&&e!==l&&(e=l-s),a===l&&(e-=s)),e+=s):v===g?(k--,g=void 0):c.optional?(e+=s,o-=s):c.fallback?(h[w](c.fallback),e+=s,o-=s):u.invalid.push({p:o,v:v,e:c.pattern}),o+=s):(n||h[w](b),v===b?(t.push(o),o+=s):(g=b,t.push(o+k),k++),e+=s)}return n=i.charAt(a),y!==p+1||f.translation[n]||h.push(n),h=h.join(""),u.mapMaskdigitPositions(h,t,p),h},mapMaskdigitPositions:function(n,t,i){for(n=r.reverse?n.length-i:0,u.maskDigitPosMap={},i=0;i<t.length;i++)u.maskDigitPosMap[t[i]+n]=1},callbacks:function(n){var f=u.val(),h=f!==e,s=[f,n,t,r],o=function(n,t,i){"function"==typeof r[n]&&t&&r[n].apply(this,i)};o("onChange",!0===h,s);o("onKeyPress",!0===h,s);o("onComplete",f.length===i.length,s);o("onInvalid",0<u.invalid.length,[f,n,t,u.invalid,r])}},f,e,o;t=n(t);f=this;e=u.val();i="function"==typeof i?i(u.val(),void 0,t,r):i;f.mask=i;f.options=r;f.remove=function(){var n=u.getCaret();return f.options.placeholder&&t.removeAttr("placeholder"),t.data("mask-maxlength")&&t.removeAttr("maxlength"),u.destroyEvents(),u.val(f.getCleanVal()),u.setCaret(n),t};f.getCleanVal=function(){return u.getMasked(!0)};f.getMaskedVal=function(n){return u.getMasked(!1,n)};f.init=function(e){var s,h;if(e=e||!1,r=r||{},f.clearIfNotMatch=n.jMaskGlobals.clearIfNotMatch,f.byPassKeys=n.jMaskGlobals.byPassKeys,f.translation=n.extend({},n.jMaskGlobals.translation,r.translation),f=n.extend(!0,{},f,r),o=u.getRegexMask(),e)u.events(),u.val(u.getMasked());else{for(r.placeholder&&t.attr("placeholder",r.placeholder),t.data("mask")&&t.attr("autocomplete","off"),e=0,s=!0;e<i.length;e++)if(h=f.translation[i.charAt(e)],h&&h.recursive){s=!1;break}s&&t.attr("maxlength",i.length).data("mask-maxlength",!0);u.destroyEvents();u.events();e=u.getCaret();u.val(u.getMasked());u.setCaret(e)}};f.init(!t.is("input"))};n.maskWatchers={};var u=function(){var t=n(this),u={},f=t.attr("data-mask");return t.attr("data-mask-reverse")&&(u.reverse=!0),t.attr("data-mask-clearifnotmatch")&&(u.clearIfNotMatch=!0),"true"===t.attr("data-mask-selectonfocus")&&(u.selectOnFocus=!0),r(t,f,u)?t.data("mask",new i(this,f,u)):void 0},r=function(t,i,r){r=r||{};var u=n(t).data("mask"),f=JSON.stringify;t=n(t).val()||n(t).text();try{return"function"==typeof i&&(i=i(t)),"object"!=typeof u||f(u.options)!==f(r)||u.mask!==i}catch(e){}},t=function(n){var i=document.createElement("div"),t;return n="on"+n,t=n in i,t||(i.setAttribute(n,"return;"),t="function"==typeof i[n]),t};n.fn.mask=function(t,u){var o;u=u||{};var f=this.selector,e=n.jMaskGlobals,s=e.watchInterval;return e=u.watchInputs||e.watchInputs,o=function(){if(r(this,t,u))return n(this).data("mask",new i(this,t,u))},n(this).each(o),f&&""!==f&&e&&(clearInterval(n.maskWatchers[f]),n.maskWatchers[f]=setInterval(function(){n(document).find(f).each(o)},s)),this};n.fn.masked=function(n){return this.data("mask").getMaskedVal(n)};n.fn.unmask=function(){return clearInterval(n.maskWatchers[this.selector]),delete n.maskWatchers[this.selector],this.each(function(){var t=n(this).data("mask");t&&t.remove().removeData("mask")})};n.fn.cleanVal=function(){return this.data("mask").getCleanVal()};n.applyDataMask=function(t){t=t||n.jMaskGlobals.maskElements;(t instanceof n?t:n(t)).filter(n.jMaskGlobals.dataMaskAttr).each(u)};t={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&t("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};n.jMaskGlobals=n.jMaskGlobals||{};t=n.jMaskGlobals=n.extend(!0,{},t,n.jMaskGlobals);t.dataMask&&n.applyDataMask();setInterval(function(){n.jMaskGlobals.watchDataMask&&n.applyDataMask()},t.watchInterval)},window.jQuery,window.Zepto),function(n){n.assignPhoneMask=function(t){var r=function(n){return n.replace(/\D/g,"").length>10?"0 (000) 000-0000":"(000) 000-0000#"},f={onKeyPress:function(n,t,i,u){i.mask(r.apply({},arguments),u)},placeholder:"(___) ___-____"},i,u;t.find(".text-mask-phone").each(function(){n(this).mask(r,f)});i=function(n){var i="(000) 000-0000# X#",r=n.toLowerCase(),u=n.replace(/\D/g,""),f="",e=!1,t;return r.indexOf("x")>-1&&(t=r.split("x"),t.length>0&&(u=t[0].replace(/\D/g,"")),t.length>1&&(f=t[1].replace(/\D/g,""),f.length>0&&(e=!0))),u.length>10&&(i="0 (000) 000-0000 X#"),i};u={onKeyPress:function(n,t,r,u){r.mask(i.apply({},arguments),u)},placeholder:"(___) ___-____ X___"};t.find(".text-mask-phone-ext").each(function(){n(this).mask(i,u)})};n.assignDateMask=function(t){t.find(".text-mask-date").each(function(){n(this).mask("00/00/0000",{placeholder:"__/__/____"})})};n.assignPhoneMask(n(document));n.assignDateMask(n(document))}(jQuery)