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OAAS,SACd,KAAK,MAAM,UAAY,CACzB,CAEA,KAAK,MAAM,OAAS,EACpB,KAAK,MAAM,KAAK,EAClB,EAEA,EAAqB,UAAU,mBAAqB,SAAU,GAC9D,EAEA,EAAqB,UAAU,oBAAsB,SAAU,GAC7D,IAAI,EAAS,EAAO,SAEpB,KAAK,MAAM,IAAM,IAAI,KACrB,KAAK,MAAM,SAAW,KAAK,MAAM,IAAM,KAAK,MAAM,IAElD,KAAK,MAAM,OAAS,EAAO,OAI3B,IAFA,IAAI,EAAS,MAAQ,KAAK,MAAM,MAAQ,KAE/B,EAAI,EAAG,EAAI,KAAK,MAAM,OAAQ,GAAK,EAAG,CAC7C,IAAI,EAAQ,EAAI,EAEhB,GAA6B,YAAzB,KAAK,MAAM,GAAG,OAChB,GAAU,MAAQ,EAAQ,IAAM,KAAK,MAAM,GAAG,MAAQ,mBACjD,GAA6B,WAAzB,KAAK,MAAM,GAAG,OAAqB,CAC5C,GAAU,UAAY,EAAQ,IAAM,KAAK,MAAM,GAAG,MAAQ,KAC1D,IAAK,IAAI,EAAI,EAAG,EAAI,KAAK,MAAM,GAAG,IAAI,OAAQ,GAAK,EACjD,GAAU,KAAK,MAAM,GAAG,IAAI,GAAK,IAErC,MACE,GAAU,MAAQ,EAAQ,IAAM,KAAK,MAAM,GAAG,MAAQ,IAE1D,CAEA,GAAI,YAAY,KAAK,OAAO,SAAS,QAAS,CAC5C,IAAI,EAAM,MAGR,EADE,OAAO,eACH,IAAI,eAEJ,IAAI,cAAc,sBAGtB,KAAK,OAAQ,OAAO,SAAS,MACjC,EAAI,iBAAiB,eAAgB,cACrC,EAAI,KAAK,EACX,CACF,EAGA,EAAQ,qBAAuB,CACjC","file":"/npm/jasmine-browserstack@0.2.0/lib/jasmine-browserstack.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jasmine-browserstack@0.2.0/lib/jasmine-browserstack.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (root, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define(['jasmine'], factory);\n  } else {\n    factory(jasmine);\n  }\n}(this, function (jasmine) {\n  function stack(err) {\n    var str = err.stack || err.toString();\n\n    if (!~str.indexOf(err.message)) {\n      str = err.message + '\\n' + str;\n    }\n\n    if ('[object Error]' == str) {\n      str = err.message;\n    }\n\n    if (!err.stack && err.sourceURL && err.line !== undefined) {\n      str += '\\n(' + err.sourceURL + ':' + err.line + ')';\n    }\n    return str.replace(/^/gm, '  ');\n  }\n\n  function BrowserStackReporter() {\n    this.stats = {\n      suites: 0,\n      tests: 0,\n      passes: 0,\n      pending: 0,\n      failures: 0\n    };\n    this.tests = [];\n  }\n\n  BrowserStackReporter.prototype.reportRunnerStarting = function (runner) {\n    this.stats.start = new Date();\n  };\n\n  BrowserStackReporter.prototype.reportSpecStarting = function (spec) {\n    spec.startedAt = new Date().getTime();\n  };\n\n  BrowserStackReporter.prototype.reportSpecResults = function (spec) {\n    var currentTime = new Date().getTime();\n    spec.duration = currentTime - spec.startedAt;\n\n    var result = spec.results();\n\n    var test = {\n      status: null,\n      title: spec.getFullName().replace(/#/g, ''),\n      duration: currentTime - spec.startedAt\n    };\n\n    if (result.skipped) {\n      this.stats.pending += 1;\n      test.status = 'skipped';\n    } else if (result.failedCount === 0) {\n      this.stats.passes += 1;\n      test.status = 'passed';\n    } else {\n      var items = result.getItems(),\n          message = [];\n\n      for (var i = 0; i < items.length; i += 1) {\n        message.push(stack(items[i].trace));\n      }\n\n      test.err = message;\n      test.status = 'failed';\n      this.stats.failures += 1;\n    }\n\n    this.stats.tests += 1;\n    this.tests.push(test);\n  };\n\n  BrowserStackReporter.prototype.reportSuiteResults = function (suite) {\n  };\n\n  BrowserStackReporter.prototype.reportRunnerResults = function (runner) {\n    var suites = runner.suites();\n\n    this.stats.end = new Date();\n    this.stats.duration = this.stats.end - this.stats.end;\n\n    this.stats.suites = suites.length;\n\n    var result = '1..' + this.stats.tests + '\\n';\n\n    for (var i = 0; i < this.tests.length; i += 1) {\n      var count = i + 1;\n\n      if (this.tests[i].status === 'pending') {\n        result += 'ok ' + count + ' ' + this.tests[i].title + ' # SKIP -\\n';\n      } else if (this.tests[i].status === 'failed') {\n        result += 'not ok ' + count + ' ' + this.tests[i].title + '\\n';\n        for (var j = 0; j < this.tests[i].err.length; j += 1) {\n          result += this.tests[i].err[j] + '\\n';\n        }\n      } else {\n        result += 'ok ' + count + ' ' + this.tests[i].title + '\\n';\n      }\n    }\n\n    if (/browser=/i.test(window.location.search)) {\n      var xhr = null;\n\n      if (window.XMLHttpRequest) {\n        xhr = new XMLHttpRequest();\n      } else {\n        xhr = new ActiveXObject('Microsoft.XMLHTTP');\n      }\n\n      xhr.open('POST', window.location.href);\n      xhr.setRequestHeader('Content-Type', 'text/plain');\n      xhr.send(result);\n    }\n  };\n\n  // Attach to the jasmine object like many other reporters do\n  jasmine.BrowserStackReporter = BrowserStackReporter;\n}));\n"]}