<commit_before>export {
  dirtyTransform
} from './dirty/dirty'

import TransformComputer from './asm/transform.asm'
import TransformWASMDefinitions from '../build/transform'
import TransformWASM from 'file-loader!./../build/transform.wasm'

const TrueMeasurements = {
  width: 0,
  height: 0,
  get viewportWidth () {
    return this.width
  },
  get viewportHeight () {
    return this.height
  }
}

let memorySize = 0x100
let memory: WebAssembly.Memory

try {
  memory = new WebAssembly.Memory( { initial: memorySize } )

  fetch( TransformWASM ).then( ( response: Response ) => {
    return response.arrayBuffer()
  }).then( buffer => {
    return WebAssembly.compile( buffer )
  }).then( module => {
    return WebAssembly.instantiate( module, {
      env: {
        memory
      }
    })
  }).then( instance => {
    Object.assign( TransformModule, instance.exports )
    TransformModule.start( foreign.parameterStart )
    setViewport()
  })
}
catch ( e ) {
  memory = <any> {
    buffer: new ArrayBuffer( 0x10000 * memorySize )
  }
}

let moduleBuffer = memory.buffer
let foreign = {
  result: 0x1000,
  accumulator: 0x1010,
  store: 0x1020,

  transformationStart: 0x1030,
  transformationOffsetDial: 0x2,
  transformationOffsetParam: 0x4,
  transformationSize: 0x8,

  parameterStart: memorySize / 2,
  parameterOffsetValue: 0x0,<commit_msg>Using async imports.<commit_after>export {
  dirtyTransform
} from './dirty/dirty'

import TransformComputer from './asm/transform.asm'
import TransformWASMDefinitions from '../build/transform'

const TrueMeasurements = {
  width: 0,
  height: 0,
  get viewportWidth () {
    return this.width
  },
  get viewportHeight () {
    return this.height
  }
}

let memorySize = 0x100
let memory: WebAssembly.Memory

try {
  memory = new WebAssembly.Memory( { initial: memorySize } )

  void async function initialise () {
    const TransformWASM = await import( 'file-loader!./../build/transform.wasm' )

    let response = await fetch( TransformWASM as any )
    let buffer = await response.arrayBuffer()
    let module = await WebAssembly.compile( buffer )
    let instance = await WebAssembly.instantiate( module, {
      env: {
        memory
      }
    })

    Object.assign( TransformModule, instance.exports )
    TransformModule.start( foreign.parameterStart )
    setViewport()
  }()
}
catch ( e ) {
  memory = <any> {
    buffer: new ArrayBuffer( 0x10000 * memorySize )
  }
}

let moduleBuffer = memory.buffer
let foreign = {
  result: 0x1000,
  accumulator: 0x1010,
  store: 0x1020,

  transformationStart: 0x1030,
  transformationOffsetDial: 0x2,
  transformationOffsetParam: 0x4,
  transformationSize: 0x8,

  parameterStart: memorySize / 2,
  parameterOffsetValue: 0x0,
{'fraction_non_alphanumeric': 0.10956394283620374, 'fraction_numerical': 0.030047636496885306, 'mean_word_length': 3.446254071661238, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5343057', 'n_tokens_mistral': 922, 'n_tokens_neox': 841, 'n_words': 212}