(self["webpackChunkkishw"] = self["webpackChunkkishw"] || []).push([["vendors-node_modules_jupyter-widgets_controls_lib_index_js"],{

/***/ "./node_modules/@jupyter-widgets/controls/lib/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/index.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AccordionModel": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.AccordionModel),
/* harmony export */   "AccordionView": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.AccordionView),
/* harmony export */   "AudioModel": () => (/* reexport safe */ _widget_audio__WEBPACK_IMPORTED_MODULE_8__.AudioModel),
/* harmony export */   "AudioView": () => (/* reexport safe */ _widget_audio__WEBPACK_IMPORTED_MODULE_8__.AudioView),
/* harmony export */   "BaseIntSliderView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.BaseIntSliderView),
/* harmony export */   "BoolModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.BoolModel),
/* harmony export */   "BoundedFloatModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.BoundedFloatModel),
/* harmony export */   "BoundedFloatTextModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.BoundedFloatTextModel),
/* harmony export */   "BoundedIntModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.BoundedIntModel),
/* harmony export */   "BoundedIntTextModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.BoundedIntTextModel),
/* harmony export */   "BoxModel": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.BoxModel),
/* harmony export */   "BoxView": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.BoxView),
/* harmony export */   "ButtonModel": () => (/* reexport safe */ _widget_button__WEBPACK_IMPORTED_MODULE_4__.ButtonModel),
/* harmony export */   "ButtonStyleModel": () => (/* reexport safe */ _widget_button__WEBPACK_IMPORTED_MODULE_4__.ButtonStyleModel),
/* harmony export */   "ButtonView": () => (/* reexport safe */ _widget_button__WEBPACK_IMPORTED_MODULE_4__.ButtonView),
/* harmony export */   "CheckboxModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.CheckboxModel),
/* harmony export */   "CheckboxStyleModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.CheckboxStyleModel),
/* harmony export */   "CheckboxView": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.CheckboxView),
/* harmony export */   "ColorPickerModel": () => (/* reexport safe */ _widget_color__WEBPACK_IMPORTED_MODULE_9__.ColorPickerModel),
/* harmony export */   "ColorPickerView": () => (/* reexport safe */ _widget_color__WEBPACK_IMPORTED_MODULE_9__.ColorPickerView),
/* harmony export */   "ColorsInputModel": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.ColorsInputModel),
/* harmony export */   "ColorsInputView": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.ColorsInputView),
/* harmony export */   "ComboboxModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.ComboboxModel),
/* harmony export */   "ComboboxView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.ComboboxView),
/* harmony export */   "ControllerAxisModel": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerAxisModel),
/* harmony export */   "ControllerAxisView": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerAxisView),
/* harmony export */   "ControllerButtonModel": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerButtonModel),
/* harmony export */   "ControllerButtonView": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerButtonView),
/* harmony export */   "ControllerModel": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerModel),
/* harmony export */   "ControllerView": () => (/* reexport safe */ _widget_controller__WEBPACK_IMPORTED_MODULE_15__.ControllerView),
/* harmony export */   "DatePickerModel": () => (/* reexport safe */ _widget_date__WEBPACK_IMPORTED_MODULE_10__.DatePickerModel),
/* harmony export */   "DatePickerView": () => (/* reexport safe */ _widget_date__WEBPACK_IMPORTED_MODULE_10__.DatePickerView),
/* harmony export */   "DatetimeModel": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.DatetimeModel),
/* harmony export */   "DatetimeView": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.DatetimeView),
/* harmony export */   "DescriptionModel": () => (/* reexport safe */ _widget_description__WEBPACK_IMPORTED_MODULE_20__.DescriptionModel),
/* harmony export */   "DescriptionStyleModel": () => (/* reexport safe */ _widget_description__WEBPACK_IMPORTED_MODULE_20__.DescriptionStyleModel),
/* harmony export */   "DescriptionView": () => (/* reexport safe */ _widget_description__WEBPACK_IMPORTED_MODULE_20__.DescriptionView),
/* harmony export */   "DirectionalLinkModel": () => (/* reexport safe */ _widget_link__WEBPACK_IMPORTED_MODULE_2__.DirectionalLinkModel),
/* harmony export */   "DropdownModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.DropdownModel),
/* harmony export */   "DropdownView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.DropdownView),
/* harmony export */   "FileUploadModel": () => (/* reexport safe */ _widget_upload__WEBPACK_IMPORTED_MODULE_21__.FileUploadModel),
/* harmony export */   "FileUploadView": () => (/* reexport safe */ _widget_upload__WEBPACK_IMPORTED_MODULE_21__.FileUploadView),
/* harmony export */   "FloatLogSliderModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatLogSliderModel),
/* harmony export */   "FloatLogSliderView": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatLogSliderView),
/* harmony export */   "FloatModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatModel),
/* harmony export */   "FloatProgressModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatProgressModel),
/* harmony export */   "FloatRangeSliderModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatRangeSliderModel),
/* harmony export */   "FloatRangeSliderView": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatRangeSliderView),
/* harmony export */   "FloatSliderModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatSliderModel),
/* harmony export */   "FloatSliderView": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatSliderView),
/* harmony export */   "FloatTextModel": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatTextModel),
/* harmony export */   "FloatTextView": () => (/* reexport safe */ _widget_float__WEBPACK_IMPORTED_MODULE_14__.FloatTextView),
/* harmony export */   "FloatsInputModel": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.FloatsInputModel),
/* harmony export */   "FloatsInputView": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.FloatsInputView),
/* harmony export */   "GridBoxModel": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.GridBoxModel),
/* harmony export */   "GridBoxView": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.GridBoxView),
/* harmony export */   "HBoxModel": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.HBoxModel),
/* harmony export */   "HBoxView": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.HBoxView),
/* harmony export */   "HTMLMathModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLMathModel),
/* harmony export */   "HTMLMathStyleModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLMathStyleModel),
/* harmony export */   "HTMLMathView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLMathView),
/* harmony export */   "HTMLModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLModel),
/* harmony export */   "HTMLStyleModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLStyleModel),
/* harmony export */   "HTMLView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.HTMLView),
/* harmony export */   "ImageModel": () => (/* reexport safe */ _widget_image__WEBPACK_IMPORTED_MODULE_6__.ImageModel),
/* harmony export */   "ImageView": () => (/* reexport safe */ _widget_image__WEBPACK_IMPORTED_MODULE_6__.ImageView),
/* harmony export */   "IntModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntModel),
/* harmony export */   "IntProgressModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntProgressModel),
/* harmony export */   "IntRangeSliderModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntRangeSliderModel),
/* harmony export */   "IntRangeSliderView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntRangeSliderView),
/* harmony export */   "IntSliderModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntSliderModel),
/* harmony export */   "IntSliderView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntSliderView),
/* harmony export */   "IntTextModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntTextModel),
/* harmony export */   "IntTextView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.IntTextView),
/* harmony export */   "IntsInputModel": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.IntsInputModel),
/* harmony export */   "IntsInputView": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.IntsInputView),
/* harmony export */   "JUPYTER_CONTROLS_VERSION": () => (/* reexport safe */ _version__WEBPACK_IMPORTED_MODULE_1__.JUPYTER_CONTROLS_VERSION),
/* harmony export */   "JupyterLuminoAccordionWidget": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.JupyterLuminoAccordionWidget),
/* harmony export */   "JupyterLuminoTabPanelWidget": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.JupyterLuminoTabPanelWidget),
/* harmony export */   "LabelModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.LabelModel),
/* harmony export */   "LabelStyleModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.LabelStyleModel),
/* harmony export */   "LabelView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.LabelView),
/* harmony export */   "LabeledDOMWidgetModel": () => (/* reexport safe */ _widget_description__WEBPACK_IMPORTED_MODULE_20__.LabeledDOMWidgetModel),
/* harmony export */   "LabeledDOMWidgetView": () => (/* reexport safe */ _widget_description__WEBPACK_IMPORTED_MODULE_20__.LabeledDOMWidgetView),
/* harmony export */   "LinkModel": () => (/* reexport safe */ _widget_link__WEBPACK_IMPORTED_MODULE_2__.LinkModel),
/* harmony export */   "MultipleSelectionModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.MultipleSelectionModel),
/* harmony export */   "NaiveDatetimeModel": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.NaiveDatetimeModel),
/* harmony export */   "PasswordModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.PasswordModel),
/* harmony export */   "PasswordView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.PasswordView),
/* harmony export */   "PlayModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.PlayModel),
/* harmony export */   "PlayView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.PlayView),
/* harmony export */   "ProgressStyleModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.ProgressStyleModel),
/* harmony export */   "ProgressView": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.ProgressView),
/* harmony export */   "RadioButtonsModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.RadioButtonsModel),
/* harmony export */   "RadioButtonsView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.RadioButtonsView),
/* harmony export */   "SelectModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectModel),
/* harmony export */   "SelectMultipleModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectMultipleModel),
/* harmony export */   "SelectMultipleView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectMultipleView),
/* harmony export */   "SelectView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectView),
/* harmony export */   "SelectionContainerModel": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.SelectionContainerModel),
/* harmony export */   "SelectionModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionModel),
/* harmony export */   "SelectionRangeSliderModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionRangeSliderModel),
/* harmony export */   "SelectionRangeSliderView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionRangeSliderView),
/* harmony export */   "SelectionSliderModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionSliderModel),
/* harmony export */   "SelectionSliderView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionSliderView),
/* harmony export */   "SelectionView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.SelectionView),
/* harmony export */   "SliderStyleModel": () => (/* reexport safe */ _widget_int__WEBPACK_IMPORTED_MODULE_13__.SliderStyleModel),
/* harmony export */   "StackModel": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.StackModel),
/* harmony export */   "StackView": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.StackView),
/* harmony export */   "StringModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.StringModel),
/* harmony export */   "StringView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.StringView),
/* harmony export */   "TabModel": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.TabModel),
/* harmony export */   "TabView": () => (/* reexport safe */ _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__.TabView),
/* harmony export */   "TagsInputModel": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.TagsInputModel),
/* harmony export */   "TagsInputView": () => (/* reexport safe */ _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__.TagsInputView),
/* harmony export */   "TextModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.TextModel),
/* harmony export */   "TextStyleModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.TextStyleModel),
/* harmony export */   "TextView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.TextView),
/* harmony export */   "TextareaModel": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.TextareaModel),
/* harmony export */   "TextareaView": () => (/* reexport safe */ _widget_string__WEBPACK_IMPORTED_MODULE_19__.TextareaView),
/* harmony export */   "TimeModel": () => (/* reexport safe */ _widget_time__WEBPACK_IMPORTED_MODULE_12__.TimeModel),
/* harmony export */   "TimeView": () => (/* reexport safe */ _widget_time__WEBPACK_IMPORTED_MODULE_12__.TimeView),
/* harmony export */   "ToggleButtonModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.ToggleButtonModel),
/* harmony export */   "ToggleButtonStyleModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.ToggleButtonStyleModel),
/* harmony export */   "ToggleButtonView": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.ToggleButtonView),
/* harmony export */   "ToggleButtonsModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.ToggleButtonsModel),
/* harmony export */   "ToggleButtonsStyleModel": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.ToggleButtonsStyleModel),
/* harmony export */   "ToggleButtonsView": () => (/* reexport safe */ _widget_selection__WEBPACK_IMPORTED_MODULE_16__.ToggleButtonsView),
/* harmony export */   "VBoxModel": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.VBoxModel),
/* harmony export */   "VBoxView": () => (/* reexport safe */ _widget_box__WEBPACK_IMPORTED_MODULE_5__.VBoxView),
/* harmony export */   "ValidModel": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.ValidModel),
/* harmony export */   "ValidView": () => (/* reexport safe */ _widget_bool__WEBPACK_IMPORTED_MODULE_3__.ValidView),
/* harmony export */   "VideoModel": () => (/* reexport safe */ _widget_video__WEBPACK_IMPORTED_MODULE_7__.VideoModel),
/* harmony export */   "VideoView": () => (/* reexport safe */ _widget_video__WEBPACK_IMPORTED_MODULE_7__.VideoView),
/* harmony export */   "datetime_serializers": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.datetime_serializers),
/* harmony export */   "deserialize_date": () => (/* reexport safe */ _widget_date__WEBPACK_IMPORTED_MODULE_10__.deserialize_date),
/* harmony export */   "deserialize_datetime": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.deserialize_datetime),
/* harmony export */   "deserialize_naive": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.deserialize_naive),
/* harmony export */   "deserialize_time": () => (/* reexport safe */ _widget_time__WEBPACK_IMPORTED_MODULE_12__.deserialize_time),
/* harmony export */   "escape_html": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_0__.escape_html),
/* harmony export */   "naive_serializers": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.naive_serializers),
/* harmony export */   "reject": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_0__.reject),
/* harmony export */   "resolvePromisesDict": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_0__.resolvePromisesDict),
/* harmony export */   "serialize_date": () => (/* reexport safe */ _widget_date__WEBPACK_IMPORTED_MODULE_10__.serialize_date),
/* harmony export */   "serialize_datetime": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.serialize_datetime),
/* harmony export */   "serialize_naive": () => (/* reexport safe */ _widget_datetime__WEBPACK_IMPORTED_MODULE_11__.serialize_naive),
/* harmony export */   "serialize_time": () => (/* reexport safe */ _widget_time__WEBPACK_IMPORTED_MODULE_12__.serialize_time),
/* harmony export */   "time_serializers": () => (/* reexport safe */ _widget_time__WEBPACK_IMPORTED_MODULE_12__.time_serializers),
/* harmony export */   "typeset": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_0__.typeset),
/* harmony export */   "uuid": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_0__.uuid),
/* harmony export */   "version": () => (/* binding */ version)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version */ "./node_modules/@jupyter-widgets/controls/lib/version.js");
/* harmony import */ var _widget_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget_link */ "./node_modules/@jupyter-widgets/controls/lib/widget_link.js");
/* harmony import */ var _widget_bool__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget_bool */ "./node_modules/@jupyter-widgets/controls/lib/widget_bool.js");
/* harmony import */ var _widget_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./widget_button */ "./node_modules/@jupyter-widgets/controls/lib/widget_button.js");
/* harmony import */ var _widget_box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget_box */ "./node_modules/@jupyter-widgets/controls/lib/widget_box.js");
/* harmony import */ var _widget_image__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./widget_image */ "./node_modules/@jupyter-widgets/controls/lib/widget_image.js");
/* harmony import */ var _widget_video__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./widget_video */ "./node_modules/@jupyter-widgets/controls/lib/widget_video.js");
/* harmony import */ var _widget_audio__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./widget_audio */ "./node_modules/@jupyter-widgets/controls/lib/widget_audio.js");
/* harmony import */ var _widget_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./widget_color */ "./node_modules/@jupyter-widgets/controls/lib/widget_color.js");
/* harmony import */ var _widget_date__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./widget_date */ "./node_modules/@jupyter-widgets/controls/lib/widget_date.js");
/* harmony import */ var _widget_datetime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./widget_datetime */ "./node_modules/@jupyter-widgets/controls/lib/widget_datetime.js");
/* harmony import */ var _widget_time__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./widget_time */ "./node_modules/@jupyter-widgets/controls/lib/widget_time.js");
/* harmony import */ var _widget_int__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./widget_int */ "./node_modules/@jupyter-widgets/controls/lib/widget_int.js");
/* harmony import */ var _widget_float__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./widget_float */ "./node_modules/@jupyter-widgets/controls/lib/widget_float.js");
/* harmony import */ var _widget_controller__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./widget_controller */ "./node_modules/@jupyter-widgets/controls/lib/widget_controller.js");
/* harmony import */ var _widget_selection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./widget_selection */ "./node_modules/@jupyter-widgets/controls/lib/widget_selection.js");
/* harmony import */ var _widget_selectioncontainer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./widget_selectioncontainer */ "./node_modules/@jupyter-widgets/controls/lib/widget_selectioncontainer.js");
/* harmony import */ var _widget_tagsinput__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./widget_tagsinput */ "./node_modules/@jupyter-widgets/controls/lib/widget_tagsinput.js");
/* harmony import */ var _widget_string__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./widget_string */ "./node_modules/@jupyter-widgets/controls/lib/widget_string.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _widget_upload__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./widget_upload */ "./node_modules/@jupyter-widgets/controls/lib/widget_upload.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.






















const version = (__webpack_require__(/*! ../package.json */ "./node_modules/@jupyter-widgets/controls/package.json").version);


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/lumino/accordion.js":
/*!************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/lumino/accordion.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Accordion": () => (/* binding */ Accordion),
/* harmony export */   "Collapse": () => (/* binding */ Collapse)
/* harmony export */ });
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/algorithm */ "webpack/sharing/consume/default/@lumino/algorithm");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/signaling */ "webpack/sharing/consume/default/@lumino/signaling");
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _currentselection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./currentselection */ "./node_modules/@jupyter-widgets/controls/lib/lumino/currentselection.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.




/**
 * The class name added to Collapse instances.
 */
const COLLAPSE_CLASS = 'jupyter-widget-Collapse';
/**
 * The class name added to a Collapse's header.
 */
const COLLAPSE_HEADER_CLASS = 'jupyter-widget-Collapse-header';
/**
 * The class name added to a Collapse's contents.
 */
const COLLAPSE_CONTENTS_CLASS = 'jupyter-widget-Collapse-contents';
/**
 * The class name added to a Collapse when it is opened
 */
const COLLAPSE_CLASS_OPEN = 'jupyter-widget-Collapse-open';
/**
 * A panel that supports a collapsible header, made from the widget's title.
 * Clicking on the title expands or contracts the widget.
 */
class Collapse extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget {
    constructor(options) {
        super(options);
        this._collapseChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);
        this.addClass(COLLAPSE_CLASS);
        this._header = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget();
        this._header.addClass(COLLAPSE_HEADER_CLASS);
        this._header.node.addEventListener('click', this);
        // Fontawesome icon for caret
        const icon = document.createElement('i');
        icon.classList.add('fa', 'fa-fw', 'fa-caret-right');
        this._header.node.appendChild(icon);
        // Label content
        this._header.node.appendChild(document.createElement('span'));
        this._content = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Panel();
        this._content.addClass(COLLAPSE_CONTENTS_CLASS);
        const layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.PanelLayout();
        this.layout = layout;
        layout.addWidget(this._header);
        layout.addWidget(this._content);
        if (options.widget) {
            this.widget = options.widget;
        }
        this.collapsed = false;
    }
    dispose() {
        if (this.isDisposed) {
            return;
        }
        super.dispose();
        this._header = null;
        this._widget = null;
        this._content = null;
    }
    get widget() {
        return this._widget;
    }
    set widget(widget) {
        const oldWidget = this._widget;
        if (oldWidget) {
            oldWidget.disposed.disconnect(this._onChildDisposed, this);
            oldWidget.title.changed.disconnect(this._onTitleChanged, this);
            oldWidget.parent = null;
        }
        this._widget = widget;
        widget.disposed.connect(this._onChildDisposed, this);
        widget.title.changed.connect(this._onTitleChanged, this);
        this._onTitleChanged(widget.title);
        this._content.addWidget(widget);
    }
    get collapsed() {
        return this._collapsed;
    }
    set collapsed(value) {
        // TODO: should we have this check here?
        if (value === this._collapsed) {
            return;
        }
        if (value) {
            this._collapse();
        }
        else {
            this._uncollapse();
        }
    }
    toggle() {
        this.collapsed = !this.collapsed;
    }
    get collapseChanged() {
        return this._collapseChanged;
    }
    _collapse() {
        this._collapsed = true;
        if (this._content) {
            this._content.hide();
        }
        this.removeClass(COLLAPSE_CLASS_OPEN);
        this._header.node.children[0].classList.add('fa-caret-right');
        this._header.node.children[0].classList.remove('fa-caret-down');
        this._collapseChanged.emit(void 0);
    }
    _uncollapse() {
        this._collapsed = false;
        if (this._content) {
            this._content.show();
        }
        this.addClass(COLLAPSE_CLASS_OPEN);
        this._header.node.children[0].classList.add('fa-caret-down');
        this._header.node.children[0].classList.remove('fa-caret-right');
        this._collapseChanged.emit(void 0);
    }
    /**
     * Handle the DOM events for the Collapse widget.
     *
     * @param event - The DOM event sent to the panel.
     *
     * #### Notes
     * This method implements the DOM `EventListener` interface and is
     * called in response to events on the panel's DOM node. It should
     * not be called directly by user code.
     */
    handleEvent(event) {
        switch (event.type) {
            case 'click':
                this._evtClick(event);
                break;
            default:
                break;
        }
    }
    _evtClick(event) {
        this.toggle();
    }
    /**
     * Handle the `changed` signal of a title object.
     */
    _onTitleChanged(sender) {
        this._header.node.children[1].textContent = this._widget.title.label;
    }
    _onChildDisposed(sender) {
        this.dispose();
    }
}
/**
 * The class name added to Accordion instances.
 */
const ACCORDION_CLASS = 'jupyter-widget-Accordion';
/**
 * The class name added to an Accordion child.
 */
const ACCORDION_CHILD_CLASS = 'jupyter-widget-Accordion-child';
const ACCORDION_CHILD_ACTIVE_CLASS = 'jupyter-widget-Accordion-child-active';
/**
 * A panel that supports a collapsible header, made from the widget's title.
 * Clicking on the title expands or contracts the widget.
 */
class Accordion extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Panel {
    constructor(options) {
        super(options);
        this._selection = new _currentselection__WEBPACK_IMPORTED_MODULE_3__.Selection(this.widgets);
        this._selection.selectionChanged.connect(this._onSelectionChanged, this);
        this.addClass(ACCORDION_CLASS);
    }
    /**
     * A read-only sequence of the widgets in the panel.
     *
     * #### Notes
     * This is a read-only property.
     */
    /*  get widgets(): ISequence<Widget> {
      return new ArraySequence(toArray(map((this.layout as PanelLayout).widgets, (w: Collapse) => w.widget)));
    }
  */
    get collapseWidgets() {
        return this.layout.widgets;
    }
    get selection() {
        return this._selection;
    }
    indexOf(widget) {
        return _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.ArrayExt.findFirstIndex(this.collapseWidgets, (w) => w.widget === widget);
    }
    /**
     * Add a widget to the end of the accordion.
     *
     * @param widget - The widget to add to the accordion.
     *
     * @returns The Collapse widget wrapping the added widget.
     *
     * #### Notes
     * The widget will be wrapped in a CollapsedWidget.
     */
    addWidget(widget) {
        const collapse = this._wrapWidget(widget);
        collapse.collapsed = true;
        super.addWidget(collapse);
        this._selection.adjustSelectionForInsert(this.widgets.length - 1, collapse);
        return collapse;
    }
    /**
     * Insert a widget at the specified index.
     *
     * @param index - The index at which to insert the widget.
     *
     * @param widget - The widget to insert into to the accordion.
     *
     * #### Notes
     * If the widget is already contained in the panel, it will be moved.
     */
    insertWidget(index, widget) {
        const collapse = this._wrapWidget(widget);
        collapse.collapsed = true;
        super.insertWidget(index, collapse);
        this._selection.adjustSelectionForInsert(index, collapse);
    }
    removeWidget(widget) {
        const index = this.indexOf(widget);
        if (index >= 0) {
            const collapse = this.collapseWidgets[index];
            widget.parent = null;
            collapse.dispose();
            this._selection.adjustSelectionForRemove(index, null);
        }
    }
    _wrapWidget(widget) {
        const collapse = new Collapse({ widget });
        collapse.addClass(ACCORDION_CHILD_CLASS);
        collapse.collapseChanged.connect(this._onCollapseChange, this);
        return collapse;
    }
    _onCollapseChange(sender) {
        if (!sender.collapsed) {
            this._selection.value = sender;
        }
        else if (this._selection.value === sender && sender.collapsed) {
            this._selection.value = null;
        }
    }
    _onSelectionChanged(sender, change) {
        // Collapse previous widget, open current widget
        const pv = change.previousValue;
        const cv = change.currentValue;
        if (pv) {
            pv.collapsed = true;
            pv.removeClass(ACCORDION_CHILD_ACTIVE_CLASS);
        }
        if (cv) {
            cv.collapsed = false;
            cv.addClass(ACCORDION_CHILD_ACTIVE_CLASS);
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/lumino/currentselection.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/lumino/currentselection.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Selection": () => (/* binding */ Selection)
/* harmony export */ });
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/algorithm */ "webpack/sharing/consume/default/@lumino/algorithm");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/signaling */ "webpack/sharing/consume/default/@lumino/signaling");
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_1__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
/**
 * A variety of convenience methods for maintaining a current selection
 */


class Selection {
    constructor(sequence, options = {}) {
        this._array = null;
        this._value = null;
        this._previousValue = null;
        this._selectionChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);
        this._array = sequence;
        this._insertBehavior = options.insertBehavior || 'select-item-if-needed';
        this._removeBehavior = options.removeBehavior || 'select-item-after';
    }
    /**
     * A signal emitted when the current item is changed.
     *
     * #### Notes
     * This signal is emitted when the currently selected item is changed either
     * through user or programmatic interaction.
     *
     * Notably, this signal is not emitted when the index of the current item
     * changes due to other items being inserted, removed, or moved, but the
     * current item remains the same. It is only emitted when the actual current
     * item is changed.
     */
    get selectionChanged() {
        return this._selectionChanged;
    }
    /**
     * Adjust for setting an item.
     *
     * This should be called *after* the set.
     *
     * @param index - The index set.
     * @param oldValue - The old value at the index.
     */
    adjustSelectionForSet(index) {
        // We just need to send a signal if the currentValue changed.
        // Get the current index and value.
        const pi = this.index;
        const pv = this.value;
        // Exit early if this doesn't affect the selection
        if (index !== pi) {
            return;
        }
        this._updateSelectedValue();
        const cv = this.value;
        // The previous item is now null, since it is no longer in the array.
        this._previousValue = null;
        // Send signal if there was a change
        if (pv !== cv) {
            // Emit the current changed signal.
            this._selectionChanged.emit({
                previousIndex: pi,
                previousValue: pv,
                currentIndex: pi,
                currentValue: cv,
            });
        }
    }
    /**
     * Get the currently selected item.
     *
     * #### Notes
     * This will be `null` if no item is selected.
     */
    get value() {
        return this._value;
    }
    /**
     * Set the currently selected item.
     *
     * #### Notes
     * If the item does not exist in the vector, the currentValue will be set to
     * `null`. This selects the first entry equal to the desired item.
     */
    set value(value) {
        if (value === null || this._array === null) {
            this.index = null;
        }
        else {
            this.index = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.ArrayExt.firstIndexOf(this._array, value);
        }
    }
    /**
     * Get the index of the currently selected item.
     *
     * #### Notes
     * This will be `null` if no item is selected.
     */
    get index() {
        return this._index;
    }
    /**
     * Set the index of the currently selected tab.
     *
     * @param index - The index to select.
     *
     * #### Notes
     * If the value is out of range, the index will be set to `null`, which
     * indicates no item is selected.
     */
    set index(index) {
        // Coerce the value to an index.
        let i;
        if (index !== null && this._array !== null) {
            i = Math.floor(index);
            if (i < 0 || i >= this._array.length) {
                i = null;
            }
        }
        else {
            i = null;
        }
        // Bail early if the index will not change.
        if (this._index === i) {
            return;
        }
        // Look up the previous index and item.
        const pi = this._index;
        const pv = this._value;
        // Update the state
        this._index = i;
        this._updateSelectedValue();
        this._previousValue = pv;
        // Emit the current changed signal.
        this._selectionChanged.emit({
            previousIndex: pi,
            previousValue: pv,
            currentIndex: i,
            currentValue: this._value,
        });
    }
    /**
     * Get the selection behavior when inserting a tab.
     */
    get insertBehavior() {
        return this._insertBehavior;
    }
    /**
     * Set the selection behavior when inserting a tab.
     */
    set insertBehavior(value) {
        this._insertBehavior = value;
    }
    /**
     * Get the selection behavior when removing a tab.
     */
    get removeBehavior() {
        return this._removeBehavior;
    }
    /**
     * Set the selection behavior when removing a tab.
     */
    set removeBehavior(value) {
        this._removeBehavior = value;
    }
    /**
     * Adjust the current index for a tab insert operation.
     *
     * @param i - The new index of the inserted item.
     * @param j - The inserted item.
     *
     * #### Notes
     * This method accounts for the tab bar's insertion behavior when adjusting
     * the current index and emitting the changed signal. This should be called
     * after the insertion.
     */
    adjustSelectionForInsert(i, item) {
        // Lookup commonly used variables.
        const cv = this._value;
        const ci = this._index;
        const bh = this._insertBehavior;
        // Handle the behavior where the new item is always selected,
        // or the behavior where the new item is selected if needed.
        if (bh === 'select-item' ||
            (bh === 'select-item-if-needed' && ci === null)) {
            this._index = i;
            this._value = item;
            this._previousValue = cv;
            this._selectionChanged.emit({
                previousIndex: ci,
                previousValue: cv,
                currentIndex: i,
                currentValue: item,
            });
            return;
        }
        // Otherwise, silently adjust the current index if needed.
        if (ci !== null && ci >= i) {
            this._index++;
        }
    }
    /**
     * Clear the selection and history.
     */
    clearSelection() {
        // Get the current index and item.
        const pi = this._index;
        const pv = this._value;
        // Reset the current index and previous item.
        this._index = null;
        this._value = null;
        this._previousValue = null;
        // If no item was selected, there's nothing else to do.
        if (pi === null) {
            return;
        }
        // Emit the current changed signal.
        this._selectionChanged.emit({
            previousIndex: pi,
            previousValue: pv,
            currentIndex: this._index,
            currentValue: this._value,
        });
    }
    /**
     * Adjust the current index for an item remove operation.
     *
     * @param i - The former index of the removed item.
     * @param item - The removed item.
     *
     * #### Notes
     * This method accounts for the remove behavior when adjusting the current
     * index and emitting the changed signal. It should be called after the item
     * is removed.
     */
    adjustSelectionForRemove(i, item) {
        // If we have no selection, there is nothing to do
        if (this._index === null) {
            return;
        }
        // Lookup commonly used variables.
        const ci = this._index;
        const bh = this._removeBehavior;
        // Silently adjust the index if the current item is not removed.
        if (ci !== i) {
            if (ci > i) {
                this._index--;
            }
            return;
        }
        // No item gets selected if the vector is empty.
        if (!this._array || this._array.length === 0) {
            // Reset the current index and previous item.
            this._index = null;
            this._value = null;
            this._previousValue = null;
            this._selectionChanged.emit({
                previousIndex: i,
                previousValue: item,
                currentIndex: this._index,
                currentValue: this._value,
            });
            return;
        }
        // Handle behavior where the next sibling item is selected.
        if (bh === 'select-item-after') {
            this._index = Math.min(i, this._array.length - 1);
            this._updateSelectedValue();
            this._previousValue = null;
            this._selectionChanged.emit({
                previousIndex: i,
                previousValue: item,
                currentIndex: this._index,
                currentValue: this._value,
            });
            return;
        }
        // Handle behavior where the previous sibling item is selected.
        if (bh === 'select-item-before') {
            this._index = Math.max(0, i - 1);
            this._updateSelectedValue();
            this._previousValue = null;
            this._selectionChanged.emit({
                previousIndex: i,
                previousValue: item,
                currentIndex: this._index,
                currentValue: this._value,
            });
            return;
        }
        // Handle behavior where the previous history item is selected.
        if (bh === 'select-previous-item') {
            if (this._previousValue) {
                this.value = this._previousValue;
            }
            else {
                this._index = Math.min(i, this._array.length - 1);
                this._updateSelectedValue();
            }
            this._previousValue = null;
            this._selectionChanged.emit({
                previousIndex: i,
                previousValue: item,
                currentIndex: this._index,
                currentValue: this.value,
            });
            return;
        }
        // Otherwise, no item gets selected.
        this._index = null;
        this._value = null;
        this._previousValue = null;
        this._selectionChanged.emit({
            previousIndex: i,
            previousValue: item,
            currentIndex: this._index,
            currentValue: this._value,
        });
    }
    /**
     * Set the current value based on the current index.
     */
    _updateSelectedValue() {
        const i = this._index;
        this._value = i !== null && this._array ? this._array[i] : null;
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/lumino/tabpanel.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/lumino/tabpanel.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "EventedPanel": () => (/* binding */ EventedPanel),
/* harmony export */   "TabPanel": () => (/* binding */ TabPanel)
/* harmony export */ });
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/messaging */ "webpack/sharing/consume/default/@lumino/messaging");
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/signaling */ "webpack/sharing/consume/default/@lumino/signaling");
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _lumino_domutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/domutils */ "webpack/sharing/consume/default/@lumino/domutils");
/* harmony import */ var _lumino_domutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_domutils__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);
/* This file has code derived from Lumino. The license for this Lumino code is:

Copyright (c) 2019 Project Jupyter Contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Copyright (c) 2014-2017, PhosphorJS Contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/




/**
 * A panel where visible widgets are stacked atop one another.
 *
 * #### Notes
 * This class provides a convenience wrapper around a [[PanelLayout]].
 */
class EventedPanel extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Panel {
    constructor() {
        super(...arguments);
        this._widgetRemoved = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);
    }
    /**
     * A signal emitted when a widget is removed from the panel.
     */
    get widgetRemoved() {
        return this._widgetRemoved;
    }
    /**
     * A message handler invoked on a `'child-removed'` message.
     */
    onChildRemoved(msg) {
        this._widgetRemoved.emit(msg.child);
    }
}
/**
 * A widget which combines a `TabBar` and a `EventedPanel`.
 *
 * #### Notes
 * This is a simple panel which handles the common case of a tab bar
 * placed next to a content area. The selected tab controls the widget
 * which is shown in the content area.
 *
 * For use cases which require more control than is provided by this
 * panel, the `TabBar` widget may be used independently.
 *
 * TODO: Support setting the direction??
 */
class TabPanel extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {
    /**
     * Construct a new tab panel.
     *
     * @param options - The options for initializing the tab panel.
     */
    constructor(options = {}) {
        super();
        this._currentChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);
        this.addClass('jupyter-widget-TabPanel');
        // Create the tab bar and contents panel.
        this.tabBar = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.TabBar(options);
        this.tabBar.addClass('jupyter-widget-TabPanel-tabBar');
        this.tabContents = new EventedPanel();
        this.tabContents.addClass('jupyter-widget-TabPanel-tabContents');
        // Connect the tab bar signal handlers.
        this.tabBar.tabMoved.connect(this._onTabMoved, this);
        this.tabBar.currentChanged.connect(this._onCurrentChanged, this);
        this.tabBar.tabCloseRequested.connect(this._onTabCloseRequested, this);
        this.tabBar.tabActivateRequested.connect(this._onTabActivateRequested, this);
        // Connect the evented panel signal handlers.
        this.tabContents.widgetRemoved.connect(this._onWidgetRemoved, this);
        // Create the layout.
        const layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.PanelLayout();
        // Add the child widgets to the layout.
        layout.addWidget(this.tabBar);
        layout.addWidget(this.tabContents);
        // Install the layout on the tab panel.
        this.layout = layout;
    }
    /**
     * A signal emitted when the current tab is changed.
     *
     * #### Notes
     * This signal is emitted when the currently selected tab is changed
     * either through user or programmatic interaction.
     *
     * Notably, this signal is not emitted when the index of the current
     * tab changes due to tabs being inserted, removed, or moved. It is
     * only emitted when the actual current tab node is changed.
     */
    get currentChanged() {
        return this._currentChanged;
    }
    /**
     * Get the index of the currently selected tab.
     *
     * #### Notes
     * This will be `null` if no tab is selected.
     */
    get currentIndex() {
        const currentIndex = this.tabBar.currentIndex;
        // Lumino tab bars have an index of -1 if no tab is selected
        return currentIndex === -1 ? null : currentIndex;
    }
    /**
     * Set the index of the currently selected tab.
     *
     * #### Notes
     * If the index is out of range, it will be set to `null`.
     */
    set currentIndex(value) {
        this.tabBar.currentIndex = value === null ? -1 : value;
    }
    /**
     * Get the currently selected widget.
     *
     * #### Notes
     * This will be `null` if there is no selected tab.
     */
    get currentWidget() {
        const title = this.tabBar.currentTitle;
        return title ? title.owner : null;
    }
    /**
     * Set the currently selected widget.
     *
     * #### Notes
     * If the widget is not in the panel, it will be set to `null`.
     */
    set currentWidget(value) {
        this.tabBar.currentTitle = value ? value.title : null;
    }
    /**
     * Get the whether the tabs are movable by the user.
     *
     * #### Notes
     * Tabs can always be moved programmatically.
     */
    get tabsMovable() {
        return this.tabBar.tabsMovable;
    }
    /**
     * Set the whether the tabs are movable by the user.
     *
     * #### Notes
     * Tabs can always be moved programmatically.
     */
    set tabsMovable(value) {
        this.tabBar.tabsMovable = value;
    }
    /**
     * A read-only array of the widgets in the panel.
     */
    get widgets() {
        return this.tabContents.widgets;
    }
    /**
     * Add a widget to the end of the tab panel.
     *
     * @param widget - The widget to add to the tab panel.
     *
     * #### Notes
     * If the widget is already contained in the panel, it will be moved.
     *
     * The widget's `title` is used to populate the tab.
     */
    addWidget(widget) {
        this.insertWidget(this.widgets.length, widget);
    }
    /**
     * Insert a widget into the tab panel at a specified index.
     *
     * @param index - The index at which to insert the widget.
     *
     * @param widget - The widget to insert into to the tab panel.
     *
     * #### Notes
     * If the widget is already contained in the panel, it will be moved.
     *
     * The widget's `title` is used to populate the tab.
     */
    insertWidget(index, widget) {
        if (widget !== this.currentWidget) {
            widget.hide();
        }
        this.tabContents.insertWidget(index, widget);
        this.tabBar.insertTab(index, widget.title);
    }
    /**
     * Handle the `currentChanged` signal from the tab bar.
     */
    _onCurrentChanged(sender, args) {
        // Extract the previous and current title from the args.
        const { previousIndex, previousTitle, currentIndex, currentTitle } = args;
        // Extract the widgets from the titles.
        const previousWidget = previousTitle ? previousTitle.owner : null;
        const currentWidget = currentTitle ? currentTitle.owner : null;
        // Hide the previous widget.
        if (previousWidget) {
            previousWidget.hide();
        }
        // Show the current widget.
        if (currentWidget) {
            currentWidget.show();
        }
        // Emit the `currentChanged` signal for the tab panel.
        this._currentChanged.emit({
            previousIndex,
            previousWidget,
            currentIndex,
            currentWidget,
        });
        // Flush the message loop on IE and Edge to prevent flicker.
        if (_lumino_domutils__WEBPACK_IMPORTED_MODULE_2__.Platform.IS_EDGE || _lumino_domutils__WEBPACK_IMPORTED_MODULE_2__.Platform.IS_IE) {
            _lumino_messaging__WEBPACK_IMPORTED_MODULE_0__.MessageLoop.flush();
        }
    }
    /**
     * Handle the `tabActivateRequested` signal from the tab bar.
     */
    _onTabActivateRequested(sender, args) {
        args.title.owner.activate();
    }
    /**
     * Handle the `tabCloseRequested` signal from the tab bar.
     */
    _onTabCloseRequested(sender, args) {
        args.title.owner.close();
    }
    /**
     * Handle the `tabMoved` signal from the tab bar.
     */
    _onTabMoved(sender, args) {
        this.tabContents.insertWidget(args.toIndex, args.title.owner);
    }
    /**
     * Handle the `widgetRemoved` signal from the stacked panel.
     */
    _onWidgetRemoved(sender, widget) {
        this.tabBar.removeTab(widget.title);
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/utils.js":
/*!*************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/utils.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "escape_html": () => (/* binding */ escape_html),
/* harmony export */   "reject": () => (/* binding */ reject),
/* harmony export */   "resolvePromisesDict": () => (/* reexport safe */ _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.resolvePromisesDict),
/* harmony export */   "typeset": () => (/* binding */ typeset),
/* harmony export */   "uuid": () => (/* reexport safe */ _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.uuid)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

