<commit_before>import { createPropTransforms, propTypesFromMapping } from '../logic/props'
import { createActions, createActionTransforms } from '../logic/actions'
import { combineReducerObjects, convertReducerArrays } from '../logic/reducer'
import { convertConstants } from '../logic/create'
import { pathSelector, createSelectors } from '../logic/selectors'
import { createSaga } from '../saga/create'
import { getConnectedSagas } from '../saga/connected'
import { firstReducerRoot, isSyncedWithStore, addReducer, startSaga, cancelSaga } from '../scene/store'
import { createCombinedSaga } from '../scene/saga'
import shallowEqual from '../utils/shallow-equal'

import { createSelector } from 'reselect'
import { select, call } from 'redux-saga/effects'
import { connectAdvanced } from 'react-redux'

let inlineCache = {}
let actionCache = {}

export function cachedSelectors (path) {
  return inlineCache[path.join('.')] || {}
}

const DEBUG = false

let nonameCounter = 0

function isStateless (Component) {
  return !Component.prototype.render
}

const hydrationAction = 'hydrate kea store'

function injectSagasIntoClass (Klass, _this, connectedActions, object) {
  const originalComponentDidMount = Klass.prototype.componentDidMount
  Klass.prototype.componentDidMount = function () {
    if (DEBUG) {
      console.log('component did mount')
    }

    // this === component instance
    this._keaSagaBase = {}
    this._keaRunningSaga = null
<commit_msg>prevent double saga injections<commit_after>import { createPropTransforms, propTypesFromMapping } from '../logic/props'
import { createActions, createActionTransforms } from '../logic/actions'
import { combineReducerObjects, convertReducerArrays } from '../logic/reducer'
import { convertConstants } from '../logic/create'
import { pathSelector, createSelectors } from '../logic/selectors'
import { createSaga } from '../saga/create'
import { getConnectedSagas } from '../saga/connected'
import { firstReducerRoot, isSyncedWithStore, addReducer, startSaga, cancelSaga } from '../scene/store'
import { createCombinedSaga } from '../scene/saga'
import shallowEqual from '../utils/shallow-equal'

import { createSelector } from 'reselect'
import { select, call } from 'redux-saga/effects'
import { connectAdvanced } from 'react-redux'

let inlineCache = {}
let actionCache = {}

export function cachedSelectors (path) {
  return inlineCache[path.join('.')] || {}
}

const DEBUG = false

let nonameCounter = 0

function isStateless (Component) {
  return !Component.prototype.render
}

const hydrationAction = 'hydrate kea store'

function injectSagasIntoClass (Klass, _this, connectedActions, object) {
  if (Klass._injectedKeaSaga) {
    console.error('[KEA] Error! Already injected kea saga into component', Klass)
  }
  Klass._injectedKeaSaga = true

  const originalComponentDidMount = Klass.prototype.componentDidMount
  Klass.prototype.componentDidMount = function () {
    if (DEBUG) {
      console.log('component did mount')
    }

    // this === component instance
    this._keaSagaBase = {}
    this._keaRunningSaga = null

{'fraction_non_alphanumeric': 0.1182170542635659, 'fraction_numerical': 0.0006459948320413437, 'mean_word_length': 4.630909090909091, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6134974', 'n_tokens_mistral': 930, 'n_tokens_neox': 891, 'n_words': 234}