<commit_before>import * as _ from 'lodash'
import Keyframe from './keyframe'
import Effect from './effect'
import {LayerScheme, LayerConfigScheme} from './scheme/layer'
import {RendererProperties} from './types'

export default class Clip
{
    static deserialize(layerJson: LayerScheme)
    {
        const layer = new Clip
        const config = _.pick(layerJson.config, [
            'renderer',
            'rendererOptions',
            'placedFrame',
            'durationFrames',
            'keyframeInterpolationMethod',
        ]) as LayerConfigScheme

        const keyframes = _.mapValues(layerJson.keyframes, keyframeSet => {
            return new Set(Array.from(keyframeSet).map(keyframe => Keyframe.deserialize(keyframe)))
        })

        Object.defineProperty(layer, 'id', {value: layerJson.id})
        Object.assign(layer.config, config)
        layer.keyframes = keyframes
        return layer<commit_msg>Replace `scheme/layer` to `scheme/clip` on clip.ts lol<commit_after>import * as _ from 'lodash'
import Keyframe from './keyframe'
import Effect from './effect'
import {ClipScheme, ClipConfigScheme} from './scheme/clip'
import {RendererProperties} from './types'

export default class Clip
{
    static deserialize(layerJson: ClipScheme)
    {
        const layer = new Clip
        const config = _.pick(layerJson.config, [
            'renderer',
            'rendererOptions',
            'placedFrame',
            'durationFrames',
            'keyframeInterpolationMethod',
        ]) as ClipConfigScheme

        const keyframes = _.mapValues(layerJson.keyframes, keyframeSet => {
            return new Set(Array.from(keyframeSet).map(keyframe => Keyframe.deserialize(keyframe)))
        })

        Object.defineProperty(layer, 'id', {value: layerJson.id})
        Object.assign(layer.config, config)
        layer.keyframes = keyframes
        return layer
{'fraction_non_alphanumeric': 0.10718057022175291, 'fraction_numerical': 0.0, 'mean_word_length': 2.7303149606299213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3933426', 'n_tokens_mistral': 513, 'n_tokens_neox': 507, 'n_words': 125}