/**
 * Apply MathJax rendering to an element, and optionally set its text.
 *
 * If MathJax is not available, make no changes.
 *
 * Parameters
 * ----------
 * element: Node
 * text: optional string
 */
function typeset(element, text) {
    if (text !== void 0) {
        element.textContent = text;
    }
    if (window.MathJax !== void 0) {
        MathJax.Hub.Queue(['Typeset', MathJax.Hub, element]);
    }
}
/**
 * escape text to HTML
 */
function escape_html(text) {
    const esc = document.createElement('div');
    esc.textContent = text;
    return esc.innerHTML;
}
/**
 * Creates a wrappable Promise rejection function.
 */
function reject(message, log) {
    return function promiseRejection(error) {
        if (log) {
            console.error(new Error(message));
        }
        throw error;
    };
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/version.js":
/*!***************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/version.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "JUPYTER_CONTROLS_VERSION": () => (/* binding */ JUPYTER_CONTROLS_VERSION)
/* harmony export */ });
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
/**
 * The version of the Jupyter controls widget attribute spec that this package
 * implements.
 */
const JUPYTER_CONTROLS_VERSION = '2.0.0';


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_audio.js":
/*!********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_audio.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AudioModel": () => (/* binding */ AudioModel),
/* harmony export */   "AudioView": () => (/* binding */ AudioView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.


class AudioModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'AudioModel', _view_name: 'AudioView', format: 'mp3', autoplay: true, loop: true, controls: true, value: new DataView(new ArrayBuffer(0)) });
    }
}
AudioModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel.serializers), { value: {
        serialize: (value) => {
            return new DataView(value.buffer.slice(0));
        },
    } });
class AudioView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    render() {
        /**
         * Called when view is rendered.
         */
        super.render();
        this.luminoWidget.addClass('jupyter-widgets');
        this.update(); // Set defaults.
    }
    update() {
        /**
         * Update the contents of this view
         *
         * Called when the model is changed.  The model may have been
         * changed by another view or by a state update from the back-end.
         */
        let url;
        const format = this.model.get('format');
        const value = this.model.get('value');
        if (format !== 'url') {
            const blob = new Blob([value], {
                type: `audio/${this.model.get('format')}`,
            });
            url = URL.createObjectURL(blob);
        }
        else {
            url = new TextDecoder('utf-8').decode(value.buffer);
        }
        // Clean up the old objectURL
        const oldurl = this.el.src;
        this.el.src = url;
        if (oldurl) {
            URL.revokeObjectURL(oldurl);
        }
        // Audio attributes
        this.el.loop = this.model.get('loop');
        this.el.autoplay = this.model.get('autoplay');
        this.el.controls = this.model.get('controls');
        return super.update();
    }
    remove() {
        if (this.el.src) {
            URL.revokeObjectURL(this.el.src);
        }
        super.remove();
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'audio';
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_bool.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_bool.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BoolModel": () => (/* binding */ BoolModel),
/* harmony export */   "CheckboxModel": () => (/* binding */ CheckboxModel),
/* harmony export */   "CheckboxStyleModel": () => (/* binding */ CheckboxStyleModel),
/* harmony export */   "CheckboxView": () => (/* binding */ CheckboxView),
/* harmony export */   "ToggleButtonModel": () => (/* binding */ ToggleButtonModel),
/* harmony export */   "ToggleButtonStyleModel": () => (/* binding */ ToggleButtonStyleModel),
/* harmony export */   "ToggleButtonView": () => (/* binding */ ToggleButtonView),
/* harmony export */   "ValidModel": () => (/* binding */ ValidModel),
/* harmony export */   "ValidView": () => (/* binding */ ValidView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.



class CheckboxStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'CheckboxStyleModel' });
    }
}
CheckboxStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionStyleModel.styleProperties), { background: {
        selector: '',
        attribute: 'background',
        default: null,
    } });
class ToggleButtonStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ToggleButtonStyleModel' });
    }
}
ToggleButtonStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionStyleModel.styleProperties), { font_family: {
        selector: '',
        attribute: 'font-family',
        default: '',
    }, font_size: {
        selector: '',
        attribute: 'font-size',
        default: '',
    }, font_style: {
        selector: '',
        attribute: 'font-style',
        default: '',
    }, font_variant: {
        selector: '',
        attribute: 'font-variant',
        default: '',
    }, font_weight: {
        selector: '',
        attribute: 'font-weight',
        default: '',
    }, text_color: {
        selector: '',
        attribute: 'color',
        default: '',
    }, text_decoration: {
        selector: '',
        attribute: 'text-decoration',
        default: '',
    } });
class BoolModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: false, disabled: false, _model_name: 'BoolModel' });
    }
}
class CheckboxModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { indent: true, style: null, _view_name: 'CheckboxView', _model_name: 'CheckboxModel' });
    }
}
class CheckboxView extends _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-checkbox');
        // adding a zero-width space to the label to help
        // the browser set the baseline correctly
        this.label.innerHTML = '&#8203;';
        // label containing the checkbox and description span
        this.checkboxLabel = document.createElement('label');
        this.checkboxLabel.classList.add('widget-label-basic');
        this.el.appendChild(this.checkboxLabel);
        // checkbox
        this.checkbox = document.createElement('input');
        this.checkbox.setAttribute('type', 'checkbox');
        this.checkboxLabel.appendChild(this.checkbox);
        // span to the right of the checkbox that will render the description
        this.descriptionSpan = document.createElement('span');
        this.checkboxLabel.appendChild(this.descriptionSpan);
        this.listenTo(this.model, 'change:indent', this.updateIndent);
        this.listenTo(this.model, 'change:tabbable', this.updateTabindex);
        this.update(); // Set defaults.
        this.updateDescription();
        this.updateIndent();
        this.updateTabindex();
        this.updateTooltip();
    }
    /**
     * Overridden from super class
     *
     * Update the description span (rather than the label) since
     * we want the description to the right of the checkbox.
     */
    updateDescription() {
        // can be called before the view is fully initialized
        if (this.checkboxLabel == null) {
            return;
        }
        const description = this.model.get('description');
        if (this.model.get('description_allow_html')) {
            this.descriptionSpan.innerHTML =
                this.model.widget_manager.inline_sanitize(description);
        }
        else {
            this.descriptionSpan.textContent = description;
        }
        this.typeset(this.descriptionSpan);
        this.descriptionSpan.title = description;
        this.checkbox.title = description;
    }
    /**
     * Update the visibility of the label in the super class
     * to provide the optional indent.
     */
    updateIndent() {
        const indent = this.model.get('indent');
        this.label.style.display = indent ? '' : 'none';
    }
    updateTabindex() {
        if (!this.checkbox) {
            return; // we might be constructing the parent
        }
        const tabbable = this.model.get('tabbable');
        if (tabbable === true) {
            this.checkbox.setAttribute('tabIndex', '0');
        }
        else if (tabbable === false) {
            this.checkbox.setAttribute('tabIndex', '-1');
        }
        else if (tabbable === null) {
            this.checkbox.removeAttribute('tabIndex');
        }
    }
    updateTooltip() {
        if (!this.checkbox)
            return; // we might be constructing the parent
        const title = this.model.get('tooltip');
        if (!title) {
            this.checkbox.removeAttribute('title');
        }
        else if (this.model.get('description').length === 0) {
            this.checkbox.setAttribute('title', title);
        }
    }
    events() {
        return {
            'click input[type="checkbox"]': '_handle_click',
        };
    }
    /**
     * Handles when the checkbox is clicked.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    _handle_click() {
        const value = this.model.get('value');
        this.model.set('value', !value, { updated_view: this });
        this.touch();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        this.checkbox.checked = this.model.get('value');
        if (options === undefined || options.updated_view != this) {
            this.checkbox.disabled = this.model.get('disabled');
        }
        return super.update();
    }
    /**
     * Handle message sent to the front end.
     *
     * Used to focus or blur the widget.
     */
    handle_message(content) {
        if (content.do == 'focus') {
            this.checkbox.focus();
        }
        else if (content.do == 'blur') {
            this.checkbox.blur();
        }
    }
}
class ToggleButtonModel extends BoolModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'ToggleButtonView', _model_name: 'ToggleButtonModel', tooltip: '', icon: '', button_style: '', style: null });
    }
}
class ToggleButtonView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('jupyter-button');
        this.el.classList.add('widget-toggle-button');
        this.listenTo(this.model, 'change:button_style', this.update_button_style);
        this.listenTo(this.model, 'change:tabbable', this.updateTabindex);
        this.set_button_style();
        this.update(); // Set defaults.
    }
    update_button_style() {
        this.update_mapped_classes(ToggleButtonView.class_map, 'button_style');
    }
    set_button_style() {
        this.set_mapped_classes(ToggleButtonView.class_map, 'button_style');
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (this.model.get('value')) {
            this.el.classList.add('mod-active');
        }
        else {
            this.el.classList.remove('mod-active');
        }
        if (options === undefined || options.updated_view !== this) {
            this.el.disabled = this.model.get('disabled');
            this.el.setAttribute('tabbable', this.model.get('tabbable'));
            this.el.setAttribute('title', this.model.get('tooltip'));
            const description = this.model.get('description');
            const icon = this.model.get('icon');
            if (description.trim().length === 0 && icon.trim().length === 0) {
                this.el.innerHTML = '&nbsp;'; // Preserve button height
            }
            else {
                this.el.textContent = '';
                if (icon.trim().length) {
                    const i = document.createElement('i');
                    this.el.appendChild(i);
                    i.classList.add('fa');
                    i.classList.add('fa-' + icon);
                }
                this.el.appendChild(document.createTextNode(description));
            }
        }
        this.updateTabindex();
        return super.update();
    }
    events() {
        return {
            // Dictionary of events and their handlers.
            click: '_handle_click',
        };
    }
    /**
     * Handles and validates user input.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    _handle_click(event) {
        event.preventDefault();
        const value = this.model.get('value');
        this.model.set('value', !value, { updated_view: this });
        this.touch();
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'button';
    }
}
ToggleButtonView.class_map = {
    primary: ['mod-primary'],
    success: ['mod-success'],
    info: ['mod-info'],
    warning: ['mod-warning'],
    danger: ['mod-danger'],
};
class ValidModel extends BoolModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { readout: 'Invalid', _view_name: 'ValidView', _model_name: 'ValidModel' });
    }
}
class ValidView extends _widget_description__WEBPACK_IMPORTED_MODULE_2__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-valid');
        this.el.classList.add('widget-inline-hbox');
        this.icon = document.createElement('i');
        this.icon.classList.add('fa', 'fa-fw');
        this.el.appendChild(this.icon);
        this.readout = document.createElement('span');
        this.readout.classList.add('widget-valid-readout');
        this.readout.classList.add('widget-readout');
        this.el.appendChild(this.readout);
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        this.el.classList.remove('mod-valid');
        this.el.classList.remove('mod-invalid');
        this.icon.classList.remove('fa-check');
        this.icon.classList.remove('fa-times');
        this.readout.textContent = this.model.get('readout');
        if (this.model.get('value')) {
            this.el.classList.add('mod-valid');
            this.icon.classList.add('fa-check');
        }
        else {
            this.el.classList.add('mod-invalid');
            this.icon.classList.add('fa-times');
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_box.js":
/*!******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_box.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BoxModel": () => (/* binding */ BoxModel),
/* harmony export */   "BoxView": () => (/* binding */ BoxView),
/* harmony export */   "GridBoxModel": () => (/* binding */ GridBoxModel),
/* harmony export */   "GridBoxView": () => (/* binding */ GridBoxView),
/* harmony export */   "HBoxModel": () => (/* binding */ HBoxModel),
/* harmony export */   "HBoxView": () => (/* binding */ HBoxView),
/* harmony export */   "VBoxModel": () => (/* binding */ VBoxModel),
/* harmony export */   "VBoxView": () => (/* binding */ VBoxView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/algorithm */ "webpack/sharing/consume/default/@lumino/algorithm");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/messaging */ "webpack/sharing/consume/default/@lumino/messaging");
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_5__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.






class BoxModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'BoxView', _model_name: 'BoxModel', children: [], box_style: '' });
    }
}
BoxModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel.serializers), { children: { deserialize: _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.unpack_models } });
class HBoxModel extends BoxModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'HBoxView', _model_name: 'HBoxModel' });
    }
}
class VBoxModel extends BoxModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'VBoxView', _model_name: 'VBoxModel' });
    }
}
class BoxView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    _createElement(tagName) {
        this.luminoWidget = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.JupyterLuminoPanelWidget({ view: this });
        return this.luminoWidget.node;
    }
    _setElement(el) {
        if (this.el || el !== this.luminoWidget.node) {
            // Boxes don't allow setting the element beyond the initial creation.
            throw new Error('Cannot reset the DOM element.');
        }
        this.el = this.luminoWidget.node;
        this.$el = jquery__WEBPACK_IMPORTED_MODULE_5___default()(this.luminoWidget.node);
    }
    initialize(parameters) {
        super.initialize(parameters);
        this.children_views = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.ViewList(this.add_child_model, null, this);
        this.listenTo(this.model, 'change:children', this.update_children);
        this.listenTo(this.model, 'change:box_style', this.update_box_style);
        this.luminoWidget.addClass('jupyter-widgets');
        this.luminoWidget.addClass('widget-container');
        this.luminoWidget.addClass('widget-box');
    }
    render() {
        super.render();
        this.update_children();
        this.set_box_style();
    }
    update_children() {
        var _a;
        (_a = this.children_views) === null || _a === void 0 ? void 0 : _a.update(this.model.get('children')).then((views) => {
            // Notify all children that their sizes may have changed.
            views.forEach((view) => {
                _lumino_messaging__WEBPACK_IMPORTED_MODULE_3__.MessageLoop.postMessage(view.luminoWidget, _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget.ResizeMessage.UnknownSize);
            });
        });
    }
    update_box_style() {
        this.update_mapped_classes(BoxView.class_map, 'box_style');
    }
    set_box_style() {
        this.set_mapped_classes(BoxView.class_map, 'box_style');
    }
    add_child_model(model) {
        // we insert a dummy element so the order is preserved when we add
        // the rendered content later.
        const dummy = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget();
        this.luminoWidget.addWidget(dummy);
        return this.create_child_view(model)
            .then((view) => {
            // replace the dummy widget with the new one.
            const i = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_2__.ArrayExt.firstIndexOf(this.luminoWidget.widgets, dummy);
            this.luminoWidget.insertWidget(i, view.luminoWidget);
            dummy.dispose();
            return view;
        })
            .catch((0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.reject)('Could not add child view to box', true));
    }
    remove() {
        this.children_views = null;
        super.remove();
    }
}
BoxView.class_map = {
    success: ['alert', 'alert-success'],
    info: ['alert', 'alert-info'],
    warning: ['alert', 'alert-warning'],
    danger: ['alert', 'alert-danger'],
};
class HBoxView extends BoxView {
    /**
     * Public constructor
     */
    initialize(parameters) {
        super.initialize(parameters);
        this.luminoWidget.addClass('widget-hbox');
    }
}
class VBoxView extends BoxView {
    /**
     * Public constructor
     */
    initialize(parameters) {
        super.initialize(parameters);
        this.luminoWidget.addClass('widget-vbox');
    }
}
class GridBoxView extends BoxView {
    /**
     * Public constructor
     */
    initialize(parameters) {
        super.initialize(parameters);
        this.luminoWidget.addClass('widget-gridbox');
        // display needn't be set to flex and grid
        this.luminoWidget.removeClass('widget-box');
    }
}
class GridBoxModel extends BoxModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'GridBoxView', _model_name: 'GridBoxModel' });
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_button.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_button.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ButtonModel": () => (/* binding */ ButtonModel),
/* harmony export */   "ButtonStyleModel": () => (/* binding */ ButtonStyleModel),
/* harmony export */   "ButtonView": () => (/* binding */ ButtonView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version */ "./node_modules/@jupyter-widgets/controls/lib/version.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.



class ButtonStyleModel extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.StyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ButtonStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION });
    }
}
ButtonStyleModel.styleProperties = {
    button_color: {
        selector: '',
        attribute: 'background-color',
        default: null,
    },
    font_family: {
        selector: '',
        attribute: 'font-family',
        default: '',
    },
    font_size: {
        selector: '',
        attribute: 'font-size',
        default: '',
    },
    font_style: {
        selector: '',
        attribute: 'font-style',
        default: '',
    },
    font_variant: {
        selector: '',
        attribute: 'font-variant',
        default: '',
    },
    font_weight: {
        selector: '',
        attribute: 'font-weight',
        default: '',
    },
    text_color: {
        selector: '',
        attribute: 'color',
        default: '',
    },
    text_decoration: {
        selector: '',
        attribute: 'text-decoration',
        default: '',
    },
};
class ButtonModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { description: '', tooltip: '', disabled: false, icon: '', button_style: '', _view_name: 'ButtonView', _model_name: 'ButtonModel', style: null });
    }
}
class ButtonView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('jupyter-button');
        this.el.classList.add('widget-button');
        this.listenTo(this.model, 'change:button_style', this.update_button_style);
        this.listenTo(this.model, 'change:tabbable', this.updateTabindex);
        this.set_button_style();
        this.update(); // Set defaults.
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        this.el.disabled = this.model.get('disabled');
        this.updateTabindex();
        const tooltip = this.model.get('tooltip');
        const description = this.model.get('description');
        const icon = this.model.get('icon');
        this.el.setAttribute('title', tooltip !== null && tooltip !== void 0 ? tooltip : description);
        if (description.length || icon.length) {
            this.el.textContent = '';
            if (icon.length) {
                const i = document.createElement('i');
                i.classList.add('fa');
                i.classList.add(...icon
                    .split(/[\s]+/)
                    .filter(Boolean)
                    .map((v) => `fa-${v}`));
                if (description.length === 0) {
                    i.classList.add('center');
                }
                this.el.appendChild(i);
            }
            this.el.appendChild(document.createTextNode(description));
        }
        return super.update();
    }
    update_button_style() {
        this.update_mapped_classes(ButtonView.class_map, 'button_style');
    }
    set_button_style() {
        this.set_mapped_classes(ButtonView.class_map, 'button_style');
    }
    /**
     * Dictionary of events and handlers
     */
    events() {
        // TODO: return typing not needed in Typescript later than 1.8.x
        // See http://stackoverflow.com/questions/22077023/why-cant-i-indirectly-return-an-object-literal-to-satisfy-an-index-signature-re and https://github.com/Microsoft/TypeScript/pull/7029
        return { click: '_handle_click' };
    }
    /**
     * Handles when the button is clicked.
     */
    _handle_click(event) {
        event.preventDefault();
        this.send({ event: 'click' });
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'button';
    }
}
ButtonView.class_map = {
    primary: ['mod-primary'],
    success: ['mod-success'],
    info: ['mod-info'],
    warning: ['mod-warning'],
    danger: ['mod-danger'],
};


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_color.js":
/*!********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_color.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColorPickerModel": () => (/* binding */ ColorPickerModel),
/* harmony export */   "ColorPickerView": () => (/* binding */ ColorPickerView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.



const named_colors = {
    aliceblue: '#f0f8ff',
    antiquewhite: '#faebd7',
    aqua: '#00ffff',
    aquamarine: '#7fffd4',
    azure: '#f0ffff',
    beige: '#f5f5dc',
    bisque: '#ffe4c4',
    black: '#000000',
    blanchedalmond: '#ffebcd',
    blue: '#0000ff',
    blueviolet: '#8a2be2',
    brown: '#a52a2a',
    burlywood: '#deb887',
    cadetblue: '#5f9ea0',
    chartreuse: '#7fff00',
    chocolate: '#d2691e',
    coral: '#ff7f50',
    cornflowerblue: '#6495ed',
    cornsilk: '#fff8dc',
    crimson: '#dc143c',
    cyan: '#00ffff',
    darkblue: '#00008b',
    darkcyan: '#008b8b',
    darkgoldenrod: '#b8860b',
    darkgray: '#a9a9a9',
    darkgrey: '#a9a9a9',
    darkgreen: '#006400',
    darkkhaki: '#bdb76b',
    darkmagenta: '#8b008b',
    darkolivegreen: '#556b2f',
    darkorange: '#ff8c00',
    darkorchid: '#9932cc',
    darkred: '#8b0000',
    darksalmon: '#e9967a',
    darkseagreen: '#8fbc8f',
    darkslateblue: '#483d8b',
    darkslategray: '#2f4f4f',
    darkslategrey: '#2f4f4f',
    darkturquoise: '#00ced1',
    darkviolet: '#9400d3',
    deeppink: '#ff1493',
    deepskyblue: '#00bfff',
    dimgray: '#696969',
    dimgrey: '#696969',
    dodgerblue: '#1e90ff',
    firebrick: '#b22222',
    floralwhite: '#fffaf0',
    forestgreen: '#228b22',
    fuchsia: '#ff00ff',
    gainsboro: '#dcdcdc',
    ghostwhite: '#f8f8ff',
    gold: '#ffd700',
    goldenrod: '#daa520',
    gray: '#808080',
    grey: '#808080',
    green: '#008000',
    greenyellow: '#adff2f',
    honeydew: '#f0fff0',
    hotpink: '#ff69b4',
    indianred: '#cd5c5c',
    indigo: '#4b0082',
    ivory: '#fffff0',
    khaki: '#f0e68c',
    lavender: '#e6e6fa',
    lavenderblush: '#fff0f5',
    lawngreen: '#7cfc00',
    lemonchiffon: '#fffacd',
    lightblue: '#add8e6',
    lightcoral: '#f08080',
    lightcyan: '#e0ffff',
    lightgoldenrodyellow: '#fafad2',
    lightgreen: '#90ee90',
    lightgray: '#d3d3d3',
    lightgrey: '#d3d3d3',
    lightpink: '#ffb6c1',
    lightsalmon: '#ffa07a',
    lightseagreen: '#20b2aa',
    lightskyblue: '#87cefa',
    lightslategray: '#778899',
    lightslategrey: '#778899',
    lightsteelblue: '#b0c4de',
    lightyellow: '#ffffe0',
    lime: '#00ff00',
    limegreen: '#32cd32',
    linen: '#faf0e6',
    magenta: '#ff00ff',
    maroon: '#800000',
    mediumaquamarine: '#66cdaa',
    mediumblue: '#0000cd',
    mediumorchid: '#ba55d3',
    mediumpurple: '#9370db',
    mediumseagreen: '#3cb371',
    mediumslateblue: '#7b68ee',
    mediumspringgreen: '#00fa9a',
    mediumturquoise: '#48d1cc',
    mediumvioletred: '#c71585',
    midnightblue: '#191970',
    mintcream: '#f5fffa',
    mistyrose: '#ffe4e1',
    moccasin: '#ffe4b5',
    navajowhite: '#ffdead',
    navy: '#000080',
    oldlace: '#fdf5e6',
    olive: '#808000',
    olivedrab: '#6b8e23',
    orange: '#ffa500',
    orangered: '#ff4500',
    orchid: '#da70d6',
    palegoldenrod: '#eee8aa',
    palegreen: '#98fb98',
    paleturquoise: '#afeeee',
    palevioletred: '#db7093',
    papayawhip: '#ffefd5',
    peachpuff: '#ffdab9',
    peru: '#cd853f',
    pink: '#ffc0cb',
    plum: '#dda0dd',
    powderblue: '#b0e0e6',
    purple: '#800080',
    red: '#ff0000',
    rosybrown: '#bc8f8f',
    royalblue: '#4169e1',
    saddlebrown: '#8b4513',
    salmon: '#fa8072',
    sandybrown: '#f4a460',
    seagreen: '#2e8b57',
    seashell: '#fff5ee',
    sienna: '#a0522d',
    silver: '#c0c0c0',
    skyblue: '#87ceeb',
    slateblue: '#6a5acd',
    slategray: '#708090',
    slategrey: '#708090',
    snow: '#fffafa',
    springgreen: '#00ff7f',
    steelblue: '#4682b4',
    tan: '#d2b48c',
    teal: '#008080',
    thistle: '#d8bfd8',
    tomato: '#ff6347',
    turquoise: '#40e0d0',
    violet: '#ee82ee',
    wheat: '#f5deb3',
    white: '#ffffff',
    whitesmoke: '#f5f5f5',
    yellow: '#ffff00',
    yellowgreen: '#9acd32',
};
class ColorPickerModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: 'black', concise: false, _model_name: 'ColorPickerModel', _view_name: 'ColorPickerView' });
    }
}
class ColorPickerView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-colorpicker');
        this._color_container = document.createElement('div');
        this._color_container.className =
            'widget-inline-hbox widget-colorpicker-input';
        this.el.appendChild(this._color_container);
        this._textbox = document.createElement('input');
        this._textbox.setAttribute('type', 'text');
        this._textbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this._color_container.appendChild(this._textbox);
        this._textbox.value = this.model.get('value');
        this._colorpicker = document.createElement('input');
        this._colorpicker.setAttribute('type', 'color');
        this._color_container.appendChild(this._colorpicker);
        this.listenTo(this.model, 'change:value', this._update_value);
        this.listenTo(this.model, 'change:concise', this._update_concise);
        this._update_concise();
        this._update_value();
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (options === undefined || options.updated_view != this) {
            const disabled = this.model.get('disabled');
            this._textbox.disabled = disabled;
            this._colorpicker.disabled = disabled;
        }
        return super.update();
    }
    events() {
        // Typescript doesn't understand that these functions are called, so we
        // specifically use them here so it knows they are being used.
        void this._picker_change;
        void this._text_change;
        return {
            'change [type="color"]': '_picker_change',
            'change [type="text"]': '_text_change',
        };
    }
    _update_value() {
        const value = this.model.get('value');
        this._colorpicker.value = color2hex(value);
        this._textbox.value = value;
    }
    _update_concise() {
        const concise = this.model.get('concise');
        if (concise) {
            this.el.classList.add('concise');
            this._textbox.style.display = 'none';
        }
        else {
            this.el.classList.remove('concise');
            this._textbox.style.display = '';
        }
    }
    _picker_change() {
        this.model.set('value', this._colorpicker.value);
        this.touch();
    }
    _text_change() {
        const value = this._validate_color(this._textbox.value, this.model.get('value'));
        this.model.set('value', value);
        this.touch();
    }
    _validate_color(color, fallback) {
        return color.match(/#[a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?$/) ||
            named_colors[color.toLowerCase()]
            ? color
            : fallback;
    }
}
/*
 * From a valid html color (named color, 6-digits or 3-digits hex format)
 * return a 6-digits hexadecimal color #rrggbb.
 */
function color2hex(color) {
    return named_colors[color.toLowerCase()] || rgb3_to_rgb6(color);
}
function rgb3_to_rgb6(rgb) {
    if (rgb.length === 7) {
        return rgb;
    }
    else {
        return ('#' +
            rgb.charAt(1) +
            rgb.charAt(1) +
            rgb.charAt(2) +
            rgb.charAt(2) +
            rgb.charAt(3) +
            rgb.charAt(3));
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_controller.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_controller.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ControllerAxisModel": () => (/* binding */ ControllerAxisModel),
/* harmony export */   "ControllerAxisView": () => (/* binding */ ControllerAxisView),
/* harmony export */   "ControllerButtonModel": () => (/* binding */ ControllerButtonModel),
/* harmony export */   "ControllerButtonView": () => (/* binding */ ControllerButtonView),
/* harmony export */   "ControllerModel": () => (/* binding */ ControllerModel),
/* harmony export */   "ControllerView": () => (/* binding */ ControllerView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/algorithm */ "webpack/sharing/consume/default/@lumino/algorithm");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_5__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.






class ControllerButtonModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ControllerButtonModel', _view_name: 'ControllerButtonView', value: 0.0, pressed: false });
    }
}
/**
 * Very simple view for a gamepad button.
 */
class ControllerButtonView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.DOMWidgetView {
    render() {
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-controller-button');
        this.el.style.width = 'fit-content';
        this.support = document.createElement('div');
        this.support.style.position = 'relative';
        this.support.style.margin = '1px';
        this.support.style.width = '16px';
        this.support.style.height = '16px';
        this.support.style.border = '1px solid black';
        this.support.style.background = 'lightgray';
        this.el.appendChild(this.support);
        this.bar = document.createElement('div');
        this.bar.style.position = 'absolute';
        this.bar.style.width = '100%';
        this.bar.style.bottom = '0px';
        this.bar.style.background = 'gray';
        this.support.appendChild(this.bar);
        this.update();
        this.label = document.createElement('div');
        this.label.textContent = this.model.get('description');
        this.label.style.textAlign = 'center';
        this.el.appendChild(this.label);
    }
    update() {
        this.bar.style.height = 100 * this.model.get('value') + '%';
    }
}
class ControllerAxisModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ControllerAxisModel', _view_name: 'ControllerAxisView', value: 0.0 });
    }
}
/**
 * Very simple view for a gamepad axis.
 */
class ControllerAxisView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.DOMWidgetView {
    render() {
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-controller-axis');
        this.el.style.width = '16px';
        this.el.style.padding = '4px';
        this.support = document.createElement('div');
        this.support.style.position = 'relative';
        this.support.style.margin = '1px';
        this.support.style.width = '4px';
        this.support.style.height = '64px';
        this.support.style.border = '1px solid black';
        this.support.style.background = 'lightgray';
        this.bullet = document.createElement('div');
        this.bullet.style.position = 'absolute';
        this.bullet.style.margin = '-3px';
        this.bullet.style.boxSizing = 'unset';
        this.bullet.style.width = '10px';
        this.bullet.style.height = '10px';
        this.bullet.style.background = 'gray';
        this.label = document.createElement('div');
        this.label.textContent = this.model.get('description');
        this.label.style.textAlign = 'center';
        this.support.appendChild(this.bullet);
        this.el.appendChild(this.support);
        this.el.appendChild(this.label);
        this.update();
    }
    update() {
        this.bullet.style.top = 50 * (this.model.get('value') + 1) + '%';
    }
}
class ControllerModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ControllerModel', _view_name: 'ControllerView', index: 0, name: '', mapping: '', connected: false, timestamp: 0, buttons: [], axes: [] });
    }
    initialize(attributes, options) {
        super.initialize(attributes, options);
        if (navigator.getGamepads === void 0) {
            // Checks if the browser supports the gamepad API
            this.readout = 'This browser does not support gamepads.';
            console.error(this.readout);
        }
        else {
            // Start the wait loop, and listen to updates of the only
            // user-provided attribute, the gamepad index.
            this.readout = 'Connect gamepad and press any button.';
            if (this.get('connected')) {
                // No need to re-create Button and Axis widgets, re-use
                // the models provided by the backend which may already
                // be wired to other things.
                this.update_loop();
            }
            else {
                // Wait for a gamepad to be connected.
                this.wait_loop();
            }
        }
    }
    /**
     * Waits for a gamepad to be connected at the provided index.
     * Once one is connected, it will start the update loop, which
     * populates the update of axes and button values.
     */
    wait_loop() {
        const index = this.get('index');
        const pad = navigator.getGamepads()[index];
        if (pad) {
            this.setup(pad).then((controls) => {
                this.set(controls);
                this.save_changes();
                window.requestAnimationFrame(this.update_loop.bind(this));
            });
        }
        else {
            window.requestAnimationFrame(this.wait_loop.bind(this));
        }
    }
    /**
     * Given a native gamepad object, returns a promise for a dictionary of
     * controls, of the form
     * {
     *     buttons: list of Button models,
     *     axes: list of Axis models,
     * }
     */
    setup(pad) {
        // Set up the main gamepad attributes
        this.set({
            name: pad.id,
            mapping: pad.mapping,
            connected: pad.connected,
            timestamp: pad.timestamp,
        });
        // Create buttons and axes. When done, start the update loop
        return _utils__WEBPACK_IMPORTED_MODULE_4__.resolvePromisesDict({
            buttons: Promise.all(pad.buttons.map((btn, index) => {
                return this._create_button_model(index);
            })),
            axes: Promise.all(pad.axes.map((axis, index) => {
                return this._create_axis_model(index);
            })),
        });
    }
    /**
     * Update axes and buttons values, until the gamepad is disconnected.
     * When the gamepad is disconnected, this.reset_gamepad is called.
     */
    update_loop() {
        const index = this.get('index');
        const id = this.get('name');
        const pad = navigator.getGamepads()[index];
        if (pad && index === pad.index && id === pad.id) {
            this.set({
                timestamp: pad.timestamp,
                connected: pad.connected,
            });
            this.save_changes();
            this.get('buttons').forEach(function (model, index) {
                model.set({
                    value: pad.buttons[index].value,
                    pressed: pad.buttons[index].pressed,
                });
                model.save_changes();
            });
            this.get('axes').forEach(function (model, index) {
                model.set('value', pad.axes[index]);
                model.save_changes();
            });
            window.requestAnimationFrame(this.update_loop.bind(this));
        }
        else {
            this.reset_gamepad();
        }
    }
    /**
     * Resets the gamepad attributes, and start the wait_loop.
     */
    reset_gamepad() {
        this.get('buttons').forEach(function (button) {
            button.close();
        });
        this.get('axes').forEach(function (axis) {
            axis.close();
        });
        this.set({
            name: '',
            mapping: '',
            connected: false,
            timestamp: 0.0,
            buttons: [],
            axes: [],
        });
        this.save_changes();
        window.requestAnimationFrame(this.wait_loop.bind(this));
    }
    /**
     * Creates a gamepad button widget.
     */
    _create_button_model(index) {
        return this.widget_manager
            .new_widget({
            model_name: 'ControllerButtonModel',
            model_module: '@jupyter-widgets/controls',
            model_module_version: this.get('_model_module_version'),
            view_name: 'ControllerButtonView',
            view_module: '@jupyter-widgets/controls',
            view_module_version: this.get('_view_module_version'),
        })
            .then(function (model) {
            model.set('description', index);
            return model;
        });
    }
    /**
     * Creates a gamepad axis widget.
     */
    _create_axis_model(index) {
        return this.widget_manager
            .new_widget({
            model_name: 'ControllerAxisModel',
            model_module: '@jupyter-widgets/controls',
            model_module_version: this.get('_model_module_version'),
            view_name: 'ControllerAxisView',
            view_module: '@jupyter-widgets/controls',
            view_module_version: this.get('_view_module_version'),
        })
            .then(function (model) {
            model.set('description', index);
            return model;
        });
    }
}
ControllerModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel.serializers), { buttons: { deserialize: _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.unpack_models }, axes: { deserialize: _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.unpack_models } });
/**
 * A simple view for a gamepad.
 */
