var Common;!function(t){"use strict";class e{static escapeRegExp(t){return String.prototype.replace.call(t,e.ESCAPE_USER_INPUT_REGEX,"\\$&")}static escapeRegExpWithWildCard(t){return String.prototype.replace.call(t,e.ESCAPE_USER_INPUT_REGEX,function(t){return"*"===t?".*":"\\"+t})}static wrapInQuotes(t){return'"'+String.prototype.replace.call(t,/\\"/g,'"')+'"'}static unescapeHtml(t){if("string"!=typeof t){if(null===t||void 0===t)return"";t=""+t}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(t,/&gt;/g,">"),/&lt;/g,"<"),/&apos;/g,"'"),/&quot;/g,'"'),/&amp;/g,"&")}static escapeHtmlAndPreserveWhitespace(e){var r=[e],p=(e=String.prototype.replace.call(e,/(\r\n|\n\r|\r|\n)/g,"\r\n")).split("\r\n");if(p.length>0){r=[];for(var l=0;l<p.length;l++){var a=p[l];a="<pre>"+(a=t.EncodingUtilities.escapeHtml(a))+"</pre>";r.push(a)}}return r}static escapeHtml(t){if("string"!=typeof t){if(null===t||void 0===t)return"";t=""+t}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(t,/&/g,"&amp;"),/"/g,"&quot;"),/'/g,"&apos;"),/</g,"&lt;"),/>/g,"&gt;")}static replaceSpacesWithNonBreakingSpaceEntities(t){return String.prototype.replace.call(t,/ /g," ")}static replaceLineBreaksWithNonBreakingSpaceEntities(t){return String.prototype.replace.call(t,/[\r\n]/g," ")}}e.ESCAPE_USER_INPUT_REGEX=/([.+?^=!:${}()|\[\]\/\\])|(\*)/g;t.EncodingUtilities=e}(Common||(Common={}));
