<commit_before>// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import { CoreDescriptionModel } from './widget_core';

import { DescriptionView, DescriptionStyleModel } from './widget_description';

import { DOMWidgetView, WidgetView } from '@jupyter-widgets/base';

import { uuid } from './utils';

import { format } from 'd3-format';

import noUiSlider from 'nouislider';

export class IntModel extends CoreDescriptionModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'IntModel',
      value: 0
    };
  }
}

export class BoundedIntModel extends IntModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'BoundedIntModel',
      max: 100,
      min: 0
    };
  }
}

export class SliderStyleModel extends DescriptionStyleModel {
  defaults(): Backbone.ObjectHash {
    return { ...super.defaults(), _model_name: 'SliderStyleModel' };
  }

  public static styleProperties = {
    ...DescriptionStyleModel.styleProperties,
    handle_color: {
      selector: '.ui-slider-handle',
      attribute: 'background-color',
      default: null as any
    }
  };
}

export class IntSliderModel extends BoundedIntModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'IntSliderModel',
      _view_name: 'IntSliderView',
      step: 1,
      orientation: 'horizontal',
      readout: true,
      readout_format: 'd',
      continuous_update: true,
      style: null,
      disabled: false
    };
  }
  initialize(
    attributes: Backbone.ObjectHash,
    options: { model_id: string; comm: any; widget_manager: any }
  ): void {
    super.initialize(attributes, options);<commit_msg>Fix the slider handle styling.<commit_after>// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import { CoreDescriptionModel } from './widget_core';

import { DescriptionView, DescriptionStyleModel } from './widget_description';

import { DOMWidgetView, WidgetView } from '@jupyter-widgets/base';

import { uuid } from './utils';

import { format } from 'd3-format';

import noUiSlider from 'nouislider';

export class IntModel extends CoreDescriptionModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'IntModel',
      value: 0
    };
  }
}

export class BoundedIntModel extends IntModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'BoundedIntModel',
      max: 100,
      min: 0
    };
  }
}

export class SliderStyleModel extends DescriptionStyleModel {
  defaults(): Backbone.ObjectHash {
    return { ...super.defaults(), _model_name: 'SliderStyleModel' };
  }

  public static styleProperties = {
    ...DescriptionStyleModel.styleProperties,
    handle_color: {
      selector: '.noUi-handle',
      attribute: 'background-color',
      default: null as any
    }
  };
}

export class IntSliderModel extends BoundedIntModel {
  defaults(): Backbone.ObjectHash {
    return {
      ...super.defaults(),
      _model_name: 'IntSliderModel',
      _view_name: 'IntSliderView',
      step: 1,
      orientation: 'horizontal',
      readout: true,
      readout_format: 'd',
      continuous_update: true,
      style: null,
      disabled: false
    };
  }
  initialize(
    attributes: Backbone.ObjectHash,
    options: { model_id: string; comm: any; widget_manager: any }
  ): void {
    super.initialize(attributes, options);
{'fraction_non_alphanumeric': 0.1160964666292765, 'fraction_numerical': 0.003925967470555244, 'mean_word_length': 3.1525029103608846, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '911678', 'n_tokens_mistral': 1052, 'n_tokens_neox': 1039, 'n_words': 269}