class ControllerView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.DOMWidgetView {
    _createElement(tagName) {
        this.luminoWidget = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.JupyterLuminoPanelWidget({ view: this });
        return this.luminoWidget.node;
    }
    _setElement(el) {
        if (this.el || el !== this.luminoWidget.node) {
            // Boxes don't allow setting the element beyond the initial creation.
            throw new Error('Cannot reset the DOM element.');
        }
        this.el = this.luminoWidget.node;
        this.$el = jquery__WEBPACK_IMPORTED_MODULE_5___default()(this.luminoWidget.node);
    }
    initialize(parameters) {
        super.initialize(parameters);
        this.button_views = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.ViewList(this.add_button, null, this);
        this.listenTo(this.model, 'change:buttons', (model, value) => {
            this.button_views.update(value);
        });
        this.axis_views = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.ViewList(this.add_axis, null, this);
        this.listenTo(this.model, 'change:axes', (model, value) => {
            this.axis_views.update(value);
        });
        this.listenTo(this.model, 'change:name', this.update_label);
    }
    render() {
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-controller');
        this.label = document.createElement('div');
        this.el.appendChild(this.label);
        this.axis_box = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Panel();
        this.axis_box.node.style.display = 'flex';
        this.luminoWidget.addWidget(this.axis_box);
        this.button_box = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Panel();
        this.button_box.node.style.display = 'flex';
        this.luminoWidget.addWidget(this.button_box);
        this.button_views.update(this.model.get('buttons'));
        this.axis_views.update(this.model.get('axes'));
        this.update_label();
    }
    update_label() {
        this.label.textContent = this.model.get('name') || this.model.readout;
    }
    add_button(model) {
        // we insert a dummy element so the order is preserved when we add
        // the rendered content later.
        const dummy = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget();
        this.button_box.addWidget(dummy);
        return this.create_child_view(model)
            .then((view) => {
            // replace the dummy widget with the new one.
            const i = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.firstIndexOf(this.button_box.widgets, dummy);
            this.button_box.insertWidget(i, view.luminoWidget);
            dummy.dispose();
            return view;
        })
            .catch((0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.reject)('Could not add child button view to controller', true));
    }
    add_axis(model) {
        // we insert a dummy element so the order is preserved when we add
        // the rendered content later.
        const dummy = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget();
        this.axis_box.addWidget(dummy);
        return this.create_child_view(model)
            .then((view) => {
            // replace the dummy widget with the new one.
            const i = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.firstIndexOf(this.axis_box.widgets, dummy);
            this.axis_box.insertWidget(i, view.luminoWidget);
            dummy.dispose();
            return view;
        })
            .catch((0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.reject)('Could not add child axis view to controller', true));
    }
    remove() {
        super.remove();
        this.button_views.remove();
        this.axis_views.remove();
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_core.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CoreDOMWidgetModel": () => (/* binding */ CoreDOMWidgetModel),
/* harmony export */   "CoreDescriptionModel": () => (/* binding */ CoreDescriptionModel),
/* harmony export */   "CoreWidgetModel": () => (/* binding */ CoreWidgetModel)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version */ "./node_modules/@jupyter-widgets/controls/lib/version.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// widget_core implements some common patterns for the core widget collection
// that are not to be used directly by third-party widget authors.



class CoreWidgetModel extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.WidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'CoreWidgetModel', _view_module: '@jupyter-widgets/controls', _model_module: '@jupyter-widgets/controls', _view_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION, _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION });
    }
}
class CoreDOMWidgetModel extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'CoreDOMWidgetModel', _view_module: '@jupyter-widgets/controls', _model_module: '@jupyter-widgets/controls', _view_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION, _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION });
    }
}
class CoreDescriptionModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'CoreDescriptionModel', _view_module: '@jupyter-widgets/controls', _model_module: '@jupyter-widgets/controls', _view_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION, _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION });
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_date.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_date.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DatePickerModel": () => (/* binding */ DatePickerModel),
/* harmony export */   "DatePickerView": () => (/* binding */ DatePickerView),
/* harmony export */   "deserialize_date": () => (/* binding */ deserialize_date),
/* harmony export */   "serialize_date": () => (/* binding */ serialize_date)
/* harmony export */ });
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.



function serialize_date(value) {
    if (value === null) {
        return null;
    }
    else {
        return {
            year: value.getUTCFullYear(),
            month: value.getUTCMonth(),
            date: value.getUTCDate(),
        };
    }
}
function deserialize_date(value) {
    if (value === null) {
        return null;
    }
    else {
        const date = new Date();
        date.setUTCFullYear(value.year, value.month, value.date);
        date.setUTCHours(0, 0, 0, 0);
        return date;
    }
}
class DatePickerModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: null, _model_name: 'DatePickerModel', _view_name: 'DatePickerView' });
    }
}
DatePickerModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDescriptionModel.serializers), { value: {
        serialize: serialize_date,
        deserialize: deserialize_date,
    } });
class DatePickerView extends _widget_description__WEBPACK_IMPORTED_MODULE_0__.DescriptionView {
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-datepicker');
        this._datepicker = document.createElement('input');
        this._datepicker.setAttribute('type', 'date');
        this._datepicker.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this.el.appendChild(this._datepicker);
        this.listenTo(this.model, 'change:value', this._update_value);
        this._update_value();
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (options === undefined || options.updated_view !== this) {
            this._datepicker.disabled = this.model.get('disabled');
        }
        return super.update();
    }
    events() {
        // Typescript doesn't understand that these functions are called, so we
        // specifically use them here so it knows they are being used.
        void this._picker_change;
        void this._picker_focusout;
        return {
            'change [type="date"]': '_picker_change',
            'focusout [type="date"]': '_picker_focusout',
        };
    }
    _update_value() {
        const value = this.model.get('value');
        this._datepicker.valueAsDate = value;
    }
    _picker_change() {
        if (!this._datepicker.validity.badInput) {
            this.model.set('value', this._datepicker.valueAsDate);
            this.touch();
        }
    }
    _picker_focusout() {
        if (this._datepicker.validity.badInput) {
            this.model.set('value', null);
            this.touch();
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_datetime.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_datetime.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DatetimeModel": () => (/* binding */ DatetimeModel),
/* harmony export */   "DatetimeView": () => (/* binding */ DatetimeView),
/* harmony export */   "NaiveDatetimeModel": () => (/* binding */ NaiveDatetimeModel),
/* harmony export */   "datetime_serializers": () => (/* binding */ datetime_serializers),
/* harmony export */   "deserialize_datetime": () => (/* binding */ deserialize_datetime),
/* harmony export */   "deserialize_naive": () => (/* binding */ deserialize_naive),
/* harmony export */   "naive_serializers": () => (/* binding */ naive_serializers),
/* harmony export */   "serialize_datetime": () => (/* binding */ serialize_datetime),
/* harmony export */   "serialize_naive": () => (/* binding */ serialize_naive)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_time__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget_time */ "./node_modules/@jupyter-widgets/controls/lib/widget_time.js");
// Copyright (c) Vidar Tonaas Fauske
// Distributed under the terms of the Modified BSD License.




function serialize_datetime(value) {
    if (value === null) {
        return null;
    }
    else {
        return {
            year: value.getUTCFullYear(),
            month: value.getUTCMonth(),
            date: value.getUTCDate(),
            hours: value.getUTCHours(),
            minutes: value.getUTCMinutes(),
            seconds: value.getUTCSeconds(),
            milliseconds: value.getUTCMilliseconds(),
        };
    }
}
function deserialize_datetime(value) {
    if (value === null) {
        return null;
    }
    else {
        const date = new Date();
        date.setUTCFullYear(value.year, value.month, value.date);
        date.setUTCHours(value.hours, value.minutes, value.seconds, value.milliseconds);
        return date;
    }
}
const datetime_serializers = {
    serialize: serialize_datetime,
    deserialize: deserialize_datetime,
};
class DatetimeModel extends _widget_core__WEBPACK_IMPORTED_MODULE_2__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'DatetimeModel', _view_name: 'DatetimeView', value: null, disabled: false, min: null, max: null });
    }
}
DatetimeModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_2__.CoreDescriptionModel.serializers), { value: datetime_serializers, min: datetime_serializers, max: datetime_serializers });
class DatetimeView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-datetimepicker');
        const test = document.createElement('input');
        test.type = 'datetime-local';
        if (test.type === 'text') {
            // No native support, split into date and time input:
            this._datepicker = document.createElement('input');
            this._datepicker.setAttribute('type', 'date');
            this._datepicker.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.uuid)();
            this._timepicker = document.createElement('input');
            this._timepicker.setAttribute('type', 'time');
            this._timepicker.id = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.uuid)();
            this.el.appendChild(this._datepicker);
            this.el.appendChild(this._timepicker);
        }
        else {
            this._datetimepicker = test;
            this._datetimepicker.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.uuid)();
            this.el.appendChild(this._datetimepicker);
        }
        this.listenTo(this.model, 'change:value', this._update_value);
        this.listenTo(this.model, 'change', this.update2);
        this._update_value();
        this.update2();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update2(model, options) {
        if (options === undefined || options.updated_view !== this) {
            const min = this.model.get('min');
            const max = this.model.get('max');
            if (this._datetimepicker) {
                this._datetimepicker.disabled = this.model.get('disabled');
                this._datetimepicker.min = Private.dt_as_dt_string(min);
                this._datetimepicker.max = Private.dt_as_dt_string(max);
            }
            else {
                this._datepicker.disabled = this.model.get('disabled');
                this._datepicker.min = Private.dt_as_date_string(min);
                this._datepicker.max = Private.dt_as_date_string(max);
                this._timepicker.disabled = this.model.get('disabled');
                // Don't support min/max time here.
                // It could be added by enabling min time if value is min date,
                // and enabling max time if value is max date, but leave as
                // TODO for now.
            }
        }
    }
    events() {
        // Typescript doesn't understand that these functions are called, so we
        // specifically use them here so it knows they are being used.
        void this._picker_change;
        void this._picker_focusout;
        return {
            'change [type="date"]': '_picker_change',
            'change [type="time"]': '_picker_change',
            'change [type="datetime-local"]': '_picker_change',
            'focusout [type="date"]': '_picker_focusout',
            'focusout [type="datetime-local"]': '_picker_focusout',
            'focusout [type="time"]': '_picker_focusout',
        };
    }
    _update_value(model, newValue, options) {
        if (options === undefined || options.updated_view !== this) {
            const value = this.model.get('value');
            if (this._datetimepicker) {
                this._datetimepicker.value = Private.dt_as_dt_string(value);
            }
            else {
                this._datepicker.valueAsDate = value;
                this._timepicker.value = Private.dt_as_time_string(value);
            }
        }
    }
    _picker_change() {
        if (this._datetimepicker) {
            if (!this._datetimepicker.validity.badInput) {
                const v = this._datetimepicker.value;
                let date = v ? new Date(v) : null;
                if (date && isNaN(date.valueOf())) {
                    date = null;
                }
                this.model.set('value', date, { updated_view: this });
                this.touch();
            }
        }
        else {
            if (!this._datepicker.validity.badInput &&
                !this._timepicker.validity.badInput) {
                const date = this._datepicker.valueAsDate;
                const time = (0,_widget_time__WEBPACK_IMPORTED_MODULE_3__.serialize_time)(this._timepicker.value);
                if (date !== null && time !== null) {
                    // * Use local time *
                    date.setHours(time.hours, time.minutes, time.seconds, time.milliseconds);
                }
                this.model.set('value', time !== null && date, { updated_view: this });
                this.touch();
            }
        }
    }
    _picker_focusout() {
        const pickers = [this._datetimepicker, this._datepicker, this._timepicker];
        if (pickers.some((p) => p && p.validity.badInput)) {
            this.model.set('value', null);
            this.touch();
        }
    }
}
var Private;
(function (Private) {
    // eslint-disable-next-line no-inner-declarations
    function dt_as_dt_string(value) {
        if (value === null) {
            return '';
        }
        // Replicate `toISOString()` but in local time zone:
        const parts = [];
        parts.push(`${value.getFullYear().toString().padStart(4, '0')}`);
        parts.push(`-${(value.getMonth() + 1).toString().padStart(2, '0')}`);
        parts.push(`-${value.getDate().toString().padStart(2, '0')}`);
        parts.push(`T${value.getHours().toString().padStart(2, '0')}`);
        parts.push(`:${value.getMinutes().toString().padStart(2, '0')}`);
        if (value.getSeconds() > 0 || value.getMilliseconds() > 0) {
            parts.push(`:${value.getSeconds().toString().padStart(2, '0')}`);
            if (value.getMilliseconds() > 0) {
                parts.push(`.${value.getMilliseconds().toString().padStart(3, '0')}`);
            }
        }
        return parts.join('');
    }
    Private.dt_as_dt_string = dt_as_dt_string;
    // eslint-disable-next-line no-inner-declarations
    function dt_as_date_string(value) {
        return value ? dt_as_dt_string(value).split('T', 2)[0] : '';
    }
    Private.dt_as_date_string = dt_as_date_string;
    // eslint-disable-next-line no-inner-declarations
    function dt_as_time_string(value) {
        return value ? dt_as_dt_string(value).split('T', 2)[1] : '';
    }
    Private.dt_as_time_string = dt_as_time_string;
})(Private || (Private = {}));
function serialize_naive(value) {
    if (value === null) {
        return null;
    }
    else {
        return {
            year: value.getFullYear(),
            month: value.getMonth(),
            date: value.getDate(),
            hours: value.getHours(),
            minutes: value.getMinutes(),
            seconds: value.getSeconds(),
            milliseconds: value.getMilliseconds(),
        };
    }
}
function deserialize_naive(value) {
    if (value === null) {
        return null;
    }
    else {
        const date = new Date();
        date.setFullYear(value.year, value.month, value.date);
        date.setHours(value.hours, value.minutes, value.seconds, value.milliseconds);
        return date;
    }
}
const naive_serializers = {
    serialize: serialize_naive,
    deserialize: deserialize_naive,
};
class NaiveDatetimeModel extends DatetimeModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'NaiveDatetimeModel' });
    }
}
NaiveDatetimeModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_2__.CoreDescriptionModel.serializers), { value: naive_serializers, min: naive_serializers, max: naive_serializers });


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_description.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DescriptionModel": () => (/* binding */ DescriptionModel),
/* harmony export */   "DescriptionStyleModel": () => (/* binding */ DescriptionStyleModel),
/* harmony export */   "DescriptionView": () => (/* binding */ DescriptionView),
/* harmony export */   "LabeledDOMWidgetModel": () => (/* binding */ LabeledDOMWidgetModel),
/* harmony export */   "LabeledDOMWidgetView": () => (/* binding */ LabeledDOMWidgetView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version */ "./node_modules/@jupyter-widgets/controls/lib/version.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.



class DescriptionStyleModel extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.StyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'DescriptionStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION });
    }
}
DescriptionStyleModel.styleProperties = {
    description_width: {
        selector: '.widget-label',
        attribute: 'width',
        default: null,
    },
};
class DescriptionModel extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'DescriptionModel', _view_name: 'DescriptionView', _view_module: '@jupyter-widgets/controls', _model_module: '@jupyter-widgets/controls', _view_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION, _model_module_version: _version__WEBPACK_IMPORTED_MODULE_2__.JUPYTER_CONTROLS_VERSION, description: '', description_allow_html: false });
    }
}
class DescriptionView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    render() {
        this.label = document.createElement('label');
        this.el.appendChild(this.label);
        this.label.className = 'widget-label';
        this.label.style.display = 'none';
        this.listenTo(this.model, 'change:description', this.updateDescription);
        this.listenTo(this.model, 'change:description_allow_html', this.updateDescription);
        this.listenTo(this.model, 'change:tabbable', this.updateTabindex);
        this.updateDescription();
        this.updateTabindex();
        this.updateTooltip();
    }
    typeset(element, text) {
        this.displayed.then(() => (0,_utils__WEBPACK_IMPORTED_MODULE_1__.typeset)(element, text));
    }
    updateDescription() {
        const description = this.model.get('description');
        if (description.length === 0) {
            this.label.style.display = 'none';
        }
        else {
            if (this.model.get('description_allow_html')) {
                this.label.innerHTML =
                    this.model.widget_manager.inline_sanitize(description);
            }
            else {
                this.label.textContent = description;
            }
            this.typeset(this.label);
            this.label.style.display = '';
        }
    }
    updateTooltip() {
        if (!this.label)
            return;
        this.label.title = this.model.get('tooltip');
    }
}
/**
 * For backwards compatibility with jupyter-js-widgets 2.x.
 *
 * Use DescriptionModel instead.
 */
class LabeledDOMWidgetModel extends DescriptionModel {
}
/**
 * For backwards compatibility with jupyter-js-widgets 2.x.
 *
 * Use DescriptionView instead.
 */
class LabeledDOMWidgetView extends DescriptionView {
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_float.js":
/*!********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_float.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BoundedFloatModel": () => (/* binding */ BoundedFloatModel),
/* harmony export */   "BoundedFloatTextModel": () => (/* binding */ BoundedFloatTextModel),
/* harmony export */   "FloatLogSliderModel": () => (/* binding */ FloatLogSliderModel),
/* harmony export */   "FloatLogSliderView": () => (/* binding */ FloatLogSliderView),
/* harmony export */   "FloatModel": () => (/* binding */ FloatModel),
/* harmony export */   "FloatProgressModel": () => (/* binding */ FloatProgressModel),
/* harmony export */   "FloatRangeSliderModel": () => (/* binding */ FloatRangeSliderModel),
/* harmony export */   "FloatRangeSliderView": () => (/* binding */ FloatRangeSliderView),
/* harmony export */   "FloatSliderModel": () => (/* binding */ FloatSliderModel),
/* harmony export */   "FloatSliderView": () => (/* binding */ FloatSliderView),
/* harmony export */   "FloatTextModel": () => (/* binding */ FloatTextModel),
/* harmony export */   "FloatTextView": () => (/* binding */ FloatTextView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_int__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_int */ "./node_modules/@jupyter-widgets/controls/lib/widget_int.js");
/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/defaultLocale.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nouislider */ "./node_modules/nouislider/dist/nouislider.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nouislider__WEBPACK_IMPORTED_MODULE_2__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.




class FloatModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FloatModel', value: 0 });
    }
}
class BoundedFloatModel extends FloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'BoundedFloatModel', max: 100.0, min: 0.0 });
    }
}
class FloatSliderModel extends BoundedFloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FloatSliderModel', _view_name: 'FloatSliderView', step: 1.0, orientation: 'horizontal', _range: false, readout: true, readout_format: '.2f', slider_color: null, continuous_update: true, disabled: false });
    }
    initialize(attributes, options) {
        super.initialize(attributes, options);
        this.on('change:readout_format', this.update_readout_format, this);
        this.update_readout_format();
    }
    update_readout_format() {
        this.readout_formatter = (0,d3_format__WEBPACK_IMPORTED_MODULE_3__.format)(this.get('readout_format'));
    }
}
class FloatLogSliderModel extends BoundedFloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FloatLogSliderModel', _view_name: 'FloatLogSliderView', step: 0.1, orientation: 'horizontal', _range: false, readout: true, readout_format: '.3g', slider_color: null, continuous_update: true, disabled: false, base: 10, value: 1.0, min: 0, max: 4 });
    }
    initialize(attributes, options) {
        super.initialize(attributes, options);
        this.on('change:readout_format', this.update_readout_format, this);
        this.update_readout_format();
    }
    update_readout_format() {
        this.readout_formatter = (0,d3_format__WEBPACK_IMPORTED_MODULE_3__.format)(this.get('readout_format'));
    }
}
class FloatRangeSliderModel extends FloatSliderModel {
}
class FloatSliderView extends _widget_int__WEBPACK_IMPORTED_MODULE_1__.IntSliderView {
    constructor() {
        super(...arguments);
        this._parse_value = parseFloat;
    }
    /**
     * Validate the value of the slider before sending it to the back-end
     * and applying it to the other views on the page.
     */
    _validate_slide_value(x) {
        return x;
    }
}
class FloatLogSliderView extends _widget_int__WEBPACK_IMPORTED_MODULE_1__.BaseIntSliderView {
    constructor() {
        super(...arguments);
        this._parse_value = parseFloat;
    }
    update(options) {
        super.update(options);
        const value = this.model.get('value');
        this.readout.textContent = this.valueToString(value);
    }
    /**
     * Convert from value to exponent
     *
     * @param value the widget value
     * @returns the log-value between the min/max exponents
     */
    logCalc(value) {
        const min = this.model.get('min');
        const max = this.model.get('max');
        const base = this.model.get('base');
        let log_value = Math.log(value) / Math.log(base);
        if (log_value > max) {
            log_value = max;
        }
        else if (log_value < min) {
            log_value = min;
        }
        return log_value;
    }
    createSlider() {
        var _a;
        const orientation = this.model.get('orientation');
        const behavior = this.model.get('behavior');
        nouislider__WEBPACK_IMPORTED_MODULE_2___default().create(this.$slider, {
            start: this.logCalc(this.model.get('value')),
            behaviour: behavior,
            range: {
                min: this.model.get('min'),
                max: this.model.get('max'),
            },
            step: (_a = this.model.get('step')) !== null && _a !== void 0 ? _a : undefined,
            animate: false,
            orientation: orientation,
            direction: orientation === 'horizontal' ? 'ltr' : 'rtl',
            format: {
                from: (value) => Number(value),
                to: (value) => value,
            },
        });
        // Using noUiSlider's event handler
        this.$slider.noUiSlider.on('update', (values, handle) => {
            this.handleSliderChange(values, handle);
        });
        this.$slider.noUiSlider.on('end', (values, handle) => {
            this.handleSliderChanged(values, handle);
        });
    }
    /**
     * Write value to a string
     */
    valueToString(value) {
        const format = this.model.readout_formatter;
        return format(value);
    }
    /**
     * Parse value from a string
     */
    stringToValue(text) {
        return text === null ? NaN : this._parse_value(text);
    }
    /**
     * this handles the entry of text into the contentEditable label first, the
     * value is checked if it contains a parseable value then it is clamped
     * within the min-max range of the slider finally, the model is updated if
     * the value is to be changed
     *
     * if any of these conditions are not met, the text is reset
     */
    handleTextChange() {
        let value = this.stringToValue(this.readout.textContent);
        const vmin = this.model.get('min');
        const vmax = this.model.get('max');
        const base = this.model.get('base');
        if (isNaN(value)) {
            this.readout.textContent = this.valueToString(this.model.get('value'));
        }
        else {
            value = Math.max(Math.min(value, Math.pow(base, vmax)), Math.pow(base, vmin));
            if (value !== this.model.get('value')) {
                this.readout.textContent = this.valueToString(value);
                this.model.set('value', value);
                this.touch();
            }
            else {
                this.readout.textContent = this.valueToString(this.model.get('value'));
            }
        }
    }
    /**
     * Called when the slider value is changing.
     */
    handleSliderChange(values, handle) {
        const base = this.model.get('base');
        const actual_value = Math.pow(base, this._validate_slide_value(values[0]));
        this.readout.textContent = this.valueToString(actual_value);
        // Only persist the value while sliding if the continuous_update
        // trait is set to true.
        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(values, handle);
        }
    }
    /**
     * Called when the slider value has changed.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    handleSliderChanged(values, handle) {
        if (this._updating_slider) {
            return;
        }
        const base = this.model.get('base');
        const actual_value = Math.pow(base, this._validate_slide_value(values[0]));
        this.model.set('value', actual_value, { updated_view: this });
        this.touch();
    }
    updateSliderValue(model, value, options) {
        if (options.updated_view === this) {
            return;
        }
        const log_value = this.logCalc(this.model.get('value'));
        this.$slider.noUiSlider.set(log_value);
    }
    updateSliderOptions(e) {
        this.$slider.noUiSlider.updateOptions({
            start: this.logCalc(this.model.get('value')),
            range: {
                min: this.model.get('min'),
                max: this.model.get('max'),
            },
            step: this.model.get('step'),
        });
    }
    _validate_slide_value(x) {
        return x;
    }
}
class FloatRangeSliderView extends _widget_int__WEBPACK_IMPORTED_MODULE_1__.IntRangeSliderView {
    constructor() {
        super(...arguments);
        this._parse_value = parseFloat;
        // matches: whitespace?, float, whitespace?, (hyphen, colon, or en-dash), whitespace?, float
        this._range_regex = /^\s*([+-]?(?:\d*\.?\d+|\d+\.)(?:[eE][-:]?\d+)?)\s*[-:–]\s*([+-]?(?:\d*\.?\d+|\d+\.)(?:[eE][+-]?\d+)?)/;
    }
    /**
     * Validate the value of the slider before sending it to the back-end
     * and applying it to the other views on the page.
     */
    _validate_slide_value(x) {
        return x;
    }
}
class FloatTextModel extends FloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FloatTextModel', _view_name: 'FloatTextView', disabled: false, continuous_update: false });
    }
}
class BoundedFloatTextModel extends BoundedFloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'BoundedFloatTextModel', _view_name: 'FloatTextView', disabled: false, continuous_update: false, step: 0.1 });
    }
}
class FloatTextView extends _widget_int__WEBPACK_IMPORTED_MODULE_1__.IntTextView {
    constructor() {
        super(...arguments);
        this._parse_value = parseFloat;
        this._default_step = 'any';
    }
    /**
     * Handle key press
     */
    handleKeypress(e) {
        // Overwrite IntTextView's handleKeypress
        // which prevents decimal points.
        e.stopPropagation();
    }
    /**
     * Handle key up
     */
    handleKeyUp(e) {
        // Overwrite IntTextView's handleKeyUp
        // which prevents decimal points.
    }
}
class FloatProgressModel extends BoundedFloatModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FloatProgressModel', _view_name: 'ProgressView', orientation: 'horizontal', bar_style: '', style: null });
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_image.js":
/*!********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_image.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ImageModel": () => (/* binding */ ImageModel),
/* harmony export */   "ImageView": () => (/* binding */ ImageView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.


class ImageModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ImageModel', _view_name: 'ImageView', format: 'png', width: '', height: '', value: new DataView(new ArrayBuffer(0)) });
    }
}
ImageModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel.serializers), { value: {
        serialize: (value) => {
            return new DataView(value.buffer.slice(0));
        },
    } });
class ImageView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    render() {
        /**
         * Called when view is rendered.
         */
        super.render();
        this.luminoWidget.addClass('jupyter-widgets');
        this.luminoWidget.addClass('widget-image');
        this.update(); // Set defaults.
    }
    update() {
        /**
         * Update the contents of this view
         *
         * Called when the model is changed.  The model may have been
         * changed by another view or by a state update from the back-end.
         */
        let url;
        const format = this.model.get('format');
        const value = this.model.get('value');
        if (format !== 'url') {
            const blob = new Blob([value], {
                type: `image/${this.model.get('format')}`,
            });
            url = URL.createObjectURL(blob);
        }
        else {
            url = new TextDecoder('utf-8').decode(value.buffer);
        }
        // Clean up the old objectURL
        const oldurl = this.el.src;
        this.el.src = url;
        if (oldurl) {
            URL.revokeObjectURL(oldurl);
        }
        const width = this.model.get('width');
        if (width !== undefined && width.length > 0) {
            this.el.setAttribute('width', width);
        }
        else {
            this.el.removeAttribute('width');
        }
        const height = this.model.get('height');
        if (height !== undefined && height.length > 0) {
            this.el.setAttribute('height', height);
        }
        else {
            this.el.removeAttribute('height');
        }
        return super.update();
    }
    remove() {
        if (this.el.src) {
            URL.revokeObjectURL(this.el.src);
        }
        super.remove();
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'img';
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_int.js":
/*!******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_int.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BaseIntSliderView": () => (/* binding */ BaseIntSliderView),
/* harmony export */   "BoundedIntModel": () => (/* binding */ BoundedIntModel),
/* harmony export */   "BoundedIntTextModel": () => (/* binding */ BoundedIntTextModel),
/* harmony export */   "IntModel": () => (/* binding */ IntModel),
/* harmony export */   "IntProgressModel": () => (/* binding */ IntProgressModel),
/* harmony export */   "IntRangeSliderModel": () => (/* binding */ IntRangeSliderModel),
/* harmony export */   "IntRangeSliderView": () => (/* binding */ IntRangeSliderView),
/* harmony export */   "IntSliderModel": () => (/* binding */ IntSliderModel),
/* harmony export */   "IntSliderView": () => (/* binding */ IntSliderView),
/* harmony export */   "IntTextModel": () => (/* binding */ IntTextModel),
/* harmony export */   "IntTextView": () => (/* binding */ IntTextView),
/* harmony export */   "PlayModel": () => (/* binding */ PlayModel),
/* harmony export */   "PlayView": () => (/* binding */ PlayView),
/* harmony export */   "ProgressStyleModel": () => (/* binding */ ProgressStyleModel),
/* harmony export */   "ProgressView": () => (/* binding */ ProgressView),
/* harmony export */   "SliderStyleModel": () => (/* binding */ SliderStyleModel)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/defaultLocale.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! nouislider */ "./node_modules/nouislider/dist/nouislider.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(nouislider__WEBPACK_IMPORTED_MODULE_4__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.






class IntModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'IntModel', value: 0 });
    }
}
class BoundedIntModel extends IntModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'BoundedIntModel', max: 100, min: 0 });
    }
}
class SliderStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SliderStyleModel' });
    }
}
SliderStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel.styleProperties), { handle_color: {
        selector: '.noUi-handle',
        attribute: 'background-color',
        default: null,
    } });
class IntSliderModel extends BoundedIntModel {
    defaults() {
        return Object.assign(Object.assign({}, 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, options) {
        super.initialize(attributes, options);
        this.on('change:readout_format', this.update_readout_format, this);
        this.update_readout_format();
    }
    update_readout_format() {
        this.readout_formatter = (0,d3_format__WEBPACK_IMPORTED_MODULE_5__.format)(this.get('readout_format'));
    }
}
class IntRangeSliderModel extends IntSliderModel {
}
class BaseIntSliderView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    constructor() {
        super(...arguments);
        this._parse_value = parseInt;
    }
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-slider');
        this.el.classList.add('widget-hslider');
        // Creating noUiSlider instance and scaffolding
        this.$slider = document.createElement('div');
        this.$slider.classList.add('slider');
        // Put the slider in a container
        this.slider_container = document.createElement('div');
        this.slider_container.classList.add('slider-container');
        this.slider_container.appendChild(this.$slider);
        this.el.appendChild(this.slider_container);
        this.readout = document.createElement('div');
        this.el.appendChild(this.readout);
        this.readout.classList.add('widget-readout');
        this.readout.contentEditable = 'true';
        this.readout.style.display = 'none';
        // noUiSlider constructor and event handlers
        this.createSlider();
        // Event handlers
        this.model.on('change:orientation', this.regenSlider, this);
        this.model.on('change:max', this.updateSliderOptions, this);
        this.model.on('change:min', this.updateSliderOptions, this);
        this.model.on('change:step', this.updateSliderOptions, this);
        this.model.on('change:value', this.updateSliderValue, this);
        // Set defaults.
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (options === undefined || options.updated_view !== this) {
            if (this.model.get('disabled')) {
                this.readout.contentEditable = 'false';
                this.$slider.setAttribute('disabled', true);
            }
            else {
                this.readout.contentEditable = 'true';
                this.$slider.removeAttribute('disabled');
            }
            // Use the right CSS classes for vertical & horizontal sliders
            const orientation = this.model.get('orientation');
            if (orientation === 'vertical') {
                this.el.classList.remove('widget-hslider');
                this.el.classList.add('widget-vslider');
                this.el.classList.remove('widget-inline-hbox');
                this.el.classList.add('widget-inline-vbox');
            }
            else {
                this.el.classList.remove('widget-vslider');
                this.el.classList.add('widget-hslider');
                this.el.classList.remove('widget-inline-vbox');
                this.el.classList.add('widget-inline-hbox');
            }
            const readout = this.model.get('readout');
            if (readout) {
                this.readout.style.display = '';
                this.displayed.then(() => {
                    if (this.readout_overflow()) {
                        this.readout.classList.add('overflow');
                    }
                    else {
                        this.readout.classList.remove('overflow');
                    }
                });
            }
            else {
                this.readout.style.display = 'none';
            }
        }
        return super.update();
    }
    /**
     * Returns true if the readout box content overflows.
     */
    readout_overflow() {
        return this.readout.scrollWidth > this.readout.clientWidth;
    }
    events() {
        return {
            // Dictionary of events and their handlers.
            'blur [contentEditable=true]': 'handleTextChange',
            'keydown [contentEditable=true]': 'handleKeyDown',
        };
    }
    handleKeyDown(e) {
        if (e.keyCode === 13) {
            /* keyboard keycodes `enter` */
            e.preventDefault();
            this.handleTextChange();
        }
    }
    /**
     * Create a new noUiSlider object
     */
    createSlider() {
        const orientation = this.model.get('orientation');
        const behavior = this.model.get('behavior');
        nouislider__WEBPACK_IMPORTED_MODULE_4___default().create(this.$slider, {
            start: this.model.get('value'),
            connect: true,
            behaviour: behavior,
            range: {
                min: this.model.get('min'),
                max: this.model.get('max'),
            },
            step: this.model.get('step'),
            animate: false,
            orientation: orientation,
            direction: orientation === 'horizontal' ? 'ltr' : 'rtl',
            format: {
                from: (value) => Number(value),
                to: (value) => this._validate_slide_value(value),
            },
        });
        // Using noUiSlider's event handler
        this.$slider.noUiSlider.on('update', (values, handle) => {
            this.handleSliderChange(values, handle);
        });
        this.$slider.noUiSlider.on('end', (values, handle) => {
            this.handleSliderChanged(values, handle);
        });
    }
    /**
     * Recreate/Regenerate a slider object
     * noUiSlider does not support in-place mutation of the orientation
     * state. We therefore need to destroy the current instance
     * and create a new one with the new properties. This is
     * handled in a separate function and has a dedicated event
     * handler.
     */
    regenSlider(e) {
        this.$slider.noUiSlider.destroy();
        this.createSlider();
    }
    /**
     * Validate the value of the slider before sending it to the back-end
     * and applying it to the other views on the page.
     */
    _validate_slide_value(x) {
        return Math.round(x);
    }
}
class IntRangeSliderView extends BaseIntSliderView {
    constructor() {
        super(...arguments);
        // range numbers can be separated by a hyphen, colon, or an en-dash
        this._range_regex = /^\s*([+-]?\d+)\s*[-:–]\s*([+-]?\d+)/;
    }
    update(options) {
        super.update(options);
        const value = this.model.get('value');
        this.readout.textContent = this.valueToString(value);
        if (this.model.get('value') !== value) {
            this.model.set('value', value, { updated_view: this });
            this.touch();
        }
    }
    /**
     * Write value to a string
     */
    valueToString(value) {
        const format = this.model.readout_formatter;
        return value
            .map(function (v) {
            return format(v);
        })
            .join(' – ');
    }
    /**
     * Parse value from a string
     */
    stringToValue(text) {
        if (text === null) {
            return null;
        }
        // ranges can be expressed either 'val-val' or 'val:val' (+spaces)
        const match = this._range_regex.exec(text);
        if (match) {
            return [this._parse_value(match[1]), this._parse_value(match[2])];
        }
        else {
            return null;
        }
    }
    handleTextChange() {
        let value = this.stringToValue(this.readout.textContent);
        const vmin = this.model.get('min');
        const vmax = this.model.get('max');
        // reject input where NaN or lower > upper
        if (value === null ||
            isNaN(value[0]) ||
            isNaN(value[1]) ||
            value[0] > value[1]) {
            this.readout.textContent = this.valueToString(this.model.get('value'));
        }
        else {
            // clamp to range
            value = [
                Math.max(Math.min(value[0], vmax), vmin),
                Math.max(Math.min(value[1], vmax), vmin),
            ];
            if (value[0] !== this.model.get('value')[0] ||
                value[1] !== this.model.get('value')[1]) {
                this.readout.textContent = this.valueToString(value);
                this.model.set('value', value);
                this.touch();
            }
            else {
                this.readout.textContent = this.valueToString(this.model.get('value'));
            }
        }
    }
    handleSliderChange(values, handle) {
        const actual_value = values.map(this._validate_slide_value);
        this.readout.textContent = this.valueToString(actual_value);
        // Only persist the value while sliding if the continuous_update
        // trait is set to true.
        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(values, handle);
        }
    }
    handleSliderChanged(values, handle) {
        const actual_value = values.map(this._validate_slide_value);
        this.model.set('value', actual_value, { updated_view: this });
        this.touch();
    }
    updateSliderOptions(e) {
        this.$slider.noUiSlider.updateOptions({
            start: this.model.get('value'),
            range: {
                min: this.model.get('min'),
                max: this.model.get('max'),
            },
            step: this.model.get('step'),
        });
    }
    updateSliderValue(model, _, options) {
        if (options.updated_view === this) {
            return;
        }
        const prev_value = this.$slider.noUiSlider.get();
        const value = this.model.get('value');
        if (prev_value[0] !== value[0] || prev_value[1] !== value[1]) {
            this.$slider.noUiSlider.set(value);
        }
    }
}
class IntSliderView extends BaseIntSliderView {
    update(options) {
        super.update(options);
        const min = this.model.get('min');
        const max = this.model.get('max');
        let value = this.model.get('value');
        if (value > max) {
            value = max;
        }
        else if (value < min) {
            value = min;
        }
        this.readout.textContent = this.valueToString(value);
        if (this.model.get('value') !== value) {
            this.model.set('value', value, { updated_view: this });
            this.touch();
        }
    }
    valueToString(value) {
        const format = this.model.readout_formatter;
        return format(value);
    }
    stringToValue(text) {
        return this._parse_value(text);
    }
    handleTextChange() {
        var _a;
        let value = this.stringToValue((_a = this.readout.textContent) !== null && _a !== void 0 ? _a : '');
        const vmin = this.model.get('min');
        const vmax = this.model.get('max');
        if (isNaN(value)) {
            this.readout.textContent = this.valueToString(this.model.get('value'));
        }
        else {
            value = Math.max(Math.min(value, vmax), vmin);
            if (value !== this.model.get('value')) {
                this.readout.textContent = this.valueToString(value);
                this.model.set('value', value);
                this.touch();
            }
            else {
                this.readout.textContent = this.valueToString(this.model.get('value'));
            }
        }
    }
    handleSliderChange(values, handle) {
        const actual_value = this._validate_slide_value(values[handle]);
        this.readout.textContent = this.valueToString(actual_value);
        // Only persist the value while sliding if the continuous_update
        // trait is set to true.
        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(values, handle);
        }
    }
    handleSliderChanged(values, handle) {
        const actual_value = this._validate_slide_value(values[handle]);
        const model_value = this.model.get('value');
        if (parseFloat(model_value) !== actual_value) {
            this.model.set('value', actual_value, { updated_view: this });
            this.touch();
        }
    }
    updateSliderOptions(e) {
        this.$slider.noUiSlider.updateOptions({
            start: this.model.get('value'),
            range: {
                min: this.model.get('min'),
                max: this.model.get('max'),
            },
            step: this.model.get('step'),
        });
    }
    updateSliderValue(model, _, options) {
        if (options.updated_view === this) {
            return;
        }
        const prev_value = this.$slider.noUiSlider.get();
        const value = this.model.get('value');
        if (prev_value !== value) {
            this.$slider.noUiSlider.set(value);
        }
    }
}
class IntTextModel extends IntModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'IntTextModel', _view_name: 'IntTextView', disabled: false, continuous_update: false });
    }
}
class BoundedIntTextModel extends BoundedIntModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'BoundedIntTextModel', _view_name: 'IntTextView', disabled: false, continuous_update: false, step: 1 });
    }
}
class IntTextView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    constructor() {
        super(...arguments);
        this._parse_value = parseInt;
        this._default_step = '1';
    }
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-text');
        this.textbox = document.createElement('input');
        this.textbox.type = 'number';
        this.textbox.required = true;
        this.textbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.uuid)();
        this.el.appendChild(this.textbox);
        this.update(); // Set defaults.
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (options === undefined || options.updated_view !== this) {
            const value = this.model.get('value');
            if (this._parse_value(this.textbox.value) !== value) {
                this.textbox.value = value.toString();
            }
            if (this.model.get('min') !== undefined) {
                this.textbox.min = this.model.get('min');
            }
            if (this.model.get('max') !== undefined) {
                this.textbox.max = this.model.get('max');
            }
            if (this.model.get('step') !== undefined &&
                this.model.get('step') !== null) {
                this.textbox.step = this.model.get('step');
            }
            else {
                this.textbox.step = this._default_step;
            }
            this.textbox.disabled = this.model.get('disabled');
        }
        return super.update();
    }
    events() {
        return {
            'keydown input': 'handleKeyDown',
            'keypress input': 'handleKeypress',
            'keyup input': 'handleKeyUp',
            'input input': 'handleChanging',
            'change input': 'handleChanged',
        };
    }
    /**
     * Handle key down
     *
     * Stop propagation so the event isn't sent to the application.
     */
    handleKeyDown(e) {
        e.stopPropagation();
    }
    /**
     * Handles key press
     */
    handleKeypress(e) {
        if (/[e,. ]/.test(String.fromCharCode(e.keyCode))) {
            e.preventDefault();
        }
    }
    /**
     * Handle key up
     */
    handleKeyUp(e) {
        if (e.altKey || e.ctrlKey) {
            return;
        }
        const target = e.target;
        /* remove invalid characters */
        let value = target.value;
        value = value.replace(/[e,.\s]/g, '');
        if (value.length >= 1) {
            const subvalue = value.substr(1);
            value = value[0] + subvalue.replace(/[+-]/g, '');
        }
        if (target.value !== value) {
            e.preventDefault();
            target.value = value;
        }
    }
    /**
     * Call the submit handler if continuous update is true and we are not
     * obviously incomplete.
     */
    handleChanging(e) {
        const target = e.target;
        const trimmed = target.value.trim();
        if (trimmed === '' || ['-', '-.', '.', '+.', '+'].indexOf(trimmed) >= 0) {
            // incomplete number
            return;
        }
        if (this.model.get('continuous_update')) {
            this.handleChanged(e);
        }
    }
    /**
     * Applies validated input.
     */
    handleChanged(e) {
        const target = e.target;
        let numericalValue = this._parse_value(target.value);
        // If parse failed, reset value to value stored in model.
        if (isNaN(numericalValue)) {
            target.value = this.model.get('value');
        }
        else {
            // Handle both the unbounded and bounded case by
            // checking to see if the max/min properties are defined
            let boundedValue = numericalValue;
            if (this.model.get('max') !== undefined) {
                boundedValue = Math.min(this.model.get('max'), boundedValue);
            }
            if (this.model.get('min') !== undefined) {
                boundedValue = Math.max(this.model.get('min'), boundedValue);
            }
            if (boundedValue !== numericalValue) {
                target.value = boundedValue;
                numericalValue = boundedValue;
            }
            // Apply the value if it has changed.
            if (numericalValue !== this.model.get('value')) {
                this.model.set('value', numericalValue, { updated_view: this });
                this.touch();
            }
        }
    }
}
class ProgressStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ProgressStyleModel' });
    }
}
ProgressStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel.styleProperties), { bar_color: {
        selector: '.progress-bar',
        attribute: 'background-color',
        default: null,
    } });
