<commit_before><!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>HSBC mocks</title>
    <style>
      html,
      body,
      h1 {
        margin: 0;
        padding: 0;
      }
      body {
        margin: 1rem;
        padding: 1rem;
        font-family: sans-serif;
        font-size: 12px;
        color: #fea;
        background: #222;
      }
      h1 {
        padding-bottom: 1rem;
      }
      #messages {
        overflow: hidden;
      }
    </style>

    <!-- Debugging -->
    <script src="/socket.io/socket.io.js"></script>
  </head>
  <body>
    <div id="root">
      <h1>HSBC mocks</h1>

      <form id="data-form">
        <fieldset>
          <button data-key="HYDRATE" type="button" onclick="hydrate();">
            HYDRATE
          </button>
        </fieldset>
        <fieldset>
          <button data-key="ACCOUNT_SUMMARY">ACCOUNT_SUMMARY</button>
          <button data-key="STATEMENT_ACCOUNT_LIST">
            STATEMENT_ACCOUNT_LIST
          </button>
          <button data-key="STATEMENT_DETAIL">STATEMENT_DETAIL</button>
        </fieldset>
      </form>

      <pre id="messages"></pre>
      <div id="statements"></div>
    </div>
    <script>
      //
      // Message bus
      //

      const messagesEl = document.querySelector('#messages')
      const messagesSeen = []

      let maxEventWidth = -1

      const renderMessagesSeen = () => {
        if (!messagesEl) {
          return
        }
        messagesEl.innerText = messagesSeen
          .map(detail => {
            const { eventName, args, timestamp } = detail
            const time = new Date(timestamp).toLocaleTimeString('en-GB')
            maxEventWidth = Math.max(maxEventWidth, eventName.length)
            return [
              time,
              eventName.padEnd(maxEventWidth),
              JSON.stringify(args)
            ].join(' | ')
          })
          .join('\n')<commit_msg>Guard against log-window not working when debugging Extension<commit_after><!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>HSBC mocks</title>
    <style>
      html,
      body,
      h1 {
        margin: 0;
        padding: 0;
      }
      body {
        margin: 1rem;
        padding: 1rem;
        font-family: sans-serif;
        font-size: 12px;
        color: #fea;
        background: #222;
      }
      h1 {
        padding-bottom: 1rem;
      }
      #messages {
        overflow: hidden;
      }
    </style>

    <!-- Debugging -->
    <script src="/socket.io/socket.io.js"></script>
  </head>
  <body>
    <div id="root">
      <h1>HSBC mocks</h1>

      <form id="data-form">
        <fieldset>
          <button data-key="HYDRATE" type="button" onclick="hydrate();">
            HYDRATE
          </button>
        </fieldset>
        <fieldset>
          <button data-key="ACCOUNT_SUMMARY">ACCOUNT_SUMMARY</button>
          <button data-key="STATEMENT_ACCOUNT_LIST">
            STATEMENT_ACCOUNT_LIST
          </button>
          <button data-key="STATEMENT_DETAIL">STATEMENT_DETAIL</button>
        </fieldset>
      </form>

      <pre id="messages"></pre>
      <div id="statements"></div>
    </div>
    <script>
      //
      // Message bus
      //

      const messagesEl = document.querySelector('#messages')
      const messagesSeen = []

      let maxEventWidth = -1

      const renderMessagesSeen = () => {
        if (!messagesEl) {
          return
        }
        messagesEl.innerText = messagesSeen
          .map(detail => {
            const {
              eventName = '<UNKNOWN>',
              args = [],
              timestamp = Date.now()
            } = detail || {}
            const time = new Date(timestamp).toLocaleTimeString('en-GB')
            maxEventWidth = Math.max(maxEventWidth, eventName.length)
            return [
              time,
              eventName.padEnd(maxEventWidth),
              JSON.stringify(args)
            ].join(' | ')
          })
          .join('\n')
{'fraction_non_alphanumeric': 0.13659147869674185, 'fraction_numerical': 0.008020050125313283, 'mean_word_length': 1.5748387096774195, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 80, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2345097', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1192, 'n_words': 224}