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V,EAAS,gBAAiB,GAEzB,EAAS,sBACV,EAAS,qBAAsB,KAE9B,EAAS,gBAAkB,EAAS,eAAiB,KAEtD,EAAS,eAAiB,IAIR,mBAAX,QAAyB,OAAO,IACvC,OAAO,WAAY,GAAI,GACE,oBAAX,QAA0B,OAAO,SAAW,EAAO,SAAW,OAC5E,OAAO,QAAU,EAEjB,EAAO,SAAW,CAnyCtB,CAoBA,SAAS,EAAK,EAAQ,GAClB,OAAO,OAAO,UAAU,eAAe,KAAK,EAAQ,EACxD,CASA,SAAS,EAAa,GAClB,YAAuB,IAAT,CAClB,CAqwCA,CAzyCA,CAyyCoB,oBAAX,OAAyB,OAAS","file":"/npm/tracekit@0.4.6/tracekit.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/tracekit@0.4.6/tracekit.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * https://github.com/csnover/TraceKit\n * @license MIT\n * @namespace TraceKit\n */\n(function(window, undefined) {\nif (!window) {\n    return;\n}\n\nvar TraceKit = {};\nvar _oldTraceKit = window.TraceKit;\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;\n\n/**\n * A better form of hasOwnProperty<br/>\n * Example: `_has(MainHostObject, property) === true/false`\n *\n * @param {Object} object to check property\n * @param {string} key to check\n * @return {Boolean} true if the object has the key and it is not inherited\n */\nfunction _has(object, key) {\n    return Object.prototype.hasOwnProperty.call(object, key);\n}\n\n/**\n * Returns true if the parameter is undefined<br/>\n * Example: `_isUndefined(val) === true/false`\n *\n * @param {*} what Value to check\n * @return {Boolean} true if undefined and false otherwise\n */\nfunction _isUndefined(what) {\n    return typeof what === 'undefined';\n}\n\n/**\n * Export TraceKit out to another variable<br/>\n * Example: `var TK = TraceKit.noConflict()`\n * @return {Object} The TraceKit object\n * @memberof TraceKit\n */\nTraceKit.noConflict = function noConflict() {\n    window.TraceKit = _oldTraceKit;\n    return TraceKit;\n};\n\n/**\n * Wrap any function in a TraceKit reporter<br/>\n * Example: `func = TraceKit.wrap(func);`\n *\n * @param {Function} func Function to be wrapped\n * @return {Function} The wrapped func\n * @memberof TraceKit\n */\nTraceKit.wrap = function traceKitWrapper(func) {\n    function wrapped() {\n        try {\n            return func.apply(this, arguments);\n        } catch (e) {\n            TraceKit.report(e);\n            throw e;\n        }\n    }\n    return wrapped;\n};\n\n/**\n * Cross-browser processing of unhandled exceptions\n *\n * Syntax:\n * ```js\n *   TraceKit.report.subscribe(function(stackInfo) { ... })\n *   TraceKit.report.unsubscribe(function(stackInfo) { ... })\n *   TraceKit.report(exception)\n *   try { ...code... } catch(ex) { TraceKit.report(ex); }\n * ```\n *\n * Supports:\n *   - Firefox: full stack trace with line numbers, plus column number\n *     on top frame; column number is not guaranteed\n *   - Opera: full stack trace with line and column numbers\n *   - Chrome: full stack trace with line and column numbers\n *   - Safari: line and column number for the top frame only; some frames\n *     may be missing, and column number is not guaranteed\n *   - IE: line and column number for the top frame only; some frames\n *     may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n *   - IE5.5+ (only 8.0 tested)\n *   - Firefox 0.9+ (only 3.5+ tested)\n *   - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n *     Exceptions Have Stacktrace to be enabled in opera:config)\n *   - Safari 3+ (only 4+ tested)\n *   - Chrome 1+ (only 5+ tested)\n *   - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a TraceKit.StackTrace object as described in the\n * TraceKit.computeStackTrace docs.\n *\n * @memberof TraceKit\n * @namespace\n */\nTraceKit.report = (function reportModuleWrapper() {\n    var handlers = [],\n        lastException = null,\n        lastExceptionStack = null;\n\n    /**\n     * Add a crash handler.\n     * @param {Function} handler\n     * @memberof TraceKit.report\n     */\n    function subscribe(handler) {\n        installGlobalHandler();\n        installGlobalUnhandledRejectionHandler();\n        handlers.push(handler);\n    }\n\n    /**\n     * Remove a crash handler.\n     * @param {Function} handler\n     * @memberof TraceKit.report\n     */\n    function unsubscribe(handler) {\n        for (var i = handlers.length - 1; i >= 0; --i) {\n            if (handlers[i] === handler) {\n                handlers.splice(i, 1);\n            }\n        }\n\n        if (handlers.length === 0) {\n            uninstallGlobalHandler();\n            uninstallGlobalUnhandledRejectionHandler();\n        }\n    }\n\n    /**\n     * Dispatch stack information to all handlers.\n     * @param {TraceKit.StackTrace} stack\n     * @param {boolean} isWindowError Is this a top-level window error?\n     * @param {Error=} error The error that's being handled (if available, null otherwise)\n     * @memberof TraceKit.report\n     * @throws An exception if an error occurs while calling an handler.\n     */\n    function notifyHandlers(stack, isWindowError, error) {\n        var exception = null;\n        if (isWindowError && !TraceKit.collectWindowErrors) {\n          return;\n        }\n        for (var i in handlers) {\n            if (_has(handlers, i)) {\n                try {\n                    handlers[i](stack, isWindowError, error);\n                } catch (inner) {\n                    exception = inner;\n                }\n            }\n        }\n\n        if (exception) {\n            throw exception;\n        }\n    }\n\n    var _oldOnerrorHandler, _onErrorHandlerInstalled;\n    var _oldOnunhandledrejectionHandler, _onUnhandledRejectionHandlerInstalled;\n\n    /**\n     * Ensures all global unhandled exceptions are recorded.\n     * Supported by Gecko and IE.\n     * @param {string} message Error message.\n     * @param {string} url URL of script that generated the exception.\n     * @param {(number|string)} lineNo The line number at which the error occurred.\n     * @param {(number|string)=} columnNo The column number at which the error occurred.\n     * @param {Error=} errorObj The actual Error object.\n     * @memberof TraceKit.report\n     */\n    function traceKitWindowOnError(message, url, lineNo, columnNo, errorObj) {\n        var stack = null;\n\n        if (lastExceptionStack) {\n            TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message);\n    \t    processLastException();\n        } else if (errorObj) {\n            stack = TraceKit.computeStackTrace(errorObj);\n            notifyHandlers(stack, true, errorObj);\n        } else {\n            var location = {\n              'url': url,\n              'line': lineNo,\n              'column': columnNo\n            };\n\n            var name;\n            var msg = message; // must be new var or will modify original `arguments`\n            if ({}.toString.call(message) === '[object String]') {\n                var groups = message.match(ERROR_TYPES_RE);\n                if (groups) {\n                    name = groups[1];\n                    msg = groups[2];\n                }\n            }\n\n            location.func = TraceKit.computeStackTrace.guessFunctionName(location.url, location.line);\n            location.context = TraceKit.computeStackTrace.gatherContext(location.url, location.line);\n            stack = {\n                'name': name,\n                'message': msg,\n                'mode': 'onerror',\n                'stack': [location]\n            };\n\n            notifyHandlers(stack, true, null);\n        }\n\n        if (_oldOnerrorHandler) {\n            return _oldOnerrorHandler.apply(this, arguments);\n        }\n\n        return false;\n    }\n\n    /**\n     * Ensures all unhandled rejections are recorded.\n     * @param {PromiseRejectionEvent} e event.\n     * @memberof TraceKit.report\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onunhandledrejection\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n     */\n    function traceKitWindowOnUnhandledRejection(e) {\n        var stack = TraceKit.computeStackTrace(e.reason);\n        notifyHandlers(stack, true, e.reason);\n    }\n\n    /**\n     * Install a global onerror handler\n     * @memberof TraceKit.report\n     */\n    function installGlobalHandler() {\n        if (_onErrorHandlerInstalled === true) {\n            return;\n        }\n\n        _oldOnerrorHandler = window.onerror;\n        window.onerror = traceKitWindowOnError;\n        _onErrorHandlerInstalled = true;\n    }\n\n    /**\n     * Uninstall the global onerror handler\n     * @memberof TraceKit.report\n     */\n    function uninstallGlobalHandler() {\n        if (_onErrorHandlerInstalled) {\n            window.onerror = _oldOnerrorHandler;\n            _onErrorHandlerInstalled = false;\n        }\n    }\n\n    /**\n     * Install a global onunhandledrejection handler\n     * @memberof TraceKit.report\n     */\n    function installGlobalUnhandledRejectionHandler() {\n        if (_onUnhandledRejectionHandlerInstalled === true) {\n            return;\n        }\n\n        _oldOnunhandledrejectionHandler = window.onunhandledrejection;\n        window.onunhandledrejection = traceKitWindowOnUnhandledRejection;\n        _onUnhandledRejectionHandlerInstalled = true;\n    }\n\n    /**\n     * Uninstall the global onunhandledrejection handler\n     * @memberof TraceKit.report\n     */\n    function uninstallGlobalUnhandledRejectionHandler() {\n        if (_onUnhandledRejectionHandlerInstalled) {\n            window.onunhandledrejection = _oldOnunhandledrejectionHandler;\n            _onUnhandledRejectionHandlerInstalled = false;\n        }\n    }\n\n    /**\n     * Process the most recent exception\n     * @memberof TraceKit.report\n     */\n    function processLastException() {\n        var _lastExceptionStack = lastExceptionStack,\n            _lastException = lastException;\n        lastExceptionStack = null;\n        lastException = null;\n        notifyHandlers(_lastExceptionStack, false, _lastException);\n    }\n\n    /**\n     * Reports an unhandled Error to TraceKit.\n     * @param {Error} ex\n     * @memberof TraceKit.report\n     * @throws An exception if an incomplete stack trace is detected (old IE browsers).\n     */\n    function report(ex) {\n        if (lastExceptionStack) {\n            if (lastException === ex) {\n                return; // already caught by an inner catch block, ignore\n            } else {\n              processLastException();\n            }\n        }\n\n        var stack = TraceKit.computeStackTrace(ex);\n        lastExceptionStack = stack;\n        lastException = ex;\n\n        // If the stack trace is incomplete, wait for 2 seconds for\n        // slow slow IE to see if onerror occurs or not before reporting\n        // this exception; otherwise, we will end up with an incomplete\n        // stack trace\n        setTimeout(function () {\n            if (lastException === ex) {\n                processLastException();\n            }\n        }, (stack.incomplete ? 2000 : 0));\n\n        throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n    }\n\n    report.subscribe = subscribe;\n    report.unsubscribe = unsubscribe;\n    return report;\n}());\n\n/**\n * An object representing a single stack frame.\n * @typedef {Object} StackFrame\n * @property {string} url The JavaScript or HTML file URL.\n * @property {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * @property {string[]?} args The arguments passed to the function, if known.\n * @property {number=} line The line number, if known.\n * @property {number=} column The column number, if known.\n * @property {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n * @memberof TraceKit\n */\n\n/**\n * An object representing a JavaScript stack trace.\n * @typedef {Object} StackTrace\n * @property {string} name The name of the thrown exception.\n * @property {string} message The exception error message.\n * @property {TraceKit.StackFrame[]} stack An array of stack frames.\n * @property {string} mode 'stack', 'stacktrace', 'multiline', 'callers', 'onerror', or 'failed' -- method used to collect the stack trace.\n * @memberof TraceKit\n */\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n *   ```js\n *   s = TraceKit.computeStackTrace.ofCaller([depth])\n *   s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n *   ```\n *\n * Supports:\n *   - Firefox:  full stack trace with line numbers and unreliable column\n *               number on top frame\n *   - Opera 10: full stack trace with line and column numbers\n *   - Opera 9-: full stack trace with line numbers\n *   - Chrome:   full stack trace with line and column numbers\n *   - Safari:   line and column number for the topmost stacktrace element\n *               only\n *   - IE:       no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n *  * in Safari, some methods may be missing from the stack trace;\n *  * in IE, the topmost function in the stack trace will always be the\n *    caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n * Tracing example:\n *  ```js\n *     function trace(message) {\n *         var stackInfo = TraceKit.computeStackTrace.ofCaller();\n *         var data = message + \"\\n\";\n *         for(var i in stackInfo.stack) {\n *             var item = stackInfo.stack[i];\n *             data += (item.func || '[anonymous]') + \"() in \" + item.url + \":\" + (item.line || '0') + \"\\n\";\n *         }\n *         if (window.console)\n *             console.info(data);\n *         else\n *             alert(data);\n *     }\n * ```\n * @memberof TraceKit\n * @namespace\n */\nTraceKit.computeStackTrace = (function computeStackTraceWrapper() {\n    var debug = false,\n        sourceCache = {};\n\n    /**\n     * Attempts to retrieve source code via XMLHttpRequest, which is used\n     * to look up anonymous function names.\n     * @param {string} url URL of source code.\n     * @return {string} Source contents.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function loadSource(url) {\n        if (!TraceKit.remoteFetching) { //Only attempt request if remoteFetching is on.\n            return '';\n        }\n        try {\n            var getXHR = function() {\n                try {\n                    return new window.XMLHttpRequest();\n                } catch (e) {\n                    // explicitly bubble up the exception if not found\n                    return new window.ActiveXObject('Microsoft.XMLHTTP');\n                }\n            };\n\n            var request = getXHR();\n            request.open('GET', url, false);\n            request.send('');\n            return request.responseText;\n        } catch (e) {\n            return '';\n        }\n    }\n\n    /**\n     * Retrieves source code from the source code cache.\n     * @param {string} url URL of source code.\n     * @return {Array.<string>} Source contents.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function getSource(url) {\n        if (typeof url !== 'string') {\n            return [];\n        }\n\n        if (!_has(sourceCache, url)) {\n            // URL needs to be able to fetched within the acceptable domain.  Otherwise,\n            // cross-domain errors will be triggered.\n            /*\n                Regex matches:\n                0 - Full Url\n                1 - Protocol\n                2 - Domain\n                3 - Port (Useful for internal applications)\n                4 - Path\n            */\n            var source = '';\n            var domain = '';\n            try { domain = window.document.domain; } catch (e) { }\n            var match = /(.*)\\:\\/\\/([^:\\/]+)([:\\d]*)\\/{0,1}([\\s\\S]*)/.exec(url);\n            if (match && match[2] === domain) {\n                source = loadSource(url);\n            }\n            sourceCache[url] = source ? source.split('\\n') : [];\n        }\n\n        return sourceCache[url];\n    }\n\n    /**\n     * Tries to use an externally loaded copy of source code to determine\n     * the name of a function by looking at the name of the variable it was\n     * assigned to, if any.\n     * @param {string} url URL of source code.\n     * @param {(string|number)} lineNo Line number in source code.\n     * @return {string} The function name, if discoverable.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function guessFunctionName(url, lineNo) {\n        var reFunctionArgNames = /function ([^(]*)\\(([^)]*)\\)/,\n            reGuessFunction = /['\"]?([0-9A-Za-z$_]+)['\"]?\\s*[:=]\\s*(function|eval|new Function)/,\n            line = '',\n            maxLines = 10,\n            source = getSource(url),\n            m;\n\n        if (!source.length) {\n            return UNKNOWN_FUNCTION;\n        }\n\n        // Walk backwards from the first line in the function until we find the line which\n        // matches the pattern above, which is the function definition\n        for (var i = 0; i < maxLines; ++i) {\n            line = source[lineNo - i] + line;\n\n            if (!_isUndefined(line)) {\n                if ((m = reGuessFunction.exec(line))) {\n                    return m[1];\n                } else if ((m = reFunctionArgNames.exec(line))) {\n                    return m[1];\n                }\n            }\n        }\n\n        return UNKNOWN_FUNCTION;\n    }\n\n    /**\n     * Retrieves the surrounding lines from where an exception occurred.\n     * @param {string} url URL of source code.\n     * @param {(string|number)} line Line number in source code to center around for context.\n     * @return {?Array.<string>} Lines of source code.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function gatherContext(url, line) {\n        var source = getSource(url);\n\n        if (!source.length) {\n            return null;\n        }\n\n        var context = [],\n            // linesBefore & linesAfter are inclusive with the offending line.\n            // if linesOfContext is even, there will be one extra line\n            //   *before* the offending line.\n            linesBefore = Math.floor(TraceKit.linesOfContext / 2),\n            // Add one extra line if linesOfContext is odd\n            linesAfter = linesBefore + (TraceKit.linesOfContext % 2),\n            start = Math.max(0, line - linesBefore - 1),\n            end = Math.min(source.length, line + linesAfter - 1);\n\n        line -= 1; // convert to 0-based index\n\n        for (var i = start; i < end; ++i) {\n            if (!_isUndefined(source[i])) {\n                context.push(source[i]);\n            }\n        }\n\n        return context.length > 0 ? context : null;\n    }\n\n    /**\n     * Escapes special characters, except for whitespace, in a string to be\n     * used inside a regular expression as a string literal.\n     * @param {string} text The string.\n     * @return {string} The escaped string literal.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function escapeRegExp(text) {\n        return text.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#]/g, '\\\\$&');\n    }\n\n    /**\n     * Escapes special characters in a string to be used inside a regular\n     * expression as a string literal. Also ensures that HTML entities will\n     * be matched the same as their literal friends.\n     * @param {string} body The string.\n     * @return {string} The escaped string.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function escapeCodeAsRegExpForMatchingInsideHTML(body) {\n        return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('\"', '(?:\"|&quot;)').replace(/\\s+/g, '\\\\s+');\n    }\n\n    /**\n     * Determines where a code fragment occurs in the source code.\n     * @param {RegExp} re The function definition.\n     * @param {Array.<string>} urls A list of URLs to search.\n     * @return {?Object.<string, (string|number)>} An object containing\n     * the url, line, and column number of the defined function.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function findSourceInUrls(re, urls) {\n        var source, m;\n        for (var i = 0, j = urls.length; i < j; ++i) {\n            if ((source = getSource(urls[i])).length) {\n                source = source.join('\\n');\n                if ((m = re.exec(source))) {\n\n                    return {\n                        'url': urls[i],\n                        'line': source.substring(0, m.index).split('\\n').length,\n                        'column': m.index - source.lastIndexOf('\\n', m.index) - 1\n                    };\n                }\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Determines at which column a code fragment occurs on a line of the\n     * source code.\n     * @param {string} fragment The code fragment.\n     * @param {string} url The URL to search.\n     * @param {(string|number)} line The line number to examine.\n     * @return {?number} The column number.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function findSourceInLine(fragment, url, line) {\n        var source = getSource(url),\n            re = new RegExp('\\\\b' + escapeRegExp(fragment) + '\\\\b'),\n            m;\n\n        line -= 1;\n\n        if (source && source.length > line && (m = re.exec(source[line]))) {\n            return m.index;\n        }\n\n        return null;\n    }\n\n    /**\n     * Determines where a function was defined within the source code.\n     * @param {(Function|string)} func A function reference or serialized\n     * function definition.\n     * @return {?Object.<string, (string|number)>} An object containing\n     * the url, line, and column number of the defined function.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function findSourceByFunctionBody(func) {\n        if (_isUndefined(window && window.document)) {\n            return;\n        }\n\n        var urls = [window.location.href],\n            scripts = window.document.getElementsByTagName('script'),\n            body,\n            code = '' + func,\n            codeRE = /^function(?:\\s+([\\w$]+))?\\s*\\(([\\w\\s,]*)\\)\\s*\\{\\s*(\\S[\\s\\S]*\\S)\\s*\\}\\s*$/,\n            eventRE = /^function on([\\w$]+)\\s*\\(event\\)\\s*\\{\\s*(\\S[\\s\\S]*\\S)\\s*\\}\\s*$/,\n            re,\n            parts,\n            result;\n\n        for (var i = 0; i < scripts.length; ++i) {\n            var script = scripts[i];\n            if (script.src) {\n                urls.push(script.src);\n            }\n        }\n\n        if (!(parts = codeRE.exec(code))) {\n            re = new RegExp(escapeRegExp(code).replace(/\\s+/g, '\\\\s+'));\n        }\n\n        // not sure if this is really necessary, but I don’t have a test\n        // corpus large enough to confirm that and it was in the original.\n        else {\n            var name = parts[1] ? '\\\\s+' + parts[1] : '',\n                args = parts[2].split(',').join('\\\\s*,\\\\s*');\n\n            body = escapeRegExp(parts[3]).replace(/;$/, ';?'); // semicolon is inserted if the function ends with a comment.replace(/\\s+/g, '\\\\s+');\n            re = new RegExp('function' + name + '\\\\s*\\\\(\\\\s*' + args + '\\\\s*\\\\)\\\\s*{\\\\s*' + body + '\\\\s*}');\n        }\n\n        // look for a normal function definition\n        if ((result = findSourceInUrls(re, urls))) {\n            return result;\n        }\n\n        // look for an old-school event handler function\n        if ((parts = eventRE.exec(code))) {\n            var event = parts[1];\n            body = escapeCodeAsRegExpForMatchingInsideHTML(parts[2]);\n\n            // look for a function defined in HTML as an onXXX handler\n            re = new RegExp('on' + event + '=[\\\\\\'\"]\\\\s*' + body + '\\\\s*[\\\\\\'\"]', 'i');\n\n            if ((result = findSourceInUrls(re, urls[0]))) {\n                return result;\n            }\n\n            // look for ???\n            re = new RegExp(body);\n\n            if ((result = findSourceInUrls(re, urls))) {\n                return result;\n            }\n        }\n\n        return null;\n    }\n\n    // Contents of Exception in various browsers.\n    //\n    // SAFARI:\n    // ex.message = Can't find variable: qq\n    // ex.line = 59\n    // ex.sourceId = 580238192\n    // ex.sourceURL = http://...\n    // ex.expressionBeginOffset = 96\n    // ex.expressionCaretOffset = 98\n    // ex.expressionEndOffset = 98\n    // ex.name = ReferenceError\n    //\n    // FIREFOX:\n    // ex.message = qq is not defined\n    // ex.fileName = http://...\n    // ex.lineNumber = 59\n    // ex.columnNumber = 69\n    // ex.stack = ...stack trace... (see the example below)\n    // ex.name = ReferenceError\n    //\n    // CHROME:\n    // ex.message = qq is not defined\n    // ex.name = ReferenceError\n    // ex.type = not_defined\n    // ex.arguments = ['aa']\n    // ex.stack = ...stack trace...\n    //\n    // INTERNET EXPLORER:\n    // ex.message = ...\n    // ex.name = ReferenceError\n    //\n    // OPERA:\n    // ex.message = ...message... (see the example below)\n    // ex.name = ReferenceError\n    // ex.opera#sourceloc = 11  (pretty much useless, duplicates the info in ex.message)\n    // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n    /**\n     * Computes stack trace information from the stack property.\n     * Chrome and Gecko use this property.\n     * @param {Error} ex\n     * @return {?TraceKit.StackTrace} Stack trace information.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTraceFromStackProp(ex) {\n        if (!ex.stack) {\n            return null;\n        }\n\n        var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n            gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n            winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n\n            // Used to additionally parse URL/line/column from eval frames\n            isEval,\n            geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i,\n            chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,\n\n            lines = ex.stack.split('\\n'),\n            stack = [],\n            submatch,\n            parts,\n            element,\n            reference = /^(.*) is undefined$/.exec(ex.message);\n\n        for (var i = 0, j = lines.length; i < j; ++i) {\n            if ((parts = chrome.exec(lines[i]))) {\n                var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n                isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n                if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n                    // throw out eval line/column and use top-most line/column number\n                    parts[2] = submatch[1]; // url\n                    parts[3] = submatch[2]; // line\n                    parts[4] = submatch[3]; // column\n                }\n                element = {\n                    'url': !isNative ? parts[2] : null,\n                    'func': parts[1] || UNKNOWN_FUNCTION,\n                    'args': isNative ? [parts[2]] : [],\n                    'line': parts[3] ? +parts[3] : null,\n                    'column': parts[4] ? +parts[4] : null\n                };\n            } else if ( parts = winjs.exec(lines[i]) ) {\n                element = {\n                    'url': parts[2],\n                    'func': parts[1] || UNKNOWN_FUNCTION,\n                    'args': [],\n                    'line': +parts[3],\n                    'column': parts[4] ? +parts[4] : null\n                };\n            } else if ((parts = gecko.exec(lines[i]))) {\n                isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n                if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n                    // throw out eval line/column and use top-most line number\n                    parts[3] = submatch[1];\n                    parts[4] = submatch[2];\n                    parts[5] = null; // no column when eval\n                } else if (i === 0 && !parts[5] && !_isUndefined(ex.columnNumber)) {\n                    // FireFox uses this awesome columnNumber property for its top frame\n                    // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n                    // so adding 1\n                    // NOTE: this hack doesn't work if top-most frame is eval\n                    stack[0].column = ex.columnNumber + 1;\n                }\n                element = {\n                    'url': parts[3],\n                    'func': parts[1] || UNKNOWN_FUNCTION,\n                    'args': parts[2] ? parts[2].split(',') : [],\n                    'line': parts[4] ? +parts[4] : null,\n                    'column': parts[5] ? +parts[5] : null\n                };\n            } else {\n                continue;\n            }\n\n            if (!element.func && element.line) {\n                element.func = guessFunctionName(element.url, element.line);\n            }\n\n            element.context = element.line ? gatherContext(element.url, element.line) : null;\n            stack.push(element);\n        }\n\n        if (!stack.length) {\n            return null;\n        }\n\n        if (stack[0] && stack[0].line && !stack[0].column && reference) {\n            stack[0].column = findSourceInLine(reference[1], stack[0].url, stack[0].line);\n        }\n\n        return {\n            'mode': 'stack',\n            'name': ex.name,\n            'message': ex.message,\n            'stack': stack\n        };\n    }\n\n    /**\n     * Computes stack trace information from the stacktrace property.\n     * Opera 10+ uses this property.\n     * @param {Error} ex\n     * @return {?TraceKit.StackTrace} Stack trace information.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTraceFromStacktraceProp(ex) {\n        // Access and store the stacktrace property before doing ANYTHING\n        // else to it because Opera is not very good at providing it\n        // reliably in other circumstances.\n        var stacktrace = ex.stacktrace;\n        if (!stacktrace) {\n            return;\n        }\n\n        var opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i,\n            opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i,\n            lines = stacktrace.split('\\n'),\n            stack = [],\n            parts;\n\n        for (var line = 0; line < lines.length; line += 2) {\n            var element = null;\n            if ((parts = opera10Regex.exec(lines[line]))) {\n                element = {\n                    'url': parts[2],\n                    'line': +parts[1],\n                    'column': null,\n                    'func': parts[3],\n                    'args':[]\n                };\n            } else if ((parts = opera11Regex.exec(lines[line]))) {\n                element = {\n                    'url': parts[6],\n                    'line': +parts[1],\n                    'column': +parts[2],\n                    'func': parts[3] || parts[4],\n                    'args': parts[5] ? parts[5].split(',') : []\n                };\n            }\n\n            if (element) {\n                if (!element.func && element.line) {\n                    element.func = guessFunctionName(element.url, element.line);\n                }\n                if (element.line) {\n                    try {\n                        element.context = gatherContext(element.url, element.line);\n                    } catch (exc) {}\n                }\n\n                if (!element.context) {\n                    element.context = [lines[line + 1]];\n                }\n\n                stack.push(element);\n            }\n        }\n\n        if (!stack.length) {\n            return null;\n        }\n\n        return {\n            'mode': 'stacktrace',\n            'name': ex.name,\n            'message': ex.message,\n            'stack': stack\n        };\n    }\n\n    /**\n     * NOT TESTED.\n     * Computes stack trace information from an error message that includes\n     * the stack trace.\n     * Opera 9 and earlier use this method if the option to show stack\n     * traces is turned on in opera:config.\n     * @param {Error} ex\n     * @return {?TraceKit.StackTrace} Stack information.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTraceFromOperaMultiLineMessage(ex) {\n        // TODO: Clean this function up\n        // Opera includes a stack trace into the exception message. An example is:\n        //\n        // Statement on line 3: Undefined variable: undefinedFunc\n        // Backtrace:\n        //   Line 3 of linked script file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.js: In function zzz\n        //         undefinedFunc(a);\n        //   Line 7 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function yyy\n        //           zzz(x, y, z);\n        //   Line 3 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function xxx\n        //           yyy(a, a, a);\n        //   Line 1 of function script\n        //     try { xxx('hi'); return false; } catch(ex) { TraceKit.report(ex); }\n        //   ...\n\n        var lines = ex.message.split('\\n');\n        if (lines.length < 4) {\n            return null;\n        }\n\n        var lineRE1 = /^\\s*Line (\\d+) of linked script ((?:file|https?|blob)\\S+)(?:: in function (\\S+))?\\s*$/i,\n            lineRE2 = /^\\s*Line (\\d+) of inline#(\\d+) script in ((?:file|https?|blob)\\S+)(?:: in function (\\S+))?\\s*$/i,\n            lineRE3 = /^\\s*Line (\\d+) of function script\\s*$/i,\n            stack = [],\n            scripts = (window && window.document && window.document.getElementsByTagName('script')),\n            inlineScriptBlocks = [],\n            parts;\n\n        for (var s in scripts) {\n            if (_has(scripts, s) && !scripts[s].src) {\n                inlineScriptBlocks.push(scripts[s]);\n            }\n        }\n\n        for (var line = 2; line < lines.length; line += 2) {\n            var item = null;\n            if ((parts = lineRE1.exec(lines[line]))) {\n                item = {\n                    'url': parts[2],\n                    'func': parts[3],\n                    'args': [],\n                    'line': +parts[1],\n                    'column': null\n                };\n            } else if ((parts = lineRE2.exec(lines[line]))) {\n                item = {\n                    'url': parts[3],\n                    'func': parts[4],\n                    'args': [],\n                    'line': +parts[1],\n                    'column': null // TODO: Check to see if inline#1 (+parts[2]) points to the script number or column number.\n                };\n                var relativeLine = (+parts[1]); // relative to the start of the <SCRIPT> block\n                var script = inlineScriptBlocks[parts[2] - 1];\n                if (script) {\n                    var source = getSource(item.url);\n                    if (source) {\n                        source = source.join('\\n');\n                        var pos = source.indexOf(script.innerText);\n                        if (pos >= 0) {\n                            item.line = relativeLine + source.substring(0, pos).split('\\n').length;\n                        }\n                    }\n                }\n            } else if ((parts = lineRE3.exec(lines[line]))) {\n                var url = window.location.href.replace(/#.*$/, '');\n                var re = new RegExp(escapeCodeAsRegExpForMatchingInsideHTML(lines[line + 1]));\n                var src = findSourceInUrls(re, [url]);\n                item = {\n                    'url': url,\n                    'func': '',\n                    'args': [],\n                    'line': src ? src.line : parts[1],\n                    'column': null\n                };\n            }\n\n            if (item) {\n                if (!item.func) {\n                    item.func = guessFunctionName(item.url, item.line);\n                }\n                var context = gatherContext(item.url, item.line);\n                var midline = (context ? context[Math.floor(context.length / 2)] : null);\n                if (context && midline.replace(/^\\s*/, '') === lines[line + 1].replace(/^\\s*/, '')) {\n                    item.context = context;\n                } else {\n                    // if (context) alert(\"Context mismatch. Correct midline:\\n\" + lines[i+1] + \"\\n\\nMidline:\\n\" + midline + \"\\n\\nContext:\\n\" + context.join(\"\\n\") + \"\\n\\nURL:\\n\" + item.url);\n                    item.context = [lines[line + 1]];\n                }\n                stack.push(item);\n            }\n        }\n        if (!stack.length) {\n            return null; // could not parse multiline exception message as Opera stack trace\n        }\n\n        return {\n            'mode': 'multiline',\n            'name': ex.name,\n            'message': lines[0],\n            'stack': stack\n        };\n    }\n\n    /**\n     * Adds information about the first frame to incomplete stack traces.\n     * Safari and IE require this to get complete data on the first frame.\n     * @param {TraceKit.StackTrace} stackInfo Stack trace information from\n     * one of the compute* methods.\n     * @param {string} url The URL of the script that caused an error.\n     * @param {(number|string)} lineNo The line number of the script that\n     * caused an error.\n     * @param {string=} message The error generated by the browser, which\n     * hopefully contains the name of the object that caused the error.\n     * @return {boolean} Whether or not the stack information was\n     * augmented.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n        var initial = {\n            'url': url,\n            'line': lineNo\n        };\n\n        if (initial.url && initial.line) {\n            stackInfo.incomplete = false;\n\n            if (!initial.func) {\n                initial.func = guessFunctionName(initial.url, initial.line);\n            }\n\n            if (!initial.context) {\n                initial.context = gatherContext(initial.url, initial.line);\n            }\n\n            var reference = / '([^']+)' /.exec(message);\n            if (reference) {\n                initial.column = findSourceInLine(reference[1], initial.url, initial.line);\n            }\n\n            if (stackInfo.stack.length > 0) {\n                if (stackInfo.stack[0].url === initial.url) {\n                    if (stackInfo.stack[0].line === initial.line) {\n                        return false; // already in stack trace\n                    } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) {\n                        stackInfo.stack[0].line = initial.line;\n                        stackInfo.stack[0].context = initial.context;\n                        return false;\n                    }\n                }\n            }\n\n            stackInfo.stack.unshift(initial);\n            stackInfo.partial = true;\n            return true;\n        } else {\n            stackInfo.incomplete = true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Computes stack trace information by walking the arguments.caller\n     * chain at the time the exception occurred. This will cause earlier\n     * frames to be missed but is the only way to get any stack trace in\n     * Safari and IE. The top frame is restored by\n     * {@link augmentStackTraceWithInitialElement}.\n     * @param {Error} ex\n     * @return {TraceKit.StackTrace=} Stack trace information.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTraceByWalkingCallerChain(ex, depth) {\n        var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n            stack = [],\n            funcs = {},\n            recursion = false,\n            parts,\n            item,\n            source;\n\n        for (var curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) {\n            if (curr === computeStackTrace || curr === TraceKit.report) {\n                continue;\n            }\n\n            item = {\n                'url': null,\n                'func': UNKNOWN_FUNCTION,\n                'args': [],\n                'line': null,\n                'column': null\n            };\n\n            if (curr.name) {\n                item.func = curr.name;\n            } else if ((parts = functionName.exec(curr.toString()))) {\n                item.func = parts[1];\n            }\n\n            if (typeof item.func === 'undefined') {\n              try {\n                item.func = parts.input.substring(0, parts.input.indexOf('{'));\n              } catch (e) { }\n            }\n\n            if ((source = findSourceByFunctionBody(curr))) {\n                item.url = source.url;\n                item.line = source.line;\n\n                if (item.func === UNKNOWN_FUNCTION) {\n                    item.func = guessFunctionName(item.url, item.line);\n                }\n\n                var reference = / '([^']+)' /.exec(ex.message || ex.description);\n                if (reference) {\n                    item.column = findSourceInLine(reference[1], source.url, source.line);\n                }\n            }\n\n            if (funcs['' + curr]) {\n                recursion = true;\n            }else{\n                funcs['' + curr] = true;\n            }\n\n            stack.push(item);\n        }\n\n        if (depth) {\n            stack.splice(0, depth);\n        }\n\n        var result = {\n            'mode': 'callers',\n            'name': ex.name,\n            'message': ex.message,\n            'stack': stack\n        };\n        augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description);\n        return result;\n    }\n\n    /**\n     * Computes a stack trace for an exception.\n     * @param {Error} ex\n     * @param {(string|number)=} depth\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTrace(ex, depth) {\n        var stack = null;\n        depth = (depth == null ? 0 : +depth);\n\n        try {\n            // This must be tried first because Opera 10 *destroys*\n            // its stacktrace property if you try to access the stack\n            // property first!!\n            stack = computeStackTraceFromStacktraceProp(ex);\n            if (stack) {\n                return stack;\n            }\n        } catch (e) {\n            if (debug) {\n                throw e;\n            }\n        }\n\n        try {\n            stack = computeStackTraceFromStackProp(ex);\n            if (stack) {\n                return stack;\n            }\n        } catch (e) {\n            if (debug) {\n                throw e;\n            }\n        }\n\n        try {\n            stack = computeStackTraceFromOperaMultiLineMessage(ex);\n            if (stack) {\n                return stack;\n            }\n        } catch (e) {\n            if (debug) {\n                throw e;\n            }\n        }\n\n        try {\n            stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n            if (stack) {\n                return stack;\n            }\n        } catch (e) {\n            if (debug) {\n                throw e;\n            }\n        }\n\n        return {\n            'name': ex.name,\n            'message': ex.message,\n            'mode': 'failed'\n        };\n    }\n\n    /**\n     * Logs a stacktrace starting from the previous call and working down.\n     * @param {(number|string)=} depth How many frames deep to trace.\n     * @return {TraceKit.StackTrace} Stack trace information.\n     * @memberof TraceKit.computeStackTrace\n     */\n    function computeStackTraceOfCaller(depth) {\n        depth = (depth == null ? 0 : +depth) + 1; // \"+ 1\" because \"ofCaller\" should drop one frame\n        try {\n            throw new Error();\n        } catch (ex) {\n            return computeStackTrace(ex, depth + 1);\n        }\n    }\n\n    computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n    computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n    computeStackTrace.guessFunctionName = guessFunctionName;\n    computeStackTrace.gatherContext = gatherContext;\n    computeStackTrace.ofCaller = computeStackTraceOfCaller;\n    computeStackTrace.getSource = getSource;\n\n    return computeStackTrace;\n}());\n\n/**\n * Extends support for global error handling for asynchronous browser\n * functions. Adopted from Closure Library's errorhandler.js\n * @memberof TraceKit\n */\nTraceKit.extendToAsynchronousCallbacks = function () {\n    var _helper = function _helper(fnName) {\n        var originalFn = window[fnName];\n        window[fnName] = function traceKitAsyncExtension() {\n            // Make a copy of the arguments\n            var args = _slice.call(arguments);\n            var originalCallback = args[0];\n            if (typeof (originalCallback) === 'function') {\n                args[0] = TraceKit.wrap(originalCallback);\n            }\n            // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n            // also only supports 2 argument and doesn't care what \"this\" is, so we\n            // can just call the original function directly.\n            if (originalFn.apply) {\n                return originalFn.apply(this, args);\n            } else {\n                return originalFn(args[0], args[1]);\n            }\n        };\n    };\n\n    _helper('setTimeout');\n    _helper('setInterval');\n};\n\n//Default options:\nif (!TraceKit.remoteFetching) {\n    TraceKit.remoteFetching = true;\n}\nif (!TraceKit.collectWindowErrors) {\n    TraceKit.collectWindowErrors = true;\n}\nif (!TraceKit.linesOfContext || TraceKit.linesOfContext < 1) {\n    // 5 lines before, the offending line, 5 lines after\n    TraceKit.linesOfContext = 11;\n}\n\n// UMD export\nif (typeof define === 'function' && define.amd) {\n    define('TraceKit', [], TraceKit);\n} else if (typeof module !== 'undefined' && module.exports && window.module !== module) {\n    module.exports = TraceKit;\n} else {\n    window.TraceKit = TraceKit;\n}\n\n}(typeof window !== 'undefined' ? window : global));\n"]}