class IntProgressModel extends BoundedIntModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'IntProgressModel', _view_name: 'ProgressView', orientation: 'horizontal', bar_style: '', style: null });
    }
}
class ProgressView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    initialize(parameters) {
        super.initialize(parameters);
        this.listenTo(this.model, 'change:bar_style', this.update_bar_style);
        this.luminoWidget.addClass('jupyter-widgets');
    }
    render() {
        super.render();
        const orientation = this.model.get('orientation');
        const className = orientation === 'horizontal' ? 'widget-hprogress' : 'widget-vprogress';
        this.el.classList.add(className);
        this.progress = document.createElement('div');
        this.progress.classList.add('progress');
        this.progress.style.position = 'relative';
        this.el.appendChild(this.progress);
        this.bar = document.createElement('div');
        this.bar.classList.add('progress-bar');
        this.bar.style.position = 'absolute';
        this.bar.style.bottom = '0px';
        this.bar.style.left = '0px';
        this.progress.appendChild(this.bar);
        // Set defaults.
        this.update();
        this.set_bar_style();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        const value = this.model.get('value');
        const max = this.model.get('max');
        const min = this.model.get('min');
        const orientation = this.model.get('orientation');
        const percent = (100.0 * (value - min)) / (max - min);
        if (orientation === 'horizontal') {
            this.el.classList.remove('widget-inline-vbox');
            this.el.classList.remove('widget-vprogress');
            this.el.classList.add('widget-inline-hbox');
            this.el.classList.add('widget-hprogress');
            this.bar.style.width = percent + '%';
            this.bar.style.height = '100%';
        }
        else {
            this.el.classList.remove('widget-inline-hbox');
            this.el.classList.remove('widget-hprogress');
            this.el.classList.add('widget-inline-vbox');
            this.el.classList.add('widget-vprogress');
            this.bar.style.width = '100%';
            this.bar.style.height = percent + '%';
        }
        return super.update();
    }
    update_bar_style() {
        this.update_mapped_classes(ProgressView.class_map, 'bar_style', this.bar);
    }
    set_bar_style() {
        this.set_mapped_classes(ProgressView.class_map, 'bar_style', this.bar);
    }
}
ProgressView.class_map = {
    success: ['progress-bar-success'],
    info: ['progress-bar-info'],
    warning: ['progress-bar-warning'],
    danger: ['progress-bar-danger'],
};
class PlayModel extends BoundedIntModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'PlayModel', _view_name: 'PlayView', repeat: false, playing: false, show_repeat: true, interval: 100, step: 1, disabled: false });
    }
    initialize(attributes, options) {
        super.initialize(attributes, options);
    }
    loop() {
        if (!this.get('playing')) {
            return;
        }
        const next_value = this.get('value') + this.get('step');
        if (next_value <= this.get('max')) {
            this.set('value', next_value);
            this.schedule_next();
        }
        else {
            if (this.get('repeat')) {
                this.set('value', this.get('min'));
                this.schedule_next();
            }
            else {
                this.pause();
            }
        }
        this.save_changes();
    }
    schedule_next() {
        this._timerId = window.setTimeout(this.loop.bind(this), this.get('interval'));
    }
    stop() {
        this.pause();
        this.set('value', this.get('min'));
        this.save_changes();
    }
    pause() {
        window.clearTimeout(this._timerId);
        this._timerId = undefined;
        this.set('playing', false);
        this.save_changes();
    }
    animate() {
        if (this._timerId !== undefined) {
            return;
        }
        if (this.get('value') === this.get('max')) {
            // if the value is at the end, reset it first, and then schedule the next
            this.set('value', this.get('min'));
            this.schedule_next();
            this.save_changes();
        }
        else {
            // otherwise directly start with the next value
            // loop will call save_changes in this case
            this.loop();
        }
        this.save_changes();
    }
    play() {
        this.set('playing', !this.get('playing'));
        this.save_changes();
    }
    repeat() {
        this.set('repeat', !this.get('repeat'));
        this.save_changes();
    }
}
class PlayView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_2__.DOMWidgetView {
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-play');
        this.playPauseButton = document.createElement('button');
        this.stopButton = document.createElement('button');
        this.repeatButton = document.createElement('button');
        this.playPauseButton.className = 'jupyter-button';
        this.stopButton.className = 'jupyter-button';
        this.repeatButton.className = 'jupyter-button';
        this.el.appendChild(this.playPauseButton); // Toggle button with playing
        this.el.appendChild(this.stopButton); // Disable if not playing
        this.el.appendChild(this.repeatButton); // Always enabled, but may be hidden
        const playIcon = document.createElement('i');
        playIcon.className = 'fa fa-play';
        this.playPauseButton.appendChild(playIcon);
        const stopIcon = document.createElement('i');
        stopIcon.className = 'fa fa-stop';
        this.stopButton.appendChild(stopIcon);
        const repeatIcon = document.createElement('i');
        repeatIcon.className = 'fa fa-retweet';
        this.repeatButton.appendChild(repeatIcon);
        this.playPauseButton.onclick = this.model.play.bind(this.model);
        this.stopButton.onclick = this.model.stop.bind(this.model);
        this.repeatButton.onclick = this.model.repeat.bind(this.model);
        this.listenTo(this.model, 'change:playing', this.onPlayingChanged);
        this.listenTo(this.model, 'change:repeat', this.updateRepeat);
        this.listenTo(this.model, 'change:show_repeat', this.updateRepeat);
        this.updatePlaying();
        this.updateRepeat();
        this.update();
    }
    update() {
        const disabled = this.model.get('disabled');
        this.playPauseButton.disabled = disabled;
        this.stopButton.disabled = disabled;
        this.repeatButton.disabled = disabled;
        this.updatePlaying();
    }
    onPlayingChanged() {
        this.updatePlaying();
        const previous = this.model.previous('playing');
        const current = this.model.get('playing');
        if (!previous && current) {
            this.model.animate();
        }
        else {
            this.model.pause();
        }
    }
    updatePlaying() {
        const playing = this.model.get('playing');
        const icon = this.playPauseButton.getElementsByTagName('i')[0];
        if (playing) {
            icon.className = 'fa fa-pause';
        }
        else {
            icon.className = 'fa fa-play';
        }
    }
    updateRepeat() {
        const repeat = this.model.get('repeat');
        this.repeatButton.style.display = this.model.get('show_repeat')
            ? this.playPauseButton.style.display
            : 'none';
        if (repeat) {
            this.repeatButton.classList.add('mod-active');
        }
        else {
            this.repeatButton.classList.remove('mod-active');
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_link.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_link.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DirectionalLinkModel": () => (/* binding */ DirectionalLinkModel),
/* harmony export */   "LinkModel": () => (/* binding */ LinkModel)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.


class DirectionalLinkModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { target: undefined, source: undefined, _model_name: 'DirectionalLinkModel' });
    }
    initialize(attributes, options) {
        super.initialize(attributes, options);
        this.on('change', this.updateBindings, this);
        this.updateBindings();
    }
    updateValue(sourceModel, sourceAttr, targetModel, targetAttr) {
        if (this._updating) {
            return;
        }
        this._updating = true;
        try {
            if (targetModel) {
                targetModel.set(targetAttr, sourceModel.get(sourceAttr));
                targetModel.save_changes();
            }
        }
        finally {
            this._updating = false;
        }
    }
    updateBindings() {
        this.cleanup();
        [this.sourceModel, this.sourceAttr] = this.get('source') || [null, null];
        [this.targetModel, this.targetAttr] = this.get('target') || [null, null];
        if (this.sourceModel) {
            this.listenTo(this.sourceModel, 'change:' + this.sourceAttr, () => {
                this.updateValue(this.sourceModel, this.sourceAttr, this.targetModel, this.targetAttr);
            });
            this.updateValue(this.sourceModel, this.sourceAttr, this.targetModel, this.targetAttr);
            this.listenToOnce(this.sourceModel, 'destroy', this.cleanup);
        }
        if (this.targetModel) {
            this.listenToOnce(this.targetModel, 'destroy', this.cleanup);
        }
    }
    cleanup() {
        // Stop listening to 'change' and 'destroy' events of the source and target
        if (this.sourceModel) {
            this.stopListening(this.sourceModel, 'change:' + this.sourceAttr, undefined);
            this.stopListening(this.sourceModel, 'destroy', undefined);
        }
        if (this.targetModel) {
            this.stopListening(this.targetModel, 'destroy', undefined);
        }
    }
}
DirectionalLinkModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreWidgetModel.serializers), { target: { deserialize: _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.unpack_models }, source: { deserialize: _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.unpack_models } });
class LinkModel extends DirectionalLinkModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'LinkModel' });
    }
    updateBindings() {
        super.updateBindings();
        if (this.targetModel) {
            this.listenTo(this.targetModel, 'change:' + this.targetAttr, () => {
                this.updateValue(this.targetModel, this.targetAttr, this.sourceModel, this.sourceAttr);
            });
        }
    }
    cleanup() {
        super.cleanup();
        if (this.targetModel) {
            this.stopListening(this.targetModel, 'change:' + this.targetAttr, undefined);
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_selection.js":
/*!************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_selection.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DropdownModel": () => (/* binding */ DropdownModel),
/* harmony export */   "DropdownView": () => (/* binding */ DropdownView),
/* harmony export */   "MultipleSelectionModel": () => (/* binding */ MultipleSelectionModel),
/* harmony export */   "RadioButtonsModel": () => (/* binding */ RadioButtonsModel),
/* harmony export */   "RadioButtonsView": () => (/* binding */ RadioButtonsView),
/* harmony export */   "SelectModel": () => (/* binding */ SelectModel),
/* harmony export */   "SelectMultipleModel": () => (/* binding */ SelectMultipleModel),
/* harmony export */   "SelectMultipleView": () => (/* binding */ SelectMultipleView),
/* harmony export */   "SelectView": () => (/* binding */ SelectView),
/* harmony export */   "SelectionModel": () => (/* binding */ SelectionModel),
/* harmony export */   "SelectionRangeSliderModel": () => (/* binding */ SelectionRangeSliderModel),
/* harmony export */   "SelectionRangeSliderView": () => (/* binding */ SelectionRangeSliderView),
/* harmony export */   "SelectionSliderModel": () => (/* binding */ SelectionSliderModel),
/* harmony export */   "SelectionSliderView": () => (/* binding */ SelectionSliderView),
/* harmony export */   "SelectionView": () => (/* binding */ SelectionView),
/* harmony export */   "ToggleButtonsModel": () => (/* binding */ ToggleButtonsModel),
/* harmony export */   "ToggleButtonsStyleModel": () => (/* binding */ ToggleButtonsStyleModel),
/* harmony export */   "ToggleButtonsView": () => (/* binding */ ToggleButtonsView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! nouislider */ "./node_modules/nouislider/dist/nouislider.js");
/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nouislider__WEBPACK_IMPORTED_MODULE_3__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.





class SelectionModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectionModel', index: '', _options_labels: [], disabled: false });
    }
}
class SelectionView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render(); // Incl. setting some defaults.
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        super.update();
        // Disable listbox if needed
        if (this.listbox) {
            this.listbox.disabled = this.model.get('disabled');
        }
        // Set tabindex
        this.updateTabindex();
        this.updateTooltip();
    }
    updateTabindex() {
        if (!this.listbox) {
            return; // we might be constructing the parent
        }
        const tabbable = this.model.get('tabbable');
        if (tabbable === true) {
            this.listbox.setAttribute('tabIndex', '0');
        }
        else if (tabbable === false) {
            this.listbox.setAttribute('tabIndex', '-1');
        }
        else if (tabbable === null) {
            this.listbox.removeAttribute('tabIndex');
        }
    }
    updateTooltip() {
        if (!this.listbox)
            return; // we might be constructing the parent
        const title = this.model.get('tooltip');
        if (!title) {
            this.listbox.removeAttribute('title');
        }
        else if (this.model.get('description').length === 0) {
            this.listbox.setAttribute('title', title);
        }
    }
}
class DropdownModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'DropdownModel', _view_name: 'DropdownView', button_style: '' });
    }
}
// TODO: Make a Lumino dropdown control, wrapped in DropdownView. Also, fix
// bugs in keyboard handling. See
// https://github.com/jupyter-widgets/ipywidgets/issues/1055 and
// https://github.com/jupyter-widgets/ipywidgets/issues/1049
// For now, we subclass SelectView to provide DropdownView
// For the old code, see commit f68bfbc566f3a78a8f3350b438db8ed523ce3642
class DropdownView extends SelectionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-dropdown');
        this.listbox = document.createElement('select');
        this.listbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this.el.appendChild(this.listbox);
        this._updateOptions();
        this.update();
    }
    /**
     * Update the contents of this view
     */
    update(options) {
        // Debounce set calls from ourselves:
        if ((options === null || options === void 0 ? void 0 : options.updated_view) !== this) {
            const optsChanged = this.model.hasChanged('_options_labels');
            if (optsChanged) {
                // Need to update options:
                this._updateOptions();
            }
        }
        // Select the correct element
        const index = this.model.get('index');
        this.listbox.selectedIndex = index === null ? -1 : index;
        return super.update();
    }
    _updateOptions() {
        this.listbox.textContent = '';
        const items = this.model.get('_options_labels');
        for (let i = 0; i < items.length; i++) {
            const item = items[i];
            const option = document.createElement('option');
            option.textContent = item.replace(/ /g, '\xa0'); // space -> &nbsp;
            option.setAttribute('data-value', encodeURIComponent(item));
            option.value = item;
            this.listbox.appendChild(option);
        }
    }
    events() {
        return {
            'change select': '_handle_change',
        };
    }
    /**
     * Handle when a new value is selected.
     */
    _handle_change() {
        this.model.set('index', this.listbox.selectedIndex === -1 ? null : this.listbox.selectedIndex, { updated_view: this });
        this.touch();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.listbox.focus();
        }
        else if (content.do === 'blur') {
            this.listbox.blur();
        }
    }
}
class SelectModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectModel', _view_name: 'SelectView', rows: 5 });
    }
}
class SelectView extends SelectionView {
    /**
     * Public constructor.
     */
    initialize(parameters) {
        super.initialize(parameters);
        // Create listbox here so that subclasses can modify it before it is populated in render()
        this.listbox = document.createElement('select');
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-select');
        this.listbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this.el.appendChild(this.listbox);
        this._updateOptions();
        this.update();
        this.updateSelection();
    }
    /**
     * Update the contents of this view
     */
    update(options) {
        // Don't update options/index on set calls from ourselves:
        if ((options === null || options === void 0 ? void 0 : options.updated_view) !== this) {
            const optsChange = this.model.hasChanged('_options_labels');
            const idxChange = this.model.hasChanged('index');
            if (optsChange || idxChange) {
                // Stash the index to guard against change events
                const idx = this.model.get('index');
                if (optsChange) {
                    this._updateOptions();
                }
                this.updateSelection(idx);
            }
        }
        super.update();
        let rows = this.model.get('rows');
        if (rows === null) {
            rows = '';
        }
        this.listbox.setAttribute('size', rows);
    }
    updateSelection(index) {
        index = index || this.model.get('index');
        this.listbox.selectedIndex = index === null ? -1 : index;
    }
    _updateOptions() {
        this.listbox.textContent = '';
        const items = this.model.get('_options_labels');
        for (let i = 0; i < items.length; i++) {
            const item = items[i];
            const option = document.createElement('option');
            option.textContent = item.replace(/ /g, '\xa0'); // space -> &nbsp;
            option.setAttribute('data-value', encodeURIComponent(item));
            option.value = item;
            this.listbox.appendChild(option);
        }
    }
    events() {
        return {
            'change select': '_handle_change',
        };
    }
    /**
     * Handle when a new value is selected.
     */
    _handle_change() {
        this.model.set('index', this.listbox.selectedIndex, { updated_view: this });
        this.touch();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do == 'focus') {
            this.listbox.focus();
        }
        else if (content.do == 'blur') {
            this.listbox.blur();
        }
    }
}
class RadioButtonsModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'RadioButtonsModel', _view_name: 'RadioButtonsView', tooltips: [], icons: [], button_style: '' });
    }
}
class RadioButtonsView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-radio');
        this.container = document.createElement('div');
        this.el.appendChild(this.container);
        this.container.classList.add('widget-radio-box');
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        const items = this.model.get('_options_labels');
        const radios = Array.from(this.container.querySelectorAll('input[type="radio"]')).map((x) => x.value);
        let stale = items.length !== radios.length;
        if (!stale) {
            for (let i = 0, len = items.length; i < len; ++i) {
                if (radios[i] !== items[i]) {
                    stale = true;
                    break;
                }
            }
        }
        if (stale && (options === undefined || options.updated_view !== this)) {
            // Add items to the DOM.
            this.container.textContent = '';
            items.forEach((item, index) => {
                const label = document.createElement('label');
                label.textContent = item;
                this.container.appendChild(label);
                const radio = document.createElement('input');
                radio.setAttribute('type', 'radio');
                radio.value = index.toString();
                radio.setAttribute('data-value', encodeURIComponent(item));
                label.appendChild(radio);
            });
        }
        items.forEach((item, index) => {
            const item_query = 'input[data-value="' + encodeURIComponent(item) + '"]';
            const radio = this.container.querySelectorAll(item_query);
            if (radio.length > 0) {
                const radio_el = radio[0];
                radio_el.checked = this.model.get('index') === index;
                radio_el.disabled = this.model.get('disabled');
            }
        });
        // Schedule adjustPadding asynchronously to
        // allow dom elements to be created properly
        setTimeout(this.adjustPadding, 0, this);
        return super.update(options);
    }
    /**
     * Adjust Padding to Multiple of Line Height
     *
     * Adjust margins so that the overall height
     * is a multiple of a single line height.
     *
     * This widget needs it because radio options
     * are spaced tighter than individual widgets
     * yet we would like the full widget line up properly
     * when displayed side-by-side with other widgets.
     */
    adjustPadding(e) {
        // Vertical margins on a widget
        const elStyles = window.getComputedStyle(e.el);
        const margins = parseInt(elStyles.marginTop, 10) + parseInt(elStyles.marginBottom, 10);
        // Total spaces taken by a single-line widget
        const lineHeight = e.label.offsetHeight + margins;
        // Current adjustment value on this widget
        const cStyles = window.getComputedStyle(e.container);
        const containerMargin = parseInt(cStyles.marginBottom, 10);
        // How far we are off from a multiple of single windget lines
        const diff = (e.el.offsetHeight + margins - containerMargin) % lineHeight;
        // Apply the new adjustment
        const extraMargin = diff === 0 ? 0 : lineHeight - diff;
        e.container.style.marginBottom = extraMargin + 'px';
    }
    events() {
        return {
            'click input[type="radio"]': '_handle_click',
        };
    }
    /**
     * Handle when a value is clicked.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    _handle_click(event) {
        const target = event.target;
        this.model.set('index', parseInt(target.value, 10), { updated_view: this });
        this.touch();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do == 'focus') {
            const firstItem = this.container.firstElementChild;
            firstItem.focus();
        }
        else if (content.do == 'blur') {
            for (let i = 0; i < this.container.children.length; i++) {
                const item = this.container.children[i];
                item.blur();
            }
        }
    }
}
class ToggleButtonsStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ToggleButtonsStyleModel' });
    }
}
ToggleButtonsStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel.styleProperties), { button_width: {
        selector: '.widget-toggle-button',
        attribute: 'width',
        default: null,
    }, font_weight: {
        selector: '.widget-toggle-button',
        attribute: 'font-weight',
        default: '',
    } });
class ToggleButtonsModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ToggleButtonsModel', _view_name: 'ToggleButtonsView' });
    }
}
class ToggleButtonsView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    initialize(options) {
        this._css_state = {};
        super.initialize(options);
        this.listenTo(this.model, 'change:button_style', this.update_button_style);
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-toggle-buttons');
        this.buttongroup = document.createElement('div');
        this.el.appendChild(this.buttongroup);
        this.update();
        this.set_button_style();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        const items = this.model.get('_options_labels');
        const icons = this.model.get('icons') || [];
        const previous_icons = this.model.previous('icons') || [];
        const previous_bstyle = ToggleButtonsView.classMap[this.model.previous('button_style')] || '';
        const tooltips = this.model.get('tooltips') || [];
        const disabled = this.model.get('disabled');
        const buttons = this.buttongroup.querySelectorAll('button');
        const values = Array.from(buttons).map((x) => x.value);
        let stale = false;
        for (let i = 0, len = items.length; i < len; ++i) {
            if (values[i] !== items[i] || icons[i] !== previous_icons[i]) {
                stale = true;
                break;
            }
        }
        if (stale && (options === undefined || options.updated_view !== this)) {
            // Add items to the DOM.
            this.buttongroup.textContent = '';
            items.forEach((item, index) => {
                let item_html;
                const empty = item.trim().length === 0 &&
                    (!icons[index] || icons[index].trim().length === 0);
                if (empty) {
                    item_html = '&nbsp;';
                }
                else {
                    item_html = _utils__WEBPACK_IMPORTED_MODULE_2__.escape_html(item);
                }
                const icon = document.createElement('i');
                const button = document.createElement('button');
                if (icons[index]) {
                    icon.className = 'fa fa-' + icons[index];
                }
                button.setAttribute('type', 'button');
                button.className = 'widget-toggle-button jupyter-button';
                if (previous_bstyle) {
                    button.classList.add(previous_bstyle);
                }
                button.innerHTML = item_html;
                button.setAttribute('data-value', encodeURIComponent(item));
                button.setAttribute('value', index.toString());
                button.appendChild(icon);
                button.disabled = disabled;
                if (tooltips[index]) {
                    button.setAttribute('title', tooltips[index]);
                }
                this.update_style_traits(button);
                this.buttongroup.appendChild(button);
            });
        }
        // Select active button.
        items.forEach((item, index) => {
            const item_query = '[data-value="' + encodeURIComponent(item) + '"]';
            const button = this.buttongroup.querySelector(item_query);
            if (this.model.get('index') === index) {
                button.classList.add('mod-active');
            }
            else {
                button.classList.remove('mod-active');
            }
        });
        this.stylePromise.then(function (style) {
            if (style) {
                style.style();
            }
        });
        return super.update(options);
    }
    update_style_traits(button) {
        for (const name in this._css_state) {
            if (Object.prototype.hasOwnProperty.call(this._css_state, 'name')) {
                if (name === 'margin') {
                    this.buttongroup.style[name] = this._css_state[name];
                }
                else if (name !== 'width') {
                    if (button) {
                        button.style[name] = this._css_state[name];
                    }
                    else {
                        const buttons = this.buttongroup.querySelectorAll('button');
                        if (buttons.length) {
                            buttons[0].style[name] = this._css_state[name];
                        }
                    }
                }
            }
        }
    }
    update_button_style() {
        const buttons = this.buttongroup.querySelectorAll('button');
        for (let i = 0; i < buttons.length; i++) {
            this.update_mapped_classes(ToggleButtonsView.classMap, 'button_style', buttons[i]);
        }
    }
    set_button_style() {
        const buttons = this.buttongroup.querySelectorAll('button');
        for (let i = 0; i < buttons.length; i++) {
            this.set_mapped_classes(ToggleButtonsView.classMap, 'button_style', buttons[i]);
        }
    }
    events() {
        return {
            'click button': '_handle_click',
        };
    }
    /**
     * Handle when a value is clicked.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    _handle_click(event) {
        const target = event.target;
        this.model.set('index', parseInt(target.value, 10), { updated_view: this });
        this.touch();
        // We also send a clicked event, since the value is only set if it changed.
        // See https://github.com/jupyter-widgets/ipywidgets/issues/763
        this.send({ event: 'click' });
    }
}
(function (ToggleButtonsView) {
    ToggleButtonsView.classMap = {
        primary: ['mod-primary'],
        success: ['mod-success'],
        info: ['mod-info'],
        warning: ['mod-warning'],
        danger: ['mod-danger'],
    };
})(ToggleButtonsView || (ToggleButtonsView = {}));
class SelectionSliderModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectionSliderModel', _view_name: 'SelectionSliderView', orientation: 'horizontal', readout: true, continuous_update: true });
    }
}
class SelectionSliderView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-hslider');
        this.el.classList.add('widget-slider');
        // Creating noUiSlider instance and scaffolding
        this.$slider = document.createElement('div');
        this.$slider.classList.add('slider');
        // Put the slider in a container
        this.slider_container = document.createElement('div');
        this.slider_container.classList.add('slider-container');
        this.slider_container.appendChild(this.$slider);
        this.el.appendChild(this.slider_container);
        this.readout = document.createElement('div');
        this.el.appendChild(this.readout);
        this.readout.classList.add('widget-readout');
        this.readout.style.display = 'none';
        // noUiSlider constructor and event handlers
        this.createSlider();
        // Event handlers
        this.model.on('change:orientation', this.regenSlider, this);
        this.model.on('change:index', this.updateSliderValue, this);
        // Set defaults.
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if ((options === null || options === void 0 ? void 0 : options.updated_view) !== this) {
            this.updateSliderOptions(this.model);
            const orientation = this.model.get('orientation');
            const disabled = this.model.get('disabled');
            if (disabled) {
                this.readout.contentEditable = 'false';
                this.$slider.setAttribute('disabled', true);
            }
            else {
                this.readout.contentEditable = 'true';
                this.$slider.removeAttribute('disabled');
            }
            // Use the right CSS classes for vertical & horizontal sliders
            if (orientation === 'vertical') {
                this.el.classList.remove('widget-hslider');
                this.el.classList.remove('widget-inline-hbox');
                this.el.classList.add('widget-vslider');
                this.el.classList.add('widget-inline-vbox');
            }
            else {
                this.el.classList.remove('widget-vslider');
                this.el.classList.remove('widget-inline-vbox');
                this.el.classList.add('widget-hslider');
                this.el.classList.add('widget-inline-hbox');
            }
            const readout = this.model.get('readout');
            if (readout) {
                // this.$readout.show();
                this.readout.style.display = '';
            }
            else {
                // this.$readout.hide();
                this.readout.style.display = 'none';
            }
            this.updateSelection();
        }
        return super.update(options);
    }
    regenSlider(e) {
        this.$slider.noUiSlider.destroy();
        this.createSlider();
    }
    createSlider() {
        const labels = this.model.get('_options_labels');
        const min = 0;
        const max = labels.length - 1;
        const orientation = this.model.get('orientation');
        const behavior = this.model.get('behavior');
        nouislider__WEBPACK_IMPORTED_MODULE_3___default().create(this.$slider, {
            start: this.model.get('index'),
            connect: true,
            behaviour: behavior,
            range: {
                min: min,
                max: max,
            },
            step: 1,
            animate: false,
            orientation: orientation,
            direction: orientation === 'horizontal' ? 'ltr' : 'rtl',
            format: {
                from: (value) => Number(value),
                to: (value) => Math.round(value),
            },
        });
        // Using noUiSlider's event handler
        this.$slider.noUiSlider.on('update', (values, handle) => {
            this.handleSliderChange(values, handle);
        });
        this.$slider.noUiSlider.on('end', (values, handle) => {
            this.handleSliderChanged(values, handle);
        });
    }
    events() {
        return {
            slide: 'handleSliderChange',
            slidestop: 'handleSliderChanged',
        };
    }
    updateSelection() {
        const index = this.model.get('index');
        this.updateReadout(index);
    }
    updateReadout(index) {
        const value = this.model.get('_options_labels')[index];
        this.readout.textContent = value;
    }
    /**
     * Called when the slider value is changing.
     */
    handleSliderChange(values, handle) {
        const index = values[0];
        this.updateReadout(index);
        // Only persist the value while sliding if the continuous_update
        // trait is set to true.
        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(values, handle);
        }
    }
    /**
     * Called when the slider value has changed.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    handleSliderChanged(values, handle) {
        const index = values[0];
        this.updateReadout(index);
        this.model.set('index', index, { updated_view: this });
        this.touch();
    }
    updateSliderOptions(e) {
        const labels = this.model.get('_options_labels');
        const min = 0;
        const max = labels.length - 1;
        this.$slider.noUiSlider.updateOptions({
            start: this.model.get('index'),
            range: {
                min: min,
                max: max,
            },
            step: 1,
        });
    }
    updateSliderValue(model, _, options) {
        if (options.updated_view === this) {
            return;
        }
        const prev_index = this.$slider.noUiSlider.get();
        const index = this.model.get('index');
        if (prev_index !== index) {
            this.$slider.noUiSlider.set(index);
        }
    }
}
class MultipleSelectionModel extends SelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'MultipleSelectionModel' });
    }
}
class SelectMultipleModel extends MultipleSelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectMultipleModel', _view_name: 'SelectMultipleView', rows: null });
    }
}
class SelectMultipleView extends SelectView {
    /**
     * Public constructor.
     */
    initialize(parameters) {
        super.initialize(parameters);
        this.listbox.multiple = true;
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-select-multiple');
    }
    updateSelection() {
        const selected = this.model.get('index') || [];
        const listboxOptions = this.listbox.options;
        // Clear the selection
        this.listbox.selectedIndex = -1;
        // Select the appropriate options
        selected.forEach((i) => {
            listboxOptions[i].selected = true;
        });
    }
    /**
     * Handle when a new value is selected.
     */
    _handle_change() {
        const index = Array.prototype.map.call(this.listbox.selectedOptions || [], function (option) {
            return option.index;
        });
        this.model.set('index', index, { updated_view: this });
        this.touch();
    }
}
class SelectionRangeSliderModel extends MultipleSelectionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectionSliderModel', _view_name: 'SelectionSliderView', orientation: 'horizontal', readout: true, continuous_update: true });
    }
}
class SelectionRangeSliderView extends SelectionSliderView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
    }
    updateSelection(index) {
        index = index || this.model.get('index');
        this.updateReadout(index);
    }
    updateReadout(index) {
        const labels = this.model.get('_options_labels');
        const minValue = labels[index[0]];
        const maxValue = labels[index[1]];
        this.readout.textContent = `${minValue}-${maxValue}`;
    }
    /**
     * Called when the slider value is changing.
     */
    handleSliderChange(values, handle) {
        const intValues = values.map(Math.trunc);
        this.updateReadout(intValues);
        // Only persist the value while sliding if the continuous_update
        // trait is set to true.
        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(values, handle);
        }
    }
    /**
     * Called when the slider value has changed.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    handleSliderChanged(values, handle) {
        const intValues = values.map(Math.round);
        this.updateReadout(intValues);
        // set index to a snapshot of the values passed by the slider
        this.model.set('index', intValues.slice(), { updated_view: this });
        this.touch();
    }
    updateSliderValue(model, _, options) {
        if (options.updated_view === this) {
            return;
        }
        // Rounding values to avoid floating point precision error for the if statement below
        const prev_index = this.$slider.noUiSlider.get().map(Math.round);
        const index = this.model.get('index').map(Math.round);
        if (prev_index[0] !== index[0] || prev_index[1] !== index[1]) {
            this.$slider.noUiSlider.set(index);
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_selectioncontainer.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_selectioncontainer.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AccordionModel": () => (/* binding */ AccordionModel),
/* harmony export */   "AccordionView": () => (/* binding */ AccordionView),
/* harmony export */   "JupyterLuminoAccordionWidget": () => (/* binding */ JupyterLuminoAccordionWidget),
/* harmony export */   "JupyterLuminoTabPanelWidget": () => (/* binding */ JupyterLuminoTabPanelWidget),
/* harmony export */   "SelectionContainerModel": () => (/* binding */ SelectionContainerModel),
/* harmony export */   "StackModel": () => (/* binding */ StackModel),
/* harmony export */   "StackView": () => (/* binding */ StackView),
/* harmony export */   "TabModel": () => (/* binding */ TabModel),
/* harmony export */   "TabView": () => (/* binding */ TabView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_box */ "./node_modules/@jupyter-widgets/controls/lib/widget_box.js");
/* harmony import */ var _lumino_tabpanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lumino/tabpanel */ "./node_modules/@jupyter-widgets/controls/lib/lumino/tabpanel.js");
/* harmony import */ var _lumino_accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lumino/accordion */ "./node_modules/@jupyter-widgets/controls/lib/lumino/accordion.js");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/algorithm */ "webpack/sharing/consume/default/@lumino/algorithm");
/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/messaging */ "webpack/sharing/consume/default/@lumino/messaging");
/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_7__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.








