;(this['webpackJsonprepeato-batch-run'] = this['webpackJsonprepeato-batch-run'] || []).push([
  [0],
  {
    159: function(e, t, n) {},
    160: function(e, t, n) {},
    174: function(e, t, n) {
      'use strict'
      n.r(t)
      var i = n(0),
        o = n.n(i),
        a = n(44),
        c = n.n(a),
        r = n(115),
        s = (n(159), n(9)),
        l = n(18),
        d = n(11),
        u = (n(160), n(138)),
        h = '#1e4158',
        v = '#7692a4',
        j = '#10a4da',
        b = j,
        p = '#f5f5f5',
        x = '#FFFFFF',
        m = 'rgba(255, 255, 255, 0.36)',
        f = '#d7d7d7',
        g = '#ff7a59',
        O = 'linear-gradient(315deg, rgba(255,167,167,1) 0%, rgba(255,221,173,1) 100%)',
        y = 'linear-gradient(315deg, rgba(174,213,129,1) 0%, rgba(249,255,178,1) 100%)',
        w = ('linear-gradient(315deg, rgba(3,98,160,1) 0%, '.concat(j, ' 100%)'), '#AED581'),
        R = n(259),
        k = n(3),
        S = n(41),
        C = n(251),
        L = n(255),
        I = n(254),
        T = n(107),
        M = n(262),
        F = n(267),
        B = n(260),
        z = n(249),
        D = n(250),
        W = n(140),
        N = n(1)
      var A = function(e) {
        return Object(N.jsx)(
          W.a,
          Object(l.a)(
            Object(l.a)({}, e),
            {},
            {
              children: Object(N.jsxs)('svg', {
                xmlns: 'http://www.w3.org/2000/svg',
                width: '24',
                height: '24',
                viewBox: '0 0 24 24',
                fill: 'none',
                stroke: 'currentColor',
                strokeWidth: '2',
                strokeLinecap: 'round',
                strokeLinejoin: 'round',
                children: [Object(N.jsx)('polyline', { points: '4 17 10 11 4 5' }), Object(N.jsx)('line', { x1: '12', y1: '19', x2: '20', y2: '19' })]
              })
            }
          )
        )
      }
      var E = function(e) {
        return Object(N.jsx)(
          W.a,
          Object(l.a)(
            Object(l.a)({}, e),
            {},
            {
              children: Object(N.jsxs)('svg', {
                xmlns: 'http://www.w3.org/2000/svg',
                width: '24',
                height: '24',
                viewBox: '-10 00 500 500',
                children: [
                  Object(N.jsx)('path', { d: 'M45.989,97.409l-21.813,20.555L5.447,98.089l21.814-20.555L45.989,97.409z' }),
                  Object(N.jsx)('path', { d: 'M125.485,22.498l-21.811,20.553L84.946,23.176l21.811-20.553L125.485,22.498z' }),
                  Object(N.jsx)('path', {
                    d:
                      'M226.65,375.628c12.448,13.211,27.011,24.125,43.031,32.564l130.95-123.396c-7.475-16.492-17.504-31.677-29.954-44.889 L240.007,101.237L95.979,236.956L226.65,375.628z M177.163,252.123l73.166-68.944l48.935,51.931 c18.796,19.946,17.86,51.464-2.086,70.26l-0.819,0.771c-19.946,18.796-51.464,17.858-70.26-2.087L177.163,252.123z'
                  }),
                  Object(N.jsx)('path', {
                    d:
                      'M385.073,426.421l22.159-3.438l4.746-21.916c6.283-29.011,5.858-58.136-0.671-85.148L300.118,420.694 C326.692,428.818,355.74,430.972,385.073,426.421z'
                  }),
                  Object(N.jsx)('path', {
                    d:
                      'M275.803,284.328l0.819-0.772c7.92-7.463,8.289-19.973,0.828-27.891l-28.381-30.118l-29.538,27.833l28.381,30.118 C255.374,291.417,267.885,291.788,275.803,284.328z'
                  }),
                  Object(N.jsx)('path', { d: 'M162.857,351.635L53.609,235.697l-40.103,37.789l87.059,92.389L162.857,351.635z' }),
                  Object(N.jsx)('path', { d: 'M281.367,21.079l-40.103,37.789l109.249,115.938l17.913-61.336L281.367,21.079z' }),
                  Object(N.jsx)('path', {
                    d:
                      'M156.518,55.431L135.47,33.094l-21.811,20.553l18.434,19.562l-17.937,16.901L67.01,40.077L45.196,60.632l47.146,50.033 l-17.936,16.901l-18.434-19.562L34.16,128.56l21.048,22.337l18.529,65.835l147.4-138.897L156.518,55.431z'
                  })
                ]
              })
            }
          )
        )
      }
      var P = function(e) {
          return Object(N.jsx)(
            W.a,
            Object(l.a)(
              Object(l.a)({}, e),
              {},
              {
                children: Object(N.jsxs)('svg', {
                  xmlns: 'http://www.w3.org/2000/svg',
                  width: '24',
                  height: '24',
                  viewBox: '-60 00 500 500',
                  children: [
                    Object(N.jsx)('path', { d: 'm223.652344 484.691406h29.972656v27.308594h-29.972656zm0 0' }),
                    Object(N.jsx)('path', { d: 'm114.421875 484.691406h29.96875v27.308594h-29.96875zm0 0' }),
                    Object(N.jsx)('path', {
                      d:
                        'm282.972656 158.308594c0-18.152344-3.113281-36.082032-8.984375-53.210938h-179.929687c-5.871094 17.128906-8.984375 35.058594-8.984375 53.210938v190.539062h197.898437zm-48.683594 123.824218h-100.53125v-71.355468c0-27.40625 22.296876-49.703125 49.703126-49.703125h1.125c27.40625 0 49.703124 22.296875 49.703124 49.703125zm0 0'
                    }),
                    Object(N.jsx)('path', {
                      d:
                        'm202.507812 12.695312-18.484374-12.695312-18.484376 12.695312c-24.46875 16.804688-44.132812 38.292969-57.90625 62.429688h152.777344c-13.769531-24.136719-33.433594-45.625-57.902344-62.429688zm0 0'
                    }),
                    Object(N.jsx)('path', {
                      d:
                        'm184.585938 191.046875h-1.125c-10.882813 0-19.730469 8.851563-19.730469 19.730469v41.382812h40.585937v-41.382812c0-10.878906-8.851562-19.730469-19.730468-19.730469zm0 0'
                    }),
                    Object(N.jsx)('path', { d: 'm312.945312 219.519531v159.300781h55.101563v-126.945312zm0 0' }),
                    Object(N.jsx)('path', { d: 'm0 378.820312h55.101562v-159.300781l-55.101562 32.355469zm0 0' }),
                    Object(N.jsx)('path', {
                      d:
                        'm114.421875 439.441406v30.691406h29.96875v-26.878906h24.644531v68.746094h29.972656v-68.746094h24.644532v26.878906h29.972656v-30.691406l31.664062-60.621094h-202.53125zm0 0'
                    })
                  ]
                })
              }
            )
          )
        },
        V = n(230),
        G = n(231),
        H = n(232),
        J = n(233),
        U = n(234),
        K = n(235),
        q = n(236),
        _ = n(237),
        Q = n(238),
        X = n(239),
        Y = n(240),
        Z = n(241),
        $ = n(242),
        ee = n(258),
        te = n(257),
        ne = n(117)
      var ie = function() {
        for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]
        return t.reduce(function(e, t) {
          return function() {
            return e(t.apply(void 0, arguments))
          }
        })
      }
      var oe = ie(
          Object(S.a)(function() {
            return { tag: { height: 20, marginRight: 6 } }
          }),
          Object(ne.a)('dbStore'),
          ne.b
        )(function(e) {
          var t = e.classes,
            n = e.name,
            i = e.dbStore,
            o = e.fallbackColor,
            a = void 0 === o ? p : o,
            c = i.getTagByName(n),
            r = Object(l.a)({ backgroundColor: (null === c || void 0 === c ? void 0 : c.color) || a }, e.style)
          e.onClick && (r.cursor = 'pointer')
          var s = Object(N.jsx)(ee.a, { size: 'small', label: n, className: t.tag, style: r, onClick: e.onClick })
          return null !== c && void 0 !== c && c.description ? Object(N.jsx)(te.a, { title: c.description, children: s }) : s
        }),
        ae = 'up',
        ce = 'down',
        re = 'left',
        se = 'right',
        le = function(e) {
          var t, n
          return 0 === (null === (t = e.mouseMoveCoordinates) || void 0 === t ? void 0 : t.length)
            ? null
            : 'DragAndDrop' === e.dragType
            ? e.mouseMoveCoordinates[0]
            : null === (n = e.startPositionSource) || void 0 === n
            ? void 0
            : n.point
        },
        de = function(e) {
          var t, n
          return 0 === (null === (t = e.mouseMoveCoordinates) || void 0 === t ? void 0 : t.length)
            ? null
            : 'DragAndDrop' === e.dragType
            ? e.mouseMoveCoordinates[e.mouseMoveCoordinates.length - 1]
            : null === (n = e.endPositionSource) || void 0 === n
            ? void 0
            : n.point
        },
        ue = function(e) {
          return ''.concat((100 * e.y).toFixed(1), '%')
        },
        he = function(e) {
          return ''.concat((100 * e.x).toFixed(1), '%')
        },
        ve = function(e) {
          return de(e) && le(e) ? de(e).y - le(e).y : null
        },
        je = function(e) {
          return de(e) && le(e) ? de(e).x - le(e).x : null
        },
        be = function(e) {
          var t = je(e),
            n = ve(e)
          return null !== t && null !== n ? Math.abs(t) - Math.abs(n) > 0 : null
        },
        pe = function(e) {
          var t
          if (e.longClick) return !0
          var n = 1,
            i = 0,
            o = 1,
            a = 0
          null === (t = e.mouseMoveCoordinates) ||
            void 0 === t ||
            t.forEach(function(e) {
              e.x > i && (i = e.x), e.x < n && (n = e.x), e.y > a && (a = e.y), e.y < o && (o = e.y)
            })
          return i - n > 0.1 && a - o > 0.1
        },
        xe = function(e) {
          var t = be(e)
          if (null === t) return null
          if (t) {
            var n = je(e)
            return n && n < 0 ? re : se
          }
          var i = ve(e)
          return i && i < 0 ? ae : ce
        },
        me = {
          contains: { id: 'contains', label: 'contain', js: 'scannedText.includes("searchText")' },
          equals: { id: 'equals', label: 'equal', js: 'scannedText === "searchText"' },
          notContains: { id: 'notContains', label: 'not contain', js: 'scannedText.includes("searchText") == false' },
          greaterThan: { id: 'greaterThan', label: 'be greater than', js: 'parseFloat(scannedText) > parseFloat("searchText")' },
          lessThan: { id: 'lessThan', label: 'be less than', js: 'parseFloat(scannedText) < parseFloat("searchText")' }
        }
      function fe(e) {
        return null === e || void 0 === e ? void 0 : e.substr(0, 6).toUpperCase()
      }
      var ge = function(e) {
          return e < 10 ? '0' + e : e
        },
        Oe = function(e) {
          if (!e) return ''
          var t = Math.floor((e / 1e3) % 60),
            n = Math.floor((e / 6e4) % 60),
            i = Math.floor((e / 36e5) % 24)
          return i < 10 && (i = '0' + i), n < 10 && (n = '0' + n), t < 10 && (t = '0' + t), i + ':' + n + ':' + t
        },
        ye = function(e) {
          if (!e) return ''
          var t = new Date(e)
          return isNaN(t.getDate()) ? '' : t.toLocaleDateString() + ' ' + t.toLocaleTimeString()
        }
      function we(e) {
        return e ? ''.concat(e.toLocaleDateString(), ' ').concat(e.toLocaleTimeString()) : ''
      }
      function Re(e) {
        var t
        return e.scanTextLabel ? e.scanTextLabel : null === (t = me[e.operator]) || void 0 === t ? void 0 : t.label
      }
      var ke = { borderBottom: '1px solid ' + v, marginBottom: 8, paddingBottom: 6 },
        Se = { fontSize: '0.8rem', fontWeight: 400, color: v, marginBottom: 3 },
        Ce = function(e) {
          var t,
            n = e.name,
            i = e.value,
            o = e.className
          return (
            (t = Boolean(i) || '' + i === '0' ? i : 'Not available'),
            Object(N.jsxs)('div', {
              style: ke,
              className: o || '',
              children: [
                n && Object(N.jsx)(T.a, { variant: 'h3', style: Se, children: n }),
                Object(N.jsx)(T.a, { variant: 'h2', style: { fontSize: '1.0rem' }, children: t })
              ]
            })
          )
        },
        Le = { 'aria-label': 'description' },
        Ie = { duration: 'Test Run Duration', appStartupDuration: 'App Startup Duration', skippedFramesCount: 'Skipped Frames Count' },
        Te = { fontSize: '0.9rem', lineHeight: '1.3' },
        Me = '1px solid ' + v,
        Fe = { paddingRight: 0, paddingLeft: 0 },
        Be = Object(S.a)({
          root: {
            '& input': { color: x, fontWeight: '100' },
            '& label.Mui-focused': { color: x },
            '& .MuiInput-underline:hover:before': { borderBottom: '1px solid ' + f },
            '& .MuiInput-underline:before': { borderBottomColor: f },
            '& .MuiInput-underline:after': { borderBottomColor: x }
          }
        })(L.a),
        ze = Object(S.a)({
          root: {
            '& input': { color: x, fontWeight: '100' },
            '& label.Mui-focused': { color: x },
            '& .MuiInput-underline:hover:before': { borderBottom: '1px solid ' + f },
            '& .MuiInput-underline:before': { borderBottomColor: f },
            '& .MuiInput-underline:after': { borderBottomColor: x }
          }
        })(I.a),
        De = function(e, t, n, i) {
          var o = e.testRuns
          return Object(N.jsx)(N.Fragment, {
            children: o.map(function(e, t) {
              return Object(N.jsx)(We, { testRun: e, metric: n, maxValue: i }, e.id)
            })
          })
        },
        We = function(e) {
          var t,
            n,
            i = e.testRun,
            o = e.metric,
            a = e.maxValue,
            c = i[o]
          if (c) {
            switch (((t = '' + c), o)) {
              case 'duration':
                t =
                  c > 1e3
                    ? (function(e) {
                        var t = e,
                          n = Math.floor(t / 86400)
                        t -= 86400 * n
                        var i = Math.floor(t / 3600) % 24
                        t -= 3600 * i
                        var o = Math.floor(t / 60) % 60,
                          a = (t -= 60 * o) % 60
                        return (
                          (n = n ? ''.concat(n, 'd ') : ''),
                          ''
                            .concat(n)
                            .concat(ge(i), ':')
                            .concat(ge(o), ':')
                            .concat(ge(Math.floor(a)))
                        )
                      })(c / 1e3)
                    : c + ' ms'
                break
              case 'appStartupDuration':
                t = c + ' ms'
            }
            n = (100 * c) / a
          } else (t = 'N/A'), (n = 0)
          return Object(N.jsxs)(T.a, {
            style: { display: 'flex', flexDirection: 'row' },
            variant: 'body2',
            component: 'div',
            children: [
              Object(N.jsx)('div', { style: { width: 120 }, children: ye(i.date) }),
              Object(N.jsx)('div', { style: { marginRight: 10 }, children: t }),
              Object(N.jsx)('div', {
                style: { display: 'flex', flexGrow: 1, alignItems: 'center' },
                children: Object(N.jsx)('div', { style: { height: 3, width: ''.concat(n, '%'), background: i.wasSuccessful ? y : O } })
              })
            ]
          })
        },
        Ne = function(e) {
          var t,
            n,
            o,
            a,
            c,
            r,
            u,
            j,
            b = e.activeTab,
            p = e.setActiveTab,
            x = Object(d.n)(),
            m = i.useState({ searchKey: '', filter: 'all', currentMetric: 'duration' }),
            f = Object(s.a)(m, 2),
            O = f[0],
            y = f[1],
            R = i.useState(batchRun.tests),
            S = Object(s.a)(R, 2),
            L = S[0],
            I = S[1],
            W = (function(e) {
              var t = Number.MIN_VALUE
              return (
                batchRun.tests.forEach(function(n) {
                  return n.testRuns.forEach(function(n) {
                    n[e] && (t = Math.max(t, n[e]))
                  })
                }),
                t
              )
            })(O.currentMetric),
            A = i.useCallback(function(e) {}, []),
            E = i.useCallback(
              function() {
                var e = O.filter,
                  t = O.searchKey.toLowerCase()
                if (t || 'all' !== e) {
                  var n = batchRun.tests
                  t &&
                    (n = n.filter(function(e) {
                      var n, i
                      return (
                        (null === e || void 0 === e || null === (n = e.id) || void 0 === n ? void 0 : n.toLowerCase().includes(t)) ||
                        (null === e || void 0 === e || null === (i = e.title) || void 0 === i ? void 0 : i.toLowerCase().includes(t)) ||
                        e.devices.some(function(e) {
                          var n
                          return null === (n = e.name) || void 0 === n ? void 0 : n.toLowerCase().includes(t)
                        })
                      )
                    })),
                    e &&
                      'all' !== e &&
                      (n = n.filter(function(t) {
                        var n = null === t || void 0 === t ? void 0 : t.testRuns[(null === t || void 0 === t ? void 0 : t.testRuns.length) - 1],
                          i =
                            null === n || void 0 === n
                              ? void 0
                              : n.stepResults.filter(function(t) {
                                  return t.success === ('successful' === e)
                                })
                        return 'failed' === e ? i.length > 0 : i.length === (null === n || void 0 === n ? void 0 : n.stepResults.length)
                      })),
                    I(n),
                    A(n)
                } else I(batchRun.tests)
              },
              [O, A]
            ),
            P = function(e) {
              var t = e.target,
                n = t.name,
                i = t.value
              y(Object(l.a)(Object(l.a)({}, O), {}, Object(k.a)({}, n, i)))
            }
          i.useEffect(
            function() {
              E()
            },
            [O, E]
          ),
            i.useEffect(
              function() {
                A(batchRun.tests)
              },
              [A]
            )
          var V =
            (100 * (null === (t = batchRun.stats) || void 0 === t ? void 0 : t.successCount)) /
            (null === (n = batchRun.stats) || void 0 === n ? void 0 : n.totalCount)
          return Object(N.jsxs)('div', {
            id: 'sidebar',
            style: { color: 'white', flexBasis: null === b ? '100%' : '50%', height: '100%' },
            children: [
              Object(N.jsxs)('div', {
                id: 'left-col',
                style: { width: 230, background: h, padding: 60, flexBasis: 'auto', flexGrow: 0, overflow: 'auto' },
                children: [
                  Object(N.jsx)('img', {
                    onClick: function() {
                      return window.open('https://www.repeato.app')
                    },
                    src: 'assets/logo.png',
                    alt: 'logo',
                    style: { maxWidth: 140, marginBottom: 100, cursor: 'pointer' }
                  }),
                  Object(N.jsxs)('div', {
                    children: [
                      Object(N.jsx)(T.a, { variant: 'h3', component: 'div', children: 'Batch Run Report:' }),
                      Object(N.jsx)(T.a, { variant: 'h1', component: 'div', style: { marginBottom: 26 }, children: batchRun.title }),
                      Object(N.jsxs)('div', {
                        style: { position: 'relative', marginBottom: 30 },
                        children: [
                          Object(N.jsxs)('svg', {
                            width: '100%',
                            height: '100%',
                            viewBox: '3.8 3.8 34.4 34.4',
                            className: 'donut',
                            children: [
                              Object(N.jsx)('circle', {
                                className: 'donut-ring',
                                cx: '21',
                                cy: '21',
                                r: '15.91549430918954',
                                fill: 'transparent',
                                stroke: g,
                                strokeWidth: '2'
                              }),
                              Object(N.jsx)('circle', {
                                className: 'donut-segment',
                                cx: '21',
                                cy: '21',
                                r: '15.91549430918954',
                                fill: 'transparent',
                                stroke: w,
                                strokeWidth: '2.05',
                                strokeDasharray: V + ' ' + (100 - V),
                                strokeDashoffset: 25
                              })
                            ]
                          }),
                          Object(N.jsx)('div', {
                            style: {
                              position: 'absolute',
                              display: 'flex',
                              justifyContent: 'center',
                              alignItems: 'center',
                              width: '100%',
                              height: '100%',
                              top: 0
                            },
                            children: Object(N.jsxs)(T.a, {
                              sx: Te,
                              component: 'div',
                              style: { width: 'fit-content' },
                              children: [
                                Object(N.jsxs)('div', {
                                  style: { borderBottom: Me, marginBottom: 4 },
                                  children: [
                                    ''.concat(null === (o = batchRun.stats) || void 0 === o ? void 0 : o.failCount, ' failed'),
                                    Object(N.jsx)('br', {}),
                                    ''.concat(null === (a = batchRun.stats) || void 0 === a ? void 0 : a.successCount, ' successful'),
                                    Object(N.jsx)('br', {})
                                  ]
                                }),
                                ''.concat(null === (c = batchRun.tests) || void 0 === c ? void 0 : c.length, ' total')
                              ]
                            })
                          })
                        ]
                      }),
                      Object(N.jsx)(Ce, { name: 'Batch Run Date:', value: ye(null === (r = batchRun) || void 0 === r ? void 0 : r.createdOn) }),
                      Object(N.jsx)(Ce, { name: 'Duration:', value: null === (u = batchRun.stats) || void 0 === u ? void 0 : u.duration }),
                      Object(N.jsx)(Ce, { name: 'Steps Executed:', value: null === (j = batchRun.stats) || void 0 === j ? void 0 : j.stepsCount }),
                      Object(N.jsx)(Ce, { name: 'Repeato Version:', value: version })
                    ]
                  })
                ]
              }),
              Object(N.jsxs)('div', {
                id: 'right-col',
                className: null !== b ? 'hideInPrintVersion' : '',
                style: { background: v, flexGrow: 1, display: 'flex', flexDirection: 'column' },
                children: [
                  Object(N.jsxs)('div', {
                    style: { display: 'flex', marginBottom: 16, padding: 40, paddingBottom: 10, alignItems: 'center' },
                    children: [
                      Object(N.jsxs)('div', {
                        style: { flexBasis: null === b ? '50%' : '100%', display: 'flex' },
                        children: [
                          Object(N.jsx)(Be, {
                            variant: 'standard',
                            style: { flexBasis: '44%', flexGrow: 1, marginRight: 30 },
                            placeholder: 'Search (title, id)',
                            name: 'searchKey',
                            onChange: P,
                            inputProps: Le
                          }),
                          Object(N.jsxs)(ze, {
                            variant: 'standard',
                            name: 'filter',
                            onChange: P,
                            value: O.filter,
                            style: { flexGrow: 1, flexBasis: '10%' },
                            children: [
                              Object(N.jsx)(M.a, { value: 'all', children: 'All' }),
                              Object(N.jsx)(M.a, { value: 'successful', children: 'Successful' }),
                              Object(N.jsx)(M.a, { value: 'failed', children: 'Failed' })
                            ]
                          })
                        ]
                      }),
                      null === b &&
                        Object(N.jsxs)(N.Fragment, {
                          children: [
                            Object(N.jsx)(T.a, {
                              component: 'div',
                              variant: 'body1',
                              style: { paddingRight: 10, paddingLeft: 30 },
                              children: 'Performance Metric:'
                            }),
                            Object(N.jsx)(ze, {
                              variant: 'standard',
                              name: 'currentMetric',
                              onChange: P,
                              value: O.currentMetric,
                              children: Object.keys(Ie).map(function(e, t) {
                                return Object(N.jsx)(M.a, { value: e, children: Ie[e] }, e)
                              })
                            })
                          ]
                        })
                    ]
                  }),
                  Object(N.jsx)(F.a, {
                    disablePadding: !0,
                    style: { overflow: 'auto', height: '100%', padding: 40, paddingTop: 0 },
                    children: L.map(function(e, t) {
                      return Object(N.jsxs)(
                        B.a,
                        {
                          button: !0,
                          divider: !0,
                          style: Fe,
                          onClick: function() {
                            p(t), x('/test/'.concat(t, '/').concat(e.id))
                          },
                          children: [
                            Object(N.jsx)(z.a, { sx: { color: 'white', minWidth: 36 }, children: Object(N.jsx)(pt, { test: e }) }),
                            Object(N.jsx)(D.a, { primary: ''.concat(e.title), secondary: 'ID: '.concat(fe(e.id)), style: { flexGrow: 1, width: 0 } }),
                            Object(N.jsx)(C.a, { style: { opacity: b === t ? 1 : 0 } }),
                            null === b &&
                              Object(N.jsx)('div', {
                                style: { flex: 1, flexDirection: 'row', flexGrow: 1 },
                                children: Object(N.jsx)('div', { children: De(e, 0, O.currentMetric, W) })
                              })
                          ]
                        },
                        e.id + t
                      )
                    })
                  })
                ]
              })
            ]
          })
        },
        Ae = n(263),
        Ee = function(e) {
          return (
            (null === e || void 0 === e ? void 0 : e.name) +
            ' / ' +
            (null === e || void 0 === e ? void 0 : e.os) +
            ' ' +
            ((null === e || void 0 === e ? void 0 : e.osVersion) || '')
          )
        },
        Pe = function(e) {
          var t,
            n,
            i,
            a = e.test,
            c = e.failStepRef,
            r = null === a || void 0 === a ? void 0 : a.testRuns[(null === a || void 0 === a ? void 0 : a.testRuns.length) - 1]
          console.info('test.testRuns'), console.table(a.testRuns)
          var s = null === r || void 0 === r ? void 0 : r.appVersions[0],
            l = null === r || void 0 === r ? void 0 : r.stepResults,
            d = l.filter(function(e) {
              return e.success
            }),
            u = l.filter(function(e) {
              return !e.success
            }),
            h = u.length > 0,
            v = o.a.useCallback(
              function() {
                c.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
              },
              [c]
            )
          o.a.useEffect(
            function() {
              var e = document.getElementById('scrollContainer')
              h
                ? setTimeout(function() {
                    return v()
                  }, 600)
                : null === e || void 0 === e || e.scrollTo({ top: 0, left: 0, behavior: 'auto' })
            },
            [a.id, h, c, v]
          )
          var j = { fontSize: '1rem', textDecoration: 'auto', cursor: 'auto' }
          return (
            u.length > 0 && ((j.textDecoration = 'underline'), (j.cursor = 'pointer')),
            r
              ? Object(N.jsxs)('div', {
                  children: [
                    Object(N.jsxs)(T.a, {
                      variant: 'h1',
                      component: 'div',
                      style: { marginBottom: 20, marginTop: 7, fontSize: '1.7rem' },
                      children: [a.title, ' (ID: ', fe(a.id), ')']
                    }),
                    Object(N.jsxs)(Ae.a, {
                      container: !0,
                      spacing: 3,
                      children: [
                        Object(N.jsxs)(Ae.a, {
                          item: !0,
                          xs: 6,
                          children: [
                            Object(N.jsx)(Ce, { name: 'Test Created:', value: ye(null === a || void 0 === a ? void 0 : a.createdOn) }),
                            Object(N.jsx)(Ce, { name: 'Package Name:', value: null === s || void 0 === s ? void 0 : s.packageName }),
                            Object(N.jsx)(Ce, { name: 'Test Run Duration:', value: Oe(null === r || void 0 === r ? void 0 : r.duration) }),
                            Object(N.jsx)(Ce, { name: 'App Min Sdk:', value: null === s || void 0 === s ? void 0 : s.minSdk }),
                            Object(N.jsx)(Ce, { name: 'Install Date:', value: ye(null === s || void 0 === s ? void 0 : s.firstInstallTime) })
                          ]
                        }),
                        Object(N.jsxs)(Ae.a, {
                          item: !0,
                          xs: 6,
                          children: [
                            Object(N.jsx)(Ce, { name: 'Test Run Date:', value: ye(null === r || void 0 === r ? void 0 : r.date) }),
                            Object(N.jsx)(Ce, { name: 'Package Version:', value: null === s || void 0 === s ? void 0 : s.name }),
                            Object(N.jsx)(Ce, { name: 'App Code:', value: null === s || void 0 === s ? void 0 : s.code }),
                            Object(N.jsx)(Ce, { name: 'App Target Sdk:', value: null === s || void 0 === s ? void 0 : s.targetSdk }),
                            Object(N.jsx)(Ce, { name: 'Last Update Date:', value: ye(null === s || void 0 === s ? void 0 : s.lastUpdateTime) })
                          ]
                        })
                      ]
                    }),
                    Object(N.jsxs)(Ae.a, {
                      container: !0,
                      spacing: 3,
                      style: { marginBottom: 20 },
                      children: [
                        Object(N.jsx)(Ae.a, {
                          item: !0,
                          xs: 6,
                          children:
                            null === (t = a.devices) || void 0 === t
                              ? void 0
                              : t.map(function(e, t) {
                                  return Object(N.jsx)(
                                    Ce,
                                    {
                                      className: ''.concat(t + 1 !== a.devices.length ? 'noSeparator' : ''),
                                      name: ''.concat(0 === t ? 'Device (Recorded):' : ''),
                                      value: Ee(e)
                                    },
                                    e.serial
                                  )
                                })
                        }),
                        Object(N.jsx)(Ae.a, {
                          item: !0,
                          xs: 6,
                          children:
                            null === (n = r.devices) || void 0 === n
                              ? void 0
                              : n.map(function(e, t) {
                                  return Object(N.jsx)(
                                    Ce,
                                    {
                                      className: ''.concat(t + 1 !== r.devices.length ? 'noSeparator' : ''),
                                      name: ''.concat(0 === t ? 'Device (Executed):' : ''),
                                      value: Ee(e)
                                    },
                                    e.serial
                                  )
                                })
                        })
                      ]
                    }),
                    Object(N.jsxs)('div', {
                      style: { borderRadius: 4, padding: 10, background: r.wasSuccessful ? y : O },
                      children: [
                        Object(N.jsxs)(T.a, {
                          sx: { fontSize: '1rem' },
                          variant: 'h6',
                          children: [
                            ''.concat(a.stepsCountWithSubTestSteps, ' steps: ').concat(d.length, ' successful / '),
                            Object(N.jsx)(T.a, {
                              component: 'span',
                              sx: j,
                              variant: 'h6',
                              onClick: function() {
                                return u.length > 0 ? v() : null
                              },
                              children: ''.concat(u.length, '  failed')
                            })
                          ]
                        }),
                        h &&
                          Object(N.jsxs)(T.a, {
                            sx: { fontSize: '1rem', whiteSpace: 'break-spaces' },
                            variant: 'h6',
                            children: ['Status Message:', ' '.concat(null === (i = u[0]) || void 0 === i ? void 0 : i.message)]
                          })
                      ]
                    })
                  ]
                })
              : null
          )
        },
        Ve = n(14),
        Ge = n(269),
        He = n(268),
        Je = n(264),
        Ue = 'data'
      var Ke = function(e) {
          var t = e.name,
            n = window.tagsMapping.find(function(e) {
              return e.name === t
            }),
            i = { backgroundColor: (null === n || void 0 === n ? void 0 : n.color) || p, marginLeft: 8, height: 20 },
            o = Object(N.jsx)(ee.a, { size: 'small', label: t, style: i })
          return Object(N.jsx)('span', {
            children: Object(N.jsx)(te.a, { title: (null === n || void 0 === n ? void 0 : n.description) || '', children: o })
          })
        },
        qe = n(136),
        _e = function(e) {
          var t = e.step,
            n = e.src,
            o = Object(i.useRef)(null),
            a = Object(i.useState)({ width: 500, height: 800 }),
            c = Object(s.a)(a, 2),
            r = c[0],
            l = c[1],
            d = function(e, t) {
              return ''
                .concat(e, ' ')
                .concat(r.width * t.x, ' ')
                .concat(r.height * t.y, ' ')
            },
            u = t.mouseMoveCoordinates,
            h = '',
            v = '',
            j = null,
            p = null
          if (u.length > 1) {
            h += d('M', u[0])
            for (var m = 1; m < u.length; m++) h += d('L', u[m])
            var f = u[0],
              g = u[u.length - 1],
              O = u[u.length - 2],
              y = g.x - O.x,
              w = g.y - O.y,
              R = (180 * Math.atan2(w, y)) / Math.PI
            ;(v = 'translate('
              .concat(r.width * g.x, ' ')
              .concat(r.height * g.y, ') rotate(')
              .concat(R, ' 0 0) translate(-2 -7)')),
              t.longClick &&
                ((p = Object(N.jsx)('circle', { cx: r.width * f.x, cy: r.height * f.y, r: 10, stroke: x, fill: x, strokeWidth: '10' })),
                (j = Object(N.jsx)('circle', { cx: r.width * f.x, cy: r.height * f.y, r: 10, stroke: b, fill: b, strokeWidth: '2' })))
          }
          return Object(N.jsxs)('div', {
            ref: o,
            style: { position: 'relative', width: 'fit-content', height: 'fit-content', cursor: 'crosshair' },
            children: [
              Object(N.jsx)('img', {
                style: { maxWidth: '100%', maxHeight: '-webkit-fill-available' },
                src: n,
                onLoad: function(e) {
                  var t = e.target
                  l({ width: t.offsetWidth, height: t.offsetHeight })
                }
              }),
              Object(N.jsxs)('svg', {
                style: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' },
                xmlns: 'https://www.w3.org/2000/svg',
                viewBox: '0 0 '.concat(r.width, ' ').concat(r.height),
                preserveAspectRatio: 'none',
                children: [
                  p,
                  Object(N.jsx)('path', { strokeWidth: '10', stroke: x, fill: 'none', strokeLinejoin: 'round', strokeLinecap: 'round', d: h }),
                  v &&
                    Object(N.jsx)('polygon', {
                      strokeWidth: '10',
                      strokeLinecap: 'round',
                      points: '2,7 0,0 11,7 0,14',
                      transform: v,
                      stroke: x,
                      fill: x
                    }),
                  j,
                  Object(N.jsx)('path', { strokeWidth: '2', stroke: b, fill: 'none', strokeLinejoin: 'round', strokeLinecap: 'round', d: h }),
                  v &&
                    Object(N.jsx)('polygon', {
                      strokeWidth: '2',
                      strokeLinecap: 'round',
                      points: '2,7 0,0 11,7 0,14',
                      transform: v,
                      stroke: b,
                      fill: b
                    })
                ]
              })
            ]
          })
        },
        Qe = n(252),
        Xe = function(e) {
          var t = e.positionSource.point,
            n = Object(i.useRef)(null),
            o = Object(i.useRef)(null),
            a = 100 * t.x + '%',
            c = 100 * t.y + '%'
          return Object(N.jsxs)('div', {
            ref: n,
            style: Object(l.a)({ position: 'relative', height: '200px', width: '200px', backgroundColor: 'rgba(100,100,100)' }, e.style),
            children: [
              e.children,
              Object(N.jsx)(Qe.a, {
                ref: o,
                style: {
                  color: '#FFFFFF',
                  position: 'absolute',
                  width: 10,
                  height: 10,
                  padding: 20,
                  borderRadius: 35,
                  left: 'calc('.concat(a, ' - 5px)'),
                  top: 'calc('.concat(c, ' - 5px)'),
                  cursor: 'grabbing',
                  zIndex: 101,
                  backgroundColor: b
                }
              })
            ]
          })
        },
        Ye = function(e) {
          var t = e.step,
            n = t.startPositionSource.point,
            i = t.endPositionSource.point,
            o = (n.x + i.x) / 2,
            a = (n.y + i.y) / 2,
            c = n.x - i.x,
            r = n.y - i.y,
            s = (180 * Math.atan2(r, c)) / Math.PI
          return Object(N.jsx)(G.a, {
            style: {
              position: 'absolute',
              backgroundColor: m,
              color: b,
              zIndex: 101,
              top: 'calc('.concat(100 * a, '% - 35px)'),
              left: 'calc('.concat(100 * o, '% - 35px)'),
              width: 70,
              height: 70,
              padding: 20,
              borderRadius: 35,
              transform: 'rotate('.concat(s, 'deg)')
            }
          })
        },
        Ze = 'DragAndDrop',
        $e = function(e) {
          var t = e.src,
            n = e.step
          return Object(N.jsxs)(N.Fragment, {
            children: [
              n.dragType === Ze && Object(N.jsx)(_e, { step: n, src: t }),
              n.dragType !== Ze &&
                Object(N.jsxs)(Xe, {
                  style: { position: 'relative', zIndex: 100, width: 'fit-content', height: 'fit-content' },
                  positionSource: n.endPositionSource,
                  children: [
                    Object(N.jsx)(Xe, {
                      style: { position: 'relative', zIndex: 100, width: 'fit-content', height: 'fit-content' },
                      positionSource: n.startPositionSource,
                      children: Object(N.jsx)('img', { style: { maxWidth: '100%', maxHeight: '-webkit-fill-available' }, src: t })
                    }),
                    Object(N.jsx)(Ye, { step: n })
                  ]
                })
            ]
          })
        },
        et = ['matchIndex', 'matches', 'selection', 'roi', 'maxWidth', 'style', 'src', 'children', 'step'],
        tt = function(e) {
          var t,
            n,
            i,
            o,
            a = e.match,
            c = e.opacity,
            r = e.style,
            s = {
              position: 'absolute',
              fontSize: 9,
              left: ''.concat(100 * (null === a || void 0 === a || null === (t = a.position) || void 0 === t ? void 0 : t.x), '%'),
              top: ''.concat(100 * (null === a || void 0 === a || null === (n = a.position) || void 0 === n ? void 0 : n.y), '%'),
              width: ''.concat(100 * (null === a || void 0 === a || null === (i = a.size) || void 0 === i ? void 0 : i.width), '%'),
              height: ''.concat(100 * (null === a || void 0 === a || null === (o = a.size) || void 0 === o ? void 0 : o.height), '%'),
              opacity: c || 1,
              border: '2px solid rgb(110,0,255)',
              outline: '2px solid '.concat('#ff00ff')
            }
          return r && (s = Object(l.a)(Object(l.a)({}, s), r)), Object(N.jsx)('div', { style: s })
        },
        nt = function(e) {
          var t = e.matchIndex,
            n = e.matches,
            i = e.selection,
            o = e.roi,
            a = e.maxWidth,
            c = e.style,
            r = e.src,
            s = e.children,
            d = e.step,
            u = Object(qe.a)(e, et)
          return Object(N.jsxs)(
            'div',
            Object(l.a)(
              Object(l.a)({}, u),
              {},
              {
                style: Object(l.a)({ position: 'relative', overflow: 'hidden', maxWidth: a, borderRadius: 5 }, c),
                children: [
                  'drag' !== d.type &&
                    Object(N.jsx)('img', { src: r, width: '100%', alt: 'ImageMatchView', style: { borderRadius: 5, display: 'block' } }),
                  'drag' === d.type && Object(N.jsx)($e, { step: d, src: r }),
                  n && n.length
                    ? n.map(function(e, n) {
                        return Object(N.jsx)(tt, { match: e, opacity: n === t ? 1 : 0.25 }, n)
                      })
                    : i && Object(N.jsx)(tt, { rect: i }),
                  o && Object(N.jsx)(tt, { rect: o, style: { color: '#CDEFA6' } }),
                  s
                ]
              }
            )
          )
        },
        it = function(e) {
          var t = e.height,
            n = e.showTip,
            i = void 0 === n || n
          return Object(N.jsx)('div', {
            className: 'vl',
            style: { borderRight: '2px solid '.concat(f), height: t || '30px' },
            children:
              i &&
              Object(N.jsx)('div', {
                className: 'point',
                style: {
                  position: 'absolute',
                  borderTop: '12px solid '.concat(f),
                  borderRight: '8px solid transparent',
                  borderLeft: '8px solid transparent',
                  marginLeft: '-7px',
                  top: '100%'
                }
              })
          })
        },
        ot = { fontSize: '0.7rem', color: 'rgba(0, 0, 0, 0.6)' },
        at = { width: 'auto', maxHeight: '3rem' },
        ct = function(e) {
          var t = parseFloat(e)
          return ''.concat((100 * t).toFixed(2), '%')
        },
        rt = function(e, t) {
          return Object(N.jsxs)(o.a.Fragment, {
            children: [
              Object(N.jsx)('span', { children: t }),
              'comment' !== e.type && Object(N.jsx)('span', { style: ot, children: ' ID: '.concat(fe(null === e || void 0 === e ? void 0 : e.id)) })
            ]
          })
        },
        st = function(e, t, n) {
          return Object(N.jsx)(o.a.Fragment, { children: Object(N.jsx)('img', { style: n, src: t, alt: e.id }) })
        },
        lt = function(e, t) {
          if (e.stepResults[t]) return Object(N.jsx)(it, { height: '30px' })
        },
        dt = function(e) {
          var t,
            n = e.test,
            i = e.testRun,
            a = e.index,
            c = e.step,
            r = e.refList,
            d = e.stepResult,
            u = e.referenceSResult,
            h = e.failStepRef,
            v = e.refTestRun,
            j = e.baseSrc,
            b = o.a.useState(!1),
            p = Object(s.a)(b, 2),
            x = p[0],
            m = p[1],
            R = o.a.useState(!1),
            k = Object(s.a)(R, 2),
            S = k[0],
            C = k[1],
            L = j ? 'file://'.concat(j) : './'.concat(Ue, '/').concat(n.id),
            I = 'testRuns/'.concat(i.id),
            M = (function(e) {
              var t,
                n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 'all',
                i = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2],
                o = '',
                a = '',
                c = '',
                r = null,
                s = e.longClick ? ' and drop' : ''
              if ('drag' === e.type)
                if (e.stopOnFingerprintFound) c = 'until fingerprint is found'
                else if (be(e)) {
                  var l = je(e)
                  ;(r = l && l > 0 ? V.a : G.a), (o = he(le(e))), (a = he(de(e))), (c = ''.concat(o, ' -> ').concat(a))
                } else {
                  var d = ve(e)
                  ;(r = d && d > 0 ? H.a : J.a), (o = ue(le(e))), (a = ue(de(e))), (c = ''.concat(o, ' -> ').concat(a))
                }
              if ('text' === e.type) {
                var u = []
                e.clearText && u.push('Clear text'), e.text && u.push('Type'), (t = u.join(' and '))
              }
              var h = 'No description found for this element',
                v = {
                  click: { icon: U.a, primary: e.longClick ? 'Long Click' : 'Click', secondary: 'on fingerprint', cmdLineIcon: '\ud83d\udc46' },
                  comment: { primary: Object(N.jsx)('b', { children: e.title }), secondary: e.description, cmdLineIcon: '\ud83d\udcac' },
                  drag: { icon: r, primary: 'Drag '.concat(pe(e) ? 'around' : xe(e) || '').concat(s), secondary: c, cmdLineIcon: '\ud83d\udc46' },
                  waitForTemplate: { icon: K.a, primary: 'Wait', secondary: 'for fingerprint to show', cmdLineIcon: '\u23f3' },
                  waitForDuration: {
                    icon: K.a,
                    primary: 'Wait',
                    secondary: 'for '.concat(e.duration, ' ms ').concat('waitForAnimationFinish' === e.subtype ? ' (screen animation)' : ''),
                    cmdLineIcon: '\u23f3'
                  },
                  waitForKeyboard: { icon: K.a, primary: 'Wait', secondary: 'for keyboard to show up', cmdLineIcon: '\u2328\ufe0f' },
                  text: { icon: q.a, primary: t, secondary: e.text && '"'.concat(e.text, '"'), cmdLineIcon: '\ud83d\udcdd' },
                  scanText: { primary: 'Scan for text', secondary: '', cmdLineIcon: '\ud83d\udd0e' },
                  home: { icon: _.a, primary: 'Home press', secondary: '', cmdLineIcon: '\ud83c\udfe0' },
                  back: { icon: Q.a, primary: 'Back press', secondary: '', cmdLineIcon: '\u2b05\ufe0f' },
                  appSwitch: { icon: X.a, primary: 'Show app switch', secondary: '', cmdLineIcon: '\ud83d\udcf1' },
                  templateAssertion: { icon: Y.a, primary: 'Check specific element', secondary: '', cmdLineIcon: '\u2705' },
                  someContentAssertion: { primary: 'Check some dynamic element', secondary: '', cmdLineIcon: '\u2705' },
                  someContentClick: { primary: 'Click', secondary: 'on some content at x/y', cmdLineIcon: '\ud83d\udc46' },
                  startApp: { icon: P, primary: 'Start App', secondary: [e.packageName, e.iosBundleId].join(' | '), cmdLineIcon: '\ud83d\ude80' },
                  switchDevice: {
                    icon: Z.a,
                    primary: 'Switch Device',
                    secondary: [e.deviceId, e.deviceName].join(' | '),
                    cmdLineIcon: '\ud83d\udcf1'
                  },
                  stopApp: { icon: E, primary: 'Stop App', secondary: e.packageName ? e.packageName : e.iosBundleId, cmdLineIcon: '\ud83d\udeec' },
                  execScript: {
                    icon: A,
                    primary: 'cli' === e.language ? 'Exec Command Line Script' : 'Exec JavaScript',
                    secondary: e.script,
                    cmdLineIcon: '>'
                  },
                  subTest: { icon: $.a, primary: 'SubTest', secondary: '', cmdLineIcon: '>' },
                  scanTextAssertion: {
                    icon: Y.a,
                    primary: 'Check for text',
                    secondary: e.assertionJs ? 'Check: '.concat(e.assertionJs) : 'Scanned text should '.concat(Re(e), ' "').concat(e.searchText, '"'),
                    cmdLineIcon: '\u2705'
                  },
                  scanTextClick: { primary: 'Click on text', secondary: '"'.concat(e.searchText, '"'), cmdLineIcon: '\ud83d\udc46' },
                  scanTextWait: {
                    icon: K.a,
                    primary: 'Wait',
                    secondary: e.assertionJs
                      ? 'Until true: '.concat(e.assertionJs)
                      : 'Until scanned text '.concat(Re(e), ' "').concat(e.searchText, '"'),
                    cmdLineIcon: '\u23f3'
                  }
                }[e.type] || { primary: h, secondary: h, icon: U.a, cmdLineIcon: '\ud83d\udc46' }
              return (
                e.optional && (v.primary = 'Optional '.concat(v.primary)),
                i &&
                  e.tags &&
                  (v.secondary = Object(N.jsxs)('span', {
                    children: [
                      v.secondary,
                      ' ',
                      e.tags.map(function(e) {
                        return Object(N.jsx)(oe, { name: e }, e)
                      })
                    ]
                  })),
                'all' === n ? v : v[n]
              )
            })(c, 'all', !1),
            F = null === d || void 0 === d ? void 0 : d.success,
            B = o.a.createRef(),
            z = null === d || void 0 === d ? void 0 : d.copy,
            D = '0px solid '.concat(F ? '#c8d051' : g),
            W = Number((null === n || void 0 === n ? void 0 : n.similarityWarnThreshold) || '0.00'),
            ee = i.devices.find(function(e) {
              return e.serial === d.executedOn
            }),
            te = 'comment' === c.type,
            ne =
              (null === ee || void 0 === ee ? void 0 : ee.currentRotation) === (null === ee || void 0 === ee ? void 0 : ee.rotationVars.landscape) ||
              (null === ee || void 0 === ee ? void 0 : ee.currentRotation) === (null === ee || void 0 === ee ? void 0 : ee.rotationVars.seascape)
          ;(ne = !!ee && ne), console.log('deviceData', ee, ne), r.push(B)
          var ie =
            (null === c || void 0 === c ? void 0 : c.originalFrame) && ''.concat(L, '/').concat(null === c || void 0 === c ? void 0 : c.originalFrame)
          u && (ie = ''.concat(L, '/').concat('testRuns/'.concat(null === v || void 0 === v ? void 0 : v.id, '/') + u.screenshot))
          var ae =
              (null === d || void 0 === d ? void 0 : d.screenshot) &&
              ''
                .concat(L, '/')
                .concat(I, '/')
                .concat(null === d || void 0 === d ? void 0 : d.screenshot),
            ce = function(e) {
              var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
                n = 'org' === e,
                i = null !== d && void 0 !== d && d.success ? w : g,
                o = n ? w : i,
                a = !!n && !(null === d || void 0 === d || !d.screenshot),
                r = (!!n || (null !== c && void 0 !== c && c.originalFrame), n ? (u ? 'Reference Test Run' : 'Original') : 'Test Run'),
                s =
                  n && !u
                    ? null === c || void 0 === c
                      ? void 0
                      : c.createdOn
                    : u && n
                    ? u.createdOn
                    : null === d || void 0 === d
                    ? void 0
                    : d.createdOn,
                h = t
                  ? (function() {
                      return {
                        position: 'absolute',
                        width: '600px',
                        bottom: arguments.length > 0 && void 0 !== arguments[0] && !arguments[0] ? '0' : '200px'
                      }
                    })(a)
                  : { position: 'absolute', bottom: 0, textAlign: 'center', width: '100%', borderRadius: '0 0 4px 4px' }
              return Object(N.jsxs)('div', {
                className: 'info',
                style: Object(l.a)(Object(l.a)({}, h), {}, { backgroundColor: o, paddingTop: 10, height: 55 }),
                children: [
                  Object(N.jsxs)(T.a, { variant: 'body1', children: [r, ' Screenshot'] }),
                  Object(N.jsx)(T.a, { variant: 'body2', children: we(new Date(s)) })
                ]
              })
            },
            re = function(e, t) {
              if (!e) return se(t)
              var n = 'org' === t ? (null === c || void 0 === c ? void 0 : c.matches) : null === d || void 0 === d ? void 0 : d.matches
              return (
                u && (n = u.matches),
                Object(N.jsxs)('div', {
                  className: 'matchResult',
                  style: { flexBasis: '50%', position: 'relative' },
                  children: [
                    Object(N.jsx)(nt, {
                      matchIndex: null === c || void 0 === c ? void 0 : c.matchIndex,
                      matches: n,
                      selection: null === c || void 0 === c ? void 0 : c.selection,
                      roi: null === c || void 0 === c ? void 0 : c.region,
                      width: 200,
                      src: e,
                      step: c
                    }),
                    ce(t, !1)
                  ]
                })
              )
            },
            se = function(e) {
              return Object(N.jsxs)('div', {
                style: {
                  display: 'flex',
                  justifyContent: 'center',
                  alignItems: 'center',
                  flexGrow: 1,
                  position: 'relative',
                  backgroundColor: f,
                  borderRadius: 4,
                  minHeight: 300
                },
                children: [Object(N.jsx)(T.a, { children: 'Not available' }), ce(e, !1)]
              })
            },
            me = 600
          return Object(N.jsxs)(N.Fragment, {
            children: [
              Object(N.jsxs)('div', {
                className: 'stepWrapper',
                ref: z || F ? null : h,
                style: { minWidth: me, maxWidth: me, border: z ? '' : D },
                children: [
                  Object(N.jsx)(He.a, {
                    avatar:
                      (!te &&
                        Object(N.jsx)(Je.a, {
                          style: { backgroundColor: F ? w : g },
                          'aria-label': 'step-no',
                          children: M.icon && Object(N.jsx)(M.icon, {})
                        })) ||
                      Object(N.jsx)('p', {}),
                    title: rt(c, M.primary),
                    subheader: Object(N.jsxs)(N.Fragment, {
                      children: [
                        Object(N.jsx)('span', { style: { whiteSpace: 'pre-wrap', overflow: 'hidden' }, children: M.secondary }),
                        null === c || void 0 === c || null === (t = c.tags) || void 0 === t
                          ? void 0
                          : t.map(function(e, t) {
                              return Object(N.jsx)(Ke, { name: e }, t)
                            })
                      ]
                    }),
                    action:
                      (null === c || void 0 === c ? void 0 : c.image) &&
                      Object(N.jsx)(N.Fragment, { children: st(n, ''.concat(L, '/').concat(null === c || void 0 === c ? void 0 : c.image), at) }),
                    style: {}
                  }),
                  Object(N.jsxs)('div', {
                    style: { borderBottom: '2px solid ' + f },
                    children: [
                      Object(N.jsxs)('div', {
                        style: { position: 'relative', paddingBottom: 20 },
                        children: [
                          !te &&
                            Object(N.jsxs)('div', {
                              style: { display: 'flex', flexDirection: ne ? 'column' : 'row' },
                              children: [re(ie, 'org'), Object(N.jsx)('div', { style: { height: 10, width: 10 } }), re(ae, 'testRun')]
                            }),
                          (null === d || void 0 === d ? void 0 : d.screenSimilarity) &&
                            Object(N.jsxs)(N.Fragment, {
                              children: [
                                Object(N.jsx)('div', {
                                  style: { position: 'absolute', bottom: 0, width: '100%', height: 100, overflow: 'hidden' },
                                  children: Object(N.jsxs)('div', {
                                    className: 'similarityBatch '.concat(
                                      Number(null === d || void 0 === d ? void 0 : d.screenSimilarity) > W ? 'above' : 'below'
                                    ),
                                    onMouseEnter: function(e) {
                                      return m(!0)
                                    },
                                    onMouseLeave: function(e) {
                                      return m(!1)
                                    },
                                    children: [
                                      Object(N.jsx)(T.a, {
                                        variant: 'body1',
                                        children: ct(null === d || void 0 === d ? void 0 : d.screenSimilarity)
                                      }),
                                      Object(N.jsx)(T.a, { variant: 'body2', children: 'Screen Similarity' })
                                    ]
                                  })
                                }),
                                (x || S) &&
                                  ie &&
                                  ae &&
                                  Object(N.jsxs)('div', {
                                    onMouseEnter: function(e) {
                                      return C(!0)
                                    },
                                    onMouseLeave: function(e) {
                                      return C(!1)
                                    },
                                    className: 'diffImg',
                                    style: {
                                      width: me,
                                      height: me,
                                      position: 'absolute',
                                      justifyContent: 'center',
                                      alignItems: 'center',
                                      display: 'flex',
                                      backgroundColor: '#FFF',
                                      boxShadow: '0px 2px 28px #00000057',
                                      borderRadius: 5,
                                      top: 0
                                    },
                                    children: [
                                      Object(N.jsx)('img', {
                                        src: ie,
                                        style: { position: 'absolute', maxHeight: me, maxWidth: me, boxShadow: '0px 2px 28px #00000057' }
                                      }),
                                      Object(N.jsx)('img', {
                                        src: ae,
                                        style: { position: 'absolute', maxHeight: me, maxWidth: me, mixBlendMode: 'difference' }
                                      })
                                    ]
                                  })
                              ]
                            })
                        ]
                      }),
                      (null === d || void 0 === d ? void 0 : d.message) &&
                        Object(N.jsx)('div', {
                          style: { borderRadius: 4, padding: 10, background: F ? y : O, marginBottom: 20 },
                          children: Object(N.jsx)(T.a, {
                            variant: 'body2',
                            sx: { color: F ? '#577633' : '#c93e33', whiteSpace: 'pre-wrap', fontFamily: 'monospace' },
                            children: null === d || void 0 === d ? void 0 : d.message
                          })
                        })
                    ]
                  })
                ]
              }),
              lt(i, a + 1)
            ]
          })
        },
        ut = { display: 'flex', flexDirection: 'column', mt: '10px', justifyContent: 'center', alignItems: 'center', position: 'relative' },
        ht = function(e) {
          var t = e.test,
            n = e.failStepRef,
            i = e.baseSrc,
            o = null === t || void 0 === t ? void 0 : t.testRuns[(null === t || void 0 === t ? void 0 : t.testRuns.length) - 1],
            a =
              null === t || void 0 === t
                ? void 0
                : t.testRuns.find(function(e, n) {
                    return e.wasSuccessful && e.stepResults.length && t.testRuns.length !== n + 1
                  })
          if (!o) return null
          var c = Object(Ve.a)(null === o || void 0 === o ? void 0 : o.stepResults),
            r = [],
            s = null,
            d = null,
            u = null
          return (
            (function(e) {
              var n = null === t || void 0 === t || null === (e = t.steps) || void 0 === e ? void 0 : e.length,
                i = n - (null === c || void 0 === c ? void 0 : c.length)
              if (i > 0)
                for (var o = n - i; o < n; o++)
                  (c[o] = {}), (c[o].step = null === t || void 0 === t ? void 0 : t.steps[o]), (c[o].success = !1), (c[o].copy = !0)
            })(),
            Object(N.jsx)(N.Fragment, {
              children:
                c.length &&
                c.map(function(e, c) {
                  var h,
                    v = null !== e && void 0 !== e && e.copy ? '0.5' : '1'
                  return (
                    (s = e),
                    (d =
                      (null === a || void 0 === a || null === (h = a.stepResults) || void 0 === h
                        ? void 0
                        : h.find(function(e) {
                            var t
                            return e.step.id === (null === (t = s) || void 0 === t ? void 0 : t.step.id)
                          })) || null),
                    'subTest' === (u = e.step).type
                      ? null
                      : Object(N.jsx)(
                          Ge.a,
                          {
                            className: 'stepCard',
                            sx: Object(l.a)(Object(l.a)({}, ut), {}, { opacity: v }),
                            children: Object(N.jsx)(dt, {
                              failStepRef: n,
                              test: t,
                              refList: r,
                              step: u,
                              stepResult: s,
                              referenceSResult: d,
                              refTestRun: a,
                              testRun: o,
                              index: c,
                              baseSrc: i
                            })
                          },
                          c
                        )
                  )
                })
            })
          )
        },
        vt = n(137),
        jt = n.n(vt),
        bt = n(270),
        pt = function(e) {
          var t = e.test,
            n = './'.concat(Ue, '/').concat(t.id),
            i = null === t || void 0 === t ? void 0 : t.testRuns[(null === t || void 0 === t ? void 0 : t.testRuns.length) - 1],
            o = i ? (i.wasSuccessful ? w : g) : p,
            a = t.steps.filter(function(e) {
              return Boolean(e.image)
            }),
            c = Object(N.jsx)(jt.a, {}),
            r = ''
          if (a.length > 0) {
            var s = a[a.length - 1]
            r = ''.concat(n, '/').concat(s.originalFrame)
          }
          var l = Object(N.jsx)(bt.a, { src: r, style: { width: 18, height: 18 }, children: c })
          return Object(N.jsx)('div', {
            className: 'stack-container',
            children: Object(N.jsx)('div', { style: { borderRadius: '50%', border: '2px solid '.concat(o) }, children: l })
          })
        },
        xt = n(271),
        mt = n(253),
        ft = function(e) {
          var t = e.setActiveTab,
            n = Object(d.p)(),
            i = n.testId,
            a = n.testIndex,
            c = void 0 === a ? 0 : a,
            r = Object(d.n)(),
            l = batchRun.tests || [],
            u = o.a.useRef(null),
            h = o.a.useState(void 0),
            v = Object(s.a)(h, 2),
            j = v[0],
            b = v[1]
          return (
            o.a.useEffect(function() {
              return t(Number(c))
            }, []),
            o.a.useEffect(
              function() {
                return b(
                  l.find(function(e) {
                    return e.id === i
                  })
                )
              },
              [i]
            ),
            Object(N.jsxs)(N.Fragment, {
              children: [
                Object(N.jsx)(xt.a, {
                  id: 'closeButton',
                  style: { position: 'fixed', right: 30, top: 40, backgroundColor: m, zIndex: 100 },
                  onClick: function() {
                    t(null), r('/')
                  },
                  children: Object(N.jsx)(mt.a, {})
                }),
                j &&
                  Object(N.jsxs)('div', {
                    id: 'scrollContainer',
                    style: { flexGrow: 1, overflow: 'scroll', padding: 40 },
                    children: [Object(N.jsx)(Pe, { test: j, failStepRef: u }), Object(N.jsx)(ht, { test: j, failStepRef: u })]
                  }),
                !j && Object(N.jsx)('p', { children: 'Test not found!' })
              ]
            })
          )
        },
        gt = {
          typography: {
            h1: { fontSize: '1.7rem', fontWeight: 400 },
            h2: { fontSize: '1.2rem', fontWeight: 400 },
            h3: { fontSize: '0.8rem', fontWeight: 400, color: v, marginBottom: 3 },
            h4: { fontSize: '0.7rem', fontWeight: 400 },
            h5: { fontSize: '0.5rem', fontWeight: 400 },
            h6: { fontSize: '1.2rem', fontWeight: 400 },
            caption: { color: '#999999', fontSize: '0.7rem' },
            body1: { fontWeight: 400 },
            body2: { fontSize: '0.7rem', fontWeight: 400 },
            subtitle1: { fontWeight: 400 }
          }
        },
        Ot = Object(u.a)(Object(l.a)(Object(l.a)({}, gt), {}, { palette: { type: 'dark', primary: { main: h }, secondary: { main: b } } })),
        yt = Object(u.a)(
          Object(l.a)(
            Object(l.a)({}, gt),
            {},
            { palette: { type: 'light', text: { primary: '#60626b', secondary: '#b4b4b4' }, primary: { main: h }, secondary: { main: b } } }
          )
        )
      ;(yt.typography.h1.color = h), (yt.typography.h2.color = h)
      var wt = function() {
        var e = o.a.useState(null),
          t = Object(s.a)(e, 2),
          n = t[0],
          i = t[1]
        return (
          o.a.useEffect(function() {
            !(function() {
              try {
                var e, t
                if (null === (e = batchRun) || void 0 === e || !e.id || null === (t = batchRun) || void 0 === t || !t.tests)
                  return void alert('Invalid data OR Report file.')
              } catch (n) {
                alert('Invalid data OR Report file.')
              }
            })()
          }, []),
          Object(N.jsxs)(N.Fragment, {
            children: [
              Object(N.jsx)(R.a, { theme: Ot, children: Object(N.jsx)(Ne, { activeTab: n, setActiveTab: i }) }),
              Object(N.jsx)(R.a, {
                theme: yt,
                children: Object(N.jsxs)(d.c, {
                  children: [
                    Object(N.jsx)(d.a, { path: '/', element: Object(N.jsx)(N.Fragment, {}) }),
                    Object(N.jsx)(d.a, { path: '/test/:testIndex/:testId', element: Object(N.jsx)(ft, { setActiveTab: i }) })
                  ]
                })
              })
            ]
          })
        )
      }
      c.a.render(
        Object(N.jsx)(o.a.StrictMode, { children: Object(N.jsx)(r.a, { children: Object(N.jsx)(wt, {}) }) }),
        document.getElementById('root')
      )
    }
  },
  [[174, 1, 2]]
])
//# sourceMappingURL=main.fbb2934b.chunk.js.map
