typescript-logging
Version:
Library for logging, written in typescript, can be used by normal es5+ javascript as well.
1 lines • 106 kB
JavaScript
var TSL=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=30)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(t.LogLevel||(t.LogLevel={})),function(e){function t(t){if(null==t)throw new Error("Argument must be set");switch(t.toLowerCase()){case"trace":return e.Trace;case"debug":return e.Debug;case"info":return e.Info;case"warn":return e.Warn;case"error":return e.Error;case"fatal":return e.Fatal;default:throw new Error("Unsupported value for conversion: "+t)}}e.fromString=t}(t.LogLevel||(t.LogLevel={}));!function(e){e[e.Console=0]="Console",e[e.MessageBuffer=1]="MessageBuffer",e[e.Custom=2]="Custom"}(t.LoggerType||(t.LoggerType={}));var n;!function(e){e[e.Default=0]="Default",e[e.YearMonthDayTime=1]="YearMonthDayTime",e[e.YearDayMonthWithFullTime=2]="YearDayMonthWithFullTime",e[e.YearDayMonthTime=3]="YearDayMonthTime"}(n=t.DateFormatEnum||(t.DateFormatEnum={})),function(e){function t(t){if(null==t)throw new Error("Argument must be set");switch(t.toLowerCase()){case"default":return e.Default;case"yearmonthdayTime":return e.YearMonthDayTime;case"yeardaymonthwithfulltime":return e.YearDayMonthWithFullTime;case"yeardaymonthtime":return e.YearDayMonthTime;default:throw new Error("Unsupported value for conversion: "+t)}}e.fromString=t}(n=t.DateFormatEnum||(t.DateFormatEnum={}));var o=function(){function e(e,t){void 0===e&&(e=n.Default),void 0===t&&(t="-"),this._formatEnum=e,this._dateSeparator=t}return Object.defineProperty(e.prototype,"formatEnum",{get:function(){return this._formatEnum},set:function(e){this._formatEnum=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateSeparator",{get:function(){return this._dateSeparator},set:function(e){this._dateSeparator=e},enumerable:!0,configurable:!0}),e.prototype.copy=function(){return new e(this._formatEnum,this._dateSeparator)},e}();t.DateFormat=o;var i=function(){function e(e,t,r){void 0===e&&(e=new o),void 0===t&&(t=!0),void 0===r&&(r=!0),this._showTimeStamp=!0,this._showLoggerName=!0,this._dateFormat=e,this._showTimeStamp=t,this._showLoggerName=r}return Object.defineProperty(e.prototype,"dateFormat",{get:function(){return this._dateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTimeStamp",{get:function(){return this._showTimeStamp},set:function(e){this._showTimeStamp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showLoggerName",{get:function(){return this._showLoggerName},set:function(e){this._showLoggerName=e},enumerable:!0,configurable:!0}),e}();t.LogFormat=i;var a=function(){function e(e,t,r){void 0===e&&(e=new o),void 0===t&&(t=!0),void 0===r&&(r=!0),this._dateFormat=e,this._showTimeStamp=t,this._showCategoryName=r}return Object.defineProperty(e.prototype,"dateFormat",{get:function(){return this._dateFormat},set:function(e){this._dateFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTimeStamp",{get:function(){return this._showTimeStamp},set:function(e){this._showTimeStamp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showCategoryName",{get:function(){return this._showCategoryName},set:function(e){this._showCategoryName=e},enumerable:!0,configurable:!0}),e.prototype.copy=function(){return new e(this._dateFormat.copy(),this._showTimeStamp,this._showCategoryName)},e}();t.CategoryLogFormat=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._previous=null,this._next=null,this._value=e}return Object.defineProperty(e.prototype,"previous",{get:function(){return this._previous},set:function(e){this._previous=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"next",{get:function(){return this._next},set:function(e){this._next=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}(),o=function(){function e(){this.head=null,this.size=0}return e.prototype.addHead=function(e){if(!this.createHeadIfNeeded(e)){if(null==this.head)throw new Error("This should never happen, list implementation broken");var t=this.head.next,r=new n(e);null!=t&&(t.previous=r,r.next=t),this.head=r}this.size++},e.prototype.addTail=function(e){if(!this.createHeadIfNeeded(e)){var t=this.getTailNode();if(null==t)throw new Error("List implementation broken");var r=new n(e);t.next=r,r.previous=t}this.size++},e.prototype.clear=function(){this.head=null,this.size=0},e.prototype.getHead=function(){return null!=this.head?this.head.value:null},e.prototype.removeHead=function(){if(null!=this.head){var e=this.head,t=e.value;return this.head=e.next,this.size--,t}return null},e.prototype.getTail=function(){var e=this.getTailNode();return null!=e?e.value:null},e.prototype.removeTail=function(){var e=this.getTailNode();if(null!=e){if(e===this.head)this.head=null;else{var t=e.previous;if(null==t)throw new Error("List implementation is broken");t.next=null}return this.size--,e.value}return null},e.prototype.getSize=function(){return this.size},e.prototype.filter=function(e){var t=function(e,r,n){e(r.value)&&n.push(r.value);var o=r.next;null!=o&&t(e,o,n)},r=[],n=this.head;return null!=n&&t(e,n,r),r},e.prototype.createHeadIfNeeded=function(e){return null==this.head&&(this.head=new n(e),!0)},e.prototype.getTailNode=function(){if(null==this.head)return null;for(var e=this.head;null!=e.next;)e=e.next;return e},e}();t.LinkedList=o;var i=function(){function e(){this.array={}}return e.prototype.put=function(e,t){this.array[e]=t},e.prototype.get=function(e){return this.array[e]},e.prototype.exists=function(e){return void 0!==this.array[e]},e.prototype.remove=function(e){var t=this.array[e];return void 0!==t&&delete this.array[e],t},e.prototype.keys=function(){var e=[];for(var t in this.array)this.array.hasOwnProperty(t)&&e.push(t);return e},e.prototype.values=function(){var e=[];for(var t in this.array)this.array.hasOwnProperty(t)&&e.push(this.get(t));return e},e.prototype.size=function(){return this.keys().length},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.clear=function(){this.array={}},e.prototype.forEach=function(e){var t=0;for(var r in this.array)if(this.array.hasOwnProperty(r)){var n=this.array[r];e(r,n,t),t++}},e.prototype.forEachValue=function(e){var t=0;for(var r in this.array)if(this.array.hasOwnProperty(r)){var n=this.array[r];e(n,t),t++}},e}();t.SimpleMap=i;var a=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e},enumerable:!0,configurable:!0}),e}();t.TuplePair=a;var s=function(){function e(){this.data=[]}return e.prototype.append=function(e){if(void 0===e||null==e)throw new Error("String must be set, cannot append null or undefined");return this.data.push(e),this},e.prototype.appendLine=function(e){return this.data.push(e+"\n"),this},e.prototype.isEmpty=function(){return 0===this.data.length},e.prototype.clear=function(){this.data=[]},e.prototype.toString=function(e){return void 0===e&&(e=""),this.data.join(e)},e}();t.StringBuilder=s},function(e,t){function r(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function n(e){var t=e.match(m);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function i(e){var r=e,i=n(e);if(i){if(!i.path)return e;r=i.path}for(var a,s=t.isAbsolute(r),u=r.split(/\/+/),l=0,g=u.length-1;g>=0;g--)a=u[g],"."===a?u.splice(g,1):".."===a?l++:l>0&&(""===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return r=u.join("/"),""===r&&(r=s?"/":"."),i?(i.path=r,o(i)):r}function a(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),o(r);if(r||t.match(y))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var s="/"===t.charAt(0)?t:i(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,o(a)):s}function s(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function u(e){return e}function l(e){return c(e)?"$"+e:e}function g(e){return c(e)?e.slice(1):e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function f(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function h(e,t){return e===t?0:e>t?1:-1}function d(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=h(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:h(e.name,t.name))}t.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,y=/^data:.+\,.+$/;t.urlParse=n,t.urlGenerate=o,t.normalize=i,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},t.relative=s;var v=function(){return!("__proto__"in Object.create(null))}();t.toSetString=v?u:l,t.fromSetString=v?u:g,t.compareByOriginalPositions=p,t.compareByGeneratedPositionsDeflated=f,t.compareByGeneratedPositionsInflated=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7),o=r(0),i=r(6),a=function(){function e(){}return e.register=function(){if(!e.registered){var t=function(t){var r=t.data;null!==r&&e.processMessageFromExtension(r)};"undefined"!=typeof window&&void 0!==window.removeEventListener&&void 0!==window.addEventListener&&(window.removeEventListener("message",t),window.addEventListener("message",t),e.registered=!0)}},e.processMessageFromExtension=function(t){if(e.registered&&"tsl-extension"===t.from){var r=t.data;switch(r.type){case"register":e.enableExtensionIntegration();break;case"request-change-loglevel":var n=r.value,o=e.applyLogLevel(n.categoryId,n.logLevel,n.recursive);o.length>0&&e.sendCategoriesRuntimeUpdateMessage(o);break;default:console.log("Unknown command to process message from extension, command was: "+r.type)}}},e.sendCategoryLogMessage=function(t){if(e.registered){var r=t.categories.map(function(e){return e.id}),n={type:"log-message",value:{categories:r,errorAsStack:t.errorAsStack,formattedMessage:i.MessageFormatUtils.renderDefaultMessage(t,!1),logLevel:o.LogLevel[t.level].toString(),message:t.messageAsString,resolvedErrorMessage:t.isResolvedErrorMessage}},a={data:n,from:"tsl-logging"};e.sendMessage(a)}},e.sendCategoriesRuntimeUpdateMessage=function(t){if(e.registered){var r=n.CategoryServiceImpl.getInstance(),i={categories:Array()};t.forEach(function(e){var t=r.getCategorySettings(e);null!=t&&i.categories.push({id:e.id,logLevel:o.LogLevel[t.logLevel].toString()})});var a={type:"categories-rt-update",value:i},s={data:a,from:"tsl-logging"};e.sendMessage(s)}},e.sendRootCategoriesToExtension=function(){if(e.registered){var t=n.CategoryServiceImpl.getInstance().getRootCategories().map(function(t){return e.getCategoryAsJSON(t)}),r={type:"root-categories-tree",value:t},o={data:r,from:"tsl-logging"};e.sendMessage(o)}},e.getCategoryAsJSON=function(t){return{children:t.children.map(function(t){return e.getCategoryAsJSON(t)}),id:t.id,logLevel:o.LogLevel[t.logLevel].toString(),name:t.name,parentId:null!=t.parent?t.parent.id:null}},e.applyLogLevel=function(t,r,i){var a=[],s=n.CategoryServiceImpl.getInstance().getCategoryById(t);return null!=s?e._applyLogLevelRecursive(s,o.LogLevel.fromString(r),i,a):console.log("Could not change log level, failed to find category with id: "+t),a},e._applyLogLevelRecursive=function(t,r,o,i){var a=n.CategoryServiceImpl.getInstance().getCategorySettings(t);null!=a&&(a.logLevel=r,i.push(t),o&&t.children.forEach(function(t){e._applyLogLevelRecursive(t,r,o,i)}))},e.getAllCategories=function(){var e=[],t=function(e,r){r.push(e),e.children.forEach(function(e){t(e,r)})};return n.CategoryServiceImpl.getInstance().getRootCategories().forEach(function(r){t(r,e)}),e},e.sendMessage=function(t){e.registered&&"undefined"!=typeof window&&void 0!==window.postMessage&&window.postMessage(t,"*")},e.enableExtensionIntegration=function(){if(e.registered){n.CategoryServiceImpl.getInstance().enableExtensionIntegration(),e.sendRootCategoriesToExtension();var t=e.getAllCategories();e.sendCategoriesRuntimeUpdateMessage(t)}},e.registered=!1,e}();t.ExtensionHelper=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(6),i=r(0),a=function(){function e(e,t,r,n,o,i,a){this._resolvedErrorMessage=!1,this._errorAsStack=null,this._message=e,this._error=t,this._categories=r,this._date=n,this._level=o,this._logFormat=i,this._ready=a}return Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return this._error},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"categories",{get:function(){return this._categories},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"date",{get:function(){return this._date},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this._level},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logFormat",{get:function(){return this._logFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMessageLogData",{get:function(){return"string"!=typeof this._message},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messageAsString",{get:function(){return"string"==typeof this._message?this._message:this._message.msg},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logData",{get:function(){var e=null;return"string"!=typeof this._message&&(e=this.message),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResolvedErrorMessage",{get:function(){return this._resolvedErrorMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorAsStack",{get:function(){return this._errorAsStack},set:function(e){this._errorAsStack=e},enumerable:!0,configurable:!0}),e.prototype.isReady=function(){return this._ready},e.prototype.setReady=function(e){this._ready=e},Object.defineProperty(e.prototype,"resolvedErrorMessage",{get:function(){return this._resolvedErrorMessage},set:function(e){this._resolvedErrorMessage=e},enumerable:!0,configurable:!0}),e}(),s=function(){function e(e,t){this.allMessages=new n.LinkedList,this.rootCategory=e,this.runtimeSettings=t}return e.prototype.trace=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this._log.apply(this,[i.LogLevel.Trace,e,null,!1].concat(t))},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this._log.apply(this,[i.LogLevel.Debug,e,null,!1].concat(t))},e.prototype.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this._log.apply(this,[i.LogLevel.Info,e,null,!1].concat(t))},e.prototype.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this._log.apply(this,[i.LogLevel.Warn,e,null,!1].concat(t))},e.prototype.error=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this._log.apply(this,[i.LogLevel.Error,e,t,!1].concat(r))},e.prototype.fatal=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this._log.apply(this,[i.LogLevel.Fatal,e,t,!1].concat(r))},e.prototype.resolved=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this._log.apply(this,[i.LogLevel.Error,e,t,!0].concat(r))},e.prototype.log=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];this._log.apply(this,[e,t,r,!1].concat(n))},e.prototype.getRootCategory=function(){return this.rootCategory},e.prototype.createDefaultLogMessage=function(e){return o.MessageFormatUtils.renderDefaultMessage(e,!0)},e.prototype._getMessageFormatter=function(){var e=this.runtimeSettings.getCategorySettings(this.rootCategory);if(null===e)throw new Error("Did not find CategorySettings for rootCategory: "+this.rootCategory.name);return e.formatterLogMessage},e.prototype._log=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=!1);for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var a=function(){return"function"==typeof t?t():t},s=function(){return"function"==typeof r?r():r};this._logInternal.apply(this,[e,a,s,n].concat(o))},e.prototype._logInternal=function(e,t,r,n){for(var i=this,s=[],u=4;u<arguments.length;u++)s[u-4]=arguments[u];var l=[this.rootCategory];void 0!==s&&s.length>0&&(l=l.concat(s.filter(function(e){return e!==i.rootCategory})));for(var g=this,c=0;c<l.length;c++){if("break"===function(s){var u=l[s];if(null===u)throw new Error("Cannot have a null element within categories, at index="+s);var c=g.runtimeSettings.getCategorySettings(u);if(null===c)throw new Error("Category with path: "+u.getCategoryPath()+" is not registered with this logger, maybe you registered it with a different root logger?");if(c.logLevel<=e){var p=null!==r?r():null;if(null===p){var f=new a(t(),p,l,new Date,e,c.logFormat,!0);f.resolvedErrorMessage=n,g.allMessages.addTail(f),g.processMessages()}else{var h=new a(t(),p,l,new Date,e,c.logFormat,!1);h.resolvedErrorMessage=n,g.allMessages.addTail(h),o.MessageFormatUtils.renderError(p).then(function(e){h.errorAsStack=e,h.setReady(!0),i.processMessages()}).catch(function(){h.errorAsStack="<UNKNOWN> unable to get stack.",h.setReady(!0),i.processMessages()})}return"break"}}(c))break}},e.prototype.processMessages=function(){var e=this.allMessages;if(e.getSize()>0)do{var t=e.getHead();if(null!=t){if(!t.isReady())break;e.removeHead(),this.doLog(t)}}while(e.getSize()>0)},e}();t.AbstractCategoryLogger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1),i=r(6),a=function(){function e(e,t,r,n,o,i,a,s){this._errorAsStack=null,this._error=null,this._loggerName=e,this._message=t,this._errorAsStack=r,this._error=n,this._logGroupRule=o,this._date=i,this._level=a,this._ready=s}return Object.defineProperty(e.prototype,"loggerName",{get:function(){return this._loggerName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},set:function(e){this._message=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorAsStack",{get:function(){return this._errorAsStack},set:function(e){this._errorAsStack=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return this._error},set:function(e){this._error=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logGroupRule",{get:function(){return this._logGroupRule},set:function(e){this._logGroupRule=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"date",{get:function(){return this._date},set:function(e){this._date=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this._level},set:function(e){this._level=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMessageLogData",{get:function(){return"string"!=typeof this._message},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._ready},set:function(e){this._ready=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messageAsString",{get:function(){return"string"==typeof this._message?this._message:this._message.msg},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logData",{get:function(){var e=null;return"string"!=typeof this._message&&(e=this.message),e},enumerable:!0,configurable:!0}),e}(),s=function(){function e(e,t){this._allMessages=new o.LinkedList,this._open=!0,this._name=e,this._logGroupRuntimeSettings=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.trace=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Trace,e,t)},e.prototype.debug=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Debug,e,t)},e.prototype.info=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Info,e,t)},e.prototype.warn=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Warn,e,t)},e.prototype.error=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Error,e,t)},e.prototype.fatal=function(e,t){void 0===t&&(t=null),this._log(n.LogLevel.Fatal,e,t)},e.prototype.isTraceEnabled=function(){return this._logGroupRuntimeSettings.level===n.LogLevel.Trace},e.prototype.isDebugEnabled=function(){return this._logGroupRuntimeSettings.level<=n.LogLevel.Debug},e.prototype.isInfoEnabled=function(){return this._logGroupRuntimeSettings.level<=n.LogLevel.Info},e.prototype.isWarnEnabled=function(){return this._logGroupRuntimeSettings.level<=n.LogLevel.Warn},e.prototype.isErrorEnabled=function(){return this._logGroupRuntimeSettings.level<=n.LogLevel.Error},e.prototype.isFatalEnabled=function(){return this._logGroupRuntimeSettings.level<=n.LogLevel.Fatal},e.prototype.getLogLevel=function(){return this._logGroupRuntimeSettings.level},e.prototype.isOpen=function(){return this._open},e.prototype.close=function(){this._open=!1,this._allMessages.clear()},e.prototype.createDefaultLogMessage=function(e){return i.MessageFormatUtils.renderDefaultLog4jMessage(e,!0)},e.prototype._getMessageFormatter=function(){return this._logGroupRuntimeSettings.formatterLogMessage},e.prototype._log=function(e,t,r){if(void 0===r&&(r=null),this._open&&this._logGroupRuntimeSettings.level<=e){var n=function(){return"function"==typeof t?t():t},o=function(){return"function"==typeof r?r():r};this._allMessages.addTail(this.createMessage(e,n,o,new Date)),this.processMessages()}},e.prototype.createMessage=function(e,t,r,n){var o=this,s=r();if(null!==s){var u=new a(this._name,t(),null,s,this._logGroupRuntimeSettings.logGroupRule,n,e,!1);return i.MessageFormatUtils.renderError(s).then(function(e){u.errorAsStack=e,u.ready=!0,o.processMessages()}).catch(function(){u.errorAsStack="<UNKNOWN> unable to get stack.",u.ready=!0,o.processMessages()}),u}return new a(this._name,t(),null,s,this._logGroupRuntimeSettings.logGroupRule,n,e,!0)},e.prototype.processMessages=function(){var e=this._allMessages;if(e.getSize()>0)do{var t=e.getHead();if(null!=t){if(!t.ready)break;e.removeHead(),null!==t.message&&this.doLog(t)}}while(e.getSize()>0)},e}();t.AbstractLogger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(42),o=r(0),i=function(){function e(){}return e.renderDate=function(e,t){var r=function(e,t,r){var n=t-e.length;if(n>0){for(var o="",i=0;i<n;i++)o+=r;return o+=e}return e},n=function(e){return r(e.getFullYear().toString(),4,"0")},i=function(e){return r((e.getMonth()+1).toString(),2,"0")},a=function(e){return r(e.getDate().toString(),2,"0")},s=function(e){return r(e.getHours().toString(),2,"0")},u=function(e){return r(e.getMinutes().toString(),2,"0")},l=function(e){return r(e.getSeconds().toString(),2,"0")},g=function(e){return r(e.getMilliseconds().toString(),3,"0")},c=t.dateSeparator,p="";switch(t.formatEnum){case o.DateFormatEnum.Default:p=n(e)+c+i(e)+c+a(e)+" "+s(e)+":"+u(e)+":"+l(e)+","+g(e);break;case o.DateFormatEnum.YearMonthDayTime:p=n(e)+c+i(e)+c+a(e)+" "+s(e)+":"+u(e)+":"+l(e);break;case o.DateFormatEnum.YearDayMonthWithFullTime:p=n(e)+c+a(e)+c+i(e)+" "+s(e)+":"+u(e)+":"+l(e)+","+g(e);break;case o.DateFormatEnum.YearDayMonthTime:p=n(e)+c+a(e)+c+i(e)+" "+s(e)+":"+u(e)+":"+l(e);break;default:throw new Error("Unsupported date format enum: "+t.formatEnum)}return p},e.renderDefaultMessage=function(t,r){var n="",i=t.logFormat;i.showTimeStamp&&(n+=e.renderDate(t.date,i.dateFormat)+" "),n+=o.LogLevel[t.level].toUpperCase(),t.isResolvedErrorMessage&&(n+=" (resolved)"),n+=" ",i.showCategoryName&&(n+="[",t.categories.forEach(function(e,t){t>0&&(n+=", "),n+=e.name}),n+="]");var a="",s="",u=t.message;if("string"==typeof u)a=u;else{var l=u;a=l.msg,l.data&&(s=" [data]: "+(l.ds?l.ds(l.data):JSON.stringify(l.data)))}return n+=" "+a+s,r&&null!==t.errorAsStack&&(n+="\n"+t.errorAsStack),n},e.renderDefaultLog4jMessage=function(t,r){var n=t.logGroupRule.logFormat,i="";n.showTimeStamp&&(i+=e.renderDate(t.date,n.dateFormat)+" "),i+=o.LogLevel[t.level].toUpperCase()+" ",n.showLoggerName&&(i+="["+t.loggerName+"]");var a="",s="";if("string"==typeof t.message)a=t.message;else{var u=t.message;a=u.msg,u.data&&(s=" [data]: "+(u.ds?u.ds(u.data):JSON.stringify(u.data)))}return i+=" "+a+s,r&&null!==t.errorAsStack&&(i+="\n"+t.errorAsStack),i},e.renderError=function(e){var t=e.name+": "+e.message+"\n@";return new Promise(function(r){n.fromError(e,{offline:!0}).then(function(e){var n=e.map(function(e){return e.toString()}).join("\n ");t+="\n"+n,r(t)}).catch(function(){t="Unexpected error object was passed in. ";try{t+="Could not resolve it, stringified object: "+JSON.stringify(e)}catch(e){t+="Could not resolve it or stringify it."}r(t)})})},e}();t.MessageFormatUtils=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0),i=r(9),a=r(10),s=r(27),u=r(11),l=r(3),g=r(12),c=r(8),p=function(){function e(){this._defaultConfig=new c.CategoryConfiguration,this._mapState=new n.SimpleMap,l.ExtensionHelper.register()}return e.getInstance=function(){return null===e._INSTANCE&&(e._INSTANCE=new e),e._INSTANCE},e.prototype.getLogger=function(e){return this.createOrGetCategoryState(e).logger},e.prototype.clear=function(){this._mapState.clear(),this.setDefaultConfiguration(new c.CategoryConfiguration)},e.prototype.getCategorySettings=function(e){return this.createOrGetCategoryState(e).currentRuntimeSettings},e.prototype.getOriginalCategorySettings=function(e){return this.createOrGetCategoryState(e).originalRuntimeSettings},e.prototype.setDefaultConfiguration=function(e,t){void 0===t&&(t=!0),this._defaultConfig=e,t&&this._mapState.forEachValue(function(t){t.updateSettings(e)})},e.prototype.setConfigurationCategory=function(e,t,r){var n=this;void 0===r&&(r=!1),this.createOrGetCategoryState(t).updateSettings(e),r&&t.children.forEach(function(t){n.setConfigurationCategory(e,t,r)})},e.prototype.registerCategory=function(t){if(null===t||void 0===t)throw new Error("Category CANNOT be null/undefined");if(this._mapState.exists(e.getCategoryKey(t)))throw new Error("Cannot add this root category with name: "+t.name+", it already exists (same name in hierarchy).");this.createOrGetCategoryState(t)},e.prototype.enableExtensionIntegration=function(){var e=this;this._mapState.forEachValue(function(t){return t.enableForExtension(e)})},e.prototype.getRootCategories=function(){return this._mapState.values().filter(function(e){return null==e.category.parent}).map(function(e){return e.category})},e.prototype.getCategoryById=function(e){var t=this._mapState.values().filter(function(t){return t.category.id===e}).map(function(e){return e.category});return 1===t.length?t[0]:null},e.prototype.createOrGetCategoryState=function(t){var r=e.getCategoryKey(t),n=this._mapState.get(r);if(void 0!==n)return n;var o=this.createState(t);return this._mapState.put(r,o),o},e.prototype.createState=function(e){var t=this;return new f(e,function(){return t._defaultConfig},function(e,r){return t.createLogger(e,r)})},e.prototype.createLogger=function(e,t){switch(e.loggerType){case o.LoggerType.Console:return new i.CategoryConsoleLoggerImpl(t,this);case o.LoggerType.MessageBuffer:return new u.CategoryMessageBufferLoggerImpl(t,this);case o.LoggerType.Custom:if(null===e.callBackLogger)throw new Error("Cannot create custom logger, custom callback is null");return e.callBackLogger(t,this);default:throw new Error("Cannot create a Logger for LoggerType: "+e.loggerType)}},e.getCategoryKey=function(e){return e.getCategoryPath()},e._INSTANCE=null,e}();t.CategoryServiceImpl=p;var f=function(){function e(e,t,r){this._category=e,this._lazyState=new h(e,t,r)}return Object.defineProperty(e.prototype,"category",{get:function(){return this._category},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this._lazyState.getLogger()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalRuntimeSettings",{get:function(){return this._lazyState.getOriginalRuntimeSettings()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentRuntimeSettings",{get:function(){return this._lazyState.getCurrentRuntimeSettings()},enumerable:!0,configurable:!0}),e.prototype.enableForExtension=function(e){this._lazyState.enableForExtension(e)},e.prototype.updateSettings=function(e){this._lazyState.updateSettings(e)},e}(),h=function(){function e(e,t,r){this._category=e,this._defaultConfig=t,this._createLogger=r}return e.prototype.isLoaded=function(){return void 0!==this._logger},e.prototype.getLogger=function(){return this.loadLoggerOnDemand(),this._delegateLogger},e.prototype.getOriginalRuntimeSettings=function(){return this.loadLoggerOnDemand(),this._originalRuntimeSettings},e.prototype.getCurrentRuntimeSettings=function(){return this.loadLoggerOnDemand(),this._currentRuntimeSettings},e.prototype.enableForExtension=function(e){this.loadLoggerOnDemand(),this._wrappedLogger instanceof s.CategoryExtensionLoggerImpl||(console.log("Reconfiguring logger for extension for category: "+this._category.name),this._wrappedLogger=new s.CategoryExtensionLoggerImpl(this._category,e),this._delegateLogger.delegate=this._wrappedLogger)},e.prototype.updateSettings=function(e){this.isLoaded()?(this._currentRuntimeSettings.logLevel=e.logLevel,this._currentRuntimeSettings.loggerType=e.loggerType,this._currentRuntimeSettings.logFormat=e.logFormat,this._currentRuntimeSettings.callBackLogger=e.callBackLogger,this._currentRuntimeSettings.formatterLogMessage=e.formatterLogMessage,this._logger=this._createLogger(e,this._category),this._wrappedLogger instanceof s.CategoryExtensionLoggerImpl||(this._wrappedLogger=this._logger),this._delegateLogger.delegate=this._wrappedLogger):this._defaultConfig=function(){return e}},e.prototype.loadLoggerOnDemand=function(){this.isLoaded()||(this._logger=this._createLogger(this._defaultConfig(),this._category),this._wrappedLogger=this._logger,this._delegateLogger=new a.CategoryDelegateLoggerImpl(this._wrappedLogger),this._originalRuntimeSettings=this.initNewSettings(),this._currentRuntimeSettings=this.initNewSettings())},e.prototype.initNewSettings=function(){var e=this._defaultConfig().copy();return new g.CategoryRuntimeSettings(this._category,e.logLevel,e.loggerType,e.logFormat,e.callBackLogger,e.formatterLogMessage)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(){function e(e,t,r,o){if(void 0===e&&(e=n.LogLevel.Error),void 0===t&&(t=n.LoggerType.Console),void 0===r&&(r=new n.CategoryLogFormat),void 0===o&&(o=null),this._formatterLogMessage=null,this._logLevel=e,this._loggerType=t,this._logFormat=r,this._callBackLogger=o,this._loggerType===n.LoggerType.Custom&&null===this.callBackLogger)throw new Error("If you specify loggerType to be Custom, you must provide the callBackLogger argument")}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loggerType",{get:function(){return this._loggerType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logFormat",{get:function(){return this._logFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callBackLogger",{get:function(){return this._callBackLogger},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formatterLogMessage",{get:function(){return this._formatterLogMessage},set:function(e){if(null!==e&&this._loggerType===n.LoggerType.Custom)throw new Error("You cannot specify a formatter for log messages if your loggerType is Custom");this._formatterLogMessage=e},enumerable:!0,configurable:!0}),e.prototype.copy=function(){var t=new e(this.logLevel,this.loggerType,this.logFormat.copy(),this.callBackLogger);return t.formatterLogMessage=this.formatterLogMessage,t},e}();t.CategoryConfiguration=o},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(4),a=function(e){function t(t,r){return e.call(this,t,r)||this}return n(t,e),t.prototype.doLog=function(e){if(void 0===console)throw new Error("Console is not defined, cannot log msg: "+e.messageAsString);var t=this._getMessageFormatter(),r=void 0;r=null===t?this.createDefaultLogMessage(e):t(e);var n=!1;switch(e.level){case o.LogLevel.Trace:case o.LogLevel.Debug:break;case o.LogLevel.Info:console.info&&(console.info(r),n=!0);break;case o.LogLevel.Warn:console.warn&&(console.warn(r),n=!0);break;case o.LogLevel.Error:case o.LogLevel.Fatal:console.error&&(console.error(r),n=!0);break;default:throw new Error("Unsupported level: "+e.level)}n||console.log(r)},t}(i.AbstractCategoryLogger);t.CategoryConsoleLoggerImpl=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._delegate=e}return Object.defineProperty(e.prototype,"delegate",{get:function(){return this._delegate},set:function(e){this._delegate=e},enumerable:!0,configurable:!0}),e.prototype.trace=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];(n=this._delegate).trace.apply(n,[e].concat(t));var n},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];(n=this._delegate).debug.apply(n,[e].concat(t));var n},e.prototype.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];(n=this._delegate).info.apply(n,[e].concat(t));var n},e.prototype.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];(n=this._delegate).warn.apply(n,[e].concat(t));var n},e.prototype.error=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];(o=this._delegate).error.apply(o,[e,t].concat(r));var o},e.prototype.fatal=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];(o=this._delegate).fatal.apply(o,[e,t].concat(r));var o},e.prototype.resolved=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];(o=this._delegate).resolved.apply(o,[e,t].concat(r));var o},e.prototype.log=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];(i=this._delegate).log.apply(i,[e,t,r].concat(n));var i},e}();t.CategoryDelegateLoggerImpl=n},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messages=[],t}return n(t,e),t.prototype.getMessages=function(){return this.messages},t.prototype.toString=function(){return this.messages.map(function(e){return e}).join("\n")},t.prototype.doLog=function(e){var t,r=this._getMessageFormatter();t=null===r?this.createDefaultLogMessage(e):r(e),this.messages.push(t)},t}(o.AbstractCategoryLogger);t.CategoryMessageBufferLoggerImpl=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(){function e(e,t,r,o,i,a){void 0===t&&(t=n.LogLevel.Error),void 0===r&&(r=n.LoggerType.Console),void 0===o&&(o=new n.CategoryLogFormat),void 0===i&&(i=null),void 0===a&&(a=null),this._formatterLogMessage=null,this._category=e,this._logLevel=t,this._loggerType=r,this._logFormat=o,this._callBackLogger=i,this._formatterLogMessage=a}return Object.defineProperty(e.prototype,"category",{get:function(){return this._category},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loggerType",{get:function(){return this._loggerType},set:function(e){this._loggerType=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logFormat",{get:function(){return this._logFormat},set:function(e){this._logFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callBackLogger",{get:function(){return this._callBackLogger},set:function(e){this._callBackLogger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formatterLogMessage",{get:function(){return this._formatterLogMessage},set:function(e){this._formatterLogMessage=e},enumerable:!0,configurable:!0}),e}();t.CategoryRuntimeSettings=o},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=r(0),a=function(e){function t(t,r){return e.call(this,t,r)||this}return n(t,e),t.prototype.doLog=function(e){if(void 0===console)throw new Error("Console is not defined, cannot log msg: "+e.message);var t=!1,r=e.level,n=this._getMessageFormatter(),o=void 0;switch(o=null===n?this.createDefaultLogMessage(e):n(e),r){case i.LogLevel.Trace:case i.LogLevel.Debug:break;case i.LogLevel.Info:console.info&&(console.info(o),t=!0);break;case i.LogLevel.Warn:console.warn&&(console.warn(o),t=!0);break;case i.LogLevel.Error:case i.LogLevel.Fatal:console.error&&(console.error(o),t=!0);break;default:throw new Error("Log level not supported: "+r)}t||console.log(o)},t}(o.AbstractLogger);t.ConsoleLoggerImpl=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0),i=r(29),a=r(3),s=r(15),u=r(16),l=function(){function e(){this._nameCounter=1,this._mapFactories=new n.SimpleMap,a.ExtensionHelper.register()}return e.getInstance=function(){return null===e._INSTANCE&&(e._INSTANCE=new e),e._INSTANCE},e.prototype.createLoggerFactory=function(e){void 0===e&&(e=null);var t="LoggerFactory"+this._nameCounter++;return this.createNamedLoggerFactory(t,e)},e.prototype.createNamedLoggerFactory=function(t,r){if(void 0===r&&(r=null),this._mapFactories.exists(t))throw new Error("LoggerFactory with name "+t+" already exists.");var n;return n=null!==r?new i.LoggerFactoryImpl(t,r):new i.LoggerFactoryImpl(t,e.createDefaultOptions()),this._mapFactories.put(t,n),n},e.prototype.closeLoggers=function(){this._mapFactories.values().forEach(function(e){e.closeLoggers()}),this._mapFactories.clear(),this._nameCounter=1},e.prototype.getRuntimeSettingsForLoggerFactories=function(){var e=[];return this._mapFactories.forEachValue(function(t){return e.push(t)}),e},e.prototype.getLogGroupSettings=function(e,t){var r=this._mapFactories.get(e);return void 0===r?null:r.getLogGroupRuntimeSettingsByIndex(t)},e.prototype.getLoggerFactoryRuntimeSettingsByName=function(e){var t=this._mapFactories.get(e);return void 0===t?null:t},e.createDefaultOptions=function(){return(new u.LoggerFactoryOptions).addLogGroupRule(new s.LogGroupRule(new RegExp(".+"),o.LogLevel.Info))},e._INSTANCE=null,e}(),g=function(){function e(){}return e.createLoggerFactory=function(t){return void 0===t&&(t=null),e.INSTANCE_SERVICE.createLoggerFactory(t)},e.createNamedLoggerFactory=function(t,r){if(void 0===r&&(r=null),t===e.DEFAULT_LOGGER_FACTORY_NAME)throw new Error("LoggerFactory name: "+e.DEFAULT_LOGGER_FACTORY_NAME+" is reserved and cannot be used.");return e.INSTANCE_SERVICE.createNamedLoggerFactory(t,r)},e.closeLoggers=function(){return e.INSTANCE_SERVICE.closeLoggers()},e.getRuntimeSettings=function(){return e.INSTANCE_SERVICE},Object.defineProperty(e,"DEFAULT",{get:function(){return e.getDefault()},enumerable:!0,configurable:!0}),e.getDefault=function(){return null===e.DEFAULT_LOGGER_FACTORY&&(e.DEFAULT_LOGGER_FACTORY=e.DEFAULT_LOGGER_FACTORY=e.INSTANCE_SERVICE.createNamedLoggerFactory(e.DEFAULT_LOGGER_FACTORY_NAME,(new u.LoggerFactoryOptions).addLogGroupRule(new s.LogGroupRule(new RegExp(".+"),o.LogLevel.Error)))),e.DEFAULT_LOGGER_FACTORY},e.DEFAULT_LOGGER_FACTORY_NAME="DEFAULT",e.INSTANCE_SERVICE=l.getInstance(),e.DEFAULT_LOGGER_FACTORY=null,e}();t.LFService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(){function e(e,t,r,o,i){void 0===r&&(r=new n.LogFormat),void 0===o&&(o=n.LoggerType.Console),void 0===i&&(i=null),this._formatterLogMessage=null,this._regExp=e,this._level=t,this._logFormat=r,this._loggerType=o,this._callBackLogger=i}return Object.defineProperty(e.prototype,"regExp",{get:function(){return this._regExp},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this._level},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loggerType",{get:function(){return this._loggerType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logFormat",{get:function(){return this._logFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callBackLogger",{get:function(){return this._callBackLogger},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formatterLogMessage",{get:function(){return this._formatterLogMessage},set:function(e){if(null!==e&&this._loggerType===n.LoggerType.Custom)throw new Error("You cannot specify a formatter for log messages if your loggerType is Custom");this._formatterLogMessage=e},enumerable:!0,configurable:!0}),e}();t.LogGroupRule=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._logGroupRules=[],this._enabled=!0}return e.prototype.addLogGroupRule=function(e){return this._logGroupRules.push(e),this},e.prototype.setEnabled=function(e){return this._enabled=e,this},Object.defineProperty(e.prototype,"logGroupRules",{get:function(){return this._logGroupRules},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),e}();t.LoggerFactoryOptions=n},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.messages=[],n}return n(t,e),t.prototype.close=function(){this.messages=[],e.prototype.close.call(this)},t.prototype.getMessages=function(){return this.messages},t.prototype.toString=function(){return this.messages.map(function(e){return e}).join("\n")},t.prototype.doLog=function(e){var t,r=this._getMessageFormatter();t=null===r?this.createDefaultLogMessage(e):r(e),this.messages.push(t)},t}(o.AbstractLogger);t.MessageBufferLoggerImpl=i},function(e,t,r){function n(){this._array=[],this._set=Object.create(null)}var o=r(2),i=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,o=0,i=e.length;o<i;o++)r.add(e[o],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=o.toSetString(e),n=i.call(this._set,r),a=this._array.length;n&&!t||this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=o.toSetString(e);return i.call(this._set,t)},n.prototype.indexOf=function(e){var t=o.toSetString(e);if(i.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},t.ArraySet=n},function(e,t,r){function n(e){return e<0?1+(-e<<1):0+(e<<1)}function o(e){var t=1==(1&e),r=e>>1;return t?-r:r}var i=r(32);t.encode=function(e){var t,r="",o=n(e);do{t=31&o,o>>>=5,o>0&&(t|=32),r+=i.encode(t)}while(o>0);return r},t.decode=function(e,t,r){var n,a,s=e.length,u=0,l=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=i.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),a&=31,u+=a<<l,l+=5}while(n);r.value=o(u),r.rest=t}},function(e,t,r){function n(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new s,this._sourcesContents=null}var o=r(19),i=r(2),a=r(18).ArraySet,s=r(34).MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=i.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),r=i.getArg(e,"original",null),n=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,o),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:o})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var o=this._sourceRoot;null!=o&&(n=i.relative(o,n));var s=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=i.join(r,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||s.has(l)||s.add(l);var g=t.name;null==g||u.has(g)||u.add(g)},this),this._sources=s,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=i.join(r,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,s=1,u=0,l=0,g=0,c=0,p="",f=this._mappings.toArray(),h=0,d=f.length;h<d;h++){if(t=f[h],e="",t.generatedLine!==s)for(a=0;t.generatedLine!==s;)e+=";",s++;else if(h>0){if(!i.compareByGeneratedPositionsInflated(t,f[h-1]))continue;e+=","}e+=o.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=o.encode(n-c),c=n,e+=o.encode(t.originalLine-1-l),l=t.originalLine-1,e+=o.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=o.encode(r-g),g=r)),p+=e}return p},n.prototype._generateSourcesContent=f