class SelectionContainerModel extends _widget_box__WEBPACK_IMPORTED_MODULE_1__.BoxModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'SelectionContainerModel', selected_index: null, titles: [] });
    }
}
class AccordionModel extends SelectionContainerModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'AccordionModel', _view_name: 'AccordionView' });
    }
}
// We implement our own tab widget since Phoshpor's TabPanel uses an absolute
// positioning BoxLayout, but we want a more an html/css-based Panel layout.
class JupyterLuminoAccordionWidget extends _lumino_accordion__WEBPACK_IMPORTED_MODULE_3__.Accordion {
    constructor(options) {
        const view = options.view;
        delete options.view;
        super(options);
        this._view = view;
    }
    /**
     * Process the Lumino message.
     *
     * Any custom Lumino widget used inside a Jupyter widget should override
     * the processMessage function like this.
     */
    processMessage(msg) {
        var _a;
        super.processMessage(msg);
        (_a = this._view) === null || _a === void 0 ? void 0 : _a.processLuminoMessage(msg);
    }
    /**
     * Dispose the widget.
     *
     * This causes the view to be destroyed as well with 'remove'
     */
    dispose() {
        if (this.isDisposed) {
            return;
        }
        super.dispose();
        this._view.remove();
        this._view = null;
    }
}
class AccordionView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    _createElement(tagName) {
        this.luminoWidget = new JupyterLuminoAccordionWidget({ view: this });
        return this.luminoWidget.node;
    }
    _setElement(el) {
        if (this.el || el !== this.luminoWidget.node) {
            // Accordions don't allow setting the element beyond the initial creation.
            throw new Error('Cannot reset the DOM element.');
        }
        this.el = this.luminoWidget.node;
        this.$el = jquery__WEBPACK_IMPORTED_MODULE_7___default()(this.luminoWidget.node);
    }
    initialize(parameters) {
        super.initialize(parameters);
        this.children_views = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.ViewList(this.add_child_view, this.remove_child_view, this);
        this.listenTo(this.model, 'change:children', () => this.updateChildren());
        this.listenTo(this.model, 'change:selected_index', () => this.update_selected_index());
        this.listenTo(this.model, 'change:titles', () => this.update_titles());
    }
    /**
     * Called when view is rendered.
     */
    render() {
        var _a;
        super.render();
        const accordion = this.luminoWidget;
        accordion.addClass('jupyter-widgets');
        accordion.addClass('widget-accordion');
        accordion.addClass('widget-container');
        accordion.selection.selectionChanged.connect((sender) => {
            if (!this.updatingChildren) {
                this.model.set('selected_index', accordion.selection.index);
                this.touch();
            }
        });
        (_a = this.children_views) === null || _a === void 0 ? void 0 : _a.update(this.model.get('children'));
        this.update_titles();
        this.update_selected_index();
    }
    /**
     * Update children
     */
    updateChildren() {
        var _a;
        // While we are updating, the index may not be valid, so deselect the
        // tabs before updating so we don't get spurious changes in the index,
        // which would then set off another sync cycle.
        this.updatingChildren = true;
        this.luminoWidget.selection.index = null;
        (_a = this.children_views) === null || _a === void 0 ? void 0 : _a.update(this.model.get('children'));
        this.update_selected_index();
        this.updatingChildren = false;
    }
    /**
     * Set header titles
     */
    update_titles() {
        const collapsed = this.luminoWidget.collapseWidgets;
        const titles = this.model.get('titles');
        for (let i = 0; i < collapsed.length; i++) {
            if (titles[i] !== void 0) {
                collapsed[i].widget.title.label = titles[i];
            }
        }
    }
    /**
     * Make the rendering and selected index consistent.
     */
    update_selected_index() {
        this.luminoWidget.selection.index = this.model.get('selected_index');
    }
    /**
     * Called when a child is removed from children list.
     */
    remove_child_view(view) {
        this.luminoWidget.removeWidget(view.luminoWidget);
        view.remove();
    }
    /**
     * Called when a child is added to children list.
     */
    add_child_view(model, index) {
        // Placeholder widget to keep our position in the tab panel while we create the view.
        const accordion = this.luminoWidget;
        const placeholder = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget();
        placeholder.title.label = this.model.get('titles')[index] || '';
        accordion.addWidget(placeholder);
        return this.create_child_view(model)
            .then((view) => {
            const widget = view.luminoWidget;
            widget.title.label = placeholder.title.label;
            const collapse = accordion.collapseWidgets[accordion.indexOf(placeholder)];
            collapse.widget = widget;
            placeholder.dispose();
            return view;
        })
            .catch((0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.reject)('Could not add child view to box', true));
    }
    remove() {
        this.children_views = null;
        super.remove();
    }
}
class TabModel extends SelectionContainerModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'TabModel', _view_name: 'TabView' });
    }
}
// We implement our own tab widget since Phoshpor's TabPanel uses an absolute
// positioning BoxLayout, but we want a more an html/css-based Panel layout.
class JupyterLuminoTabPanelWidget extends _lumino_tabpanel__WEBPACK_IMPORTED_MODULE_2__.TabPanel {
    constructor(options) {
        const view = options.view;
        delete options.view;
        super(options);
        this._view = view;
        // We want the view's messages to be the messages the tabContents panel
        // gets.
        _lumino_messaging__WEBPACK_IMPORTED_MODULE_6__.MessageLoop.installMessageHook(this.tabContents, (handler, msg) => {
            // There may be times when we want the view's handler to be called
            // *after* the message has been processed by the widget, in which
            // case we'll need to revisit using a message hook.
            this._view.processLuminoMessage(msg);
            return true;
        });
    }
    /**
     * Dispose the widget.
     *
     * This causes the view to be destroyed as well with 'remove'
     */
    dispose() {
        if (this.isDisposed) {
            return;
        }
        super.dispose();
        this._view.remove();
        this._view = null;
    }
}
class TabView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    constructor() {
        super(...arguments);
        this.updatingTabs = false;
    }
    _createElement(tagName) {
        this.luminoWidget = new JupyterLuminoTabPanelWidget({
            view: this,
        });
        return this.luminoWidget.node;
    }
    _setElement(el) {
        if (this.el || el !== this.luminoWidget.node) {
            // TabViews don't allow setting the element beyond the initial creation.
            throw new Error('Cannot reset the DOM element.');
        }
        this.el = this.luminoWidget.node;
        this.$el = jquery__WEBPACK_IMPORTED_MODULE_7___default()(this.luminoWidget.node);
    }
    /**
     * Public constructor.
     */
    initialize(parameters) {
        super.initialize(parameters);
        this.childrenViews = new _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.ViewList(this.addChildView, (view) => {
            view.remove();
        }, this);
        this.listenTo(this.model, 'change:children', () => this.updateTabs());
        this.listenTo(this.model, 'change:titles', () => this.updateTitles());
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        const tabs = this.luminoWidget;
        tabs.addClass('jupyter-widgets');
        tabs.addClass('widget-container');
        tabs.addClass('widget-tab');
        tabs.tabsMovable = true;
        tabs.tabBar.insertBehavior = 'none'; // needed for insert behavior, see below.
        tabs.tabBar.currentChanged.connect(this._onTabChanged, this);
        tabs.tabBar.tabMoved.connect(this._onTabMoved, this);
        tabs.tabBar.addClass('widget-tab-bar');
        tabs.tabContents.addClass('widget-tab-contents');
        // TODO: expose this option in python
        tabs.tabBar.tabsMovable = false;
        this.updateTabs();
        this.update();
    }
    /**
     * Render tab views based on the current model's children.
     */
    updateTabs() {
        var _a;
        // While we are updating, the index may not be valid, so deselect the
        // tabs before updating so we don't get spurious changes in the index,
        // which would then set off another sync cycle.
        this.updatingTabs = true;
        this.luminoWidget.currentIndex = null;
        (_a = this.childrenViews) === null || _a === void 0 ? void 0 : _a.update(this.model.get('children'));
        this.luminoWidget.currentIndex = this.model.get('selected_index');
        this.updatingTabs = false;
    }
    /**
     * Called when a child is added to children list.
     */
    addChildView(model, index) {
        // Placeholder widget to keep our position in the tab panel while we create the view.
        const label = this.model.get('titles')[index] || '';
        const tabs = this.luminoWidget;
        const placeholder = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget();
        placeholder.title.label = label;
        tabs.addWidget(placeholder);
        return this.create_child_view(model)
            .then((view) => {
            const widget = view.luminoWidget;
            widget.title.label = placeholder.title.label;
            widget.title.closable = false;
            const i = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_5__.ArrayExt.firstIndexOf(tabs.widgets, placeholder);
            // insert after placeholder so that if placeholder is selected, the
            // real widget will be selected now (this depends on the tab bar
            // insert behavior)
            tabs.insertWidget(i + 1, widget);
            placeholder.dispose();
            return view;
        })
            .catch((0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.reject)('Could not add child view to box', true));
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        // Update the selected index in the overall update method because it
        // should be run after the tabs have been updated. Otherwise the
        // selected index may not be a valid tab in the tab bar.
        this.updateSelectedIndex();
        return super.update();
    }
    /**
     * Updates the tab page titles.
     */
    updateTitles() {
        const titles = this.model.get('titles') || [];
        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_5__.each)(this.luminoWidget.widgets, (widget, i) => {
            widget.title.label = titles[i] || '';
        });
    }
    /**
     * Updates the selected index.
     */
    updateSelectedIndex() {
        this.luminoWidget.currentIndex = this.model.get('selected_index');
    }
    remove() {
        this.childrenViews = null;
        super.remove();
    }
    _onTabChanged(sender, args) {
        if (!this.updatingTabs) {
            const i = args.currentIndex;
            this.model.set('selected_index', i === -1 ? null : i);
            this.touch();
        }
    }
    /**
     * Handle the `tabMoved` signal from the tab bar.
     */
    _onTabMoved(sender, args) {
        const children = this.model.get('children').slice();
        _lumino_algorithm__WEBPACK_IMPORTED_MODULE_5__.ArrayExt.move(children, args.fromIndex, args.toIndex);
        this.model.set('children', children);
        this.touch();
    }
}
class StackModel extends SelectionContainerModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'StackModel', _view_name: 'StackView' });
    }
}
class StackView extends _widget_box__WEBPACK_IMPORTED_MODULE_1__.BoxView {
    initialize(parameters) {
        super.initialize(parameters);
        this.listenTo(this.model, 'change:selected_index', this.update_children);
    }
    update_children() {
        var _a;
        let child;
        if (this.model.get('selected_index') === null) {
            child = [];
        }
        else {
            child = [this.model.get('children')[this.model.get('selected_index')]];
        }
        (_a = this.children_views) === null || _a === void 0 ? void 0 : _a.update(child).then((views) => {
            // Notify all children that their sizes may have changed.
            views.forEach((view) => {
                _lumino_messaging__WEBPACK_IMPORTED_MODULE_6__.MessageLoop.postMessage(view.luminoWidget, _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget.ResizeMessage.UnknownSize);
            });
        });
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_string.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_string.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ComboboxModel": () => (/* binding */ ComboboxModel),
/* harmony export */   "ComboboxView": () => (/* binding */ ComboboxView),
/* harmony export */   "HTMLMathModel": () => (/* binding */ HTMLMathModel),
/* harmony export */   "HTMLMathStyleModel": () => (/* binding */ HTMLMathStyleModel),
/* harmony export */   "HTMLMathView": () => (/* binding */ HTMLMathView),
/* harmony export */   "HTMLModel": () => (/* binding */ HTMLModel),
/* harmony export */   "HTMLStyleModel": () => (/* binding */ HTMLStyleModel),
/* harmony export */   "HTMLView": () => (/* binding */ HTMLView),
/* harmony export */   "LabelModel": () => (/* binding */ LabelModel),
/* harmony export */   "LabelStyleModel": () => (/* binding */ LabelStyleModel),
/* harmony export */   "LabelView": () => (/* binding */ LabelView),
/* harmony export */   "PasswordModel": () => (/* binding */ PasswordModel),
/* harmony export */   "PasswordView": () => (/* binding */ PasswordView),
/* harmony export */   "StringModel": () => (/* binding */ StringModel),
/* harmony export */   "StringView": () => (/* binding */ StringView),
/* harmony export */   "TextModel": () => (/* binding */ TextModel),
/* harmony export */   "TextStyleModel": () => (/* binding */ TextStyleModel),
/* harmony export */   "TextView": () => (/* binding */ TextView),
/* harmony export */   "TextareaModel": () => (/* binding */ TextareaModel),
/* harmony export */   "TextareaView": () => (/* binding */ TextareaView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./version */ "./node_modules/@jupyter-widgets/controls/lib/version.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.




/**
 * Class name for a combobox with an invalid value.
 */
const INVALID_VALUE_CLASS = 'jpwidgets-invalidComboValue';
class StringStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'StringStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_3__.JUPYTER_CONTROLS_VERSION });
    }
}
StringStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel.styleProperties), { background: {
        selector: '',
        attribute: 'background',
        default: null,
    }, font_size: {
        selector: '',
        attribute: 'font-size',
        default: '',
    }, text_color: {
        selector: '',
        attribute: 'color',
        default: '',
    } });
class HTMLStyleModel extends StringStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'HTMLStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_3__.JUPYTER_CONTROLS_VERSION });
    }
}
HTMLStyleModel.styleProperties = Object.assign({}, StringStyleModel.styleProperties);
class HTMLMathStyleModel extends StringStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'HTMLMathStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_3__.JUPYTER_CONTROLS_VERSION });
    }
}
HTMLMathStyleModel.styleProperties = Object.assign({}, StringStyleModel.styleProperties);
class LabelStyleModel extends StringStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'LabelStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_3__.JUPYTER_CONTROLS_VERSION });
    }
}
LabelStyleModel.styleProperties = Object.assign(Object.assign({}, StringStyleModel.styleProperties), { font_family: {
        selector: '',
        attribute: 'font-family',
        default: '',
    }, font_style: {
        selector: '',
        attribute: 'font-style',
        default: '',
    }, font_variant: {
        selector: '',
        attribute: 'font-variant',
        default: '',
    }, font_weight: {
        selector: '',
        attribute: 'font-weight',
        default: '',
    }, text_decoration: {
        selector: '',
        attribute: 'text-decoration',
        default: '',
    } });
class TextStyleModel extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'TextStyleModel', _model_module: '@jupyter-widgets/controls', _model_module_version: _version__WEBPACK_IMPORTED_MODULE_3__.JUPYTER_CONTROLS_VERSION });
    }
}
TextStyleModel.styleProperties = Object.assign(Object.assign({}, _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionStyleModel.styleProperties), { background: {
        selector: '.widget-input',
        attribute: 'background',
        default: null,
    }, font_size: {
        selector: '.widget-input',
        attribute: 'font-size',
        default: '',
    }, text_color: {
        selector: '.widget-input',
        attribute: 'color',
        default: '',
    } });
class StringModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: '', disabled: false, placeholder: '\u200b', _model_name: 'StringModel' });
    }
}
class StringView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render(); // Incl. setting some defaults.
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
    }
}
class HTMLModel extends StringModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'HTMLView', _model_name: 'HTMLModel' });
    }
}
class HTMLView extends StringView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-html');
        this.content = document.createElement('div');
        this.content.classList.add('widget-html-content');
        this.el.appendChild(this.content);
        this.update(); // Set defaults.
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        this.content.innerHTML = this.model.get('value');
        return super.update();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.content.focus();
        }
        else if (content.do === 'blur') {
            this.content.blur();
        }
    }
}
class HTMLMathModel extends StringModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'HTMLMathView', _model_name: 'HTMLMathModel' });
    }
}
class HTMLMathView extends StringView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-htmlmath');
        this.content = document.createElement('div');
        this.content.classList.add('widget-htmlmath-content');
        this.el.appendChild(this.content);
        this.update(); // Set defaults.
    }
    /**
     * Update the contents of this view
     */
    update() {
        this.content.innerHTML = this.model.get('value');
        this.typeset(this.content);
        return super.update();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.content.focus();
        }
        else if (content.do === 'blur') {
            this.content.blur();
        }
    }
}
class LabelModel extends StringModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'LabelView', _model_name: 'LabelModel' });
    }
}
class LabelView extends StringView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-label');
        this.update(); // Set defaults.
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        this.typeset(this.el, this.model.get('value'));
        return super.update();
    }
}
class TextareaModel extends StringModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'TextareaView', _model_name: 'TextareaModel', rows: null, continuous_update: true });
    }
}
class TextareaView extends StringView {
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-textarea');
        this.textbox = document.createElement('textarea');
        this.textbox.setAttribute('rows', '5');
        this.textbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this.textbox.classList.add('widget-input');
        this.el.appendChild(this.textbox);
        this.update(); // Set defaults.
        this.listenTo(this.model, 'change:placeholder', (model, value, options) => {
            this.update_placeholder(value);
        });
        this.update_placeholder();
        this.updateTooltip();
    }
    update_placeholder(value) {
        const v = value || this.model.get('placeholder');
        this.textbox.setAttribute('placeholder', v.toString());
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed.  The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update(options) {
        if (options === undefined || options.updated_view !== this) {
            this.textbox.value = this.model.get('value');
            let rows = this.model.get('rows');
            if (rows === null) {
                rows = '';
            }
            this.textbox.setAttribute('rows', rows);
            this.textbox.disabled = this.model.get('disabled');
        }
        this.updateTabindex();
        this.updateTooltip();
        return super.update();
    }
    updateTabindex() {
        if (!this.textbox) {
            return; // we might be constructing the parent
        }
        const tabbable = this.model.get('tabbable');
        if (tabbable === true) {
            this.textbox.setAttribute('tabIndex', '0');
        }
        else if (tabbable === false) {
            this.textbox.setAttribute('tabIndex', '-1');
        }
        else if (tabbable === null) {
            this.textbox.removeAttribute('tabIndex');
        }
    }
    updateTooltip() {
        if (!this.textbox)
            return; // we might be constructing the parent
        const title = this.model.get('tooltip');
        if (!title) {
            this.textbox.removeAttribute('title');
        }
        else if (this.model.get('description').length === 0) {
            this.textbox.setAttribute('title', title);
        }
    }
    events() {
        return {
            'keydown input': 'handleKeyDown',
            'keypress input': 'handleKeypress',
            'input textarea': 'handleChanging',
            'change textarea': 'handleChanged',
        };
    }
    /**
     * Handle key down
     *
     * Stop propagation so the event isn't sent to the application.
     */
    handleKeyDown(e) {
        e.stopPropagation();
    }
    /**
     * Handles key press
     *
     * Stop propagation so the keypress isn't sent to the application.
     */
    handleKeypress(e) {
        e.stopPropagation();
    }
    /**
     * Triggered on input change
     */
    handleChanging(e) {
        if (this.model.get('continuous_update')) {
            this.handleChanged(e);
        }
    }
    /**
     * Sync the value with the kernel.
     *
     * @param e Event
     */
    handleChanged(e) {
        const target = e.target;
        this.model.set('value', target.value, { updated_view: this });
        this.touch();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.textbox.focus();
        }
        else if (content.do === 'blur') {
            this.textbox.blur();
        }
    }
}
class TextModel extends StringModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'TextView', _model_name: 'TextModel', continuous_update: true });
    }
}
class TextView extends StringView {
    constructor() {
        super(...arguments);
        this.inputType = 'text';
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('widget-text');
        this.textbox = document.createElement('input');
        this.textbox.setAttribute('type', this.inputType);
        this.textbox.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        this.textbox.classList.add('widget-input');
        this.el.appendChild(this.textbox);
        this.update(); // Set defaults.
        this.listenTo(this.model, 'change:placeholder', (model, value, options) => {
            this.update_placeholder(value);
        });
        this.update_placeholder();
        this.updateTabindex();
        this.updateTooltip();
    }
    update_placeholder(value) {
        this.textbox.setAttribute('placeholder', value || this.model.get('placeholder'));
    }
    updateTabindex() {
        if (!this.textbox) {
            return; // we might be constructing the parent
        }
        const tabbable = this.model.get('tabbable');
        if (tabbable === true) {
            this.textbox.setAttribute('tabIndex', '0');
        }
        else if (tabbable === false) {
            this.textbox.setAttribute('tabIndex', '-1');
        }
        else if (tabbable === null) {
            this.textbox.removeAttribute('tabIndex');
        }
    }
    updateTooltip() {
        if (!this.textbox)
            return; // we might be constructing the parent
        const title = this.model.get('tooltip');
        if (!title) {
            this.textbox.removeAttribute('title');
        }
        else if (this.model.get('description').length === 0) {
            this.textbox.setAttribute('title', title);
        }
    }
    update(options) {
        /**
         * Update the contents of this view
         *
         * Called when the model is changed.  The model may have been
         * changed by another view or by a state update from the back-end.
         */
        if (options === undefined || options.updated_view !== this) {
            if (this.textbox.value !== this.model.get('value')) {
                this.textbox.value = this.model.get('value');
            }
            this.textbox.disabled = this.model.get('disabled');
        }
        return super.update();
    }
    events() {
        return {
            'keydown input': 'handleKeyDown',
            'keypress input': 'handleKeypress',
            'input input': 'handleChanging',
            'change input': 'handleChanged',
        };
    }
    /**
     * Handle key down
     *
     * Stop propagation so the keypress isn't sent to the application.
     */
    handleKeyDown(e) {
        e.stopPropagation();
    }
    /**
     * Handles text submission
     */
    handleKeypress(e) {
        e.stopPropagation();
        // The submit message is deprecated in widgets 7
        if (e.keyCode === 13) {
            // Return key
            this.send({ event: 'submit' });
        }
    }
    /**
     * Handles user input.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    handleChanging(e) {
        if (this.model.get('continuous_update')) {
            this.handleChanged(e);
        }
    }
    /**
     * Handles user input.
     *
     * Calling model.set will trigger all of the other views of the
     * model to update.
     */
    handleChanged(e) {
        const target = e.target;
        this.model.set('value', target.value, { updated_view: this });
        this.touch();
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.textbox.focus();
        }
        else if (content.do === 'blur') {
            this.textbox.blur();
        }
    }
}
class PasswordModel extends TextModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'PasswordView', _model_name: 'PasswordModel' });
    }
}
class PasswordView extends TextView {
    constructor() {
        super(...arguments);
        this.inputType = 'password';
    }
}
/**
 * Combobox widget model class.
 */
class ComboboxModel extends TextModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'ComboboxModel', _view_name: 'ComboboxView', options: [], ensure_options: false });
    }
}
/**
 * Combobox widget view class.
 */
class ComboboxView extends TextView {
    constructor() {
        super(...arguments);
        this.isInitialRender = true;
    }
    render() {
        this.datalist = document.createElement('datalist');
        this.datalist.id = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.uuid)();
        super.render();
        this.textbox.setAttribute('list', this.datalist.id);
        this.el.appendChild(this.datalist);
        this.updateTooltip();
    }
    update(options) {
        super.update(options);
        if (!this.datalist) {
            return;
        }
        const valid = this.isValid(this.model.get('value'));
        this.highlightValidState(valid);
        // Check if we need to update options
        if ((options !== undefined && options.updated_view) ||
            (!this.model.hasChanged('options') && !this.isInitialRender)) {
            // Value update only, keep current options
            return;
        }
        this.isInitialRender = false;
        const opts = this.model.get('options');
        const optionFragment = document.createDocumentFragment();
        for (const v of opts) {
            const o = document.createElement('option');
            o.value = v;
            optionFragment.appendChild(o);
        }
        this.datalist.appendChild(optionFragment);
    }
    isValid(value) {
        if (true === this.model.get('ensure_option')) {
            const options = this.model.get('options');
            if (options.indexOf(value) === -1) {
                return false;
            }
        }
        return true;
    }
    handleChanging(e) {
        // Override to validate value
        const target = e.target;
        const valid = this.isValid(target.value);
        this.highlightValidState(valid);
        if (valid) {
            super.handleChanging(e);
        }
    }
    handleChanged(e) {
        // Override to validate value
        const target = e.target;
        const valid = this.isValid(target.value);
        this.highlightValidState(valid);
        if (valid) {
            super.handleChanged(e);
        }
    }
    /**
     * Handle message sent to the front end.
     */
    handle_message(content) {
        if (content.do === 'focus') {
            this.textbox.focus();
        }
        else if (content.do === 'blur') {
            this.textbox.blur();
        }
    }
    highlightValidState(valid) {
        this.textbox.classList.toggle(INVALID_VALUE_CLASS, !valid);
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_tagsinput.js":
/*!************************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_tagsinput.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ColorsInputModel": () => (/* binding */ ColorsInputModel),
/* harmony export */   "ColorsInputView": () => (/* binding */ ColorsInputView),
/* harmony export */   "FloatsInputModel": () => (/* binding */ FloatsInputModel),
/* harmony export */   "FloatsInputView": () => (/* binding */ FloatsInputView),
/* harmony export */   "IntsInputModel": () => (/* binding */ IntsInputModel),
/* harmony export */   "IntsInputView": () => (/* binding */ IntsInputView),
/* harmony export */   "TagsInputModel": () => (/* binding */ TagsInputModel),
/* harmony export */   "TagsInputView": () => (/* binding */ TagsInputView)
/* harmony export */ });
/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/color.js");
/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/defaultLocale.js");
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.




/**
 * Returns a new string after removing any leading and trailing whitespaces.
 * The original string is left unchanged.
 */
function trim(value) {
    return value.replace(/^\s+|\s+$/g, '');
}
/**
 * Clamp a number between min and max and return the result.
 */
function clamp(value, min, max) {
    return Math.min(Math.max(value, min), max);
}
/**
 * Remove children from an HTMLElement
 */
function removeChildren(el) {
    while (el.firstChild) {
        el.removeChild(el.firstChild);
    }
}
/**
 * Selection class which keeps track on selected indices.
 */
class Selection {
    constructor(start, dx, max) {
        this.start = start;
        this.dx = dx;
        this.max = max;
    }
    /**
     * Check if a given index is currently selected.
     */
    isSelected(index) {
        let min;
        let max;
        if (this.dx >= 0) {
            min = this.start;
            max = this.start + this.dx;
        }
        else {
            min = this.start + this.dx;
            max = this.start;
        }
        return min <= index && index < max;
    }
    /**
     * Update selection
     */
    updateSelection(dx) {
        this.dx += dx;
        if (this.start + this.dx > this.max) {
            this.dx = this.max - this.start;
        }
        if (this.start + this.dx < 0) {
            this.dx = -this.start;
        }
    }
}
class TagsInputBaseModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: [], placeholder: '\u200b', allowed_tags: null, allow_duplicates: true });
    }
}
class TagsInputBaseView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.DOMWidgetView {
    constructor() {
        super(...arguments);
        this.hoveredTag = null;
        this.hoveredTagIndex = null;
    }
    /**
     * Called when view is rendered.
     */
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('jupyter-widget-tagsinput');
        this.taginputWrapper = document.createElement('div');
        // The taginput is hidden until the user focuses on the widget
        // Unless there is no value
        if (this.model.get('value').length) {
            this.taginputWrapper.style.display = 'none';
        }
        else {
            this.taginputWrapper.style.display = 'inline-block';
        }
        this.datalistID = (0,_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.uuid)();
        this.taginput = document.createElement('input');
        this.taginput.classList.add('jupyter-widget-tag');
        this.taginput.classList.add('jupyter-widget-taginput');
        this.taginput.setAttribute('list', this.datalistID);
        this.taginput.setAttribute('type', 'text');
        this.autocompleteList = document.createElement('datalist');
        this.autocompleteList.id = this.datalistID;
        this.updateAutocomplete();
        this.model.on('change:allowed_tags', this.updateAutocomplete.bind(this));
        this.updatePlaceholder();
        this.model.on('change:placeholder', this.updatePlaceholder.bind(this));
        this.taginputWrapper.classList.add('widget-text');
        this.taginputWrapper.appendChild(this.taginput);
        this.taginputWrapper.appendChild(this.autocompleteList);
        this.el.onclick = this.focus.bind(this);
        this.el.ondrop = (event) => {
            // Put the tag at the end of the list if there is no currently hovered tag
            const index = this.hoveredTagIndex == null ? this.tags.length : this.hoveredTagIndex;
            return this.ondrop(event, index);
        };
        this.el.ondragover = this.ondragover.bind(this);
        this.taginput.onchange = this.handleValueAdded.bind(this);
        this.taginput.oninput = this.resizeInput.bind(this);
        this.taginput.onkeydown = this.handleKeyEvent.bind(this);
        this.taginput.onblur = this.loseFocus.bind(this);
        this.resizeInput();
        this.inputIndex = this.model.get('value').length;
        this.selection = null;
        this.preventLoosingFocus = false;
        this.update();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update() {
        // Prevent hiding the input element and clearing the selection when updating everything
        this.preventLoosingFocus = true;
        removeChildren(this.el);
        this.tags = [];
        const value = this.model.get('value');
        for (const idx in value) {
            const index = parseInt(idx);
            const tag = this.createTag(value[index], index, this.selection != null && this.selection.isSelected(index));
            // Drag and drop
            tag.draggable = true;
            tag.ondragstart = ((index, value) => {
                return (event) => {
                    this.ondragstart(event, index, value, this.model.model_id);
                };
            })(index, value[index]);
            tag.ondrop = ((index) => {
                return (event) => {
                    this.ondrop(event, index);
                };
            })(index);
            tag.ondragover = this.ondragover.bind(this);
            tag.ondragenter = ((index) => {
                return (event) => {
                    this.ondragenter(event, index);
                };
            })(index);
            tag.ondragend = this.ondragend.bind(this);
            this.tags.push(tag);
            this.el.appendChild(tag);
        }
        this.el.insertBefore(this.taginputWrapper, this.el.children[this.inputIndex]);
        // The taginput is hidden until the user focuses on the widget
        // Unless there is no value
        if (this.model.get('value').length) {
            this.taginputWrapper.style.display = 'none';
        }
        else {
            this.taginputWrapper.style.display = 'inline-block';
        }
        this.preventLoosingFocus = false;
        return super.update();
    }
    /**
     * Update the auto-completion list
     */
    updateAutocomplete() {
        removeChildren(this.autocompleteList);
        const allowedTags = this.model.get('allowed_tags');
        for (const tag of allowedTags) {
            const option = document.createElement('option');
            option.value = tag;
            this.autocompleteList.appendChild(option);
        }
    }
    /**
     * Update the auto-completion list
     */
    updatePlaceholder() {
        this.taginput.placeholder = this.model.get('placeholder');
        this.resizeInput();
    }
    /**
     * Update the tags, called when the selection has changed and we need to update the tags CSS
     */
    updateTags() {
        const value = this.model.get('value');
        for (const idx in this.tags) {
            const index = parseInt(idx);
            this.updateTag(this.tags[index], value[index], index, this.selection != null && this.selection.isSelected(index));
        }
    }
    /**
     * Handle a new value is added from the input element
     */
    handleValueAdded(event) {
        const newTagValue = trim(this.taginput.value);
        const tagIndex = this.inputIndex;
        if (newTagValue == '') {
            return;
        }
        this.inputIndex++;
        const tagAdded = this.addTag(tagIndex, newTagValue);
        if (tagAdded) {
            // Clear the input and keep focus on it allowing the user to add more tags
            this.taginput.value = '';
            this.resizeInput();
            this.focus();
        }
    }
    /**
     * Add a new tag with a value of `tagValue` at the `index` position
     * Return true if the tag was correctly added, false otherwise
     */
    addTag(index, tagValue) {
        const value = this.model.get('value');
        let newTagValue;
        try {
            newTagValue = this.validateValue(tagValue);
        }
        catch (error) {
            return false;
        }
        const allowedTagValues = this.model.get('allowed_tags');
        if (allowedTagValues.length && !allowedTagValues.includes(newTagValue)) {
            // Do nothing for now, maybe show a proper error message?
            return false;
        }
        if (!this.model.get('allow_duplicates') && value.includes(newTagValue)) {
            // Do nothing for now, maybe add an animation to highlight the tag?
            return false;
        }
        // Clearing the current selection before setting the new value
        this.selection = null;
        // Making a copy so that backbone sees the change, and insert the new tag
        const newValue = [...value];
        newValue.splice(index, 0, newTagValue);
        this.model.set('value', newValue);
        this.model.save_changes();
        return true;
    }
    /**
     * Resize the input element
     */
    resizeInput() {
        let content;
        if (this.taginput.value.length != 0) {
            content = this.taginput.value;
        }
        else {
            content = this.model.get('placeholder');
        }
        const size = content.length + 1;
        this.taginput.setAttribute('size', String(size));
    }
    /**
     * Handle key events on the input element
     */
    handleKeyEvent(event) {
        const valueLength = this.model.get('value').length;
        // Do nothing if the user is typing something
        if (this.taginput.value.length) {
            return;
        }
        const currentElement = this.inputIndex;
        switch (event.key) {
            case 'ArrowLeft':
                if (event.ctrlKey && event.shiftKey) {
                    this.select(currentElement, -currentElement);
                }
                if (!event.ctrlKey && event.shiftKey) {
                    this.select(currentElement, -1);
                }
                if (event.ctrlKey) {
                    this.inputIndex = 0;
                }
                else {
                    this.inputIndex--;
                }
                break;
            case 'ArrowRight':
                if (event.ctrlKey && event.shiftKey) {
                    this.select(currentElement, valueLength - currentElement);
                }
                if (!event.ctrlKey && event.shiftKey) {
                    this.select(currentElement, 1);
                }
                if (event.ctrlKey) {
                    this.inputIndex = valueLength;
                }
                else {
                    this.inputIndex++;
                }
                break;
            case 'Backspace':
                if (this.selection) {
                    this.removeSelectedTags();
                }
                else {
                    this.removeTag(this.inputIndex - 1);
                }
                break;
            case 'Delete':
                if (this.selection) {
                    this.removeSelectedTags();
                }
                else {
                    this.removeTag(this.inputIndex);
                }
                break;
            default:
                // Do nothing by default
                return;
                break;
        }
        // Reset selection is shift key is not pressed
        if (!event.shiftKey) {
            this.selection = null;
        }
        this.inputIndex = clamp(this.inputIndex, 0, valueLength);
        this.update();
        this.focus();
    }
    /**
     * Function that gets called when a tag with a given `value` is being dragged.
     */
    ondragstart(event, index, tagValue, origin) {
        if (event.dataTransfer == null) {
            return;
        }
        event.dataTransfer.setData('index', String(index));
        event.dataTransfer.setData('tagValue', String(tagValue));
        event.dataTransfer.setData('origin', origin);
    }
    /**
     * Function that gets called when a tag has been dragged on the tag at the `index` position.
     */
    ondrop(event, index) {
        if (event.dataTransfer == null) {
            return;
        }
        event.preventDefault();
        event.stopPropagation();
        const draggedTagValue = event.dataTransfer.getData('tagValue');
        const draggedTagindex = parseInt(event.dataTransfer.getData('index'));
        const sameOrigin = event.dataTransfer.getData('origin') == this.model.model_id;
        // If something else than a tag was dropped, draggedTagindex should be NaN
        if (isNaN(draggedTagindex)) {
            return;
        }
        // If it's the same origin, the drag and drop results in a reordering
        if (sameOrigin) {
            const value = this.model.get('value');
            const newValue = [...value];
            // If the old position is on the left of the new position, we need to re-index the new position
            // after removing the tag at the old position
            if (draggedTagindex < index) {
                index--;
            }
            newValue.splice(draggedTagindex, 1); // Removing at the old position
            newValue.splice(index, 0, draggedTagValue); // Adding at the new one
            this.model.set('value', newValue);
            this.model.save_changes();
            return;
        }
        // Else we add a new tag with the given draggedTagValue
        this.addTag(index, draggedTagValue);
    }
    ondragover(event) {
        // This is needed for the drag and drop to work
        event.preventDefault();
    }
    ondragenter(event, index) {
        if (this.hoveredTag != null && this.hoveredTag != this.tags[index]) {
            this.hoveredTag.style.marginLeft = '1px';
        }
        this.hoveredTag = this.tags[index];
        this.hoveredTagIndex = index;
        this.hoveredTag.style.marginLeft = '30px';
    }
    ondragend() {
        if (this.hoveredTag != null) {
            this.hoveredTag.style.marginLeft = '1px';
        }
        this.hoveredTag = null;
        this.hoveredTagIndex = null;
    }
    /**
     * Select tags from `start` to `start + dx` not included.
     */
    select(start, dx) {
        const valueLength = this.model.get('value').length;
        if (!this.selection) {
            this.selection = new Selection(start, dx, valueLength);
        }
        else {
            this.selection.updateSelection(dx);
        }
    }
    /**
     * Remove all the selected tags.
     */
    removeSelectedTags() {
        const value = [...this.model.get('value')];
        const valueLength = value.length;
        // It is simpler to remove from right to left
        for (let idx = valueLength - 1; idx >= 0; idx--) {
            if (this.selection != null && this.selection.isSelected(idx)) {
                value.splice(idx, 1);
                // Move the input to the left if we remove a tag that is before the input
                if (idx < this.inputIndex) {
                    this.inputIndex--;
                }
            }
        }
        this.model.set('value', value);
        this.model.save_changes();
    }
    /**
     * Remove a tag given its index in the list
     */
    removeTag(tagIndex) {
        const value = [...this.model.get('value')];
        value.splice(tagIndex, 1);
        // Move the input to the left if we remove a tag that is before the input
        if (tagIndex < this.inputIndex) {
            this.inputIndex--;
        }
        this.model.set('value', value);
        this.model.save_changes();
    }
    /**
     * Focus on the input element
     */
    focus() {
        this.taginputWrapper.style.display = 'inline-block';
        this.taginput.focus();
    }
    /**
     * Lose focus on the input element
     */
    loseFocus() {
        if (this.preventLoosingFocus) {
            return;
        }
        // Only hide the input if we have tags displayed
        if (this.model.get('value').length) {
            this.taginputWrapper.style.display = 'none';
        }
        this.selection = null;
        this.updateTags();
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'div';
    }
    /**
     * Validate an input tag typed by the user, returning the correct tag type. This should be overridden in subclasses.
     */
    validateValue(value) {
        return value;
    }
}
class TagsInputModel extends TagsInputBaseModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: [], tag_style: '', _view_name: 'TagsInputView', _model_name: 'TagsInputModel' });
    }
}
class TagsInputView extends TagsInputBaseView {
    /**
     * Create the string tag
     */
    createTag(value, index, selected) {
        const tag = document.createElement('div');
        const style = this.model.get('tag_style');
        tag.classList.add('jupyter-widget-tag');
        tag.classList.add(TagsInputView.class_map[style]);
        if (selected) {
            tag.classList.add('mod-active');
        }
        tag.appendChild(document.createTextNode(this.getTagText(value)));
        const i = document.createElement('i');
        i.classList.add('fa');
        i.classList.add('fa-times');
        i.classList.add('jupyter-widget-tag-close');
        tag.appendChild(i);
        i.onmousedown = ((index) => {
            return () => {
                this.removeTag(index);
                this.loseFocus();
            };
        })(index);
        return tag;
    }
    /**
     * Returns the text that should be displayed in the tag element
     */
    getTagText(value) {
        return value;
    }
    /**
     * Update a given tag
     */
    updateTag(tag, value, index, selected) {
        if (selected) {
            tag.classList.add('mod-active');
        }
        else {
            tag.classList.remove('mod-active');
        }
    }
}
TagsInputView.class_map = {
    primary: 'mod-primary',
    success: 'mod-success',
    info: 'mod-info',
    warning: 'mod-warning',
    danger: 'mod-danger',
};
class ColorsInputModel extends TagsInputBaseModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { value: [], _view_name: 'ColorsInputView', _model_name: 'ColorsInputModel' });
    }
}
class ColorsInputView extends TagsInputBaseView {
    /**
     * Create the Color tag
     */
    createTag(value, index, selected) {
        const tag = document.createElement('div');
        const color = value;
        const darkerColor = d3_color__WEBPACK_IMPORTED_MODULE_2__["default"](value).darker().toString();
        tag.classList.add('jupyter-widget-tag');
        tag.classList.add('jupyter-widget-colortag');
        if (!selected) {
            tag.style.backgroundColor = color;
        }
        else {
            tag.classList.add('mod-active');
            tag.style.backgroundColor = darkerColor;
        }
        const i = document.createElement('i');
        i.classList.add('fa');
        i.classList.add('fa-times');
        i.classList.add('jupyter-widget-tag-close');
        tag.appendChild(i);
        i.onmousedown = ((index) => {
            return () => {
                this.removeTag(index);
                this.loseFocus();
            };
        })(index);
        return tag;
    }
    /**
     * Update a given tag
     */
    updateTag(tag, value, index, selected) {
        const color = value;
        const darkerColor = d3_color__WEBPACK_IMPORTED_MODULE_2__["default"](value).darker().toString();
        if (!selected) {
            tag.classList.remove('mod-active');
            tag.style.backgroundColor = color;
        }
        else {
            tag.classList.add('mod-active');
            tag.style.backgroundColor = darkerColor;
        }
    }
    /**
     * Validate an input tag typed by the user, returning the correct tag type. This should be overridden in subclasses.
     */
    validateValue(value) {
        if (d3_color__WEBPACK_IMPORTED_MODULE_2__["default"](value) == null) {
            throw value + ' is not a valid Color';
        }
        return value;
    }
}
class NumbersInputModel extends TagsInputModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { min: null, max: null });
    }
}
class NumbersInputView extends TagsInputView {
    render() {
        // Initialize text formatter
        this.model.on('change:format', () => {
            this.formatter = d3_format__WEBPACK_IMPORTED_MODULE_3__.format(this.model.get('format'));
            this.update();
        });
        this.formatter = d3_format__WEBPACK_IMPORTED_MODULE_3__.format(this.model.get('format'));
        super.render();
    }
    /**
     * Returns the text that should be displayed in the tag element
     */
    getTagText(value) {
        return this.formatter(this.parseNumber(value));
    }
    /**
     * Validate an input tag typed by the user, returning the correct tag type. This should be overridden in subclasses.
     */
    validateValue(value) {
        const parsed = this.parseNumber(value);
        const min = this.model.get('min');
        const max = this.model.get('max');
        if (isNaN(parsed) ||
            (min != null && parsed < min) ||
            (max != null && parsed > max)) {
            throw (value +
                ' is not a valid number, it should be in the range [' +
                min +
                ', ' +
                max +
                ']');
        }
        return parsed;
    }
}
class FloatsInputModel extends NumbersInputModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'FloatsInputView', _model_name: 'FloatsInputModel', format: '.1f' });
    }
}
class FloatsInputView extends NumbersInputView {
    parseNumber(value) {
        return parseFloat(value);
    }
}
class IntsInputModel extends NumbersInputModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _view_name: 'IntsInputView', _model_name: 'IntsInputModel', format: 'd' });
    }
}
class IntsInputView extends NumbersInputView {
    parseNumber(value) {
        const int = parseInt(value);
        if (int != parseFloat(value)) {
            throw value + ' should be an integer';
        }
        return int;
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_time.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_time.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TimeModel": () => (/* binding */ TimeModel),
/* harmony export */   "TimeView": () => (/* binding */ TimeView),
/* harmony export */   "deserialize_time": () => (/* binding */ deserialize_time),
/* harmony export */   "serialize_time": () => (/* binding */ serialize_time),
/* harmony export */   "time_serializers": () => (/* binding */ time_serializers)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@jupyter-widgets/controls/lib/utils.js");
/* harmony import */ var _widget_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_description */ "./node_modules/@jupyter-widgets/controls/lib/widget_description.js");
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
// Copyright (c) Vidar Tonaas Fauske
// Distributed under the terms of the Modified BSD License.



const PARSER = /(\d\d):(\d\d)(:(\d\d)(.(\d{1,3})\d*)?)?/;
function serialize_time(value) {
    if (value === null) {
        return null;
    }
    else {
        const res = PARSER.exec(value);
        if (res === null) {
            return null;
        }
        return {
            hours: Math.min(23, parseInt(res[1], 10)),
            minutes: Math.min(59, parseInt(res[2], 10)),
            seconds: res[4] ? Math.min(59, parseInt(res[4], 10)) : 0,
            milliseconds: res[6] ? parseInt(res[6], 10) : 0,
        };
    }
}
function deserialize_time(value) {
    if (value === null) {
        return null;
    }
    else {
        const parts = [
            `${value.hours.toString().padStart(2, '0')}:${value.minutes
                .toString()
                .padStart(2, '0')}`,
        ];
        if (value.seconds > 0 || value.milliseconds > 0) {
            parts.push(`:${value.seconds.toString().padStart(2, '0')}`);
            if (value.milliseconds > 0) {
                parts.push(`.${value.milliseconds.toString().padStart(3, '0')}`);
            }
        }
        return parts.join('');
    }
}
const time_serializers = {
    serialize: serialize_time,
    deserialize: deserialize_time,
};
class TimeModel extends _widget_core__WEBPACK_IMPORTED_MODULE_2__.CoreDescriptionModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: TimeModel.model_name, _view_name: TimeModel.view_name, value: null, disabled: false, min: null, max: null, step: 60 });
    }
}
TimeModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_2__.CoreDescriptionModel.serializers), { value: time_serializers, min: time_serializers, max: time_serializers });
TimeModel.model_name = 'TimeModel';
TimeModel.view_name = 'TimeView';
class TimeView extends _widget_description__WEBPACK_IMPORTED_MODULE_1__.DescriptionView {
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-inline-hbox');
        this.el.classList.add('widget-timepicker');
        this._timepicker = document.createElement('input');
        this._timepicker.setAttribute('type', 'time');
        this._timepicker.id = this.label.htmlFor = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.uuid)();
        this.el.appendChild(this._timepicker);
        this.listenTo(this.model, 'change:value', this._update_value);
        this.listenTo(this.model, 'change', this.update2);
        this._update_value();
        this.update2();
    }
    /**
     * Update the contents of this view
     *
     * Called when the model is changed. The model may have been
     * changed by another view or by a state update from the back-end.
     */
    update2(model, options) {
        if (options === undefined || options.updated_view !== this) {
            this._timepicker.disabled = this.model.get('disabled');
            this._timepicker.min = this.model.get('min');
            this._timepicker.max = this.model.get('max');
            this._timepicker.step = this.model.get('step');
        }
        return super.update();
    }
    events() {
        // Typescript doesn't understand that these functions are called, so we
        // specifically use them here so it knows they are being used.
        void this._picker_change;
        void this._picker_focusout;
        return {
            'change [type="time"]': '_picker_change',
            'focusout [type="time"]': '_picker_focusout',
        };
    }
    _update_value(model, newValue, options) {
        if (options === undefined || options.updated_view !== this) {
            this._timepicker.value = this.model.get('value');
        }
    }
    _picker_change() {
        if (!this._timepicker.validity.badInput) {
            this.model.set('value', this._timepicker.value, { updated_view: this });
            this.touch();
        }
    }
    _picker_focusout() {
        if (this._timepicker.validity.badInput) {
            this.model.set('value', null, { updated_view: this });
            this.touch();
        }
    }
}


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_upload.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_upload.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FileUploadModel": () => (/* binding */ FileUploadModel),
/* harmony export */   "FileUploadView": () => (/* binding */ FileUploadView)
/* harmony export */ });
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.


