<commit_before>/* eslint-env browser */
/* global module */

export function addDebugMetadata(instance, stackIndex) {
  const {stack, stacktrace, message} = new Error("stacktrace source");
  instance.debug = {
    stackInfo: {stack, stacktrace, message},
    stackIndex: stackIndex,
  };
}

class BrowserDebugEngine {
  constructor(worker) {
    if (!worker) {
      const workerBlob = new Blob(
        [
          `importScripts("https://unpkg.com/css-to-js-sourcemap-worker@2.0.4/worker.js")`,
        ],
        {type: "application/javascript"},
      );
      worker = new Worker(URL.createObjectURL(workerBlob));
      worker.postMessage({
        id: "init_wasm",
        url: "https://unpkg.com/css-to-js-sourcemap-worker@2.0.4/mappings.wasm",
      });
      worker.postMessage({
        id: "set_render_interval",
        interval: 120,
      });
      if (module.hot) {<commit_msg>Upgrade css-to-js-sourcemap-worker<commit_after>/* eslint-env browser */
/* global module */

export function addDebugMetadata(instance, stackIndex) {
  const {stack, stacktrace, message} = new Error("stacktrace source");
  instance.debug = {
    stackInfo: {stack, stacktrace, message},
    stackIndex: stackIndex,
  };
}

class BrowserDebugEngine {
  constructor(worker) {
    if (!worker) {
      const workerBlob = new Blob(
        [
          `importScripts("https://unpkg.com/css-to-js-sourcemap-worker@2.0.5/worker.js")`,
        ],
        {type: "application/javascript"},
      );
      worker = new Worker(URL.createObjectURL(workerBlob));
      worker.postMessage({
        id: "init_wasm",
        url: "https://unpkg.com/css-to-js-sourcemap-worker@2.0.5/mappings.wasm",
      });
      worker.postMessage({
        id: "set_render_interval",
        interval: 120,
      });
      if (module.hot) {
{'fraction_non_alphanumeric': 0.15069252077562326, 'fraction_numerical': 0.009972299168975069, 'mean_word_length': 2.7160493827160495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2636690', 'n_tokens_mistral': 580, 'n_tokens_neox': 571, 'n_words': 101}