Comparing version 7.9.1 to 7.9.2
@@ -25,6 +25,7 @@ import { ElementRef, Renderer2 } from '@angular/core'; | ||
shiftTypedSymbols(inputValue: string): string; | ||
showMaskInInput(): string; | ||
showMaskInInput(inputVal?: string): string; | ||
clearIfNotMatchFn(): void; | ||
formElementProperty: [string, string | boolean]; | ||
checkSpecialCharAmount(mask: string): number; | ||
private _checkForIp; | ||
private formControlResult; | ||
@@ -31,0 +32,0 @@ private _removeMask; |
@@ -279,7 +279,8 @@ (function (global, factory) { | ||
} | ||
if (maskExpression === 'percent') { | ||
if (maskExpression.startsWith('percent')) { | ||
var decCount = maskExpression.split('.')[1]; | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
if (inputValue.length >= 3 && inputValue !== '100') { | ||
inputValue = inputValue.substring(0, 5); | ||
inputValue = inputValue.substring(0, decCount ? +decCount : 2); | ||
} | ||
@@ -299,3 +300,3 @@ } | ||
maskExpression.startsWith('comma_separator')) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/)) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
@@ -582,3 +583,9 @@ } | ||
if (cb === void 0) { cb = function () { }; } | ||
if (!maskExpression) { | ||
return inputValue; | ||
} | ||
this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : ''; | ||
if (this.maskExpression === 'IP' && this.showMaskTyped) { | ||
this.maskIsShown = this.showMaskInInput(inputValue || '#'); | ||
} | ||
if (!inputValue && this.showMaskTyped) { | ||
@@ -630,3 +637,3 @@ this.formControlResult(this.prefix); | ||
var prefNmask = this.prefix + this.maskIsShown; | ||
ifMaskIsShown = prefNmask.slice(resLen); | ||
ifMaskIsShown = this.maskExpression === 'IP' ? prefNmask : prefNmask.slice(resLen); | ||
return result + ifMaskIsShown; | ||
@@ -692,3 +699,3 @@ }; | ||
}; | ||
MaskService.prototype.showMaskInInput = function () { | ||
MaskService.prototype.showMaskInInput = function (inputVal) { | ||
if (this.showMaskTyped && !!this.shownMaskExpression) { | ||
@@ -703,2 +710,5 @@ if (this.maskExpression.length !== this.shownMaskExpression.length) { | ||
else if (this.showMaskTyped) { | ||
if (inputVal) { | ||
return this._checkForIp(inputVal); | ||
} | ||
return this.maskExpression.replace(/\w/g, '_'); | ||
@@ -727,2 +737,27 @@ } | ||
}; | ||
// tslint:disable-next-line: cyclomatic-complexity | ||
MaskService.prototype._checkForIp = function (inputVal) { | ||
if (inputVal === '#') { | ||
return '_._._._'; | ||
} | ||
var arr = []; | ||
for (var i = 0; i < inputVal.length; i++) { | ||
if (inputVal[i].match('\\d')) { | ||
arr.push(inputVal[i]); | ||
} | ||
} | ||
if (arr.length <= 3) { | ||
return '_._._'; | ||
} | ||
if (arr.length > 3 && arr.length <= 6) { | ||
return '_._'; | ||
} | ||
if (arr.length > 6 && arr.length <= 9) { | ||
return '_'; | ||
} | ||
if (arr.length > 9 && arr.length <= 12) { | ||
return ''; | ||
} | ||
return ''; | ||
}; | ||
MaskService.prototype.formControlResult = function (inputValue) { | ||
@@ -760,7 +795,15 @@ if (Array.isArray(this.dropSpecialCharacters)) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === ',' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
} | ||
if ('comma_separator.2' === this.maskExpression && this.isNumberValue) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === '.' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
} | ||
@@ -767,0 +810,0 @@ if (this.isNumberValue) { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/core","@angular/common","@angular/forms"],t):t((e=e||self)["ngx-mask"]={},e.ng.core,e.ng.common,e.ng.forms)}(this,function(e,t,i,s){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};var n=function(){return(n=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function a(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}function o(e,t){return function(i,s){t(i,s,e)}}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t){var i,s,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:o(0),"throw":o(1),"return":o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(r=2&n[0]?s["return"]:n[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,n[1])).done)return r;switch(s=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,s=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(o){n=[6,o],s=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}function p(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var s,r,n=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(o){r={error:o}}finally{try{s&&!s.done&&(i=n["return"])&&i.call(n)}finally{if(r)throw r.error}}return a}var c=new t.InjectionToken("config"),u=new t.InjectionToken("NEW_CONFIG"),f=new t.InjectionToken("INITIAL_CONFIG"),m={sufix:"",prefix:"",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,dropSpecialCharacters:!0,hiddenInput:!1,shownMaskExpression:"",validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},d=["percent","Hh:m0:s0","Hh:m0","Hh","m0:s0","s0","m0","separator","dot_separator","comma_separator","d0/M0/0000","d0/M0","d0","M0"],k=function(){function e(e){this._config=e,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this.prevResult="",this.prevActualResult="",this.separator=function(e,t,i,s){for(var r=(e+="").split(i),n=r.length>1?""+i+r[1]:"",a=r[0],o=/(\d+)(\d{3})/;o.test(a);)a=a.replace(o,"$1"+t+"$2");return s===undefined?a+n:0===s?a:a+n.substr(0,s+1)},this.percentage=function(e){return Number(e)>=0&&Number(e)<=100},this.getPrecision=function(e){var t=e.split(".");return t.length>1?Number(t[t.length-1]):Infinity},this.checkInputPrecision=function(e,t,i){if(t<Infinity){var s=void 0;s="."===i?new RegExp("\\.\\d{"+t+"}.*$"):new RegExp(",\\d{"+t+"}.*$");var r=e.match(s);r&&r[0].length-1>t?e=e.substring(0,e.length-1):0===t&&e.endsWith(i)&&(e=e.substring(0,e.length-1))}return e},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.sufix=this._config.sufix,this.hiddenInput=this._config.hiddenInput}return e.prototype.applyMaskWithPattern=function(e,t){var i=p(t,2),s=i[0],r=i[1];return this.customPattern=r,this.applyMask(e,s)},e.prototype.applyMask=function(e,t,i,s){if(void 0===i&&(i=0),void 0===s&&(s=function(){}),e===undefined||null===e||t===undefined)return"";var r=0,n="",a=!1,o=!1,h=1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length));var l=e.toString().split("");if("IP"===t&&(l.filter(function(e){return"."===e}).length<3&&l.length<7?this.ipError=!0:this.ipError=!1,t="099.099.099.099"),"percent"===t)(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/))&&(e=this._checkInput(e)).length>=3&&"100"!==e&&(e=e.substring(0,5)),n=this.percentage(e)?e:e.substring(0,e.length-1);else if("separator"===t||"dot_separator"===t||t.startsWith("dot_separator")||"comma_separator"===t||t.startsWith("comma_separator")){(e.match("[a-z]|[A-Z]")||e.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/))&&(e=this._checkInput(e));var p=this.getPrecision(t),c=void 0;t.startsWith("dot_separator")&&(-1!==e.indexOf(".")&&e.indexOf(".")===e.lastIndexOf(".")&&e.indexOf(".")>3&&(e=e.replace(".",",")),e=e.length>1&&"0"===e[0]&&","!==e[1]?e.slice(1,e.length):e),t.startsWith("comma_separator")&&(e=e.length>1&&"0"===e[0]&&"."!==e[1]?e.slice(1,e.length):e),"separator"===t?(e.includes(",")&&e.endsWith(",")&&e.indexOf(",")!==e.lastIndexOf(",")&&(e=e.substring(0,e.length-1)),(e.match("[a-z]|[A-Z]")||e.match(/[@#!$%^&*()_+|~=`{}\[\]:.";<>?\/]/))&&(e=e.substring(0,e.length-1)),c=e.replace(/\s/g,""),n=this.separator(c," ",".",p)):"dot_separator"===t||t.startsWith("dot_separator")?((e.match("[a-z]|[A-Z]")||e.match(/[@#!$%^&*()_+|~=`{}\[\]:\s";<>?\/]/))&&(e=e.substring(0,e.length-1)),c=(e=this.checkInputPrecision(e,p,",")).replace(/\./g,""),n=this.separator(c,".",",",p)):("comma_separator"===t||t.startsWith("comma_separator"))&&(c=e.replace(/\,/g,""),n=this.separator(c,",",".",p));var u=n.indexOf(",")-e.indexOf(",");if((k=n.length-e.length)>0&&","!==n[i]){o=!0;var f=0;do{this._shift.add(i+f),f++}while(f<k)}else 0!==u&&-1!==n.indexOf(",")&&n.indexOf(",")<i&&k<=0?(this._shift.clear(),o=!0,h=k,i+=k,this._shift.add(i)):this._shift.clear()}else for(var m=0,d=l[0];m<l.length&&r!==t.length;d=l[++m])if(this._checkSymbolMask(d,t[r])&&"?"===t[r+1])n+=d,r+=2;else if("*"===t[r+1]&&a&&this._checkSymbolMask(d,t[r+2]))n+=d,r+=3,a=!1;else if(this._checkSymbolMask(d,t[r])&&"*"===t[r+1])n+=d,a=!0;else if("?"===t[r+1]&&this._checkSymbolMask(d,t[r+2]))n+=d,r+=3;else if(this._checkSymbolMask(d,t[r])||this.hiddenInput&&this.maskAvailablePatterns[t[r]]&&this.maskAvailablePatterns[t[r]].symbol===d){if("H"===t[r]&&Number(d)>2){n+=0,r+=1;var k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--;continue}if("h"===t[r]&&"2"===n&&Number(d)>3)continue;if("m"===t[r]&&Number(d)>5){n+=0,r+=1;k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--;continue}if("s"===t[r]&&Number(d)>5){n+=0,r+=1;k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--;continue}if("d"===t[r]&&Number(d)>3){n+=0,r+=1;k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--;continue}if("d"===t[r-1]&&Number(e.slice(r-1,r+1))>31)continue;if("M"===t[r]&&Number(d)>1){n+=0,r+=1;k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--;continue}if("M"===t[r-1]&&Number(e.slice(r-1,r+1))>12)continue;n+=d,r++}else if(-1!==this.maskSpecialCharacters.indexOf(t[r])){n+=t[r],r++;k=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(k+this.prefix.length||0),m--}else this.maskSpecialCharacters.indexOf(d)>-1&&this.maskAvailablePatterns[t[r]]&&this.maskAvailablePatterns[t[r]].optional?(r++,m--):"*"===this.maskExpression[r+1]&&this._findSpecialChar(this.maskExpression[r+2])&&this._findSpecialChar(d)===this.maskExpression[r+2]&&a?(r+=3,n+=d):"?"===this.maskExpression[r+1]&&this._findSpecialChar(this.maskExpression[r+2])&&this._findSpecialChar(d)===this.maskExpression[r+2]&&a&&(r+=3,n+=d);n.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(n+=t[t.length-1]);for(var v=i+1;this._shift.has(v);)h++,v++;s(this._shift.has(i)?h:0,o),h<0&&this._shift.clear();var _=""+this.prefix+n;return _=this.sufix?""+this.prefix+n+this.sufix:""+this.prefix+n,0===n.length&&(_=""+this.prefix+n),_},e.prototype._findSpecialChar=function(e){return this.maskSpecialCharacters.find(function(t){return t===e})},e.prototype._checkSymbolMask=function(e,t){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[t]&&this.maskAvailablePatterns[t].pattern&&this.maskAvailablePatterns[t].pattern.test(e)},e.prototype._checkInput=function(e){return e.split("").filter(function(e){return e.match("\\d")||"."===e||","===e}).join("")},e=a([t.Injectable(),o(0,t.Inject(c)),h("design:paramtypes",[Object])],e)}(),v=function(e){function s(t,i,s,r){var n=e.call(this,i)||this;return n.document=t,n._config=i,n._elementRef=s,n._renderer=r,n.validation=!0,n.maskExpression="",n.isNumberValue=!1,n.showMaskTyped=!1,n.maskIsShown="",n.selStart=null,n.selEnd=null,n.onChange=function(e){},n.onTouch=function(){},n._formElement=n._elementRef.nativeElement,n}return function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(s,e),s.prototype.applyMask=function(t,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=function(){}),this.maskIsShown=this.showMaskTyped?this.showMaskInInput():"",!t&&this.showMaskTyped)return this.formControlResult(this.prefix),this.prefix+this.maskIsShown;var n=t&&"number"==typeof this.selStart?t[this.selStart]:"",a="";if(this.hiddenInput&&a===undefined){var o=this.actualValue.split("");""!==t&&o.length?"number"==typeof this.selStart&&"number"==typeof this.selEnd&&(t.length>o.length?o.splice(this.selStart,0,n):t.length<o.length&&(o.length-t.length==1?o.splice(this.selStart-1,1):o.splice(this.selStart,this.selEnd-this.selStart))):o=[],a=this.actualValue.length?this.shiftTypedSymbols(o.join("")):t}a=a.length?a:t;var h=e.prototype.applyMask.call(this,a,i,s,r);this.actualValue=this.getActualValue(h),!0===/dot_separator\.\d{1,}/.test(this.maskExpression)&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return","!==e})),"dot_separator"===this.maskExpression&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return","!==e})),!0===/comma_separator\.\d{1,}/.test(this.maskExpression)&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return"."!==e})),"comma_separator"===this.maskExpression&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return"."!==e})),this.formControlResult(h);if(!this.showMaskTyped)return this.hiddenInput&&h&&h.length?this.hideInput(h,this.maskExpression):h;var l=h.length;return h+(this.prefix+this.maskIsShown).slice(l)},s.prototype.applyValueChanges=function(e,t){void 0===e&&(e=0),void 0===t&&(t=function(){});var i=this.applyMask(this._formElement.value,this.maskExpression,e,t);this._formElement.value=i,this._formElement!==this.document.activeElement&&this.clearIfNotMatchFn()},s.prototype.hideInput=function(e,t){var i=this;return e.split("").map(function(e,s){return i.maskAvailablePatterns&&i.maskAvailablePatterns[t[s]]&&i.maskAvailablePatterns[t[s]].symbol?i.maskAvailablePatterns[t[s]].symbol:e}).join("")},s.prototype.getActualValue=function(e){var t=this,i=e.split("").filter(function(e,i){return t._checkSymbolMask(e,t.maskExpression[i])||t.maskSpecialCharacters.includes(t.maskExpression[i])&&e===t.maskExpression[i]});return i.join("")===e?i.join(""):e},s.prototype.shiftTypedSymbols=function(e){var t=this,i="";return(e&&e.split("").map(function(s,r){if(t.maskSpecialCharacters.includes(e[r+1])&&e[r+1]!==t.maskExpression[r+1])return i=s,e[r+1];if(i.length){var n=i;return i="",n}return s})||[]).join("")},s.prototype.showMaskInInput=function(){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}return this.showMaskTyped?this.maskExpression.replace(/\w/g,"_"):""},s.prototype.clearIfNotMatchFn=function(){!0===this.clearIfNotMatch&&this.maskExpression.length!==this._formElement.value.length&&(this.formElementProperty=["value",""],this.applyMask(this._formElement.value,this.maskExpression))},Object.defineProperty(s.prototype,"formElementProperty",{set:function(e){var t=p(e,2),i=t[0],s=t[1];this._renderer.setProperty(this._formElement,i,s)},enumerable:!0,configurable:!0}),s.prototype.checkSpecialCharAmount=function(e){var t=this;return e.split("").filter(function(e){return t._findSpecialChar(e)}).length},s.prototype.formControlResult=function(e){Array.isArray(this.dropSpecialCharacters)?this.onChange(this._removeMask(this._removeSufix(this._removePrefix(e)),this.dropSpecialCharacters)):!0===this.dropSpecialCharacters?this.onChange(this._checkSymbols(e)):this.onChange(this._removeSufix(this._removePrefix(e)))},s.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},s.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},s.prototype._removeSufix=function(e){return this.sufix&&e?e.replace(this.sufix,""):e},s.prototype._regExpForRemove=function(e){return new RegExp(e.map(function(e){return"\\"+e}).join("|"),"gi")},s.prototype._checkSymbols=function(e){return"dot_separator.2"===this.maskExpression&&this.isNumberValue?Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).replace(",",".")).toFixed(2):"comma_separator.2"===this.maskExpression&&this.isNumberValue?Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)).toFixed(2):this.isNumberValue?""===e?e:Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)):-1!==this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).indexOf(",")?this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).replace(",","."):this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)},s=a([t.Injectable(),o(0,t.Inject(i.DOCUMENT)),o(1,t.Inject(c)),h("design:paramtypes",[Object,Object,t.ElementRef,t.Renderer2])],s)}(k),_=function(){function e(e,t){this.document=e,this._maskService=t,this.maskExpression="",this.specialCharacters=[],this.patterns={},this.prefix="",this.sufix="",this.dropSpecialCharacters=null,this.hiddenInput=null,this.showMaskTyped=null,this.shownMaskExpression=null,this.showTemplate=null,this.clearIfNotMatch=null,this.validation=null,this._position=null,this.onChange=function(e){},this.onTouch=function(){}}var r;return r=e,e.prototype.ngOnChanges=function(e){var t=e.maskExpression,i=e.specialCharacters,s=e.patterns,r=e.prefix,n=e.sufix,a=e.dropSpecialCharacters,o=e.hiddenInput,h=e.showMaskTyped,l=e.shownMaskExpression,p=e.showTemplate,c=e.clearIfNotMatch,u=e.validation;if(t&&(this._maskValue=e.maskExpression.currentValue||""),i){if(!i.currentValue||!Array.isArray(i.currentValue)||Array.isArray(i.currentValue)&&!i.currentValue.length)return;this._maskService.maskSpecialCharacters=e.specialCharacters.currentValue||""}s&&(this._maskService.maskAvailablePatterns=s.currentValue),r&&(this._maskService.prefix=r.currentValue),n&&(this._maskService.sufix=n.currentValue),a&&(this._maskService.dropSpecialCharacters=a.currentValue),o&&(this._maskService.hiddenInput=o.currentValue),h&&(this._maskService.showMaskTyped=h.currentValue),l&&(this._maskService.shownMaskExpression=l.currentValue),p&&(this._maskService.showTemplate=p.currentValue),c&&(this._maskService.clearIfNotMatch=c.currentValue),u&&(this._maskService.validation=u.currentValue),this._applyMask()},e.prototype.validate=function(e){var t=e.value;if(!this._maskService.validation)return null;if(this._maskService.ipError)return{"Mask error":!0};if(!this._maskService.ipError)return null;if(!0===/dot_separator\.\d{1,}/.test(this._maskValue)||!0===/comma_separator\.\d{1,}/.test(this._maskValue))return null;if(d.includes(this._maskValue))return null;if(this._maskService.clearIfNotMatch)return null;if(t&&t.toString().length>=1){var i=0;for(var s in this._maskService.maskAvailablePatterns)if(this._maskService.maskAvailablePatterns[s].optional&&!0===this._maskService.maskAvailablePatterns[s].optional){if(-1!==this._maskValue.indexOf(s)&&i++,-1!==this._maskValue.indexOf(s)&&t.toString().length>=this._maskValue.indexOf(s))return null;if(i===this._maskValue.length)return null}if(1===this._maskValue.indexOf("*")||1===this._maskValue.indexOf("?")||1===this._maskValue.indexOf("{"))return null;if(this._maskValue.indexOf("*")>1&&t.toString().length<this._maskValue.indexOf("*")||this._maskValue.indexOf("?")>1&&t.toString().length<this._maskValue.indexOf("?"))return{"Mask error":!0};if(-1===this._maskValue.indexOf("*")||-1===this._maskValue.indexOf("?")){var r=this._maskService.dropSpecialCharacters?this._maskValue.length-this._maskService.checkSpecialCharAmount(this._maskValue)-i:this._maskValue.length-i;if(t.toString().length!==r)return{"Mask error":!0}}}return null},e.prototype.onInput=function(e){var t=e.target;if(this._inputValue=t.value,this._maskValue){var i=1===t.selectionStart?t.selectionStart+this._maskService.prefix.length:t.selectionStart,s=0,r=!1;this._maskService.applyValueChanges(i,function(e,t){s=e,r=t}),this.document.activeElement===t&&(this._position=1===this._position&&1===this._inputValue.length?null:this._position,t.selectionStart=t.selectionEnd=null!==this._position?this._position:i+("Backspace"!==this._code||r?s:0),this._position=null)}else this.onChange(t.value)},e.prototype.onBlur=function(){this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){var t=e.target;null!==t&&null!==t.selectionStart&&t.selectionStart===t.selectionEnd&&t.selectionStart>this._maskService.prefix.length&&38!==e.keyCode&&this._maskService.showMaskTyped&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),t.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===t.value&&(t.focus(),t.setSelectionRange(0,0))),t.value=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown,(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length&&(t.selectionStart=this._maskService.prefix.length)},e.prototype.a=function(e){this._code=e.code;var t=e.target;if(this._maskService.selStart=t.selectionStart,this._maskService.selEnd=t.selectionEnd,38===e.keyCode&&e.preventDefault(),37===e.keyCode||8===e.keyCode){37===e.keyCode&&(t.selectionStart=t.selectionEnd-1),8===e.keyCode&&0===t.value.length&&(t.selectionStart=t.selectionEnd),t.selectionStart<=this._maskService.prefix.length&&t.selectionEnd<=this._maskService.prefix.length&&e.preventDefault();var i=t.selectionStart;8===e.keyCode&&0===i&&t.selectionEnd===t.value.length&&0!==t.value.length&&(this._position=this._maskService.prefix?this._maskService.prefix.length:0,this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position))}},e.prototype.onPaste=function(){this._position=Number.MAX_SAFE_INTEGER},e.prototype.writeValue=function(e){return t=this,i=void 0,r=function(){return l(this,function(t){return e===undefined&&(e=""),"number"==typeof e&&(e=String(e),e=this._maskValue.startsWith("dot_separator")?e.replace(".",","):e,this._maskService.isNumberValue=!0),e&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?this._maskService.formElementProperty=["value",this._maskService.applyMask(e,this._maskService.maskExpression)]:this._maskService.formElementProperty=["value",e],this._inputValue=e,[2]})},new((s=void 0)||(s=Promise))(function(e,n){function a(e){try{h(r.next(e))}catch(t){n(t)}}function o(e){try{h(r["throw"](e))}catch(t){n(t)}}function h(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(a,o)}h((r=r.apply(t,i||[])).next())});var t,i,s,r},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype._repeatPatternSymbols=function(e){var t=this;return e.match(/{[0-9]+}/)&&e.split("").reduce(function(i,s,r){if(t._start="{"===s?r:t._start,"}"!==s)return t._maskService._findSpecialChar(s)?i+s:i;t._end=r;var n=Number(e.slice(t._start+1,t._end));return i+new Array(n+1).join(e[t._start-1])},"")||e},e.prototype._applyMask=function(){this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)]},a([t.Input("mask"),h("design:type",String)],e.prototype,"maskExpression",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"specialCharacters",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"patterns",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"prefix",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"sufix",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"dropSpecialCharacters",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"hiddenInput",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"showMaskTyped",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"shownMaskExpression",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"showTemplate",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"clearIfNotMatch",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"validation",void 0),a([t.HostListener("input",["$event"]),h("design:type",Function),h("design:paramtypes",[KeyboardEvent]),h("design:returntype",void 0)],e.prototype,"onInput",null),a([t.HostListener("blur"),h("design:type",Function),h("design:paramtypes",[]),h("design:returntype",void 0)],e.prototype,"onBlur",null),a([t.HostListener("click",["$event"]),h("design:type",Function),h("design:paramtypes",[Object]),h("design:returntype",void 0)],e.prototype,"onFocus",null),a([t.HostListener("keydown",["$event"]),h("design:type",Function),h("design:paramtypes",[KeyboardEvent]),h("design:returntype",void 0)],e.prototype,"a",null),a([t.HostListener("paste"),h("design:type",Function),h("design:paramtypes",[]),h("design:returntype",void 0)],e.prototype,"onPaste",null),e=r=a([t.Directive({selector:"[mask]",providers:[{provide:s.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return r}),multi:!0},{provide:s.NG_VALIDATORS,useExisting:t.forwardRef(function(){return r}),multi:!0},v]}),o(0,t.Inject(i.DOCUMENT)),h("design:paramtypes",[Object,v])],e)}(),g=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t){return e||"number"==typeof e?"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t):""},e=a([t.Pipe({name:"mask",pure:!0}),h("design:paramtypes",[k])],e)}(),y=function(){function e(){}var i;return i=e,e.forRoot=function(e){return{ngModule:i,providers:[{provide:u,useValue:e},{provide:f,useValue:m},{provide:c,useFactory:S,deps:[f,u]}]}},e.forChild=function(e){return{ngModule:i}},e=i=a([t.NgModule({providers:[k],exports:[_,g],declarations:[_,g]})],e)}();function S(e,t){return"function"==typeof t?t():n({},e,t)}e.INITIAL_CONFIG=f,e.MaskDirective=_,e.MaskPipe=g,e.MaskService=v,e.NEW_CONFIG=u,e.NgxMaskModule=y,e._configFactory=S,e.config=c,e.initialConfig=m,e.withoutValidation=d,e.ɵa=k,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/core","@angular/common","@angular/forms"],t):t((e=e||self)["ngx-mask"]={},e.ng.core,e.ng.common,e.ng.forms)}(this,function(e,t,i,s){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};var n=function(){return(n=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function a(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}function o(e,t){return function(i,s){t(i,s,e)}}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t){var i,s,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:o(0),"throw":o(1),"return":o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(r=2&n[0]?s["return"]:n[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,n[1])).done)return r;switch(s=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,s=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(o){n=[6,o],s=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}function p(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var s,r,n=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(o){r={error:o}}finally{try{s&&!s.done&&(i=n["return"])&&i.call(n)}finally{if(r)throw r.error}}return a}var c=new t.InjectionToken("config"),u=new t.InjectionToken("NEW_CONFIG"),f=new t.InjectionToken("INITIAL_CONFIG"),m={sufix:"",prefix:"",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,dropSpecialCharacters:!0,hiddenInput:!1,shownMaskExpression:"",validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},d=["percent","Hh:m0:s0","Hh:m0","Hh","m0:s0","s0","m0","separator","dot_separator","comma_separator","d0/M0/0000","d0/M0","d0","M0"],k=function(){function e(e){this._config=e,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this.prevResult="",this.prevActualResult="",this.separator=function(e,t,i,s){for(var r=(e+="").split(i),n=r.length>1?""+i+r[1]:"",a=r[0],o=/(\d+)(\d{3})/;o.test(a);)a=a.replace(o,"$1"+t+"$2");return s===undefined?a+n:0===s?a:a+n.substr(0,s+1)},this.percentage=function(e){return Number(e)>=0&&Number(e)<=100},this.getPrecision=function(e){var t=e.split(".");return t.length>1?Number(t[t.length-1]):Infinity},this.checkInputPrecision=function(e,t,i){if(t<Infinity){var s=void 0;s="."===i?new RegExp("\\.\\d{"+t+"}.*$"):new RegExp(",\\d{"+t+"}.*$");var r=e.match(s);r&&r[0].length-1>t?e=e.substring(0,e.length-1):0===t&&e.endsWith(i)&&(e=e.substring(0,e.length-1))}return e},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.sufix=this._config.sufix,this.hiddenInput=this._config.hiddenInput}return e.prototype.applyMaskWithPattern=function(e,t){var i=p(t,2),s=i[0],r=i[1];return this.customPattern=r,this.applyMask(e,s)},e.prototype.applyMask=function(e,t,i,s){if(void 0===i&&(i=0),void 0===s&&(s=function(){}),e===undefined||null===e||t===undefined)return"";var r=0,n="",a=!1,o=!1,h=1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length));var l=e.toString().split("");if("IP"===t&&(l.filter(function(e){return"."===e}).length<3&&l.length<7?this.ipError=!0:this.ipError=!1,t="099.099.099.099"),t.startsWith("percent")){var p=t.split(".")[1];(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/))&&(e=this._checkInput(e)).length>=3&&"100"!==e&&(e=e.substring(0,p?+p:2)),n=this.percentage(e)?e:e.substring(0,e.length-1)}else if("separator"===t||"dot_separator"===t||t.startsWith("dot_separator")||"comma_separator"===t||t.startsWith("comma_separator")){(e.match("[a-z]|[A-Z]")||e.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/))&&(e=this._checkInput(e));var c=this.getPrecision(t),u=void 0;t.startsWith("dot_separator")&&(-1!==e.indexOf(".")&&e.indexOf(".")===e.lastIndexOf(".")&&e.indexOf(".")>3&&(e=e.replace(".",",")),e=e.length>1&&"0"===e[0]&&","!==e[1]?e.slice(1,e.length):e),t.startsWith("comma_separator")&&(e=e.length>1&&"0"===e[0]&&"."!==e[1]?e.slice(1,e.length):e),"separator"===t?(e.includes(",")&&e.endsWith(",")&&e.indexOf(",")!==e.lastIndexOf(",")&&(e=e.substring(0,e.length-1)),(e.match("[a-z]|[A-Z]")||e.match(/[@#!$%^&*()_+|~=`{}\[\]:.";<>?\/]/))&&(e=e.substring(0,e.length-1)),u=e.replace(/\s/g,""),n=this.separator(u," ",".",c)):"dot_separator"===t||t.startsWith("dot_separator")?((e.match("[a-z]|[A-Z]")||e.match(/[@#!$%^&*()_+|~=`{}\[\]:\s";<>?\/]/))&&(e=e.substring(0,e.length-1)),u=(e=this.checkInputPrecision(e,c,",")).replace(/\./g,""),n=this.separator(u,".",",",c)):("comma_separator"===t||t.startsWith("comma_separator"))&&(u=e.replace(/\,/g,""),n=this.separator(u,",",".",c));var f=n.indexOf(",")-e.indexOf(",");if((_=n.length-e.length)>0&&","!==n[i]){o=!0;var m=0;do{this._shift.add(i+m),m++}while(m<_)}else 0!==f&&-1!==n.indexOf(",")&&n.indexOf(",")<i&&_<=0?(this._shift.clear(),o=!0,h=_,i+=_,this._shift.add(i)):this._shift.clear()}else for(var d=0,k=l[0];d<l.length&&r!==t.length;k=l[++d])if(this._checkSymbolMask(k,t[r])&&"?"===t[r+1])n+=k,r+=2;else if("*"===t[r+1]&&a&&this._checkSymbolMask(k,t[r+2]))n+=k,r+=3,a=!1;else if(this._checkSymbolMask(k,t[r])&&"*"===t[r+1])n+=k,a=!0;else if("?"===t[r+1]&&this._checkSymbolMask(k,t[r+2]))n+=k,r+=3;else if(this._checkSymbolMask(k,t[r])||this.hiddenInput&&this.maskAvailablePatterns[t[r]]&&this.maskAvailablePatterns[t[r]].symbol===k){if("H"===t[r]&&Number(k)>2){n+=0,r+=1;var _=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--;continue}if("h"===t[r]&&"2"===n&&Number(k)>3)continue;if("m"===t[r]&&Number(k)>5){n+=0,r+=1;_=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--;continue}if("s"===t[r]&&Number(k)>5){n+=0,r+=1;_=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--;continue}if("d"===t[r]&&Number(k)>3){n+=0,r+=1;_=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--;continue}if("d"===t[r-1]&&Number(e.slice(r-1,r+1))>31)continue;if("M"===t[r]&&Number(k)>1){n+=0,r+=1;_=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--;continue}if("M"===t[r-1]&&Number(e.slice(r-1,r+1))>12)continue;n+=k,r++}else if(-1!==this.maskSpecialCharacters.indexOf(t[r])){n+=t[r],r++;_=/\*|\?/g.test(t.slice(0,r))?l.length:r;this._shift.add(_+this.prefix.length||0),d--}else this.maskSpecialCharacters.indexOf(k)>-1&&this.maskAvailablePatterns[t[r]]&&this.maskAvailablePatterns[t[r]].optional?(r++,d--):"*"===this.maskExpression[r+1]&&this._findSpecialChar(this.maskExpression[r+2])&&this._findSpecialChar(k)===this.maskExpression[r+2]&&a?(r+=3,n+=k):"?"===this.maskExpression[r+1]&&this._findSpecialChar(this.maskExpression[r+2])&&this._findSpecialChar(k)===this.maskExpression[r+2]&&a&&(r+=3,n+=k);n.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(n+=t[t.length-1]);for(var v=i+1;this._shift.has(v);)h++,v++;s(this._shift.has(i)?h:0,o),h<0&&this._shift.clear();var g=""+this.prefix+n;return g=this.sufix?""+this.prefix+n+this.sufix:""+this.prefix+n,0===n.length&&(g=""+this.prefix+n),g},e.prototype._findSpecialChar=function(e){return this.maskSpecialCharacters.find(function(t){return t===e})},e.prototype._checkSymbolMask=function(e,t){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[t]&&this.maskAvailablePatterns[t].pattern&&this.maskAvailablePatterns[t].pattern.test(e)},e.prototype._checkInput=function(e){return e.split("").filter(function(e){return e.match("\\d")||"."===e||","===e}).join("")},e=a([t.Injectable(),o(0,t.Inject(c)),h("design:paramtypes",[Object])],e)}(),_=function(e){function s(t,i,s,r){var n=e.call(this,i)||this;return n.document=t,n._config=i,n._elementRef=s,n._renderer=r,n.validation=!0,n.maskExpression="",n.isNumberValue=!1,n.showMaskTyped=!1,n.maskIsShown="",n.selStart=null,n.selEnd=null,n.onChange=function(e){},n.onTouch=function(){},n._formElement=n._elementRef.nativeElement,n}return function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(s,e),s.prototype.applyMask=function(t,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=function(){}),!i)return t;if(this.maskIsShown=this.showMaskTyped?this.showMaskInInput():"","IP"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||"#")),!t&&this.showMaskTyped)return this.formControlResult(this.prefix),this.prefix+this.maskIsShown;var n=t&&"number"==typeof this.selStart?t[this.selStart]:"",a="";if(this.hiddenInput&&a===undefined){var o=this.actualValue.split("");""!==t&&o.length?"number"==typeof this.selStart&&"number"==typeof this.selEnd&&(t.length>o.length?o.splice(this.selStart,0,n):t.length<o.length&&(o.length-t.length==1?o.splice(this.selStart-1,1):o.splice(this.selStart,this.selEnd-this.selStart))):o=[],a=this.actualValue.length?this.shiftTypedSymbols(o.join("")):t}a=a.length?a:t;var h=e.prototype.applyMask.call(this,a,i,s,r);this.actualValue=this.getActualValue(h),!0===/dot_separator\.\d{1,}/.test(this.maskExpression)&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return","!==e})),"dot_separator"===this.maskExpression&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return","!==e})),!0===/comma_separator\.\d{1,}/.test(this.maskExpression)&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return"."!==e})),"comma_separator"===this.maskExpression&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return"."!==e})),this.formControlResult(h);if(!this.showMaskTyped)return this.hiddenInput&&h&&h.length?this.hideInput(h,this.maskExpression):h;var l=h.length,p=this.prefix+this.maskIsShown;return h+("IP"===this.maskExpression?p:p.slice(l))},s.prototype.applyValueChanges=function(e,t){void 0===e&&(e=0),void 0===t&&(t=function(){});var i=this.applyMask(this._formElement.value,this.maskExpression,e,t);this._formElement.value=i,this._formElement!==this.document.activeElement&&this.clearIfNotMatchFn()},s.prototype.hideInput=function(e,t){var i=this;return e.split("").map(function(e,s){return i.maskAvailablePatterns&&i.maskAvailablePatterns[t[s]]&&i.maskAvailablePatterns[t[s]].symbol?i.maskAvailablePatterns[t[s]].symbol:e}).join("")},s.prototype.getActualValue=function(e){var t=this,i=e.split("").filter(function(e,i){return t._checkSymbolMask(e,t.maskExpression[i])||t.maskSpecialCharacters.includes(t.maskExpression[i])&&e===t.maskExpression[i]});return i.join("")===e?i.join(""):e},s.prototype.shiftTypedSymbols=function(e){var t=this,i="";return(e&&e.split("").map(function(s,r){if(t.maskSpecialCharacters.includes(e[r+1])&&e[r+1]!==t.maskExpression[r+1])return i=s,e[r+1];if(i.length){var n=i;return i="",n}return s})||[]).join("")},s.prototype.showMaskInInput=function(e){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}return this.showMaskTyped?e?this._checkForIp(e):this.maskExpression.replace(/\w/g,"_"):""},s.prototype.clearIfNotMatchFn=function(){!0===this.clearIfNotMatch&&this.maskExpression.length!==this._formElement.value.length&&(this.formElementProperty=["value",""],this.applyMask(this._formElement.value,this.maskExpression))},Object.defineProperty(s.prototype,"formElementProperty",{set:function(e){var t=p(e,2),i=t[0],s=t[1];this._renderer.setProperty(this._formElement,i,s)},enumerable:!0,configurable:!0}),s.prototype.checkSpecialCharAmount=function(e){var t=this;return e.split("").filter(function(e){return t._findSpecialChar(e)}).length},s.prototype._checkForIp=function(e){if("#"===e)return"_._._._";for(var t=[],i=0;i<e.length;i++)e[i].match("\\d")&&t.push(e[i]);return t.length<=3?"_._._":t.length>3&&t.length<=6?"_._":t.length>6&&t.length<=9?"_":(t.length>9&&t.length,"")},s.prototype.formControlResult=function(e){Array.isArray(this.dropSpecialCharacters)?this.onChange(this._removeMask(this._removeSufix(this._removePrefix(e)),this.dropSpecialCharacters)):!0===this.dropSpecialCharacters?this.onChange(this._checkSymbols(e)):this.onChange(this._removeSufix(this._removePrefix(e)))},s.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},s.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},s.prototype._removeSufix=function(e){return this.sufix&&e?e.replace(this.sufix,""):e},s.prototype._regExpForRemove=function(e){return new RegExp(e.map(function(e){return"\\"+e}).join("|"),"gi")},s.prototype._checkSymbols=function(e){return"dot_separator.2"===this.maskExpression&&this.isNumberValue?""===e?e:","===e?null:Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).replace(",",".")).toFixed(2):"comma_separator.2"===this.maskExpression&&this.isNumberValue?""===e?e:"."===e?null:Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)).toFixed(2):this.isNumberValue?""===e?e:Number(this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)):-1!==this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).indexOf(",")?this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters).replace(",","."):this._removeMask(this._removeSufix(this._removePrefix(e)),this.maskSpecialCharacters)},s=a([t.Injectable(),o(0,t.Inject(i.DOCUMENT)),o(1,t.Inject(c)),h("design:paramtypes",[Object,Object,t.ElementRef,t.Renderer2])],s)}(k),v=function(){function e(e,t){this.document=e,this._maskService=t,this.maskExpression="",this.specialCharacters=[],this.patterns={},this.prefix="",this.sufix="",this.dropSpecialCharacters=null,this.hiddenInput=null,this.showMaskTyped=null,this.shownMaskExpression=null,this.showTemplate=null,this.clearIfNotMatch=null,this.validation=null,this._position=null,this.onChange=function(e){},this.onTouch=function(){}}var r;return r=e,e.prototype.ngOnChanges=function(e){var t=e.maskExpression,i=e.specialCharacters,s=e.patterns,r=e.prefix,n=e.sufix,a=e.dropSpecialCharacters,o=e.hiddenInput,h=e.showMaskTyped,l=e.shownMaskExpression,p=e.showTemplate,c=e.clearIfNotMatch,u=e.validation;if(t&&(this._maskValue=e.maskExpression.currentValue||""),i){if(!i.currentValue||!Array.isArray(i.currentValue)||Array.isArray(i.currentValue)&&!i.currentValue.length)return;this._maskService.maskSpecialCharacters=e.specialCharacters.currentValue||""}s&&(this._maskService.maskAvailablePatterns=s.currentValue),r&&(this._maskService.prefix=r.currentValue),n&&(this._maskService.sufix=n.currentValue),a&&(this._maskService.dropSpecialCharacters=a.currentValue),o&&(this._maskService.hiddenInput=o.currentValue),h&&(this._maskService.showMaskTyped=h.currentValue),l&&(this._maskService.shownMaskExpression=l.currentValue),p&&(this._maskService.showTemplate=p.currentValue),c&&(this._maskService.clearIfNotMatch=c.currentValue),u&&(this._maskService.validation=u.currentValue),this._applyMask()},e.prototype.validate=function(e){var t=e.value;if(!this._maskService.validation)return null;if(this._maskService.ipError)return{"Mask error":!0};if(!this._maskService.ipError)return null;if(!0===/dot_separator\.\d{1,}/.test(this._maskValue)||!0===/comma_separator\.\d{1,}/.test(this._maskValue))return null;if(d.includes(this._maskValue))return null;if(this._maskService.clearIfNotMatch)return null;if(t&&t.toString().length>=1){var i=0;for(var s in this._maskService.maskAvailablePatterns)if(this._maskService.maskAvailablePatterns[s].optional&&!0===this._maskService.maskAvailablePatterns[s].optional){if(-1!==this._maskValue.indexOf(s)&&i++,-1!==this._maskValue.indexOf(s)&&t.toString().length>=this._maskValue.indexOf(s))return null;if(i===this._maskValue.length)return null}if(1===this._maskValue.indexOf("*")||1===this._maskValue.indexOf("?")||1===this._maskValue.indexOf("{"))return null;if(this._maskValue.indexOf("*")>1&&t.toString().length<this._maskValue.indexOf("*")||this._maskValue.indexOf("?")>1&&t.toString().length<this._maskValue.indexOf("?"))return{"Mask error":!0};if(-1===this._maskValue.indexOf("*")||-1===this._maskValue.indexOf("?")){var r=this._maskService.dropSpecialCharacters?this._maskValue.length-this._maskService.checkSpecialCharAmount(this._maskValue)-i:this._maskValue.length-i;if(t.toString().length!==r)return{"Mask error":!0}}}return null},e.prototype.onInput=function(e){var t=e.target;if(this._inputValue=t.value,this._maskValue){var i=1===t.selectionStart?t.selectionStart+this._maskService.prefix.length:t.selectionStart,s=0,r=!1;this._maskService.applyValueChanges(i,function(e,t){s=e,r=t}),this.document.activeElement===t&&(this._position=1===this._position&&1===this._inputValue.length?null:this._position,t.selectionStart=t.selectionEnd=null!==this._position?this._position:i+("Backspace"!==this._code||r?s:0),this._position=null)}else this.onChange(t.value)},e.prototype.onBlur=function(){this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){var t=e.target;null!==t&&null!==t.selectionStart&&t.selectionStart===t.selectionEnd&&t.selectionStart>this._maskService.prefix.length&&38!==e.keyCode&&this._maskService.showMaskTyped&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),t.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===t.value&&(t.focus(),t.setSelectionRange(0,0))),t.value=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown,(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length&&(t.selectionStart=this._maskService.prefix.length)},e.prototype.a=function(e){this._code=e.code;var t=e.target;if(this._maskService.selStart=t.selectionStart,this._maskService.selEnd=t.selectionEnd,38===e.keyCode&&e.preventDefault(),37===e.keyCode||8===e.keyCode){37===e.keyCode&&(t.selectionStart=t.selectionEnd-1),8===e.keyCode&&0===t.value.length&&(t.selectionStart=t.selectionEnd),t.selectionStart<=this._maskService.prefix.length&&t.selectionEnd<=this._maskService.prefix.length&&e.preventDefault();var i=t.selectionStart;8===e.keyCode&&0===i&&t.selectionEnd===t.value.length&&0!==t.value.length&&(this._position=this._maskService.prefix?this._maskService.prefix.length:0,this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position))}},e.prototype.onPaste=function(){this._position=Number.MAX_SAFE_INTEGER},e.prototype.writeValue=function(e){return t=this,i=void 0,r=function(){return l(this,function(t){return e===undefined&&(e=""),"number"==typeof e&&(e=String(e),e=this._maskValue.startsWith("dot_separator")?e.replace(".",","):e,this._maskService.isNumberValue=!0),e&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?this._maskService.formElementProperty=["value",this._maskService.applyMask(e,this._maskService.maskExpression)]:this._maskService.formElementProperty=["value",e],this._inputValue=e,[2]})},new((s=void 0)||(s=Promise))(function(e,n){function a(e){try{h(r.next(e))}catch(t){n(t)}}function o(e){try{h(r["throw"](e))}catch(t){n(t)}}function h(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(a,o)}h((r=r.apply(t,i||[])).next())});var t,i,s,r},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype._repeatPatternSymbols=function(e){var t=this;return e.match(/{[0-9]+}/)&&e.split("").reduce(function(i,s,r){if(t._start="{"===s?r:t._start,"}"!==s)return t._maskService._findSpecialChar(s)?i+s:i;t._end=r;var n=Number(e.slice(t._start+1,t._end));return i+new Array(n+1).join(e[t._start-1])},"")||e},e.prototype._applyMask=function(){this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)]},a([t.Input("mask"),h("design:type",String)],e.prototype,"maskExpression",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"specialCharacters",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"patterns",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"prefix",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"sufix",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"dropSpecialCharacters",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"hiddenInput",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"showMaskTyped",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"shownMaskExpression",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"showTemplate",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"clearIfNotMatch",void 0),a([t.Input(),h("design:type",Object)],e.prototype,"validation",void 0),a([t.HostListener("input",["$event"]),h("design:type",Function),h("design:paramtypes",[KeyboardEvent]),h("design:returntype",void 0)],e.prototype,"onInput",null),a([t.HostListener("blur"),h("design:type",Function),h("design:paramtypes",[]),h("design:returntype",void 0)],e.prototype,"onBlur",null),a([t.HostListener("click",["$event"]),h("design:type",Function),h("design:paramtypes",[Object]),h("design:returntype",void 0)],e.prototype,"onFocus",null),a([t.HostListener("keydown",["$event"]),h("design:type",Function),h("design:paramtypes",[KeyboardEvent]),h("design:returntype",void 0)],e.prototype,"a",null),a([t.HostListener("paste"),h("design:type",Function),h("design:paramtypes",[]),h("design:returntype",void 0)],e.prototype,"onPaste",null),e=r=a([t.Directive({selector:"[mask]",providers:[{provide:s.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return r}),multi:!0},{provide:s.NG_VALIDATORS,useExisting:t.forwardRef(function(){return r}),multi:!0},_]}),o(0,t.Inject(i.DOCUMENT)),h("design:paramtypes",[Object,_])],e)}(),g=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t){return e||"number"==typeof e?"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t):""},e=a([t.Pipe({name:"mask",pure:!0}),h("design:paramtypes",[k])],e)}(),y=function(){function e(){}var i;return i=e,e.forRoot=function(e){return{ngModule:i,providers:[{provide:u,useValue:e},{provide:f,useValue:m},{provide:c,useFactory:S,deps:[f,u]}]}},e.forChild=function(e){return{ngModule:i}},e=i=a([t.NgModule({providers:[k],exports:[v,g],declarations:[v,g]})],e)}();function S(e,t){return"function"==typeof t?t():n({},e,t)}e.INITIAL_CONFIG=f,e.MaskDirective=v,e.MaskPipe=g,e.MaskService=_,e.NEW_CONFIG=u,e.NgxMaskModule=y,e._configFactory=S,e.config=c,e.initialConfig=m,e.withoutValidation=d,e.ɵa=k,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-mask.umd.min.js.map |
@@ -95,7 +95,8 @@ import * as tslib_1 from "tslib"; | ||
} | ||
if (maskExpression === 'percent') { | ||
if (maskExpression.startsWith('percent')) { | ||
const decCount = maskExpression.split('.')[1]; | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
if (inputValue.length >= 3 && inputValue !== '100') { | ||
inputValue = inputValue.substring(0, 5); | ||
inputValue = inputValue.substring(0, decCount ? +decCount : 2); | ||
} | ||
@@ -115,3 +116,3 @@ } | ||
maskExpression.startsWith('comma_separator')) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/)) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
@@ -370,2 +371,2 @@ } | ||
export { MaskApplierService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay1hcHBsaWVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtbWFzay8iLCJzb3VyY2VzIjpbImFwcC9uZ3gtbWFzay9tYXNrLWFwcGxpZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLE1BQU0sRUFBVyxNQUFNLFVBQVUsQ0FBQztBQUczQyxJQUFhLGtCQUFrQixHQUEvQixNQUFhLGtCQUFrQjtJQW1CM0IsWUFBNkMsT0FBZ0I7UUFBaEIsWUFBTyxHQUFQLE9BQU8sQ0FBUztRQWR0RCxtQkFBYyxHQUFXLEVBQUUsQ0FBQztRQUM1QixnQkFBVyxHQUFXLEVBQUUsQ0FBQztRQUN6Qix3QkFBbUIsR0FBVyxFQUFFLENBQUM7UUFPOUIsZUFBVS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XG4gICAgICAgICAgICBpZiAoaW5wdXRBcnJheS5maWx0ZXIoKGk6IHN0cmluZykgPT4gaSA9PT0gJy4nKS5sZW5ndGggPCAzICYmIGlucHV0QXJyYXkubGVuZ3RoIDwgNykge1xuICAgICAgICAgICAgICAgIHRoaXMuaXBFcnJvciA9IHRydWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuaXBFcnJvciA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24gPSAnMDk5LjA5OS4wOTkuMDk5JztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWFza0V4cHJlc3Npb24gPT09ICdwZXJjZW50Jykge1xuICAgICAgICAgICAgaWYgKGlucHV0VmFsdWUubWF0Y2goJ1thLXpdfFtBLVpdJykgfHwgaW5wdXRWYWx1ZS5tYXRjaCgvWy0hJCVeJiooKV8rfH49YHt9XFxbXFxdOlwiOyc8Pj8sXFwvXS8pKSB7XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IHRoaXMuX2NoZWNrSW5wdXQoaW5wdXRWYWx1ZSk7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0VmFsdWUubGVuZ3RoID49IDMgJiYgaW5wdXRWYWx1ZSAhPT0gJzEwMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IGlucHV0VmFsdWUuc3Vic3RyaW5nKDAsIDUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnBlcmNlbnRhZ2UoaW5wdXRWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBpbnB1dFZhbHVlLmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24gPT09ICdzZXBhcmF0b3InIHx8XG4gICAgICAgICAgICBtYXNrRXhwcmVzc2lvbiA9PT0gJ2RvdF9zZXBhcmF0b3InIHx8XG4gICAgICAgICAgICBtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdkb3Rfc2VwYXJhdG9yJykgfHxcbiAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uID09PSAnY29tbWFfc2VwYXJhdG9yJyB8fFxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJylcbiAgICAgICAgKSB7XG4gICAgICAgICAgICBpZiAoaW5wdXRWYWx1ZS5tYXRjaCgnW2Etel18W0EtWl0nKSB8fCBpbnB1dFZhbHVlLm1hdGNoKC9bLUAjISQlXiYqKClfK3x+PWB7fVxcW1xcXTpcIjs8Pi4/XFwvXS8pKSB7XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IHRoaXMuX2NoZWNrSW5wdXQoaW5wdXRWYWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBwcmVjaXNpb246IG51bWJlciA9IHRoaXMuZ2V0UHJlY2lzaW9uKG1hc2tFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIGxldCBzdHJGb3JTZXA6IHN0cmluZztcbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdkb3Rfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpICE9PSAtMSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmluZGV4T2YoJy4nKSA9PT0gaW5wdXRWYWx1ZS5sYXN0SW5kZXhPZignLicpICYmXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpID4gM1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID0gaW5wdXRWYWx1ZS5yZXBsYWNlKCcuJywgJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUubGVuZ3RoID4gMSAmJiBpbnB1dFZhbHVlWzBdID09PSAnMCcgJiYgaW5wdXRWYWx1ZVsxXSAhPT0gJywnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0VmFsdWUuc2xpY2UoMSwgaW5wdXRWYWx1ZS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlucHV0VmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID1cbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5sZW5ndGggPiAxICYmIGlucHV0VmFsdWVbMF0gPT09ICcwJyAmJiBpbnB1dFZhbHVlWzFdICE9PSAnLidcbiAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRWYWx1ZS5zbGljZSgxLCBpbnB1dFZhbHVlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgICAgIDogaW5wdXRWYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbiA9PT0gJ3NlcGFyYXRvcicpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5jbHVkZXMoJywnKSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmVuZHNXaXRoKCcsJykgJiZcbiAgICAgIC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8ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQocG9zaXRpb24gKyBfc2hpZnQpO1xuICAgICAgICAgICAgICAgICAgICBfc2hpZnQrKztcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChfc2hpZnQgPCBzaGlmdFN0ZXApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICBjb21tYVNoaWZ0ICE9PSAwICYmXG4gICAgICAgICAgICAgICAgcmVzdWx0LmluZGV4T2YoJywnKSAhPT0gLTEgJiZcbiAgICAgICAgICAgICAgICByZXN1bHQuaW5kZXhPZignLCcpIDwgcG9zaXRpb24gJiZcbiAgICAgICAgICAgICAgICBzaGlmdFN0ZXAgPD0gMFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICBiYWNrc3BhY2VTaGlmdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgc2hpZnQgPSBzaGlmdFN0ZXA7XG4gICAgICAgICAgICAgICAgcG9zaXRpb24gKz0gc2hpZnRTdGVwO1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChwb3NpdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmNsZWFyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZVxuICAgICAgICAgICAgICAgIGxldCBpOiBudW1iZXIgPSAwLCBpbnB1dFN5bWJvbDogc3RyaW5nID0gaW5wdXRBcnJheVswXTtcbiAgICAgICAgICAgICAgICBpIDwgaW5wdXRBcnJheS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaSsrLCBpbnB1dFN5bWJvbCA9IGlucHV0QXJyYXlbaV1cbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IG1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICYmXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKidcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMuaGlkZGVuSW5wdXQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5zeW1ib2wgPT09IGlucHV0U3ltYm9sKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ0gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnaCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09ICcyJyAmJiBOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdzJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IG1hc2tFeHByZXNzaW9uW2N1cnNvcl07XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKGlucHV0U3ltYm9sKSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dLm9wdGlvbmFsXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJyonICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIHJlc3VsdC5sZW5ndGggKyAxID09PSBtYXNrRXhwcmVzc2lvbi5sZW5ndGggJiZcbiAgICAgICAgICAgIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluZGV4T2YobWFza0V4cHJlc3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PSAvKFxcZCspKFxcZHszfSkvO1xuICAgICAgICB3aGlsZSAocmd4LnRlc3QocmVzKSkge1xuICAgICAgICAgICAgcmVzID0gcmVzLnJlcGxhY2Uocmd4LCAnJDEnICsgY2hhciArICckMicpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChwcmVjaXNpb24gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcyArIGRlY2ltYWxzO1xuICAgICAgICB9IGVsc2UgaWYgKHByZWNpc2lvbiA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzICsgZGVjaW1hbHMuc3Vic3RyKDAsIHByZWNpc2lvbiArIDEpO1xuICAgIH07XG5cbiAgICBwcml2YXRlIHBlcmNlbnRhZ2UgPSAoc3RyOiBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgICAgcmV0dXJuIE51bWJlcihzdHIpID49IDAgJiYgTnVtYmVyKHN0cikgPD0gMTAwO1xuICAgIH07XG5cbiAgICBwcml2YXRlIGdldFByZWNpc2lvbiA9IChtYXNrRXhwcmVzc2lvbjogc3RyaW5nKTogbnVtYmVyID0+IHtcbiAgICAgICAgY29uc3QgeDogc3RyaW5nW10gPSBtYXNrRXhwcmVzc2lvbi5zcGxpdCgnLicpO1xuICAgICAgICBpZiAoeC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKHhbeC5sZW5ndGggLSAxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEluZmluaXR5O1xuICAgIH07XG5cbiAgICBwcml2YXRlIGNoZWNrSW5wdXRQcmVjaXNpb24gPSAoaW5wdXRWYWx1ZTogc3RyaW5nLCBwcmVjaXNpb246IG51bWJlciwgZGVjaW1hbE1hcmtlcjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICAgICAgaWYgKHByZWNpc2lvbiA8IEluZmluaXR5KSB7XG4gICA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ggPCAzICYmIGlucHV0QXJyYXkubGVuZ3RoIDwgNykge1xuICAgICAgICAgICAgICAgIHRoaXMuaXBFcnJvciA9IHRydWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuaXBFcnJvciA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24gPSAnMDk5LjA5OS4wOTkuMDk5JztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgncGVyY2VudCcpKSB7XG4gICAgICAgICAgICBjb25zdCBkZWNDb3VudDogc3RyaW5nIHwgbnVtYmVyID0gbWFza0V4cHJlc3Npb24uc3BsaXQoJy4nKVsxXTtcbiAgICAgICAgICAgIGlmIChpbnB1dFZhbHVlLm1hdGNoKCdbYS16XXxbQS1aXScpIHx8IGlucHV0VmFsdWUubWF0Y2goL1stISQlXiYqKClfK3x+PWB7fVxcW1xcXTpcIjsnPD4/LFxcL10vKSkge1xuICAgICAgICAgICAgICAgIGlucHV0VmFsdWUgPSB0aGlzLl9jaGVja0lucHV0KGlucHV0VmFsdWUpO1xuICAgICAgICAgICAgICAgIGlmIChpbnB1dFZhbHVlLmxlbmd0aCA+PSAzICYmIGlucHV0VmFsdWUgIT09ICcxMDAnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBkZWNDb3VudCA/ICtkZWNDb3VudCA6IDIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnBlcmNlbnRhZ2UoaW5wdXRWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBpb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WYWx1ZS5sYXN0SW5kZXhPZignLicpICYmXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpID4gM1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID0gaW5wdXRWYWx1ZS5yZXBsYWNlKCcuJywgJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUubGVuZ3RoID4gMSAmJiBpbnB1dFZhbHVlWzBdID09PSAnMCcgJiYgaW5wdXRWYWx1ZVsxXSAhPT0gJywnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0VmFsdWUuc2xpY2UoMSwgaW5wdXRWYWx1ZS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlucHV0VmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID1cbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5sZW5ndGggPiAxICYmIGlucHV0VmFsdWVbMF0gPT09ICcwJyAmJiBpbnB1dFZhbHVlWzFdICE9PSAnLidcbiAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRWYWx1ZS5zbGljZSgxLCBpbnB1dFZhbHVlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgICAgIDogaW5wdXRWYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbiA9PT0gJ3NlcGFyYXRvcicpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5jbHVkZXMoJywnKSAmJlxuICAgICAgICAgICAgICAgICAgIC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fc2hpZnQ6IG51bWJlciA9IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQocG9zaXRpb24gKyBfc2hpZnQpO1xuICAgICAgICAgICAgICAgICAgICBfc2hpZnQrKztcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChfc2hpZnQgPCBzaGlmdFN0ZXApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICBjb21tYVNoaWZ0ICE9PSAwICYmXG4gICAgICAgICAgICAgICAgcmVzdWx0LmluZGV4T2YoJywnKSAhPT0gLTEgJiZcbiAgICAgICAgICAgICAgICByZXN1bHQuaW5kZXhPZignLCcpIDwgcG9zaXRpb24gJiZcbiAgICAgICAgICAgICAgICBzaGlmdFN0ZXAgPD0gMFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICBiYWNrc3BhY2VTaGlmdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgc2hpZnQgPSBzaGlmdFN0ZXA7XG4gICAgICAgICAgICAgICAgcG9zaXRpb24gKz0gc2hpZnRTdGVwO1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChwb3NpdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmNsZWFyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZVxuICAgICAgICAgICAgICAgIGxldCBpOiBudW1iZXIgPSAwLCBpbnB1dFN5bWJvbDogc3RyaW5nID0gaW5wdXRBcnJheVswXTtcbiAgICAgICAgICAgICAgICBpIDwgaW5wdXRBcnJheS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaSsrLCBpbnB1dFN5bWJvbCA9IGlucHV0QXJyYXlbaV1cbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IG1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICYmXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKidcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMuaGlkZGVuSW5wdXQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5zeW1ib2wgPT09IGlucHV0U3ltYm9sKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ0gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnaCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09ICcyJyAmJiBOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdzJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IG1hc2tFeHByZXNzaW9uW2N1cnNvcl07XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKGlucHV0U3ltYm9sKSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dLm9wdGlvbmFsXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJyonICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIHJlc3VsdC5sZW5ndGggKyAxID09PSBtYXNrRXhwcmVzc2lvbi5sZW5ndGggJiZcbiAgICAgICAgICAgIHRoaXMubWFza1Nw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5nID0geFswXTtcbiAgICAgICAgY29uc3Qgcmd4OiBSZWdFeHAgPSAvKFxcZCspKFxcZHszfSkvO1xuICAgICAgICB3aGlsZSAocmd4LnRlc3QocmVzKSkge1xuICAgICAgICAgICAgcmVzID0gcmVzLnJlcGxhY2Uocmd4LCAnJDEnICsgY2hhciArICckMicpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChwcmVjaXNpb24gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcyArIGRlY2ltYWxzO1xuICAgICAgICB9IGVsc2UgaWYgKHByZWNpc2lvbiA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzICsgZGVjaW1hbHMuc3Vic3RyKDAsIHByZWNpc2lvbiArIDEpO1xuICAgIH07XG5cbiAgICBwcml2YXRlIHBlcmNlbnRhZ2UgPSAoc3RyOiBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgICAgcmV0dXJuIE51bWJlcihzdHIpID49IDAgJiYgTnVtYmVyKHN0cikgPD0gMTAwO1xuICAgIH07XG5cbiAgICBwcml2YXRlIGdldFByZWNpc2lvbiA9IChtYXNrRXhwcmVzc2lvbjogc3RyaW5nKTogbnVtYmVyID0+IHtcbiAgICAgICAgY29uc3QgeDogc3RyaW5nW10gPSBtYXNrRXhwcmVzc2lvbi5zcGxpdCgnLicpO1xuICAgICAgICBpZiAoeC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKHhbeC5sZW5ndGggLSAxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEluZmluaXR5O1xuICAgIH07XG5cbiAgICBwcml2YXRlIGNoZWNrSW5wdXRQcmVjaXNpb24gPSAoaW5wdXRWYWx1ZTogc3RyaW5nLCBwcmVjaXNpb246IG51bWJlciwgZGVjaW1hbE1hcmtlcjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAg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mV0dXJuIHN0clxuICAgICAgICAgICAgLnNwbGl0KCcnKVxuICAgICAgICAgICAgLmZpbHRlcigoaTogc3RyaW5nKSA9PiBpLm1hdGNoKCdcXFxcZCcpIHx8IGkgPT09ICcuJyB8fCBpID09PSAnLCcpXG4gICAgICAgICAgICAuam9pbignJyk7XG4gICAgfVxuICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbWF4LWZpbGUtbGluZS1jb3VudFxufVxuIl19 |
@@ -29,3 +29,9 @@ import * as tslib_1 from "tslib"; | ||
applyMask(inputValue, maskExpression, position = 0, cb = () => { }) { | ||
if (!maskExpression) { | ||
return inputValue; | ||
} | ||
this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : ''; | ||
if (this.maskExpression === 'IP' && this.showMaskTyped) { | ||
this.maskIsShown = this.showMaskInInput(inputValue || '#'); | ||
} | ||
if (!inputValue && this.showMaskTyped) { | ||
@@ -77,3 +83,3 @@ this.formControlResult(this.prefix); | ||
const prefNmask = this.prefix + this.maskIsShown; | ||
ifMaskIsShown = prefNmask.slice(resLen); | ||
ifMaskIsShown = this.maskExpression === 'IP' ? prefNmask : prefNmask.slice(resLen); | ||
return result + ifMaskIsShown; | ||
@@ -132,3 +138,3 @@ } | ||
} | ||
showMaskInInput() { | ||
showMaskInInput(inputVal) { | ||
if (this.showMaskTyped && !!this.shownMaskExpression) { | ||
@@ -143,2 +149,5 @@ if (this.maskExpression.length !== this.shownMaskExpression.length) { | ||
else if (this.showMaskTyped) { | ||
if (inputVal) { | ||
return this._checkForIp(inputVal); | ||
} | ||
return this.maskExpression.replace(/\w/g, '_'); | ||
@@ -161,2 +170,27 @@ } | ||
} | ||
// tslint:disable-next-line: cyclomatic-complexity | ||
_checkForIp(inputVal) { | ||
if (inputVal === '#') { | ||
return '_._._._'; | ||
} | ||
const arr = []; | ||
for (let i = 0; i < inputVal.length; i++) { | ||
if (inputVal[i].match('\\d')) { | ||
arr.push(inputVal[i]); | ||
} | ||
} | ||
if (arr.length <= 3) { | ||
return '_._._'; | ||
} | ||
if (arr.length > 3 && arr.length <= 6) { | ||
return '_._'; | ||
} | ||
if (arr.length > 6 && arr.length <= 9) { | ||
return '_'; | ||
} | ||
if (arr.length > 9 && arr.length <= 12) { | ||
return ''; | ||
} | ||
return ''; | ||
} | ||
formControlResult(inputValue) { | ||
@@ -194,7 +228,15 @@ if (Array.isArray(this.dropSpecialCharacters)) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === ',' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
} | ||
if ('comma_separator.2' === this.maskExpression && this.isNumberValue) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === '.' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
} | ||
@@ -223,2 +265,2 @@ if (this.isNumberValue) { | ||
export { MaskService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc2svIiwic291cmNlcyI6WyJhcHAvbmd4LW1hc2svbWFzay5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFFLE9BQU8sRUFBRSxNQUFNLEVBQVcsTUFBTSxVQUFVLENBQUM7QUFDM0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQ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VlLCB0aGlzLm1hc2tFeHByZXNzaW9uLCBwb3NpdGlvbiwgY2IpO1xuICAgICAgICB0aGlzLl9mb3JtRWxlbWVudC52YWx1ZSA9IG1hc2tlZElucHV0O1xuICAgICAgICBpZiAodGhpcy5fZm9ybUVsZW1lbnQgPT09IHRoaXMuZG9jdW1lbnQuYWN0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY2xlYXJJZk5vdE1hdGNoRm4oKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgaGlkZUlucHV0KGlucHV0VmFsdWU6IHN0cmluZywgbWFza0V4cHJlc3Npb246IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBpbnB1dFZhbHVlXG4gICAgICAgICAgICAuc3BsaXQoJycpXG4gICAgICAgICAgICAubWFwKChjdXJyOiBzdHJpbmcsIGluZGV4OiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2luZGV4XV0gJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnNbbWFza0V4cHJlc3Npb25baW5kZXhdXS5zeW1ib2xcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2luZGV4XV0uc3ltYm9sO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gY3VycjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuam9pbignJyk7XG4gICAgfVxuXG4gICAgLy8gdGhpcyBmdW5jdGlvbiBpcyBub3QgbmVjZXNzYXJ5LCBpdCBjaGVja3MgcmVzdWx0IGFnYWluc3QgbWFza0V4cHJlc3Npb25cbiAgICBwdWJsaWMgZ2V0QWN0dWFsVmFsdWUocmVzOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICBjb25zdCBjb21wYXJlOiBzdHJpbmdbXSA9IHJlc1xuICAgICAgICAgICAgLnNwbGl0KCcnKVxuICAgICAgICAgICAgLmZpbHRlcihcbiAgICAgICAgICAgICAgICAoc3ltYm9sOiBzdHJpbmcsIGk6IG51bWJlcikgPT5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKHN5bWJvbCwgdGhpcy5tYXNrRXhwcmVzc2lvbltpXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluY2x1ZGVzKHRoaXMubWFza0V4cHJlc3Npb25baV0pICYmIHN5bWJvbCA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbltpXSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIGlmIChjb21wYXJlLmpvaW4oJycpID09PSByZXMpIHtcbiAgICAgICAgICAgIHJldHVybiBjb21wYXJlLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXM7XG4gICAgfVxuXG4gICAgcHVibGljIHNoaWZ0VHlwZWRTeW1ib2xzKGlucHV0VmFsdWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIGxldCBzeW1ib2xUb1JlcGxhY2U6IHN0cmluZyA9ICcnO1xuICAgICAgICBjb25zdCBuZXdJbnB1dFZhbHVlOiBzdHJpbmdbXSA9XG4gICAgICAgICAgICAoaW5wdXRWYWx1ZSAmJlxuICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuc3BsaXQoJycpLm1hcCgoY3VyclN5bWJvbDogc3RyaW5nLCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluY2x1ZGVzKGlucHV0VmFsdWVbaW5kZXggKyAxXSkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWVbaW5kZXggKyAxXSAhPT0gdGhpcy5tYXNrRXhwcmVzc2lvbltpbmRleCArIDFdXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3ltYm9sVG9SZXBsYWNlID0gY3VyclN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpbnB1dFZhbHVlW2luZGV4ICsgMV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHN5bWJvbFRvUmVwbGFjZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlcGxhY2VTeW1ib2w6IHN0cmluZyA9IHN5bWJvbFRvUmVwbGFjZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5bWJvbFRvUmVwbGFjZSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSkpIHx8XG4gICAgICAgICAgICBbXTtcbiAgICAgICAgcmV0dXJuIG5ld0lucHV0VmFsdWUuam9pbignJyk7XG4gICAgfVxuXG4gICAgcHVibGljIHNob3dNYXNrSW5JbnB1dCgpOiBzdHJpbmcge1xuICAgICAgICBpZiAodGhpcy5zaG93TWFza1R5cGVkICYmICEhdGhpcy5zaG93bk1hc2tFeHByZXNzaW9uKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tYXNrRXhwcmVzc2lvbi5sZW5ndGggIT09IHRoaXMuc2hvd25NYXNrRXhw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leHQtbGluZTptYXgtbGluZS1sZW5ndGhcbiAgICAgICAgICAgIHJldHVybiBOdW1iZXIoXG4gICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKS5yZXBsYWNlKFxuICAgICAgICAgICAgICAgICAgICAnLCcsXG4gICAgICAgICAgICAgICAgICAgICcuJ1xuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICkudG9GaXhlZCgyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoJ2NvbW1hX3NlcGFyYXRvci4yJyA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbiAmJiB0aGlzLmlzTnVtYmVyVmFsdWUpIHtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTptYXgtbGluZS1sZW5ndGhcbiAgICAgICAgICAgIHJldHVybiBOdW1iZXIoXG4gICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKVxuICAgICAgICAgICAgKS50b0ZpeGVkKDIpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmlzTnVtYmVyVmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgPT09ICcnXG4gICAgICAgICAgICAgICAgPyByZXN1bHRcbiAgICAgICAgICAgICAgICA6IE51bWJlcih0aGlzLl9yZW1vdmVNYXNrKHRoaXMuX3JlbW92ZVN1Zml4KHRoaXMuX3JlbW92ZVByZWZpeChyZXN1bHQpKSwgdGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMpKTtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIHRoaXMuX3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RoaXMuZG9jdW1lbnQuYWN0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY2xlYXJJZk5vdE1hdGNoRm4oKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgaGlkZUlucHV0KGlucHV0VmFsdWU6IHN0cmluZywgbWFza0V4cHJlc3Npb246IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBpbnB1dFZhbHVlXG4gICAgICAgICAgICAuc3BsaXQoJycpXG4gICAgICAgICAgICAubWFwKChjdXJyOiBzdHJpbmcsIGluZGV4OiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2luZGV4XV0gJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnNbbWFza0V4cHJlc3Npb25baW5kZXhdXS5zeW1ib2xcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2luZGV4XV0uc3ltYm9sO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gY3VycjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuam9pbignJyk7XG4gICAgfVxuXG4gICAgLy8gdGhpcyBmdW5jdGlvbiBpcyBub3QgbmVjZXNzYXJ5LCBpdCBjaGVja3MgcmVzdWx0IGFnYWluc3QgbWFza0V4cHJlc3Npb25cbiAgICBwdWJsaWMgZ2V0QWN0dWFsVmFsdWUocmVzOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICBjb25zdCBjb21wYXJlOiBzdHJpbmdbXSA9IHJlc1xuICAgICAgICAgICAgLnNwbGl0KCcnKVxuICAgICAgICAgICAgLmZpbHRlcihcbiAgICAgICAgICAgICAgICAoc3ltYm9sOiBzdHJpbmcsIGk6IG51bWJlcikgPT5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKHN5bWJvbCwgdGhpcy5tYXNrRXhwcmVzc2lvbltpXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluY2x1ZGVzKHRoaXMubWFza0V4cHJlc3Npb25baV0pICYmIHN5bWJvbCA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbltpXSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIGlmIChjb21wYXJlLmpvaW4oJycpID09PSByZXMpIHtcbiAgICAgICAgICAgIHJldHVybiBjb21wYXJlLmpvaW4oJycpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXM7XG4gICAgfVxuXG4gICAgcHVibGljIHNoaWZ0VHlwZWRTeW1ib2xzKGlucHV0VmFsdWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIGxldCBzeW1ib2xUb1JlcGxhY2U6IHN0cmluZyA9ICcnO1xuICAgICAgICBjb25zdCBuZXdJbnB1dFZhbHVlOiBzdHJpbmdbXSA9XG4gICAgICAgICAgICAoaW5wdXRWYWx1ZSAmJlxuICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuc3BsaXQoJycpLm1hcCgoY3VyclN5bWJvbDogc3RyaW5nLCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluY2x1ZGVzKGlucHV0VmFsdWVbaW5kZXggKyAxXSkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWVbaW5kZXggKyAxXSAhPT0gdGhpcy5tYXNrRXhwcmVzc2lvbltpbmRleCArIDFdXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3ltYm9sVG9SZXBsYWNlID0gY3VyclN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpbnB1dFZhbHVlW2luZGV4ICsgMV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHN5bWJvbFRvUmVwbGFjZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlcGxhY2VTeW1ib2w6IHN0cmluZyA9IHN5bWJvbFRvUmVwbGFjZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5bWJvbFRvUmVwbGFjZSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSkpIHx8XG4gICAgICAgICAgICBbXTtcbiAgICAgICAgcmV0dXJuIG5ld0lucHV0VmFsdWUuam9pbignJyk7XG4gICAgfVxuXG4gICAgcHVibGljIHNob3dNYXNrSW5JbnB1dChpbnB1dFZhbD86IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIGlmICh0aGlzLnNob3dNYXNrVHlwZWQgJiYgISF0aGlzLnNob3duTWFza0V4cHJlc3Npb24pIHtcbiAgICAgICAgICAgIGlmICh0aGlzLm1hc2tFeHByZXNzaW9uLmxlbmd0aCAhPT0gdGhpcy5zaG93bk1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTWFzayBleHByZXNzaW9uIG11c3QgbWF0Y2ggbWFzayBwbGFjZWhvbGRlciBsZW5ndGgnKTtcbiAg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yIHtcbiAgICAgICAgY29uc3QgY2hhcnM6IHN0cmluZ1tdID0gbWFzay5zcGxpdCgnJykuZmlsdGVyKChpdGVtOiBzdHJpbmcpID0+IHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcihpdGVtKSk7XG4gICAgICAgIHJldHVybiBjaGFycy5sZW5ndGg7XG4gICAgfVxuXG4gICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOiBjeWNsb21hdGljLWNvbXBsZXhpdHlcbiAgICBwcml2YXRlIF9jaGVja0ZvcklwKGlucHV0VmFsOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICBpZiAoaW5wdXRWYWwgPT09ICcjJykge1xuICAgICAgICAgICAgcmV0dXJuICdfLl8uXy5fJztcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBhcnI6IHN0cmluZ1tdID0gW107XG4gICAgICAgIGZvciAobGV0IGk6IG51bWJlciA9IDA7IGkgPCBpbnB1dFZhbC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGlucHV0VmFsW2ldLm1hdGNoKCdcXFxcZCcpKSB7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goaW5wdXRWYWxbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChhcnIubGVuZ3RoIDw9IDMpIHtcbiAgICAgICAgICAgIHJldHVybiAnXy5fLl8nO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhcnIubGVuZ3RoID4gMyAmJiBhcnIubGVuZ3RoIDw9IDYpIHtcbiAgICAgICAgICAgIHJldHVybiAnXy5fJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoYXJyLmxlbmd0aCA+IDYgJiYgYXJyLmxlbmd0aCA8PSA5KSB7XG4gICAgICAgICAgICByZXR1cm4gJ18nO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhcnIubGVuZ3RoID4gOSAmJiBhcnIubGVuZ3RoIDw9IDEyKSB7XG4gICAgICAgICAgICByZXR1c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AgICAgICAgICAgICAgID8gbnVsbFxuICAgICAgICAgICAgICAgIDogTnVtYmVyKFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2soXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZVN1Zml4KHRoaXMuX3JlbW92ZVByZWZpeChyZXN1bHQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnNcbiAgICAgICAgICAgICAgICAgICAgICApLnJlcGxhY2UoJywnLCAnLicpXG4gICAgICAgICAgICAgICAgICApLnRvRml4ZWQoMik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCdjb21tYV9zZXBhcmF0b3IuMicgPT09IHRoaXMubWFza0V4cHJlc3Npb24gJiYgdGhpcy5pc051bWJlclZhbHVlKSB7XG4gICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bWF4LWxpbmUtbGVuZ3RoXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ID09PSAnJ1xuICAgICAgICAgICAgICAgID8gcmVzdWx0XG4gICAgICAgICAgICAgICAgOiByZXN1bHQgPT09ICcuJ1xuICAgICAgICAgICAgICAgID8gbnVsbFxuICAgICAgICAgICAgICAgIDogTnVtYmVyKFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycylcbiAgICAgICAgICAgICAgICAgICkudG9GaXhlZCgyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5pc051bWJlclZhbHVlKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ID09PSAnJ1xuICAgICAgICAgICAgICAgID8gcmVzdWx0XG4gICAgICAgICAgICAgICAgOiBOdW1iZXIodGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKSk7XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICB0aGlzLl9yZW1vdmVNYXNrKHRoaXMuX3JlbW92ZVN1Zml4KHRoaXMuX3JlbW92ZVByZWZpeChyZXN1bHQpKSwgdGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMpLmluZGV4T2YoJywnKSAhPT1cbiAgICAgICAgICAgIC0xXG4gICAgICAgICkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycykucmVwbGFjZShcbiAgICAgICAgICAgICAgICAnLCcsXG4gICAgICAgICAgICAgICAgJy4nXG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycyk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0= |
@@ -97,7 +97,8 @@ import * as tslib_1 from "tslib"; | ||
} | ||
if (maskExpression === 'percent') { | ||
if (maskExpression.startsWith('percent')) { | ||
var decCount = maskExpression.split('.')[1]; | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
if (inputValue.length >= 3 && inputValue !== '100') { | ||
inputValue = inputValue.substring(0, 5); | ||
inputValue = inputValue.substring(0, decCount ? +decCount : 2); | ||
} | ||
@@ -117,3 +118,3 @@ } | ||
maskExpression.startsWith('comma_separator')) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/)) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
@@ -373,2 +374,2 @@ } | ||
export { MaskApplierService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay1hcHBsaWVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtbWFzay8iLCJzb3VyY2VzIjpbImFwcC9uZ3gtbWFzay9tYXNrLWFwcGxpZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLE1BQU0sRUFBVyxNQUFNLFVBQVUsQ0FBQztBQUczQztJQW1CSSw0QkFBNkMsT0FBZ0I7UUFBaEIsWUFBTyxHQUFQLE9BQU8sQ0FBUztRQWR0RCxtQkFBYyxHQUFXLEVBQUUsQ0FBQztRQUM1QixnQkFBVyxHQUFXLEVBQUUsQ0FBQztRQUN6Qix3QkFBbUIsR0FBVyxFQUFFLENBQUM7UUFPOUIsZUFBVSxHQUFXLEVBQUUsQ0FBQztRQUN4QixxQkFBZ0IsR0FBVyxFQUFFLENBQUM7UUF1VWhDLGNBQVMsR0FBRyxVQUFDLEdBQVcsRUFBRSxJQUFZLEVBQUUsV0FBbUIsRUFBRSxTQUFpQjtZQUNsRixHQUFHLElBQUksRUFBRSxDQUFDO1lBQ1YsSUFBTSxDQUFDLEdBQWEsR0FBRyxDQUFDLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQztZQUMzQyxJQU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HNXaXRoKCdkb3Rfc2VwYXJhdG9yJykgfHxcbiAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uID09PSAnY29tbWFfc2VwYXJhdG9yJyB8fFxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJylcbiAgICAgICAgKSB7XG4gICAgICAgICAgICBpZiAoaW5wdXRWYWx1ZS5tYXRjaCgnW2Etel18W0EtWl0nKSB8fCBpbnB1dFZhbHVlLm1hdGNoKC9bLUAjISQlXiYqKClfK3x+PWB7fVxcW1xcXTpcIjs8Pi4/XFwvXS8pKSB7XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IHRoaXMuX2NoZWNrSW5wdXQoaW5wdXRWYWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBwcmVjaXNpb246IG51bWJlciA9IHRoaXMuZ2V0UHJlY2lzaW9uKG1hc2tFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIGxldCBzdHJGb3JTZXA6IHN0cmluZztcbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdkb3Rfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpICE9PSAtMSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmluZGV4T2YoJy4nKSA9PT0gaW5wdXRWYWx1ZS5sYXN0SW5kZXhPZignLicpICYmXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpID4gM1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID0gaW5wdXRWYWx1ZS5yZXBsYWNlKCcuJywgJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUubGVuZ3RoID4gMSAmJiBpbnB1dFZhbHVlWzBdID09PSAnMCcgJiYgaW5wdXRWYWx1ZVsxXSAhPT0gJywnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0VmFsdWUuc2xpY2UoMSwgaW5wdXRWYWx1ZS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlucHV0VmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID1cbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5sZW5ndGggPiAxICYmIGlucHV0VmFsdWVbMF0gPT09ICcwJyAmJiBpbnB1dFZhbHVlWzFdICE9PSAnLidcbiAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRWYWx1ZS5zbGljZSgxLCBpbnB1dFZhbHVlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgICAgIDogaW5wdXRWYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbiA9PT0gJ3NlcGFyYXRvcicpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5jbHVkZXMoJywnKSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmVuZHNXaXRoKCcsJykgJiZcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5pbmRleE9mKCcsJykgIT09IGlucHV0VmFsdWUubGFzdEluZGV4T2YoJywnKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID0gaW5wdXRWYWx1ZS5zdWJzdHJpbmcoMCwgaW5wdXRWYWx1ZS5sZW5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S5yZXBsYWNlKC9cXC4vZywgJycpO1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMuc2VwYXJhdG9yKHN0ckZvclNlcCwgJy4nLCAnLCcsIHByZWNpc2lvbik7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hc2tFeHByZXNzaW9uID09PSAnY29tbWFfc2VwYXJhdG9yJyB8fCBtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdjb21tYV9zZXBhcmF0b3InKSkge1xuICAgICAgICAgICAgICAgIHN0ckZvclNlcCA9IGlucHV0VmFsdWUucmVwbGFjZSgvXFwsL2csICcnKTtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0aGlzLnNlcGFyYXRvcihzdHJGb3JTZXAsICcsJywgJy4nLCBwcmVjaXNpb24pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBjb21tYVNoaWZ0OiBudW1iZXIgPSByZXN1bHQuaW5kZXhPZignLCcpIC0gaW5wdXRWYWx1ZS5pbmRleE9mKCcsJyk7XG4gICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IHJlc3VsdC5sZW5ndGggLSBpbnB1dFZhbHVlLmxlbmd0aDtcblxuICAgICAgICAgICAgaWYgKHNoaWZ0U3RlcCA+IDAgJiYgcmVzdWx0W3Bvc2l0aW9uXSAhPT0gJywnKSB7XG4gICAgICAgICAgICAgICAgYmFja3NwYWNlU2hpZnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGxldCBfc2hpZnQ6IG51bWJlciA9IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQocG9zaXRpb24gKyBfc2hpZnQpO1xuICAgICAgICAgICAgICAgICAgICBfc2hpZnQrKztcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChfc2hpZnQgPCBzaGlmdFN0ZXApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICBjb21tYVNoaWZ0ICE9PSAwICYmXG4gICAgICAgICAgICAgICAgcmVzdWx0LmluZGV4T2YoJywnKSAhPT0gLTEgJiZcbiAgICAgICAgICAgICAgICByZXN1bHQuaW5kZXhPZignLCcpIDwgcG9zaXRpb24gJiZcbiAgICAgICAgICAgICAgICBzaGlmdFN0ZXAgPD0gMFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICBiYWNrc3BhY2VTaGlmdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgc2hpZnQgPSBzaGlmdFN0ZXA7XG4gICAgICAgICAgICAgICAgcG9zaXRpb24gKz0gc2hpZnRTdGVwO1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChwb3NpdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmNsZWFyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZVxuICAgICAgICAgICAgICAgIGxldCBpOiBudW1iZXIgPSAwLCBpbnB1dFN5bWJvbDogc3RyaW5nID0gaW5wdXRBcnJheVswXTtcbiAgICAgICAgICAgICAgICBpIDwgaW5wdXRBcnJheS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaSsrLCBpbnB1dFN5bWJvbCA9IGlucHV0QXJyYXlbaV1cbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IG1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICYmXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKidcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMuaGlkZGVuSW5wdXQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5zeW1ib2wgPT09IGlucHV0U3ltYm9sKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ0gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnaCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09ICcyJyAmJiBOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdzJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IG1hc2tFeHByZXNzaW9uW2N1cnNvcl07XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKGlucHV0U3ltYm9sKSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dLm9wdGlvbmFsXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJyonICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIHJlc3VsdC5sZW5ndGggKyAxID09PSBtYXNrRXhwcmVzc2lvbi5sZW5ndGggJiZcbiAgICAgICAgICAgIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluZGV4T2YobWFza0V4cHJlc3Npb25bbWFza0V4cHJlc3Npb24ubGVuZ3RoIC0gMV0pICE9PSAtMVxuICAgICAgICApIHtcbiAgICAgICAgICAgIHJlc3VsdCArPSBtYXNrRXhwcmVzc2lvblttYXNrRXhwcmVzc2lvbi5sZW5ndGggLSAxXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBuZXdQb3NpdGlvbjogbnVtYm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WJvbDogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zID0gdGhpcy5jdXN0b21QYXR0ZXJuID8gdGhpcy5jdXN0b21QYXR0ZXJuIDogdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnM7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrU3ltYm9sXSAmJlxuICAgICAgICAgICAgdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnNbbWFza1N5bWJvbF0ucGF0dGVybiAmJlxuICAgICAgICAgICAgdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnNbbWFza1N5bWJvbF0ucGF0dGVybi50ZXN0KGlucHV0U3ltYm9sKVxuICAgICAgICApO1xuICAgIH1cblxuICAgIHByaXZhdGUgc2VwYXJhdG9yID0gKHN0cjogc3RyaW5nLCBjaGFyOiBzdHJpbmcsIGRlY2ltYWxDaGFyOiBzdHJpbmcsIHByZWNpc2lvbjogbnVtYmVyKSA9PiB7XG4gICAgICAgIHN0ciArPSAnJztcbiAgICAgICAgY29uc3QgeDogc3RyaW5nW10gPSBzdHIuc3BsaXQoZGVjaW1hbENoYXIpO1xuICAgICAgICBjb25zdCBkZWNpbWFsczogc3RyaW5nID0geC5sZW5ndGggPiAxID8gYCR7ZGVjaW1hbENoYXJ9JHt4WzFdfWAgOiAnJztcbiAgICAgICAgbGV0IHJlczogc3RyaW5nID0geFswXTtcbiAgICAgICAgY29uc3Qgcmd4OiBSZWdFeHAgPSAvKFxcZCspKFxcZHszfSkvO1xuICAgICAgICB3aGlsZSAocmd4LnRlc3QocmVzKSkge1xuICAgICAgICAgICAgcmVzID0gcmVzLnJlcGxhY2Uocmd4LCAnJDEnICsgY2hhciArICckMicpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChwcmVjaXNpb24gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcyArIGRlY2ltYWxzO1xuICAgICAgICB9IGVsc2UgaWYgKHByZWNpc2lvbiA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzICsgZGVjaW1hbHMuc3Vic3RyKDAsIHByZWNpc2lvbiArIDEpO1xuICAgIH07XG5cbiAgICBwcml2YXRlIHBlcmNlbnRhZ2UgPSAoc3RyOiBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgICAgcmV0dXJuIE51bWJlcihzdHIpID49IDAgJiYgTnVtYmVyKHN0cikgPD0gMTAwO1xuICAgIH07XG5cbiAgICBwcml2YXRlIGdldFByZWNpc2lvbiA9IChtYXNrRXhwcmVzc2lvbjogc3RyaW5nKTogbnVtYmVyID0+IHtcbiAgICAgICAgY29uc3QgeDogc3RyaW5nW10gPSBtYXNrRXhwcmVzc2lvbi5zcGxpdCgnLicpO1xuICAgICAgICBpZiAoeC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKHhbeC5sZW5ndGggLSAxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEluZmluaXR5O1xuICAgIH07XG5cbiAgICBwcml2YXRlIGNoZWNrSW5wdXRQcmVjaXNpb24gPSAoaW5wdXRWYWx1ZTogc3RyaW5nLCBwcmVjaXNpb246IG51bWJlciwgZGVjaW1hbE1hcmtlcjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICAgICAgaWYgKHByZWNpc2lvbiA8IEluZmluaXR5KSB7XG4gICAgICAgICAgICBsZXQgcHJlY2lzaW9uUmVnRXg6IFJlZ0V4cDtcblxuICAgICAgICAgICAgaWYgKGRlY2ltYWxNYXJrZXIgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIHByZWNpc2lvblJlZ0V4ID0gbmV3IFJlZ0V4cChgXFxcXC5cXFxcZHske3ByZWNpc2lvbn19LiokYCk7XG4gICA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ICAgICAgbWFza0V4cHJlc3Npb24gPSAnMDk5LjA5OS4wOTkuMDk5JztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgncGVyY2VudCcpKSB7XG4gICAgICAgICAgICBjb25zdCBkZWNDb3VudDogc3RyaW5nIHwgbnVtYmVyID0gbWFza0V4cHJlc3Npb24uc3BsaXQoJy4nKVsxXTtcbiAgICAgICAgICAgIGlmIChpbnB1dFZhbHVlLm1hdGNoKCdbYS16XXxbQS1aXScpIHx8IGlucHV0VmFsdWUubWF0Y2goL1stISQlXiYqKClfK3x+PWB7fVxcW1xcXTpcIjsnPD4/LFxcL10vKSkge1xuICAgICAgICAgICAgICAgIGlucHV0VmFsdWUgPSB0aGlzLl9jaGVja0lucHV0KGlucHV0VmFsdWUpO1xuICAgICAgICAgICAgICAgIGlmIChpbnB1dFZhbHVlLmxlbmd0aCA+PSAzICYmIGlucHV0VmFsdWUgIT09ICcxMDAnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBkZWNDb3VudCA/ICtkZWNDb3VudCA6IDIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnBlcmNlbnRhZ2UoaW5wdXRWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBpbnB1dFZhbHVlLmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24gPT09ICdzZXBhcmF0b3InIHx8XG4gICAgICAgICAgICBtYXNrRXhwcmVzc2lvbiA9PT0gJ2RvdF9zZXBhcmF0b3InIHx8XG4gICAgICAgICAgICBtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdkb3Rfc2VwYXJhdG9yJykgfHxcbiAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uID09PSAnY29tbWFfc2VwYXJhdG9yJyB8fFxuICAgICAgICAgICAgbWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJylcbiAgICAgICAgKSB7XG4gICAgICAgICAgICBpZiAoaW5wdXRWYWx1ZS5tYXRjaCgnW2Etel18W0EtWl0nKSB8fCBpbnB1dFZhbHVlLm1hdGNoKC9bLUAjISQlXFxcXF4mKigpX8KjwqwnK3x+PWB7fVxcW1xcXTpcIjs8Pi4/XFwvXS8pKSB7XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IHRoaXMuX2NoZWNrSW5wdXQoaW5wdXRWYWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBwcmVjaXNpb246IG51bWJlciA9IHRoaXMuZ2V0UHJlY2lzaW9uKG1hc2tFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIGxldCBzdHJGb3JTZXA6IHN0cmluZztcbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdkb3Rfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpICE9PSAtMSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmluZGV4T2YoJy4nKSA9PT0gaW5wdXRWYWx1ZS5sYXN0SW5kZXhPZignLicpICYmXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5kZXhPZignLicpID4gM1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID0gaW5wdXRWYWx1ZS5yZXBsYWNlKCcuJywgJywnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9XG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUubGVuZ3RoID4gMSAmJiBpbnB1dFZhbHVlWzBdID09PSAnMCcgJiYgaW5wdXRWYWx1ZVsxXSAhPT0gJywnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0VmFsdWUuc2xpY2UoMSwgaW5wdXRWYWx1ZS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlucHV0VmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb24uc3RhcnRzV2l0aCgnY29tbWFfc2VwYXJhdG9yJykpIHtcbiAgICAgICAgICAgICAgICBpbnB1dFZhbHVlID1cbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5sZW5ndGggPiAxICYmIGlucHV0VmFsdWVbMF0gPT09ICcwJyAmJiBpbnB1dFZhbHVlWzFdICE9PSAnLidcbiAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRWYWx1ZS5zbGljZSgxLCBpbnB1dFZhbHVlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgICAgIDogaW5wdXRWYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbiA9PT0gJ3NlcGFyYXRvcicpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlucHV0VmFsdWUuaW5jbHVkZXMoJywnKSAmJlxuICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLmVuZHNXaXRoKCcsJykgJiZcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5pbmRleE9mKCcsJykgIT09IGlucHV0VmFsdWUubGFzdEluZGV4T2YoJywnKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dFZ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aXNpb24sICcsJyk7XG4gICAgICAgICAgICAgICAgc3RyRm9yU2VwID0gaW5wdXRWYWx1ZS5yZXBsYWNlKC9cXC4vZywgJycpO1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMuc2VwYXJhdG9yKHN0ckZvclNlcCwgJy4nLCAnLCcsIHByZWNpc2lvbik7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hc2tFeHByZXNzaW9uID09PSAnY29tbWFfc2VwYXJhdG9yJyB8fCBtYXNrRXhwcmVzc2lvbi5zdGFydHNXaXRoKCdjb21tYV9zZXBhcmF0b3InKSkge1xuICAgICAgICAgICAgICAgIHN0ckZvclNlcCA9IGlucHV0VmFsdWUucmVwbGFjZSgvXFwsL2csICcnKTtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0aGlzLnNlcGFyYXRvcihzdHJGb3JTZXAsICcsJywgJy4nLCBwcmVjaXNpb24pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBjb21tYVNoaWZ0OiBudW1iZXIgPSByZXN1bHQuaW5kZXhPZignLCcpIC0gaW5wdXRWYWx1ZS5pbmRleE9mKCcsJyk7XG4gICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IHJlc3VsdC5sZW5ndGggLSBpbnB1dFZhbHVlLmxlbmd0aDtcblxuICAgICAgICAgICAgaWYgKHNoaWZ0U3RlcCA+IDAgJiYgcmVzdWx0W3Bvc2l0aW9uXSAhPT0gJywnKSB7XG4gICAgICAgICAgICAgICAgYmFja3NwYWNlU2hpZnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGxldCBfc2hpZnQ6IG51bWJlciA9IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQocG9zaXRpb24gKyBfc2hpZnQpO1xuICAgICAgICAgICAgICAgICAgICBfc2hpZnQrKztcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChfc2hpZnQgPCBzaGlmdFN0ZXApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICBjb21tYVNoaWZ0ICE9PSAwICYmXG4gICAgICAgICAgICAgICAgcmVzdWx0LmluZGV4T2YoJywnKSAhPT0gLTEgJiZcbiAgICAgICAgICAgICAgICByZXN1bHQuaW5kZXhPZignLCcpIDwgcG9zaXRpb24gJiZcbiAgICAgICAgICAgICAgICBzaGlmdFN0ZXAgPD0gMFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICBiYWNrc3BhY2VTaGlmdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgc2hpZnQgPSBzaGlmdFN0ZXA7XG4gICAgICAgICAgICAgICAgcG9zaXRpb24gKz0gc2hpZnRTdGVwO1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChwb3NpdGlvbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmNsZWFyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZVxuICAgICAgICAgICAgICAgIGxldCBpOiBudW1iZXIgPSAwLCBpbnB1dFN5bWJvbDogc3RyaW5nID0gaW5wdXRBcnJheVswXTtcbiAgICAgICAgICAgICAgICBpIDwgaW5wdXRBcnJheS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaSsrLCBpbnB1dFN5bWJvbCA9IGlucHV0QXJyYXlbaV1cbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IG1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICYmXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKidcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMuaGlkZGVuSW5wdXQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5zeW1ib2wgPT09IGlucHV0U3ltYm9sKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ0gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnaCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09ICcyJyAmJiBOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdzJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ2QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3IgLSAxXSA9PT0gJ00nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0VmFsdWUuc2xpY2UoY3Vyc29yIC0gMSwgY3Vyc29yICsgMSkpID4gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IG1hc2tFeHByZXNzaW9uW2N1cnNvcl07XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKGlucHV0U3ltYm9sKSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dLm9wdGlvbmFsXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJyonICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSAmJlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maW5kU3BlY2lhbENoYXIoaW5wdXRTeW1ib2wpID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdICYmXG4gICAgICAgICAgICAgICAgICAgIG11bHRpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIHJlc3VsdC5sZW5ndGggKyAxID09PSBtYXNrRXhwcmVzc2lvbi5sZW5ndGggJiZcbiAgICAgICAgICAgIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluZGV4T2YobWFza0V4cHJlc3Npb25bbWFza0V4cHJlc3Npb24ubGVuZ3RoIC0gMV0pICE9PSAtMVxuICAgICAgICApIHtcbiAgICAgICAgICAgIHJlc3VsdCArPSBtYXNrRXhwcmVzc2lvblttYXNrRXhwcmVzc2lvbi5sZW5nd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AgICB9XG4gICAgICAgIGlmIChwcmVjaXNpb24gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcyArIGRlY2ltYWxzO1xuICAgICAgICB9IGVsc2UgaWYgKHByZWNpc2lvbiA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzICsgZGVjaW1hbHMuc3Vic3RyKDAsIHByZWNpc2lvbiArIDEpO1xuICAgIH07XG5cbiAgICBwcml2YXRlIHBlcmNlbnRhZ2UgPSAoc3RyOiBzdHJpbmcpOiBib29sZWFuID0+IHtcbiAgICAgICAgcmV0dXJuIE51bWJlcihzdHIpID49IDAgJiYgTnVtYmVyKHN0cikgPD0gMTAwO1xuICAgIH07XG5cbiAgICBwcml2YXRlIGdldFByZWNpc2lvbiA9IChtYXNrRXhwcmVzc2lvbjogc3RyaW5nKTogbnVtYmVyID0+IHtcbiAgICAgICAgY29uc3QgeDogc3RyaW5nW10gPSBtYXNrRXhwcmVzc2lvbi5zcGxpdCgnLicpO1xuICAgICAgICBpZiAoeC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKHhbeC5sZW5ndGggLSAxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEluZmluaXR5O1xuICAgIH07XG5cbiAgICBwcml2YXRlIGNoZWNrSW5wdXRQcmVjaXNpb24gPSAoaW5wdXRWYWx1ZTogc3RyaW5nLCBwcmVjaXNpb246IG51bWJlciwgZGVjaW1hbE1hcmtlcjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICAgICAgaWYgKHByZWNpc2lvbiA8IEluZmluaXR5KSB7XG4gICAgICAgICAgICBsZXQgcHJlY2lzaW9uUmVnRXg6IFJlZ0V4cDtcblxuICAgICAgICAgICAgaWYgKGRlY2ltYWxNYXJrZXIgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIHByZWNpc2lvblJlZ0V4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8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbWF4LWZpbGUtbGluZS1jb3VudFxufVxuIl19 |
@@ -33,3 +33,9 @@ import * as tslib_1 from "tslib"; | ||
if (cb === void 0) { cb = function () { }; } | ||
if (!maskExpression) { | ||
return inputValue; | ||
} | ||
this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : ''; | ||
if (this.maskExpression === 'IP' && this.showMaskTyped) { | ||
this.maskIsShown = this.showMaskInInput(inputValue || '#'); | ||
} | ||
if (!inputValue && this.showMaskTyped) { | ||
@@ -81,3 +87,3 @@ this.formControlResult(this.prefix); | ||
var prefNmask = this.prefix + this.maskIsShown; | ||
ifMaskIsShown = prefNmask.slice(resLen); | ||
ifMaskIsShown = this.maskExpression === 'IP' ? prefNmask : prefNmask.slice(resLen); | ||
return result + ifMaskIsShown; | ||
@@ -143,3 +149,3 @@ }; | ||
}; | ||
MaskService.prototype.showMaskInInput = function () { | ||
MaskService.prototype.showMaskInInput = function (inputVal) { | ||
if (this.showMaskTyped && !!this.shownMaskExpression) { | ||
@@ -154,2 +160,5 @@ if (this.maskExpression.length !== this.shownMaskExpression.length) { | ||
else if (this.showMaskTyped) { | ||
if (inputVal) { | ||
return this._checkForIp(inputVal); | ||
} | ||
return this.maskExpression.replace(/\w/g, '_'); | ||
@@ -178,2 +187,27 @@ } | ||
}; | ||
// tslint:disable-next-line: cyclomatic-complexity | ||
MaskService.prototype._checkForIp = function (inputVal) { | ||
if (inputVal === '#') { | ||
return '_._._._'; | ||
} | ||
var arr = []; | ||
for (var i = 0; i < inputVal.length; i++) { | ||
if (inputVal[i].match('\\d')) { | ||
arr.push(inputVal[i]); | ||
} | ||
} | ||
if (arr.length <= 3) { | ||
return '_._._'; | ||
} | ||
if (arr.length > 3 && arr.length <= 6) { | ||
return '_._'; | ||
} | ||
if (arr.length > 6 && arr.length <= 9) { | ||
return '_'; | ||
} | ||
if (arr.length > 9 && arr.length <= 12) { | ||
return ''; | ||
} | ||
return ''; | ||
}; | ||
MaskService.prototype.formControlResult = function (inputValue) { | ||
@@ -211,7 +245,15 @@ if (Array.isArray(this.dropSpecialCharacters)) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === ',' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
} | ||
if ('comma_separator.2' === this.maskExpression && this.isNumberValue) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === '.' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
} | ||
@@ -241,2 +283,2 @@ if (this.isNumberValue) { | ||
export { MaskService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc2svIiwic291cmNlcyI6WyJhcHAvbmd4LW1hc2svbWFzay5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFFLE9BQU8sRUFBRSxNQUFNLEVBQVcsTUFBTSxVQUFVLENBQUM7QUFDM0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRzVEO0lBQWlDLHVDQUFrQjtJQVkvQztJQUNJLDJCQUEyQjtJQUNELFFBQWEsRUF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AgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnI7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmpvaW4oJycpO1xuICAgIH1cblxuICAgIC8vIHRoaXMgZnVuY3Rpb24gaXMgbm90IG5lY2Vzc2FyeSwgaXQgY2hlY2tzIHJlc3VsdCBhZ2FpbnN0IG1hc2tFeHByZXNzaW9uXG4gICAgcHVibGljIGdldEFjdHVhbFZhbHVlKHJlczogc3RyaW5nKTogc3RyaW5nIHtcbiAgICAgICAgY29uc3QgY29tcGFyZTogc3RyaW5nW10gPSByZXNcbiAgICAgICAgICAgIC5zcGxpdCgnJylcbiAgICAgICAgICAgIC5maWx0ZXIoXG4gICAgICAgICAgICAgICAgKHN5bWJvbDogc3RyaW5nLCBpOiBudW1iZXIpID0+XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrU3ltYm9sTWFzayhzeW1ib2wsIHRoaXMubWFza0V4cHJlc3Npb25baV0pIHx8XG4gICAgICAgICAgICAgICAgICAgICh0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmNsdWRlcyh0aGlzLm1hc2tFeHByZXNzaW9uW2ldKSAmJiBzeW1ib2wgPT09IHRoaXMubWFza0V4cHJlc3Npb25baV0pXG4gICAgICAgICAgICApO1xuICAgICAgICBpZiAoY29tcGFyZS5qb2luKCcnKSA9PT0gcmVzKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcGFyZS5qb2luKCcnKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzO1xuICAgIH1cblxuICAgIHB1YmxpYyBzaGlmdFR5cGVkU3ltYm9scyhpbnB1dFZhbHVlOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICBsZXQgc3ltYm9sVG9SZXBsYWNlOiBzdHJpbmcgPSAnJztcbiAgICAgICAgY29uc3QgbmV3SW5wdXRWYWx1ZTogc3RyaW5nW10gPVxuICAgICAgICAgICAgKGlucHV0VmFsdWUgJiZcbiAgICAgICAgICAgICAgICBpbnB1dFZhbHVlLnNwbGl0KCcnKS5tYXAoKGN1cnJTeW1ib2w6IHN0cmluZywgaW5kZXg6IG51bWJlcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmNsdWRlcyhpbnB1dFZhbHVlW2luZGV4ICsgMV0pICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFZhbHVlW2luZGV4ICsgMV0gIT09IHRoaXMubWFza0V4cHJlc3Npb25baW5kZXggKyAxXVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5bWJvbFRvUmVwbGFjZSA9IGN1cnJTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXRWYWx1ZVtpbmRleCArIDFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChzeW1ib2xUb1JlcGxhY2UubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXBsYWNlU3ltYm9sOiBzdHJpbmcgPSBzeW1ib2xUb1JlcGxhY2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBzeW1ib2xUb1JlcGxhY2UgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXBsYWNlU3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjdXJyU3ltYm9sO1xuICAgICAgICAgICAgICAgIH0pKSB8fFxuICAgICAgICAgICAgW107XG4gICAgICAgIHJldHVybiBuZXdJbnB1dFZhbHVlLmpvaW4oJycpO1xuICAgIH1cblxuICAgIHB1YmxpYyBzaG93TWFza0luSW5wdXQoKTogc3RyaW5nIHtcbiAgICAgICAgaWYgKHRoaXMuc2hvd01h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ICBpZiAoJ2RvdF9zZXBhcmF0b3IuMicgPT09IHRoaXMubWFza0V4cHJlc3Npb24gJiYgdGhpcy5pc051bWJlclZhbHVlKSB7XG4gICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bWF4LWxpbmUtbGVuZ3RoXG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKFxuICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycykucmVwbGFjZShcbiAgICAgICAgICAgICAgICAgICAgJywnLFxuICAgICAgICAgICAgICAgICAgICAnLidcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApLnRvRml4ZWQoMik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCdjb21tYV9zZXBhcmF0b3IuMicgPT09IHRoaXMubWFza0V4cHJlc3Npb24gJiYgdGhpcy5pc051bWJlclZhbHVlKSB7XG4gICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bWF4LWxpbmUtbGVuZ3RoXG4gICAgICAgICAgICByZXR1cm4gTnVtYmVyKFxuICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycylcbiAgICAgICAgICAgICkudG9GaXhlZCgyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5pc051bWJlclZhbHVlKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ID09PSAnJ1xuICAgICAgICAgICAgICAgID8gcmVzdWx0XG4gICAgICAgICAgICAgICAgOiBOdW1iZXIodGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmV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leF1dLnN5bWJvbFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tYXNrQXZhaWxhYmxlUGF0dGVybnNbbWFza0V4cHJlc3Npb25baW5kZXhdXS5zeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5qb2luKCcnKTtcbiAgICB9XG5cbiAgICAvLyB0aGlzIGZ1bmN0aW9uIGlzIG5vdCBuZWNlc3NhcnksIGl0IGNoZWNrcyByZXN1bHQgYWdhaW5zdCBtYXNrRXhwcmVzc2lvblxuICAgIHB1YmxpYyBnZXRBY3R1YWxWYWx1ZShyZXM6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIGNvbnN0IGNvbXBhcmU6IHN0cmluZ1tdID0gcmVzXG4gICAgICAgICAgICAuc3BsaXQoJycpXG4gICAgICAgICAgICAuZmlsdGVyKFxuICAgICAgICAgICAgICAgIChzeW1ib2w6IHN0cmluZywgaTogbnVtYmVyKSA9PlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1N5bWJvbE1hc2soc3ltYm9sLCB0aGlzLm1hc2tFeHByZXNzaW9uW2ldKSB8fFxuICAgICAgICAgICAgICAgICAgICAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5jbHVkZXModGhpcy5tYXNrRXhwcmVzc2lvbltpXSkgJiYgc3ltYm9sID09PSB0aGlzLm1hc2tFeHByZXNzaW9uW2ldKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgaWYgKGNvbXBhcmUuam9pbignJykgPT09IHJlcykge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBhcmUuam9pbignJyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlcztcbiAgICB9XG5cbiAgICBwdWJsaWMgc2hpZnRUeXBlZFN5bWJvbHMoaW5wdXRWYWx1ZTogc3RyaW5nKTogc3RyaW5nIHtcbiAgICAgICAgbGV0IHN5bWJvbFRvUmVwbGFjZTogc3RyaW5nID0gJyc7XG4gICAgICAgIGNvbnN0IG5ld0lucHV0VmFsdWU6IHN0cmluZ1tdID1cbiAgICAgICAgICAgIChpbnB1dFZhbHVlICYmXG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZS5zcGxpdCgnJykubWFwKChjdXJyU3ltYm9sOiBzdHJpbmcsIGluZGV4OiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5jbHVkZXMoaW5wdXRWYWx1ZVtpbmRleCArIDFdKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRWYWx1ZVtpbmRleCArIDFdICE9PSB0aGlzLm1hc2tFeHByZXNzaW9uW2luZGV4ICsgMV1cbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzeW1ib2xUb1JlcGxhY2UgPSBjdXJyU3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0VmFsdWVbaW5kZXggKyAxXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoc3ltYm9sVG9SZXBsYWNlLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVwbGFjZVN5bWJvbDogc3RyaW5nID0gc3ltYm9sVG9SZXBsYWNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgc3ltYm9sVG9SZXBsYWNlID0gJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZVN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyclN5bWJvbDtcbiAgICAgICAgICAgICAgICB9KSkgfHxcbiAgICAgICAgICAgIFtdO1xuICAgICAgICByZXR1cm4gbmV3SW5wdXRWYWx1ZS5qb2luKCcnKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc2hvd01hc2tJbklucHV0KGlucHV0VmFsPzogc3RyaW5nKTogc3RyaW5nIHtcbiAgICAgICAgaWYgKHRoaXMuc2hvd01hc2tUeXBlZCAmJiAhIXRoaXMuc2hvd25NYXNrRXhwcmVzc2lvbikge1xuICAgICAgICAgICAgaWYgKHRoaXMubWFza0V4cHJlc3Npb24ubGVuZ3RoICE9PSB0aGlzLnNob3duTWFza0V4cHJlc3Npb24ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdNYXNrIGV4cHJlc3Npb24gbXVzdCBtYXRjaCBtYXNrIHBsYWNlaG9sZGVyIGxlbmd0aCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zaG93bk1hc2tFeHByZXNzaW9uO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuc2hvd01hc2tUeXBlZCkge1xuICAgICAgICAgICAgaWYgKGlucHV0VmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NoZWNrRm9ySXAoaW5wdXRWYWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMubWFza0V4cHJlc3Npb24ucmVwbGFjZSgvXFx3L2csICdfJyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICcnO1xuICAgIH1cblxuICAgIHB1YmxpYyBjbGVhcklmTm90TWF0Y2hGbigpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMuY2xlYXJJZk5vdE1hdGNoID09PSB0cnVlICYmIHRoaXMubWFza0V4cHJlc3Npb24ubGVuZ3RoICE9PSB0aGlzLl9mb3JtRWxlbWVudC52YWx1ZS5sZW5ndGgpIHtcbiAgICAgICAgICAgIH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IHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChpbnB1dFZhbFtpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFyci5sZW5ndGggPD0gMykge1xuICAgICAgICAgICAgcmV0dXJuICdfLl8uXyc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFyci5sZW5ndGggPiAzICYmIGFyci5sZW5ndGggPD0gNikge1xuICAgICAgICAgICAgcmV0dXJuICdfLl8nO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhcnIubGVuZ3RoID4gNiAmJiBhcnIubGVuZ3RoIDw9IDkpIHtcbiAgICAgICAgICAgIHJldHVybiAnXyc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFyci5sZW5ndGggPiA5ICYmIGFyci5sZW5ndGggPD0gMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gJyc7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmb3JtQ29udHJvbFJlc3VsdChpbnB1dFZhbHVlOiBzdHJpbmcpOiB2b2lkIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5kcm9wU3BlY2lhbENoYXJhY3RlcnMpKSB7XG4gICAgICAgICAgICB0aGlzLm9uQ2hhbmdlKFxuICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KGlucHV0VmFsdWUpKSwgdGhpcy5kcm9wU3BlY2lhbENoYXJhY3RlcnMpXG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuZHJvcFNwZWNpYWxDaGFyYWN0ZXJzID09PSB0cnVlKSB7XG4gICAgICAgICAgICB0aGlzLm9uQ2hhbmdlKHRoaXMuX2NoZWNrU3ltYm9scyhpbnB1dFZhbHVlKSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAg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cmluZykgPT4gYFxcXFwke2l0ZW19YCkuam9pbignfCcpLCAnZ2knKTtcbiAgICB9XG4gICAgcHJpdmF0ZSBfY2hlY2tTeW1ib2xzKHJlc3VsdDogc3RyaW5nKTogc3RyaW5nIHwgbnVtYmVyIHwgdW5kZWZpbmVkIHwgbnVsbCB7XG4gICAgICAgIGlmICgnZG90X3NlcGFyYXRvci4yJyA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbiAmJiB0aGlzLmlzTnVtYmVyVmFsdWUpIHtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTptYXgtbGluZS1sZW5ndGhcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgPT09ICcnXG4gICAgICAgICAgICAgICAgPyByZXN1bHRcbiAgICAgICAgICAgICAgICA6IHJlc3VsdCA9PT0gJywnXG4gICAgICAgICAgICAgICAgPyBudWxsXG4gICAgICAgICAgICAgICAgOiBOdW1iZXIoXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFzayhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVyc1xuICAgICAgICAgICAgICAgICAgICAgICkucmVwbGFjZSgnLCcsICcuJylcbiAgICAgICAgICAgICAgICAgICkudG9GaXhlZCgyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoJ2NvbW1hX3NlcGFyYXRvci4yJyA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbiAmJiB0aGlzLmlzTnVtYmVyVmFsdWUpIHtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTptYXgtbGluZS1sZW5ndGhcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgPT09ICcnXG4gICAgICAgICAgICAgICAgPyByZXN1bHRcbiAgICAgICAgICAgICAgICA6IHJlc3VsdCA9PT0gJy4nXG4gICAgICAgICAgICAgICAgPyBudWxsXG4gICAgICAgICAgICAgICAgOiBOdW1iZXIoXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKVxuICAgICAgICAgICAgICAgICAgKS50b0ZpeGVkKDIpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmlzTnVtYmVyVmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgPT09ICcnXG4gICAgICAgICAgICAgICAgPyByZXN1bHRcbiAgICAgICAgICAgICAgICA6IE51bWJlcih0aGlzLl9yZW1vdmVNYXNrKHRoaXMuX3JlbW92ZVN1Zml4KHRoaXMuX3JlbW92ZVByZWZpeChyZXN1bHQpKSwgdGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMpKTtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1hc2sodGhpcy5fcmVtb3ZlU3VmaXgodGhpcy5fcmVtb3ZlUHJlZml4KHJlc3VsdCkpLCB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycykuaW5kZXhPZignLCcpICE9PVxuICAgICAgICAgICAgLTFcbiAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKS5yZXBsYWNlKFxuICAgICAgICAgICAgICAgICcsJyxcbiAgICAgICAgICAgICAgICAnLidcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVtb3ZlTWFzayh0aGlzLl9yZW1vdmVTdWZpeCh0aGlzLl9yZW1vdmVQcmVmaXgocmVzdWx0KSksIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ== |
@@ -167,7 +167,8 @@ import { InjectionToken, Injectable, Inject, ElementRef, Renderer2, Input, HostListener, Directive, forwardRef, Pipe, NgModule } from '@angular/core'; | ||
} | ||
if (maskExpression === 'percent') { | ||
if (maskExpression.startsWith('percent')) { | ||
const decCount = maskExpression.split('.')[1]; | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
if (inputValue.length >= 3 && inputValue !== '100') { | ||
inputValue = inputValue.substring(0, 5); | ||
inputValue = inputValue.substring(0, decCount ? +decCount : 2); | ||
} | ||
@@ -187,3 +188,3 @@ } | ||
maskExpression.startsWith('comma_separator')) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/)) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
@@ -465,3 +466,9 @@ } | ||
applyMask(inputValue, maskExpression, position = 0, cb = () => { }) { | ||
if (!maskExpression) { | ||
return inputValue; | ||
} | ||
this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : ''; | ||
if (this.maskExpression === 'IP' && this.showMaskTyped) { | ||
this.maskIsShown = this.showMaskInInput(inputValue || '#'); | ||
} | ||
if (!inputValue && this.showMaskTyped) { | ||
@@ -513,3 +520,3 @@ this.formControlResult(this.prefix); | ||
const prefNmask = this.prefix + this.maskIsShown; | ||
ifMaskIsShown = prefNmask.slice(resLen); | ||
ifMaskIsShown = this.maskExpression === 'IP' ? prefNmask : prefNmask.slice(resLen); | ||
return result + ifMaskIsShown; | ||
@@ -568,3 +575,3 @@ } | ||
} | ||
showMaskInInput() { | ||
showMaskInInput(inputVal) { | ||
if (this.showMaskTyped && !!this.shownMaskExpression) { | ||
@@ -579,2 +586,5 @@ if (this.maskExpression.length !== this.shownMaskExpression.length) { | ||
else if (this.showMaskTyped) { | ||
if (inputVal) { | ||
return this._checkForIp(inputVal); | ||
} | ||
return this.maskExpression.replace(/\w/g, '_'); | ||
@@ -597,2 +607,27 @@ } | ||
} | ||
// tslint:disable-next-line: cyclomatic-complexity | ||
_checkForIp(inputVal) { | ||
if (inputVal === '#') { | ||
return '_._._._'; | ||
} | ||
const arr = []; | ||
for (let i = 0; i < inputVal.length; i++) { | ||
if (inputVal[i].match('\\d')) { | ||
arr.push(inputVal[i]); | ||
} | ||
} | ||
if (arr.length <= 3) { | ||
return '_._._'; | ||
} | ||
if (arr.length > 3 && arr.length <= 6) { | ||
return '_._'; | ||
} | ||
if (arr.length > 6 && arr.length <= 9) { | ||
return '_'; | ||
} | ||
if (arr.length > 9 && arr.length <= 12) { | ||
return ''; | ||
} | ||
return ''; | ||
} | ||
formControlResult(inputValue) { | ||
@@ -630,7 +665,15 @@ if (Array.isArray(this.dropSpecialCharacters)) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === ',' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
} | ||
if ('comma_separator.2' === this.maskExpression && this.isNumberValue) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === '.' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
} | ||
@@ -637,0 +680,0 @@ if (this.isNumberValue) { |
@@ -169,7 +169,8 @@ import { InjectionToken, Injectable, Inject, ElementRef, Renderer2, Input, HostListener, Directive, forwardRef, Pipe, NgModule } from '@angular/core'; | ||
} | ||
if (maskExpression === 'percent') { | ||
if (maskExpression.startsWith('percent')) { | ||
var decCount = maskExpression.split('.')[1]; | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
if (inputValue.length >= 3 && inputValue !== '100') { | ||
inputValue = inputValue.substring(0, 5); | ||
inputValue = inputValue.substring(0, decCount ? +decCount : 2); | ||
} | ||
@@ -189,3 +190,3 @@ } | ||
maskExpression.startsWith('comma_separator')) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%^&*()_+|~=`{}\[\]:";<>.?\/]/)) { | ||
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)) { | ||
inputValue = this._checkInput(inputValue); | ||
@@ -472,3 +473,9 @@ } | ||
if (cb === void 0) { cb = function () { }; } | ||
if (!maskExpression) { | ||
return inputValue; | ||
} | ||
this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : ''; | ||
if (this.maskExpression === 'IP' && this.showMaskTyped) { | ||
this.maskIsShown = this.showMaskInInput(inputValue || '#'); | ||
} | ||
if (!inputValue && this.showMaskTyped) { | ||
@@ -520,3 +527,3 @@ this.formControlResult(this.prefix); | ||
var prefNmask = this.prefix + this.maskIsShown; | ||
ifMaskIsShown = prefNmask.slice(resLen); | ||
ifMaskIsShown = this.maskExpression === 'IP' ? prefNmask : prefNmask.slice(resLen); | ||
return result + ifMaskIsShown; | ||
@@ -582,3 +589,3 @@ }; | ||
}; | ||
MaskService.prototype.showMaskInInput = function () { | ||
MaskService.prototype.showMaskInInput = function (inputVal) { | ||
if (this.showMaskTyped && !!this.shownMaskExpression) { | ||
@@ -593,2 +600,5 @@ if (this.maskExpression.length !== this.shownMaskExpression.length) { | ||
else if (this.showMaskTyped) { | ||
if (inputVal) { | ||
return this._checkForIp(inputVal); | ||
} | ||
return this.maskExpression.replace(/\w/g, '_'); | ||
@@ -617,2 +627,27 @@ } | ||
}; | ||
// tslint:disable-next-line: cyclomatic-complexity | ||
MaskService.prototype._checkForIp = function (inputVal) { | ||
if (inputVal === '#') { | ||
return '_._._._'; | ||
} | ||
var arr = []; | ||
for (var i = 0; i < inputVal.length; i++) { | ||
if (inputVal[i].match('\\d')) { | ||
arr.push(inputVal[i]); | ||
} | ||
} | ||
if (arr.length <= 3) { | ||
return '_._._'; | ||
} | ||
if (arr.length > 3 && arr.length <= 6) { | ||
return '_._'; | ||
} | ||
if (arr.length > 6 && arr.length <= 9) { | ||
return '_'; | ||
} | ||
if (arr.length > 9 && arr.length <= 12) { | ||
return ''; | ||
} | ||
return ''; | ||
}; | ||
MaskService.prototype.formControlResult = function (inputValue) { | ||
@@ -650,7 +685,15 @@ if (Array.isArray(this.dropSpecialCharacters)) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === ',' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters).replace(',', '.')).toFixed(2); | ||
} | ||
if ('comma_separator.2' === this.maskExpression && this.isNumberValue) { | ||
// tslint:disable-next-line:max-line-length | ||
return Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
return result === '' | ||
? result | ||
: result === '.' | ||
? null | ||
: Number(this._removeMask(this._removeSufix(this._removePrefix(result)), this.maskSpecialCharacters)).toFixed(2); | ||
} | ||
@@ -657,0 +700,0 @@ if (this.isNumberValue) { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"IConfig":{"__symbolic":"interface"},"optionsConfig":{"__symbolic":"interface"},"config":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":23,"character":50},"arguments":["config"]},"NEW_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":24,"character":54},"arguments":["NEW_CONFIG"]},"INITIAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":25,"character":59},"arguments":["INITIAL_CONFIG"]},"initialConfig":{"sufix":"","prefix":"","clearIfNotMatch":false,"showTemplate":false,"showMaskTyped":false,"dropSpecialCharacters":true,"hiddenInput":false,"shownMaskExpression":"","validation":true,"specialCharacters":["-","/","(",")",".",":"," ","+",",","@","[","]","\"","'"],"patterns":{"0":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"9":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"optional":true},"X":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"symbol":"*"},"A":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z0-9]"]}},"S":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z]"]}},"d":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"m":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"M":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"H":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"h":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"s":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"$quoted$":["0","9"]}},"withoutValidation":["percent","Hh:m0:s0","Hh:m0","Hh","m0:s0","s0","m0","separator","dot_separator","comma_separator","d0/M0/0000","d0/M0","d0","M0"],"MaskDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[mask]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":10,"character":21},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":15,"character":21},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"__symbolic":"reference","name":"MaskService"}]}]}],"members":{"maskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":5},"arguments":["mask"]}]}],"specialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":5}}]}],"patterns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":5}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":5}}]}],"sufix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":5}}]}],"dropSpecialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":5}}]}],"hiddenInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":5}}]}],"showMaskTyped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":5}}]}],"shownMaskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":5}}]}],"showTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":5}}]}],"clearIfNotMatch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":5}}]}],"validation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":48,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":48,"character":16}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MaskService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"onInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":181,"character":5},"arguments":["input",["$event"]]}]}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":213,"character":5},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":219,"character":5},"arguments":["click",["$event"]]}]}],"a":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":253,"character":5},"arguments":["keydown",["$event"]]}]}],"onPaste":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":284,"character":5},"arguments":["paste"]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_repeatPatternSymbols":[{"__symbolic":"method"}],"_applyMask":[{"__symbolic":"method"}]}},"MaskService":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":20,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":9},"arguments":[{"__symbolic":"reference","name":"config"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"IConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":22,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":23,"character":27}]}],"applyMask":[{"__symbolic":"method"}],"applyValueChanges":[{"__symbolic":"method"}],"hideInput":[{"__symbolic":"method"}],"getActualValue":[{"__symbolic":"method"}],"shiftTypedSymbols":[{"__symbolic":"method"}],"showMaskInInput":[{"__symbolic":"method"}],"clearIfNotMatchFn":[{"__symbolic":"method"}],"checkSpecialCharAmount":[{"__symbolic":"method"}],"formControlResult":[{"__symbolic":"method"}],"_removeMask":[{"__symbolic":"method"}],"_removePrefix":[{"__symbolic":"method"}],"_removeSufix":[{"__symbolic":"method"}],"_regExpForRemove":[{"__symbolic":"method"}],"_checkSymbols":[{"__symbolic":"method"}]}},"NgxMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"providers":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}],"declarations":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NEW_CONFIG"},"useValue":{"__symbolic":"reference","name":"configValue"}},{"provide":{"__symbolic":"reference","name":"INITIAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"initialConfig"}},{"provide":{"__symbolic":"reference","name":"config"},"useFactory":{"__symbolic":"reference","name":"_configFactory"},"deps":[{"__symbolic":"reference","name":"INITIAL_CONFIG"},{"__symbolic":"reference","name":"NEW_CONFIG"}]}]}},"forChild":{"__symbolic":"function","parameters":["_configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"}}}}},"_configFactory":{"__symbolic":"function","parameters":["initConfig","configValue"],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":47,"character":11,"module":"./app/ngx-mask/ngx-mask.module"},"right":"function"},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"configValue"}},"elseExpression":{}}},"MaskPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"mask","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":23,"character":24},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"IConfig"}]}],"applyMaskWithPattern":[{"__symbolic":"method"}],"applyMask":[{"__symbolic":"method"}],"_findSpecialChar":[{"__symbolic":"method"}],"_checkSymbolMask":[{"__symbolic":"method"}],"_checkInput":[{"__symbolic":"method"}]}}},"origins":{"IConfig":"./app/ngx-mask/config","optionsConfig":"./app/ngx-mask/config","config":"./app/ngx-mask/config","NEW_CONFIG":"./app/ngx-mask/config","INITIAL_CONFIG":"./app/ngx-mask/config","initialConfig":"./app/ngx-mask/config","withoutValidation":"./app/ngx-mask/config","MaskDirective":"./app/ngx-mask/mask.directive","MaskService":"./app/ngx-mask/mask.service","NgxMaskModule":"./app/ngx-mask/ngx-mask.module","_configFactory":"./app/ngx-mask/ngx-mask.module","MaskPipe":"./app/ngx-mask/mask.pipe","ɵa":"./app/ngx-mask/mask-applier.service"},"importAs":"ngx-mask"} | ||
{"__symbolic":"module","version":4,"metadata":{"IConfig":{"__symbolic":"interface"},"optionsConfig":{"__symbolic":"interface"},"config":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":23,"character":50},"arguments":["config"]},"NEW_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":24,"character":54},"arguments":["NEW_CONFIG"]},"INITIAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":25,"character":59},"arguments":["INITIAL_CONFIG"]},"initialConfig":{"sufix":"","prefix":"","clearIfNotMatch":false,"showTemplate":false,"showMaskTyped":false,"dropSpecialCharacters":true,"hiddenInput":false,"shownMaskExpression":"","validation":true,"specialCharacters":["-","/","(",")",".",":"," ","+",",","@","[","]","\"","'"],"patterns":{"0":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"9":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"optional":true},"X":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"symbol":"*"},"A":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z0-9]"]}},"S":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z]"]}},"d":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"m":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"M":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"H":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"h":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"s":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"$quoted$":["0","9"]}},"withoutValidation":["percent","Hh:m0:s0","Hh:m0","Hh","m0:s0","s0","m0","separator","dot_separator","comma_separator","d0/M0/0000","d0/M0","d0","M0"],"MaskDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[mask]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":10,"character":21},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":15,"character":21},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"__symbolic":"reference","name":"MaskService"}]}]}],"members":{"maskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":5},"arguments":["mask"]}]}],"specialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":5}}]}],"patterns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":5}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":5}}]}],"sufix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":5}}]}],"dropSpecialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":5}}]}],"hiddenInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":5}}]}],"showMaskTyped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":5}}]}],"shownMaskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":5}}]}],"showTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":5}}]}],"clearIfNotMatch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":5}}]}],"validation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":48,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":48,"character":16}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MaskService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"onInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":181,"character":5},"arguments":["input",["$event"]]}]}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":213,"character":5},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":219,"character":5},"arguments":["click",["$event"]]}]}],"a":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":253,"character":5},"arguments":["keydown",["$event"]]}]}],"onPaste":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":284,"character":5},"arguments":["paste"]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_repeatPatternSymbols":[{"__symbolic":"method"}],"_applyMask":[{"__symbolic":"method"}]}},"MaskService":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":20,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":9},"arguments":[{"__symbolic":"reference","name":"config"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"IConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":22,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":23,"character":27}]}],"applyMask":[{"__symbolic":"method"}],"applyValueChanges":[{"__symbolic":"method"}],"hideInput":[{"__symbolic":"method"}],"getActualValue":[{"__symbolic":"method"}],"shiftTypedSymbols":[{"__symbolic":"method"}],"showMaskInInput":[{"__symbolic":"method"}],"clearIfNotMatchFn":[{"__symbolic":"method"}],"checkSpecialCharAmount":[{"__symbolic":"method"}],"_checkForIp":[{"__symbolic":"method"}],"formControlResult":[{"__symbolic":"method"}],"_removeMask":[{"__symbolic":"method"}],"_removePrefix":[{"__symbolic":"method"}],"_removeSufix":[{"__symbolic":"method"}],"_regExpForRemove":[{"__symbolic":"method"}],"_checkSymbols":[{"__symbolic":"method"}]}},"NgxMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"providers":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}],"declarations":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NEW_CONFIG"},"useValue":{"__symbolic":"reference","name":"configValue"}},{"provide":{"__symbolic":"reference","name":"INITIAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"initialConfig"}},{"provide":{"__symbolic":"reference","name":"config"},"useFactory":{"__symbolic":"reference","name":"_configFactory"},"deps":[{"__symbolic":"reference","name":"INITIAL_CONFIG"},{"__symbolic":"reference","name":"NEW_CONFIG"}]}]}},"forChild":{"__symbolic":"function","parameters":["_configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"}}}}},"_configFactory":{"__symbolic":"function","parameters":["initConfig","configValue"],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":47,"character":11,"module":"./app/ngx-mask/ngx-mask.module"},"right":"function"},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"configValue"}},"elseExpression":{}}},"MaskPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"mask","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":23,"character":24},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"IConfig"}]}],"applyMaskWithPattern":[{"__symbolic":"method"}],"applyMask":[{"__symbolic":"method"}],"_findSpecialChar":[{"__symbolic":"method"}],"_checkSymbolMask":[{"__symbolic":"method"}],"_checkInput":[{"__symbolic":"method"}]}}},"origins":{"IConfig":"./app/ngx-mask/config","optionsConfig":"./app/ngx-mask/config","config":"./app/ngx-mask/config","NEW_CONFIG":"./app/ngx-mask/config","INITIAL_CONFIG":"./app/ngx-mask/config","initialConfig":"./app/ngx-mask/config","withoutValidation":"./app/ngx-mask/config","MaskDirective":"./app/ngx-mask/mask.directive","MaskService":"./app/ngx-mask/mask.service","NgxMaskModule":"./app/ngx-mask/ngx-mask.module","_configFactory":"./app/ngx-mask/ngx-mask.module","MaskPipe":"./app/ngx-mask/mask.pipe","ɵa":"./app/ngx-mask/mask-applier.service"},"importAs":"ngx-mask"} |
{ | ||
"name": "ngx-mask", | ||
"version": "7.9.1", | ||
"version": "7.9.2", | ||
"description": "awesome ngx mask", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
918117
6195