class FileUploadModel extends _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'FileUploadModel', _view_name: 'FileUploadView', accept: '', description: 'Upload', disabled: false, icon: 'upload', button_style: '', multiple: false, value: [], error: '', style: null });
    }
}
FileUploadModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_0__.CoreDOMWidgetModel.serializers), { 
    // use a dummy serializer for value to circumvent the default serializer.
    value: { serialize: (x) => x } });
class FileUploadView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_1__.DOMWidgetView {
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'button';
    }
    render() {
        super.render();
        this.el.classList.add('jupyter-widgets');
        this.el.classList.add('widget-upload');
        this.el.classList.add('jupyter-button');
        this.fileInput = document.createElement('input');
        this.fileInput.type = 'file';
        this.fileInput.style.display = 'none';
        this.el.addEventListener('click', () => {
            this.fileInput.click();
        });
        this.fileInput.addEventListener('click', () => {
            this.fileInput.value = '';
        });
        this.fileInput.addEventListener('change', () => {
            var _a;
            const promisesFile = [];
            Array.from((_a = this.fileInput.files) !== null && _a !== void 0 ? _a : []).forEach((file) => {
                promisesFile.push(new Promise((resolve, reject) => {
                    const fileReader = new FileReader();
                    fileReader.onload = () => {
                        // We know we can read the result as an array buffer since
                        // we use the `.readAsArrayBuffer` method
                        const content = fileReader.result;
                        resolve({
                            content,
                            name: file.name,
                            type: file.type,
                            size: file.size,
                            last_modified: file.lastModified,
                        });
                    };
                    fileReader.onerror = () => {
                        reject();
                    };
                    fileReader.onabort = fileReader.onerror;
                    fileReader.readAsArrayBuffer(file);
                }));
            });
            Promise.all(promisesFile)
                .then((files) => {
                this.model.set({
                    value: files,
                    error: '',
                });
                this.touch();
            })
                .catch((err) => {
                console.error('error in file upload: %o', err);
                this.model.set({
                    error: err,
                });
                this.touch();
            });
        });
        this.listenTo(this.model, 'change:button_style', this.update_button_style);
        this.set_button_style();
        this.update(); // Set defaults.
    }
    update() {
        this.el.disabled = this.model.get('disabled');
        this.el.setAttribute('title', this.model.get('tooltip'));
        const value = this.model.get('value');
        const description = `${this.model.get('description')} (${value.length})`;
        const icon = this.model.get('icon');
        if (description.length || icon.length) {
            this.el.textContent = '';
            if (icon.length) {
                const i = document.createElement('i');
                i.classList.add('fa');
                i.classList.add('fa-' + icon);
                if (description.length === 0) {
                    i.classList.add('center');
                }
                this.el.appendChild(i);
            }
            this.el.appendChild(document.createTextNode(description));
        }
        this.fileInput.accept = this.model.get('accept');
        this.fileInput.multiple = this.model.get('multiple');
        return super.update();
    }
    update_button_style() {
        this.update_mapped_classes(FileUploadView.class_map, 'button_style', this.el);
    }
    set_button_style() {
        this.set_mapped_classes(FileUploadView.class_map, 'button_style', this.el);
    }
}
FileUploadView.class_map = {
    primary: ['mod-primary'],
    success: ['mod-success'],
    info: ['mod-info'],
    warning: ['mod-warning'],
    danger: ['mod-danger'],
};


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/lib/widget_video.js":
/*!********************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/lib/widget_video.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "VideoModel": () => (/* binding */ VideoModel),
/* harmony export */   "VideoView": () => (/* binding */ VideoView)
/* harmony export */ });
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?79cf");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _widget_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget_core */ "./node_modules/@jupyter-widgets/controls/lib/widget_core.js");
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.


class VideoModel extends _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel {
    defaults() {
        return Object.assign(Object.assign({}, super.defaults()), { _model_name: 'VideoModel', _view_name: 'VideoView', format: 'mp4', width: '', height: '', autoplay: true, loop: true, controls: true, value: new DataView(new ArrayBuffer(0)) });
    }
}
VideoModel.serializers = Object.assign(Object.assign({}, _widget_core__WEBPACK_IMPORTED_MODULE_1__.CoreDOMWidgetModel.serializers), { value: {
        serialize: (value) => {
            return new DataView(value.buffer.slice(0));
        },
    } });
class VideoView extends _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_0__.DOMWidgetView {
    render() {
        /**
         * Called when view is rendered.
         */
        super.render();
        this.luminoWidget.addClass('jupyter-widgets');
        this.luminoWidget.addClass('widget-image');
        this.update(); // Set defaults.
    }
    update() {
        /**
         * Update the contents of this view
         *
         * Called when the model is changed.  The model may have been
         * changed by another view or by a state update from the back-end.
         */
        let url;
        const format = this.model.get('format');
        const value = this.model.get('value');
        if (format !== 'url') {
            const blob = new Blob([value], {
                type: `video/${this.model.get('format')}`,
            });
            url = URL.createObjectURL(blob);
        }
        else {
            url = new TextDecoder('utf-8').decode(value.buffer);
        }
        // Clean up the old objectURL
        const oldurl = this.el.src;
        this.el.src = url;
        if (oldurl) {
            URL.revokeObjectURL(oldurl);
        }
        // Height and width
        const width = this.model.get('width');
        if (width !== undefined && width.length > 0) {
            this.el.setAttribute('width', width);
        }
        else {
            this.el.removeAttribute('width');
        }
        const height = this.model.get('height');
        if (height !== undefined && height.length > 0) {
            this.el.setAttribute('height', height);
        }
        else {
            this.el.removeAttribute('height');
        }
        // Video attributes
        this.el.loop = this.model.get('loop');
        this.el.autoplay = this.model.get('autoplay');
        this.el.controls = this.model.get('controls');
        return super.update();
    }
    remove() {
        if (this.el.src) {
            URL.revokeObjectURL(this.el.src);
        }
        super.remove();
    }
    preinitialize() {
        // Must set this before the initialize method creates the element
        this.tagName = 'video';
    }
}


/***/ }),

/***/ "./node_modules/d3-color/src/color.js":
/*!********************************************!*\
  !*** ./node_modules/d3-color/src/color.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Color": () => (/* binding */ Color),
/* harmony export */   "Rgb": () => (/* binding */ Rgb),
/* harmony export */   "brighter": () => (/* binding */ brighter),
/* harmony export */   "darker": () => (/* binding */ darker),
/* harmony export */   "default": () => (/* binding */ color),
/* harmony export */   "hsl": () => (/* binding */ hsl),
/* harmony export */   "hslConvert": () => (/* binding */ hslConvert),
/* harmony export */   "rgb": () => (/* binding */ rgb),
/* harmony export */   "rgbConvert": () => (/* binding */ rgbConvert)
/* harmony export */ });
/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js");


function Color() {}

var darker = 0.7;
var brighter = 1 / darker;

var reI = "\\s*([+-]?\\d+)\\s*",
    reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
    reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
    reHex = /^#([0-9a-f]{3,8})$/,
    reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
    reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
    reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
    reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
    reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
    reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);

var named = {
  aliceblue: 0xf0f8ff,
  antiquewhite: 0xfaebd7,
  aqua: 0x00ffff,
  aquamarine: 0x7fffd4,
  azure: 0xf0ffff,
  beige: 0xf5f5dc,
  bisque: 0xffe4c4,
  black: 0x000000,
  blanchedalmond: 0xffebcd,
  blue: 0x0000ff,
  blueviolet: 0x8a2be2,
  brown: 0xa52a2a,
  burlywood: 0xdeb887,
  cadetblue: 0x5f9ea0,
  chartreuse: 0x7fff00,
  chocolate: 0xd2691e,
  coral: 0xff7f50,
  cornflowerblue: 0x6495ed,
  cornsilk: 0xfff8dc,
  crimson: 0xdc143c,
  cyan: 0x00ffff,
  darkblue: 0x00008b,
  darkcyan: 0x008b8b,
  darkgoldenrod: 0xb8860b,
  darkgray: 0xa9a9a9,
  darkgreen: 0x006400,
  darkgrey: 0xa9a9a9,
  darkkhaki: 0xbdb76b,
  darkmagenta: 0x8b008b,
  darkolivegreen: 0x556b2f,
  darkorange: 0xff8c00,
  darkorchid: 0x9932cc,
  darkred: 0x8b0000,
  darksalmon: 0xe9967a,
  darkseagreen: 0x8fbc8f,
  darkslateblue: 0x483d8b,
  darkslategray: 0x2f4f4f,
  darkslategrey: 0x2f4f4f,
  darkturquoise: 0x00ced1,
  darkviolet: 0x9400d3,
  deeppink: 0xff1493,
  deepskyblue: 0x00bfff,
  dimgray: 0x696969,
  dimgrey: 0x696969,
  dodgerblue: 0x1e90ff,
  firebrick: 0xb22222,
  floralwhite: 0xfffaf0,
  forestgreen: 0x228b22,
  fuchsia: 0xff00ff,
  gainsboro: 0xdcdcdc,
  ghostwhite: 0xf8f8ff,
  gold: 0xffd700,
  goldenrod: 0xdaa520,
  gray: 0x808080,
  green: 0x008000,
  greenyellow: 0xadff2f,
  grey: 0x808080,
  honeydew: 0xf0fff0,
  hotpink: 0xff69b4,
  indianred: 0xcd5c5c,
  indigo: 0x4b0082,
  ivory: 0xfffff0,
  khaki: 0xf0e68c,
  lavender: 0xe6e6fa,
  lavenderblush: 0xfff0f5,
  lawngreen: 0x7cfc00,
  lemonchiffon: 0xfffacd,
  lightblue: 0xadd8e6,
  lightcoral: 0xf08080,
  lightcyan: 0xe0ffff,
  lightgoldenrodyellow: 0xfafad2,
  lightgray: 0xd3d3d3,
  lightgreen: 0x90ee90,
  lightgrey: 0xd3d3d3,
  lightpink: 0xffb6c1,
  lightsalmon: 0xffa07a,
  lightseagreen: 0x20b2aa,
  lightskyblue: 0x87cefa,
  lightslategray: 0x778899,
  lightslategrey: 0x778899,
  lightsteelblue: 0xb0c4de,
  lightyellow: 0xffffe0,
  lime: 0x00ff00,
  limegreen: 0x32cd32,
  linen: 0xfaf0e6,
  magenta: 0xff00ff,
  maroon: 0x800000,
  mediumaquamarine: 0x66cdaa,
  mediumblue: 0x0000cd,
  mediumorchid: 0xba55d3,
  mediumpurple: 0x9370db,
  mediumseagreen: 0x3cb371,
  mediumslateblue: 0x7b68ee,
  mediumspringgreen: 0x00fa9a,
  mediumturquoise: 0x48d1cc,
  mediumvioletred: 0xc71585,
  midnightblue: 0x191970,
  mintcream: 0xf5fffa,
  mistyrose: 0xffe4e1,
  moccasin: 0xffe4b5,
  navajowhite: 0xffdead,
  navy: 0x000080,
  oldlace: 0xfdf5e6,
  olive: 0x808000,
  olivedrab: 0x6b8e23,
  orange: 0xffa500,
  orangered: 0xff4500,
  orchid: 0xda70d6,
  palegoldenrod: 0xeee8aa,
  palegreen: 0x98fb98,
  paleturquoise: 0xafeeee,
  palevioletred: 0xdb7093,
  papayawhip: 0xffefd5,
  peachpuff: 0xffdab9,
  peru: 0xcd853f,
  pink: 0xffc0cb,
  plum: 0xdda0dd,
  powderblue: 0xb0e0e6,
  purple: 0x800080,
  rebeccapurple: 0x663399,
  red: 0xff0000,
  rosybrown: 0xbc8f8f,
  royalblue: 0x4169e1,
  saddlebrown: 0x8b4513,
  salmon: 0xfa8072,
  sandybrown: 0xf4a460,
  seagreen: 0x2e8b57,
  seashell: 0xfff5ee,
  sienna: 0xa0522d,
  silver: 0xc0c0c0,
  skyblue: 0x87ceeb,
  slateblue: 0x6a5acd,
  slategray: 0x708090,
  slategrey: 0x708090,
  snow: 0xfffafa,
  springgreen: 0x00ff7f,
  steelblue: 0x4682b4,
  tan: 0xd2b48c,
  teal: 0x008080,
  thistle: 0xd8bfd8,
  tomato: 0xff6347,
  turquoise: 0x40e0d0,
  violet: 0xee82ee,
  wheat: 0xf5deb3,
  white: 0xffffff,
  whitesmoke: 0xf5f5f5,
  yellow: 0xffff00,
  yellowgreen: 0x9acd32
};

(0,_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, {
  copy(channels) {
    return Object.assign(new this.constructor, this, channels);
  },
  displayable() {
    return this.rgb().displayable();
  },
  hex: color_formatHex, // Deprecated! Use color.formatHex.
  formatHex: color_formatHex,
  formatHex8: color_formatHex8,
  formatHsl: color_formatHsl,
  formatRgb: color_formatRgb,
  toString: color_formatRgb
});

function color_formatHex() {
  return this.rgb().formatHex();
}

function color_formatHex8() {
  return this.rgb().formatHex8();
}

function color_formatHsl() {
  return hslConvert(this).formatHsl();
}

function color_formatRgb() {
  return this.rgb().formatRgb();
}

function color(format) {
  var m, l;
  format = (format + "").trim().toLowerCase();
  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
      : null) // invalid hex
      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
      : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
      : null;
}

function rgbn(n) {
  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
}

function rgba(r, g, b, a) {
  if (a <= 0) r = g = b = NaN;
  return new Rgb(r, g, b, a);
}

function rgbConvert(o) {
  if (!(o instanceof Color)) o = color(o);
  if (!o) return new Rgb;
  o = o.rgb();
  return new Rgb(o.r, o.g, o.b, o.opacity);
}

function rgb(r, g, b, opacity) {
  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
}

function Rgb(r, g, b, opacity) {
  this.r = +r;
  this.g = +g;
  this.b = +b;
  this.opacity = +opacity;
}

(0,_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, (0,_define_js__WEBPACK_IMPORTED_MODULE_0__.extend)(Color, {
  brighter(k) {
    k = k == null ? brighter : Math.pow(brighter, k);
    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  },
  darker(k) {
    k = k == null ? darker : Math.pow(darker, k);
    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  },
  rgb() {
    return this;
  },
  clamp() {
    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
  },
  displayable() {
    return (-0.5 <= this.r && this.r < 255.5)
        && (-0.5 <= this.g && this.g < 255.5)
        && (-0.5 <= this.b && this.b < 255.5)
        && (0 <= this.opacity && this.opacity <= 1);
  },
  hex: rgb_formatHex, // Deprecated! Use color.formatHex.
  formatHex: rgb_formatHex,
  formatHex8: rgb_formatHex8,
  formatRgb: rgb_formatRgb,
  toString: rgb_formatRgb
}));

function rgb_formatHex() {
  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
}

function rgb_formatHex8() {
  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}

function rgb_formatRgb() {
  const a = clampa(this.opacity);
  return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
}

function clampa(opacity) {
  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
}

function clampi(value) {
  return Math.max(0, Math.min(255, Math.round(value) || 0));
}

function hex(value) {
  value = clampi(value);
  return (value < 16 ? "0" : "") + value.toString(16);
}

function hsla(h, s, l, a) {
  if (a <= 0) h = s = l = NaN;
  else if (l <= 0 || l >= 1) h = s = NaN;
  else if (s <= 0) h = NaN;
  return new Hsl(h, s, l, a);
}

function hslConvert(o) {
  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
  if (!(o instanceof Color)) o = color(o);
  if (!o) return new Hsl;
  if (o instanceof Hsl) return o;
  o = o.rgb();
  var r = o.r / 255,
      g = o.g / 255,
      b = o.b / 255,
      min = Math.min(r, g, b),
      max = Math.max(r, g, b),
      h = NaN,
      s = max - min,
      l = (max + min) / 2;
  if (s) {
    if (r === max) h = (g - b) / s + (g < b) * 6;
    else if (g === max) h = (b - r) / s + 2;
    else h = (r - g) / s + 4;
    s /= l < 0.5 ? max + min : 2 - max - min;
    h *= 60;
  } else {
    s = l > 0 && l < 1 ? 0 : h;
  }
  return new Hsl(h, s, l, o.opacity);
}

function hsl(h, s, l, opacity) {
  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
}

function Hsl(h, s, l, opacity) {
  this.h = +h;
  this.s = +s;
  this.l = +l;
  this.opacity = +opacity;
}

(0,_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, (0,_define_js__WEBPACK_IMPORTED_MODULE_0__.extend)(Color, {
  brighter(k) {
    k = k == null ? brighter : Math.pow(brighter, k);
    return new Hsl(this.h, this.s, this.l * k, this.opacity);
  },
  darker(k) {
    k = k == null ? darker : Math.pow(darker, k);
    return new Hsl(this.h, this.s, this.l * k, this.opacity);
  },
  rgb() {
    var h = this.h % 360 + (this.h < 0) * 360,
        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
        l = this.l,
        m2 = l + (l < 0.5 ? l : 1 - l) * s,
        m1 = 2 * l - m2;
    return new Rgb(
      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
      hsl2rgb(h, m1, m2),
      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
      this.opacity
    );
  },
  clamp() {
    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
  },
  displayable() {
    return (0 <= this.s && this.s <= 1 || isNaN(this.s))
        && (0 <= this.l && this.l <= 1)
        && (0 <= this.opacity && this.opacity <= 1);
  },
  formatHsl() {
    const a = clampa(this.opacity);
    return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
  }
}));

function clamph(value) {
  value = (value || 0) % 360;
  return value < 0 ? value + 360 : value;
}

function clampt(value) {
  return Math.max(0, Math.min(1, value || 0));
}

/* From FvD 13.37, CSS Color Module Level 3 */
function hsl2rgb(h, m1, m2) {
  return (h < 60 ? m1 + (m2 - m1) * h / 60
      : h < 180 ? m2
      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
      : m1) * 255;
}


/***/ }),

/***/ "./node_modules/d3-color/src/define.js":
/*!*********************************************!*\
  !*** ./node_modules/d3-color/src/define.js ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   "extend": () => (/* binding */ extend)
/* harmony export */ });
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(constructor, factory, prototype) {
  constructor.prototype = factory.prototype = prototype;
  prototype.constructor = constructor;
}

function extend(parent, definition) {
  var prototype = Object.create(parent.prototype);
  for (var key in definition) prototype[key] = definition[key];
  return prototype;
}


/***/ }),

/***/ "./node_modules/d3-format/src/defaultLocale.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/defaultLocale.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ defaultLocale),
/* harmony export */   "format": () => (/* binding */ format),
/* harmony export */   "formatPrefix": () => (/* binding */ formatPrefix)
/* harmony export */ });
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js");


var locale;
var format;
var formatPrefix;

defaultLocale({
  thousands: ",",
  grouping: [3],
  currency: ["$", ""]
});

function defaultLocale(definition) {
  locale = (0,_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition);
  format = locale.format;
  formatPrefix = locale.formatPrefix;
  return locale;
}


/***/ }),

/***/ "./node_modules/d3-format/src/exponent.js":
/*!************************************************!*\
  !*** ./node_modules/d3-format/src/exponent.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");


/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(x) {
  return x = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.formatDecimalParts)(Math.abs(x)), x ? x[1] : NaN;
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatDecimal.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/formatDecimal.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   "formatDecimalParts": () => (/* binding */ formatDecimalParts)
/* harmony export */ });
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(x) {
  return Math.abs(x = Math.round(x)) >= 1e21
      ? x.toLocaleString("en").replace(/,/g, "")
      : x.toString(10);
}

// Computes the decimal coefficient and exponent of the specified number x with
// significant digits p, where x is positive and p is in [1, 21] or undefined.
// For example, formatDecimalParts(1.23) returns ["123", 0].
function formatDecimalParts(x, p) {
  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
  var i, coefficient = x.slice(0, i);

  // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
  // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
  return [
    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
    +x.slice(i + 1)
  ];
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatGroup.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-format/src/formatGroup.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(grouping, thousands) {
  return function(value, width) {
    var i = value.length,
        t = [],
        j = 0,
        g = grouping[0],
        length = 0;

    while (i > 0 && g > 0) {
      if (length + g + 1 > width) g = Math.max(1, width - length);
      t.push(value.substring(i -= g, i + g));
      if ((length += g + 1) > width) break;
      g = grouping[j = (j + 1) % grouping.length];
    }

    return t.reverse().join(thousands);
  };
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatNumerals.js":
/*!******************************************************!*\
  !*** ./node_modules/d3-format/src/formatNumerals.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(numerals) {
  return function(value) {
    return value.replace(/[0-9]/g, function(i) {
      return numerals[+i];
    });
  };
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatPrefixAuto.js":
/*!********************************************************!*\
  !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   "prefixExponent": () => (/* binding */ prefixExponent)
/* harmony export */ });
/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");


var prefixExponent;

/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(x, p) {
  var d = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.formatDecimalParts)(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1],
      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
      n = coefficient.length;
  return i === n ? coefficient
      : i > n ? coefficient + new Array(i - n + 1).join("0")
      : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
      : "0." + new Array(1 - i).join("0") + (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.formatDecimalParts)(x, Math.max(0, p + i - 1))[0]; // less than 1y!
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatRounded.js":
/*!*****************************************************!*\
  !*** ./node_modules/d3-format/src/formatRounded.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");


/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(x, p) {
  var d = (0,_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__.formatDecimalParts)(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1];
  return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
      : coefficient + new Array(exponent - coefficient.length + 2).join("0");
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatSpecifier.js":
/*!*******************************************************!*\
  !*** ./node_modules/d3-format/src/formatSpecifier.js ***!
  \*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FormatSpecifier": () => (/* binding */ FormatSpecifier),
/* harmony export */   "default": () => (/* binding */ formatSpecifier)
/* harmony export */ });
// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;

function formatSpecifier(specifier) {
  if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
  var match;
  return new FormatSpecifier({
    fill: match[1],
    align: match[2],
    sign: match[3],
    symbol: match[4],
    zero: match[5],
    width: match[6],
    comma: match[7],
    precision: match[8] && match[8].slice(1),
    trim: match[9],
    type: match[10]
  });
}

formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof

function FormatSpecifier(specifier) {
  this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
  this.align = specifier.align === undefined ? ">" : specifier.align + "";
  this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
  this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
  this.zero = !!specifier.zero;
  this.width = specifier.width === undefined ? undefined : +specifier.width;
  this.comma = !!specifier.comma;
  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
  this.trim = !!specifier.trim;
  this.type = specifier.type === undefined ? "" : specifier.type + "";
}

FormatSpecifier.prototype.toString = function() {
  return this.fill
      + this.align
      + this.sign
      + this.symbol
      + (this.zero ? "0" : "")
      + (this.width === undefined ? "" : Math.max(1, this.width | 0))
      + (this.comma ? "," : "")
      + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
      + (this.trim ? "~" : "")
      + this.type;
};


/***/ }),

/***/ "./node_modules/d3-format/src/formatTrim.js":
/*!**************************************************!*\
  !*** ./node_modules/d3-format/src/formatTrim.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(s) {
  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
    switch (s[i]) {
      case ".": i0 = i1 = i; break;
      case "0": if (i0 === 0) i0 = i; i1 = i; break;
      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
    }
  }
  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
}


/***/ }),

/***/ "./node_modules/d3-format/src/formatTypes.js":
/*!***************************************************!*\
  !*** ./node_modules/d3-format/src/formatTypes.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");
/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js");
/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatRounded.js */ "./node_modules/d3-format/src/formatRounded.js");




/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  "%": (x, p) => (x * 100).toFixed(p),
  "b": (x) => Math.round(x).toString(2),
  "c": (x) => x + "",
  "d": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"],
  "e": (x, p) => x.toExponential(p),
  "f": (x, p) => x.toFixed(p),
  "g": (x, p) => x.toPrecision(p),
  "o": (x) => Math.round(x).toString(8),
  "p": (x, p) => (0,_formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x * 100, p),
  "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"],
  "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_2__["default"],
  "X": (x) => Math.round(x).toString(16).toUpperCase(),
  "x": (x) => Math.round(x).toString(16)
});


/***/ }),

/***/ "./node_modules/d3-format/src/identity.js":
/*!************************************************!*\
  !*** ./node_modules/d3-format/src/identity.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(x) {
  return x;
}


/***/ }),

/***/ "./node_modules/d3-format/src/locale.js":
/*!**********************************************!*\
  !*** ./node_modules/d3-format/src/locale.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js");
/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "./node_modules/d3-format/src/formatGroup.js");
/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "./node_modules/d3-format/src/formatNumerals.js");
/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js");
/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTrim.js */ "./node_modules/d3-format/src/formatTrim.js");
/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTypes.js */ "./node_modules/d3-format/src/formatTypes.js");
/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js");
/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-format/src/identity.js");









var map = Array.prototype.map,
    prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];

/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(locale) {
  var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"] : (0,_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""),
      currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
      currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
      decimal = locale.decimal === undefined ? "." : locale.decimal + "",
      numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"] : (0,_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)),
      percent = locale.percent === undefined ? "%" : locale.percent + "",
      minus = locale.minus === undefined ? "−" : locale.minus + "",
      nan = locale.nan === undefined ? "NaN" : locale.nan + "";

  function newFormat(specifier) {
    specifier = (0,_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier);

    var fill = specifier.fill,
        align = specifier.align,
        sign = specifier.sign,
        symbol = specifier.symbol,
        zero = specifier.zero,
        width = specifier.width,
        comma = specifier.comma,
        precision = specifier.precision,
        trim = specifier.trim,
        type = specifier.type;

    // The "n" type is an alias for ",g".
    if (type === "n") comma = true, type = "g";

    // The "" type, and any invalid type, is an alias for ".12~g".
    else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_4__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g";

    // If zero fill is specified, padding goes after sign and before digits.
    if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";

    // Compute the prefix and suffix.
    // For SI-prefix, the suffix is lazily computed.
    var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
        suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";

    // What format function should we use?
    // Is this an integer type?
    // Can this type generate exponential notation?
    var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_4__["default"][type],
        maybeSuffix = /[defgprs%]/.test(type);

    // Set the default precision if not specified,
    // or clamp the specified precision to the supported range.
    // For significant precision, it must be in [1, 21].
    // For fixed precision, it must be in [0, 20].
    precision = precision === undefined ? 6
        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
        : Math.max(0, Math.min(20, precision));

    function format(value) {
      var valuePrefix = prefix,
          valueSuffix = suffix,
          i, n, c;

      if (type === "c") {
        valueSuffix = formatType(value) + valueSuffix;
        value = "";
      } else {
        value = +value;

        // Determine the sign. -0 is not less than 0, but 1 / -0 is!
        var valueNegative = value < 0 || 1 / value < 0;

        // Perform the initial formatting.
        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);

        // Trim insignificant zeros.
        if (trim) value = (0,_formatTrim_js__WEBPACK_IMPORTED_MODULE_5__["default"])(value);

        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
        if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;

        // Compute the prefix and suffix.
        valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
        valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__.prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");

        // Break the formatted value into the integer “value” part that can be
        // grouped, and fractional or exponential “suffix” part that is not.
        if (maybeSuffix) {
          i = -1, n = value.length;
          while (++i < n) {
            if (c = value.charCodeAt(i), 48 > c || c > 57) {
              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
              value = value.slice(0, i);
              break;
            }
          }
        }
      }

      // If the fill character is not "0", grouping is applied before padding.
      if (comma && !zero) value = group(value, Infinity);

      // Compute the padding.
      var length = valuePrefix.length + value.length + valueSuffix.length,
          padding = length < width ? new Array(width - length + 1).join(fill) : "";

      // If the fill character is "0", grouping is applied after padding.
      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";

      // Reconstruct the final output based on the desired alignment.
      switch (align) {
        case "<": value = valuePrefix + value + valueSuffix + padding; break;
        case "=": value = valuePrefix + padding + value + valueSuffix; break;
        case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
        default: value = padding + valuePrefix + value + valueSuffix; break;
      }

      return numerals(value);
    }

    format.toString = function() {
      return specifier + "";
    };

    return format;
  }

  function formatPrefix(specifier, value) {
    var f = newFormat((specifier = (0,_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)),
        e = Math.max(-8, Math.min(8, Math.floor((0,_exponent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(value) / 3))) * 3,
        k = Math.pow(10, -e),
        prefix = prefixes[8 + e / 3];
    return function(value) {
      return f(k * value) + prefix;
    };
  }

  return {
    format: newFormat,
    formatPrefix: formatPrefix
  };
}


/***/ }),

/***/ "./node_modules/nouislider/dist/nouislider.js":
/*!****************************************************!*\
  !*** ./node_modules/nouislider/dist/nouislider.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports) {

(function (global, factory) {
     true ? factory(exports) :
    0;
}(this, (function (exports) { 'use strict';

    exports.PipsMode = void 0;
    (function (PipsMode) {
        PipsMode["Range"] = "range";
        PipsMode["Steps"] = "steps";
        PipsMode["Positions"] = "positions";
        PipsMode["Count"] = "count";
        PipsMode["Values"] = "values";
    })(exports.PipsMode || (exports.PipsMode = {}));
    exports.PipsType = void 0;
    (function (PipsType) {
        PipsType[PipsType["None"] = -1] = "None";
        PipsType[PipsType["NoValue"] = 0] = "NoValue";
        PipsType[PipsType["LargeValue"] = 1] = "LargeValue";
        PipsType[PipsType["SmallValue"] = 2] = "SmallValue";
    })(exports.PipsType || (exports.PipsType = {}));
    //region Helper Methods
    function isValidFormatter(entry) {
        return isValidPartialFormatter(entry) && typeof entry.from === "function";
    }
    function isValidPartialFormatter(entry) {
        // partial formatters only need a to function and not a from function
        return typeof entry === "object" && typeof entry.to === "function";
    }
    function removeElement(el) {
        el.parentElement.removeChild(el);
    }
    function isSet(value) {
        return value !== null && value !== undefined;
    }
    // Bindable version
    function preventDefault(e) {
        e.preventDefault();
    }
    // Removes duplicates from an array.
    function unique(array) {
        return array.filter(function (a) {
            return !this[a] ? (this[a] = true) : false;
        }, {});
    }
    // Round a value to the closest 'to'.
    function closest(value, to) {
        return Math.round(value / to) * to;
    }
    // Current position of an element relative to the document.
    function offset(elem, orientation) {
        var rect = elem.getBoundingClientRect();
        var doc = elem.ownerDocument;
        var docElem = doc.documentElement;
        var pageOffset = getPageOffset(doc);
        // getBoundingClientRect contains left scroll in Chrome on Android.
        // I haven't found a feature detection that proves this. Worst case
        // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
        if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {
            pageOffset.x = 0;
        }
        return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;
    }
    // Checks whether a value is numerical.
    function isNumeric(a) {
        return typeof a === "number" && !isNaN(a) && isFinite(a);
    }
    // Sets a class and removes it after [duration] ms.
    function addClassFor(element, className, duration) {
        if (duration > 0) {
            addClass(element, className);
            setTimeout(function () {
                removeClass(element, className);
            }, duration);
        }
    }
    // Limits a value to 0 - 100
    function limit(a) {
        return Math.max(Math.min(a, 100), 0);
    }
    // Wraps a variable as an array, if it isn't one yet.
    // Note that an input array is returned by reference!
    function asArray(a) {
        return Array.isArray(a) ? a : [a];
    }
    // Counts decimals
    function countDecimals(numStr) {
        numStr = String(numStr);
        var pieces = numStr.split(".");
        return pieces.length > 1 ? pieces[1].length : 0;
    }
    // http://youmightnotneedjquery.com/#add_class
    function addClass(el, className) {
        if (el.classList && !/\s/.test(className)) {
            el.classList.add(className);
        }
        else {
            el.className += " " + className;
        }
    }
    // http://youmightnotneedjquery.com/#remove_class
    function removeClass(el, className) {
        if (el.classList && !/\s/.test(className)) {
            el.classList.remove(className);
        }
        else {
            el.className = el.className.replace(new RegExp("(^|\\b)" + className.split(" ").join("|") + "(\\b|$)", "gi"), " ");
        }
    }
    // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/
    function hasClass(el, className) {
        return el.classList ? el.classList.contains(className) : new RegExp("\\b" + className + "\\b").test(el.className);
    }
    // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes
    function getPageOffset(doc) {
        var supportPageOffset = window.pageXOffset !== undefined;
        var isCSS1Compat = (doc.compatMode || "") === "CSS1Compat";
        var x = supportPageOffset
            ? window.pageXOffset
            : isCSS1Compat
                ? doc.documentElement.scrollLeft
                : doc.body.scrollLeft;
        var y = supportPageOffset
            ? window.pageYOffset
            : isCSS1Compat
                ? doc.documentElement.scrollTop
                : doc.body.scrollTop;
        return {
            x: x,
            y: y
        };
    }
    // we provide a function to compute constants instead
    // of accessing window.* as soon as the module needs it
    // so that we do not compute anything if not needed
    function getActions() {
        // Determine the events to bind. IE11 implements pointerEvents without
        // a prefix, which breaks compatibility with the IE10 implementation.
        return window.navigator.pointerEnabled
            ? {
                start: "pointerdown",
                move: "pointermove",
                end: "pointerup"
            }
            : window.navigator.msPointerEnabled
                ? {
                    start: "MSPointerDown",
                    move: "MSPointerMove",
                    end: "MSPointerUp"
                }
                : {
                    start: "mousedown touchstart",
                    move: "mousemove touchmove",
                    end: "mouseup touchend"
                };
    }
    // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
    // Issue #785
    function getSupportsPassive() {
        var supportsPassive = false;
        /* eslint-disable */
        try {
            var opts = Object.defineProperty({}, "passive", {
                get: function () {
                    supportsPassive = true;
                }
            });
            // @ts-ignore
            window.addEventListener("test", null, opts);
        }
        catch (e) { }
        /* eslint-enable */
        return supportsPassive;
    }
    function getSupportsTouchActionNone() {
        return window.CSS && CSS.supports && CSS.supports("touch-action", "none");
    }
    //endregion
    //region Range Calculation
    // Determine the size of a sub-range in relation to a full range.
    function subRangeRatio(pa, pb) {
        return 100 / (pb - pa);
    }
    // (percentage) How many percent is this value of this range?
    function fromPercentage(range, value, startRange) {
        return (value * 100) / (range[startRange + 1] - range[startRange]);
    }
    // (percentage) Where is this value on this range?
    function toPercentage(range, value) {
        return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);
    }
    // (value) How much is this percentage on this range?
    function isPercentage(range, value) {
        return (value * (range[1] - range[0])) / 100 + range[0];
    }
    function getJ(value, arr) {
        var j = 1;
        while (value >= arr[j]) {
            j += 1;
        }
        return j;
    }
    // (percentage) Input a value, find where, on a scale of 0-100, it applies.
    function toStepping(xVal, xPct, value) {
        if (value >= xVal.slice(-1)[0]) {
            return 100;
        }
        var j = getJ(value, xVal);
        var va = xVal[j - 1];
        var vb = xVal[j];
        var pa = xPct[j - 1];
        var pb = xPct[j];
        return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);
    }
    // (value) Input a percentage, find where it is on the specified range.
    function fromStepping(xVal, xPct, value) {
        // There is no range group that fits 100
        if (value >= 100) {
            return xVal.slice(-1)[0];
        }
        var j = getJ(value, xPct);
        var va = xVal[j - 1];
        var vb = xVal[j];
        var pa = xPct[j - 1];
        var pb = xPct[j];
        return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));
    }
    // (percentage) Get the step that applies at a certain value.
    function getStep(xPct, xSteps, snap, value) {
        if (value === 100) {
            return value;
        }
        var j = getJ(value, xPct);
        var a = xPct[j - 1];
        var b = xPct[j];
        // If 'snap' is set, steps are used as fixed points on the slider.
        if (snap) {
            // Find the closest position, a or b.
            if (value - a > (b - a) / 2) {
                return b;
            }
            return a;
        }
        if (!xSteps[j - 1]) {
            return value;
        }
        return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);
    }
    //endregion
    //region Spectrum
    var Spectrum = /** @class */ (function () {
        function Spectrum(entry, snap, singleStep) {
            this.xPct = [];
            this.xVal = [];
            this.xSteps = [];
            this.xNumSteps = [];
            this.xHighestCompleteStep = [];
            this.xSteps = [singleStep || false];
            this.xNumSteps = [false];
            this.snap = snap;
            var index;
            var ordered = [];
            // Map the object keys to an array.
            Object.keys(entry).forEach(function (index) {
                ordered.push([asArray(entry[index]), index]);
            });
            // Sort all entries by value (numeric sort).
            ordered.sort(function (a, b) {
                return a[0][0] - b[0][0];
            });
            // Convert all entries to subranges.
            for (index = 0; index < ordered.length; index++) {
                this.handleEntryPoint(ordered[index][1], ordered[index][0]);
            }
            // Store the actual step values.
            // xSteps is sorted in the same order as xPct and xVal.
            this.xNumSteps = this.xSteps.slice(0);
            // Convert all numeric steps to the percentage of the subrange they represent.
            for (index = 0; index < this.xNumSteps.length; index++) {
                this.handleStepPoint(index, this.xNumSteps[index]);
            }
        }
        Spectrum.prototype.getDistance = function (value) {
            var index;
            var distances = [];
            for (index = 0; index < this.xNumSteps.length - 1; index++) {
                // last "range" can't contain step size as it is purely an endpoint.
                var step = this.xNumSteps[index];
                if (step && (value / step) % 1 !== 0) {
                    throw new Error("noUiSlider: 'limit', 'margin' and 'padding' of " +
                        this.xPct[index] +
                        "% range must be divisible by step.");
                }
                // Calculate percentual distance in current range of limit, margin or padding
                distances[index] = fromPercentage(this.xVal, value, index);
            }
            return distances;
        };
        // Calculate the percentual distance over the whole scale of ranges.
        // direction: 0 = backwards / 1 = forwards
        Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {
            var xPct_index = 0;
            // Calculate range where to start calculation
            if (value < this.xPct[this.xPct.length - 1]) {
                while (value > this.xPct[xPct_index + 1]) {
                    xPct_index++;
                }
            }
            else if (value === this.xPct[this.xPct.length - 1]) {
                xPct_index = this.xPct.length - 2;
            }
            // If looking backwards and the value is exactly at a range separator then look one range further
            if (!direction && value === this.xPct[xPct_index + 1]) {
                xPct_index++;
            }
            if (distances === null) {
                distances = [];
            }
            var start_factor;
            var rest_factor = 1;
            var rest_rel_distance = distances[xPct_index];
            var range_pct = 0;
            var rel_range_distance = 0;
            var abs_distance_counter = 0;
            var range_counter = 0;
            // Calculate what part of the start range the value is
            if (direction) {
                start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
            }
            else {
                start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
            }
            // Do until the complete distance across ranges is calculated
            while (rest_rel_distance > 0) {
                // Calculate the percentage of total range
                range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];
                // Detect if the margin, padding or limit is larger then the current range and calculate
                if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {
                    // If larger then take the percentual distance of the whole range
                    rel_range_distance = range_pct * start_factor;
                    // Rest factor of relative percentual distance still to be calculated
                    rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];
                    // Set start factor to 1 as for next range it does not apply.
                    start_factor = 1;
                }
                else {
                    // If smaller or equal then take the percentual distance of the calculate percentual part of that range
                    rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;
                    // No rest left as the rest fits in current range
                    rest_factor = 0;
                }
                if (direction) {
                    abs_distance_counter = abs_distance_counter - rel_range_distance;
                    // Limit range to first range when distance becomes outside of minimum range
                    if (this.xPct.length + range_counter >= 1) {
                        range_counter--;
                    }
                }
                else {
                    abs_distance_counter = abs_distance_counter + rel_range_distance;
                    // Limit range to last range when distance becomes outside of maximum range
                    if (this.xPct.length - range_counter >= 1) {
                        range_counter++;
                    }
                }
                // Rest of relative percentual distance still to be calculated
                rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;
            }
            return value + abs_distance_counter;
        };
        Spectrum.prototype.toStepping = function (value) {
            value = toStepping(this.xVal, this.xPct, value);
            return value;
        };
        Spectrum.prototype.fromStepping = function (value) {
            return fromStepping(this.xVal, this.xPct, value);
        };
        Spectrum.prototype.getStep = function (value) {
            value = getStep(this.xPct, this.xSteps, this.snap, value);
            return value;
        };
        Spectrum.prototype.getDefaultStep = function (value, isDown, size) {
            var j = getJ(value, this.xPct);
            // When at the top or stepping down, look at the previous sub-range
            if (value === 100 || (isDown && value === this.xPct[j - 1])) {
                j = Math.max(j - 1, 1);
            }
            return (this.xVal[j] - this.xVal[j - 1]) / size;
        };
        Spectrum.prototype.getNearbySteps = function (value) {
            var j = getJ(value, this.xPct);
            return {
                stepBefore: {
                    startValue: this.xVal[j - 2],
                    step: this.xNumSteps[j - 2],
                    highestStep: this.xHighestCompleteStep[j - 2]
                },
                thisStep: {
                    startValue: this.xVal[j - 1],
                    step: this.xNumSteps[j - 1],
                    highestStep: this.xHighestCompleteStep[j - 1]
                },
                stepAfter: {
                    startValue: this.xVal[j],
                    step: this.xNumSteps[j],
                    highestStep: this.xHighestCompleteStep[j]
                }
            };
        };
        Spectrum.prototype.countStepDecimals = function () {
            var stepDecimals = this.xNumSteps.map(countDecimals);
            return Math.max.apply(null, stepDecimals);
        };
        Spectrum.prototype.hasNoSize = function () {
            return this.xVal[0] === this.xVal[this.xVal.length - 1];
        };
        // Outside testing
        Spectrum.prototype.convert = function (value) {
            return this.getStep(this.toStepping(value));
        };
        Spectrum.prototype.handleEntryPoint = function (index, value) {
            var percentage;
            // Covert min/max syntax to 0 and 100.
            if (index === "min") {
                percentage = 0;
            }
            else if (index === "max") {
                percentage = 100;
            }
            else {
                percentage = parseFloat(index);
            }
            // Check for correct input.
            if (!isNumeric(percentage) || !isNumeric(value[0])) {
                throw new Error("noUiSlider: 'range' value isn't numeric.");
            }
            // Store values.
            this.xPct.push(percentage);
            this.xVal.push(value[0]);
            var value1 = Number(value[1]);
            // NaN will evaluate to false too, but to keep
            // logging clear, set step explicitly. Make sure
            // not to override the 'step' setting with false.
            if (!percentage) {
                if (!isNaN(value1)) {
                    this.xSteps[0] = value1;
                }
            }
            else {
                this.xSteps.push(isNaN(value1) ? false : value1);
            }
            this.xHighestCompleteStep.push(0);
        };
        Spectrum.prototype.handleStepPoint = function (i, n) {
            // Ignore 'false' stepping.
            if (!n) {
                return;
            }
            // Step over zero-length ranges (#948);
            if (this.xVal[i] === this.xVal[i + 1]) {
                this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];
                return;
            }
            // Factor to range ratio
            this.xSteps[i] =
                fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);
            var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];
            var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);
            var step = this.xVal[i] + this.xNumSteps[i] * highestStep;
            this.xHighestCompleteStep[i] = step;
        };
        return Spectrum;
    }());
    //endregion
    //region Options
    /*	Every input option is tested and parsed. This will prevent
        endless validation in internal methods. These tests are
        structured with an item for every option available. An
        option can be marked as required by setting the 'r' flag.
        The testing function is provided with three arguments:
            - The provided value for the option;
            - A reference to the options object;
            - The name for the option;

        The testing function returns false when an error is detected,
        or true when everything is OK. It can also modify the option
        object, to make sure all values can be correctly looped elsewhere. */
    //region Defaults
    var defaultFormatter = {
        to: function (value) {
            return value === undefined ? "" : value.toFixed(2);
        },
        from: Number
    };
    var cssClasses = {
        target: "target",
        base: "base",
        origin: "origin",
        handle: "handle",
        handleLower: "handle-lower",
        handleUpper: "handle-upper",
        touchArea: "touch-area",
        horizontal: "horizontal",
        vertical: "vertical",
        background: "background",
        connect: "connect",
        connects: "connects",
        ltr: "ltr",
        rtl: "rtl",
        textDirectionLtr: "txt-dir-ltr",
        textDirectionRtl: "txt-dir-rtl",
        draggable: "draggable",
        drag: "state-drag",
        tap: "state-tap",
        active: "active",
        tooltip: "tooltip",
        pips: "pips",
        pipsHorizontal: "pips-horizontal",
        pipsVertical: "pips-vertical",
        marker: "marker",
        markerHorizontal: "marker-horizontal",
        markerVertical: "marker-vertical",
        markerNormal: "marker-normal",
        markerLarge: "marker-large",
        markerSub: "marker-sub",
        value: "value",
        valueHorizontal: "value-horizontal",
        valueVertical: "value-vertical",
        valueNormal: "value-normal",
        valueLarge: "value-large",
        valueSub: "value-sub"
    };
    // Namespaces of internal event listeners
    var INTERNAL_EVENT_NS = {
        tooltips: ".__tooltips",
        aria: ".__aria"
    };
    //endregion
    function testStep(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'step' is not numeric.");
        }
        // The step option can still be used to set stepping
        // for linear sliders. Overwritten if set in 'range'.
        parsed.singleStep = entry;
    }
    function testKeyboardPageMultiplier(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");
        }
        parsed.keyboardPageMultiplier = entry;
    }
    function testKeyboardMultiplier(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");
        }
        parsed.keyboardMultiplier = entry;
    }
    function testKeyboardDefaultStep(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");
        }
        parsed.keyboardDefaultStep = entry;
    }
    function testRange(parsed, entry) {
        // Filter incorrect input.
        if (typeof entry !== "object" || Array.isArray(entry)) {
            throw new Error("noUiSlider: 'range' is not an object.");
        }
        // Catch missing start or end.
        if (entry.min === undefined || entry.max === undefined) {
            throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");
        }
        parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);
    }
    function testStart(parsed, entry) {
        entry = asArray(entry);
        // Validate input. Values aren't tested, as the public .val method
        // will always provide a valid location.
        if (!Array.isArray(entry) || !entry.length) {
            throw new Error("noUiSlider: 'start' option is incorrect.");
        }
        // Store the number of handles.
        parsed.handles = entry.length;
        // When the slider is initialized, the .val method will
        // be called with the start options.
        parsed.start = entry;
    }
    function testSnap(parsed, entry) {
        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider: 'snap' option must be a boolean.");
        }
        // Enforce 100% stepping within subranges.
        parsed.snap = entry;
    }
    function testAnimate(parsed, entry) {
        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider: 'animate' option must be a boolean.");
        }
        // Enforce 100% stepping within subranges.
        parsed.animate = entry;
    }
    function testAnimationDuration(parsed, entry) {
        if (typeof entry !== "number") {
            throw new Error("noUiSlider: 'animationDuration' option must be a number.");
        }
        parsed.animationDuration = entry;
    }
    function testConnect(parsed, entry) {
        var connect = [false];
        var i;
        // Map legacy options
        if (entry === "lower") {
            entry = [true, false];
        }
        else if (entry === "upper") {
            entry = [false, true];
        }
        // Handle boolean options
        if (entry === true || entry === false) {
            for (i = 1; i < parsed.handles; i++) {
                connect.push(entry);
            }
            connect.push(false);
        }
        // Reject invalid input
        else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {
            throw new Error("noUiSlider: 'connect' option doesn't match handle count.");
        }
        else {
            connect = entry;
        }
        parsed.connect = connect;
    }
    function testOrientation(parsed, entry) {
        // Set orientation to an a numerical value for easy
        // array selection.
        switch (entry) {
            case "horizontal":
                parsed.ort = 0;
                break;
            case "vertical":
                parsed.ort = 1;
                break;
            default:
                throw new Error("noUiSlider: 'orientation' option is invalid.");
        }
    }
    function testMargin(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'margin' option must be numeric.");
        }
        // Issue #582
        if (entry === 0) {
            return;
        }
        parsed.margin = parsed.spectrum.getDistance(entry);
    }
    function testLimit(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider: 'limit' option must be numeric.");
        }
        parsed.limit = parsed.spectrum.getDistance(entry);
        if (!parsed.limit || parsed.handles < 2) {
            throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.");
        }
    }
    function testPadding(parsed, entry) {
        var index;
        if (!isNumeric(entry) && !Array.isArray(entry)) {
            throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
        }
        if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {
            throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
        }
        if (entry === 0) {
            return;
        }
        if (!Array.isArray(entry)) {
            entry = [entry, entry];
        }
        // 'getDistance' returns false for invalid values.
        parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];
        for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {
            // last "range" can't contain step size as it is purely an endpoint.
            if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {
                throw new Error("noUiSlider: 'padding' option must be a positive number(s).");
            }
        }
        var totalPadding = entry[0] + entry[1];
        var firstValue = parsed.spectrum.xVal[0];
        var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];
        if (totalPadding / (lastValue - firstValue) > 1) {
            throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.");
        }
    }
    function testDirection(parsed, entry) {
        // Set direction as a numerical value for easy parsing.
        // Invert connection for RTL sliders, so that the proper
        // handles get the connect/background classes.
        switch (entry) {
            case "ltr":
                parsed.dir = 0;
                break;
            case "rtl":
                parsed.dir = 1;
                break;
            default:
                throw new Error("noUiSlider: 'direction' option was not recognized.");
        }
    }
    function testBehaviour(parsed, entry) {
        // Make sure the input is a string.
        if (typeof entry !== "string") {
            throw new Error("noUiSlider: 'behaviour' must be a string containing options.");
        }
        // Check if the string contains any keywords.
        // None are required.
        var tap = entry.indexOf("tap") >= 0;
        var drag = entry.indexOf("drag") >= 0;
        var fixed = entry.indexOf("fixed") >= 0;
        var snap = entry.indexOf("snap") >= 0;
        var hover = entry.indexOf("hover") >= 0;
        var unconstrained = entry.indexOf("unconstrained") >= 0;
        var dragAll = entry.indexOf("drag-all") >= 0;
        if (fixed) {
            if (parsed.handles !== 2) {
                throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");
            }
            // Use margin to enforce fixed state
            testMargin(parsed, parsed.start[1] - parsed.start[0]);
        }
        if (unconstrained && (parsed.margin || parsed.limit)) {
            throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");
        }
        parsed.events = {
            tap: tap || snap,
            drag: drag,
            dragAll: dragAll,
            fixed: fixed,
            snap: snap,
            hover: hover,
            unconstrained: unconstrained
        };
    }
    function testTooltips(parsed, entry) {
        if (entry === false) {
            return;
        }
        if (entry === true || isValidPartialFormatter(entry)) {
            parsed.tooltips = [];
            for (var i = 0; i < parsed.handles; i++) {
                parsed.tooltips.push(entry);
            }
        }
        else {
            entry = asArray(entry);
            if (entry.length !== parsed.handles) {
                throw new Error("noUiSlider: must pass a formatter for all handles.");
            }
            entry.forEach(function (formatter) {
                if (typeof formatter !== "boolean" && !isValidPartialFormatter(formatter)) {
                    throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");
                }
            });
            parsed.tooltips = entry;
        }
    }
    function testHandleAttributes(parsed, entry) {
        if (entry.length !== parsed.handles) {
            throw new Error("noUiSlider: must pass a attributes for all handles.");
        }
        parsed.handleAttributes = entry;
    }
    function testAriaFormat(parsed, entry) {
        if (!isValidPartialFormatter(entry)) {
            throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");
        }
        parsed.ariaFormat = entry;
    }
    function testFormat(parsed, entry) {
        if (!isValidFormatter(entry)) {
            throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");
        }
        parsed.format = entry;
    }
    function testKeyboardSupport(parsed, entry) {
        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");
        }
        parsed.keyboardSupport = entry;
    }
    function testDocumentElement(parsed, entry) {
        // This is an advanced option. Passed values are used without validation.
        parsed.documentElement = entry;
    }
    function testCssPrefix(parsed, entry) {
        if (typeof entry !== "string" && entry !== false) {
            throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");
        }
        parsed.cssPrefix = entry;
    }
    function testCssClasses(parsed, entry) {
        if (typeof entry !== "object") {
            throw new Error("noUiSlider: 'cssClasses' must be an object.");
        }
        if (typeof parsed.cssPrefix === "string") {
            parsed.cssClasses = {};
            Object.keys(entry).forEach(function (key) {
                parsed.cssClasses[key] = parsed.cssPrefix + entry[key];
            });
        }
        else {
            parsed.cssClasses = entry;
        }
    }
    // Test all developer settings and parse to assumption-safe values.
    function testOptions(options) {
        // To prove a fix for #537, freeze options here.
        // If the object is modified, an error will be thrown.
        // Object.freeze(options);
        var parsed = {
            margin: null,
            limit: null,
            padding: null,
            animate: true,
            animationDuration: 300,
            ariaFormat: defaultFormatter,
            format: defaultFormatter
        };
        // Tests are executed in the order they are presented here.
        var tests = {
            step: { r: false, t: testStep },
            keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },
            keyboardMultiplier: { r: false, t: testKeyboardMultiplier },
            keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },
            start: { r: true, t: testStart },
            connect: { r: true, t: testConnect },
            direction: { r: true, t: testDirection },
            snap: { r: false, t: testSnap },
            animate: { r: false, t: testAnimate },
            animationDuration: { r: false, t: testAnimationDuration },
            range: { r: true, t: testRange },
            orientation: { r: false, t: testOrientation },
            margin: { r: false, t: testMargin },
            limit: { r: false, t: testLimit },
            padding: { r: false, t: testPadding },
            behaviour: { r: true, t: testBehaviour },
            ariaFormat: { r: false, t: testAriaFormat },
            format: { r: false, t: testFormat },
            tooltips: { r: false, t: testTooltips },
            keyboardSupport: { r: true, t: testKeyboardSupport },
            documentElement: { r: false, t: testDocumentElement },
            cssPrefix: { r: true, t: testCssPrefix },
            cssClasses: { r: true, t: testCssClasses },
            handleAttributes: { r: false, t: testHandleAttributes }
        };
        var defaults = {
            connect: false,
            direction: "ltr",
            behaviour: "tap",
            orientation: "horizontal",
            keyboardSupport: true,
            cssPrefix: "noUi-",
            cssClasses: cssClasses,
            keyboardPageMultiplier: 5,
            keyboardMultiplier: 1,
            keyboardDefaultStep: 10
        };
        // AriaFormat defaults to regular format, if any.
        if (options.format && !options.ariaFormat) {
            options.ariaFormat = options.format;
        }
        // Run all options through a testing mechanism to ensure correct
        // input. It should be noted that options might get modified to
        // be handled properly. E.g. wrapping integers in arrays.
        Object.keys(tests).forEach(function (name) {
            // If the option isn't set, but it is required, throw an error.
            if (!isSet(options[name]) && defaults[name] === undefined) {
                if (tests[name].r) {
                    throw new Error("noUiSlider: '" + name + "' is required.");
                }
                return;
            }
            tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);
        });
        // Forward pips options
        parsed.pips = options.pips;
        // All recent browsers accept unprefixed transform.
        // We need -ms- for IE9 and -webkit- for older Android;
        // Assume use of -webkit- if unprefixed and -ms- are not supported.
        // https://caniuse.com/#feat=transforms2d
        var d = document.createElement("div");
        var msPrefix = d.style.msTransform !== undefined;
        var noPrefix = d.style.transform !== undefined;
        parsed.transformRule = noPrefix ? "transform" : msPrefix ? "msTransform" : "webkitTransform";
        // Pips don't move, so we can place them using left/top.
        var styles = [
            ["left", "top"],
            ["right", "bottom"]
        ];
        parsed.style = styles[parsed.dir][parsed.ort];
        return parsed;
    }
    //endregion
    function scope(target, options, originalOptions) {
        var actions = getActions();
        var supportsTouchActionNone = getSupportsTouchActionNone();
        var supportsPassive = supportsTouchActionNone && getSupportsPassive();
        // All variables local to 'scope' are prefixed with 'scope_'
        // Slider DOM Nodes
        var scope_Target = target;
        var scope_Base;
        var scope_Handles;
        var scope_Connects;
        var scope_Pips;
        var scope_Tooltips;
        // Slider state values
        var scope_Spectrum = options.spectrum;
        var scope_Values = [];
        var scope_Locations = [];
        var scope_HandleNumbers = [];
        var scope_ActiveHandlesCount = 0;
        var scope_Events = {};
        // Document Nodes
        var scope_Document = target.ownerDocument;
        var scope_DocumentElement = options.documentElement || scope_Document.documentElement;
        var scope_Body = scope_Document.body;
        // For horizontal sliders in standard ltr documents,
        // make .noUi-origin overflow to the left so the document doesn't scroll.
        var scope_DirOffset = scope_Document.dir === "rtl" || options.ort === 1 ? 0 : 100;
        // Creates a node, adds it to target, returns the new node.
        function addNodeTo(addTarget, className) {
            var div = scope_Document.createElement("div");
            if (className) {
                addClass(div, className);
            }
            addTarget.appendChild(div);
            return div;
        }
        // Append a origin to the base
        function addOrigin(base, handleNumber) {
            var origin = addNodeTo(base, options.cssClasses.origin);
            var handle = addNodeTo(origin, options.cssClasses.handle);
            addNodeTo(handle, options.cssClasses.touchArea);
            handle.setAttribute("data-handle", String(handleNumber));
            if (options.keyboardSupport) {
                // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
                // 0 = focusable and reachable
                handle.setAttribute("tabindex", "0");
                handle.addEventListener("keydown", function (event) {
                    return eventKeydown(event, handleNumber);
                });
            }
            if (options.handleAttributes !== undefined) {
                var attributes_1 = options.handleAttributes[handleNumber];
                Object.keys(attributes_1).forEach(function (attribute) {
                    handle.setAttribute(attribute, attributes_1[attribute]);
                });
            }
            handle.setAttribute("role", "slider");
            handle.setAttribute("aria-orientation", options.ort ? "vertical" : "horizontal");
            if (handleNumber === 0) {
                addClass(handle, options.cssClasses.handleLower);
            }
            else if (handleNumber === options.handles - 1) {
                addClass(handle, options.cssClasses.handleUpper);
            }
            return origin;
        }
        // Insert nodes for connect elements
        function addConnect(base, add) {
            if (!add) {
                return false;
            }
            return addNodeTo(base, options.cssClasses.connect);
        }
        // Add handles to the slider base.
        function addElements(connectOptions, base) {
            var connectBase = addNodeTo(base, options.cssClasses.connects);
            scope_Handles = [];
            scope_Connects = [];
            scope_Connects.push(addConnect(connectBase, connectOptions[0]));
            // [::::O====O====O====]
            // connectOptions = [0, 1, 1, 1]
            for (var i = 0; i < options.handles; i++) {
                // Keep a list of all added handles.
                scope_Handles.push(addOrigin(base, i));
                scope_HandleNumbers[i] = i;
                scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));
            }
        }
        // Initialize a single slider.
        function addSlider(addTarget) {
            // Apply classes and data to the target.
            addClass(addTarget, options.cssClasses.target);
            if (options.dir === 0) {
                addClass(addTarget, options.cssClasses.ltr);
            }
            else {
                addClass(addTarget, options.cssClasses.rtl);
            }
            if (options.ort === 0) {
                addClass(addTarget, options.cssClasses.horizontal);
            }
            else {
                addClass(addTarget, options.cssClasses.vertical);
            }
            var textDirection = getComputedStyle(addTarget).direction;
            if (textDirection === "rtl") {
                addClass(addTarget, options.cssClasses.textDirectionRtl);
            }
            else {
                addClass(addTarget, options.cssClasses.textDirectionLtr);
            }
            return addNodeTo(addTarget, options.cssClasses.base);
        }
        function addTooltip(handle, handleNumber) {
            if (!options.tooltips || !options.tooltips[handleNumber]) {
                return false;
            }
            return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
        }
        function isSliderDisabled() {
            return scope_Target.hasAttribute("disabled");
        }
        // Disable the slider dragging if any handle is disabled
        function isHandleDisabled(handleNumber) {
            var handleOrigin = scope_Handles[handleNumber];
            return handleOrigin.hasAttribute("disabled");
        }
        function removeTooltips() {
            if (scope_Tooltips) {
                removeEvent("update" + INTERNAL_EVENT_NS.tooltips);
                scope_Tooltips.forEach(function (tooltip) {
                    if (tooltip) {
                        removeElement(tooltip);
                    }
                });
                scope_Tooltips = null;
            }
        }
        // The tooltips option is a shorthand for using the 'update' event.
        function tooltips() {
            removeTooltips();
            // Tooltips are added with options.tooltips in original order.
            scope_Tooltips = scope_Handles.map(addTooltip);
            bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {
                if (!scope_Tooltips || !options.tooltips) {
                    return;
                }
                if (scope_Tooltips[handleNumber] === false) {
                    return;
                }
                var formattedValue = values[handleNumber];
                if (options.tooltips[handleNumber] !== true) {
                    formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);
                }
                scope_Tooltips[handleNumber].innerHTML = formattedValue;
            });
        }
        function aria() {
            removeEvent("update" + INTERNAL_EVENT_NS.aria);
            bindEvent("update" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {
                // Update Aria Values for all handles, as a change in one changes min and max values for the next.
                scope_HandleNumbers.forEach(function (index) {
                    var handle = scope_Handles[index];
                    var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);
                    var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);
                    var now = positions[index];
                    // Formatted value for display
                    var text = String(options.ariaFormat.to(unencoded[index]));
                    // Map to slider range values
                    min = scope_Spectrum.fromStepping(min).toFixed(1);
                    max = scope_Spectrum.fromStepping(max).toFixed(1);
                    now = scope_Spectrum.fromStepping(now).toFixed(1);
                    handle.children[0].setAttribute("aria-valuemin", min);
                    handle.children[0].setAttribute("aria-valuemax", max);
                    handle.children[0].setAttribute("aria-valuenow", now);
                    handle.children[0].setAttribute("aria-valuetext", text);
                });
            });
        }
        function getGroup(pips) {
            // Use the range.
            if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {
                return scope_Spectrum.xVal;
            }
            if (pips.mode === exports.PipsMode.Count) {
                if (pips.values < 2) {
                    throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");
                }
                // Divide 0 - 100 in 'count' parts.
                var interval = pips.values - 1;
                var spread = 100 / interval;
                var values = [];
                // List these parts and have them handled as 'positions'.
                while (interval--) {
                    values[interval] = interval * spread;
                }
                values.push(100);
                return mapToRange(values, pips.stepped);
            }
            if (pips.mode === exports.PipsMode.Positions) {
                // Map all percentages to on-range values.
                return mapToRange(pips.values, pips.stepped);
            }
            if (pips.mode === exports.PipsMode.Values) {
                // If the value must be stepped, it needs to be converted to a percentage first.
                if (pips.stepped) {
                    return pips.values.map(function (value) {
                        // Convert to percentage, apply step, return to value.
                        return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));
                    });
                }
                // Otherwise, we can simply use the values.
                return pips.values;
            }
            return []; // pips.mode = never
        }
        function mapToRange(values, stepped) {
            return values.map(function (value) {
                return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);
            });
        }
        function generateSpread(pips) {
            function safeIncrement(value, increment) {
                // Avoid floating point variance by dropping the smallest decimal places.
                return Number((value + increment).toFixed(7));
            }
            var group = getGroup(pips);
            var indexes = {};
            var firstInRange = scope_Spectrum.xVal[0];
            var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];
            var ignoreFirst = false;
            var ignoreLast = false;
            var prevPct = 0;
            // Create a copy of the group, sort it and filter away all duplicates.
            group = unique(group.slice().sort(function (a, b) {
                return a - b;
            }));
            // Make sure the range starts with the first element.
            if (group[0] !== firstInRange) {
                group.unshift(firstInRange);
                ignoreFirst = true;
            }
            // Likewise for the last one.
            if (group[group.length - 1] !== lastInRange) {
                group.push(lastInRange);
                ignoreLast = true;
            }
            group.forEach(function (current, index) {
                // Get the current step and the lower + upper positions.
                var step;
                var i;
                var q;
                var low = current;
                var high = group[index + 1];
                var newPct;
                var pctDifference;
                var pctPos;
                var type;
                var steps;
                var realSteps;
                var stepSize;
                var isSteps = pips.mode === exports.PipsMode.Steps;
                // When using 'steps' mode, use the provided steps.
                // Otherwise, we'll step on to the next subrange.
                if (isSteps) {
                    step = scope_Spectrum.xNumSteps[index];
                }
                // Default to a 'full' step.
                if (!step) {
                    step = high - low;
                }
                // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)
                if (high === undefined) {
                    high = low;
                }
                // Make sure step isn't 0, which would cause an infinite loop (#654)
                step = Math.max(step, 0.0000001);
                // Find all steps in the subrange.
                for (i = low; i <= high; i = safeIncrement(i, step)) {
                    // Get the percentage value for the current step,
                    // calculate the size for the subrange.
                    newPct = scope_Spectrum.toStepping(i);
                    pctDifference = newPct - prevPct;
                    steps = pctDifference / (pips.density || 1);
                    realSteps = Math.round(steps);
                    // This ratio represents the amount of percentage-space a point indicates.
                    // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.
                    // Round the percentage offset to an even number, then divide by two
                    // to spread the offset on both sides of the range.
                    stepSize = pctDifference / realSteps;
                    // Divide all points evenly, adding the correct number to this subrange.
                    // Run up to <= so that 100% gets a point, event if ignoreLast is set.
                    for (q = 1; q <= realSteps; q += 1) {
                        // The ratio between the rounded value and the actual size might be ~1% off.
                        // Correct the percentage offset by the number of points
                        // per subrange. density = 1 will result in 100 points on the
                        // full range, 2 for 50, 4 for 25, etc.
                        pctPos = prevPct + q * stepSize;
                        indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];
                    }
                    // Determine the point type.
                    type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue;
                    // Enforce the 'ignoreFirst' option by overwriting the type for 0.
                    if (!index && ignoreFirst && i !== high) {
                        type = 0;
                    }
                    if (!(i === high && ignoreLast)) {
                        // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.
                        indexes[newPct.toFixed(5)] = [i, type];
                    }
                    // Update the percentage count.
                    prevPct = newPct;
                }
            });
            return indexes;
        }
        function addMarking(spread, filterFunc, formatter) {
            var _a, _b;
            var element = scope_Document.createElement("div");
            var valueSizeClasses = (_a = {},
                _a[exports.PipsType.None] = "",
                _a[exports.PipsType.NoValue] = options.cssClasses.valueNormal,
                _a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge,
                _a[exports.PipsType.SmallValue] = options.cssClasses.valueSub,
                _a);
            var markerSizeClasses = (_b = {},
                _b[exports.PipsType.None] = "",
                _b[exports.PipsType.NoValue] = options.cssClasses.markerNormal,
                _b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge,
                _b[exports.PipsType.SmallValue] = options.cssClasses.markerSub,
                _b);
            var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];
            var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];
            addClass(element, options.cssClasses.pips);
            addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);
            function getClasses(type, source) {
                var a = source === options.cssClasses.value;
                var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;
                var sizeClasses = a ? valueSizeClasses : markerSizeClasses;
                return source + " " + orientationClasses[options.ort] + " " + sizeClasses[type];
            }
            function addSpread(offset, value, type) {
                // Apply the filter function, if it is set.
                type = filterFunc ? filterFunc(value, type) : type;
                if (type === exports.PipsType.None) {
                    return;
                }
                // Add a marker for every point
                var node = addNodeTo(element, false);
                node.className = getClasses(type, options.cssClasses.marker);
                node.style[options.style] = offset + "%";
                // Values are only appended for points marked '1' or '2'.
                if (type > exports.PipsType.NoValue) {
                    node = addNodeTo(element, false);
                    node.className = getClasses(type, options.cssClasses.value);
                    node.setAttribute("data-value", String(value));
                    node.style[options.style] = offset + "%";
                    node.innerHTML = String(formatter.to(value));
                }
            }
            // Append all points.
            Object.keys(spread).forEach(function (offset) {
                addSpread(offset, spread[offset][0], spread[offset][1]);
            });
            return element;
        }
        function removePips() {
            if (scope_Pips) {
                removeElement(scope_Pips);
                scope_Pips = null;
            }
        }
        function pips(pips) {
            // Fix #669
            removePips();
            var spread = generateSpread(pips);
            var filter = pips.filter;
            var format = pips.format || {
                to: function (value) {
                    return String(Math.round(value));
                }
            };
            scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
            return scope_Pips;
        }
        // Shorthand for base dimensions.
        function baseSize() {
            var rect = scope_Base.getBoundingClientRect();
            var alt = ("offset" + ["Width", "Height"][options.ort]);
            return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];
        }
        // Handler for attaching events trough a proxy.
        function attachEvent(events, element, callback, data) {
            // This function can be used to 'filter' events to the slider.
            // element is a node, not a nodeList
            var method = function (event) {
                var e = fixEvent(event, data.pageOffset, data.target || element);
                // fixEvent returns false if this event has a different target
                // when handling (multi-) touch events;
                if (!e) {
                    return false;
                }
                // doNotReject is passed by all end events to make sure released touches
                // are not rejected, leaving the slider "stuck" to the cursor;
                if (isSliderDisabled() && !data.doNotReject) {
                    return false;
                }
                // Stop if an active 'tap' transition is taking place.
                if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {
                    return false;
                }
                // Ignore right or middle clicks on start #454
                if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {
                    return false;
                }
                // Ignore right or middle clicks on start #454
                if (data.hover && e.buttons) {
                    return false;
                }
                // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.
                // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support
                // touch-action: manipulation, but that allows panning, which breaks
                // sliders after zooming/on non-responsive pages.
                // See: https://bugs.webkit.org/show_bug.cgi?id=133112
                if (!supportsPassive) {
                    e.preventDefault();
                }
                e.calcPoint = e.points[options.ort];
                // Call the event handler with the event [ and additional data ].
                callback(e, data);
                return;
            };
            var methods = [];
            // Bind a closure on the target for every event type.
            events.split(" ").forEach(function (eventName) {
                element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
                methods.push([eventName, method]);
            });
            return methods;
        }
        // Provide a clean event with standardized offset values.
        function fixEvent(e, pageOffset, eventTarget) {
            // Filter the event to register the type, which can be
            // touch, mouse or pointer. Offset changes need to be
            // made on an event specific basis.
            var touch = e.type.indexOf("touch") === 0;
            var mouse = e.type.indexOf("mouse") === 0;
            var pointer = e.type.indexOf("pointer") === 0;
            var x = 0;
            var y = 0;
            // IE10 implemented pointer events with a prefix;
            if (e.type.indexOf("MSPointer") === 0) {
                pointer = true;
            }
            // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with
            // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore
            // events that have no touches or buttons associated with them. (#1057, #1079, #1095)
            if (e.type === "mousedown" && !e.buttons && !e.touches) {
                return false;
            }
            // The only thing one handle should be concerned about is the touches that originated on top of it.
            if (touch) {
                // Returns true if a touch originated on the target.
                var isTouchOnTarget = function (checkTouch) {
                    var target = checkTouch.target;
                    return (target === eventTarget ||
                        eventTarget.contains(target) ||
                        (e.composed && e.composedPath().shift() === eventTarget));
                };
                // In the case of touchstart events, we need to make sure there is still no more than one
                // touch on the target so we look amongst all touches.
                if (e.type === "touchstart") {
                    var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);
                    // Do not support more than one touch per handle.
                    if (targetTouches.length > 1) {
                        return false;
                    }
                    x = targetTouches[0].pageX;
                    y = targetTouches[0].pageY;
                }
                else {
                    // In the other cases, find on changedTouches is enough.
                    var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);
                    // Cancel if the target touch has not moved.
                    if (!targetTouch) {
                        return false;
                    }
                    x = targetTouch.pageX;
                    y = targetTouch.pageY;
                }
            }
            pageOffset = pageOffset || getPageOffset(scope_Document);
            if (mouse || pointer) {
                x = e.clientX + pageOffset.x;
                y = e.clientY + pageOffset.y;
            }
            e.pageOffset = pageOffset;
            e.points = [x, y];
            e.cursor = mouse || pointer; // Fix #435
            return e;
        }
        // Translate a coordinate in the document to a percentage on the slider
        function calcPointToPercentage(calcPoint) {
            var location = calcPoint - offset(scope_Base, options.ort);
            var proposal = (location * 100) / baseSize();
            // Clamp proposal between 0% and 100%
            // Out-of-bound coordinates may occur when .noUi-base pseudo-elements
            // are used (e.g. contained handles feature)
            proposal = limit(proposal);
            return options.dir ? 100 - proposal : proposal;
        }
        // Find handle closest to a certain percentage on the slider
        function getClosestHandle(clickedPosition) {
            var smallestDifference = 100;
            var handleNumber = false;
            scope_Handles.forEach(function (handle, index) {
                // Disabled handles are ignored
                if (isHandleDisabled(index)) {
                    return;
                }
                var handlePosition = scope_Locations[index];
                var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);
                // Initial state
                var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;
                // Difference with this handle is smaller than the previously checked handle
                var isCloser = differenceWithThisHandle < smallestDifference;
                var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;
                if (isCloser || isCloserAfter || clickAtEdge) {
                    handleNumber = index;
                    smallestDifference = differenceWithThisHandle;
                }
            });
            return handleNumber;
        }
        // Fire 'end' when a mouse or pen leaves the document.
        function documentLeave(event, data) {
            if (event.type === "mouseout" &&
                event.target.nodeName === "HTML" &&
                event.relatedTarget === null) {
                eventEnd(event, data);
            }
        }
        // Handle movement on document for handle and range drag.
        function eventMove(event, data) {
            // Fix #498
            // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).
            // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero
            // IE9 has .buttons and .which zero on mousemove.
            // Firefox breaks the spec MDN defines.
            if (navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {
                return eventEnd(event, data);
            }
            // Check if we are moving up or down
            var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);
            // Convert the movement into a percentage of the slider width/height
            var proposal = (movement * 100) / data.baseSize;
            moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);
        }
        // Unbind move events on document, call callbacks.
        function eventEnd(event, data) {
            // The handle is no longer active, so remove the class.
            if (data.handle) {
                removeClass(data.handle, options.cssClasses.active);
                scope_ActiveHandlesCount -= 1;
            }
            // Unbind the move and end events, which are added on 'start'.
            data.listeners.forEach(function (c) {
                scope_DocumentElement.removeEventListener(c[0], c[1]);
            });
            if (scope_ActiveHandlesCount === 0) {
                // Remove dragging class.
                removeClass(scope_Target, options.cssClasses.drag);
                setZindex();
                // Remove cursor styles and text-selection events bound to the body.
                if (event.cursor) {
                    scope_Body.style.cursor = "";
                    scope_Body.removeEventListener("selectstart", preventDefault);
                }
            }
            data.handleNumbers.forEach(function (handleNumber) {
                fireEvent("change", handleNumber);
                fireEvent("set", handleNumber);
                fireEvent("end", handleNumber);
            });
        }
        // Bind move events on document.
        function eventStart(event, data) {
            // Ignore event if any handle is disabled
            if (data.handleNumbers.some(isHandleDisabled)) {
                return;
            }
            var handle;
            if (data.handleNumbers.length === 1) {
                var handleOrigin = scope_Handles[data.handleNumbers[0]];
                handle = handleOrigin.children[0];
                scope_ActiveHandlesCount += 1;
                // Mark the handle as 'active' so it can be styled.
                addClass(handle, options.cssClasses.active);
            }
            // A drag should never propagate up to the 'tap' event.
            event.stopPropagation();
            // Record the event listeners.
            var listeners = [];
            // Attach the move and end events.
            var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {
                // The event target has changed so we need to propagate the original one so that we keep
                // relying on it to extract target touches.
                target: event.target,
                handle: handle,
                connect: data.connect,
                listeners: listeners,
                startCalcPoint: event.calcPoint,
                baseSize: baseSize(),
                pageOffset: event.pageOffset,
                handleNumbers: data.handleNumbers,
                buttonsProperty: event.buttons,
                locations: scope_Locations.slice()
            });
            var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
                target: event.target,
                handle: handle,
                listeners: listeners,
                doNotReject: true,
                handleNumbers: data.handleNumbers
            });
            var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
                target: event.target,
                handle: handle,
                listeners: listeners,
                doNotReject: true,
                handleNumbers: data.handleNumbers
            });
            // We want to make sure we pushed the listeners in the listener list rather than creating
            // a new one as it has already been passed to the event handlers.
            listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));
            // Text selection isn't an issue on touch devices,
            // so adding cursor styles can be skipped.
            if (event.cursor) {
                // Prevent the 'I' cursor and extend the range-drag cursor.
                scope_Body.style.cursor = getComputedStyle(event.target).cursor;
                // Mark the target with a dragging state.
                if (scope_Handles.length > 1) {
                    addClass(scope_Target, options.cssClasses.drag);
                }
                // Prevent text selection when dragging the handles.
                // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,
                // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,
                // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.
                // The 'cursor' flag is false.
                // See: http://caniuse.com/#search=selectstart
                scope_Body.addEventListener("selectstart", preventDefault, false);
            }
            data.handleNumbers.forEach(function (handleNumber) {
                fireEvent("start", handleNumber);
            });
        }
        // Move closest handle to tapped location.
        function eventTap(event) {
            // The tap event shouldn't propagate up
            event.stopPropagation();
            var proposal = calcPointToPercentage(event.calcPoint);
            var handleNumber = getClosestHandle(proposal);
            // Tackle the case that all handles are 'disabled'.
            if (handleNumber === false) {
                return;
            }
            // Flag the slider as it is now in a transitional state.
            // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.
            if (!options.events.snap) {
                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
            }
            setHandle(handleNumber, proposal, true, true);
            setZindex();
            fireEvent("slide", handleNumber, true);
            fireEvent("update", handleNumber, true);
            if (!options.events.snap) {
                fireEvent("change", handleNumber, true);
                fireEvent("set", handleNumber, true);
            }
            else {
                eventStart(event, { handleNumbers: [handleNumber] });
            }
        }
        // Fires a 'hover' event for a hovered mouse/pen position.
        function eventHover(event) {
            var proposal = calcPointToPercentage(event.calcPoint);
            var to = scope_Spectrum.getStep(proposal);
            var value = scope_Spectrum.fromStepping(to);
            Object.keys(scope_Events).forEach(function (targetEvent) {
                if ("hover" === targetEvent.split(".")[0]) {
                    scope_Events[targetEvent].forEach(function (callback) {
                        callback.call(scope_Self, value);
                    });
                }
            });
        }
        // Handles keydown on focused handles
        // Don't move the document when pressing arrow keys on focused handles
        function eventKeydown(event, handleNumber) {
            if (isSliderDisabled() || isHandleDisabled(handleNumber)) {
                return false;
            }
            var horizontalKeys = ["Left", "Right"];
            var verticalKeys = ["Down", "Up"];
            var largeStepKeys = ["PageDown", "PageUp"];
            var edgeKeys = ["Home", "End"];
            if (options.dir && !options.ort) {
                // On an right-to-left slider, the left and right keys act inverted
                horizontalKeys.reverse();
            }
            else if (options.ort && !options.dir) {
                // On a top-to-bottom slider, the up and down keys act inverted
                verticalKeys.reverse();
                largeStepKeys.reverse();
            }
            // Strip "Arrow" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
            var key = event.key.replace("Arrow", "");
            var isLargeDown = key === largeStepKeys[0];
            var isLargeUp = key === largeStepKeys[1];
            var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;
            var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;
            var isMin = key === edgeKeys[0];
            var isMax = key === edgeKeys[1];
            if (!isDown && !isUp && !isMin && !isMax) {
                return true;
            }
            event.preventDefault();
            var to;
            if (isUp || isDown) {
                var direction = isDown ? 0 : 1;
                var steps = getNextStepsForHandle(handleNumber);
                var step = steps[direction];
                // At the edge of a slider, do nothing
                if (step === null) {
                    return false;
                }
                // No step set, use the default of 10% of the sub-range
                if (step === false) {
                    step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);
                }
                if (isLargeUp || isLargeDown) {
                    step *= options.keyboardPageMultiplier;
                }
                else {
                    step *= options.keyboardMultiplier;
                }
                // Step over zero-length ranges (#948);
                step = Math.max(step, 0.0000001);
                // Decrement for down steps
                step = (isDown ? -1 : 1) * step;
                to = scope_Values[handleNumber] + step;
            }
            else if (isMax) {
                // End key
                to = options.spectrum.xVal[options.spectrum.xVal.length - 1];
            }
            else {
                // Home key
                to = options.spectrum.xVal[0];
            }
            setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);
            fireEvent("slide", handleNumber);
            fireEvent("update", handleNumber);
            fireEvent("change", handleNumber);
            fireEvent("set", handleNumber);
            return false;
        }
        // Attach events to several slider parts.
        function bindSliderEvents(behaviour) {
            // Attach the standard drag event to the handles.
            if (!behaviour.fixed) {
                scope_Handles.forEach(function (handle, index) {
                    // These events are only bound to the visual handle
                    // element, not the 'real' origin element.
                    attachEvent(actions.start, handle.children[0], eventStart, {
                        handleNumbers: [index]
                    });
                });
            }
            // Attach the tap event to the slider base.
            if (behaviour.tap) {
                attachEvent(actions.start, scope_Base, eventTap, {});
            }
            // Fire hover events
            if (behaviour.hover) {
                attachEvent(actions.move, scope_Base, eventHover, {
                    hover: true
                });
            }
            // Make the range draggable.
            if (behaviour.drag) {
                scope_Connects.forEach(function (connect, index) {
                    if (connect === false || index === 0 || index === scope_Connects.length - 1) {
                        return;
                    }
                    var handleBefore = scope_Handles[index - 1];
                    var handleAfter = scope_Handles[index];
                    var eventHolders = [connect];
                    var handlesToDrag = [handleBefore, handleAfter];
                    var handleNumbersToDrag = [index - 1, index];
                    addClass(connect, options.cssClasses.draggable);
                    // When the range is fixed, the entire range can
                    // be dragged by the handles. The handle in the first
                    // origin will propagate the start event upward,
                    // but it needs to be bound manually on the other.
                    if (behaviour.fixed) {
                        eventHolders.push(handleBefore.children[0]);
                        eventHolders.push(handleAfter.children[0]);
                    }
                    if (behaviour.dragAll) {
                        handlesToDrag = scope_Handles;
                        handleNumbersToDrag = scope_HandleNumbers;
                    }
                    eventHolders.forEach(function (eventHolder) {
                        attachEvent(actions.start, eventHolder, eventStart, {
                            handles: handlesToDrag,
                            handleNumbers: handleNumbersToDrag,
                            connect: connect
                        });
                    });
                });
            }
        }
        // Attach an event to this slider, possibly including a namespace
        function bindEvent(namespacedEvent, callback) {
            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
            scope_Events[namespacedEvent].push(callback);
            // If the event bound is 'update,' fire it immediately for all handles.
            if (namespacedEvent.split(".")[0] === "update") {
                scope_Handles.forEach(function (a, index) {
                    fireEvent("update", index);
                });
            }
        }
        function isInternalNamespace(namespace) {
            return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;
        }
        // Undo attachment of event
        function removeEvent(namespacedEvent) {
            var event = namespacedEvent && namespacedEvent.split(".")[0];
            var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;
            Object.keys(scope_Events).forEach(function (bind) {
                var tEvent = bind.split(".")[0];
                var tNamespace = bind.substring(tEvent.length);
                if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {
                    // only delete protected internal event if intentional
                    if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {
                        delete scope_Events[bind];
                    }
                }
            });
        }
        // External event handling
        function fireEvent(eventName, handleNumber, tap) {
            Object.keys(scope_Events).forEach(function (targetEvent) {
                var eventType = targetEvent.split(".")[0];
                if (eventName === eventType) {
                    scope_Events[targetEvent].forEach(function (callback) {
                        callback.call(
                        // Use the slider public API as the scope ('this')
                        scope_Self, 
                        // Return values as array, so arg_1[arg_2] is always valid.
                        scope_Values.map(options.format.to), 
                        // Handle index, 0 or 1
                        handleNumber, 
                        // Un-formatted slider values
                        scope_Values.slice(), 
                        // Event is fired by tap, true or false
                        tap || false, 
                        // Left offset of the handle, in relation to the slider
                        scope_Locations.slice(), 
                        // add the slider public API to an accessible parameter when this is unavailable
                        scope_Self);
                    });
                }
            });
        }
        // Split out the handle positioning logic so the Move event can use it, too
        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {
            var distance;
            // For sliders with multiple handles, limit movement to the other handle.
            // Apply the margin option by adding it to the handle positions.
            if (scope_Handles.length > 1 && !options.events.unconstrained) {
                if (lookBackward && handleNumber > 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);
                    to = Math.max(to, distance);
                }
                if (lookForward && handleNumber < scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);
                    to = Math.min(to, distance);
                }
            }
            // The limit option has the opposite effect, limiting handles to a
            // maximum distance from another. Limit must be > 0, as otherwise
            // handles would be unmovable.
            if (scope_Handles.length > 1 && options.limit) {
                if (lookBackward && handleNumber > 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);
                    to = Math.min(to, distance);
                }
                if (lookForward && handleNumber < scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);
                    to = Math.max(to, distance);
                }
            }
            // The padding option keeps the handles a certain distance from the
            // edges of the slider. Padding must be > 0.
            if (options.padding) {
                if (handleNumber === 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);
                    to = Math.max(to, distance);
                }
                if (handleNumber === scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);
                    to = Math.min(to, distance);
                }
            }
            to = scope_Spectrum.getStep(to);
            // Limit percentage to the 0 - 100 range
            to = limit(to);
            // Return false if handle can't move
            if (to === reference[handleNumber] && !getValue) {
                return false;
            }
            return to;
        }
        // Uses slider orientation to create CSS rules. a = base value;
        function inRuleOrder(v, a) {
            var o = options.ort;
            return (o ? a : v) + ", " + (o ? v : a);
        }
        // Moves handle(s) by a percentage
        // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
        function moveHandles(upward, proposal, locations, handleNumbers, connect) {
            var proposals = locations.slice();
            // Store first handle now, so we still have it in case handleNumbers is reversed
            var firstHandle = handleNumbers[0];
            var b = [!upward, upward];
            var f = [upward, !upward];
            // Copy handleNumbers so we don't change the dataset
            handleNumbers = handleNumbers.slice();
            // Check to see which handle is 'leading'.
            // If that one can't move the second can't either.
            if (upward) {
                handleNumbers.reverse();
            }
            // Step 1: get the maximum percentage that any of the handles can move
            if (handleNumbers.length > 1) {
                handleNumbers.forEach(function (handleNumber, o) {
                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);
                    // Stop if one of the handles can't move.
                    if (to === false) {
                        proposal = 0;
                    }
                    else {
                        proposal = to - proposals[handleNumber];
                        proposals[handleNumber] = to;
                    }
                });
            }
            // If using one handle, check backward AND forward
            else {
                b = f = [true];
            }
            var state = false;
            // Step 2: Try to set the handles with the found percentage
            handleNumbers.forEach(function (handleNumber, o) {
                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
            });
            // Step 3: If a handle moved, fire events
            if (state) {
                handleNumbers.forEach(function (handleNumber) {
                    fireEvent("update", handleNumber);
                    fireEvent("slide", handleNumber);
                });
                // If target is a connect, then fire drag event
                if (connect != undefined) {
                    fireEvent("drag", firstHandle);
                }
            }
        }
        // Takes a base value and an offset. This offset is used for the connect bar size.
        // In the initial design for this feature, the origin element was 1% wide.
        // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature
        // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223
        function transformDirection(a, b) {
            return options.dir ? 100 - a - b : a;
        }
        // Updates scope_Locations and scope_Values, updates visual state
        function updateHandlePosition(handleNumber, to) {
            // Update locations.
            scope_Locations[handleNumber] = to;
            // Convert the value to the slider stepping/range.
            scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);
            var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);
            var translateRule = "translate(" + inRuleOrder(translation + "%", "0") + ")";
            scope_Handles[handleNumber].style[options.transformRule] = translateRule;
            updateConnect(handleNumber);
            updateConnect(handleNumber + 1);
        }
        // Handles before the slider middle are stacked later = higher,
        // Handles after the middle later is lower
        // [[7] [8] .......... | .......... [5] [4]
        function setZindex() {
            scope_HandleNumbers.forEach(function (handleNumber) {
                var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;
                var zIndex = 3 + (scope_Handles.length + dir * handleNumber);
                scope_Handles[handleNumber].style.zIndex = String(zIndex);
            });
        }
        // Test suggested values and apply margin, step.
        // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)
        function setHandle(handleNumber, to, lookBackward, lookForward, exactInput) {
            if (!exactInput) {
                to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);
            }
            if (to === false) {
                return false;
            }
            updateHandlePosition(handleNumber, to);
            return true;
        }
        // Updates style attribute for connect nodes
        function updateConnect(index) {
            // Skip connects set to false
            if (!scope_Connects[index]) {
                return;
            }
            var l = 0;
            var h = 100;
            if (index !== 0) {
                l = scope_Locations[index - 1];
            }
            if (index !== scope_Connects.length - 1) {
                h = scope_Locations[index];
            }
            // We use two rules:
            // 'translate' to change the left/top offset;
            // 'scale' to change the width of the element;
            // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)
            var connectWidth = h - l;
            var translateRule = "translate(" + inRuleOrder(transformDirection(l, connectWidth) + "%", "0") + ")";
            var scaleRule = "scale(" + inRuleOrder(connectWidth / 100, "1") + ")";
            scope_Connects[index].style[options.transformRule] =
                translateRule + " " + scaleRule;
        }
        // Parses value passed to .set method. Returns current value if not parse-able.
        function resolveToValue(to, handleNumber) {
            // Setting with null indicates an 'ignore'.
            // Inputting 'false' is invalid.
            if (to === null || to === false || to === undefined) {
                return scope_Locations[handleNumber];
            }
            // If a formatted number was passed, attempt to decode it.
            if (typeof to === "number") {
                to = String(to);
            }
            to = options.format.from(to);
            if (to !== false) {
                to = scope_Spectrum.toStepping(to);
            }
            // If parsing the number failed, use the current value.
            if (to === false || isNaN(to)) {
                return scope_Locations[handleNumber];
            }
            return to;
        }
        // Set the slider value.
        function valueSet(input, fireSetEvent, exactInput) {
            var values = asArray(input);
            var isInit = scope_Locations[0] === undefined;
            // Event fires by default
            fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent;
            // Animation is optional.
            // Make sure the initial values were set before using animated placement.
            if (options.animate && !isInit) {
                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
            }
            // First pass, without lookAhead but with lookBackward. Values are set from left to right.
            scope_HandleNumbers.forEach(function (handleNumber) {
                setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);
            });
            var i = scope_HandleNumbers.length === 1 ? 0 : 1;
            // Spread handles evenly across the slider if the range has no size (min=max)
            if (isInit && scope_Spectrum.hasNoSize()) {
                exactInput = true;
                scope_Locations[0] = 0;
                if (scope_HandleNumbers.length > 1) {
                    var space_1 = 100 / (scope_HandleNumbers.length - 1);
                    scope_HandleNumbers.forEach(function (handleNumber) {
                        scope_Locations[handleNumber] = handleNumber * space_1;
                    });
                }
            }
            // Secondary passes. Now that all base values are set, apply constraints.
            // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)
            for (; i < scope_HandleNumbers.length; ++i) {
                scope_HandleNumbers.forEach(function (handleNumber) {
                    setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);
                });
            }
            setZindex();
            scope_HandleNumbers.forEach(function (handleNumber) {
                fireEvent("update", handleNumber);
                // Fire the event only for handles that received a new value, as per #579
                if (values[handleNumber] !== null && fireSetEvent) {
                    fireEvent("set", handleNumber);
                }
            });
        }
        // Reset slider to initial values
        function valueReset(fireSetEvent) {
            valueSet(options.start, fireSetEvent);
        }
        // Set value for a single handle
        function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {
            // Ensure numeric input
            handleNumber = Number(handleNumber);
            if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {
                throw new Error("noUiSlider: invalid handle number, got: " + handleNumber);
            }
            // Look both backward and forward, since we don't want this handle to "push" other handles (#960);
            // The exactInput argument can be used to ignore slider stepping (#436)
            setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);
            fireEvent("update", handleNumber);
            if (fireSetEvent) {
                fireEvent("set", handleNumber);
            }
        }
        // Get the slider value.
        function valueGet(unencoded) {
            if (unencoded === void 0) { unencoded = false; }
            if (unencoded) {
                // return a copy of the raw values
                return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);
            }
            var values = scope_Values.map(options.format.to);
            // If only one handle is used, return a single value.
            if (values.length === 1) {
                return values[0];
            }
            return values;
        }
        // Removes classes from the root and empties it.
        function destroy() {
            // remove protected internal listeners
            removeEvent(INTERNAL_EVENT_NS.aria);
            removeEvent(INTERNAL_EVENT_NS.tooltips);
            Object.keys(options.cssClasses).forEach(function (key) {
                removeClass(scope_Target, options.cssClasses[key]);
            });
            while (scope_Target.firstChild) {
                scope_Target.removeChild(scope_Target.firstChild);
            }
            delete scope_Target.noUiSlider;
        }
        function getNextStepsForHandle(handleNumber) {
            var location = scope_Locations[handleNumber];
            var nearbySteps = scope_Spectrum.getNearbySteps(location);
            var value = scope_Values[handleNumber];
            var increment = nearbySteps.thisStep.step;
            var decrement = null;
            // If snapped, directly use defined step value
            if (options.snap) {
                return [
                    value - nearbySteps.stepBefore.startValue || null,
                    nearbySteps.stepAfter.startValue - value || null
                ];
            }
            // If the next value in this step moves into the next step,
            // the increment is the start of the next step - the current value
            if (increment !== false) {
                if (value + increment > nearbySteps.stepAfter.startValue) {
                    increment = nearbySteps.stepAfter.startValue - value;
                }
            }
            // If the value is beyond the starting point
            if (value > nearbySteps.thisStep.startValue) {
                decrement = nearbySteps.thisStep.step;
            }
            else if (nearbySteps.stepBefore.step === false) {
                decrement = false;
            }
            // If a handle is at the start of a step, it always steps back into the previous step first
            else {
                decrement = value - nearbySteps.stepBefore.highestStep;
            }
            // Now, if at the slider edges, there is no in/decrement
            if (location === 100) {
                increment = null;
            }
            else if (location === 0) {
                decrement = null;
            }
            // As per #391, the comparison for the decrement step can have some rounding issues.
            var stepDecimals = scope_Spectrum.countStepDecimals();
            // Round per #391
            if (increment !== null && increment !== false) {
                increment = Number(increment.toFixed(stepDecimals));
            }
            if (decrement !== null && decrement !== false) {
                decrement = Number(decrement.toFixed(stepDecimals));
            }
            return [decrement, increment];
        }
        // Get the current step size for the slider.
        function getNextSteps() {
            return scope_HandleNumbers.map(getNextStepsForHandle);
        }
        // Updatable: margin, limit, padding, step, range, animate, snap
        function updateOptions(optionsToUpdate, fireSetEvent) {
            // Spectrum is created using the range, snap, direction and step options.
            // 'snap' and 'step' can be updated.
            // If 'snap' and 'step' are not passed, they should remain unchanged.
            var v = valueGet();
            var updateAble = [
                "margin",
                "limit",
                "padding",
                "range",
                "animate",
                "snap",
                "step",
                "format",
                "pips",
                "tooltips"
            ];
            // Only change options that we're actually passed to update.
            updateAble.forEach(function (name) {
                // Check for undefined. null removes the value.
                if (optionsToUpdate[name] !== undefined) {
                    originalOptions[name] = optionsToUpdate[name];
                }
            });
            var newOptions = testOptions(originalOptions);
            // Load new options into the slider state
            updateAble.forEach(function (name) {
                if (optionsToUpdate[name] !== undefined) {
                    options[name] = newOptions[name];
                }
            });
            scope_Spectrum = newOptions.spectrum;
            // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)
            options.margin = newOptions.margin;
            options.limit = newOptions.limit;
            options.padding = newOptions.padding;
            // Update pips, removes existing.
            if (options.pips) {
                pips(options.pips);
            }
            else {
                removePips();
            }
            // Update tooltips, removes existing.
            if (options.tooltips) {
                tooltips();
            }
            else {
                removeTooltips();
            }
            // Invalidate the current positioning so valueSet forces an update.
            scope_Locations = [];
            valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);
        }
        // Initialization steps
        function setupSlider() {
            // Create the base element, initialize HTML and set classes.
            // Add handles and connect elements.
            scope_Base = addSlider(scope_Target);
            addElements(options.connect, scope_Base);
            // Attach user events.
            bindSliderEvents(options.events);
            // Use the public value method to set the start values.
            valueSet(options.start);
            if (options.pips) {
                pips(options.pips);
            }
            if (options.tooltips) {
                tooltips();
            }
            aria();
        }
        setupSlider();
        var scope_Self = {
            destroy: destroy,
            steps: getNextSteps,
            on: bindEvent,
            off: removeEvent,
            get: valueGet,
            set: valueSet,
            setHandle: valueSetHandle,
            reset: valueReset,
            // Exposed for unit testing, don't use this in your application.
            __moveHandles: function (upward, proposal, handleNumbers) {
                moveHandles(upward, proposal, scope_Locations, handleNumbers);
            },
            options: originalOptions,
            updateOptions: updateOptions,
            target: scope_Target,
            removePips: removePips,
            removeTooltips: removeTooltips,
            getPositions: function () {
                return scope_Locations.slice();
            },
            getTooltips: function () {
                return scope_Tooltips;
            },
            getOrigins: function () {
                return scope_Handles;
            },
            pips: pips // Issue #594
        };
        return scope_Self;
    }
    // Run the standard initializer
    function initialize(target, originalOptions) {
        if (!target || !target.nodeName) {
            throw new Error("noUiSlider: create requires a single element, got: " + target);
        }
        // Throw an error if the slider was already initialized.
        if (target.noUiSlider) {
            throw new Error("noUiSlider: Slider was already initialized.");
        }
        // Test the options and create the slider environment;
        var options = testOptions(originalOptions);
        var api = scope(target, options, originalOptions);
        target.noUiSlider = api;
        return api;
    }
    var nouislider = {
        // Exposed for unit testing, don't use this in your application.
        __spectrum: Spectrum,
        // A reference to the default classes, allows global changes.
        // Use the cssClasses option for changes to one slider.
        cssClasses: cssClasses,
        create: initialize
    };

    exports.create = initialize;
    exports.cssClasses = cssClasses;
    exports['default'] = nouislider;

    Object.defineProperty(exports, '__esModule', { value: true });

})));


/***/ }),

/***/ "./node_modules/@jupyter-widgets/controls/package.json":
/*!*************************************************************!*\
  !*** ./node_modules/@jupyter-widgets/controls/package.json ***!
  \*************************************************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"name":"@jupyter-widgets/controls","version":"5.0.2","description":"Jupyter interactive widgets","repository":{"type":"git","url":"https://github.com/jupyter-widgets/ipywidgets.git"},"license":"BSD-3-Clause","author":"Project Jupyter","main":"lib/index.js","typings":"lib/index.d.ts","files":["lib/**/*.d.ts","lib/**/*.js","css/*.css","dist/"],"scripts":{"build":"npm run build:src && npm run build:css","build:css":"lessc css/nouislider.less css/nouislider.css && postcss --use postcss-import --use postcss-cssnext -o css/widgets.built.css css/widgets.css","build:src":"tsc --build","build:test":"tsc --build test && webpack --config test/webpack.conf.js","clean":"npm run clean:src","clean:src":"rimraf lib && rimraf tsconfig.tsbuildinfo","prepublish":"npm run clean && npm run build","test":"npm run test:unit","test:coverage":"npm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js","test:unit":"npm run test:unit:firefox && npm run test:unit:chrome","test:unit:chrome":"npm run test:unit:default -- --browsers=Chrome","test:unit:default":"npm run build:test && karma start test/karma.conf.js --log-level debug","test:unit:firefox":"npm run test:unit:default -- --browsers=Firefox","test:unit:firefox:headless":"npm run test:unit:default -- --browsers=FirefoxHeadless","test:unit:ie":"npm run test:unit:default -- --browsers=IE"},"dependencies":{"@jupyter-widgets/base":"^6.0.2","@lumino/algorithm":"^1.9.1","@lumino/domutils":"^1.8.1","@lumino/messaging":"^1.10.1","@lumino/signaling":"^1.10.1","@lumino/widgets":"^1.30.0","d3-color":"^3.0.1","d3-format":"^3.0.1","jquery":"^3.1.1","nouislider":"15.4.0"},"devDependencies":{"@jupyterlab/services":"^6.0.0","@types/d3-color":"^3.0.2","@types/d3-format":"^3.0.1","@types/expect.js":"^0.3.29","@types/mathjax":"^0.0.37","@types/mocha":"^9.0.0","@types/node":"^17.0.2","chai":"^4.0.0","css-loader":"^6.5.1","expect.js":"^0.3.1","istanbul-instrumenter-loader":"^3.0.1","karma":"^6.3.3","karma-chrome-launcher":"^3.1.0","karma-coverage":"^2.0.3","karma-firefox-launcher":"^2.1.1","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-webpack":"^5.0.0","less":"^4.1.2","mocha":"^9.0.0","npm-run-all":"^4.1.5","postcss":"^8.3.2","postcss-cli":"^9.1.0","postcss-cssnext":"^3.1.0","postcss-import":"^14.0.2","postcss-loader":"^6.1.0","rimraf":"^3.0.2","sinon":"^12.0.1","sinon-chai":"^3.3.0","style-loader":"^3.3.1","typescript":"~4.3.2","webpack":"^5.65.0"},"gitHead":"204e65a24dd9f0aa84df18509c7bf2377c55d266"}');

/***/ })

}]);
//# sourceMappingURL=vendors-node_modules_jupyter-widgets_controls_lib_index_js.f4e20d5b08ec0fd51bad.js.map