diff --git a/README.md b/README.md index 2ccd6bb..c0c5b2b 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,18 @@ You can find the full demo example in this live [notebook](https://mybinder.org/ # Installation -Lux can be installed through PyPI: +For either Jupyter Notebooks or JupyterLab (versions 3.0 and above), you can install via pip or conda: ```bash pip install lux-api ``` +or + +```bash + conda install -c conda-forge lux-api +``` + ## Setup in Jupyter Notebook, VSCode To use Lux in [Jupyter notebook](https://github.com/jupyter/notebook) or [VSCode](https://code.visualstudio.com/docs/python/jupyter-support), activate the notebook extension: @@ -49,15 +55,6 @@ To use Lux in [Jupyter notebook](https://github.com/jupyter/notebook) or [VSCode If the installation happens correctly, you should see two `- Validating: OK` after executing the two lines above. -## Setup in Jupyter Lab - -To use Lux in [Jupyter Lab](https://github.com/jupyterlab/jupyterlab), activate the lab extension: - -```bash - jupyter labextension install @jupyter-widgets/jupyterlab-manager - jupyter labextension install luxwidget -``` - If you encounter issues with the installation, please refer to [this page](https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips) to troubleshoot the installation. Follow [these instructions](https://lux-api.readthedocs.io/en/latest/source/getting_started/installation.html#manual-installation-dev-setup) to set up Lux for development purposes. # Documentation and Support diff --git a/css/widget.css b/css/widget.css deleted file mode 100644 index ae9ea0e..0000000 --- a/css/widget.css +++ /dev/null @@ -1,565 +0,0 @@ -.jp-OutputArea-output { - height: auto; - overflow: auto; - user-select: text; - -moz-user-select: text; - -webkit-user-select: text; - -ms-user-select: text; - width: 90%; - padding-bottom: 4px; -} - -#widgetContainer{ - /* height: 315px; */ - width:100%; - display:inline-flex; -} - -#oneViewWidgetContainer { - width:100%; - display:inline-flex; -} -input[type=text], select { - width: 100%; - padding: 12px 20px; - margin: 8px 0; - display: inline-block; - border: 1px solid #ccc; - border-radius: 4px; - box-sizing: border-box; -} -#mult-graph-container{ - display: inline-flex; -} -.recommendationStaticContentOuter{ - scroll-snap-align: start; - /* border: 0.5px solid #bcbdbd; */ - overflow-x: auto; - overflow-y: hidden; - display: inline-block; - text-align: left; - /* padding-left: 20px; */ - /* padding-top: 10px; */ - /* height: 100%; */ - box-sizing: border-box; - width: 100%; - position: relative; -} -.recommendationContentOuter{ - /* overflow: scroll; */ - /* Prevents unneccesary x-scroll for specified facet */ - /* width: 100%; */ - /*height: 225px;*/ - display: flex; - /* display: inline-block;*/ - margin-left: 10px; - text-align: left; -} -.vega-embed { - position: relative; - display: inline-block; - /* padding-right: 38px; */ - flex: 1 0 auto; - padding-right: 10px !important; -} -/* .vega-embed:hover{ - border: solid 1px; - border-color: rgba(0, 0, 0, 0.4); - box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.5); - cursor: pointer; -} */ -.vega-embed:checked{ - border: solid 1px; - border-color: blue; -} -.recommendationContentInner{ - /*width: auto; - max-width: 150%;*/ - /*display: inline-block;*/ - /*margin-left: 8px;*/ - text-align: left; - display: flex; - flex-wrap: nowrap; - align-items: flex-end; - /* overflow-x: auto; */ - overflow-x: initial; - padding-right: 50px; - /*height: 280px;*/ - /* width: max-content; - overflow-x: auto; */ - /* height: 100px; */ -} - -.toolDiv{ - position: relative; - top: -20px; - left: -5px; -} -.fa { - color:gray; -} -.fa:hover{ - color:black; -} - -.graph-container{ - height: 250px; - max-height: 270px; - margin: 10px 0px 5px 5px; - padding: 0px 0px 0px 0px; -} -#mainVizTitle{ - font-size: 20px; - display: inline-block; - left: 10%; - top: 0px; - position: absolute; -} -#mainVizContainer{ - padding: 10px 0px 0px 0px; - border: 0.5px solid #bcbdbd; - overflow-y: auto; -} - -#mainVizInnerContainer{ - margin-top: 50px; -} - -#placeHolderVizContainer{ - min-height: 100%; - min-width: 1px; -} -#tabBanner{ - border: 0.5px solid #bcbdbd; - width: auto; - overflow: hidden; - flex: 1; -} -#exportBtn{ - position: absolute; - /* bottom: 90%; */ - /* left: 97%; */ - top: 5px; - right: 5px; - font-size: 20px; - padding: 5px; -} - -#deleteBtn{ - position: absolute; - top: 5px; - right: 33px; - font-size: 20px; - padding: 5px; -} - -#intentBtn{ - position: absolute; - top: 5px; - right: 59px; - font-size: 20px; - padding: 5px; -} - -#alertBox{ - position: absolute; - left: 23%; - width: 54%; - bottom: 6%; - padding: 5px 30px 5px 10px; -} - -/* - JupyterLab does support bootstrap, so need to add bootstrap css - https://gist.github.com/EvanHerman/315952ebf371cb83ee9db6c54499933d -*/ - -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} - -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} - -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; - appearance: none; -} - -.close { - float: right; - font-size: 19.5px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - filter: alpha(opacity=20); - opacity: 0.2; -} - -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; - color: #31708f; -} - -/* canvas{ - width: 229px; - height: 245px; -} */ -/* Override .fade default to show tab*/ -.fade { - opacity:1; -} -/* Copied from bootstrap.css */ -.nav { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - padding-left: 0; - margin-bottom: 0; - list-style: none; -} - -.nav-link { - display: block; - padding: 0.5rem 1rem; -} - -.nav-link:hover, .nav-link:focus { - text-decoration: none; -} - -.nav-link.disabled { - color: #6c757d; - pointer-events: none; - cursor: default; -} - -.nav-tabs { - border-bottom: 1px solid #dee2e6; -} - -.tabBannerPadding { - padding-left: 210px; -} - -.nav-tabs .nav-item { - margin-bottom: -1px; -} - -.nav-tabs .nav-link { - border: 1px solid transparent; - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} - -.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { - border-color: #e9ecef #e9ecef #dee2e6; -} - -.nav-tabs .nav-link.disabled { - color: #6c757d; - background-color: transparent; - border-color: transparent; -} - -.nav-tabs .nav-link.active, -.nav-tabs .nav-item.show .nav-link { - color: #495057; - background-color: #fff; - border-color: #dee2e6 #dee2e6 #fff; - font-weight: 500; -} - -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -.nav-pills .nav-link { - border-radius: 0.25rem; -} - -.nav-pills .nav-link.active, -.nav-pills .show > .nav-link { - color: #fff; - background-color: #007bff; -} - -.nav-fill .nav-item { - -ms-flex: 1 1 auto; - flex: 1 1 auto; - text-align: center; -} - -.nav-justified .nav-item { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - text-align: center; -} - -.tab-content > .tab-pane { - display: none; -} - -.tab-content > .active { - display: block; -} -/* Selectable Card React Component CSS */ -/* Card */ -.card { - transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - background: #fff; - margin: 20px 10px; - cursor: pointer; -} -.card:hover { - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); -} -/* Selectable */ -.card .selectable { - position: relative; - transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); - border: 4px solid transparent; -} -.card .selectable .check { - transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); - position: absolute; - top: 0; - right: 0; - z-index: 10; - width: 20px; - height: 20px; -} -.card .selectable .check:before { - transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); - content: ''; - border: 20px solid; - border-color: transparent; - position: absolute; - top: 0; - right: 0; - z-index: -1; -} -.card .selectable .check .checkmark { - display: block; - font: 20px sans-serif; - line-height: 20px; - text-align: center; - color: transparent; -} -.card .selectable.selected { - border-color: #4ad; -} -.card .selectable.selected .check:before { - border-color: #4ad #4ad rgba(0, 0, 255, 0) rgba(255, 0, 0, 0); -} -.card .selectable.selected .check .checkmark { - color: #fff; -} -.content { - padding: 24px; -} -.content .title, .content .description { - margin: 0; - padding: 4px; -} -.column { - float: left; - width: 50%; -} -.column > .title { - text-align: center; -} -button.card { - display: block; - cursor: pointer; - width: 180px; - margin: 20px auto; - text-align: center; - padding: 16px; - border-color: transparent; - border-radius: 10px; - background: #4ad !important; - color: #fff; - text-transform: uppercase; - font-weight: bold; - outline: none; -} -button.card:focus { - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -} -.title-description{ - line-height: 2; - font-weight: 500; - margin-left: 15px; - margin-bottom: -27px; - color: rgb(0, 0, 0); - margin-top: 5px; -} -.text-description { - line-height: 2.5; - margin-left: 15px; - margin-bottom: -25px; - color: rgb(80, 80, 80); - margin-top: 5px; -} -.warning-footer { - padding: 10px; - border: 0.5px solid #bcbdbd; - background-color: lightyellow; - display: flex; - flex-direction: row; - border-top: 0px; -} -.info-footer { - padding: 10px; - border: 0.5px solid #bcbdbd; - background-color: rgb(206, 228, 255); - display: flex; - flex-direction: row; - border-top: 0px; - position: relative; -} -#no-recs-footer { - padding: 10px; - border: 0.5px solid #bcbdbd; - background-color: lightyellow; - display: flex; - flex-direction: row; - position: relative; -} -#no-recs { - color: #ffbc00; - pointer-events: none; - position: relative; - top: 5px; - left: px; - font-size: 25px; - padding: 5px; -} -#no-recs-text { - color: rgb(80, 80, 80); - font-size: 20px; - margin-top: 5px; - margin-left: 5px; - margin-right: 30px; -} -#scroll-indicator { - margin-right: 10px; - margin-top: 5px; - text-align: right; - color: rgb(80, 80, 80); - font-weight: 700; - z-index: 0; - position: relative; - margin-bottom: 15px; -} -#scroll-indicator-background { - z-index: 0; - position: relative; - background-color: rgba(250, 250, 250, 0.8); - /* width: 210px; */ - height: 25px; - float: right; - margin-top: -26px; -} -/* This forces the toggle button to overlap with widget.Output (main widget). This may leak to other .widget-button if there are non-Lux widgets in the notebook. */ -/* .widget-button{ - position: absolute; - z-index: 999; - border-radius: 5px; -} */ - -#first-arrow{ - margin-left: 25px; - opacity: 50%; -} - -#second-arrow{ - margin-left: -4px; -} - -.highlight-intent{ - font-weight: 500; - background: aliceblue; - display: inline; - /* display: inline-table; - text-align: left; */ -} -.highlight-descriptor{ - font-weight: 500; - background: #fffee1; - display: inline; - /* display: inline-table; - text-align: left; */ -} -#intent_str { - margin-top: 5px; - font-weight: 500; - max-width:100px -} - -#warnBtn{ - color: #ffbc00; - position: absolute; - top: 5px; - right: 88px; - font-size: 20px; - padding: 5px; -} -#warnBtn:hover{ - color:black; -} -.warnMsgText{ - color: rgb(80, 80, 80); - margin-top: 5px; - margin-left: 5px; - margin-right: 30px; -} -#infoBtn{ - position: absolute; - top: 45px; - right: 5px; - font-size: 20px; - padding: 5px; -} -.infoMsgText{ - color: rgb(80, 80, 80); - margin-top: 5px; - margin-left: 30px; - margin-right: 30px; -} - -#cur-img { - all: revert; - height: 218px; -} - -#gal-img { - all: revert; - height: 212px; -} diff --git a/install.json b/install.json new file mode 100644 index 0000000..9874f98 --- /dev/null +++ b/install.json @@ -0,0 +1,5 @@ +{ + "packageManager": "python", + "packageName": "lux-widget", + "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package luxwidget" +} diff --git a/luxwidget/__init__.py b/luxwidget/__init__.py index db0fd4a..80b7f2d 100644 --- a/luxwidget/__init__.py +++ b/luxwidget/__init__.py @@ -2,6 +2,18 @@ # coding: utf-8 from .widget import LuxWidget -from ._version import __version__, version_info - +from ._version import __version__ from .nbextension import _jupyter_nbextension_paths +import json +from pathlib import Path + +HERE = Path(__file__).parent.resolve() + +with (HERE / "labextension" / "package.json").open() as fid: + data = json.load(fid) + +def _jupyter_labextension_paths(): + return [{ + "src": "labextension", + "dest": data["name"] + }] diff --git a/luxwidget/_version.py b/luxwidget/_version.py index 59be381..508aa74 100644 --- a/luxwidget/_version.py +++ b/luxwidget/_version.py @@ -1,5 +1,18 @@ -#!/usr/bin/env python -# coding: utf-8 +import json +from pathlib import Path -version_info = (0, 1, 4) -__version__ = ".".join(map(str, version_info)) +__all__ = ["__version__"] + +def _fetchVersion(): + HERE = Path(__file__).parent.resolve() + + for settings in HERE.rglob("package.json"): + try: + with settings.open() as f: + return json.load(f)["version"] + except FileNotFoundError: + pass + + raise FileNotFoundError(f"Could not find package.json under dir {HERE!s}") + +__version__ = _fetchVersion() \ No newline at end of file diff --git a/luxwidget/labextension/package.json b/luxwidget/labextension/package.json new file mode 100644 index 0000000..1b97c39 --- /dev/null +++ b/luxwidget/labextension/package.json @@ -0,0 +1,118 @@ +{ + "name": "luxwidget", + "version": "0.1.5", + "description": "A Custom Jupyter Widget Library", + "keywords": [ + "jupyter", + "jupyterlab", + "jupyterlab-extension", + "widgets" + ], + "files": [ + "webpack.config.js", + "tsconfig.json", + "luxwidget/*.py", + "luxwidget/nbextension/static/*", + "luxwidget/labextension/static/*", + "luxwidget/labextension/package.json", + "*.py", + "src/*.tsx", + "src/*.ts", + "lib/**/*.js", + "lib/**/*.ts", + "dist/*.js", + "style/index.js", + "style/*.css" + ], + "homepage": "https://github.com/lux-org/lux-widget", + "bugs": { + "url": "https://github.com/lux-org/lux-widget/issues" + }, + "license": "Apache-2.0", + "author": { + "name": "Doris Jung-Lin Lee", + "email": "dorisjunglinlee@gmail.com" + }, + "main": "lib/index.js", + "types": "./lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/lux-org/lux-widget" + }, + "scripts": { + "build": "jlpm run build:lib && jlpm run build:labextension:dev", + "build:prod": "jlpm run build:lib && jlpm run build:labextension", + "build:labextension": "jupyter labextension build .", + "build:labextension:dev": "jupyter labextension build --development True .", + "build:lib": "tsc", + "clean": "jlpm run clean:lib", + "clean:lib": "rimraf lib tsconfig.tsbuildinfo", + "clean:labextension": "rimraf {{ cookiecutter.python_name }}/labextension", + "clean:all": "jlpm run clean:lib && jlpm run clean:labextension", + "eslint": "eslint . --ext .ts,.tsx --fix", + "eslint:check": "eslint . --ext .ts,.tsx", + "install:extension": "jupyter labextension develop --overwrite .", + "prepare": "jlpm run clean && jlpm run build:prod", + "watch": "run-p watch:src watch:labextension", + "watch:src": "tsc -w", + "watch:labextension": "jupyter labextension watch ." + }, + "dependencies": { + "@jupyter-widgets/base": "^3 || ^4.0.0", + "@material-ui/core": "^4.11.0", + "bootstrap": "^4.4.1", + "detect-libc": "^1.0.3", + "jquery": "^3.4.1", + "needle": "^2.4.0", + "nopt": "^4.0.1", + "rc": "^1.2.8", + "react": "^17.0.1", + "react-bootstrap": "^1.0.0-beta.16", + "react-dom": "^17.0.1", + "react-vega": "7.1.1", + "vega": "^5.9.0", + "vega-embed": "^6.2.1", + "vega-lite": "^4.0.2" + }, + "devDependencies": { + "@babel/preset-react": "^7.7.4", + "@jupyterlab/builder": "^3.0.0", + "@lumino/application": "^1.13.1", + "@lumino/widgets": "^1.16.1", + "@types/expect.js": "^0.3.29", + "@types/jquery": "^3.5.4", + "@types/mocha": "^5.2.5", + "@types/node": "^10.11.6", + "@types/react": "^16.9.16", + "@types/react-dom": "^16.9.4", + "@types/webpack-env": "^1.13.6", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", + "css-loader": "^3.2.0", + "eslint": "^7.14.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-prettier": "^3.1.4", + "expect.js": "^0.3.1", + "fs-extra": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.1.1", + "rimraf": "^3.0.2", + "source-map-loader": "^0.2.4", + "style-loader": "^1.0.0", + "ts-loader": "^6.2.1", + "typescript": "~4.1.3", + "webpack": "^4.46.0", + "webpack-cli": "^3.3.12" + }, + "jupyterlab": { + "extension": "lib/plugin", + "outputDir": "luxwidget/labextension" + }, + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "styleModule": "style/index.js" +} diff --git a/luxwidget/labextension/static/25.f5884a7ee04ea320d2c0.js b/luxwidget/labextension/static/25.f5884a7ee04ea320d2c0.js new file mode 100644 index 0000000..32ee1c5 --- /dev/null +++ b/luxwidget/labextension/static/25.f5884a7ee04ea320d2c0.js @@ -0,0 +1 @@ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[25],{6313:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,i;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{i=Promise}catch(e){i=function(){}}function r(o,s,c,u,l){"object"==typeof s&&(c=s.depth,u=s.prototype,l=s.includeNonEnumerable,s=s.circular);var f=[],d=[],p="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===c&&(c=1/0),function o(c,g){if(null===c)return null;if(0===g)return c;var m,h;if("object"!=typeof c)return c;if(e(c,t))m=new t;else if(e(c,n))m=new n;else if(e(c,i))m=new i((function(e,t){c.then((function(t){e(o(t,g-1))}),(function(e){t(o(e,g-1))}))}));else if(r.__isArray(c))m=[];else if(r.__isRegExp(c))m=new RegExp(c.source,a(c)),c.lastIndex&&(m.lastIndex=c.lastIndex);else if(r.__isDate(c))m=new Date(c.getTime());else{if(p&&Buffer.isBuffer(c))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(c.length):new Buffer(c.length),c.copy(m),m;e(c,Error)?m=Object.create(c):void 0===u?(h=Object.getPrototypeOf(c),m=Object.create(h)):(m=Object.create(u),h=u)}if(s){var b=f.indexOf(c);if(-1!=b)return d[b];f.push(c),d.push(m)}for(var v in e(c,t)&&c.forEach((function(e,t){var n=o(t,g-1),i=o(e,g-1);m.set(n,i)})),e(c,n)&&c.forEach((function(e){var t=o(e,g-1);m.add(t)})),c){var y;h&&(y=Object.getOwnPropertyDescriptor(h,v)),y&&null==y.set||(m[v]=o(c[v],g-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(c);for(v=0;v{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;0!=r--;){var a=o[r];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},5035:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,i="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(n=t.cmp,function(e){return function(t,i){var r={key:t,value:e[t]},o={key:i,value:e[i]};return n(r,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,a;if(Array.isArray(t)){for(a="[",n=0;n{"use strict";n.d(t,{n:()=>s});const i=/[[\]{}]/,r={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let o,a;function s(e,t,n){return o=t||"view",a=n||r,u(e.trim()).map(l)}function c(e,t,n,i,r){const o=e.length;let a,s=0;for(;t=0?--s:i&&i.indexOf(a)>=0&&++s}return t}function u(e){const t=[],n=e.length;let i=0,r=0;for(;r"!==(e=e.slice(i+1).trim())[0])throw"Expected '>' after between selector: "+e;n=n.map(l);const r=l(e.slice(1).trim());return r.between?{between:n,stream:r}:(r.between=n,r)}(e):function(e){const t={source:o},n=[];let r,s,u=[0,0],l=0,f=0,d=e.length,p=0;if("}"===e[d-1]){if(p=e.lastIndexOf("{"),!(p>=0))throw"Unmatched right brace: "+e;try{u=function(e){const t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((t=>{const n=+t;if(n!=n)throw e;return n}))}(e.substring(p+1,d-1))}catch(t){throw"Invalid throttle specification: "+e}d=(e=e.slice(0,p).trim()).length,p=0}if(!d)throw e;if("@"===e[0]&&(l=++p),r=c(e,p,":"),r1?(t.type=n[1],l?t.markname=n[0].slice(1):(g=n[0],a[g]?t.marktype=n[0]:t.source=n[0])):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=s&&(t.filter=s),u[0]&&(t.throttle=u[0]),u[1]&&(t.debounce=u[1]),t}(e)}},25:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessPathDepth:()=>V,accessPathWithDatum:()=>I,compile:()=>wg,contains:()=>w,deepEqual:()=>h,deleteNestedProperty:()=>R,duplicate:()=>b,entries:()=>M,every:()=>A,fieldIntersection:()=>P,flatAccessWithDatum:()=>U,getFirstDefined:()=>K,hasIntersection:()=>E,hash:()=>O,internalField:()=>ee,isBoolean:()=>T,isEmpty:()=>_,isEqual:()=>$,isInternalField:()=>te,isNullOrFalse:()=>j,isNumeric:()=>ie,keys:()=>z,logicalExpr:()=>q,mergeDeep:()=>k,normalize:()=>ec,normalizeAngle:()=>ne,omit:()=>y,pick:()=>v,prefixGenerator:()=>B,removePathFromField:()=>X,replaceAll:()=>G,replacePathInField:()=>J,resetIdCounter:()=>Z,setEqual:()=>S,some:()=>D,stringify:()=>x,titleCase:()=>W,unique:()=>C,uniqueId:()=>Q,vals:()=>N,varName:()=>L,version:()=>i.i8});const i={i8:"4.17.0"};var r=n(8823);Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,i){return Array.isArray(i)?n.push.apply(n,e.call(i,t-1)):n.push(i),n}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(e){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var o=n(6313),a=n.n(o),s=n(4063),c=n.n(s),u=n(5035),l=n.n(u);function f(e){return!!e.or}function d(e){return!!e.and}function p(e){return!!e.not}function g(e,t){if(p(e))g(e.not,t);else if(d(e))for(const n of e.and)g(n,t);else if(f(e))for(const n of e.or)g(n,t);else t(e)}function m(e,t){return p(e)?{not:m(e.not,t)}:d(e)?{and:e.and.map((e=>m(e,t)))}:f(e)?{or:e.or.map((e=>m(e,t)))}:t(e)}const h=c(),b=a();function v(e,t){const n={};for(const i of t)(0,r.nr)(e,i)&&(n[i]=e[i]);return n}function y(e,t){const n=Object.assign({},e);for(const e of t)delete n[e];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>l()(e))).join(",")})`};const x=l();function O(e){if((0,r.hj)(e))return e;const t=(0,r.HD)(e)?e:l()(e);if(t.length<250)return t;let n=0;for(let e=0;e-1}function D(e,t){let n=0;for(const[i,r]of e.entries())if(t(r,i,n++))return!0;return!1}function A(e,t){let n=0;for(const[i,r]of e.entries())if(!t(r,i,n++))return!1;return!0}function k(e,...t){for(const n of t)F(e,null!=n?n:{});return e}function F(e,t){for(const n of z(t))(0,r.iL)(e,n,t[n],!0)}function C(e,t){const n=[],i={};let r;for(const o of e)r=t(o),r in i||(i[r]=1,n.push(o));return n}function $(e,t){const n=z(e),i=z(t);if(n.length!==i.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}function S(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function E(e,t){for(const n of e)if(t.has(n))return!0;return!1}function B(e){const t=new Set;for(const n of e){const e=(0,r._k)(n).map(((e,t)=>0===t?e:`[${e}]`)),i=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of i)t.add(e)}return t}function P(e,t){return void 0===e||void 0===t||E(B(e),B(t))}function _(e){return 0===z(e).length}const z=Object.keys,N=Object.values,M=Object.entries;function T(e){return!0===e||!1===e}function L(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function q(e,t){return p(e)?"!("+q(e.not,t)+")":d(e)?"("+e.and.map((e=>q(e,t))).join(") && (")+")":f(e)?"("+e.or.map((e=>q(e,t))).join(") || (")+")":t(e)}function R(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&R(e[n],t)&&delete e[n],_(e)}function W(e){return e.charAt(0).toUpperCase()+e.substr(1)}function I(e,t="datum"){const n=(0,r._k)(e),i=[];for(let e=1;e<=n.length;e++){const o=`[${n.slice(0,e).map(r.m8).join("][")}]`;i.push(`${t}${o}`)}return i.join(" && ")}function U(e,t="datum"){return`${t}[${(0,r.m8)((0,r._k)(e).join("."))}]`}function H(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function J(e){return`${(0,r._k)(e).map(H).join("\\.")}`}function G(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function X(e){return`${(0,r._k)(e).join(".")}`}function V(e){return e?(0,r._k)(e).length:0}function K(...e){for(const t of e)if(void 0!==t)return t}let Y=42;function Q(e){const t=++Y;return e?String(e)+t:t}function Z(){Y=42}function ee(e){return te(e)?e:`__${e}`}function te(e){return 0===e.indexOf("__")}function ne(e){if(void 0!==e)return(e%360+360)%360}function ie(e){return!!(0,r.hj)(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const re={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function oe(e){return e&&e.condition}const ae=["domain","grid","labels","ticks","title"],se={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"main",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},ce={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},ue=Object.assign(Object.assign({},ce),{style:1,labelExpr:1,encoding:1});function le(e){return!!ue[e]}z(ue);const fe=z({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1}),de={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},pe={count:1,min:1,max:1};function ge(e){return!!e&&!!e.argmin}function me(e){return!!e&&!!e.argmax}function he(e){return(0,r.HD)(e)&&!!de[e]}z(de);const be=["count","valid","missing","distinct"];function ve(e){return(0,r.HD)(e)&&w(be,e)}const ye=["count","sum","distinct","valid","missing"],xe=(0,r.Rg)(["mean","average","median","q1","q3","min","max"]);var Oe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rmn(e[t])?L(`_${t}_${M(e[t])}`):L(`_${t}_${e[t]}`))).join("")}function dn(e){return!0===e||gn(e)&&!e.binned}function pn(e){return"binned"===e||gn(e)&&!0===e.binned}function gn(e){return(0,r.Kn)(e)}function mn(e){return null==e?void 0:e.selection}function hn(e){switch(e){case je:case we:case Re:case Me:case Te:case Le:case Je:case Ie:case Ue:case He:case qe:return 6;case Ge:return 4;default:return 10}}function bn(e){return`Invalid specification ${JSON.stringify(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}function vn(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function yn(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function xn(e){return e?`Dropping "fit-${e}" because spec has discrete ${kt(e)}.`:'Dropping "fit" because spec has discrete size.'}function On(e){return`Unknown field for ${e}. Cannot calculate view size.`}function jn(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function wn(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Dn(e){return`Selection not supported for ${e} yet.`}function An(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function kn(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function Fn(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function Cn(e){return`Invalid field type "${e}".`}function $n(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function Sn(e,t){return`Dropping ${x(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function En(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function Bn(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function Pn(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function _n(e){return`Using unaggregated domain with raw field has no effect (${x(e)}).`}function zn(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function Nn(e){return`Unaggregated domain is currently unsupported for log scale (${x(e)}).`}function Mn(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function Tn(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const Ln="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function qn(e,t){return`Invalid ${e}: ${x(t)}.`}function Rn(e){return`1D error band does not support ${e}.`}function Wn(e){return`Channel ${e} is required for "binned" bin.`}const In=(0,r.kg)(r.uU);let Un=In;function Hn(...e){Un.warn(...e)}function Jn(e){if(e&&(0,r.Kn)(e))for(const t of ei)if(t in e)return!0;return!1}new WeakMap;const Gn=["january","february","march","april","may","june","july","august","september","october","november","december"],Xn=Gn.map((e=>e.substr(0,3))),Vn=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Kn=Vn.map((e=>e.substr(0,3)));function Yn(e,t){const n=[];if(t&&void 0!==e.day&&z(e).length>1&&(Hn(function(e){return`Dropping day from datetime ${x(e)} as day cannot be combined with other units.`}(e)),delete(e=b(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){const i=t?function(e){if(ie(e)&&(e=+e),(0,r.hj)(e))return e-1;{const t=e.toLowerCase(),n=Gn.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=Xn.indexOf(i);if(-1!==r)return r;throw new Error(qn("month",e))}}(e.month):e.month;n.push(i)}else if(void 0!==e.quarter){const i=t?function(e){if(ie(e)&&(e=+e),(0,r.hj)(e))return e>4&&Hn(qn("quarter",e)),e-1;throw new Error(qn("quarter",e))}(e.quarter):e.quarter;n.push((0,r.hj)(i)?3*i:i+"*3")}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){const i=t?function(e){if(ie(e)&&(e=+e),(0,r.hj)(e))return e%7;{const t=e.toLowerCase(),n=Vn.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=Kn.indexOf(i);if(-1!==r)return r;throw new Error(qn("day",e))}}(e.day):e.day;n.push((0,r.hj)(i)?i+1:i+"+1")}else n.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const i=e[t];n.push(void 0===i?0:i)}return n}function Qn(e){const t=Yn(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const Zn={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},ei=z(Zn);function ti(e){return e.startsWith("utc")}const ni={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function ii(e){const t=[];for(const n of ei)ri(e,n)&&t.push(n);return t}function ri(e,t){const n=e.indexOf(t);return!(n<0||n>0&&"seconds"===t&&"i"===e.charAt(n-1)||e.length>n+3&&"day"===t&&"o"===e.charAt(n+3)||n>0&&"year"===t&&"f"===e.charAt(n-1))}function oi(e){if(!e)return;const t=ii(e);return`timeUnitSpecifier(${l()(t)}, ${l()(ni)})`}function ai(e){if(!e)return;let t;return(0,r.HD)(e)?t={unit:e}:(0,r.Kn)(e)&&(t=Object.assign(Object.assign({},e),e.unit?{unit:e.unit}:{})),ti(t.unit)&&(t.utc=!0,t.unit=t.unit.substr(3)),t}function si(e){return e&&!!e.signal}function ci(e){return!!e.step}function ui(e){return!(0,r.kJ)(e)&&"field"in e&&"data"in e}const li=z({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),fi={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},di=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function pi(e){return e&&!!e.field&&void 0!==e.equal}function gi(e){return e&&!!e.field&&void 0!==e.lt}function mi(e){return e&&!!e.field&&void 0!==e.lte}function hi(e){return e&&!!e.field&&void 0!==e.gt}function bi(e){return e&&!!e.field&&void 0!==e.gte}function vi(e){if(e&&e.field){if((0,r.kJ)(e.range)&&2===e.range.length)return!0;if(si(e.range))return!0}return!1}function yi(e){return e&&!!e.field&&((0,r.kJ)(e.oneOf)||(0,r.kJ)(e.in))}function xi(e){return yi(e)||pi(e)||vi(e)||gi(e)||hi(e)||mi(e)||bi(e)}function Oi(e,t){return Go(e,{timeUnit:t,wrapTime:!0})}function ji(e,t=!0){var n;const{field:i}=e,r=null===(n=ai(e.timeUnit))||void 0===n?void 0:n.unit,o=r?"time("+function(e,t,{end:n}={end:!1}){const i=I(t),r=ti(e)?"utc":"";let o;const a={};for(const t of ei)ri(e,t)&&(a[t]="quarter"===(s=t)?`(${r}quarter(${i})-1)`:`${r}${s}(${i})`,o=t);var s;return n&&(a[o]+="+1"),function(e){const t=Yn(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(a)}(r,i)+")":$o(e,{expr:"datum"});if(pi(e))return o+"==="+Oi(e.equal,r);if(gi(e))return`${o}<${Oi(e.lt,r)}`;if(hi(e))return`${o}>${Oi(e.gt,r)}`;if(mi(e))return`${o}<=${Oi(e.lte,r)}`;if(bi(e))return`${o}>=${Oi(e.gte,r)}`;if(yi(e))return`indexof([${function(e,t){return e.map((e=>Oi(e,t)))}(e.oneOf,r).join(",")}], ${o}) !== -1`;if(function(e){return e&&!!e.field&&void 0!==e.valid}(e))return wi(o,e.valid);if(vi(e)){const{range:n}=e,i=si(n)?{signal:`${n.signal}[0]`}:n[0],a=si(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==i&&null!==a&&t)return"inrange("+o+", ["+Oi(i,r)+", "+Oi(a,r)+"])";const s=[];return null!==i&&s.push(`${o} >= ${Oi(i,r)}`),null!==a&&s.push(`${o} <= ${Oi(a,r)}`),s.length>0?s.join(" && "):"true"}throw new Error(`Invalid field predicate: ${JSON.stringify(e)}`)}function wi(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function Di(e){var t;return xi(e)&&e.timeUnit?Object.assign(Object.assign({},e),{timeUnit:null===(t=ai(e.timeUnit))||void 0===t?void 0:t.unit}):e}const Ai={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"},ki=Ai.quantitative,Fi=Ai.ordinal,Ci=Ai.temporal,$i=Ai.nominal,Si=Ai.geojson;z(Ai);const Ei="linear",Bi="time",Pi="utc",_i="point",zi={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function Ni(e,t){const n=zi[e],i=zi[t];return n===i||"ordinal-position"===n&&"time"===i||"ordinal-position"===i&&"time"===n}z(zi);const Mi={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function Ti(e){return Mi[e]}const Li=["linear","log","pow","sqrt","symlog","time","utc"],qi=(0,r.Rg)(Li),Ri=(0,r.Rg)(["linear","log","pow","sqrt","symlog"]),Wi=(0,r.Rg)(["quantile","quantize","threshold"]),Ii=Li.concat(["quantile","quantize","threshold","sequential","identity"]),Ui=(0,r.Rg)(Ii),Hi=(0,r.Rg)(["ordinal","bin-ordinal","point","band"]);function Ji(e){return e in Hi}function Gi(e){return e in Ui}function Xi(e){return e in qi}function Vi(e){return e in Wi}function Ki(e){return null==e?void 0:e.selection}const Yi={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:Qi,domain:Zi,range:er,rangeMax:tr,rangeMin:nr,scheme:ir}=(z(Yi),Yi),rr=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rL(`${"unit"===e?"":`_${e}_`}${i[e]}`))).join(""):(n?"utc":"")+"timeunit"+z(i).map((e=>L(`_${e}_${i[e]}`))).join("")}(f),s=(!w(["range","mid"],t.binSuffix)&&t.binSuffix||"")+(null!==(r=t.suffix)&&void 0!==r?r:""))}a&&(o=o?`${a}_${o}`:a)}return s&&(o=`${o}_${s}`),a&&(o=`${a}_${o}`),t.forAs?X(o):t.expr?U(o,t.expr)+c:J(o)+c}function So(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return ho(e)&&!!e.bin;case"temporal":return!1}throw new Error(Cn(e.type))}function Eo(e){return!So(e)}const Bo=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(me(t))return`${r} for argmax(${t.argmax})`;if(ge(t))return`${r} for argmin(${t.argmin})`;const o=ai(i),a=t||(null==o?void 0:o.unit)||(null==o?void 0:o.maxbins)&&"timeunit"||dn(n)&&"bin";return a?a.toUpperCase()+"("+r+")":r}(e);default:return function(e,t){var n;const{field:i,bin:r,timeUnit:o,aggregate:a}=e;if("count"===a)return t.countTitle;if(dn(r))return`${i} (binned)`;if(o){const e=null===(n=ai(o))||void 0===n?void 0:n.unit;if(e)return`${i} (${ii(e).join("-")})`}else if(a)return me(a)?`${i} for max ${a.argmax}`:ge(a)?`${i} for min ${a.argmin}`:`${W(a)} of ${i}`;return i}(e,t)}};let Po=Bo;function _o(e){Po=e}function zo(e,t,{allowDisabling:n,includeDefault:i=!0}){var r,o;const a=null===(r=No(e))||void 0===r?void 0:r.title;if(!ho(e))return a;const s=e,c=i?Mo(s,t):void 0;return n?K(a,s.title,c):null!==(o=null!=a?a:s.title)&&void 0!==o?o:c}function No(e){return Ao(e)&&e.axis?e.axis:ko(e)&&e.legend?e.legend:oo(e)&&e.header?e.header:void 0}function Mo(e,t){return Po(e,t)}function To(e){var t;if(Fo(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const n=null!==(t=No(e))&&void 0!==t?t:{},{format:i,formatType:r}=n;return{format:i,formatType:r}}}function Lo(e){return ho(e)?e:go(e)?e.condition:void 0}function qo(e){return Oo(e)?e:mo(e)?e.condition:void 0}function Ro(e,t,n,i={}){return(0,r.HD)(e)||(0,r.hj)(e)||(0,r.jn)(e)?(Hn(function(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${x(n)}}.`}(t,(0,r.HD)(e)?"string":(0,r.hj)(e)?"number":"boolean",e)),{value:e}):Oo(e)?Wo(e,t,n,i):mo(e)?Object.assign(Object.assign({},e),{condition:Wo(e.condition,t,n,i)}):e}function Wo(e,t,n,i){if(Fo(e)){const{format:r,formatType:o}=e,a=so(e,["format","formatType"]);if(Rr(o)&&!n.customFormatTypes)return Hn(Fn(t)),Wo(a,t,n,i)}else{const r=Ao(e)?"axis":ko(e)?"legend":oo(e)?"header":null;if(r&&e[r]){const o=e[r],{format:a,formatType:s}=o,c=so(o,["format","formatType"]);if(Rr(s)&&!n.customFormatTypes)return Hn(Fn(t)),Wo(Object.assign(Object.assign({},e),{[r]:c}),t,n,i)}}return ho(e)?Io(e,t,i):function(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=(0,r.hj)(n)?"quantitative":(0,r.HD)(n)?"nominal":Jn(n)?"temporal":void 0,Object.assign(Object.assign({},e),{type:t})}(e)}function Io(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:o,bin:a,field:s}=e,c=Object.assign({},e);if(n||!i||he(i)||me(i)||ge(i)||(Hn(function(e){return`Invalid aggregation operator "${e}".`}(i)),delete c.aggregate),o&&(c.timeUnit=ai(o)),s&&(c.field=`${s}`),dn(a)&&(c.bin=Uo(a,t)),pn(a)&&!It(t)&&Hn(function(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),jo(c)){const{type:e}=c,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case ki:return"quantitative";case"t":case Ci:return"temporal";case"o":case Fi:return"ordinal";case"n":case $i:return"nominal";case Si:return"geojson"}}(e);e!==t&&(c.type=t),"quantitative"!==e&&ve(i)&&(Hn(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,i)),c.type="quantitative")}else if(!jt(t)){const e=function(e,t){var n;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(uo(e)&&(0,r.kJ)(e.sort))return"ordinal";const{aggregate:i,bin:o,timeUnit:a}=e;if(a)return"temporal";if(o||i&&!me(i)&&!ge(i))return"quantitative";if(Do(e)&&(null===(n=e.scale)||void 0===n?void 0:n.type))switch(zi[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(c,t);c.type=e}if(jo(c)){const{compatible:e,warning:n}=function(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case je:case we:case De:return Eo(e)?{compatible:!1,warning:Bn(t)}:Ho;case Ae:case ke:case Me:case Te:case Le:case Xe:case Ke:case Ye:case Qe:case Ze:case et:case We:case Ee:case $e:case tt:return Ho;case _e:case Ne:case Pe:case ze:return n!==ki?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:Ho;case Ie:case Ue:case He:case Je:case Re:case Be:case Se:case Fe:case Ce:return"nominal"!==n||e.sort?Ho:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case Ge:return w(["ordinal","nominal"],e.type)?Ho:{compatible:!1,warning:"StrokeDash channel should be used with only discrete data."};case qe:return w(["ordinal","nominal","geojson"],e.type)?Ho:{compatible:!1,warning:"Shape channel should be used with only either discrete or geojson data."};case Ve:return"nominal"!==e.type||"sort"in e?Ho:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(c,t)||{};!1===e&&Hn(n)}if(uo(c)&&(0,r.HD)(c.sort)){const{sort:e}=c;if(eo(e))return Object.assign(Object.assign({},c),{sort:{encoding:e}});const t=e.substr(1);if("-"===e.charAt(0)&&eo(t))return Object.assign(Object.assign({},c),{sort:{encoding:t,order:"descending"}})}if(oo(c)){const{header:e}=c,{orient:t}=e,n=so(e,["orient"]);if(t)return Object.assign(Object.assign({},c),{header:Object.assign(Object.assign({},n),{labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t})})}return c}function Uo(e,t){return(0,r.jn)(e)?{maxbins:hn(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:Object.assign(Object.assign({},e),{maxbins:hn(t)})}const Ho={compatible:!0};function Jo(e){const{formatType:t}=To(e);return"time"===t||!t&&(n=e)&&("temporal"===n.type||ho(n)&&!!n.timeUnit);var n}function Go(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:o}){var a;const s=t&&(null===(a=ai(t))||void 0===a?void 0:a.unit);let c,u=s||"temporal"===n;return cr(e)?c=e.expr:si(e)?c=e.signal:Jn(e)?(u=!0,c=Qn(e)):((0,r.HD)(e)||(0,r.hj)(e))&&u&&(c=`datetime(${JSON.stringify(e)})`,function(e){return!!Zn[e]}(s)&&((0,r.hj)(e)&&e<1e4||(0,r.HD)(e)&&isNaN(Date.parse(e)))&&(c=Qn({[s]:e}))),c?i&&u?`time(${c})`:c:o?void 0:JSON.stringify(e)}function Xo(e,t){const{type:n}=e;return t.map((t=>{const i=Go(t,{timeUnit:ho(e)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==i?{signal:i}:t}))}function Vo(e,t){return dn(e.bin)?an(t)&&w(["ordinal","nominal"],e.type):(console.warn("Only call this method for binned field defs."),!1)}function Ko(e){const{anchor:t,frame:n,offset:i,orient:r,color:o,subtitleColor:a,subtitleFont:s,subtitleFontSize:c,subtitleFontStyle:u,subtitleFontWeight:l,subtitleLineHeight:f,subtitlePadding:d}=e,p=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{var i;return e.field.push($o(n,t)),e.order.push(null!==(i=n.sort)&&void 0!==i?i:"ascending"),e}),{field:[],order:[]})}function fa(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if(h(t,e))return;n.push(e)})),n}function da(e,t){return h(e,t)||!t?e:e?[...(0,r.IX)(e),...(0,r.IX)(t)].join(", "):t}function pa(e,t){const n=e.value,i=t.value;if(null==n||null===i)return{explicit:e.explicit,value:null};if((Yo(n)||si(n))&&(Yo(i)||si(i)))return{explicit:e.explicit,value:da(n,i)};if(Yo(n)||si(n))return{explicit:e.explicit,value:n};if(Yo(i)||si(i))return{explicit:e.explicit,value:i};if(!(Yo(n)||si(n)||Yo(i)||si(i)))return{explicit:e.explicit,value:fa(n,i)};throw new Error("It should never reach here")}function ga(e){return"mark"in e}class ma{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!ga(e)&&(Cr(t=e.mark)?t.type:t)===this.name;var t}}function ha(e,t){const n=e&&e[t];return!!n&&((0,r.kJ)(n)?D(n,(e=>!!e.field)):ho(n)||go(n))}function ba(e){return D(ft,(t=>{if(ha(e,t)){const n=e[t];if((0,r.kJ)(n))return D(n,(e=>!!e.aggregate));{const e=Lo(n);return e&&!!e.aggregate}}return!1}))}function va(e,t){const n=[],i=[],r=[],o=[],a={};return Oa(e,((s,c)=>{if(ho(s)){const{field:u,aggregate:l,bin:f,timeUnit:d}=s,p=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{if(!xt(a))return Hn(function(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}(a)),o;const s=e[a];if("angle"!==a||"arc"!==t||e.theta||(Hn("Arc marks uses theta channel rather than angle, replacing angle with theta."),a=Ee),!function(e,t,n){const i=function(e,t){return function(e){switch(e){case Me:case Te:case Le:case tt:case Ke:case Ye:case Qe:case Ze:case Ve:case Ie:case Ue:case He:case Je:case De:case je:case we:return sn;case Ae:case ke:case Pe:case _e:return un;case Fe:case Ce:case ze:case Ne:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case Re:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Ge:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case qe:return{point:"always",geoshape:"always"};case Xe:return{text:"always"};case We:return{point:"always",square:"always",text:"always"};case et:return{image:"always"};case Ee:case $e:return{text:"always",arc:"always"};case Be:case Se:return{arc:"always"}}}(e)[t]}(t,n);if(!i)return!1;if("binned"===i){const n=e[t===Fe?Ae:ke];return!!(ho(n)&&ho(e[t])&&pn(n.bin))}return!0}(e,a,t))return Hn(En(a,t)),o;if(a===Re&&"line"===t){const t=Lo(e[a]);if(null==t?void 0:t.aggregate)return Hn("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead."),o}if(a===Me&&(n?"fill"in e:"stroke"in e))return Hn($n("encoding",{fill:"fill"in e,stroke:"stroke"in e})),o;if(a===Ke||a===Ve&&!(0,r.kJ)(s)&&!wo(s)||a===Qe&&(0,r.kJ)(s))s&&(o[a]=(0,r.IX)(s).reduce(((e,t)=>(ho(t)?e.push(Io(t,a)):Hn(Sn(t,a)),e)),[]));else{if(a===Qe&&null===s)o[a]=null;else if(!(ho(s)||vo(s)||wo(s)||po(s)||si(s)))return Hn(Sn(s,a)),o;o[a]=Ro(s,a,i)}return o}),{})}function xa(e,t){const n={};for(const i of z(e)){const r=Ro(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function Oa(e,t,n){if(e)for(const i of z(e)){const o=e[i];if((0,r.kJ)(o))for(const e of o)t.call(n,e,i);else t.call(n,o,i)}}function ja(e,t){return z(t).reduce(((n,i)=>{switch(i){case Ae:case ke:case Ze:case tt:case et:case Fe:case Ce:case Ee:case Be:case $e:case Se:case Pe:case _e:case ze:case Ne:case Xe:case qe:case We:case Qe:return n;case Ve:if("line"===e||"trail"===e)return n;case Ke:case Ye:{const e=t[i];if((0,r.kJ)(e)||ho(e))for(const t of(0,r.IX)(e))t.aggregate||n.push($o(t,{}));return n}case Re:if("trail"===e)return n;case Me:case Te:case Le:case Ie:case Ue:case He:case Ge:case Je:{const e=Lo(t[i]);return e&&!e.aggregate&&n.push($o(e,{})),n}}}),[])}var wa=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const r=i?` of ${Aa(t)}`:"";return{field:e+t.field,type:t.type,title:si(n)?{signal:n+`"${escape(r)}"`}:n+r}})),...C(function(e){const t=[];for(const n of z(e))if(ha(e,n)){const i=e[n],o=(0,r.IX)(i);for(const e of o)ho(e)?t.push(e):go(e)&&t.push(e.condition)}return t}(n).map(Co),O)]}}function Aa(e){const{title:t,field:n}=e;return K(t,n)}function ka(e,t,n,i,o){const{scale:a,axis:s}=n;return({partName:c,mark:u,positionPrefix:l,endPositionPrefix:f,extraEncoding:d={}})=>{const p=Aa(n);return Fa(e,c,o,{mark:u,encoding:Object.assign(Object.assign(Object.assign({[t]:Object.assign(Object.assign(Object.assign({field:l+"_"+n.field,type:n.type},void 0!==p?{title:p}:{}),void 0!==a?{scale:a}:{}),void 0!==s?{axis:s}:{})},(0,r.HD)(f)?{[t+"2"]:{field:f+"_"+n.field}}:{}),i),d)})}}function Fa(e,t,n,i){const{clip:o,color:a,opacity:s}=e,c=e.type;return e[t]||void 0===e[t]&&n[t]?[Object.assign(Object.assign({},i),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[t]),o?{clip:o}:{}),a?{color:a}:{}),s?{opacity:s}:{}),Cr(i.mark)?i.mark:{type:i.mark}),{style:`${c}-${t}`}),(0,r.jn)(e[t])?{}:e[t])})]:[]}function Ca(e,t,n){const{encoding:i}=e,r="vertical"===t?"y":"x",o=i[r],a=i[r+"2"],s=i[r+"Error"],c=i[r+"Error2"];return{continuousAxisChannelDef:$a(o,n),continuousAxisChannelDef2:$a(a,n),continuousAxisChannelDefError:$a(s,n),continuousAxisChannelDefError2:$a(c,n),continuousAxis:r}}function $a(e,t){if(e&&e.aggregate){const{aggregate:n}=e,i=wa(e,["aggregate"]);return n!==t&&Hn(function(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(n,t)),i}return e}function Sa(e,t){const{mark:n,encoding:i}=e,{x:r,y:o}=i;if(Cr(n)&&n.orient)return n.orient;if(yo(r)){if(yo(o)){const e=ho(r)&&r.aggregate,n=ho(o)&&o.aggregate;if(e||n!==t){if(n||e!==t){if(e===t&&n===t)throw new Error("Both x and y cannot have aggregate");return Jo(o)&&!Jo(r)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(yo(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}var Ea=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rka(l,v,b,e,t.boxplot),S=$(C),E=$(j),B=$(Object.assign(Object.assign({},C),F?{size:F}:{})),P=Da([{fieldPrefix:"min-max"===p?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===p?"lower_whisker_":"min_",titlePrefix:"Min"}],b,j),z={type:"tick",color:"black",opacity:1,orient:w,invalid:null,aria:!1},N="min-max"===p?P:Da([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],b,j),M=[...S({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:N}),...S({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:N}),...S({partName:"ticks",mark:z,positionPrefix:"lower_whisker",extraEncoding:N}),...S({partName:"ticks",mark:z,positionPrefix:"upper_whisker",extraEncoding:N})],T=[..."tukey"!==p?M:[],...E({partName:"box",mark:Object.assign(Object.assign({type:"bar"},d?{size:d}:{}),{orient:D,invalid:null,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:P}),...B({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},(0,r.Kn)(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{}),d?{size:d}:{}),{orient:w,aria:!1}),positionPrefix:"mid_box",extraEncoding:P})];if("min-max"===p)return Object.assign(Object.assign({},u),{transform:(null!==(i=u.transform)&&void 0!==i?i:[]).concat(h),layer:T});const L=`datum["lower_box_${b.field}"]`,q=`datum["upper_box_${b.field}"]`,R=`(${q} - ${L})`,W=`${L} - ${f} * ${R}`,I=`${q} + ${f} * ${R}`,U=`datum["${b.field}"]`,H={joinaggregate:Na(b.field),groupby:x},J={transform:[{filter:`(${W} <= ${U}) && (${U} <= ${I})`},{aggregate:[{op:"min",field:b.field,as:"lower_whisker_"+b.field},{op:"max",field:b.field,as:"upper_whisker_"+b.field},{op:"min",field:"lower_box_"+b.field,as:"lower_box_"+b.field},{op:"max",field:"upper_box_"+b.field,as:"upper_box_"+b.field},...O],groupby:x}],layer:M},{tooltip:G}=C,X=Ea(C,["tooltip"]),{scale:V,axis:K}=b,Y=Aa(b),Q=y(K,["title"]),Z=Fa(l,"outliers",t.boxplot,{transform:[{filter:`(${U} < ${W}) || (${U} > ${I})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[v]:Object.assign(Object.assign(Object.assign({field:b.field,type:b.type},void 0!==Y?{title:Y}:{}),void 0!==V?{scale:V}:{}),_(Q)?{}:{axis:Q})},X),k?{color:k}:{}),A?{tooltip:A}:{})})[0];let ee;const te=[...g,...m,H];return Z?ee={transform:te,layer:[Z,J]}:(ee=J,ee.transform.unshift(...te)),Object.assign(Object.assign({},u),{layer:[ee,{transform:h,layer:T}]})}function Na(e){return[{op:"q1",field:e,as:"lower_box_"+e},{op:"q3",field:e,as:"upper_box_"+e}]}var Ma=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r1?{layer:g}:Object.assign({},g[0]))}function Ra(e,t,n){var i;const{mark:r,encoding:o,selection:a,projection:s}=e,c=Ma(e,["mark","encoding","selection","projection"]),u=Cr(r)?r:{type:r};a&&Hn(Dn(t));const{orient:l,inputType:f}=function(e,t){const{encoding:n}=e;if(function(e){return(Oo(e.x)||Oo(e.y))&&!Oo(e.x2)&&!Oo(e.y2)&&!Oo(e.xError)&&!Oo(e.xError2)&&!Oo(e.yError)&&!Oo(e.yError2)}(n))return{orient:Sa(e,t),inputType:"raw"};const i=function(e){return Oo(e.x2)||Oo(e.y2)}(n),r=function(e){return Oo(e.xError)||Oo(e.xError2)||Oo(e.yError)||Oo(e.yError2)}(n),o=n.x,a=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=n.x2,i=n.y2;if(Oo(e)&&Oo(i))throw new Error(`${t} cannot have both x2 and y2`);if(Oo(e)){if(yo(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(Oo(i)){if(yo(a))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=n.xError,i=n.xError2,r=n.yError,s=n.yError2;if(Oo(i)&&!Oo(e))throw new Error(`${t} cannot have xError2 without xError`);if(Oo(s)&&!Oo(r))throw new Error(`${t} cannot have yError2 without yError`);if(Oo(e)&&Oo(r))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(Oo(e)){if(yo(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Oo(r)){if(yo(a))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:d,continuousAxisChannelDef2:p,continuousAxisChannelDefError:g,continuousAxisChannelDefError2:m,continuousAxis:h}=Ca(e,l,t),{errorBarSpecificAggregate:b,postAggregateCalculates:v,tooltipSummary:y,tooltipTitleWithFieldName:x}=function(e,t,n,i,r,o,a,s){let c=[],u=[];const l=t.field;let f,d=!1;if("raw"===o){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":s.errorbar.center,n=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===n)&&Hn(function(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}(t,n,a)),"stderr"===n||"stdev"===n)c=[{op:n,field:l,as:"extent_"+l},{op:t,field:l,as:"center_"+l}],u=[{calculate:`datum["center_${l}"] + datum["extent_${l}"]`,as:"upper_"+l},{calculate:`datum["center_${l}"] - datum["extent_${l}"]`,as:"lower_"+l}],f=[{fieldPrefix:"center_",titlePrefix:W(t)},{fieldPrefix:"upper_",titlePrefix:Wa(t,n,"+")},{fieldPrefix:"lower_",titlePrefix:Wa(t,n,"-")}],d=!0;else{let e,t,i;"ci"===n?(e="mean",t="ci0",i="ci1"):(e="median",t="q1",i="q3"),c=[{op:t,field:l,as:"lower_"+l},{op:i,field:l,as:"upper_"+l},{op:e,field:l,as:"center_"+l}],f=[{fieldPrefix:"upper_",titlePrefix:zo({field:l,aggregate:i,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:zo({field:l,aggregate:t,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:zo({field:l,aggregate:e,type:"quantitative"},s,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&Hn((p=e.center,`${(g=e.extent)?"extent ":""}${g&&p?"and ":""}${p?"center ":""}${g&&p?"are ":"is "}not needed when data are aggregated.`)),"aggregated-upper-lower"===o?(f=[],u=[{calculate:`datum["${n.field}"]`,as:"upper_"+l},{calculate:`datum["${l}"]`,as:"lower_"+l}]):"aggregated-error"===o&&(f=[{fieldPrefix:"",titlePrefix:l}],u=[{calculate:`datum["${l}"] + datum["${i.field}"]`,as:"upper_"+l}],r?u.push({calculate:`datum["${l}"] + datum["${r.field}"]`,as:"lower_"+l}):u.push({calculate:`datum["${l}"] - datum["${i.field}"]`,as:"lower_"+l}));for(const e of u)f.push({fieldPrefix:e.as.substring(0,6),titlePrefix:G(G(e.calculate,'datum["',""),'"]',"")})}var p,g;return{postAggregateCalculates:u,errorBarSpecificAggregate:c,tooltipSummary:f,tooltipTitleWithFieldName:d}}(u,d,p,g,m,f,t,n),O=o,j=h,w=(O[j],"x"===h?"x2":"y2"),D=(O[w],"x"===h?"xError":"yError"),A=(O[D],"x"===h?"xError2":"yError2"),k=(O[A],Ma(O,["symbol"==typeof j?j:j+"","symbol"==typeof w?w:w+"","symbol"==typeof D?D:D+"","symbol"==typeof A?A:A+""])),{bins:F,timeUnits:C,aggregate:$,groupby:S,encoding:E}=va(k,n),B=[...$,...b],P="raw"!==f?[]:S,_=Da(y,d,E,x);return{transform:[...null!==(i=c.transform)&&void 0!==i?i:[],...F,...C,...0===B.length?[]:[{aggregate:B,groupby:P}],...v],groupby:P,continuousAxisChannelDef:d,continuousAxis:h,encodingWithoutContinuousAxis:E,ticksOrient:"vertical"===l?"horizontal":"vertical",markDef:u,outerSpec:c,tooltipEncoding:_}}function Wa(e,t,n){return W(e)+" "+n+" "+t}const Ia="errorband",Ua=new ma(Ia,Ha);function Ha(e,{config:t}){e=Object.assign(Object.assign({},e),{encoding:xa(e.encoding,t)});const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,markDef:a,outerSpec:s,tooltipEncoding:c}=Ra(e,Ia,t),u=a,l=ka(u,r,i,o,t.errorband),f=void 0!==e.encoding.x&&void 0!==e.encoding.y;let d={type:f?"area":"rect"},p={type:f?"line":"rule"};const g=Object.assign(Object.assign({},u.interpolate?{interpolate:u.interpolate}:{}),u.tension&&u.interpolate?{tension:u.tension}:{});return f?(d=Object.assign(Object.assign(Object.assign({},d),g),{ariaRoleDescription:"errorband"}),p=Object.assign(Object.assign(Object.assign({},p),g),{aria:!1})):u.interpolate?Hn(Rn("interpolate")):u.tension&&Hn(Rn("tension")),Object.assign(Object.assign({},s),{transform:n,layer:[...l({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c}),...l({partName:"borders",mark:p,positionPrefix:"lower",extraEncoding:c}),...l({partName:"borders",mark:p,positionPrefix:"upper",extraEncoding:c})]})}const Ja={};function Ga(e,t,n){const i=new ma(e,t);Ja[e]={normalizer:i,parts:n}}Ga(Ba,za,["box","median","outliers","rule","ticks"]),Ga(Ta,qa,["ticks","rule"]),Ga(Ia,Ha,["band","borders"]);const Xa=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Va={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},Ka={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Ya=z(Va),Qa=z(Ka),Za=z({header:1,headerRow:1,headerColumn:1,headerFacet:1}),es=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],ts={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1};z(ts);var ns=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function as(e){return!(!e||"legend"!==e&&!e.legend)}function ss(e){return as(e)&&(0,r.Kn)(e)}function cs(e){return"concat"in e}function us(e){return"vconcat"in e}function ls(e){return"hconcat"in e}function fs(e){return(0,r.Kn)(e)&&void 0!==e.step}function ds(e){return e.view||e.width||e.height}const ps=z({align:1,bounds:1,center:1,columns:1,spacing:1});function gs(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e["width"===t?"continuousWidth":"continuousHeight"]}function ms(e,t){const n=hs(e,t);return fs(n)?n.step:bs}function hs(e,t){var n;return K(null!==(n=e[t])&&void 0!==n?n:e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const bs=20,vs={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:bs},mark:{color:"#4c78a8",invalid:"filter",timeUnitBand:1},arc:{},area:{},bar:{binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},circle:{},geoshape:{},image:{},line:{},point:{},rect:{binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5},rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:os,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},ys=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],xs={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Os={blue:ys[0],orange:ys[1],red:ys[2],teal:ys[3],green:ys[4],yellow:ys[5],purple:ys[6],pink:ys[7],brown:ys[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function js(e){const t=z(e||{}),n={};for(const i of t){const t=e[i];n[i]=oe(t)?Zo(t):ea(t)}return n}const ws=[...Er,...fe,...Za,"background","padding","legend","lineBreak","scale","style","title","view"];function Ds(e={}){const{color:t,font:n,fontSize:i}=e,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{if("tooltip"!==n&&ha(t,n)){const i=t[n];for(const t of(0,r.IX)(i)){const i=Lo(t);if(i.aggregate)continue;const r=$o(i,{});r&&r===l||e.push({channel:n,fieldDef:i})}}return e}),[]);let d;if(void 0!==a.stack?d=(0,r.jn)(a.stack)?a.stack?"zero":null:a.stack:f.length>0&&Bs.has(i)&&(d="zero"),!d||!(d in Ss))return null;var p;if(ba(t)&&0===f.length)return null;if(a.scale&&a.scale.type&&a.scale.type!==Ei){if(n.disallowNonLinearStack)return null;Hn(function(e){return`Cannot stack non-linear scale (${e}).`}(a.scale.type))}return Oo(t[At(o)])?(void 0!==a.stack&&Hn(`Cannot stack "${p=o}" if there is already "${p}2".`),null):(ho(a)&&a.aggregate&&!w(ye,a.aggregate)&&Hn(`Stacking is applied even though the aggregate function is non-summative ("${a.aggregate}").`),{groupbyChannel:u?c:void 0,groupbyField:l,fieldChannel:o,impute:null!==a.impute&&Ar(i),stackBy:f,offset:d})}var zs=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r1?i:i.type}function Ms(e){for(const t of["line","area","rule","trail"])e[t]&&(e=Object.assign(Object.assign({},e),{[t]:y(e[t],["point","line"])}));return e}function Ts(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?(0,r.Kn)(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?(0,r.Kn)(t.point)?t.point:{}:void 0}function Ls(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class qs{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if(ga(e)){const{mark:n,encoding:i}=e,r=Cr(n)?n:{type:n};switch(r.type){case"line":case"rule":case"trail":return!!Ts(r,t[r.type],i);case"area":return!!Ts(r,t[r.type],i)||!!Ls(r,t[r.type])}}return!1}run(e,t,n){const{config:i}=t,{selection:r,projection:o,mark:a,encoding:s}=e,c=zs(e,["selection","projection","mark","encoding"]),u=xa(s,i),l=Cr(a)?a:{type:a},f=Ts(l,i[l.type],u),d="area"===l.type&&Ls(l,i[l.type]),p=[Object.assign(Object.assign({},r?{selection:r}:{}),{mark:Ns(Object.assign(Object.assign({},"area"===l.type&&void 0===l.opacity&&void 0===l.fillOpacity?{opacity:.7}:{}),l)),encoding:y(u,["shape"])})],g=_s(l,u);let m=u;if(g){const{fieldChannel:e,offset:t}=g;m=Object.assign(Object.assign({},u),{[e]:Object.assign(Object.assign({},u[e]),t?{stack:t}:{})})}return d&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"line"},v(l,["clip","interpolate","tension","tooltip"])),d),encoding:m})),f&&p.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},v(l,["clip","tooltip"])),f),encoding:m})),n(Object.assign(Object.assign({},c),{layer:p}),Object.assign(Object.assign({},t),{config:Ms(i)}))}}var Rs=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rXs(e,t))).filter((e=>e));else{const e=Xs(o,t);void 0!==e&&(n[i]=e)}}return n}class Ks{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(ga(e)){const{encoding:t,mark:n}=e;if("line"===n)for(const e of Ot){const n=t[wt(e)];if(t[e]&&(ho(n)&&!pn(n.bin)||vo(n)))return!0}}return!1}run(e,t,n){const{encoding:i}=e;var r,o;return Hn((r=!!i.x2,o=!!i.y2,`Line mark is for continuous lines and thus cannot be used with ${r&&o?"x2 and y2":r?"x2":"y2"}. We will use the rule mark (line segments) instead.`)),n(Object.assign(Object.assign({},e),{mark:"rule"}),t)}}var Ys=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rthis.mapLayerOrUnit(e,t)))})}mapHConcat(e,t){return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map((e=>this.map(e,t)))})}mapVConcat(e,t){return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map((e=>this.map(e,t)))})}mapConcat(e,t){const{concat:n}=e,i=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rthis.map(e,t)))})}mapFacet(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}mapRepeat(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}}{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Pa,La,Ua,new qs,new Ks,new Ws]}map(e,t){if(ga(e)){const n=ha(e.encoding,je),i=ha(e.encoding,we),r=ha(e.encoding,De);if(n||i||r)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:n,parentProjection:i}=t,r=Us(e.encoding,t.repeater),o=Object.assign(Object.assign({},e),r?{encoding:r}:{});if(n||i)return this.mapUnitWithParentEncodingOrProjection(o,t);const a=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(o,t.config))return e.run(o,t,a);return o}mapRepeat(e,t){return function(e){return!(0,r.kJ)(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:n,spec:i}=e,r=Ys(e,["repeat","spec"]),{row:o,column:a,layer:s}=n,{repeater:c={},repeaterPrefix:u=""}=t;return o||a?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),a?{column:a}:{}),spec:{repeat:{layer:s},spec:i}}),t):Object.assign(Object.assign({},r),{layer:s.map((e=>{const n=Object.assign(Object.assign({},c),{layer:e}),r=(i.name||"")+u+`child__layer_${L(e)}`,o=this.mapLayerOrUnit(i,Object.assign(Object.assign({},t),{repeater:n,repeaterPrefix:r}));return o.name=r,o}))})}mapNonLayerRepeat(e,t){var n;const{repeat:i,spec:o,data:a}=e,s=Ys(e,["repeat","spec","data"]);!(0,r.kJ)(i)&&e.columns&&(e=y(e,["columns"]),Hn(An("repeat")));const c=[],{repeater:u={},repeaterPrefix:l=""}=t,f=!(0,r.kJ)(i)&&i.row||[u?u.row:null],d=!(0,r.kJ)(i)&&i.column||[u?u.column:null],p=(0,r.kJ)(i)&&i||[u?u.repeat:null];for(const e of p)for(const n of f)for(const a of d){const s={repeat:e,row:n,column:a,layer:u.layer},f=(o.name||"")+l+"child__"+((0,r.kJ)(i)?`${L(e)}`:(i.row?`row_${L(n)}`:"")+(i.column?`column_${L(a)}`:"")),d=this.map(o,Object.assign(Object.assign({},t),{repeater:s,repeaterPrefix:f}));d.name=f,c.push(y(d,["data"]))}const g=(0,r.kJ)(i)?e.columns:i.column?i.column.length:1;return Object.assign(Object.assign({data:null!==(n=o.data)&&void 0!==n?n:a,align:"all"},s),{columns:g,concat:c})}mapFacet(e,t){const{facet:n}=e;return ro(n)&&e.columns&&(e=y(e,["columns"]),Hn(An("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:n,projection:i}=e,{parentEncoding:r,parentProjection:o,config:a}=t,s=Zs({parentProjection:o,projection:i}),c=Qs({parentEncoding:r,encoding:Us(n,t.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),s?{projection:s}:{}),c?{encoding:c}:{}),{config:a})}mapFacetedUnit(e,t){const n=e.encoding,{row:i,column:r,facet:o}=n,a=Ys(n,["row","column","facet"]),{mark:s,width:c,projection:u,height:l,view:f,selection:d,encoding:p}=e,g=Ys(e,["mark","width","projection","height","view","selection","encoding"]),{facetMapping:m,layout:h}=this.getFacetMappingAndLayout({row:i,column:r,facet:o},t),b=Us(a,t.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),h),{facet:m,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c?{width:c}:{}),l?{height:l}:{}),f?{view:f}:{}),u?{projection:u}:{}),{mark:s,encoding:b}),d?{selection:d}:{})}),t)}getFacetMappingAndLayout(e,t){var n;const{row:i,column:r,facet:o}=e;if(i||r){o&&Hn(`Facet encoding dropped as ${(a=[...i?[je]:[],...r?[we]:[]]).join(" and ")} ${a.length>1?"are":"is"} also specified.`);const t={},s={};for(const i of[je,we]){const r=e[i];if(r){const{align:e,center:o,spacing:a,columns:c}=r,u=Ys(r,["align","center","spacing","columns"]);t[i]=u;for(const e of["align","center","spacing"])void 0!==r[e]&&(s[e]=null!==(n=s[e])&&void 0!==n?n:{},s[e][i]=r[e])}}return{facetMapping:t,layout:s}}{const{align:e,center:n,spacing:i,columns:r}=o;return{facetMapping:Is(Ys(o,["align","center","spacing","columns"]),t.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},e?{align:e}:{}),n?{center:n}:{}),i?{spacing:i}:{}),r?{columns:r}:{})}}var a}mapLayer(e,t){var{parentEncoding:n,parentProjection:i}=t,r=Ys(t,["parentEncoding","parentProjection"]);const{encoding:o,projection:a}=e,s=Ys(e,["encoding","projection"]),c=Object.assign(Object.assign({},r),{parentEncoding:Qs({parentEncoding:n,encoding:o,layer:!0}),parentProjection:Zs({parentProjection:i,projection:a})});return super.mapLayer(s,c)}};function nc(e){return(0,r.HD)(e)?{type:e}:null!=e?e:{}}const ic=["background","padding"];function rc(e,t){const n={};for(const t of ic)e&&void 0!==e[t]&&(n[t]=ea(e[t]));return t&&(n.params=e.params),n}class oc{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new oc(b(this.explicit),b(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(e){return K(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,t){void 0!==t.value&&this.set(e,t.value,t.explicit)}set(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,t){void 0!==t.explicit[e]?this.set(e,t.explicit[e],!0):void 0!==t.implicit[e]&&this.set(e,t.implicit[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of z(e.combine())){const n=e.getWithExplicit(t);this.setWithExplicit(t,n)}}}function ac(e){return{explicit:!0,value:e}}function sc(e){return{explicit:!1,value:e}}function cc(e){return(t,n,i,r)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:uc(t,n,i,r)}}function uc(e,t,n,i){return e.explicit&&t.explicit&&Hn(function(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${x(n)} and ${x(i)}). Using ${x(n)}.`}(n,i,e.value,t.value)),e}function lc(e,t,n,i,r=uc){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:h(e.value,t.value)?e:r(e,t,n,i)}class fc extends oc{constructor(e={},t={},n=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=n}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function dc(e){return"url"in e}function pc(e){return"values"in e}function gc(e){return"name"in e&&!dc(e)&&!pc(e)&&!mc(e)}function mc(e){return e&&(hc(e)||bc(e)||vc(e))}function hc(e){return"sequence"in e}function bc(e){return"sphere"in e}function vc(e){return"graticule"in e}var yc;function xc(e){return"filter"in e}function Oc(e){return"lookup"in e}function jc(e){return"pivot"in e}function wc(e){return"density"in e}function Dc(e){return"quantile"in e}function Ac(e){return"regression"in e}function kc(e){return"loess"in e}function Fc(e){return"sample"in e}function Cc(e){return"window"in e}function $c(e){return"joinaggregate"in e}function Sc(e){return"flatten"in e}function Ec(e){return"calculate"in e}function Bc(e){return"bin"in e}function Pc(e){return"impute"in e}function _c(e){return"timeUnit"in e}function zc(e){return"aggregate"in e}function Nc(e){return"stack"in e}function Mc(e){return"fold"in e}!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"}(yc||(yc={}));var Tc=n(3082);function Lc(e,t,n,i){const o=po(t)&&t.condition,a=i(t);return o?{[n]:[...(0,r.IX)(o).map((t=>{const n=i(t),r=function(e){return e.selection}(t)?af(e,t.selection):cf(e,t.test);return Object.assign({test:r},n)})),...void 0!==a?[a]:[]]}:void 0!==a?{[n]:a}:{}}function qc(e,t="text"){const n=e.encoding[t];return Lc(e,n,t,(t=>Rc(t,e.config)))}function Rc(e,t,n="datum"){if(e){if(wo(e))return na(e.value);if(Oo(e)){const{format:i,formatType:r}=To(e);return Ir({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function Wc(e,t={}){const{encoding:n,markDef:i,config:o,stack:a}=e,s=n.tooltip;if((0,r.kJ)(s))return{tooltip:Uc({tooltip:s},a,o,t)};{const c=t.reactiveGeom?"datum.datum":"datum";return Lc(e,s,"tooltip",(e=>{const s=Rc(e,o,c);if(s)return s;if(null===e)return;let u=aa("tooltip",i,o);return!0===u&&(u={content:"encoding"}),(0,r.HD)(u)?{value:u}:(0,r.Kn)(u)?si(u)?u:"encoding"===u.content?Uc(n,a,o,t):{signal:c}:void 0}))}}function Ic(e,t,n,{reactiveGeom:i}={}){const o={},a=i?"datum.datum":"datum",s=[];function c(i,c){const u=wt(c),l=jo(i)?i:Object.assign(Object.assign({},i),{type:e[u].type}),f=l.title||Mo(l,n),d=(0,r.IX)(f).join(", ");let p;if(It(c)){const i="x"===c?"x2":"y2",r=Lo(e[i]);if(pn(l.bin)&&r){const e=$o(l,{expr:a}),t=$o(r,{expr:a}),{format:s,formatType:c}=To(l);p=Yr(e,t,s,c,n),o[i]=!0}else if(t&&t.fieldChannel===c&&"normalize"===t.offset){const{format:e,formatType:t}=To(l);p=Ir({fieldOrDatumDef:l,format:e,formatType:t,expr:a,config:n,normalizeStack:!0}).signal}}p=null!=p?p:Rc(l,n,a).signal,s.push({channel:c,key:d,value:p})}Oa(e,((e,t)=>{ho(e)?c(e,t):go(e)&&c(e.condition,t)}));const u={};for(const{channel:e,key:t,value:n}of s)o[e]||u[t]||(u[t]=n);return u}function Uc(e,t,n,{reactiveGeom:i}={}){const r=Ic(e,t,n,{reactiveGeom:i}),o=M(r).map((([e,t])=>`"${e}": ${t}`));return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function Hc(e,t,n={}){const{markDef:i,encoding:r,config:o}=t,{vgChannel:a}=n;let{defaultRef:s,defaultValue:c}=n;void 0===s&&(c=null!=c?c:aa(e,i,o,{vgChannel:a,ignoreVgConfig:!0}),void 0!==c&&(s=na(c)));const u=r[e];return Lc(t,u,null!=a?a:e,(n=>Lr({channel:e,channelDef:n,markDef:i,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:s})))}function Jc(e,t={filled:void 0}){var n,i,r,o;const{markDef:a,encoding:s,config:c}=e,{type:u}=a,l=null!==(n=t.filled)&&void 0!==n?n:aa("filled",a,c),f=w(["bar","point","circle","square","geoshape"],u)?"transparent":void 0,d=null!==(r=null!==(i=aa(!0===l?"color":void 0,a,c,{vgChannel:"fill"}))&&void 0!==i?i:c.mark[!0===l&&"color"])&&void 0!==r?r:f,p=null!==(o=aa(!1===l?"color":void 0,a,c,{vgChannel:"stroke"}))&&void 0!==o?o:c.mark[!1===l&&"color"],g=l?"fill":"stroke",m=Object.assign(Object.assign({},d?{fill:na(d)}:{}),p?{stroke:na(p)}:{});return a.color&&(l?a.fill:a.stroke)&&Hn($n("property",{fill:"fill"in a,stroke:"stroke"in a})),Object.assign(Object.assign(Object.assign(Object.assign({},m),Hc("color",e,{vgChannel:g,defaultValue:l?d:p})),Hc("fill",e,{defaultValue:s.fill?d:void 0})),Hc("stroke",e,{defaultValue:s.stroke?p:void 0}))}function Gc(e,t){const n=t[function(e){switch(e){case Ae:return"xOffset";case ke:return"yOffset";case Fe:return"x2Offset";case Ce:return"y2Offset";case Ee:return"thetaOffset";case $e:return"radiusOffset";case Be:return"theta2Offset";case Se:return"radius2Offset"}}(e)];if(n)return n}function Xc(e,t,{defaultPos:n,vgChannel:i,isMidPoint:r}){const{encoding:o,markDef:a,config:s,stack:c}=t,u=o[e],l=o[At(e)],f=t.scaleName(e),d=t.getScaleComponent(e),p=Gc(e,a),g=Vc({model:t,defaultPos:n,channel:e,scaleName:f,scale:d}),m=!u&&It(e)&&(o.latitude||o.longitude)?{field:t.getName(e)}:function(e){const{channel:t,channelDef:n,isMidPoint:i,scaleName:r,stack:o,offset:a,markDef:s,config:c}=e;if(Oo(n)&&o&&t===o.fieldChannel){if(ho(n)){const e=lo({channel:t,fieldDef:n,isMidPoint:i,markDef:s,stack:o,config:c});if(void 0!==e)return Tr({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",band:e,offset:a})}return Mr(n,r,{suffix:"end"},{offset:a})}return Pr(e)}({channel:e,channelDef:u,channel2Def:l,markDef:a,config:s,isMidPoint:r,scaleName:f,scale:d,stack:c,offset:p,defaultRef:g});return m?{[i||e]:m}:void 0}function Vc({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:o,config:a}=e;return()=>{const s=wt(n),c=Dt(n),u=aa(n,o,a,{vgChannel:c});if(void 0!==u)return qr(n,u);switch(t){case"zeroOrMin":case"zeroOrMax":if(i){const e=r.get("type");if(w(["log",Bi,Pi],e));else if(r.domainDefinitelyIncludesZero())return{scale:i,value:0}}if("zeroOrMin"===t)return"y"===s?{field:{group:"height"}}:{value:0};switch(s){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const t=e[kt(n)];return Object.assign(Object.assign({},t),{mult:.5})}}}}const Kc={left:"x",center:"xc",right:"x2"},Yc={top:"y",middle:"yc",bottom:"y2"};function Qc(e,t,n,i="middle"){if("radius"===e||"theta"===e)return Dt(e);const r="x"===e?"align":"baseline",o=aa(r,t,n);let a;return si(o)?(Hn(function(e){return`The ${e} for range marks cannot be an expression`}(r)),a=void 0):a=o,"x"===e?Kc[a||("top"===i?"left":"center")]:Yc[a||i]}function Zc(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?eu(e,t,{defaultPos:n,defaultPos2:i}):Xc(e,t,{defaultPos:n})}function eu(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:o}=t,a=At(e),s=kt(e),c=function(e,t,n){const{encoding:i,mark:r,markDef:o,stack:a,config:s}=e,c=wt(n),u=kt(n),l=Dt(n),f=i[c],d=e.scaleName(c),p=e.getScaleComponent(c),g=Gc(n in i||n in o?n:c,e.markDef);if(!f&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude))return{[l]:{field:e.getName(n)}};const m=function({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:o,scale:a,stack:s,offset:c,defaultRef:u}){return Oo(t)&&s&&e.charAt(0)===s.fieldChannel.charAt(0)?Mr(t,o,{suffix:"start"},{offset:c}):Pr({channel:e,channelDef:n,scaleName:o,scale:a,stack:s,markDef:i,config:r,offset:c,defaultRef:u})}({channel:n,channelDef:f,channel2Def:i[n],markDef:o,config:s,scaleName:d,scale:p,stack:a,offset:g,defaultRef:void 0});return void 0!==m?{[l]:m}:tu(n,o)||tu(n,{[n]:ca(n,o,s.style),[u]:ca(u,o,s.style)})||tu(n,s[r])||tu(n,s.mark)||{[l]:Vc({model:e,defaultPos:t,channel:n,scaleName:d,scale:p})()}}(t,i,a),u=c[s]?Qc(e,r,o):Dt(e);return Object.assign(Object.assign({},Xc(e,t,{defaultPos:n,vgChannel:u})),c)}function tu(e,t){const n=kt(e),i=Dt(e);return void 0!==t[i]?{[i]:qr(e,t[i])}:void 0!==t[e]?{[i]:qr(e,t[e])}:t[n]?{[n]:qr(e,t[n])}:void 0}function nu(e,t,n){var i,o,a,s;const{config:c,encoding:u,markDef:l,stack:f}=e,d=At(t),p=kt(t),g=u[t],m=u[d],h=e.getScaleComponent(t),b=h?h.get("type"):void 0,v=e.scaleName(t),y=l.orient,x=null!==(o=null!==(i=u[p])&&void 0!==i?i:u.size)&&void 0!==o?o:aa("size",l,c,{vgChannel:p}),O="bar"===n&&("x"===t?"vertical"===y:"horizontal"===y);if(ho(g)&&(dn(g.bin)||pn(g.bin)||g.timeUnit&&!m)&&!x&&!Ji(b)){const n=lo({channel:t,fieldDef:g,stack:f,markDef:l,config:c}),i=null===(a=e.component.axes[t])||void 0===a?void 0:a[0];return function({fieldDef:e,fieldDef2:t,channel:n,band:i,scaleName:r,markDef:o,spacing:a=0,axisTranslate:s,reverse:c,config:u}){const l=At(n),f=Dt(n),d=Dt(l),p=Gc(n,o);if(dn(e.bin)||e.timeUnit)return{[d]:ou({channel:n,fieldDef:e,scaleName:r,markDef:o,band:(1-i)/2,offset:ru(l,a,c,s,p),config:u}),[f]:ou({channel:n,fieldDef:e,scaleName:r,markDef:o,band:1-(1-i)/2,offset:ru(n,a,c,s,p),config:u})};if(pn(e.bin)){const i=Mr(e,r,{},{offset:ru(l,a,c,s,p)});if(ho(t))return{[d]:i,[f]:Mr(t,r,{},{offset:ru(n,a,c,s,p)})};if(gn(e.bin)&&e.bin.step)return{[d]:i,[f]:{signal:`scale("${r}", ${$o(e,{expr:"datum"})} + ${e.bin.step})`,offset:ru(n,a,c,s,p)}}}Hn(Wn(l))}({fieldDef:g,fieldDef2:m,channel:t,markDef:l,scaleName:v,band:n,axisTranslate:null!==(s=null==i?void 0:i.get("translate"))&&void 0!==s?s:.5,spacing:It(t)?aa("binSpacing",l,c):void 0,reverse:h.get("reverse"),config:c})}return(Oo(g)&&Ji(b)||O)&&!m?function(e,t,n,i){var o;const{markDef:a,encoding:s,config:c,stack:u}=i,l=a.orient,f=i.scaleName(n),d=i.getScaleComponent(n),p=kt(n),g=At(n),m="horizontal"===l&&"y"===n||"vertical"===l&&"x"===n,h=aa(m?"size":p,a,c,{vgChannel:p});let b;(s.size||void 0!==h)&&(m?b=Hc("size",i,{vgChannel:p,defaultValue:h}):Hn(function(e){return`Cannot apply size to non-oriented mark "${e}".`}(a.type)));const v=null!==(o=Oo(t)?lo({channel:n,fieldDef:t,markDef:a,stack:u,config:c}):void 0)&&void 0!==o?o:1;b=b||{[p]:iu(e,p,f,d,c,v)};const y="band"!==(null==d?void 0:d.get("type"))||!("band"in b[p]),x=Qc(n,a,c,y?"middle":"top"),O=Gc(n,a),j=Pr({channel:n,channelDef:t,markDef:a,config:c,scaleName:f,scale:d,stack:u,offset:O,defaultRef:Vc({model:i,defaultPos:"mid",channel:n,scaleName:f,scale:d}),band:y?.5:(1-v)/2});if(p)return Object.assign({[x]:j},b);{const e=Dt(g),t=b[p],n=O?Object.assign(Object.assign({},t),{offset:O}):t;return{[x]:j,[e]:(0,r.kJ)(j)?[j[0],Object.assign(Object.assign({},j[1]),{offset:n})]:Object.assign(Object.assign({},j),{offset:n})}}}(n,g,t,e):eu(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function iu(e,t,n,i,o,a){if(i){const t=i.get("type");if("point"===t||"band"===t){if(void 0!==o[e].discreteBandSize)return{value:o[e].discreteBandSize};if(t===_i){const e=i.get("range");return ci(e)&&(0,r.hj)(e.step)?{value:e.step-2}:{value:bs-2}}return{scale:n,band:a}}return{value:o[e].continuousBandSize}}const s=ms(o.view,t),c=K(o[e].discreteBandSize,s-2);return void 0!==c?{value:c}:void 0}function ru(e,t,n,i,r){if(it(e))return 0;const o="x"===e||"y2"===e?-t/2:t/2;if(si(n)||si(r)||si(i)){const e=ra(n),t=ra(r),a=ra(i);return{signal:(a?`${a} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${o})`:o)}}return r=r||0,i+(n?-r-o:+r+o)}function ou({channel:e,fieldDef:t,scaleName:n,markDef:i,band:r,offset:o,config:a}){return _r({fieldDef:t,channel:e,markDef:i,ref:Tr({scaleName:n,fieldOrDatumDef:t,band:r,offset:o}),config:a})}const au=new Set(["aria"]);function su(e,t){const{fill:n,stroke:i}="include"===t.color?Jc(e):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},function(e,t){return li.reduce(((n,i)=>(au.has(i)||void 0===e[i]||"ignore"===t[i]||(n[i]=na(e[i])),n)),{})}(e.markDef,t)),cu(e,"fill",n)),cu(e,"stroke",i)),Hc("opacity",e)),Hc("fillOpacity",e)),Hc("strokeOpacity",e)),Hc("strokeWidth",e)),Hc("strokeDash",e)),function(e){const{encoding:t,mark:n}=e,i=t.order;return!Ar(n)&&wo(i)?Lc(e,i,"zindex",(e=>na(e.value))):{}}(e)),Wc(e)),qc(e,"href")),function(e){const{markDef:t,config:n}=e,i=aa("aria",t,n);return!1===i?{}:Object.assign(Object.assign(Object.assign({},i?{aria:i}:{}),function(e){const{mark:t,markDef:n,config:i}=e;if(!1===i.aria)return{};const r=aa("ariaRoleDescription",n,i);return null!=r?{ariaRoleDescription:{value:r}}:t in fi?{}:{ariaRoleDescription:{value:t}}}(e)),function(e){const{encoding:t,markDef:n,config:i,stack:r}=e,o=t.description;if(o)return Lc(e,o,"description",(t=>Rc(t,e.config)));const a=aa("description",n,i);if(null!=a)return{description:na(a)};if(!1===i.aria)return{};const s=Ic(t,r,i);return _(s)?void 0:{description:{signal:M(s).map((([e,t],n)=>`"${n>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}(e))}(e))}function cu(e,t,n){const{config:i,mark:o,markDef:a}=e;if("hide"===aa("invalid",a,i)&&n&&!Ar(o)){const i=function(e,{invalid:t=!1,channels:n}){const i=n.reduce(((t,n)=>{const i=e.getScaleComponent(n);if(i){const r=i.get("type"),o=e.vgField(n,{expr:"datum"});o&&Gi(r)&&(t[o]=!0)}return t}),{}),r=z(i);if(r.length>0){const e=t?"||":"&&";return r.map((e=>Nr(e,t))).join(` ${e} `)}}(e,{invalid:!0,channels:on});if(i)return{[t]:[{test:i,value:null},...(0,r.IX)(n)]}}return n?{[t]:n}:{}}function uu(e){const{config:t,markDef:n}=e;if(aa("invalid",n,t)){const t=function(e,{invalid:t=!1,channels:n}){const i=n.reduce(((t,n)=>{const i=e.getScaleComponent(n);if(i){const r=i.get("type"),o=e.vgField(n,{expr:"datum"});o&&Gi(r)&&(t[o]=!0)}return t}),{}),r=z(i);if(r.length>0){const e=t?"||":"&&";return r.map((e=>Nr(e,t))).join(` ${e} `)}}(e,{channels:Wt});if(t)return{defined:{signal:t}}}return{}}function lu(e,t){if(void 0!==t)return{[e]:na(t)}}const fu="voronoi",du={has:e=>"interval"!==e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(fu)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,o=e.mark;if(Ar(o))return Hn(`The "nearest" transform is not supported for ${o} marks.`),n;const a={name:e.getName(fu),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},Wc(e,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let s=0,c=!1;return n.forEach(((t,n)=>{var i;const r=null!==(i=t.name)&&void 0!==i?i:"";r===e.component.mark[0].name?s=n:r.indexOf(fu)>=0&&(c=!0)})),c||n.splice(s+1,0,a),n}};class pu{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.indexOf(e)>-1?Hn("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=t,e.parent=this}}class gu extends pu{constructor(e,t,n,i){super(e,t),this.type=n,this.refCounts=i,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName="clone_"+this.debugName,e._source=this._source,e._name="clone_"+this._name,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${Q()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}var mu=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{field:r,timeUnit:o}=n,a=Cp(t)?t.encoding[At(i)]:void 0,s=Cp(t)&&fo(i,n,a,t.stack,t.markDef,t.config);if(o){const t=$o(n,{forAs:!0});e[O({as:t,field:r,timeUnit:o})]=Object.assign({as:t,field:r,timeUnit:o},s?{band:!0}:{})}return e}),{});return _(n)?null:new hu(e,n)}static makeFromTransform(e,t){const n=Object.assign({},t),{timeUnit:i}=n,r=mu(n,["timeUnit"]),o=ai(i),a=Object.assign(Object.assign({},r),{timeUnit:o});return new hu(e,{[O(a)]:a})}merge(e){this.formula=Object.assign({},this.formula);for(const t in e.formula)this.formula[t]&&!e.formula[t].band||(this.formula[t]=e.formula[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[n,i]of M(this.formula))e.has(i.as)||(t[n]=i);this.formula=t}producedFields(){return new Set(N(this.formula).map((e=>e.as)))}dependentFields(){return new Set(N(this.formula).map((e=>e.field)))}hash(){return`TimeUnit ${O(this.formula)}`}assemble(){const e=[];for(const t of N(this.formula)){const{field:n,as:i,timeUnit:r}=t,o=ai(r),{unit:a,utc:s}=o,c=mu(o,["unit","utc"]);e.push(Object.assign(Object.assign(Object.assign(Object.assign({field:J(n),type:"timeunit"},a?{units:ii(a)}:{}),s?{timezone:"utc"}:{}),c),{as:[i,`${i}_end`]}))}return e}}const bu="_tuple_fields";class vu{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const yu={has:e=>"single"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!as(e.bind),parse:(e,t,n,i)=>{i.on||delete t.events,i.clear||delete t.clear},topLevelSignals:(e,t,n)=>{const i=t.name,o=t.project,a=t.bind,s=t.init&&t.init[0],c=du.has(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return o.items.forEach(((e,o)=>{var u,l;const f=L(`${i}_${e.field}`);n.filter((e=>e.name===f)).length||n.unshift(Object.assign(Object.assign({name:f},s?{init:Nu(s[o])}:{value:null}),{on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${c}[${(0,r.m8)(e.field)}] : null`}]:[],bind:null!==(l=null!==(u=a[e.field])&&void 0!==u?u:a[e.channel])&&void 0!==l?l:a}))})),n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.filter((e=>e.name===i+Gu))[0],a=i+bu,s=r.items.map((e=>L(`${i}_${e.field}`))),c=s.map((e=>`${e} !== null`)).join(" && ");return s.length&&(o.update=`${c} ? {fields: ${a}, values: [${s.join(", ")}]} : null`),delete o.value,delete o.on,n}},xu="_toggle",Ou={has:e=>"multi"===e.type&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+xu,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+Gu,i=t.name+xu;return`${i} ? null : ${n}, `+("global"===t.resolve?`${i} ? null : true, `:`${i} ? null : {unit: ${Yu(e)}}, `)+`${i} ? ${n} : null`}},ju={has:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t,n)=>{n.clear&&(t.clear=(0,r.HD)(n.clear)?(0,Tc.n)(n.clear,"scope"):n.clear)},topLevelSignals:(e,t,n)=>{if(yu.has(t))for(const e of t.project.items){const i=n.findIndex((n=>n.name===L(`${t.name}_${e.field}`)));-1!==i&&n[i].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(e,i){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:i})}if("interval"===t.type)for(const e of t.project.items){const t=n.findIndex((t=>t.name===e.signals.visual));i(t,"[0, 0]"),-1===t&&i(n.findIndex((t=>t.name===e.signals.data)),"null")}else{let e=n.findIndex((e=>e.name===t.name+Gu));i(e,"null"),Ou.has(t)&&(e=n.findIndex((e=>e.name===t.name+xu)),i(e,"false"))}return n}},wu={has:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!an(r))continue;const o=e.getScaleComponent(r),a=o?o.get("type"):void 0;if(!o||!Gi(a)){Hn("Scale bindings are currently only supported for scales with unbinned, continuous domains.");continue}const s={selection:t.name,field:i.field};o.set("selectionExtent",s,!0),n.push(i)}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter((e=>0===n.filter((t=>t.name===e.signals.data)).length));if(!e.parent||Au(e)||0===i.length)return n;const o=n.filter((e=>e.name===t.name))[0];let a=o.update;if(a.indexOf(Xu)>=0)o.update=`{${i.map((e=>`${(0,r.m8)(e.field)}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of i){const t=`${(0,r.m8)(e.field)}: ${e.signals.data}`;a.indexOf(t)<0&&(a=`${a.substring(0,a.length-1)}, ${t}}`)}o.update=a}return n.concat(i.map((e=>({name:e.signals.data}))))},signals:(e,t,n)=>{if(e.parent&&!Au(e))for(const e of t.scales){const t=n.filter((t=>t.name===e.signals.data))[0];t.push="outer",delete t.value,delete t.update}return n}};function Du(e,t){return`domain(${(0,r.m8)(e.scaleName(t))})`}function Au(e){var t;return e.parent&&Ep(e.parent)&&(null!==(t=!e.parent.parent)&&void 0!==t?t:Au(e.parent.parent))}const ku={has:e=>{const t="global"===e.resolve&&e.bind&&as(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==rs;return t&&!n&&Hn("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&n},parse:(e,t,n,i)=>{var o;if(i.on||delete t.events,i.clear||delete t.clear,i.on||i.clear){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const n of t.events)n.filter=(0,r.IX)(null!==(o=n.filter)&&void 0!==o?o:[]),n.filter.indexOf(e)<0&&n.filter.push(e)}const a=ss(t.bind)?t.bind.legend:"click",s=(0,r.HD)(a)?(0,Tc.n)(a,"view"):(0,r.IX)(a);t.bind={legend:{merge:s}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=ss(t.bind)&&t.bind.legend,o=e=>t=>{const n=b(t);return n.markname=e,n};for(const e of t.project.items){if(!e.hasLegend)continue;const a=`${L(e.field)}_legend`,s=`${i}_${a}`;if(0===n.filter((e=>e.name===s)).length){const e=r.merge.map(o(`${a}_symbols`)).concat(r.merge.map(o(`${a}_labels`))).concat(r.merge.map(o(`${a}_entries`)));n.unshift(Object.assign(Object.assign({name:s},t.init?{}:{value:null}),{on:[{events:e,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${s}`,force:!0}]}))}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find((e=>e.name===i+Gu)),a=i+bu,s=r.items.filter((e=>e.hasLegend)).map((e=>L(`${i}_${L(e.field)}_legend`))),c=`${s.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${a}, values: [${s.join(", ")}]} : null`;t.events&&s.length>0?o.on.push({events:s.map((e=>({signal:e}))),update:c}):s.length>0&&(o.update=c,delete o.value,delete o.on);const u=n.find((e=>e.name===i+xu)),l=ss(t.bind)&&t.bind.legend;return u&&(t.events?u.on.push(Object.assign(Object.assign({},u.on[0]),{events:l})):u.on[0].events=l),n}},Fu="_translate_anchor",Cu="_translate_delta",$u={has:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const i=t.name,r=wu.has(t),o=i+Fu,{x:a,y:s}=t.project.hasChannel;let c=(0,Tc.n)(t.translate,"scope");return r||(c=c.map((e=>(e.between[0].markname=i+Lu,e)))),n.push({name:o,value:{},on:[{events:c.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==a?", extent_x: "+(r?Du(e,Ae):`slice(${a.signals.visual})`):"")+(void 0!==s?", extent_y: "+(r?Du(e,ke):`slice(${s.signals.visual})`):"")+"}"}]},{name:i+Cu,value:{},on:[{events:c,update:`{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`}]}),void 0!==a&&Su(e,t,a,"width",n),void 0!==s&&Su(e,t,s,"height",n),n}};function Su(e,t,n,i,r){var o;const a=t.name,s=a+Fu,c=a+Cu,u=n.channel,l=wu.has(t),f=r.filter((e=>e.name===n.signals[l?"data":"visual"]))[0],d=e.getSizeSignalRef(i).signal,p=e.getScaleComponent(u),g=p.get("type"),m=`${s}.extent_${u}`,h=`${l?"log"===g?"panLog":"pow"===g?"panPow":"panLinear":"panLinear"}(${m}, ${`${l&&u===Ae?"-":""}${c}.${u} / `+(l?`${d}`:`span(${m})`)}`+(l&&"pow"===g?`, ${null!==(o=p.get("exponent"))&&void 0!==o?o:1}`:"")+")";f.on.push({events:{signal:c},update:l?h:`clampRange(${h}, 0, ${d})`})}const Eu="_zoom_delta",Bu={has:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const i=t.name,o=wu.has(t),a=i+Eu,{x:s,y:c}=t.project.hasChannel,u=(0,r.m8)(e.scaleName(Ae)),l=(0,r.m8)(e.scaleName(ke));let f=(0,Tc.n)(t.zoom,"scope");return o||(f=f.map((e=>(e.markname=i+Lu,e)))),n.push({name:i+"_zoom_anchor",on:[{events:f,update:o?"{"+[u?`x: invert(${u}, x(unit))`:"",l?`y: invert(${l}, y(unit))`:""].filter((e=>!!e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:a,on:[{events:f,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&Pu(e,t,s,"width",n),void 0!==c&&Pu(e,t,c,"height",n),n}};function Pu(e,t,n,i,r){var o;const a=t.name,s=n.channel,c=wu.has(t),u=r.filter((e=>e.name===n.signals[c?"data":"visual"]))[0],l=e.getSizeSignalRef(i).signal,f=e.getScaleComponent(s),d=f.get("type"),p=c?Du(e,s):u.name,g=a+Eu,m=`${c?"log"===d?"zoomLog":"pow"===d?"zoomPow":"zoomLinear":"zoomLinear"}(${p}, ${a}_zoom_anchor.${s}, ${g}`+(c&&"pow"===d?`, ${null!==(o=f.get("exponent"))&&void 0!==o?o:1}`:"")+")";u.on.push({events:{signal:g},update:c?m:`clampRange(${m}, 0, ${l})`})}const _u=[{has:()=>!0,parse:(e,t,n)=>{var i,o,a;const s=t.name,c=null!==(i=t.project)&&void 0!==i?i:t.project=new vu,u={},l={},f=new Set,d=(e,t)=>{const n="visual"===t?e.channel:e.field;let i=L(`${s}_${n}`);for(let e=1;f.has(i);e++)i=L(`${s}_${n}_${e}`);return f.add(i),{[t]:i}};if(!n.fields&&!n.encodings){const t=e.config.selection[n.type];if(n.init)for(const e of(0,r.IX)(n.init))for(const i of z(e))yt[i]?(n.encodings||(n.encodings=[])).push(i):"interval"===n.type?(Hn('Interval selections should be initialized using "x" and/or "y" keys.'),n.encodings=t.encodings):(n.fields||(n.fields=[])).push(i);else n.encodings=t.encodings,n.fields=t.fields}for(const e of null!==(o=n.fields)&&void 0!==o?o:[]){const t={type:"E",field:e};t.signals=Object.assign({},d(t,"data")),c.items.push(t),c.hasField[e]=t}for(const i of null!==(a=n.encodings)&&void 0!==a?a:[]){const n=e.fieldDef(i);if(n){let r=n.field;if(n.aggregate){Hn(wn(i,n.aggregate));continue}if(!r){Hn(jn(i));continue}if(n.timeUnit){r=e.vgField(i);const t={timeUnit:n.timeUnit,as:r,field:n.field};l[O(t)]=t}if(!u[r]){let o="E";"interval"===t.type?Gi(e.getScaleComponent(i).get("type"))&&(o="R"):n.bin&&(o="R-RE");const a={field:r,channel:i,type:o};a.signals=Object.assign(Object.assign({},d(a,"data")),d(a,"visual")),c.items.push(u[r]=a),c.hasField[r]=c.hasChannel[i]=u[r]}}else Hn(jn(i))}if(n.init){const e=e=>c.items.map((t=>void 0!==e[t.channel]?e[t.channel]:e[t.field]));if("interval"===n.type)t.init=e(n.init);else{const i=(0,r.IX)(n.init);t.init=i.map(e)}}_(l)||(c.timeUnit=new hu(null,l))},signals:(e,t,n)=>{const i=t.name+bu;return n.filter((e=>e.name===i)).length>0?n:n.concat({name:i,value:t.project.items.map((e=>{const{signals:t,hasLegend:n}=e,i=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rNu(e,t,n)));return t?`[${i.join(", ")}]`:i}return Jn(e)?n(t?Qn(e):function(e){const t=Yn(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?n(JSON.stringify(e)):e}function Mu(e,t){return Ku(e,((n,i)=>{t=i.marks?i.marks(e,n,t):t,zu(n,(i=>{i.marks&&(t=i.marks(e,n,t))}))})),t}function Tu(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}const Lu="_brush",qu="_scale_trigger",Ru={signals:(e,t)=>{const n=t.name,i=n+bu,o=wu.has(t),a=[],s=[],c=[];if(t.translate&&!o){const e=`!event.item || event.item.mark.name !== ${(0,r.m8)(n+Lu)}`;Wu(t,((t,n)=>{var i;const o=(0,r.IX)(null!==(i=n.between[0].filter)&&void 0!==i?i:n.between[0].filter=[]);return o.indexOf(e)<0&&o.push(e),t}))}t.project.items.forEach(((n,i)=>{const o=n.channel;if(o!==Ae&&o!==ke)return void Hn("Interval selections only support x and y encoding channels.");const u=t.init?t.init[i]:null,l=function(e,t,n,i){const o=n.channel,a=n.signals.visual,s=n.signals.data,c=wu.has(t),u=(0,r.m8)(e.scaleName(o)),l=e.getScaleComponent(o),f=l?l.get("type"):void 0,d=e=>`scale(${u}, ${e})`,p=e.getSizeSignalRef(o===Ae?"width":"height").signal,g=`${o}(unit)`,m=Wu(t,((e,t)=>[...e,{events:t.between[0],update:`[${g}, ${g}]`},{events:t,update:`[${a}[0], clamp(${g}, 0, ${p})]`}]));return m.push({events:{signal:t.name+qu},update:Gi(f)?`[${d(`${s}[0]`)}, ${d(`${s}[1]`)}]`:"[0, 0]"}),c?[{name:s,on:[]}]:[Object.assign(Object.assign({name:a},i?{init:Nu(i,!0,d)}:{value:[]}),{on:m}),Object.assign(Object.assign({name:s},i?{init:Nu(i)}:{}),{on:[{events:{signal:a},update:`${a}[0] === ${a}[1] ? null : invert(${u}, ${a})`}]})]}(e,t,n,u),f=n.signals.data,d=n.signals.visual,p=(0,r.m8)(e.scaleName(o)),g=Gi(e.getScaleComponent(o).get("type"))?"+":"";a.push(...l),s.push(f),c.push({scaleName:e.scaleName(o),expr:`(!isArray(${f}) || (${g}invert(${p}, ${d})[0] === ${g}${f}[0] && ${g}invert(${p}, ${d})[1] === ${g}${f}[1]))`})})),o||a.push({name:n+qu,value:{},on:[{events:c.map((e=>({scale:e.scaleName}))),update:c.map((e=>e.expr)).join(" && ")+` ? ${n+qu} : {}`}]});const u=t.init,l=`unit: ${Yu(e)}, fields: ${i}, values`;return a.concat(Object.assign(Object.assign({name:n+Gu},u?{init:`{${l}: ${Nu(u)}}`}:{}),{on:[{events:[{signal:s.join(" || ")}],update:s.join(" && ")+` ? {${l}: [${s}]} : null`}]}))},modifyExpr:(e,t)=>t.name+Gu+", "+("global"===t.resolve?"true":`{unit: ${Yu(e)}}`),marks:(e,t,n)=>{const i=t.name,{x:o,y:a}=t.project.hasChannel,s=o&&o.signals.visual,c=a&&a.signals.visual,u=`data(${(0,r.m8)(t.name+Ju)})`;if(wu.has(t))return n;const l={x:void 0!==o?{signal:`${s}[0]`}:{value:0},y:void 0!==a?{signal:`${c}[0]`}:{value:0},x2:void 0!==o?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==a?{signal:`${c}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of z(l))l[t]=[Object.assign({test:`${u}.length && ${u}[0].unit === ${Yu(e)}`},l[t]),{value:0}];const f=t.mark,{fill:d,fillOpacity:p,cursor:g}=f,m=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r(e[t]=[{test:[void 0!==o&&`${s}[0] !== ${s}[1]`,void 0!==a&&`${c}[0] !== ${c}[1]`].filter((e=>e)).join(" && "),value:m[t]},{value:null}],e)),{});return[{name:i+Lu+"_bg",type:"rect",clip:!0,encode:{enter:{fill:{value:d},fillOpacity:{value:p}},update:l}},...n,{name:i+Lu,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},g?{cursor:{value:g}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},l),h)}}]}};function Wu(e,t){return e.events.reduce(((e,n)=>n.between?t(e,n):(Hn(`${n} is not an ordered event stream for interval selections.`),e)),[])}function Iu(e,t){const n=t.name,i=n+bu,o=t.project,a="(item().isVoronoi ? datum.datum : datum)",s=o.items.map((t=>{const n=e.fieldDef(t.channel);return n&&n.bin?`[${a}[${(0,r.m8)(e.vgField(t.channel,{}))}], ${a}[${(0,r.m8)(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${a}[${(0,r.m8)(t.field)}]`})).join(", "),c=`unit: ${Yu(e)}, fields: ${i}, values`,u=t.events;return[{name:n+Gu,on:u?[{events:u,update:`datum && item().mark.marktype !== 'group' ? {${c}: [${s}]} : null`,force:!0}]:[]}]}const Uu={signals:Iu,modifyExpr:(e,t)=>t.name+Gu+", "+("global"===t.resolve?"null":`{unit: ${Yu(e)}}`)},Hu={signals:Iu,modifyExpr:(e,t)=>t.name+Gu+", "+("global"===t.resolve?"true":`{unit: ${Yu(e)}}`)},Ju="_store",Gu="_tuple",Xu="vlSelectionResolve",Vu={single:Hu,multi:Uu,interval:Ru};function Ku(e,t){const n=e.component.selection;if(n)for(const e of N(n))if(!0===t(e,Vu[e.type]))break}function Yu(e,{escape:t}={escape:!0}){let n=t?(0,r.m8)(e.name):e.name;const i=function(e){let t=e.parent;for(;t&&!$p(t);)t=t.parent;return t}(e);if(i){const{facet:e}=i;for(const t of ut)e[t]&&(n+=` + '__facet_${t}_' + (facet[${(0,r.m8)(i.vgField(t))}])`)}return n}function Qu(e){let t=!1;return Ku(e,(e=>{t=t||e.project.items.some((e=>e.field===rs))})),t}function Zu(e){this.type=e}var el,tl,nl,il,rl;Zu.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=function(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case"CallExpression":return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];case"Identifier":case"Literal":case"RawCode":default:return[]}}(this),n=0,i=t.length;n",el[3]="Identifier",el[4]="Keyword",el[5]="Null",el[6]="Numeric",el[7]="Punctuator",el[8]="String",el[9]="RegularExpression";var ol="Identifier",al="Unexpected token %0",sl="Invalid regular expression",cl="Invalid regular expression: missing /",ul="Octal literals are not allowed in strict mode.",ll="ILLEGAL",fl="Disabled.",dl=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),pl=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function gl(e,t){if(!e)throw new Error("ASSERT: "+t)}function ml(e){return e>=48&&e<=57}function hl(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function bl(e){return"01234567".indexOf(e)>=0}function vl(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function yl(e){return 10===e||13===e||8232===e||8233===e}function xl(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&dl.test(String.fromCharCode(e))}function Ol(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&pl.test(String.fromCharCode(e))}const jl={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function wl(){for(;nl1114111||"}"!==e)&&Tl({},al,ll),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),i=56320+(t-65536&1023),String.fromCharCode(n,i))}function kl(){var e,t;for(e=tl.charCodeAt(nl++),t=String.fromCharCode(e),92===e&&(117!==tl.charCodeAt(nl)&&Tl({},al,ll),++nl,(e=Dl("u"))&&"\\"!==e&&xl(e.charCodeAt(0))||Tl({},al,ll),t=e);nl>>="===(i=tl.substr(nl,4))?{type:7,value:i,start:r,end:nl+=4}:">>>"===(n=i.substr(0,3))||"<<="===n||">>="===n?{type:7,value:n,start:r,end:nl+=3}:a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?{type:7,value:t,start:r,end:nl+=2}:("//"===t&&Tl({},al,ll),"<>=!+-*%&|^/".indexOf(a)>=0?{type:7,value:a,start:r,end:++nl}:void Tl({},al,ll))}function Cl(){var e,t,n;if(gl(ml((n=tl[nl]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=nl,e="","."!==n){if(e=tl[nl++],n=tl[nl],"0"===e){if("x"===n||"X"===n)return++nl,function(e){let t="";for(;nl=il)return{type:2,start:nl,end:nl};const e=tl.charCodeAt(nl);return xl(e)?(t=nl,{type:1===(n=92===tl.charCodeAt(nl)?kl():function(){var e,t;for(e=nl++;nl=0&&nl(gl(t=0&&Tl({},sl,n),{value:n,literal:t}}(),a=function(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";Tl({},sl)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){Tl({},sl)}try{return new RegExp(e,t)}catch(e){return null}}(r.value,o.value),{literal:r.literal+o.literal,value:a,regex:{pattern:r.value,flags:o.value},start:i,end:nl})),El()):Ll(Sl())}return n}function Gl(){const e=[];if(ql("("),!Rl(")"))for(;nl":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function Ql(){var e,t;return e=function(){var e,t,n,i,r,o,a,s,c,u;if(e=rl,c=Kl(),0===(r=Yl(i=rl)))return c;for(i.prec=r,Sl(),t=[e,rl],o=[c,i,a=Kl()];(r=Yl(rl))>0;){for(;o.length>2&&r<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,c=o.pop(),t.pop(),n=Bl(s,c,a),o.push(n);(i=Sl()).prec=r,o.push(i),t.push(rl),n=Kl(),o.push(n)}for(n=o[u=o.length-1],t.pop();u>1;)t.pop(),n=Bl(o[u-1].value,o[u-2],n),u-=2;return n}(),Rl("?")&&(Sl(),t=Ql(),ql(":"),e=function(e,t,n){const i=new Zu("ConditionalExpression");return i.test=e,i.consequent=t,i.alternate=n,i}(e,t,Ql())),e}function Zl(){const e=Ql();if(Rl(","))throw new Error(fl);return e}function ef(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...ef(e.object)),t.push(...ef(e.property))),t)}function tf(e){return"MemberExpression"===e.object.type?tf(e.object):"datum"===e.object.name}function nf(e){const t=function(e){nl=0,il=(tl=e).length,rl=null,El();const t=Zl();if(2!==rl.type)throw new Error("Unexpect token after expression.");return t}(e),n=new Set;return t.visit((e=>{"MemberExpression"===e.type&&tf(e)&&n.add(ef(e).slice(1).join("."))})),n}class rf extends pu{constructor(e,t,n){super(e),this.model=t,this.filter=n,this.expr=cf(this.model,this.filter,this),this._dependentFields=nf(this.expr)}clone(){return new rf(null,this.model,b(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}var of=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r`length(data(${e}))`)).join(" || ")+") || ":"")+`(${a})`}function sf(e,t){const n=t.encoding;let i=t.field;if(n||i){if(n&&!i){const o=e.project.items.filter((e=>e.channel===n));!o.length||o.length>1?(i=e.project.items[0].field,Hn((o.length?"Multiple ":"No ")+`matching ${(0,r.m8)(n)} encoding found for selection ${(0,r.m8)(t.selection)}. `+`Using "field": ${(0,r.m8)(i)}.`)):i=o[0].field}}else i=e.project.items[0].field,e.project.items.length>1&&Hn(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${(0,r.m8)(i)}.`);return`${e.name}[${(0,r.m8)(i)}]`}function cf(e,t,n){return q(t,(t=>(0,r.HD)(t)?t:function(e){return null==e?void 0:e.selection}(t)?af(e,t.selection,n):ji(t)))}var uf=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{test:t}=e,n=uf(e,["test"]);return Object.assign({test:cf(null,t)},n)})),n]),delete g[e]}else if(null===a){const t={signal:o.map((e=>{const{test:t}=e,n=uf(e,["test"]);return`${cf(null,t)} ? ${ia(n)} : `})).join("")+ia(n)};g[e]=t}}else if(si(i)){const t=re[e];if(t){const{vgProp:n,part:r}=t;lf(g,r,n,i),delete g[e]}}}if("grid"===t){if(!g.grid)return;if(g.encode){const{grid:e}=g.encode;g.encode=Object.assign({},e?{grid:e}:{}),_(g.encode)&&delete g.encode}return Object.assign(Object.assign({scale:l,orient:u},g),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:K(p,0)})}{if(!i.header&&e.mainExtracted)return;if(void 0!==f){let e=f;(null===(a=null===(o=g.encode)||void 0===o?void 0:o.labels)||void 0===a?void 0:a.update)&&si(g.encode.labels.update.text)&&(e=G(f,"datum.label",g.encode.labels.update.text.signal)),lf(g,"labels","text",{signal:e})}if(null===g.labelAlign&&delete g.labelAlign,g.encode){for(const t of ae)e.hasAxisPart(t)||delete g.encode[t];_(g.encode)&&delete g.encode}const t=function(e,t){if(e)return(0,r.kJ)(e)&&!Yo(e)?e.map((e=>Mo(e,t))).join(", "):e}(d,n);return Object.assign(Object.assign(Object.assign(Object.assign({scale:l,orient:u,grid:!1},t?{title:t}:{}),g),!1===n.aria?{aria:!1}:{}),{zindex:K(p,0)})}}}function df(e){const{axes:t}=e.component,n=[];for(const i of Wt)if(t[i])for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const t="x"===i?"height":"width",r=e.getSizeSignalRef(t).signal;t!==r&&n.push({name:t,update:r})}return n}function pf(e,t,n,i){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===n?"bottom":"left",r=t["x"===n?"axisBottom":"axisLeft"]||{},o=t["x"===n?"axisTop":"axisRight"]||{},a=new Set([...z(r),...z(o)]),s={};for(const t of a.values())s[t]={signal:`${i.signal} === "${e}" ? ${ra(r[t])} : ${ra(o[t])}`};return s}return t[e]}))])}function gf(e,t){var n;const i=[{}];for(const o of e){let e=null===(n=t[o])||void 0===n?void 0:n.style;if(e){e=(0,r.IX)(e);for(const n of e)i.push(t.style[n])}}return Object.assign.apply(null,i)}function mf(e,t,n,i={}){var r;const o=ua(e,n,t);if(void 0!==o)return{configFrom:"style",configValue:o};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==(null===(r=i[t])||void 0===r?void 0:r[e]))return{configFrom:t,configValue:i[t][e]};return{}}const hf={scale:({model:e,channel:t})=>e.scaleName(t),format:({fieldOrDatumDef:e,config:t,axis:n})=>{const{format:i,formatType:r}=n;return Jr(e,e.type,i,r,t,!0)},formatType:({axis:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return Gr(i,t,n)},grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>{var i;return(!ho(e)||!pn(e.bin))&&(null!==(i=t.grid)&&void 0!==i?i:function(e,t){return!Ji(e)&&ho(t)&&!dn(null==t?void 0:t.bin)}(n,e))},gridScale:({model:e,channel:t})=>function(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||yf(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||vf(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>{var i;return null!==(i=e.labelFlush)&&void 0!==i?i:function(e,t){if("x"===t&&w(["quantitative","temporal"],e))return!0}(t.type,n)},labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>{var i;return null!==(i=e.labelOverlap)&&void 0!==i?i:function(e,t,n,i){if(n&&!(0,r.Kn)(i)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,n,ho(t)&&!!t.timeUnit,ho(t)?t.sort:void 0)},orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{var o;const a="x"===e?"width":"y"===e?"height":void 0,s=a?t.getSizeSignalRef(a):void 0;return null!==(o=n.tickCount)&&void 0!==o?o:function({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){var r;if(!i&&!Ji(t)&&"log"!==t){if(ho(e)){if(dn(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&w(["month","hours","day","quarter"],null===(r=ai(e.timeUnit))||void 0===r?void 0:r.unit))return}return{signal:`ceil(${n.signal}/40)`}}}({fieldOrDatumDef:i,scaleType:r,size:s,values:n.values})},title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const i=xf(t,n);if(void 0!==i)return i;const r=t.typedFieldDef(n),o="x"===n?"x2":"y2",a=t.fieldDef(o);return fa(r?[co(r)]:[],ho(a)?[co(a)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function(e,t){const n=e.values;return(0,r.kJ)(n)?Xo(t,n):si(n)?n:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>{var i;return null!==(i=e.zindex)&&void 0!==i?i:function(e,t){return"rect"===e&&So(t)?1:0}(n,t)}};function bf(e){return`(((${e.signal} % 360) + 360) % 360)`}function vf(e,t,n,i){if(void 0!==e){if("x"===n){if(si(e)){const n=bf(e);return{signal:`(45 < ${n} && ${n} < 135) || (225 < ${n} && ${n} < 315) ? "middle" :(${n} <= 45 || 315 <= ${n}) === ${si(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{if(Do(t)&&io(t.sort)){const{field:i,timeUnit:r}=t,o=t.sort,a=o.map(((e,t)=>`${ji({field:i,timeUnit:r,equal:e})} ? ${t} : `)).join("")+o.length;e=new Of(e,{calculate:a,as:jf(t,n,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${O(this.transform)}`}}function jf(e,t,n){return $o(e,Object.assign({prefix:t,suffix:"sort_index"},null!=n?n:{}))}function wf(e,t){return w(["top","bottom"],t)?"column":w(["left","right"],t)||"row"===e?"row":"column"}function Df(e,t,n,i){const r="row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet;return K((t||{})[e],r[e],n.header[e])}function Af(e,t,n,i){const r={};for(const o of e){const e=Df(o,t||{},n,i);void 0!==e&&(r[o]=e)}return r}const kf=["row","column"],Ff=["header","footer"];function Cf(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:a,titleOrient:s}=Af(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),c=wf(t,s),u=ne(a);return{name:`${t}-title`,type:"group",role:`${c}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:n},"row"===t?{orient:"left"}:{}),{style:"guide-title"}),Sf(u,c)),$f(c,u,o)),Mf(i,r,t,Ya,Va))}}function $f(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=yf(t,"row"===e?"left":"top","row"===e?"y":"x");return i?{align:i}:{}}function Sf(e,t){const n=vf(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function Ef(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of Ff)if(n[r])for(const o of n[r]){const a=_f(e,t,r,n,o);null!=a&&i.push(a)}return i}function Bf(e,t){var n;const{sort:i}=e;return no(i)?{field:$o(i,{expr:"datum"}),order:null!==(n=i.order)&&void 0!==n?n:"ascending"}:(0,r.kJ)(i)?{field:jf(e,t,{expr:"datum"}),order:"ascending"}:{field:$o(e,{expr:"datum"}),order:null!=i?i:"ascending"}}function Pf(e,t,n){const{format:i,formatType:r,labelAngle:o,labelAnchor:a,labelOrient:s,labelExpr:c}=Af(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),u=Ir({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,l=wf(t,s);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:c?G(G(c,"datum.label",u),"datum.value",$o(e,{expr:"parent"})):u}},"row"===t?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),Sf(o,l)),$f(l,o,a)),Mf(n,e,t,Qa,Ka))}function _f(e,t,n,i,r){if(r){let o=null;const{facetFieldDef:a}=i,s=e.config?e.config:void 0;if(a&&r.labels){const{labelOrient:e}=Af(["labelOrient"],a.header,s,t);("row"===t&&!w(["top","bottom"],e)||"column"===t&&!w(["left","right"],e))&&(o=Pf(a,t,s))}const c=$p(e)&&!ro(e.facet),u=r.axes,l=(null==u?void 0:u.length)>0;if(o||l){const s="row"===t?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`},i.facetFieldDef?{from:{data:e.getName(t+"_domain")},sort:Bf(a,t)}:{}),l&&c?{from:{data:e.getName(`facet_domain_${t}`)}}:{}),o?{title:o}:{}),r.sizeSignal?{encode:{update:{[s]:r.sizeSignal}}}:{}),l?{axes:u}:{})}}return null}const zf={column:{start:0,end:1},row:{start:1,end:0}};function Nf(e,t){return zf[t][e]}function Mf(e,t,n,i,r){const o={};for(const a of i){if(!r[a])continue;const i=Df(a,null==t?void 0:t.header,e,n);void 0!==i&&(o[r[a]]=i)}return o}function Tf(e){return[...Lf(e,"width"),...Lf(e,"height"),...Lf(e,"childWidth"),...Lf(e,"childHeight")]}function Lf(e,t){const n="width"===t?"x":"y",i=e.component.layoutSize.get(t);if(!i||"merged"===i)return[];const r=e.getSizeSignalRef(t).signal;if("step"===i){const t=e.getScaleComponent(n);if(t){const i=t.get("type"),o=t.get("range");if(Ji(i)&&ci(o)){const i=e.scaleName(n);return $p(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[qf(i,o)]:[qf(i,o),{name:r,update:Rf(i,t,`domain('${i}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==i){const t=r.endsWith("width"),n=t?"containerSize()[0]":"containerSize()[1]",i=`isFinite(${n}) ? ${n} : ${gs(e.config.view,t?"width":"height")}`;return[{name:r,init:i,on:[{update:i,events:"window:resize"}]}]}return[{name:r,value:i}]}function qf(e,t){return{name:e+"_step",value:t.step}}function Rf(e,t,n){const i=t.get("type"),r=t.get("padding"),o=K(t.get("paddingOuter"),r);let a=t.get("paddingInner");return a="band"===i?void 0!==a?a:r:1,`bandspace(${n}, ${ra(a)}, ${ra(o)}) * ${e}_step`}function Wf(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function If(e,t){return z(e).reduce(((n,i)=>{const r=e[i];return Object.assign(Object.assign({},n),Lc(t,r,i,(e=>na(e.value))))}),{})}function Uf(e,t){if(Ep(t)||$p(t))return"shared";if(Sp(t))return It(e)?"independent":"shared";throw new Error("invalid model type for resolve")}function Hf(e,t){const n=e.scale[t],i=It(t)?"axis":"legend";return"independent"===n?("shared"===e[i][t]&&Hn(function(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[i][t]||"shared"}const Jf=Object.assign(Object.assign({},ts),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),Gf=z(Jf);class Xf extends oc{}const Vf={symbols:function(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:o,legendType:a}){var s,c,u,l,f,d,p,g;if("symbol"!==a)return;const{markDef:m,encoding:h,config:b,mark:v}=n,y=m.filled&&"trail"!==v;let x=Object.assign(Object.assign({},function(e,t,n){for(const i of n){const n=sa(i,t.markDef,t.config);void 0!==n&&(e[i]=na(n))}return e}({},n,$r)),Jc(n,{filled:y}));const O=null!==(s=o.get("symbolOpacity"))&&void 0!==s?s:b.legend.symbolOpacity,j=null!==(c=o.get("symbolFillColor"))&&void 0!==c?c:b.legend.symbolFillColor,w=null!==(u=o.get("symbolStrokeColor"))&&void 0!==u?u:b.legend.symbolStrokeColor,D=void 0===O?null!==(l=Kf(h.opacity))&&void 0!==l?l:m.opacity:void 0;if(x.fill)if("fill"===i||y&&i===Me)delete x.fill;else if(x.fill.field)j?delete x.fill:(x.fill=na(null!==(f=b.legend.symbolBaseFillColor)&&void 0!==f?f:"black"),x.fillOpacity=na(null!=D?D:1));else if((0,r.kJ)(x.fill)){const e=null!==(g=null!==(p=Yf(null!==(d=h.fill)&&void 0!==d?d:h.color))&&void 0!==p?p:m.fill)&&void 0!==g?g:y&&m.color;e&&(x.fill=na(e))}if(x.stroke)if("stroke"===i||!y&&i===Me)delete x.stroke;else if(x.stroke.field||w)delete x.stroke;else if((0,r.kJ)(x.stroke)){const e=K(Yf(h.stroke||h.color),m.stroke,y?m.color:void 0);e&&(x.stroke={value:e})}if(i!==Ie){const e=ho(t)&&Zf(0,o,t);e?x.opacity=[Object.assign({test:e},na(null!=D?D:1)),na(b.legend.unselectedOpacity)]:D&&(x.opacity=na(D))}return x=Object.assign(Object.assign({},x),e),_(x)?void 0:x},gradient:function(e,{model:t,legendType:n,legendCmpt:i}){var r;if("gradient"!==n)return;const{config:o,markDef:a,encoding:s}=t;let c={};const u=void 0===(null!==(r=i.get("gradientOpacity"))&&void 0!==r?r:o.legend.gradientOpacity)?Kf(s.opacity)||a.opacity:void 0;return u&&(c.opacity=na(u)),c=Object.assign(Object.assign({},c),e),_(c)?void 0:c},labels:function(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const o=n.legend(i)||{},a=n.config,s=ho(t)?Zf(0,r,t):void 0,c=s?[{test:s,value:1},{value:a.legend.unselectedOpacity}]:void 0,{format:u,formatType:l}=o,f=Rr(l)?Hr({fieldOrDatumDef:t,field:"datum.value",format:u,formatType:l,config:a}):void 0,d=Object.assign(Object.assign(Object.assign({},c?{opacity:c}:{}),f?{text:f}:{}),e);return _(d)?void 0:d},entries:function(e,{legendCmpt:t}){const n=t.get("selections");return(null==n?void 0:n.length)?Object.assign(Object.assign({},e),{fill:{value:"transparent"}}):e}};function Kf(e){return Qf(e,((e,t)=>Math.max(e,t.value)))}function Yf(e){return Qf(e,((e,t)=>K(e,t.value)))}function Qf(e,t){return function(e){const t=e&&e.condition;return!!t&&((0,r.kJ)(t)||wo(t))}(e)?(0,r.IX)(e.condition).reduce(t,e.value):wo(e)?e.value:void 0}function Zf(e,t,n){const i=t.get("selections");if(!(null==i?void 0:i.length))return;const o=(0,r.m8)(n.field);return i.map((e=>`(!length(data(${(0,r.m8)(L(e)+Ju)})) || (${e}[${o}] && indexof(${e}[${o}], datum.value) >= 0))`)).join(" || ")}const ed={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return Jr(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return Gr(i,t,n)},gradientLength:e=>{var t,n;const{legend:i,legendConfig:r}=e;return null!==(n=null!==(t=i.gradientLength)&&void 0!==t?t:r.gradientLength)&&void 0!==n?n:function({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:o,gradientHorizontalMinLength:a,gradientVerticalMaxLength:s,gradientVerticalMinLength:c}=e;if(Xi(r))return"horizontal"===n?"top"===i||"bottom"===i?nd(t,"width",a,o):a:nd(t,"height",c,s)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>{var i,r;return null!==(r=null!==(i=e.labelOverlap)&&void 0!==i?i:t.labelOverlap)&&void 0!==r?r:function(e){if(w(["quantile","threshold","log","symlog"],e))return"greedy"}(n)},symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>{var r;return null!==(r=e.symbolType)&&void 0!==r?r:function(e,t,n,i){var r;if("shape"!==t){const e=null!==(r=Yf(n))&&void 0!==r?r:i;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,n,i.shape,t.shape)},title:({fieldOrDatumDef:e,config:t})=>zo(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(st(n)&&Xi(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function(e,t){const n=e.values;return(0,r.kJ)(n)?Xo(t,n):si(n)?n:void 0}(t,e)};function td({legendConfig:e,legendType:t,orient:n,legend:i}){var r,o;return null!==(o=null!==(r=i.direction)&&void 0!==r?r:e[t?"gradientDirection":"symbolDirection"])&&void 0!==o?o:function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(n,t)}function nd(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function id(e){const t=Cp(e)?function(e){const{encoding:t}=e,n={};for(const i of[Me,...es]){const r=qo(t[i]);r&&e.getScaleComponent(i)&&(i===qe&&ho(r)&&r.type===Si||(n[i]=od(e,i)))}return n}(e):function(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){id(i);for(const r of z(i.component.legends))n.legend[r]=Hf(e.component.resolve,r),"shared"===n.legend[r]&&(t[r]=ad(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of z(t))for(const t of e.children)t.component.legends[i]&&"shared"===n.legend[i]&&delete t.component.legends[i];return t}(e);return e.component.legends=t,t}function rd(e,t,n,i){switch(t){case"disable":return void 0!==n;case"values":return!!(null==n?void 0:n.values);case"title":if("title"===t&&e===(null==i?void 0:i.title))return!0}return e===(n||{})[t]}function od(e,t){var n,i,r;let o=e.legend(t);const{markDef:a,encoding:s,config:c}=e,u=c.legend,l=new Xf({},function(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));!function(e,t,n){var i;const r=null===(i=e.fieldDef(t))||void 0===i?void 0:i.field;Ku(e,(e=>{var i,o;const a=null!==(i=e.project.hasField[r])&&void 0!==i?i:e.project.hasChannel[t];if(a&&ku.has(e)){const t=null!==(o=n.get("selections"))&&void 0!==o?o:[];t.push(e.name),n.set("selections",t,!1),a.hasLegend=!0}}))}(e,t,l);const f=void 0!==o?!o:u.disable;if(l.set("disable",f,void 0!==o),f)return l;o=o||{};const d=e.getScaleComponent(t).get("type"),p=qo(s[t]),g=ho(p)?null===(n=ai(p.timeUnit))||void 0===n?void 0:n.unit:void 0,m=o.orient||c.legend.orient||"right",h=function(e){const{legend:t}=e;return K(t.type,function({channel:e,timeUnit:t,scaleType:n}){if(st(e)){if(w(["quarter","month","day"],t))return"symbol";if(Xi(n))return"gradient"}return"symbol"}(e))}({legend:o,channel:t,timeUnit:g,scaleType:d}),b={legend:o,channel:t,model:e,markDef:a,encoding:s,fieldOrDatumDef:p,legendConfig:u,config:c,scaleType:d,orient:m,legendType:h,direction:td({legend:o,legendType:h,orient:m,legendConfig:u})};for(const n of Gf){if("gradient"===h&&n.startsWith("symbol")||"symbol"===h&&n.startsWith("gradient"))continue;const i=n in ed?ed[n](b):o[n];if(void 0!==i){const r=rd(i,n,o,e.fieldDef(t));(r||void 0===c.legend[n])&&l.set(n,i,r)}}const v=null!==(i=null==o?void 0:o.encoding)&&void 0!==i?i:{},y=l.get("selections"),x={},O={fieldOrDatumDef:p,model:e,channel:t,legendCmpt:l,legendType:h};for(const t of["labels","legend","title","symbols","gradient","entries"]){const n=If(null!==(r=v[t])&&void 0!==r?r:{},e),i=t in Vf?Vf[t](n,O):n;void 0===i||_(i)||(x[t]=Object.assign(Object.assign(Object.assign({},(null==y?void 0:y.length)&&ho(p)?{name:`${L(p.field)}_legend_${t}`}:{}),(null==y?void 0:y.length)?{interactive:!!y}:{}),{update:i}))}return _(x)||l.set("encode",x,!!(null==o?void 0:o.encoding)),l}function ad(e,t){var n,i,r,o;if(!e)return t.clone();const a=e.getWithExplicit("orient"),s=t.getWithExplicit("orient");if(a.explicit&&s.explicit&&a.value!==s.value)return;let c=!1;for(const n of Gf){const i=lc(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",((e,t)=>{switch(n){case"symbolType":return i=e,"circle"===(r=t).value?r:i;case"title":return pa(e,t);case"type":return c=!0,sc("symbol")}var i,r;return uc(e,t,n,"legend")}));e.setWithExplicit(n,i)}return c&&((null===(i=null===(n=e.implicit)||void 0===n?void 0:n.encode)||void 0===i?void 0:i.gradient)&&R(e.implicit,["encode","gradient"]),(null===(o=null===(r=e.explicit)||void 0===r?void 0:r.encode)||void 0===o?void 0:o.gradient)&&R(e.explicit,["encode","gradient"])),e}function sd(e){const t=e.component.legends,n={};for(const i of z(t)){const r=e.getScaleComponent(i),o=x(r.get("domains"));if(n[o])for(const e of n[o])ad(e,t[i])||n[o].push(t[i]);else n[o]=[t[i].clone()]}return N(n).flat().map((t=>function(e,t){var n,i,r;const o=e.combine(),{disable:a,labelExpr:s,selections:c}=o,u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rvoid 0!==e))}function cd(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},o=t.data.reduce(((t,n)=>{const i=si(n)?n.signal:`data('${e.lookupDataSource(n)}')`;return w(t,i)||t.push(i),t}),[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:i,size:r,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]}},n)]}return[Object.assign(Object.assign({name:i},{translate:{signal:"[width / 2, height / 2]"}}),n)]}const ud=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class ld extends oc{constructor(e,t,n,i){super(Object.assign({},t),{name:e}),this.specifiedProjection=t,this.size=n,this.data=i,this.merged=!1}get isFit(){return!!this.data}}function fd(e){e.component.projection=Cp(e)?function(e){var t;if(e.hasProjection){const n=e.specifiedProjection,i=!(n&&(null!=n.scale||null!=n.translate)),r=i?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,o=i?function(e){const t=[],{encoding:n}=e;for(const i of[[_e,Pe],[Ne,ze]])(qo(n[i[0]])||qo(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(qe)&&e.typedFieldDef(qe).type===Si&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(yc.Main)),t}(e):void 0;return new ld(e.projectionName(!0),Object.assign(Object.assign({},null!==(t=e.config.projection)&&void 0!==t?t:{}),null!=n?n:{}),r,o)}}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)fd(t);const n=A(e.children,(e=>{const n=e.component.projection;if(n){if(t){const e=function(e,t){const n=A(ud,(n=>!(0,r.nr)(e.explicit,n)&&!(0,r.nr)(t.explicit,n)||!(!(0,r.nr)(e.explicit,n)||!(0,r.nr)(t.explicit,n)||x(e.get(n))!==x(t.get(n)))));if(x(e.size)===x(t.size)){if(n)return e;if(x(e.explicit)===x({}))return t;if(x(t.explicit)===x({}))return e}return null}(t,n);return e&&(t=e),!!e}return t=n,!0}return!0}));if(t&&n){const n=e.projectionName(!0),i=new ld(n,t.specifiedProjection,t.size,b(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&i.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),n),e.merged=!0)}return i}}(e)}function dd(e,t){return`${fn(e)}_${t}`}function pd(e,t,n){var i;const r=dd(null!==(i=Uo(n,void 0))&&void 0!==i?i:{},t);return e.getName(`${r}_bins`)}function gd(e,t,n){let i,o;i=function(e){return"as"in e}(e)?(0,r.HD)(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[$o(e,{forAs:!0}),$o(e,{binSuffix:"end",forAs:!0})];const a=Object.assign({},Uo(t,void 0)),s=dd(a,e.field),{signal:c,extentSignal:u}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,s);if(mn(a.extent)){const e=a.extent,t=e.selection;o=sf(n.getSelectionComponent(L(t),t),e),delete a.extent}return{key:s,binComponent:Object.assign(Object.assign(Object.assign({bin:a,field:e.field,as:[i]},c?{signal:c}:{}),u?{extentSignal:u}:{}),o?{span:o}:{})}}class md extends pu{constructor(e,t){super(e),this.bins=t}clone(){return new md(null,b(this.bins))}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,i)=>{if(jo(n)&&dn(n.bin)){const{key:r,binComponent:o}=gd(n,n.bin,t);e[r]=Object.assign(Object.assign(Object.assign({},o),e[r]),function(e,t,n,i){var r,o;if(Vo(t,n)){const a=Cp(e)&&null!==(o=null!==(r=e.axis(n))&&void 0!==r?r:e.legend(n))&&void 0!==o?o:{},s=$o(t,{expr:"datum"}),c=$o(t,{expr:"datum",binSuffix:"end"});return{formulaAs:$o(t,{binSuffix:"range",forAs:!0}),formula:Yr(s,c,a.format,a.formatType,i)}}return{}}(t,n,i,t.config))}return e}),{});return _(n)?null:new md(e,n)}static makeFromTransform(e,t,n){const{key:i,binComponent:r}=gd(t,t.bin,n);return new md(e,{[i]:r})}merge(e,t){for(const n of z(e.bins))n in this.bins?(t(e.bins[n].signal,this.bins[n].signal),this.bins[n].as=C([...this.bins[n].as,...e.bins[n].as],O)):this.bins[n]=e.bins[n];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set(N(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set(N(this.bins).map((e=>e.field)))}hash(){return`Bin ${O(this.bins)}`}assemble(){return N(this.bins).flatMap((e=>{const t=[],[n,...i]=e.as,r=e.bin,{extent:o}=r,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{e.aggregate&&(n=!0)}));const i={},r=new Set;return n?(t.forEachFieldDef(((e,n)=>{var o,a,s,c;const{aggregate:u,field:l}=e;if(u)if("count"===u)i["*"]=null!==(o=i["*"])&&void 0!==o?o:{},i["*"].count=new Set([$o(e,{forAs:!0})]);else{if(ge(u)||me(u)){const e=ge(u)?"argmin":"argmax",t=u[e];i[t]=null!==(a=i[t])&&void 0!==a?a:{},i[t][e]=new Set([$o({op:e,field:t},{forAs:!0})])}else i[l]=null!==(s=i[l])&&void 0!==s?s:{},i[l][u]=new Set([$o(e,{forAs:!0})]);an(n)&&"unaggregated"===t.scaleDomain(n)&&(i[l]=null!==(c=i[l])&&void 0!==c?c:{},i[l].min=new Set([$o({field:l,aggregate:"min"},{forAs:!0})]),i[l].max=new Set([$o({field:l,aggregate:"max"},{forAs:!0})]))}else!function(e,t,n,i){const r=Cp(i)?i.encoding[At(t)]:void 0;if(jo(n)&&Cp(i)&&fo(t,n,r,i.stack,i.markDef,i.config))e.add($o(n,{})),e.add($o(n,{suffix:"end"})),n.bin&&Vo(n,t)&&e.add($o(n,{binSuffix:"range"}));else if(t in rt){const n=function(e){switch(e){case Pe:return"y";case ze:return"y2";case _e:return"x";case Ne:return"x2"}}(t);e.add(i.getName(n))}else e.add($o(n))}(r,n,e,t)})),r.size+z(i).length===0?null:new hd(e,r,i)):null}static makeFromTransform(e,t){var n,i,r;const o=new Set,a={};for(const e of t.aggregate){const{op:t,field:r,as:o}=e;t&&("count"===t?(a["*"]=null!==(n=a["*"])&&void 0!==n?n:{},a["*"].count=new Set([o||$o(e,{forAs:!0})])):(a[r]=null!==(i=a[r])&&void 0!==i?i:{},a[r][t]=new Set([o||$o(e,{forAs:!0})])))}for(const e of null!==(r=t.groupby)&&void 0!==r?r:[])o.add(e);return o.size+z(a).length===0?null:new hd(e,o,a)}merge(e){return S(this.dimensions,e.dimensions)?(function(e,t){var n;for(const i of z(t)){const r=t[i];for(const t of z(r))i in e?e[i][t]=new Set([...null!==(n=e[i][t])&&void 0!==n?n:[],...r[t]]):e[i]={[t]:r[t]}}}(this.measures,e.measures),!0):(function(...e){Un.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...z(this.measures)])}producedFields(){const e=new Set;for(const t of z(this.measures))for(const n of z(this.measures[t])){const i=this.measures[t][n];0===i.size?e.add(`${n}_${t}`):i.forEach(e.add,e)}return e}hash(){return`Aggregate ${O({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],n=[];for(const i of z(this.measures))for(const r of z(this.measures[i]))for(const o of this.measures[i][r])n.push(o),e.push(r),t.push("*"===i?null:J(i));return{type:"aggregate",groupby:[...this.dimensions].map(J),ops:e,fields:t,as:n}}}class bd extends pu{constructor(e,t,n,i){super(e),this.model=t,this.name=n,this.data=i;for(const e of ut){const n=t.facet[e];if(n){const{bin:i,sort:o}=n;this[e]=Object.assign({name:t.getName(`${e}_domain`),fields:[$o(n),...dn(i)?[$o(n,{binSuffix:"end"})]:[]]},no(o)?{sortField:o}:(0,r.kJ)(o)?{sortIndexField:jf(n,e)}:{})}}this.childModel=t.child}hash(){let e="Facet";for(const t of ut)this[t]&&(e+=` ${t.charAt(0)}:${O(this[t])}`);return e}get fields(){var e;const t=[];for(const n of ut)(null===(e=this[n])||void 0===e?void 0:e.fields)&&t.push(...this[n].fields);return t}dependentFields(){const e=new Set(this.fields);for(const t of ut)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of Wt){const n=this.childModel.component.scales[t];if(n&&!n.merged){const i=n.get("type"),r=n.get("range");if(Ji(i)&&ci(r)){const n=sp(cp(this.childModel,t));n?e[t]=n:Hn(On(t))}}}return e}assembleRowColumnHeaderData(e,t,n){const i={row:"y",column:"x"}[e],r=[],o=[],a=[];n&&n[i]&&(t?(r.push(`distinct_${n[i]}`),o.push("max")):(r.push(n[i]),o.push("distinct")),a.push(`distinct_${n[i]}`));const{sortField:s,sortIndexField:c}=this[e];if(s){const{op:e=Qr,field:t}=s;r.push(t),o.push(e),a.push($o(s,{forAs:!0}))}else c&&(r.push(c),o.push("max"),a.push(c));return{name:this[e].name,source:null!=t?t:this.data,transform:[Object.assign({type:"aggregate",groupby:this[e].fields},r.length?{fields:r,ops:o,as:a}:{})]}}assembleFacetHeaderData(e){var t,n;const{columns:i}=this.model.layout,{layoutHeaders:r}=this.model.component,o=[],a={};for(const e of kf){for(const i of Ff){const o=null!==(t=r[e]&&r[e][i])&&void 0!==t?t:[];for(const t of o)if((null===(n=t.axes)||void 0===n?void 0:n.length)>0){a[e]=!0;break}}if(a[e]){const t=`length(data("${this.facet.name}"))`,n="row"===e?i?{signal:`ceil(${t} / ${i})`}:1:i?{signal:`min(${t}, ${i})`}:{signal:t};o.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:n}]})}}const{row:s,column:c}=a;return(s||c)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}assemble(){var e,t;const n=[];let i=null;const r=this.getChildIndependentFieldsWithStep(),{column:o,row:a,facet:s}=this;if(o&&a&&(r.x||r.y)){i=`cross_${this.column.name}_${this.row.name}`;const o=[].concat(null!==(e=r.x)&&void 0!==e?e:[],null!==(t=r.y)&&void 0!==t?t:[]),a=o.map((()=>"distinct"));n.push({name:i,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:o,ops:a}]})}for(const e of[we,je])this[e]&&n.push(this.assembleRowColumnHeaderData(e,i,r));if(s){const e=this.assembleFacetHeaderData(r);e&&n.push(...e)}return n}}function vd(e){return"'"===e[0]&&"'"===e[e.length-1]||'"'===e[0]&&'"'===e[e.length-1]?e.slice(1,-1):e}function yd(e){const t={};return g(e.filter,(e=>{var n;if(xi(e)){let i=null;pi(e)?i=ea(e.equal):mi(e)?i=ea(e.lte):gi(e)?i=ea(e.lt):hi(e)?i=ea(e.gt):bi(e)?i=ea(e.gte):vi(e)?i=e.range[0]:yi(e)&&(i=(null!==(n=e.oneOf)&&void 0!==n?n:e.in)[0]),i&&(Jn(i)?t[e.field]="date":(0,r.hj)(i)?t[e.field]="number":(0,r.HD)(i)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}class xd extends pu{constructor(e,t){super(e),this._parse=t}clone(){return new xd(null,b(this._parse))}hash(){return`Parse ${O(this._parse)}`}static makeExplicit(e,t,n){let i={};const r=t.data;return!mc(r)&&r&&r.format&&r.format.parse&&(i=r.format.parse),this.makeWithAncestors(e,i,{},n)}static makeWithAncestors(e,t,n,i){for(const e of z(n)){const t=i.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===n[e]||"derived"===t.value||"flatten"===n[e]?delete n[e]:Hn(kn(e,n[e],t.value)))}for(const e of z(t)){const n=i.get(e);void 0!==n&&(n===t[e]?delete t[e]:Hn(kn(e,t[e],n)))}const r=new oc(t,n);i.copyAll(r);const o={};for(const e of z(r.combine())){const t=r.get(e);null!==t&&(o[e]=t)}return 0===z(o).length||i.parseNothing?null:new xd(e,o)}get parse(){return this._parse}merge(e){this._parse=Object.assign(Object.assign({},this._parse),e.parse),e.remove()}assembleFormatParse(){const e={};for(const t of z(this._parse)){const n=this._parse[t];1===V(t)&&(e[t]=n)}return e}producedFields(){return new Set(z(this._parse))}dependentFields(){return new Set(z(this._parse))}assembleTransforms(e=!1){return z(this._parse).filter((t=>!e||V(t)>1)).map((e=>{const t=function(e,t){const n=I(e);return"number"===t?`toNumber(${n})`:"boolean"===t?`toBoolean(${n})`:"string"===t?`toString(${n})`:"date"===t?`toDate(${n})`:"flatten"===t?n:0===t.indexOf("date:")?`timeParse(${n},'${vd(t.slice(5,t.length))}')`:0===t.indexOf("utc:")?`utcParse(${n},'${vd(t.slice(4,t.length))}')`:(Hn(`Unrecognized parse "${t}".`),null)}(e,this._parse[e]);return t?{type:"formula",expr:t,as:X(e)}:null})).filter((e=>null!==e))}}class Od extends pu{clone(){return new Od(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([rs])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:rs}}}class jd extends pu{constructor(e,t){super(e),this.params=t}clone(){return new jd(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${O(this.params)}`}assemble(){return Object.assign({type:"graticule"},!0===this.params?{}:this.params)}}class wd extends pu{constructor(e,t){super(e),this.params=t}clone(){return new wd(null,this.params)}dependentFields(){return new Set}producedFields(){var e;return new Set([null!==(e=this.params.as)&&void 0!==e?e:"data"])}hash(){return`Hash ${O(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class Dd extends pu{constructor(e){let t;if(super(null),mc(e=null!=e?e:{name:"source"})||(t=e.format?Object.assign({},y(e.format,["parse"])):{}),pc(e))this._data={values:e.values};else if(dc(e)){if(this._data={url:e.url},!t.type){let n=/(?:\.([^.]+))?$/.exec(e.url)[1];w(["json","csv","tsv","dsv","topojson"],n)||(n="json"),t.type=n}}else bc(e)?this._data={values:[{type:"Sphere"}]}:(gc(e)||mc(e))&&(this._data={});this._generator=mc(e),e.name&&(this._name=e.name),t&&!_(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var Ad,kd=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n};function Fd(e){return e instanceof Dd||e instanceof jd||e instanceof wd}class Cd{constructor(){Ad.set(this,void 0),kd(this,Ad,!1)}setModified(){kd(this,Ad,!0)}get modifiedFlag(){return function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,Ad)}}Ad=new WeakMap;class $d extends Cd{getNodeDepths(e,t,n){n.set(e,t);for(const i of e.children)this.getNodeDepths(i,t+1,n);return n}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class Sd extends Cd{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}class Ed extends Sd{mergeNodes(e,t){const n=t.shift();for(const i of t)e.removeChild(i),i.parent=n,i.remove()}run(e){const t=e.children.map((e=>e.hash())),n={};for(let i=0;i1&&(this.setModified(),this.mergeNodes(e,n[t]))}}class Bd extends Sd{constructor(e){super(),this.requiresSelectionId=e&&Qu(e)}run(e){e instanceof Od&&(this.requiresSelectionId&&(Fd(e.parent)||e.parent instanceof hd||e.parent instanceof xd)||(this.setModified(),e.remove()))}}class Pd extends Cd{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let n=new Set;e instanceof hu&&(n=e.producedFields(),E(n,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const i of e.children)this.run(i,new Set([...t,...n]))}}class _d extends Sd{constructor(){super()}run(e){e instanceof gu&&!e.isRequired()&&(this.setModified(),e.remove())}}class zd extends $d{run(e){if(!(Fd(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof xd)if(e instanceof xd)this.setModified(),e.merge(t);else{if(P(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class Nd extends $d{run(e){const t=[...e.children],n=e.children.filter((e=>e instanceof xd));if(e.numChildren()>1&&n.length>=1){const i={},r=new Set;for(const e of n){const t=e.parse;for(const e of z(t))e in i?i[e]!==t[e]&&r.add(e):i[e]=t[e]}for(const e of r)delete i[e];if(!_(i)){this.setModified();const n=new xd(e,i);for(const r of t){if(r instanceof xd)for(const e of z(i))delete r.parse[e];e.removeChild(r),r.parent=n,r instanceof xd&&0===z(r.parse).length&&r.remove()}}}}}class Md extends $d{run(e){e instanceof gu||e.numChildren()>0||e instanceof bd||e instanceof Dd||(this.setModified(),e.remove())}}class Td extends $d{run(e){const t=e.children.filter((e=>e instanceof hu)),n=t.pop();for(const e of t)this.setModified(),n.merge(e)}}class Ld extends $d{run(e){const t=e.children.filter((e=>e instanceof hd)),n={};for(const e of t){const t=O(e.groupBy);t in n||(n[t]=[]),n[t].push(e)}for(const t of z(n)){const i=n[t];if(i.length>1){const t=i.pop();for(const n of i)t.merge(n)&&(e.removeChild(n),n.parent=t,n.remove(),this.setModified())}}}}class qd extends $d{constructor(e){super(),this.model=e}run(e){const t=!(Fd(e)||e instanceof rf||e instanceof xd||e instanceof Od),n=[],i=[];for(const r of e.children)r instanceof md&&(t&&!P(e.producedFields(),r.dependentFields())?n.push(r):i.push(r));if(n.length>0){const t=n.pop();for(const e of n)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof md?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(i.length>1){const e=i.pop();for(const t of i)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class Rd extends $d{run(e){const t=[...e.children];if(!D(t,(e=>e instanceof gu))||e.numChildren()<=1)return;const n=[];let i;for(const r of t)if(r instanceof gu){let t=r;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof gu))break;t=e}n.push(...t.children),i?(e.removeChild(r),r.parent=i.parent,i.parent.removeChild(i),i.parent=t,this.setModified()):i=t}else n.push(r);if(n.length){this.setModified();for(const e of n)e.parent.removeChild(e),e.parent=i}}}class Wd extends pu{constructor(e,t){super(e),this.transform=t}clone(){return new Wd(null,b(this.transform))}addDimensions(e){this.transform.groupby=C(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){var t;return null!==(t=e.as)&&void 0!==t?t:$o(e)}hash(){return`JoinAggregateTransform ${O(this.transform)}`}assemble(){const e=[],t=[],n=[];for(const i of this.transform.joinaggregate)t.push(i.op),n.push(this.getDefaultName(i)),e.push(void 0===i.field?null:i.field);const i=this.transform.groupby;return Object.assign({type:"joinaggregate",as:n,ops:t,fields:e},void 0!==i?{groupby:i}:{})}}class Id extends pu{constructor(e,t){super(e),this._stack=t}clone(){return new Id(null,b(this._stack))}static makeFromTransform(e,t){const{stack:n,groupby:i,as:o,offset:a="zero"}=t,s=[],c=[];if(void 0!==t.sort)for(const e of t.sort)s.push(e.field),c.push(K(e.order,"ascending"));const u={field:s,order:c};let l;return l=function(e){return(0,r.kJ)(e)&&e.every((e=>(0,r.HD)(e)))&&e.length>1}(o)?o:(0,r.HD)(o)?[o,o+"_end"]:[t.stack+"_start",t.stack+"_end"],new Id(e,{stackField:n,groupby:i,offset:a,sort:u,facetby:[],as:l})}static makeFromEncoding(e,t){const n=t.stack,{encoding:i}=t;if(!n)return null;const{groupbyChannel:o,fieldChannel:a,offset:s,impute:c}=n;let u;o&&(u=Lo(i[o]));const l=function(e){return e.stack.stackBy.reduce(((e,t)=>{const n=$o(t.fieldDef);return n&&e.push(n),e}),[])}(t),f=t.encoding.order;let d;return d=(0,r.kJ)(f)||ho(f)?la(f):l.reduce(((e,t)=>(e.field.push(t),e.order.push("y"===a?"descending":"ascending"),e)),{field:[],order:[]}),new Id(e,{dimensionFieldDef:u,stackField:t.vgField(a),facetby:[],stackby:l,sort:d,offset:s,impute:c,as:[t.vgField(a,{suffix:"start",forAs:!0}),t.vgField(a,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${O(this._stack)}`}getGroupbyFields(){const{dimensionFieldDef:e,impute:t,groupby:n}=this._stack;return e?e.bin?t?[$o(e,{binSuffix:"mid"})]:[$o(e,{}),$o(e,{binSuffix:"end"})]:[$o(e)]:null!=n?n:[]}assemble(){const e=[],{facetby:t,dimensionFieldDef:n,stackField:i,stackby:r,sort:o,offset:a,impute:s,as:c}=this._stack;if(s&&n){const{band:o=.5,bin:a}=n;a&&e.push({type:"formula",expr:`${o}*`+$o(n,{expr:"datum"})+`+${1-o}*`+$o(n,{expr:"datum",binSuffix:"end"}),as:$o(n,{binSuffix:"mid",forAs:!0})}),e.push({type:"impute",field:i,groupby:[...r,...t],key:$o(n,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:i,sort:o,as:c,offset:a}),e}}class Ud extends pu{constructor(e,t){super(e),this.transform=t}clone(){return new Ud(null,b(this.transform))}addDimensions(e){this.transform.groupby=C(this.transform.groupby.concat(e),(e=>e))}dependentFields(){var e,t;const n=new Set;return(null!==(e=this.transform.groupby)&&void 0!==e?e:[]).forEach(n.add,n),(null!==(t=this.transform.sort)&&void 0!==t?t:[]).forEach((e=>n.add(e.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(n.add,n),n}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){var t;return null!==(t=e.as)&&void 0!==t?t:$o(e)}hash(){return`WindowTransform ${O(this.transform)}`}assemble(){var e;const t=[],n=[],i=[],r=[];for(const e of this.transform.window)n.push(e.op),i.push(this.getDefaultName(e)),r.push(void 0===e.param?null:e.param),t.push(void 0===e.field?null:e.field);const o=this.transform.frame,a=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&n.every((e=>he(e))))return Object.assign({type:"joinaggregate",as:i,ops:n,fields:t},void 0!==a?{groupby:a}:{});const s=[],c=[];if(void 0!==this.transform.sort)for(const t of this.transform.sort)s.push(t.field),c.push(null!==(e=t.order)&&void 0!==e?e:"ascending");const u={field:s,order:c},l=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:r,as:i,ops:n,fields:t,sort:u},void 0!==l?{ignorePeers:l}:{}),void 0!==a?{groupby:a}:{}),void 0!==o?{frame:o}:{})}}function Hd(e){if(e instanceof bd)if(1!==e.numChildren()||e.children[0]instanceof gu){const n=e.model.component.data.main;Jd(n);const i=(t=e,function e(n){if(!(n instanceof bd)){const i=n.clone();if(i instanceof gu){const e=Gd+i.getSource();i.setSource(e),t.model.component.data.outputNodes[e]=i}else(i instanceof hd||i instanceof Id||i instanceof Ud||i instanceof Wd)&&i.addDimensions(t.fields);for(const t of n.children.flatMap(e))t.parent=i;return[i]}return n.children.flatMap(e)}),r=e.children.map(i).flat();for(const e of r)e.parent=n}else{const t=e.children[0];(t instanceof hd||t instanceof Id||t instanceof Ud||t instanceof Wd)&&t.addDimensions(e.fields),t.swapWithParent(),Hd(e)}else e.children.map(Hd);var t}function Jd(e){if(e instanceof gu&&e.type===yc.Main&&1===e.numChildren()){const t=e.children[0];t instanceof bd||(t.swapWithParent(),Jd(e))}}const Gd="scale_";function Xd(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!Xd(t.children))return!1}return!0}function Vd(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function Kd(e,t,n){let i=e.sources,r=!1;return r=Vd(new _d,i)||r,r=Vd(new Bd(t),i)||r,i=i.filter((e=>e.numChildren()>0)),r=Vd(new Md,i)||r,i=i.filter((e=>e.numChildren()>0)),n||(r=Vd(new zd,i)||r,r=Vd(new qd(t),i)||r,r=Vd(new Pd,i)||r,r=Vd(new Nd,i)||r,r=Vd(new Ld,i)||r,r=Vd(new Td,i)||r,r=Vd(new Ed,i)||r,r=Vd(new Rd,i)||r),e.sources=i,r}class Yd{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new Yd((()=>e(t)))}}function Qd(e){Cp(e)?function(e){const t=e.component.scales;for(const n of z(t)){const i=Zd(e,n);if(t[n].setWithExplicit("domains",i),ip(e,n),e.component.data.isFaceted){let t=e;for(;!$p(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[n])for(const e of i.value)ui(e)&&(e.data=Gd+e.data.replace(Gd,""))}}}(e):function(e){for(const t of e.children)Qd(t);const t=e.component.scales;for(const n of z(t)){let i,r=null;for(const t of e.children){const e=t.component.scales[n];if(e){i=void 0===i?e.getWithExplicit("domains"):lc(i,e.getWithExplicit("domains"),"domains","scale",op);const t=e.get("selectionExtent");r&&t&&r.selection!==t.selection&&Hn("The same selection must be used to override scale domains in a layered view."),r=t}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}(e)}function Zd(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=function(e,t,n,i){if("unaggregated"===e){const{valid:e,reason:i}=rp(t,n);if(!e)return void Hn(i)}else if(void 0===e&&i.useUnaggregatedDomain){const{valid:e}=rp(t,n);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]=Object.assign(Object.assign({},e.specifiedScales[t]),{domain:r})),"x"===t&&qo(i.x2)?qo(i.x)?lc(tp(n,r,e,"x"),tp(n,r,e,"x2"),"domain","scale",op):tp(n,r,e,"x2"):"y"===t&&qo(i.y2)?qo(i.y)?lc(tp(n,r,e,"y"),tp(n,r,e,"y2"),"domain","scale",op):tp(n,r,e,"y2"):tp(n,r,e,t)}function ep(e,t,n){var i;const r=null===(i=ai(n))||void 0===i?void 0:i.unit;return"temporal"===t||r?function(e,t,n){return e.map((e=>({signal:`{data: ${Go(e,{timeUnit:n,type:t})}}`})))}(e,t,r):[e]}function tp(e,t,n,i){const{encoding:o}=n,a=qo(o[i]),{type:s}=a,c=a.timeUnit;if(function(e){return e&&e.unionWith}(t)){const r=tp(e,void 0,n,i),o=ep(t.unionWith,s,c);return ac([...r.value,...o])}if(si(t))return ac([t]);if(t&&"unaggregated"!==t&&!Ki(t))return ac(ep(t,s,c));const u=n.stack;if(u&&i===u.fieldChannel){if("normalize"===u.offset)return sc([[0,1]]);const e=n.requestDataName(yc.Main);return sc([{data:e,field:n.vgField(i,{suffix:"start"})},{data:e,field:n.vgField(i,{suffix:"end"})}])}const l=an(i)&&ho(a)?function(e,t,n){if(!Ji(n))return;const i=e.fieldDef(t),r=i.sort;if(io(r))return{op:"min",field:jf(i,t),order:"ascending"};const{stack:o}=e,a=o?[...o.groupbyField?[o.groupbyField]:[],...o.stackBy.map((e=>e.fieldDef.field))]:void 0;if(no(r))return np(r,o&&!w(a,r.field));if(to(r)){const{encoding:t,order:n}=r,i=e.fieldDef(t),{aggregate:s,field:c}=i,u=o&&!w(a,c);if(ge(s)||me(s))return np({field:$o(i),order:n},u);if(he(s)||!s)return np({op:s,field:c,order:n},u)}else{if("descending"===r)return{op:"min",field:e.vgField(t),order:"descending"};if(w(["ascending",void 0],r))return!0}}(n,i,e):void 0;if(vo(a))return sc(ep([a.datum],s,c));const f=a;if("unaggregated"===t){const e=n.requestDataName(yc.Main),{field:t}=a;return sc([{data:e,field:$o({field:t,aggregate:"min"})},{data:e,field:$o({field:t,aggregate:"max"})}])}if(dn(f.bin)){if(Ji(e))return sc("bin-ordinal"===e?[]:[{data:T(l)?n.requestDataName(yc.Main):n.requestDataName(yc.Raw),field:n.vgField(i,Vo(f,i)?{binSuffix:"range"}:{}),sort:!0!==l&&(0,r.Kn)(l)?l:{field:n.vgField(i,{}),op:"min"}}]);{const{bin:e}=f;if(dn(e)){const t=pd(n,f.field,e);return sc([new Yd((()=>{const e=n.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return sc([{data:n.requestDataName(yc.Main),field:n.vgField(i,{})}])}}if(f.timeUnit&&w(["time","utc"],e)&&fo(i,f,Cp(n)?n.encoding[At(i)]:void 0,n.stack,n.markDef,n.config)){const e=n.requestDataName(yc.Main);return sc([{data:e,field:n.vgField(i)},{data:e,field:n.vgField(i,{suffix:"end"})}])}return sc(l?[{data:T(l)?n.requestDataName(yc.Main):n.requestDataName(yc.Raw),field:n.vgField(i),sort:l}]:[{data:n.requestDataName(yc.Main),field:n.vgField(i)}])}function np(e,t){const{op:n,field:i,order:r}=e;return Object.assign(Object.assign({op:null!=n?n:t?"sum":Qr},i?{field:J(i)}:{}),r?{order:r}:{})}function ip(e,t){var n;const i=e.component.scales[t],r=e.specifiedScales[t].domain,o=null===(n=e.fieldDef(t))||void 0===n?void 0:n.bin,a=Ki(r)&&r,s=gn(o)&&mn(o.extent)&&o.extent;(a||s)&&i.set("selectionExtent",null!=a?a:s,!0)}function rp(e,t){const{aggregate:n,type:i}=e;return n?(0,r.HD)(n)&&!xe[n]?{valid:!1,reason:zn(n)}:"quantitative"===i&&"log"===t?{valid:!1,reason:Nn(e)}:{valid:!0}:{valid:!1,reason:_n(e)}}function op(e,t,n,i){return e.explicit&&t.explicit&&Hn(function(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${x(n)} and ${x(i)}). Using the union of the two domains.`}(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function ap(e){const t=C(e.map((e=>{if(ui(e)){const{sort:t}=e;return function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{if(ui(e)){const t=e.sort;return void 0===t||T(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),O);if(0===t.length)return;if(1===t.length){const t=e[0];if(ui(t)&&n.length>0){let e=n[0];if(n.length>1)Hn(Ln),e=!0;else if((0,r.Kn)(e)&&"field"in e){const n=e.field;t.field===n&&(e=!e.order||{order:e.order})}return Object.assign(Object.assign({},t),{sort:e})}return t}const i=C(n.map((e=>T(e)||!("op"in e)||(0,r.HD)(e.op)&&e.op in pe?e:(Hn(function(e){return`Dropping sort property ${x(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(e)),!0))),O);let o;1===i.length?o=i[0]:i.length>1&&(Hn(Ln),o=!0);const a=C(e.map((e=>ui(e)?e.data:null)),(e=>e));return 1===a.length&&null!==a[0]?Object.assign({data:a[0],fields:t.map((e=>e.field))},o?{sort:o}:{}):Object.assign({fields:t},o?{sort:o}:{})}function sp(e){if(ui(e)&&(0,r.HD)(e.field))return e.field;if(function(e){return!(0,r.kJ)(e)&&"fields"in e&&!("data"in e)}(e)){let t;for(const n of e.fields)if(ui(n)&&(0,r.HD)(n.field))if(t){if(t!==n.field)return Hn("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=n.field;return Hn("Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect."),t}if(function(e){return!(0,r.kJ)(e)&&"fields"in e&&"data"in e}(e)){Hn("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");const t=e.fields[0];return(0,r.HD)(t)?t:void 0}}function cp(e,t){return ap(e.component.scales[t].get("domains").map((t=>(ui(t)&&(t.data=e.lookupDataSource(t.data)),t))))}function up(e){return Ep(e)||Sp(e)?e.children.reduce(((e,t)=>e.concat(up(t))),lp(e)):lp(e)}function lp(e){return z(e.component.scales).reduce(((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const o=i.combine(),{name:a,type:s,selectionExtent:c,domains:u,range:l,reverse:f}=o,d=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r(0,r.kJ)(e)&&2===e.length&&e[0]<=0&&e[1]>=0))}}const dp=["range","scheme"];function pp(e){return"x"===e?"width":"y"===e?"height":void 0}function gp(e,t){const n=e.fieldDef(t);if(n&&n.bin&&dn(n.bin)){const i=pd(e,n.field,n.bin),r=pp(t),o=e.getName(r);return new Yd((()=>{const t=e.getSignalName(i),n=`(${t}.stop - ${t}.start) / ${t}.step`;return`${e.getSignalName(o)} / (${n})`}))}}function mp(e,t){const n=t.specifiedScales[e],{size:i}=t,o=t.getScaleComponent(e).get("type");for(const i of dp)if(void 0!==n[i]){const a=ar(o,i),s=sr(e,i);if(a)if(s)Hn(s);else switch(i){case"range":{const i=n.range;if((0,r.kJ)(i)){if(It(e))return ac(i.map((e=>{if("width"===e||"height"===e){const n=t.getName(e),i=t.getSignalName.bind(t);return Yd.fromName(i,n)}return e})))}else if((0,r.Kn)(i))return ac({data:t.requestDataName(yc.Main),field:i.field,sort:{op:"min",field:t.vgField(e)}});return ac(i)}case"scheme":return ac(hp(n[i]))}else Hn(Mn(o,i,e))}if(e===Ae||e===ke){const t=e===Ae?"width":"height",n=i[t];if(fs(n)){if(Ji(o))return ac({step:n.step});Hn(Tn(t))}}const{rangeMin:a,rangeMax:s}=n,c=function(e,t){const{size:n,config:i,mark:o,encoding:a}=t,s=t.getSignalName.bind(t),{type:c}=qo(a[e]),u=t.getScaleComponent(e).get("type"),{domain:l,domainMid:f}=t.specifiedScales[e];switch(e){case Ae:case ke:{if(w(["point","band"],u))if(e!==Ae||n.width){if(e===ke&&!n.height){const e=hs(i.view,"height");if(fs(e))return e}}else{const e=hs(i.view,"width");if(fs(e))return e}const r=pp(e),o=t.getName(r);return e===ke&&Gi(u)?[Yd.fromName(s,o),0]:[0,Yd.fromName(s,o)]}case Re:{const a=bp(o,t.component.scales[e].get("zero"),i),s=function(e,t,n,i){const o={x:gp(n,"x"),y:gp(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==i.scale.maxBandSize)return i.scale.maxBandSize;const e=yp(t,o,i.view);return(0,r.hj)(e)?e-1:new Yd((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const e=yp(t,o,i.view);return(0,r.hj)(e)?Math.pow(vp*e,2):new Yd((()=>`pow(0.95 * ${e.signal}, 2)`))}}throw new Error(En("size",e))}(o,n,t,i);return Vi(u)?function(e,t,n){const i=()=>{const i=ra(t),r=ra(e),o=`(${i} - ${r}) / (${n} - 1)`;return`sequence(${r}, ${i} + ${o}, ${o})`};return si(t)?new Yd(i):{signal:i()}}(a,s,function(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&(0,r.kJ)(n)?n.length+1:(Hn(function(e){return`Domain for ${e} is required for threshold scale.`}(i)),3)}}(u,i,l,e)):[a,s]}case Ee:return[0,2*Math.PI];case We:return[0,360];case $e:return[0,new Yd((()=>`min(${t.getSignalName("width")},${t.getSignalName("height")})/2`))];case Je:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case Ge:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case qe:return"symbol";case Me:case Te:case Le:return"ordinal"===u?"nominal"===c?"category":"ordinal":void 0!==f?"diverging":"rect"===o||"geoshape"===o?"heatmap":"ramp";case Ie:case Ue:case He:return[i.scale.minOpacity,i.scale.maxOpacity]}throw new Error(`Scale range undefined for channel ${e}`)}(e,t);return(void 0!==a||void 0!==s)&&ar(o,"rangeMin")&&(0,r.kJ)(c)&&2===c.length?ac([null!=a?a:c[0],null!=s?s:c[1]]):sc(c)}function hp(e){return function(e){return!(0,r.HD)(e)&&!!e.name}(e)?Object.assign({scheme:e.name},y(e,["name"])):{scheme:e}}function bp(e,t,n){if(t)return si(t)?{signal:`${t.signal} ? 0 : ${bp(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(En("size",e))}const vp=.95;function yp(e,t,n){const i=fs(e.width)?e.width.step:ms(n,"width"),r=fs(e.height)?e.height.step:ms(n,"height");return t.x||t.y?new Yd((()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`)):Math.min(i,r)}function xp(e,t){Cp(e)?function(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:o,specifiedScales:a}=e;for(const s of z(n)){const c=a[s],u=n[s],l=e.getScaleComponent(s),f=qo(r[s]),d=c[t],p=l.get("type"),g=l.get("padding"),m=l.get("paddingInner"),h=ar(p,t),b=sr(s,t);if(void 0!==d&&(h?b&&Hn(b):Hn(Mn(p,t,s))),h&&void 0===b)if(void 0!==d){const e=f.timeUnit,n=f.type;switch(t){case"domainMax":case"domainMin":Jn(c[t])||"temporal"===n||e?u.set(t,{signal:Go(c[t],{type:n,timeUnit:e})},!0):u.set(t,c[t],!0);break;default:u.copyKeyFromObject(t,c)}}else{const n=t in Op?Op[t]({model:e,channel:s,fieldOrDatumDef:f,scaleType:p,scalePadding:g,scalePaddingInner:m,domain:c.domain,markDef:o,config:i}):i.scale[t];void 0!==n&&u.set(t,n,!1)}}}(e,t):wp(e,t)}const Op={bins:({model:e,fieldOrDatumDef:t})=>ho(t)?function(e,t){const n=t.bin;if(dn(n)){const i=pd(e,t.field,n);return new Yd((()=>e.getSignalName(i)))}if(pn(n)&&gn(n)&&void 0!==n.step)return{step:n.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function(e,t){if(w([Me,Te,Le],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,fieldOrDatumDef:n})=>function(e,t,n){var i;if(!(null===(i=Lo(n))||void 0===i?void 0:i.bin)&&!w([Bi,Pi],e))return t in Rt||void 0}(e,t,n),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>function(e,t,n,i,r,o){if(e in Rt){if(Xi(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:t,orient:a}=r;if("bar"===t&&(!ho(i)||!i.bin&&!i.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return o.continuousBandSize}if(t===_i)return n.pointPadding}}(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,config:i})=>function(e,t,n,i){if(void 0===e&&t in Rt){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:r}=i;return K(e,"bar"===n?t:r)}}(e,t,n.type,i.scale),paddingOuter:({scalePadding:e,channel:t,scaleType:n,markDef:i,scalePaddingInner:r,config:o})=>function(e,t,n,i,r,o){if(void 0===e&&t in Rt&&"band"===n){const{bandPaddingOuter:e}=o;return K(e,si(r)?{signal:`${r.signal}/2`}:r/2)}}(e,t,n,i.type,r,o.scale),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>function(e,t,n,i){return"x"===n&&void 0!==i.xReverse?Gi(e)&&"descending"===t?si(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse:!(!Gi(e)||"descending"!==t)||void 0}(t,ho(e)?e.sort:void 0,n,i.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:o})=>function(e,t,n,i,o){if(n&&"unaggregated"!==n&&Gi(o)){if((0,r.kJ)(n)){const e=n[0],t=n[n.length-1];if(e<=0&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!Vi(o))return!0;if((!ho(t)||!t.bin)&&w([...Wt,...Ht],e)){const{orient:t,type:n}=i;return!w(["bar","area","line","trail"],n)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e)}return!1}(e,t,n,i,o)};function jp(e){Cp(e)?function(e){const t=e.component.scales;for(const n of on){const i=t[n];if(!i)continue;const r=mp(n,e);i.setWithExplicit("range",r)}}(e):wp(e,"range")}function wp(e,t){const n=e.component.scales;for(const n of e.children)"range"===t?jp(n):xp(n,t);for(const i of z(n)){let r;for(const n of e.children){const e=n.component.scales[i];e&&(r=lc(r,e.getWithExplicit(t),t,"scale",cc(((e,n)=>{switch(t){case"range":return e.step&&n.step?e.step-n.step:0}return 0}))))}n[i].setWithExplicit(t,r)}}function Dp(e){Cp(e)?e.component.scales=function(e){const{encoding:t,mark:n}=e;return on.reduce(((i,r)=>{const o=qo(t[r]);if(o&&n===Dr&&r===qe&&o.type===Si)return i;let a=o&&o.scale;if(o&&null!==a&&!1!==a){a=null!=a?a:{};const t=function(e,t,n,i){const r=function(e,t,n){var i;switch(t.type){case"nominal":case"ordinal":if(st(e)||"discrete"===ln(e))return"shape"===e&&"ordinal"===t.type&&Hn(Pn(e,"ordinal")),"ordinal";if(e in Rt){if(w(["rect","bar","image","rule"],n))return"band"}else if("arc"===n&&e in Ut)return"band";return void 0!==t.band||Ao(t)&&(null===(i=t.axis)||void 0===i?void 0:i.tickBand)?"band":"point";case"temporal":return st(e)?"time":"discrete"===ln(e)?(Hn(Pn(e,"temporal")),"ordinal"):ho(t)&&t.timeUnit&&ai(t.timeUnit).utc?"utc":"time";case"quantitative":return st(e)?ho(t)&&dn(t.bin)?"bin-ordinal":"linear":"discrete"===ln(e)?(Hn(Pn(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(Cn(t.type))}(t,n,i),{type:o}=e;return an(t)?void 0!==o?function(e,t){if(!an(e))return!1;switch(e){case Ae:case ke:case Ee:case $e:return Xi(t)||w(["band","point"],t);case Re:case Je:case Ie:case Ue:case He:case We:return Xi(t)||Vi(t)||w(["band","point","ordinal"],t);case Me:case Te:case Le:return"band"!==t;case Ge:return"ordinal"===t||Vi(t);case qe:return"ordinal"===t}}(t,o)?ho(n)&&(a=o,s=n.type,!(w([Fi,$i],s)?void 0===a||Ji(a):s===Ci?w([Bi,Pi,void 0],a):s!==ki||w(["log","pow","sqrt","symlog","quantile","quantize","threshold",Ei,void 0],a)))?(Hn(function(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(o,r)),r):o:(Hn(function(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}(t,o,r)),r):r:null;var a,s}(a,r,o,n);i[r]=new fp(e.scaleName(r+"",!0),{value:t,explicit:a.type===t})}return i}),{})}(e):e.component.scales=function(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const n of e.children){Dp(n);for(const o of z(n.component.scales))if(r.scale[o]=null!==(t=r.scale[o])&&void 0!==t?t:Uf(o,e),"shared"===r.scale[o]){const e=i[o],t=n.component.scales[o].getWithExplicit("type");e?Ni(e.value,t.value)?i[o]=lc(e,t,"type","scale",Ap):(r.scale[o]="independent",delete i[o]):i[o]=t}}for(const t of z(i)){const r=e.scaleName(t,!0),o=i[t];n[t]=new fp(r,o);for(const n of e.children){const e=n.component.scales[t];e&&(n.renameScale(e.get("name"),r),e.merged=!0)}}return n}(e)}const Ap=cc(((e,t)=>Ti(e)-Ti(t)));var kp=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r(e.from&&e.from.data&&(e.from.data=this.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e),this.parent=n,this.config=o,this.view=ur(s),this.name=null!==(c=e.name)&&void 0!==c?c:i,this.title=Yo(e.title)?{text:e.title}:e.title?this.initTitle(e.title):void 0,this.scaleNameMap=n?n.scaleNameMap:new Fp,this.projectionNameMap=n?n.projectionNameMap:new Fp,this.signalNameMap=n?n.signalNameMap:new Fp,this.data=e.data,this.description=e.description,this.transforms=(null!==(u=e.transform)&&void 0!==u?u:[]).map((e=>xc(e)?{filter:m(e.filter,Di)}:e)),this.layout="layer"===t||"unit"===t?{}:function(e,t,n){var i,o;const a=n[t],s={},{spacing:c,columns:u}=a;void 0!==c&&(s.spacing=c),void 0!==u&&(ao(e)&&!ro(e.facet)||cs(e))&&(s.columns=u),us(e)&&(s.columns=1);for(const t of ps)if(void 0!==e[t])if("spacing"===t){const n=e[t];s[t]=(0,r.hj)(n)?n:{row:null!==(i=n.row)&&void 0!==i?i:c,column:null!==(o=n.column)&&void 0!==o?o:c}}else s[t]=e[t];return s}(e,t,o),this.component={data:{sources:n?n.component.data.sources:[],outputNodes:n?n.component.data.outputNodes:{},outputNodeRefCounts:n?n.component.data.outputNodeRefCounts:{},isFaceted:ao(e)||n&&n.component.data.isFaceted&&void 0===e.data},layoutSize:new oc,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},a?b(a):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}initTitle(e){const t=z(e),n={text:ea(e.text)};for(const i of t)n[i]=ea(e[i]);return n}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function(e,{ignoreRange:t}={}){Dp(e),Qd(e);for(const t of or)xp(e,t);t||jp(e)}(this)}parseProjection(){fd(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){id(this)}assembleGroupStyle(){var e,t;if("unit"===this.type||"layer"===this.type)return null!==(t=null===(e=this.view)||void 0===e?void 0:e.style)&&void 0!==t?t:"cell"}assembleEncodeFromView(e){const{style:t}=e,n=kp(e,["style"]),i={};for(const e of z(n)){const t=n[e];void 0!==t&&(i[e]=na(t))}return i}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=na(this.description)),"unit"!==this.type&&"layer"!==this.type)?_(t)?void 0:t:Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},null!=t?t:{})}assembleLayout(){if(!this.layout)return;const e=this.layout,{spacing:t}=e,n=kp(e,["spacing"]),{component:i,config:r}=this,o=function(e,t){const n={};for(const i of ut){const r=e[i];if(null==r?void 0:r.facetFieldDef){const{titleAnchor:e,titleOrient:o}=Af(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=wf(i,o),s=Nf(e,a);void 0!==s&&(n[a]=s)}}return _(n)?void 0:n}(i.layoutHeaders,r);return Object.assign(Object.assign(Object.assign({padding:t},this.assembleDefaultLayout()),n),o?{titleBand:o}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const n of ut)e[n].title&&t.push(Cf(this,n));for(const e of kf)t=t.concat(Ef(this,e));return t}assembleAxes(){return function(e,t){const{x:n=[],y:i=[]}=e;return[...n.map((e=>ff(e,"grid",t))),...i.map((e=>ff(e,"grid",t))),...n.map((e=>ff(e,"main",t))),...i.map((e=>ff(e,"main",t)))].filter((e=>e))}(this.component.axes,this.config)}assembleLegends(){return sd(this)}assembleProjections(){return Ep(e=this)||Sp(e)?function(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),cd(e))}(e):cd(e);var e}assembleTitle(){var e,t,n;const i=null!==(e=this.title)&&void 0!==e?e:{},{encoding:r}=i,o=kp(i,["encoding"]),a=Object.assign(Object.assign(Object.assign({},Ko(this.config.title).nonMark),o),r?{encode:{update:r}}:{});if(a.text)return w(["unit","layer"],this.type)?w(["middle",void 0],a.anchor)&&(a.frame=null!==(t=a.frame)&&void 0!==t?t:"group"):a.anchor=null!==(n=a.anchor)&&void 0!==n?n:"start",_(a)?void 0:a}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const i=!this.parent||$p(this.parent)?up(this):[];i.length>0&&(t.scales=i);const r=this.assembleAxes();r.length>0&&(t.axes=r);const o=this.assembleLegends();return o.length>0&&(t.legends=o),t}getName(e){return L((this.name?this.name+"_":"")+e)}getDataName(e){return this.getName(yc[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),n=this.component.data.outputNodeRefCounts;return n[t]=(n[t]||0)+1,t}getSizeSignalRef(e){if($p(this.parent)){const t=Jt(Wf(e)),n=this.component.scales[t];if(n&&!n.merged){const e=n.get("type"),i=n.get("range");if(Ji(e)&&ci(i)){const e=n.get("name"),i=sp(cp(this,t));return i?{signal:Rf(e,n,$o({aggregate:"distinct",field:i},{expr:"datum"}))}:(Hn(On(t)),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):xt(e)&&an(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,t){let n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(`Cannot find a selection named "${t}".`);return n}hasAxisOrientSignalRef(){var e,t;return(null===(e=this.component.axes.x)||void 0===e?void 0:e.some((e=>e.hasOrientSignalRef())))||(null===(t=this.component.axes.y)||void 0===t?void 0:t.some((e=>e.hasOrientSignalRef())))}}class Pp extends Bp{vgField(e,t={}){const n=this.fieldDef(e);if(n)return $o(n,t)}reduceFieldDef(e,t){return function(e,t,n,i){return e?z(e).reduce(((n,o)=>{const a=e[o];return(0,r.kJ)(a)?a.reduce(((e,n)=>t.call(i,e,n,o)),n):t.call(i,n,a,o)}),n):n}(this.getMapping(),((t,n,i)=>{const r=Lo(n);return r?e(t,r,i):t}),t)}forEachFieldDef(e,t){Oa(this.getMapping(),((t,n)=>{const i=Lo(t);i&&e(i,n)}),t)}}class _p extends pu{constructor(e,t){var n,i,r;super(e),this.transform=t,this.transform=b(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(i=o[0])&&void 0!==i?i:"value",null!==(r=o[1])&&void 0!==r?r:"density"]}clone(){return new _p(null,b(this.transform))}dependentFields(){var e;return new Set([this.transform.density,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${O(this.transform)}`}assemble(){const e=this.transform,{density:t}=e,n=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const o=an(r)&&t.getScaleComponent(r);return o&&Gi(o.get("type"))&&"count"!==n.aggregate&&!Ar(i)&&(e[n.field]=n),e}),{});return z(o).length?new zp(e,o):null}dependentFields(){return new Set(z(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${O(this.filter)}`}assemble(){const e=z(this.filter).reduce(((e,t)=>{const n=this.filter[t],i=$o(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push(`(isDate(${i}) || (isValid(${i}) && isFinite(+${i})))`):"quantitative"===n.type&&(e.push(`isValid(${i})`),e.push(`isFinite(+${i})`))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class Np extends pu{constructor(e,t){super(e),this.transform=t,this.transform=b(t);const{flatten:n,as:i=[]}=this.transform;this.transform.as=n.map(((e,t)=>{var n;return null!==(n=i[t])&&void 0!==n?n:e}))}clone(){return new Np(this.parent,b(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${O(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}class Mp extends pu{constructor(e,t){var n,i,r;super(e),this.transform=t,this.transform=b(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(i=o[0])&&void 0!==i?i:"key",null!==(r=o[1])&&void 0!==r?r:"value"]}clone(){return new Mp(null,b(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${O(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}class Tp extends pu{constructor(e,t,n,i){super(e),this.fields=t,this.geojson=n,this.signal=i}clone(){return new Tp(null,b(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let n=0;for(const i of[[_e,Pe],[Ne,ze]]){const r=i.map((e=>{const n=qo(t.encoding[e]);return ho(n)?n.field:vo(n)?{expr:`${n.datum}`}:wo(n)?{expr:`${n.value}`}:void 0}));(r[0]||r[1])&&(e=new Tp(e,r,null,t.getName("geojson_"+n++)))}if(t.channelHasField(qe)){const i=t.typedFieldDef(qe);i.type===Si&&(e=new Tp(e,null,i.field,t.getName("geojson_"+n++)))}return e}dependentFields(){var e;const t=(null!==(e=this.fields)&&void 0!==e?e:[]).filter(r.HD);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${O(this.fields)}`}assemble(){return Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})}}class Lp extends pu{constructor(e,t,n,i){super(e),this.projection=t,this.fields=n,this.as=i}clone(){return new Lp(null,this.projection,b(this.fields),b(this.as))}static parseAll(e,t){if(!t.projectionName())return e;for(const n of[[_e,Pe],[Ne,ze]]){const i=n.map((e=>{const n=qo(t.encoding[e]);return ho(n)?n.field:vo(n)?{expr:`${n.datum}`}:wo(n)?{expr:`${n.value}`}:void 0})),r=n[0]===Ne?"2":"";(i[0]||i[1])&&(e=new Lp(e,t.projectionName(),i,[t.getName("x"+r),t.getName("y"+r)]))}return e}dependentFields(){return new Set(this.fields.filter(r.HD))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${O(this.fields)} ${O(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class qp extends pu{constructor(e,t){super(e),this.transform=t}clone(){return new qp(null,b(this.transform))}dependentFields(){var e;return new Set([this.transform.impute,this.transform.key,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:n,step:i}=e;return{signal:`sequence(${[t,n,...i?[i]:[]].join(",")})`}}static makeFromTransform(e,t){return new qp(e,t)}static makeFromEncoding(e,t){const n=t.encoding,i=n.x,r=n.y;if(ho(i)&&ho(r)){const o=i.impute?i:r.impute?r:void 0;if(void 0===o)return;const a=i.impute?r:r.impute?i:void 0,{method:s,value:c,frame:u,keyvals:l}=o.impute,f=ja(t.mark,n);return new qp(e,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:a.field},s?{method:s}:{}),void 0!==c?{value:c}:{}),u?{frame:u}:{}),void 0!==l?{keyvals:l}:{}),f.length?{groupby:f}:{}))}return null}hash(){return`Impute ${O(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:n,method:i,groupby:r,value:o,frame:a=[null,null]}=this.transform,s=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:e,key:t},n?{keyvals:(c=n,void 0!==(null==c?void 0:c.stop)?this.processSequence(n):n)}:{}),{method:"value"}),r?{groupby:r}:{}),{value:i&&"value"!==i?null:o});var c;return i&&"value"!==i?[s,Object.assign({type:"window",as:[`imputed_${e}_value`],ops:[i],fields:[e],frame:a,ignorePeers:!1},r?{groupby:r}:{}),{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]:[s]}}class Rp extends pu{constructor(e,t){var n,i,r;super(e),this.transform=t,this.transform=b(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(i=o[0])&&void 0!==i?i:t.on,null!==(r=o[1])&&void 0!==r?r:t.loess]}clone(){return new Rp(null,b(this.transform))}dependentFields(){var e;return new Set([this.transform.loess,this.transform.on,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${O(this.transform)}`}assemble(){const e=this.transform,{loess:t,on:n}=e,i=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);re))}producedFields(){}dependentFields(){var e;return new Set([this.transform.pivot,this.transform.value,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}hash(){return`PivotTransform ${O(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:n,limit:i,op:r}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:e,value:t},void 0!==i?{limit:i}:{}),void 0!==r?{op:r}:{}),void 0!==n?{groupby:n}:{})}}class Jp extends pu{constructor(e,t){super(e),this.transform=t}clone(){return new Jp(null,b(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${O(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Gp(e){let t=0;return function n(i,r){var o;if(i instanceof Dd&&!i.isGenerator&&!dc(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof xd&&(i.parent instanceof Dd&&!r.source?(r.format=Object.assign(Object.assign({},null!==(o=r.format)&&void 0!==o?o:{}),{parse:i.assembleFormatParse()}),r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof bd){r.name||(r.name="data_"+t++),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source;for(const t of i.assemble())e.push(t)}else switch((i instanceof jd||i instanceof wd||i instanceof zp||i instanceof rf||i instanceof Of||i instanceof Lp||i instanceof Tp||i instanceof hd||i instanceof Wp||i instanceof Ud||i instanceof Wd||i instanceof Mp||i instanceof Np||i instanceof _p||i instanceof Rp||i instanceof Ip||i instanceof Up||i instanceof Od||i instanceof Jp||i instanceof Hp)&&r.transform.push(i.assemble()),(i instanceof md||i instanceof hu||i instanceof qp||i instanceof Id)&&r.transform.push(...i.assemble()),i instanceof gu&&(r.source&&0===r.transform.length?i.setSource(r.source):i.parent instanceof gu?i.setSource(r.name):(r.name||(r.name="data_"+t++),i.setSource(r.name),1===i.numChildren()&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof gu&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name="data_"+t++);let o=r.name;!r.source||r.transform.length>0?e.push(r):o=r.source;for(const e of i.children)n(e,{name:null,source:o,transform:[]});break}}}}function Xp(e,t){var n;const{facet:i,config:o,child:a,component:s}=e;if(e.channelHasField(t)){const c=i[t],u=Df("title",null,o,t);let l=zo(c,o,{allowDisabling:!0,includeDefault:void 0===u||!!u});a.component.layoutHeaders[t].title&&(l=(0,r.kJ)(l)?l.join(", "):l,l+=" / "+a.component.layoutHeaders[t].title,a.component.layoutHeaders[t].title=null);const f=Df("labelOrient",c,o,t),d=K((null!==(n=c.header)&&void 0!==n?n:{}).labels,o.header.labels,!0),p=w(["bottom","right"],f)?"footer":"header";s.layoutHeaders[t]={title:l,facetFieldDef:c,[p]:"facet"===t?[]:[Vp(e,t,d)]}}}function Vp(e,t,n){const i="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function Kp(e,t){var n;const{child:i}=e;if(i.component.axes[t]){const{layoutHeaders:o,resolve:a}=e.component;if(a.axis[t]=Hf(a,t),"shared"===a.axis[t]){const a="x"===t?"column":"row",s=o[a];for(const o of i.component.axes[t]){const t="top"===(r=o.get("orient"))||"left"===r||si(r)?"header":"footer";s[t]=null!==(n=s[t])&&void 0!==n?n:[Vp(e,a,!1)];const i=ff(o,"main",e.config,{header:!0});i&&s[t][0].axes.push(i),o.mainExtracted=!0}}}var r}function Yp(e){for(const t of e.children)t.parseLayoutSize()}function Qp(e,t){const n=Wf(t),i=Jt(n),r=e.component.resolve,o=e.component.layoutSize;let a;for(const t of e.children){const e=t.component.layoutSize.getWithExplicit(n),o=r.scale[i];if("independent"===o&&"step"===e.value){a=void 0;break}if(a){if("independent"===o&&a.value!==e.value){a=void 0;break}a=lc(a,e,n,"")}else a=e}if(a){for(const i of e.children)e.renameSignal(i.getName(n),e.getName(t)),i.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,a)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function Zp(e,t){const n="width"===t?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const e=r.get("type"),n=r.get("range");if(Ji(e)){const e=hs(i.view,t);return ci(n)||fs(e)?"step":e}return gs(i.view,t)}if(e.hasProjection||"arc"===e.mark)return gs(i.view,t);{const e=hs(i.view,t);return fs(e)?e.step:e}}function eg(e,t,n){return $o(t,Object.assign({suffix:`by_${$o(e)}`},null!=n?n:{}))}class tg extends Pp{constructor(e,t,n,i){super(e,"facet",t,n,i,e.resolve),this.child=jg(e.spec,this,this.getName("child"),void 0,i),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!ro(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=z(e),n={};for(const i of t){if(!w([je,we],i)){Hn(En(i,"facet"));break}const t=e[i];if(void 0===t.field){Hn(Sn(t,i));break}n[i]=this.initFacetFieldDef(t,i)}return n}initFacetFieldDef(e,t){const{header:n}=e,i=Io(function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0?{aggregate:Object.assign(Object.assign({},u?{cross:u}:{}),o.length?{fields:o,ops:a,as:s}:{})}:{})}facetSortFields(e){const{facet:t}=this,n=t[e];return n?no(n.sort)?[eg(n,n.sort,{expr:"datum"})]:(0,r.kJ)(n.sort)?[jf(n,e,{expr:"datum"})]:[$o(n,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,n=t[e];if(n){const{sort:e}=n;return[(no(e)?e.order:!(0,r.kJ)(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){var e;const{facet:t,config:n}=this;if(t.facet)return Pf(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const r of kf)if(t[r]){const o=Df("labelOrient",null===(e=t[r])||void 0===e?void 0:e.header,n,r);if(w(i[r],o))return Pf(t[r],r,n)}}assembleMarks(){const{child:e}=this,t=function(e){const t=[],n=Gp(t);for(const t of e.children)n(t,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),n=e.assembleGroupEncodeEntry(!1),i=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},i?{title:i}:{}),o?{style:o}:{}),{from:{facet:this.assembleFacet()},sort:{field:ut.map((e=>this.facetSortFields(e))).flat(),order:ut.map((e=>this.facetSortOrder(e))).flat()}}),t.length>0?{data:t}:{}),n?{encode:{update:n}}:{}),e.assembleGroup(function(e,t){if(e.component.selection&&z(e.component.selection).length){const n=(0,r.m8)(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:(0,Tc.n)("mousemove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return Tu(t)}(this,[])))]}getMapping(){return this.facet}}function ng(e,t){var n,i,r,o;for(const a of t){const t=a.data;if(e.name&&a.hasName()&&e.name!==a.dataName)continue;const s=null===(n=e.format)||void 0===n?void 0:n.mesh,c=null===(i=t.format)||void 0===i?void 0:i.feature;if(s&&c)continue;const u=null===(r=e.format)||void 0===r?void 0:r.feature;if((u||c)&&u!==c)continue;const l=null===(o=t.format)||void 0===o?void 0:o.mesh;if(!s&&!l||s===l)if(pc(e)&&pc(t)){if(h(e.values,t.values))return a}else if(dc(e)&&dc(t)){if(e.url===t.url)return a}else if(gc(e)&&e.name===a.dataName)return a}return null}function ig(e){var t,n,i,o,a,s,c,u,l,f;let d=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new Dd({values:[]});return t.push(e),e}const n=ng(e.data,t);if(n)return mc(e.data)||(n.data.format=k({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const n=new Dd(e.data);return t.push(n),n}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:p,outputNodeRefCounts:g}=e.component.data,m=e.parent?e.parent.component.data.ancestorParse.clone():new fc,h=e.data;mc(h)?(hc(h)?d=new wd(d,h.sequence):vc(h)&&(d=new jd(d,h.graticule)),m.parseNothing=!0):null===(null===(t=null==h?void 0:h.format)||void 0===t?void 0:t.parse)&&(m.parseNothing=!0),d=null!==(n=xd.makeExplicit(d,e,m))&&void 0!==n?n:d,d=new Od(d);const b=e.parent&&Ep(e.parent);(Cp(e)||$p(e))&&b&&(d=null!==(i=md.makeFromEncoding(d,e))&&void 0!==i?i:d),e.transforms.length>0&&(d=function(e,t,n){var i,r;let o=0;for(const a of t.transforms){let s,c;if(Ec(a))c=e=new Of(e,a),s="derived";else if(xc(a)){const r=yd(a);c=e=null!==(i=xd.makeWithAncestors(e,{},r,n))&&void 0!==i?i:e,e=new rf(e,t,a.filter)}else if(Bc(a))c=e=md.makeFromTransform(e,a,t),s="number";else if(_c(a))s="date",void 0===n.getWithExplicit(a.field).value&&(e=new xd(e,{[a.field]:s}),n.set(a.field,s,!1)),c=e=hu.makeFromTransform(e,a);else if(zc(a))c=e=hd.makeFromTransform(e,a),s="number",Qu(t)&&(e=new Od(e));else if(Oc(a))c=e=Wp.make(e,t,a,o++),s="derived";else if(Cc(a))c=e=new Ud(e,a),s="number";else if($c(a))c=e=new Wd(e,a),s="number";else if(Nc(a))c=e=Id.makeFromTransform(e,a),s="derived";else if(Mc(a))c=e=new Mp(e,a),s="derived";else if(Sc(a))c=e=new Np(e,a),s="derived";else if(jc(a))c=e=new Hp(e,a),s="derived";else if(Fc(a))e=new Jp(e,a);else if(Pc(a))c=e=qp.makeFromTransform(e,a),s="derived";else if(wc(a))c=e=new _p(e,a),s="derived";else if(Dc(a))c=e=new Ip(e,a),s="derived";else if(Ac(a))c=e=new Up(e,a),s="derived";else{if(!kc(a)){Hn(`Ignoring an invalid transform: ${x(a)}.`);continue}c=e=new Rp(e,a),s="derived"}if(c&&void 0!==s)for(const e of null!==(r=c.producedFields())&&void 0!==r?r:[])n.set(e,s,!1)}return e}(d,e,m));const v=function(e){const t={};if(Cp(e)&&e.component.selection)for(const n of z(e.component.selection)){const i=e.component.selection[n];for(const e of i.project.items)!e.channel&&V(e.field)>1&&(t[e.field]="flatten")}return t}(e),y=function(e){const t={};function n(e){var n;Jo(e)?t[e.field]="date":"quantitative"===e.type&&(n=e.aggregate,(0,r.HD)(n)&&w(["min","max"],n))?t[e.field]="number":V(e.field)>1?e.field in t||(t[e.field]="flatten"):Do(e)&&no(e.sort)&&V(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((Cp(e)||$p(e))&&e.forEachFieldDef(((t,i)=>{if(jo(t))n(t);else{const r=wt(i),o=e.fieldDef(r);n(Object.assign(Object.assign({},t),{type:o.type}))}})),Cp(e)){const{mark:n,markDef:i,encoding:r}=e;if(Ar(n)&&!e.encoding.order){const e=r["horizontal"===i.orient?"y":"x"];ho(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}(e);d=null!==(o=xd.makeWithAncestors(d,{},Object.assign(Object.assign({},v),y),m))&&void 0!==o?o:d,Cp(e)&&(d=Tp.parseAll(d,e),d=Lp.parseAll(d,e)),(Cp(e)||$p(e))&&(b||(d=null!==(a=md.makeFromEncoding(d,e))&&void 0!==a?a:d),d=null!==(s=hu.makeFromEncoding(d,e))&&void 0!==s?s:d,d=Of.parseAllForSortIndex(d,e));const O=e.getDataName(yc.Raw),j=new gu(d,O,yc.Raw,g);if(p[O]=j,d=j,Cp(e)){const t=hd.makeFromEncoding(d,e);t&&(d=t,Qu(e)&&(d=new Od(d))),d=null!==(c=qp.makeFromEncoding(d,e))&&void 0!==c?c:d,d=null!==(u=Id.makeFromEncoding(d,e))&&void 0!==u?u:d}Cp(e)&&(d=null!==(l=zp.make(d,e))&&void 0!==l?l:d);const D=e.getDataName(yc.Main),A=new gu(d,D,yc.Main,g);p[D]=A,d=A,Cp(e)&&function(e,t){Ku(e,(n=>{const i=n.name,r=e.getName(`lookup_${i}`);e.component.data.outputNodes[r]=n.materialized=new gu(new rf(t,e,{selection:i}),r,yc.Lookup,e.component.data.outputNodeRefCounts)}))}(e,A);let F=null;if($p(e)){const t=e.getName("facet");d=null!==(f=function(e,t){const{row:n,column:i}=t;if(n&&i){let t=null;for(const r of[n,i])if(no(r.sort)){const{field:n,op:i=Qr}=r.sort;e=t=new Wd(e,{joinaggregate:[{op:i,field:n,as:eg(r,r.sort,{forAs:!0})}],groupby:[$o(r)]})}return t}return null}(d,e.facet))&&void 0!==f?f:d,F=new bd(d,e,t,A.getSource()),p[t]=F}return Object.assign(Object.assign({},e.component.data),{outputNodes:p,outputNodeRefCounts:g,raw:j,main:A,facetRoot:F,ancestorParse:m})}class rg extends Bp{constructor(e,t,n,i){var r,o,a,s;super(e,"concat",t,n,i,e.resolve),"shared"!==(null===(o=null===(r=e.resolve)||void 0===r?void 0:r.axis)||void 0===o?void 0:o.x)&&"shared"!==(null===(s=null===(a=e.resolve)||void 0===a?void 0:a.axis)||void 0===s?void 0:s.y)||Hn("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(e).map(((e,t)=>jg(e,this,this.getName("concat_"+t),void 0,i)))}parseData(){this.component.data=ig(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of z(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return us(e)?e.vconcat:ls(e)?e.hconcat:e.concat}parseLayoutSize(){!function(e){Yp(e);const t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";Qp(e,t),Qp(e,n)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=Tf(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),n=e.assembleGroupStyle(),i=e.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:e.getName("group")},t?{title:t}:{}),n?{style:n}:{}),i?{encode:{update:i}}:{}),e.assembleGroup())}))}assembleDefaultLayout(){const e=this.layout.columns;return Object.assign(Object.assign({},null!=e?{columns:e}:{}),{bounds:"full",align:"each"})}}const og=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},ce),{labelExpr:1,encode:1}),ag=z(og);class sg extends oc{constructor(e={},t={},n=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=n}clone(){return new sg(b(this.explicit),b(this.implicit),this.mainExtracted)}hasAxisPart(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return si(this.explicit.orient)}}const cg={bottom:"top",top:"bottom",left:"right",right:"left"};function ug(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const n=e.length;for(let i=0;i{switch(n){case"title":return pa(e,t);case"gridScale":return{explicit:e.explicit,value:K(e.value,t.value)}}return uc(e,t,n,"axis")}));e.setWithExplicit(n,i)}return e}function fg(e,t,n,i,r){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(si(n.labelAngle)?n.labelAngle:ne(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===xf(i,r))return!0}return e===n[t]}const dg=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function pg(e,t){var n,i,r;let o=t.axis(e);const a=new sg,s=qo(t.encoding[e]),{mark:c,config:u}=t,l=(null==o?void 0:o.orient)||(null===(n=u["x"===e?"axisX":"axisY"])||void 0===n?void 0:n.orient)||(null===(i=u.axis)||void 0===i?void 0:i.orient)||function(e){return"x"===e?"bottom":"left"}(e),f=t.getScaleComponent(e).get("type"),d=function(e,t,n,i){const r="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:function(e){return e in Ri}(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],o="x"===e?"axisX":"axisY",a=si(n)?"axisOrient":"axis"+W(n),s=[...r,...r.map((e=>o+e.substr(4)))],c=["axis",a,o];return{vlOnlyAxisConfig:pf(s,i,e,n),vgAxisConfig:pf(c,i,e,n),axisConfigStyle:gf([...c,...s],i)}}(e,f,l,t.config),p=void 0!==o?!o:mf("disable",u.style,null==o?void 0:o.style,d).configValue;if(a.set("disable",p,void 0!==o),p)return a;o=o||{};const g=function(e,t,n,i,r){const o=null==t?void 0:t.labelAngle;if(void 0!==o)return si(o)?o:ne(o);{const{configValue:o}=mf("labelAngle",i,null==t?void 0:t.style,r);return void 0!==o?ne(o):n!==Ae||!w([$i,Fi],e.type)||ho(e)&&e.timeUnit?void 0:270}}(s,o,e,u.style,d),m={fieldOrDatumDef:s,axis:o,channel:e,model:t,scaleType:f,orient:l,labelAngle:g,mark:c,config:u};for(const n of ag){const i=n in hf?hf[n](m):le(n)?o[n]:void 0,r=void 0!==i,s=fg(i,n,o,t,e);if(r&&s)a.set(n,i,s);else{const{configValue:e,configFrom:t}=le(n)&&"values"!==n?mf(n,u.style,o.style,d):{},c=void 0!==e;r&&!c?a.set(n,i,s):("vgAxisConfig"!==t||dg.has(n)&&c||oe(e)||si(e))&&a.set(n,e,!1)}}const h=null!==(r=o.encoding)&&void 0!==r?r:{},b=ae.reduce(((n,i)=>{var r;if(!a.hasAxisPart(i))return n;const o=If(null!==(r=h[i])&&void 0!==r?r:{},t),s="labels"===i?function(e,t,n){var i;const{encoding:r,config:o}=e,a=null!==(i=qo(r[t]))&&void 0!==i?i:qo(r[At(t)]),s=e.axis(t)||{},{format:c,formatType:u}=s;return Rr(u)?Object.assign({text:Hr({fieldOrDatumDef:a,field:"datum.value",format:c,formatType:u,config:o})},n):n}(t,e,o):o;return void 0===s||_(s)||(n[i]={update:s}),n}),{});return _(b)||a.set("encode",b,!!o.encoding||void 0!==o.labelAngle),a}function gg(e,t){const{config:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Xc("x",e,{defaultPos:"mid"})),Xc("y",e,{defaultPos:"mid"})),Hc("size",e)),Hc("angle",e)),function(e,t,n){return n?{shape:{value:n}}:Hc("shape",e)}(e,0,t))}function mg(e){var t;const{config:n,markDef:i}=e,{orient:o}=i,a="horizontal"===o?"width":"height",s=e.getScaleComponent("horizontal"===o?"x":"y"),c=null!==(t=aa("size",i,n,{vgChannel:a}))&&void 0!==t?t:n.tick.bandSize;if(void 0!==c)return c;{const e=s?s.get("range"):void 0;return e&&ci(e)&&(0,r.hj)(e.step)?3*e.step/4:3*ms(n.view,a)/4}}const hg={arc:{vgMark:"arc",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Xc("x",e,{defaultPos:"mid"})),Xc("y",e,{defaultPos:"mid"})),nu(e,"radius","arc")),nu(e,"theta","arc"))},area:{vgMark:"area",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),Zc("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient})),Zc("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient})),uu(e))},bar:{vgMark:"rect",encodeEntry:e=>Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),nu(e,"x","bar")),nu(e,"y","bar"))},circle:{vgMark:"symbol",encodeEntry:e=>gg(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[Object.assign({type:"geoshape",projection:e.projectionName()},n&&ho(n)&&n.type===Si?{field:$o(n,{expr:"datum"})}:{})]}},image:{vgMark:"image",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),nu(e,"x","image")),nu(e,"y","image")),qc(e,"url"))},line:{vgMark:"line",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Xc("x",e,{defaultPos:"mid"})),Xc("y",e,{defaultPos:"mid"})),Hc("size",e,{vgChannel:"strokeWidth"})),uu(e))},point:{vgMark:"symbol",encodeEntry:e=>gg(e)},rect:{vgMark:"rect",encodeEntry:e=>Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),nu(e,"x","rect")),nu(e,"y","rect"))},rule:{vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Zc("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n})),Zc("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n})),Hc("size",e,{vgChannel:"strokeWidth"})):{}}},square:{vgMark:"symbol",encodeEntry:e=>gg(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),Xc("x",e,{defaultPos:"mid"})),Xc("y",e,{defaultPos:"mid"})),qc(e)),Hc("size",e,{vgChannel:"fontSize"})),Hc("angle",e)),lu("align",function(e,t,n){if(void 0===aa("align",e,n))return"center"}(e.markDef,0,t))),lu("baseline",function(e,t,n){if(void 0===aa("baseline",e,n))return"middle"}(e.markDef,0,t))),Xc("radius",e,{defaultPos:null,isMidPoint:!0})),Xc("theta",e,{defaultPos:null,isMidPoint:!0}))}},tick:{vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r="horizontal"===i?"width":"height",o="horizontal"===i?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Xc("x",e,{defaultPos:"mid",vgChannel:"xc"})),Xc("y",e,{defaultPos:"mid",vgChannel:"yc"})),Hc("size",e,{defaultValue:mg(e),vgChannel:r})),{[o]:na(aa("thickness",n,t))})}},trail:{vgMark:"trail",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},su(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Xc("x",e,{defaultPos:"mid"})),Xc("y",e,{defaultPos:"mid"})),Hc("size",e)),uu(e))}};const bg="faceted_path_",vg="stack_group_";function yg(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:o,config:a}=e,s=K(i.clip,function(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!!(t&&t.get("selectionExtent")||n&&n.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),c=oa(i),u=o.key,l=function(e){const{encoding:t,stack:n,mark:i,markDef:o,config:a}=e,s=t.order;if(!(!(0,r.kJ)(s)&&wo(s)&&j(s.value)||!s&&j(aa("order",o,a)))){if(((0,r.kJ)(s)||ho(s))&&!n)return la(s,{expr:"datum"});if(Ar(i)){const n="horizontal"===o.orient?"y":"x",i=t[n];if(ho(i)){const t=i.sort;return(0,r.kJ)(t)?{field:$o(i,{prefix:n,suffix:"sort_index",expr:"datum"})}:no(t)?{field:$o({aggregate:ba(e.encoding)?t.op:void 0,field:t.field},{expr:"datum"})}:to(t)?{field:$o(e.fieldDef(t.encoding),{expr:"datum"}),order:t.order}:null===t?void 0:{field:$o(i,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"})}}}}}(e),f=function(e){if(!e.component.selection)return null;const t=z(e.component.selection).length;let n=t,i=e.parent;for(;i&&0===n;)n=z(i.component.selection).length,i=i.parent;return n?{interactive:t>0||!!e.encoding.tooltip}:null}(e),d=aa("aria",i,a),p=hg[n].postEncodingTransform?hg[n].postEncodingTransform(e):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("marks"),type:hg[n].vgMark},s?{clip:!0}:{}),c?{style:c}:{}),u?{key:u.field}:{}),l?{sort:l}:{}),f||{}),!1===d?{aria:d}:{}),{from:{data:t.fromPrefix+e.requestDataName(yc.Main)},encode:{update:hg[n].encodeEntry(e)}}),p?{transform:p}:{})]}class xg extends Pp{constructor(e,t,n,i={},r){super(e,"unit",t,n,r,void 0,ds(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection={},this.children=[];const o=Cr(e.mark)?Object.assign({},e.mark):{type:e.mark},a=o.type;void 0===o.filled&&(o.filled=function(e,t,{graticule:n}){if(n)return!1;const i=sa("filled",e,t),r=e.type;return K(i,r!==hr&&r!==mr&&r!==vr)}(o,r,{graticule:e.data&&vc(e.data)}));const s=this.encoding=ya(e.encoding||{},a,o.filled,r);this.markDef=function(e,t,n){const i=ur(e),r=aa("orient",i,n);if(i.orient=function(e,t,n){switch(e){case hr:case jr:case wr:case yr:case br:case gr:return}const{x:i,y:r,x2:o,y2:a}=t;switch(e){case pr:if(ho(i)&&(pn(i.bin)||ho(r)&&r.aggregate&&!i.aggregate))return"vertical";if(ho(r)&&(pn(r.bin)||ho(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(a||o){if(n)return n;if(!o&&(ho(i)&&i.type===ki&&!dn(i.bin)||xo(i)))return"horizontal";if(!a&&(ho(r)&&r.type===ki&&!dn(r.bin)||xo(r)))return"vertical"}case vr:if(o&&(!ho(i)||!pn(i.bin))&&a&&(!ho(r)||!pn(r.bin)))return;case dr:if(a)return ho(r)&&pn(r.bin)?"horizontal":"vertical";if(o)return ho(i)&&pn(i.bin)?"vertical":"horizontal";if(e===vr){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case mr:case xr:{const t=yo(i),o=yo(r);if(t&&!o)return"tick"!==e?"horizontal":"vertical";if(!t&&o)return"tick"!==e?"vertical":"horizontal";if(t&&o){const t=i,o=r,a=t.type===Ci,s=o.type===Ci;return a&&!s?"tick"!==e?"vertical":"horizontal":!a&&s?"tick"!==e?"horizontal":"vertical":!t.aggregate&&o.aggregate?"tick"!==e?"vertical":"horizontal":t.aggregate&&!o.aggregate?"tick"!==e?"horizontal":"vertical":n||"vertical"}return n||void 0}}return"vertical"}(i.type,t,r),void 0!==r&&r!==i.orient&&Hn(`Specified orient "${i.orient}" overridden with "${r}".`),"bar"===i.type&&i.orient){const e=aa("cornerRadiusEnd",i,n);if(void 0!==e){const n="horizontal"===i.orient&&t.x2||"vertical"===i.orient&&t.y2?["cornerRadius"]:Br[i.orient];for(const t of n)i[t]=e;void 0!==i.cornerRadiusEnd&&delete i.cornerRadiusEnd}}return void 0===aa("opacity",i,n)&&(i.opacity=function(e,t){if(w([hr,xr,jr,wr],e)&&!ba(t))return.7}(i.type,t)),void 0===aa("cursor",i,n)&&(i.cursor=function(e,t,n){return t.href||e.href||aa("href",e,n)?"pointer":e.cursor}(i,t,n)),i}(o,s,r),this.size=function({encoding:e,size:t}){for(const n of Wt){const i=kt(n);fs(t[i])&&yo(e[n])&&(delete t[i],Hn(Tn(i)))}return t}({encoding:s,size:ds(e)?Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):i}),this.stack=_s(a,s),this.specifiedScales=this.initScales(a,s),this.specifiedAxes=this.initAxes(s),this.specifiedLegends=this.initLegends(s),this.specifiedProjection=e.projection,this.selection=e.selection}get hasProjection(){const{encoding:e}=this,t=this.mark===Dr,n=e&&ot.some((t=>Oo(e[t])));return t||n}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return on.reduce(((e,n)=>{var i;const r=qo(t[n]);return r&&(e[n]=this.initScale(null!==(i=r.scale)&&void 0!==i?i:{})),e}),{})}initScale(e){const{domain:t,range:n}=e,i=ur(e);return(0,r.kJ)(t)&&(i.domain=t.map(ea)),(0,r.kJ)(n)&&(i.range=n.map(ea)),i}initAxes(e){return Wt.reduce(((t,n)=>{const i=e[n];if(Oo(i)||n===Ae&&Oo(e.x2)||n===ke&&Oo(e.y2)){const e=Oo(i)?i.axis:void 0;t[n]=e?this.initAxis(Object.assign({},e)):e}return t}),{})}initAxis(e){const t=z(e),n={};for(const i of t){const t=e[i];n[i]=oe(t)?Zo(t):ea(t)}return n}initLegends(e){return nn.reduce(((t,n)=>{const i=qo(e[n]);if(i&&function(e){switch(e){case Me:case Te:case Le:case Re:case qe:case Ie:case Je:case Ge:return!0;case Ue:case He:case We:return!1}}(n)){const e=i.legend;t[n]=e?ur(e):e}return t}),{})}parseData(){this.component.data=ig(this)}parseLayoutSize(){!function(e){const{size:t,component:n}=e;for(const i of Wt){const r=kt(i);if(t[r]){const e=t[r];n.layoutSize.set(r,fs(e)?"step":e,!0)}else{const t=Zp(e,r);n.layoutSize.set(r,t,!1)}}}(this)}parseSelections(){this.component.selection=function(e,t){var n;const i={},o=e.config.selection;for(const a of z(null!=t?t:{})){const s=b(t[a]),c=o[s.type],{fields:u,encodings:l}=c,f=of(c,["fields","encodings"]);for(const e in f)"encodings"===e&&s.fields||"fields"===e&&s.encodings||("mark"===e&&(s[e]=Object.assign(Object.assign({},f[e]),s[e])),void 0!==s[e]&&!0!==s[e]||(s[e]=null!==(n=f[e])&&void 0!==n?n:s[e]));const d=L(a),p=i[d]=Object.assign(Object.assign({},s),{name:d,events:(0,r.HD)(s.on)?(0,Tc.n)(s.on,"scope"):b(s.on)});zu(p,(n=>{n.has(p)&&n.parse&&n.parse(e,p,s,t[a])}))}return i}(this,this.selection)}parseMarkGroup(){this.component.mark=function(e){if(w([mr,dr,Or],e.mark)){const t=ja(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:bg+e.requestDataName(yc.Main),data:e.requestDataName(yc.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:yg(e,{fromPrefix:bg})}]}(e,t)}else if(w([pr],e.mark)){const t=di.some((t=>aa(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=yg(e,{fromPrefix:vg}),n=e.scaleName(e.stack.fieldChannel),i=(t={})=>e.vgField(e.stack.fieldChannel,t),r=(e,t)=>`${e}(${[i({prefix:"min",suffix:"start",expr:t}),i({prefix:"max",suffix:"start",expr:t}),i({prefix:"min",suffix:"end",expr:t}),i({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${n}',${e})`)).join(",")})`;let o,a;"x"===e.stack.fieldChannel?(o=Object.assign(Object.assign({},v(t.encode.update,["y","yc","y2","height",...di])),{x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}}),a={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update=Object.assign(Object.assign({},y(t.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(o=Object.assign(Object.assign({},v(t.encode.update,["x","xc","x2","width"])),{y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}}),a={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update=Object.assign(Object.assign({},y(t.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const n of di){const i=sa(n,e.markDef,e.config);t.encode.update[n]?(o[n]=t.encode.update[n],delete t.encode.update[n]):i&&(o[n]=na(i)),i&&(t.encode.update[n]={value:0})}const s=e.fieldDef(e.stack.groupbyChannel),c=$o(s)?[$o(s)]:[];return((null==s?void 0:s.bin)||(null==s?void 0:s.timeUnit))&&c.push($o(s,{binSuffix:"end"})),o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((n,i)=>{if(t.encode.update[i])return Object.assign(Object.assign({},n),{[i]:t.encode.update[i]});{const t=sa(i,e.markDef,e.config);return void 0!==t?Object.assign(Object.assign({},n),{[i]:na(t)}):n}}),o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(yc.Main),name:vg+e.requestDataName(yc.Main),groupby:c,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:o},marks:[{type:"group",encode:{update:a},marks:[t]}]}]}(e)}return yg(e)}(this)}parseAxesAndHeaders(){var e;this.component.axes=(e=this,Wt.reduce(((t,n)=>(e.component.scales[n]&&(t[n]=[pg(n,e)]),t)),{}))}assembleSelectionTopLevelSignals(e){return function(e,t){let n=!1;return Ku(e,((i,o)=>{const a=i.name,s=(0,r.m8)(a+Ju);if(0===t.filter((e=>e.name===a)).length){const e="global"===i.resolve?"union":i.resolve,n="multi"===i.type?", true)":")";t.push({name:i.name,update:`${Xu}(${s}, ${(0,r.m8)(e)}${n}`})}n=!0,o.topLevelSignals&&(t=o.topLevelSignals(e,i,t)),zu(i,(n=>{n.topLevelSignals&&(t=n.topLevelSignals(e,i,t))}))})),n&&0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),Tu(t)}(this,e)}assembleSignals(){return[...df(this),...(e=this,t=[],Ku(e,((n,i)=>{const o=n.name;let a=i.modifyExpr(e,n);t.push(...i.signals(e,n)),zu(n,(i=>{i.signals&&(t=i.signals(e,n,t)),i.modifyExpr&&(a=i.modifyExpr(e,n,a))})),t.push({name:o+"_modify",on:[{events:{signal:n.name+Gu},update:`modify(${(0,r.m8)(n.name+Ju)}, ${a})`}]})})),Tu(t))];var e,t}assembleSelectionData(e){return function(e,t){const n=[...t];return Ku(e,(t=>{const i={name:t.name+Ju};if(t.init){const n=t.project.items.map((e=>{const{signals:t}=e;return function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);rNu(e,!1)));i.values="interval"===t.type?[{unit:Yu(e,{escape:!1}),fields:n,values:r}]:r.map((t=>({unit:Yu(e,{escape:!1}),fields:n,values:t})))}n.filter((e=>e.name===t.name+Ju)).length||n.push(i)})),n}(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return Tf(this)}assembleMarks(){var e;let t=null!==(e=this.component.mark)&&void 0!==e?e:[];return this.parent&&Ep(this.parent)||(t=Mu(this,t)),t.map(this.correctDataNames)}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return ha(this.encoding,e)}fieldDef(e){return Lo(this.encoding[e])}typedFieldDef(e){const t=this.fieldDef(e);return jo(t)?t:null}}class Og extends Bp{constructor(e,t,n,i,r){super(e,"layer",t,n,r,e.resolve,e.view);const o=Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});this.children=e.layer.map(((e,t)=>{if($s(e))return new Og(e,this,this.getName("layer_"+t),o,r);if(ga(e))return new xg(e,this,this.getName("layer_"+t),o,r);throw new Error(bn(e))}))}parseData(){this.component.data=ig(this);for(const e of this.children)e.parseData()}parseLayoutSize(){Yp(this),Qp(this,"width"),Qp(this,"height")}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of z(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){!function(e){var t;const{axes:n,resolve:i}=e.component,r={top:0,bottom:0,right:0,left:0};for(const t of e.children){t.parseAxesAndHeaders();for(const r of z(t.component.axes))i.axis[r]=Hf(e.component.resolve,r),"shared"===i.axis[r]&&(n[r]=ug(n[r],t.component.axes[r]),n[r]||(i.axis[r]="independent",delete n[r]))}for(const o of Wt){for(const a of e.children)if(a.component.axes[o]){if("independent"===i.axis[o]){n[o]=(null!==(t=n[o])&&void 0!==t?t:[]).concat(a.component.axes[o]);for(const e of a.component.axes[o]){const{value:t,explicit:n}=e.getWithExplicit("orient");if(!si(t)){if(r[t]>0&&!n){const n=cg[t];r[t]>r[n]&&e.set("orient",n,!1)}r[t]++}}}delete a.component.axes[o]}if("independent"===i.axis[o]&&n[o]&&n[o].length>1)for(const e of n[o])e.get("grid")&&!e.explicit.grid&&(e.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),df(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),Tf(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return function(e,t){for(const n of e.children)Cp(n)&&(t=Mu(n,t));return t}(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),sd(this))}}function jg(e,t,n,i,r){if(ao(e))return new tg(e,t,n,r);if($s(e))return new Og(e,t,n,i,r);if(ga(e))return new xg(e,t,n,i,r);if(function(e){return us(e)||ls(e)||cs(e)}(e))return new rg(e,t,n,r);throw new Error(bn(e))}function wg(e,t={}){var n;t.logger&&(n=t.logger,Un=n),t.fieldTitle&&_o(t.fieldTitle);try{const n=Ds((0,r.fE)(t.config,e.config)),i=ec(e,n),o=jg(i,null,"",void 0,n);return o.parse(),function(e,t){Xd(e.sources);let n=0,i=0;for(let i=0;i<5&&Kd(e,t,!0);i++)n++;e.sources.map(Hd);for(let n=0;n<5&&Kd(e,t,!1);n++)i++;Xd(e.sources),5===Math.max(n,i)&&Hn("Maximum optimization runs(5) reached.")}(o.component.data,o),{spec:function(e,t,n={},i){const o=e.config?function(e){e=b(e);for(const t of ks)delete e[t];if(e.axis)for(const t in e.axis)oe(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Xa)delete e.legend[t];if(e.mark){for(const t of Sr)delete e.mark[t];e.mark.tooltip&&(0,r.Kn)(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(is(e.params)),delete e.params);for(const t of As){for(const n of Sr)delete e[t][n];const n=Fs[t];if(n)for(const i of n)delete e[t][i];Cs(e,t)}for(const t of z(Ja))delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=Ko(e.title);_(t)||(e.style["group-title"]=Object.assign(Object.assign({},e.style["group-title"]),t)),_(n)||(e.style["group-subtitle"]=Object.assign(Object.assign({},e.style["group-subtitle"]),n)),_(i)?delete e.title:e.title=i}(e);for(const t in e)(0,r.Kn)(e[t])&&_(e[t])&&delete e[t];return _(e)?void 0:e}(e.config):void 0,a=[].concat(e.assembleSelectionData([]),function(e,t){var n,i;const r=[],o=Gp(r);let a=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+a++);const e=t.assemble();o(t,e)}for(const e of r)0===e.transform.length&&delete e.transform;let s=0;for(const[e,t]of r.entries())0!==(null!==(n=t.transform)&&void 0!==n?n:[]).length||t.source||r.splice(s++,0,r.splice(e,1)[0]);for(const t of r)for(const n of null!==(i=t.transform)&&void 0!==i?i:[])"lookup"===n.type&&(n.from=e.outputNodes[n.from].getSource());for(const e of r)e.name in t&&(e.values=t[e.name]);return r}(e.component.data,n)),s=e.assembleProjections(),c=e.assembleTitle(),u=e.assembleGroupStyle(),l=e.assembleGroupEncodeEntry(!0);let f=e.assembleLayoutSignals();f=f.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:d}=t,p=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0?{projections:s}:{}),e.assembleGroup([...f,...e.assembleSelectionTopLevelSignals([]),...is(d)])),o?{config:o}:{}),i?{usermeta:i}:{})}(o,function(e,t,n,i){const o=i.component.layoutSize.get("width"),a=i.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},i.hasAxisOrientSignalRef()&&(t.resize=!0)):(0,r.HD)(t)&&(t={type:t}),o&&a&&("fit"===(s=t.type)||"fit-x"===s||"fit-y"===s))if("step"===o&&"step"===a)Hn(xn()),t.type="pad";else if("step"===o||"step"===a){const e="step"===o?"width":"height";Hn(xn(Jt(e)));const n="width"===e?"height":"width";t.type=function(e){return e?`fit-${Jt(e)}`:"fit"}(n)}var s;return Object.assign(Object.assign(Object.assign({},1===z(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t}),rc(n,!1)),rc(e,!0))}(e,i.autosize,n,o),e.datasets,e.usermeta),normalized:i}}finally{t.logger&&(Un=In),t.fieldTitle&&_o(Bo)}}}}]); \ No newline at end of file diff --git a/luxwidget/labextension/static/271.095f063beef3970b4fbf.js b/luxwidget/labextension/static/271.095f063beef3970b4fbf.js new file mode 100644 index 0000000..c7c420b --- /dev/null +++ b/luxwidget/labextension/static/271.095f063beef3970b4fbf.js @@ -0,0 +1,2 @@ +/*! For license information please see 271.095f063beef3970b4fbf.js.LICENSE.txt */ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[271],{676:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nr})},3349:(t,e,n)=>{"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:()=>r})},5991:(t,e,n)=>{"use strict";function r(t,e){for(var n=0;ni})},6156:(t,e,n)=>{"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:()=>r})},1253:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(9756);function i(t,e){if(null==t)return{};var n,i,o=(0,r.Z)(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},4699:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2961);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t,e)||(0,r.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(676),i=n(2961);function o(t){return function(t){if(Array.isArray(t))return(0,r.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||(0,i.Z)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},484:(t,e,n)=>{"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,{Z:()=>r})},2961:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(676);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}},8958:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>M});var r=n(1253),i=n(2122),o=n(6271),a=n.n(o),u=(n(5697),n(6010)),s=n(8786),c=n(9693),l=n(4456),f=n(7294),p="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function d(t){var e=o.useRef(t);return p((function(){e.current=t})),o.useCallback((function(){return e.current.apply(void 0,arguments)}),[])}var h=n(4896),v=n(7329),m=n(9756),g=n(3349),y=n(3552),b=n(220);function w(t,e){var n=Object.create(null);return t&&o.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&(0,o.isValidElement)(t)?e(t):t}(t)})),n}function _(t,e,n){return null!=n[e]?n[e]:t.props[e]}function x(t,e,n){var r=w(t.children),i=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var u={};for(var s in e){if(i[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.pulsate,i=void 0!==r&&r,o=e.center,u=void 0===o?a||e.pulsate:o,s=e.fakeElement,c=void 0!==s&&s;if("mousedown"===t.type&&g.current)g.current=!1;else{"touchstart"===t.type&&(g.current=!0);var l,f,p,d=c?null:w.current,h=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(u||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)l=Math.round(h.width/2),f=Math.round(h.height/2);else{var v=t.touches?t.touches[0]:t,m=v.clientX,x=v.clientY;l=Math.round(m-h.left),f=Math.round(x-h.top)}if(u)(p=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2==0&&(p+=1);else{var S=2*Math.max(Math.abs((d?d.clientWidth:0)-l),l)+2,k=2*Math.max(Math.abs((d?d.clientHeight:0)-f),f)+2;p=Math.sqrt(Math.pow(S,2)+Math.pow(k,2))}t.touches?null===b.current&&(b.current=function(){_({pulsate:i,rippleX:l,rippleY:f,rippleSize:p,cb:n})},y.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):_({pulsate:i,rippleX:l,rippleY:f,rippleSize:p,cb:n})}}),[a,_]),S=o.useCallback((function(){x({},{pulsate:!0})}),[x]),k=o.useCallback((function(t,e){if(clearTimeout(y.current),"touchend"===t.type&&b.current)return t.persist(),b.current(),b.current=null,void(y.current=setTimeout((function(){k(t,e)})));b.current=null,d((function(t){return t.length>0?t.slice(1):t})),m.current=e}),[]);return o.useImperativeHandle(e,(function(){return{pulsate:S,start:x,stop:k}}),[S,x,k]),o.createElement("span",(0,i.Z)({className:(0,u.Z)(s.root,c),ref:w},l),o.createElement(E,{component:null,exit:!0},p))}));const C=(0,s.Z)((function(t){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(O));var T=o.forwardRef((function(t,e){var n=t.action,a=t.buttonRef,s=t.centerRipple,c=void 0!==s&&s,p=t.children,v=t.classes,m=t.className,g=t.component,y=void 0===g?"button":g,b=t.disabled,w=void 0!==b&&b,_=t.disableRipple,x=void 0!==_&&_,S=t.disableTouchRipple,k=void 0!==S&&S,E=t.focusRipple,R=void 0!==E&&E,Z=t.focusVisibleClassName,O=t.onBlur,T=t.onClick,P=t.onFocus,j=t.onFocusVisible,A=t.onKeyDown,M=t.onKeyUp,I=t.onMouseDown,N=t.onMouseLeave,L=t.onMouseUp,z=t.onTouchEnd,F=t.onTouchMove,D=t.onTouchStart,B=t.onDragLeave,W=t.tabIndex,U=void 0===W?0:W,$=t.TouchRippleProps,H=t.type,V=void 0===H?"button":H,q=(0,r.Z)(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),G=o.useRef(null),Y=o.useRef(null),K=o.useState(!1),J=K[0],X=K[1];w&&J&&X(!1);var Q=(0,h.Z)(),tt=Q.isFocusVisible,et=Q.onBlurVisible,nt=Q.ref;function rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;return d((function(r){return e&&e(r),!n&&Y.current&&Y.current[t](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){X(!0),G.current.focus()}}}),[]),o.useEffect((function(){J&&R&&!x&&Y.current.pulsate()}),[x,R,J]);var it=rt("start",I),ot=rt("stop",B),at=rt("stop",L),ut=rt("stop",(function(t){J&&t.preventDefault(),N&&N(t)})),st=rt("start",D),ct=rt("stop",z),lt=rt("stop",F),ft=rt("stop",(function(t){J&&(et(t),X(!1)),O&&O(t)}),!1),pt=d((function(t){G.current||(G.current=t.currentTarget),tt(t)&&(X(!0),j&&j(t)),P&&P(t)})),dt=function(){var t=l.findDOMNode(G.current);return y&&"button"!==y&&!("A"===t.tagName&&t.href)},ht=o.useRef(!1),vt=d((function(t){R&&!ht.current&&J&&Y.current&&" "===t.key&&(ht.current=!0,t.persist(),Y.current.stop(t,(function(){Y.current.start(t)}))),t.target===t.currentTarget&&dt()&&" "===t.key&&t.preventDefault(),A&&A(t),t.target===t.currentTarget&&dt()&&"Enter"===t.key&&!w&&(t.preventDefault(),T&&T(t))})),mt=d((function(t){R&&" "===t.key&&Y.current&&J&&!t.defaultPrevented&&(ht.current=!1,t.persist(),Y.current.stop(t,(function(){Y.current.pulsate(t)}))),M&&M(t),T&&t.target===t.currentTarget&&dt()&&" "===t.key&&!t.defaultPrevented&&T(t)})),gt=y;"button"===gt&&q.href&&(gt="a");var yt={};"button"===gt?(yt.type=V,yt.disabled=w):("a"===gt&&q.href||(yt.role="button"),yt["aria-disabled"]=w);var bt=(0,f.Z)(a,e),wt=(0,f.Z)(nt,G),_t=(0,f.Z)(bt,wt),xt=o.useState(!1),St=xt[0],kt=xt[1];o.useEffect((function(){kt(!0)}),[]);var Et=St&&!x&&!w;return o.createElement(gt,(0,i.Z)({className:(0,u.Z)(v.root,m,J&&[v.focusVisible,Z],w&&v.disabled),onBlur:ft,onClick:T,onFocus:pt,onKeyDown:vt,onKeyUp:mt,onMouseDown:it,onMouseLeave:ut,onMouseUp:at,onDragLeave:ot,onTouchEnd:ct,onTouchMove:lt,onTouchStart:st,ref:_t,tabIndex:w?-1:U},yt,q),p,Et?o.createElement(C,(0,i.Z)({ref:Y,center:c},$)):null)}));const P=(0,s.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(T);var j=n(3871),A=o.forwardRef((function(t,e){var n=t.children,a=t.classes,s=t.className,c=t.color,l=void 0===c?"default":c,f=t.component,p=void 0===f?"button":f,d=t.disabled,h=void 0!==d&&d,v=t.disableElevation,m=void 0!==v&&v,g=t.disableFocusRipple,y=void 0!==g&&g,b=t.endIcon,w=t.focusVisibleClassName,_=t.fullWidth,x=void 0!==_&&_,S=t.size,k=void 0===S?"medium":S,E=t.startIcon,R=t.type,Z=void 0===R?"button":R,O=t.variant,C=void 0===O?"text":O,T=(0,r.Z)(t,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=E&&o.createElement("span",{className:(0,u.Z)(a.startIcon,a["iconSize".concat((0,j.Z)(k))])},E),M=b&&o.createElement("span",{className:(0,u.Z)(a.endIcon,a["iconSize".concat((0,j.Z)(k))])},b);return o.createElement(P,(0,i.Z)({className:(0,u.Z)(a.root,a[C],s,"inherit"===l?a.colorInherit:"default"!==l&&a["".concat(C).concat((0,j.Z)(l))],"medium"!==k&&[a["".concat(C,"Size").concat((0,j.Z)(k))],a["size".concat((0,j.Z)(k))]],m&&a.disableElevation,h&&a.disabled,x&&a.fullWidth),component:p,disabled:h,focusRipple:!y,focusVisibleClassName:(0,u.Z)(a.focusVisible,w),ref:e,type:Z},T),o.createElement("span",{className:a.label},A,n,M))}));const M=(0,s.Z)((function(t){return{root:(0,i.Z)({},t.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:t.shape.borderRadius,color:t.palette.text.primary,transition:t.transitions.create(["background-color","box-shadow","border"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,c.U1)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:t.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:(0,c.U1)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:(0,c.U1)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===t.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(t.palette.action.disabledBackground)}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat((0,c.U1)(t.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.primary.main),backgroundColor:(0,c.U1)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat((0,c.U1)(t.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.secondary.main),backgroundColor:(0,c.U1)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(t.palette.action.disabled)}},contained:{color:t.palette.getContrastText(t.palette.grey[300]),backgroundColor:t.palette.grey[300],boxShadow:t.shadows[2],"&:hover":{backgroundColor:t.palette.grey.A100,boxShadow:t.shadows[4],"@media (hover: none)":{boxShadow:t.shadows[2],backgroundColor:t.palette.grey[300]},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:t.shadows[6]},"&:active":{boxShadow:t.shadows[8]},"&$disabled":{color:t.palette.action.disabled,boxShadow:t.shadows[0],backgroundColor:t.palette.action.disabledBackground}},containedPrimary:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark,"@media (hover: none)":{backgroundColor:t.palette.primary.main}}},containedSecondary:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.dark,"@media (hover: none)":{backgroundColor:t.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(A)},4742:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Ft});var r=n(2122),i=n(4699),o=n(1253),a=n(6156),u=n(6271),s=n(4456),c=(n(5697),n(6010)),l=n(5953),f=n(9693),p=n(8786),d=n(3871),h=n(2666),v=n(8920);function m(t,e){var n=t.timeout,r=t.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[e.mode]||0,delay:i.transitionDelay}}var g=n(7294);function y(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var b={entering:{opacity:1,transform:y(1)},entered:{opacity:1,transform:"none"}},w=u.forwardRef((function(t,e){var n=t.children,a=t.disableStrictModeCompat,s=void 0!==a&&a,c=t.in,l=t.onEnter,f=t.onEntered,p=t.onEntering,d=t.onExit,w=t.onExited,_=t.onExiting,x=t.style,S=t.timeout,k=void 0===S?"auto":S,E=t.TransitionComponent,R=void 0===E?h.ZP:E,Z=(0,o.Z)(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),O=u.useRef(),C=u.useRef(),T=(0,v.Z)(),P=T.unstable_strictMode&&!s,j=u.useRef(null),A=(0,g.Z)(n.ref,e),M=(0,g.Z)(P?j:void 0,A),I=function(t){return function(e,n){if(t){var r=P?[j.current,e]:[e,n],o=(0,i.Z)(r,2),a=o[0],u=o[1];void 0===u?t(a):t(a,u)}}},N=I(p),L=I((function(t,e){!function(t){t.scrollTop}(t);var n,r=m({style:x,timeout:k},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===k?(n=T.transitions.getAutoHeightDuration(t.clientHeight),C.current=n):n=i,t.style.transition=[T.transitions.create("opacity",{duration:n,delay:o}),T.transitions.create("transform",{duration:.666*n,delay:o})].join(","),l&&l(t,e)})),z=I(f),F=I(_),D=I((function(t){var e,n=m({style:x,timeout:k},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===k?(e=T.transitions.getAutoHeightDuration(t.clientHeight),C.current=e):e=r,t.style.transition=[T.transitions.create("opacity",{duration:e,delay:i}),T.transitions.create("transform",{duration:.666*e,delay:i||.333*e})].join(","),t.style.opacity="0",t.style.transform=y(.75),d&&d(t)})),B=I(w);return u.useEffect((function(){return function(){clearTimeout(O.current)}}),[]),u.createElement(R,(0,r.Z)({appear:!0,in:c,nodeRef:P?j:void 0,onEnter:L,onEntered:z,onEntering:N,onExit:D,onExited:B,onExiting:F,addEndListener:function(t,e){var n=P?t:e;"auto"===k&&(O.current=setTimeout(n,C.current||0))},timeout:"auto"===k?null:k},Z),(function(t,e){return u.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:y(.75),visibility:"exited"!==t||c?void 0:"hidden"},b[t],x,n.props.style),ref:M},e))}))}));w.muiSupportAuto=!0;const _=w;var x="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,S=function(){for(var t=["Edge","Trident","Firefox"],e=0;e=0)return 1;return 0}(),k=x&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),S))}};function E(t){return t&&"[object Function]"==={}.toString.call(t)}function R(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function Z(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function O(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=R(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:O(Z(t))}function C(t){return t&&t.referenceNode?t.referenceNode:t}var T=x&&!(!window.MSInputMethodContext||!document.documentMode),P=x&&/MSIE 10/.test(navigator.userAgent);function j(t){return 11===t?T:10===t?P:T||P}function A(t){if(!t)return document.documentElement;for(var e=j(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===R(n,"position")?A(n):n:t?t.ownerDocument.documentElement:document.documentElement}function M(t){return null!==t.parentNode?M(t.parentNode):t}function I(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,u,s=o.commonAncestorContainer;if(t!==s&&e!==s||r.contains(i))return"BODY"===(u=(a=s).nodeName)||"HTML"!==u&&A(a.firstElementChild)!==a?A(s):s;var c=M(t);return c.host?I(c.host,e):I(t,M(e).host)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[n]}return t[n]}function L(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=N(e,"top"),i=N(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function z(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+r+"Width"])}function F(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],j(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function D(t){var e=t.body,n=t.documentElement,r=j(10)&&getComputedStyle(n);return{height:F("Height",e,n,r),width:F("Width",e,n,r)}}var B=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},W=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=j(10),i="HTML"===e.nodeName,o=V(t),a=V(e),u=O(t),s=R(e),c=parseFloat(s.borderTopWidth),l=parseFloat(s.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=H({top:o.top-a.top-c,left:o.left-a.left-l,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var p=parseFloat(s.marginTop),d=parseFloat(s.marginLeft);f.top-=c-p,f.bottom-=c-p,f.left-=l-d,f.right-=l-d,f.marginTop=p,f.marginLeft=d}return(r&&!n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(f=L(f,e)),f}function G(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=q(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:N(n),u=e?0:N(n,"left"),s={top:a-r.top+r.marginTop,left:u-r.left+r.marginLeft,width:i,height:o};return H(s)}function Y(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===R(t,"position"))return!0;var n=Z(t);return!!n&&Y(n)}function K(t){if(!t||!t.parentElement||j())return document.documentElement;for(var e=t.parentElement;e&&"none"===R(e,"transform");)e=e.parentElement;return e||document.documentElement}function J(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?K(t):I(t,C(e));if("viewport"===r)o=G(a,i);else{var u=void 0;"scrollParent"===r?"BODY"===(u=O(Z(e))).nodeName&&(u=t.ownerDocument.documentElement):u="window"===r?t.ownerDocument.documentElement:r;var s=q(u,a,i);if("HTML"!==u.nodeName||Y(a))o=s;else{var c=D(t.ownerDocument),l=c.height,f=c.width;o.top+=s.top-s.marginTop,o.bottom=l+s.top,o.left+=s.left-s.marginLeft,o.right=f+s.left}}var p="number"==typeof(n=n||0);return o.left+=p?n:n.left||0,o.top+=p?n:n.top||0,o.right-=p?n:n.right||0,o.bottom-=p?n:n.bottom||0,o}function X(t){return t.width*t.height}function Q(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=J(n,r,o,i),u={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},s=Object.keys(u).map((function(t){return $({key:t},u[t],{area:X(u[t])})})).sort((function(t,e){return e.area-t.area})),c=s.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:s[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function tt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?K(e):I(e,C(n));return q(n,i,r)}function et(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function nt(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function rt(t,e,n){n=n.split("-")[0];var r=et(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",u=o?"left":"top",s=o?"height":"width",c=o?"width":"height";return i[a]=e[a]+e[s]/2-r[s]/2,i[u]=n===u?e[u]-r[c]:e[nt(u)],i}function it(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ot(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t.name===n}));var r=it(t,(function(t){return t.name===n}));return t.indexOf(r)}(t,0,n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&E(n)&&(e.offsets.popper=H(e.offsets.popper),e.offsets.reference=H(e.offsets.reference),e=n(e,t))})),e}function at(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=tt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Q(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=rt(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ot(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function ut(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function st(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=wt.indexOf(t),r=wt.slice(n+1).concat(wt.slice(0,n));return e?r.reverse():r}var xt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,u=-1!==["bottom","top"].indexOf(n),s=u?"left":"top",c=u?"width":"height",l={start:U({},s,o[s]),end:U({},s,o[s]+o[c]-a[c])};t.offsets.popper=$({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n,r=e.offset,i=t.placement,o=t.offsets,a=o.popper,u=o.reference,s=i.split("-")[0];return n=vt(+r)?[+r,0]:function(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),u=a.indexOf(it(a,(function(t){return-1!==t.search(/,|\s/)})));a[u]&&-1===a[u].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,c=-1!==u?[a.slice(0,u).concat([a[u].split(s)[0]]),[a[u].split(s)[1]].concat(a.slice(u+1))]:[a];return(c=c.map((function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var u=void 0;switch(a){case"%p":u=n;break;case"%":case"%r":default:u=r}return H(u)[e]/100*o}return"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o}(t,i,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){vt(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))}))})),i}(r,a,u,s),"left"===s?(a.top+=n[0],a.left-=n[1]):"right"===s?(a.top+=n[0],a.left+=n[1]):"top"===s?(a.left+=n[0],a.top-=n[1]):"bottom"===s&&(a.left+=n[0],a.top+=n[1]),t.popper=a,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||A(t.instance.popper);t.instance.reference===n&&(n=A(n));var r=st("transform"),i=t.instance.popper.style,o=i.top,a=i.left,u=i[r];i.top="",i.left="",i[r]="";var s=J(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=u,e.boundaries=s;var c=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]s[t]&&!e.escapeWithReference&&(r=Math.min(l[n],s[t]-("right"===t?l.width:l.height))),U({},n,r)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=$({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),u=a?"right":"bottom",s=a?"left":"top",c=a?"width":"height";return n[u]o(r[u])&&(t.offsets.popper[s]=o(r[u])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!yt(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,u=o.reference,s=-1!==["left","right"].indexOf(i),c=s?"height":"width",l=s?"Top":"Left",f=l.toLowerCase(),p=s?"left":"top",d=s?"bottom":"right",h=et(r)[c];u[d]-ha[d]&&(t.offsets.popper[f]+=u[f]+h-a[d]),t.offsets.popper=H(t.offsets.popper);var v=u[f]+u[c]/2-h/2,m=R(t.instance.popper),g=parseFloat(m["margin"+l]),y=parseFloat(m["border"+l+"Width"]),b=v-t.offsets.popper[f]-g-y;return b=Math.max(Math.min(a[c]-h,b),0),t.arrowElement=r,t.offsets.arrow=(U(n={},f,Math.round(b)),U(n,p,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(ut(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=J(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=nt(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[r,i];break;case"clockwise":a=_t(r);break;case"counterclockwise":a=_t(r,!0);break;default:a=e.behavior}return a.forEach((function(u,s){if(r!==u||a.length===s+1)return t;r=t.placement.split("-")[0],i=nt(r);var c=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),v=f(c.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&v||"bottom"===r&&m,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===o&&d||y&&"end"===o&&h||!y&&"start"===o&&v||!y&&"end"===o&&m),w=!!e.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&m||!y&&"end"===o&&v),_=b||w;(p||g||_)&&(t.flipped=!0,(p||g)&&(r=a[s+1]),_&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=$({},t.offsets.popper,rt(t.instance.popper,t.offsets.reference,t.placement)),t=ot(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),u=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(u?i[a?"width":"height"]:0),t.placement=nt(e),t.offsets.popper=H(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!yt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=it(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};B(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=k(this.update.bind(this)),this.options=$({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys($({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){r.options.modifiers[e]=$({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return $({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&E(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return W(t,[{key:"update",value:function(){return at.call(this)}},{key:"destroy",value:function(){return ct.call(this)}},{key:"enableEventListeners",value:function(){return dt.call(this)}},{key:"disableEventListeners",value:function(){return ht.call(this)}}]),t}();St.Utils=("undefined"!=typeof window?window:n.g).PopperUtils,St.placements=bt,St.Defaults=xt;const kt=St;var Et=n(159),Rt=n(4236),Zt="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;const Ot=u.forwardRef((function(t,e){var n=t.children,r=t.container,i=t.disablePortal,o=void 0!==i&&i,a=t.onRendered,c=u.useState(null),l=c[0],f=c[1],p=(0,g.Z)(u.isValidElement(n)?n.ref:null,e);return Zt((function(){o||f(function(t){return t="function"==typeof t?t():t,s.findDOMNode(t)}(r)||document.body)}),[r,o]),Zt((function(){if(l&&!o)return(0,Rt.Z)(e,l),function(){(0,Rt.Z)(e,null)}}),[e,l,o]),Zt((function(){a&&(l||o)&&a()}),[a,l,o]),o?u.isValidElement(n)?u.cloneElement(n,{ref:p}):n:l?s.createPortal(n,l):l}));function Ct(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0])||arguments[0];return function(e){var n=f.props;"mouseover"===e.type&&n.onMouseOver&&t&&n.onMouseOver(e),nt.current&&"touchstart"!==e.type||(J&&J.removeAttribute("title"),clearTimeout(it.current),clearTimeout(ot.current),k||Nt&&R?(e.persist(),it.current=setTimeout((function(){dt(e)}),Nt?R:k)):dt(e))}},vt=(0,Mt.Z)(),mt=vt.isFocusVisible,gt=vt.onBlurVisible,yt=vt.ref,bt=u.useState(!1),wt=bt[0],_t=bt[1],xt=function(){wt&&(_t(!1),gt())},St=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(e){J||X(e.currentTarget),mt(e)&&(_t(!0),ht()(e));var n=f.props;n.onFocus&&t&&n.onFocus(e)}},kt=function(t){clearTimeout(Lt),Lt=setTimeout((function(){Nt=!1}),800+A),lt(!1),N&&N(t),clearTimeout(rt.current),rt.current=setTimeout((function(){nt.current=!1}),Y.transitions.duration.shortest)},Et=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(e){var n=f.props;"blur"===e.type&&(n.onBlur&&t&&n.onBlur(e),xt()),"mouseleave"===e.type&&n.onMouseLeave&&e.currentTarget===J&&n.onMouseLeave(e),clearTimeout(it.current),clearTimeout(ot.current),e.persist(),ot.current=setTimeout((function(){kt(e)}),A)}},Zt=function(t){nt.current=!0;var e=f.props;e.onTouchStart&&e.onTouchStart(t)},Ot=(0,g.Z)(X,e),Ct=(0,g.Z)(yt,Ot),Tt=u.useCallback((function(t){(0,Rt.Z)(Ct,s.findDOMNode(t))}),[Ct]),Pt=(0,g.Z)(f.ref,Tt);""===$&&(ft=!1);var jt=!ft&&!b,It=(0,r.Z)({"aria-describedby":ft?pt:null,title:jt&&"string"==typeof $?$:null},G,f.props,{className:(0,c.Z)(G.className,f.props.className),onTouchStart:Zt,ref:Pt}),zt={};x||(It.onTouchStart=function(t){Zt(t),clearTimeout(ot.current),clearTimeout(rt.current),clearTimeout(at.current),t.persist(),at.current=setTimeout((function(){ht()(t)}),O)},It.onTouchEnd=function(t){f.props.onTouchEnd&&f.props.onTouchEnd(t),clearTimeout(at.current),clearTimeout(ot.current),t.persist(),ot.current=setTimeout((function(){kt(t)}),I)}),b||(It.onMouseOver=ht(),It.onMouseLeave=Et(),P&&(zt.onMouseOver=ht(!1),zt.onMouseLeave=Et(!1))),m||(It.onFocus=St(),It.onBlur=Et(),P&&(zt.onFocus=St(!1),zt.onBlur=Et(!1)));var Ft=u.useMemo((function(){return(0,l.Z)({popperOptions:{modifiers:{arrow:{enabled:Boolean(tt),element:tt}}}},U)}),[tt,U]);return u.createElement(u.Fragment,null,u.cloneElement(f,It),u.createElement(W,(0,r.Z)({className:(0,c.Z)(p.popper,P&&p.popperInteractive,a&&p.popperArrow),placement:D,anchorEl:J,open:!!J&&ft,id:It["aria-describedby"],transition:!0},zt,Ft),(function(t){var e=t.placement,n=t.TransitionProps;return u.createElement(V,(0,r.Z)({timeout:Y.transitions.duration.shorter},n,q),u.createElement("div",{className:(0,c.Z)(p.tooltip,p["tooltipPlacement".concat((0,d.Z)(e.split("-")[0]))],nt.current&&p.touch,a&&p.tooltipArrow)},$,a?u.createElement("span",{className:p.arrow,ref:et}):null))})))}));const Ft=(0,p.Z)((function(t){return{popper:{zIndex:t.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},tooltip:{backgroundColor:(0,f.U1)(t.palette.grey[700],.9),borderRadius:t.shape.borderRadius,color:t.palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(10),lineHeight:"".concat(It(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:(0,f.U1)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(It(16/14),"em"),fontWeight:t.typography.fontWeightRegular},tooltipPlacementLeft:(0,a.Z)({transformOrigin:"right center",margin:"0 24px "},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:(0,a.Z)({transformOrigin:"left center",margin:"0 24px"},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:(0,a.Z)({transformOrigin:"center bottom",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:(0,a.Z)({transformOrigin:"center top",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip",flip:!1})(zt)},9693:(t,e,n)=>{"use strict";n.d(e,{oo:()=>o,vq:()=>a,ve:()=>u,tB:()=>s,wy:()=>c,mi:()=>l,H3:()=>f,_4:()=>p,U1:()=>d,_j:()=>h,$n:()=>v});var r=n(288);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)}function o(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map((function(t){return t+t}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(t,e){return e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}function a(t){if(0===t.indexOf("#"))return t;var e=s(t).values;return"#".concat(e.map((function(t){return 1===(e=t.toString(16)).length?"0".concat(e):e;var e})).join(""))}function u(t){var e=(t=s(t)).values,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+n/30)%12;return i-o*Math.max(Math.min(e-3,9-e,1),-1)},u="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===t.type&&(u+="a",l.push(e[3])),c({type:u,values:l})}function s(t){if(t.type)return t;if("#"===t.charAt(0))return s(o(t));var e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,r.Z)(3,t));var i=t.substring(e+1,t.length-1).split(",");return{type:n,values:i=i.map((function(t){return parseFloat(t)}))}}function c(t){var e=t.type,n=t.values;return-1!==e.indexOf("rgb")?n=n.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e,"(").concat(n.join(", "),")")}function l(t,e){var n=f(t),r=f(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(t){var e="hsl"===(t=s(t)).type?s(u(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return f(t)>.5?h(t,e):v(t,e)}function d(t,e){return t=s(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=e,c(t)}function h(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]*=1-e;return c(t)}function v(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;return c(t)}},867:(t,e,n)=>{"use strict";n.d(e,{Z:()=>at});var r=n(1253),i=n(5953),o=n(2122),a=["xs","sm","md","lg","xl"];function u(t){var e=t.values,n=void 0===e?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,i=t.unit,u=void 0===i?"px":i,s=t.step,c=void 0===s?5:s,l=(0,r.Z)(t,["values","unit","step"]);function f(t){var e="number"==typeof n[t]?n[t]:t;return"@media (min-width:".concat(e).concat(u,")")}function p(t,e){var r=a.indexOf(e);return r===a.length-1?f(t):"@media (min-width:".concat("number"==typeof n[t]?n[t]:t).concat(u,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[a[r+1]]?n[a[r+1]]:e)-c/100).concat(u,")")}return(0,o.Z)({keys:a,values:n,up:f,down:function(t){var e=a.indexOf(t)+1,r=n[a[e]];return e===a.length?f("xs"):"@media (max-width:".concat(("number"==typeof r&&e>0?r:t)-c/100).concat(u,")")},between:p,only:function(t){return p(t,t)},width:function(t){return n[t]}},l)}var s=n(6156);function c(t,e,n){var r;return(0,o.Z)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.Z)({paddingLeft:e(2),paddingRight:e(2)},n,(0,s.Z)({},t.up("sm"),(0,o.Z)({paddingLeft:e(3),paddingRight:e(3)},n[t.up("sm")])))},toolbar:(r={minHeight:56},(0,s.Z)(r,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,s.Z)(r,t.up("sm"),{minHeight:64}),r)},n)}var l=n(288);const f={black:"#000",white:"#fff"},p={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},d="#7986cb",h="#3f51b5",v="#303f9f",m="#ff4081",g="#f50057",y="#c51162",b="#e57373",w="#f44336",_="#d32f2f",x="#ffb74d",S="#ff9800",k="#f57c00",E="#64b5f6",R="#2196f3",Z="#1976d2",O="#81c784",C="#4caf50",T="#388e3c";var P=n(9693),j={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:f.white,default:p[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A={text:{primary:f.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:p[800],default:"#303030"},action:{active:f.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function M(t,e,n,r){var i=r.light||r,o=r.dark||1.5*r;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=(0,P.$n)(t.main,i):"dark"===e&&(t.dark=(0,P._j)(t.main,o)))}function I(t){var e=t.primary,n=void 0===e?{light:d,main:h,dark:v}:e,a=t.secondary,u=void 0===a?{light:m,main:g,dark:y}:a,s=t.error,c=void 0===s?{light:b,main:w,dark:_}:s,I=t.warning,N=void 0===I?{light:x,main:S,dark:k}:I,L=t.info,z=void 0===L?{light:E,main:R,dark:Z}:L,F=t.success,D=void 0===F?{light:O,main:C,dark:T}:F,B=t.type,W=void 0===B?"light":B,U=t.contrastThreshold,$=void 0===U?3:U,H=t.tonalOffset,V=void 0===H?.2:H,q=(0,r.Z)(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function G(t){return(0,P.mi)(t,A.text.primary)>=$?A.text.primary:j.text.primary}var Y=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(t=(0,o.Z)({},t)).main&&t[e]&&(t.main=t[e]),!t.main)throw new Error((0,l.Z)(4,e));if("string"!=typeof t.main)throw new Error((0,l.Z)(5,JSON.stringify(t.main)));return M(t,"light",n,V),M(t,"dark",r,V),t.contrastText||(t.contrastText=G(t.main)),t},K={dark:A,light:j};return(0,i.Z)((0,o.Z)({common:f,type:W,primary:Y(n),secondary:Y(u,"A400","A200","A700"),error:Y(c),warning:Y(N),info:Y(z),success:Y(D),grey:p,contrastThreshold:$,getContrastText:G,augmentColor:Y,tonalOffset:V},K[W]),q)}function N(t){return Math.round(1e5*t)/1e5}var L={textTransform:"uppercase"},z='"Roboto", "Helvetica", "Arial", sans-serif';function F(t,e){var n="function"==typeof e?e(t):e,a=n.fontFamily,u=void 0===a?z:a,s=n.fontSize,c=void 0===s?14:s,l=n.fontWeightLight,f=void 0===l?300:l,p=n.fontWeightRegular,d=void 0===p?400:p,h=n.fontWeightMedium,v=void 0===h?500:h,m=n.fontWeightBold,g=void 0===m?700:m,y=n.htmlFontSize,b=void 0===y?16:y,w=n.allVariants,_=n.pxToRem,x=(0,r.Z)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),S=c/14,k=_||function(t){return"".concat(t/b*S,"rem")},E=function(t,e,n,r,i){return(0,o.Z)({fontFamily:u,fontWeight:t,fontSize:k(e),lineHeight:n},u===z?{letterSpacing:"".concat(N(r/e),"em")}:{},i,w)},R={h1:E(f,96,1.167,-1.5),h2:E(f,60,1.2,-.5),h3:E(d,48,1.167,0),h4:E(d,34,1.235,.25),h5:E(d,24,1.334,0),h6:E(v,20,1.6,.15),subtitle1:E(d,16,1.75,.15),subtitle2:E(v,14,1.57,.1),body1:E(d,16,1.5,.15),body2:E(d,14,1.43,.15),button:E(v,14,1.75,.4,L),caption:E(d,12,1.66,.4),overline:E(d,12,2.66,1,L)};return(0,i.Z)((0,o.Z)({htmlFontSize:b,pxToRem:k,round:N,fontFamily:u,fontSize:c,fontWeightLight:f,fontWeightRegular:d,fontWeightMedium:v,fontWeightBold:g},R),x,{clone:!1})}function D(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const B=["none",D(0,2,1,-1,0,1,1,0,0,1,3,0),D(0,3,1,-2,0,2,2,0,0,1,5,0),D(0,3,3,-2,0,3,4,0,0,1,8,0),D(0,2,4,-1,0,4,5,0,0,1,10,0),D(0,3,5,-1,0,5,8,0,0,1,14,0),D(0,3,5,-1,0,6,10,0,0,1,18,0),D(0,4,5,-2,0,7,10,1,0,2,16,1),D(0,5,5,-3,0,8,10,1,0,3,14,2),D(0,5,6,-3,0,9,12,1,0,3,16,2),D(0,6,6,-3,0,10,14,1,0,4,18,3),D(0,6,7,-4,0,11,15,1,0,4,20,3),D(0,7,8,-4,0,12,17,2,0,5,22,4),D(0,7,8,-4,0,13,19,2,0,5,24,4),D(0,7,9,-4,0,14,21,2,0,5,26,4),D(0,8,9,-5,0,15,22,2,0,6,28,5),D(0,8,10,-5,0,16,24,2,0,6,30,5),D(0,8,11,-5,0,17,26,2,0,6,32,5),D(0,9,11,-5,0,18,28,2,0,7,34,6),D(0,9,12,-6,0,19,29,2,0,7,36,6),D(0,10,13,-6,0,20,31,3,0,8,38,7),D(0,10,13,-6,0,21,33,3,0,8,40,7),D(0,10,14,-6,0,22,35,3,0,8,42,7),D(0,11,14,-7,0,23,36,3,0,9,44,8),D(0,11,15,-7,0,24,38,3,0,9,46,8)],W={borderRadius:4};var U=n(4699),$=n(484),H=(n(5697),{xs:0,sm:600,md:960,lg:1280,xl:1920}),V={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(H[t],"px)")}};const q=function(t,e){return e?(0,i.Z)(t,e,{clone:!1}):t};var G,Y,K={m:"margin",p:"padding"},J={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},X={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Q=(G=function(t){if(t.length>2){if(!X[t])return[t];t=X[t]}var e=t.split(""),n=(0,U.Z)(e,2),r=n[0],i=n[1],o=K[r],a=J[i]||"";return Array.isArray(a)?a.map((function(t){return o+t})):[o+a]},Y={},function(t){return void 0===Y[t]&&(Y[t]=G(t)),Y[t]}),tt=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function et(t){var e=t.spacing||8;return"number"==typeof e?function(t){return e*t}:Array.isArray(e)?function(t){return e[t]}:"function"==typeof e?e:function(){}}function nt(t){var e=et(t.theme);return Object.keys(t).map((function(n){if(-1===tt.indexOf(n))return null;var r=function(t,e){return function(n){return t.reduce((function(t,r){return t[r]=function(t,e){if("string"==typeof e||null==e)return e;var n=t(Math.abs(e));return e>=0?n:"number"==typeof n?-n:"-".concat(n)}(e,n),t}),{})}}(Q(n),e),i=t[n];return function(t,e,n){if(Array.isArray(e)){var r=t.theme.breakpoints||V;return e.reduce((function(t,i,o){return t[r.up(r.keys[o])]=n(e[o]),t}),{})}if("object"===(0,$.Z)(e)){var i=t.theme.breakpoints||V;return Object.keys(e).reduce((function(t,r){return t[i.up(r)]=n(e[r]),t}),{})}return n(e)}(t,i,r)})).reduce(q,{})}function rt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var e=et({spacing:t}),n=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=t.breakpoints,n=void 0===e?{}:e,o=t.mixins,a=void 0===o?{}:o,s=t.palette,l=void 0===s?{}:s,f=t.spacing,p=t.typography,d=void 0===p?{}:p,h=(0,r.Z)(t,["breakpoints","mixins","palette","spacing","typography"]),v=I(l),m=u(n),g=rt(f),y=(0,i.Z)({breakpoints:m,direction:"ltr",mixins:c(m,g,a),overrides:{},palette:v,props:{},shadows:B,typography:F(v,d),spacing:g,shape:W,transitions:it.ZP,zIndex:ot},h),b=arguments.length,w=new Array(b>1?b-1:0),_=1;_{"use strict";n.d(e,{Z:()=>r});const r=(0,n(867).Z)()},4349:(t,e,n)=>{"use strict";n.r(e),n.d(e,{MuiThemeProvider:()=>U,ServerStyleSheets:()=>D,StylesProvider:()=>z.ZP,ThemeProvider:()=>U,createGenerateClassName:()=>F.Z,createMuiTheme:()=>i.Z,createStyles:()=>u,darken:()=>r._j,decomposeColor:()=>r.tB,duration:()=>C.x9,easing:()=>C.Ui,emphasize:()=>r._4,fade:()=>r.U1,getContrastRatio:()=>r.mi,getLuminance:()=>r.H3,hexToRgb:()=>r.oo,hslToRgb:()=>r.ve,jssPreset:()=>$.Z,lighten:()=>r.$n,makeStyles:()=>f,recomposeColor:()=>r.wy,responsiveFontSizes:()=>w,rgbToHex:()=>r.vq,styled:()=>O,unstable_createMuiStrictModeTheme:()=>a,useTheme:()=>T.Z,withStyles:()=>P.Z,withTheme:()=>M});var r=n(9693),i=n(867),o=n(5953);function a(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,c.Z)(t,(0,s.Z)({defaultTheme:l.Z},e))};var p=n(288),d=n(6156);function h(t){return String(parseFloat(t)).length===String(t).length}function v(t){return parseFloat(t)}function m(t){return function(e,n){var r=String(e).match(/[\d.\-+]*\s*(.*)/)[1]||"";if(r===n)return e;var i=v(e);if("px"!==r)if("em"===r)i=v(e)*v(t);else if("rem"===r)return i=v(e)*v(t),e;var o=i;if("px"!==n)if("em"===n)o=i/v(t);else{if("rem"!==n)return e;o=i/v(t)}return parseFloat(o.toFixed(5))+n}}function g(t){var e=t.size,n=t.grid,r=e-e%n,i=r+n;return e-r1&&void 0!==arguments[1]?arguments[1]:{},n=e.breakpoints,r=void 0===n?["sm","md","lg"]:n,i=e.disableAlign,o=void 0!==i&&i,a=e.factor,u=void 0===a?2:a,c=e.variants,l=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,f=(0,s.Z)({},t);f.typography=(0,s.Z)({},f.typography);var d=f.typography,v=m(d.htmlFontSize),w=r.map((function(t){return f.breakpoints.values[t]}));return l.forEach((function(t){var e=d[t],n=parseFloat(v(e.fontSize,"rem"));if(!(n<=1)){var r=n,i=1+(r-1)/u,a=e.lineHeight;if(!h(a)&&!o)throw new Error((0,p.Z)(6));h(a)||(a=parseFloat(v(a,"rem"))/parseFloat(n));var c=null;o||(c=function(t){return g({size:t,grid:y({pixels:4,lineHeight:a,htmlFontSize:d.htmlFontSize})})}),d[t]=(0,s.Z)({},e,b({cssProperty:"fontSize",min:i,max:r,unit:"rem",breakpoints:w,transform:c}))}})),f}var _=n(1253),x=n(6271),S=n.n(x),k=n(6010),E=(n(5697),n(8679)),R=n.n(E);function Z(t,e){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}const O=function(t){var e=function(t){return function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=(0,_.Z)(r,["name"]),a=i,u="function"==typeof e?function(t){return{root:function(n){return e((0,s.Z)({theme:t},n))}}}:{root:e},l=(0,c.Z)(u,(0,s.Z)({Component:t,name:i||t.displayName,classNamePrefix:a},o));e.filterProps&&(n=e.filterProps,delete e.filterProps),e.propTypes&&(e.propTypes,delete e.propTypes);var f=S().forwardRef((function(e,r){var i=e.children,o=e.className,a=e.clone,u=e.component,c=(0,_.Z)(e,["children","className","clone","component"]),f=l(e),p=(0,k.Z)(f.root,o),d=c;if(n&&(d=Z(d,n)),a)return S().cloneElement(i,(0,s.Z)({className:(0,k.Z)(i.props.className,p)},d));if("function"==typeof i)return i((0,s.Z)({className:p},d));var h=u||t;return S().createElement(h,(0,s.Z)({ref:r,className:p},d),i)}));return R()(f,t),f}}(t);return function(t,n){return e(t,(0,s.Z)({defaultTheme:l.Z},n))}};var C=n(3366),T=n(8920),P=n(8786),j=n(159);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultTheme,n=function(t){var n=S().forwardRef((function(n,r){var i=n.innerRef,o=(0,_.Z)(n,["innerRef"]),a=(0,j.Z)()||e;return S().createElement(t,(0,s.Z)({theme:a,ref:i||r},o))}));return R()(n,t),n};return n}A();const M=A({defaultTheme:l.Z});function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var N=n(5991),L=n(4013),z=n(6975),F=n(5034),D=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I(this,t),this.options=e}return(0,N.Z)(t,[{key:"collect",value:function(t){var e=new Map;this.sheetsRegistry=new L.xE;var n=(0,F.Z)();return S().createElement(z.ZP,(0,s.Z)({sheetsManager:e,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),t)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(t){return S().createElement("style",(0,s.Z)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},t))}}]),t}(),B=n(3800),W=n(7076);const U=function(t){var e=t.children,n=t.theme,r=(0,j.Z)(),i=S().useMemo((function(){var t=null===r?n:function(t,e){return"function"==typeof e?e(t):(0,s.Z)({},t,e)}(r,n);return null!=t&&(t[W.Z]=null!==r),t}),[n,r]);return S().createElement(B.Z.Provider,{value:i},e)};var $=n(246)},3366:(t,e,n)=>{"use strict";n.d(e,{Ui:()=>i,x9:()=>o,ZP:()=>u});var r=n(1253),i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(t){return"".concat(Math.round(t),"ms")}const u={easing:i,duration:o,create:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.duration,u=void 0===n?o.standard:n,s=e.easing,c=void 0===s?i.easeInOut:s,l=e.delay,f=void 0===l?0:l;return(0,r.Z)(e,["duration","easing","delay"]),(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"==typeof u?u:a(u)," ").concat(c," ").concat("string"==typeof f?f:a(f))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var e=t/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}}},8920:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(159),i=(n(6271),n(9700));function o(){return(0,r.Z)()||i.Z}},8786:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var r=n(2122),i=n(1253),o=n(6271),a=n.n(o),u=(n(5697),n(8679)),s=n.n(u),c=n(951);function l(t){var e=t.theme,n=t.name,r=t.props;if(!e||!e.props||!e.props[n])return r;var i,o=e.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var f=n(159);var p=n(9700);const d=function(t,e){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=e.defaultTheme,u=e.withTheme,p=void 0!==u&&u,d=e.name,h=(0,i.Z)(e,["defaultTheme","withTheme","name"]),v=d,m=(0,c.Z)(t,(0,r.Z)({defaultTheme:o,Component:n,name:d||n.displayName,classNamePrefix:v},h)),g=a().forwardRef((function(t,e){t.classes;var u,s=t.innerRef,c=(0,i.Z)(t,["classes","innerRef"]),h=m((0,r.Z)({},n.defaultProps,t)),v=c;return("string"==typeof d||p)&&(u=(0,f.Z)()||o,d&&(v=l({theme:u,name:d,props:c})),p&&!v.theme&&(v.theme=u)),a().createElement(n,(0,r.Z)({ref:s||e,classes:h},v))}));return s()(g,n),g}}(t,(0,r.Z)({defaultTheme:p.Z},e))}},3871:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(288);function i(t){if("string"!=typeof t)throw new Error((0,r.Z)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},4236:(t,e,n)=>{"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,{Z:()=>r})},7294:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(6271),i=n(4236);function o(t,e){return r.useMemo((function(){return null==t&&null==e?null:function(n){(0,i.Z)(t,n),(0,i.Z)(e,n)}}),[t,e])}},4896:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(6271),i=n(4456),o=!0,a=!1,u=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(t){t.metaKey||t.altKey||t.ctrlKey||(o=!0)}function l(){o=!1}function f(){"hidden"===this.visibilityState&&a&&(o=!0)}function p(t){var e,n,r,i=t.target;try{return i.matches(":focus-visible")}catch(t){}return o||(n=(e=i).type,!("INPUT"!==(r=e.tagName)||!s[n]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable)}function d(){a=!0,window.clearTimeout(u),u=window.setTimeout((function(){a=!1}),100)}function h(){return{isFocusVisible:p,onBlurVisible:d,ref:r.useCallback((function(t){var e,n=i.findDOMNode(t);null!=n&&((e=n.ownerDocument).addEventListener("keydown",c,!0),e.addEventListener("mousedown",l,!0),e.addEventListener("pointerdown",l,!0),e.addEventListener("touchstart",l,!0),e.addEventListener("visibilitychange",f,!0))}),[])}}},6975:(t,e,n)=>{"use strict";n.d(e,{NU:()=>d,ZP:()=>h});var r,i=n(2122),o=n(1253),a=n(6271),u=n.n(a),s=(n(5697),n(5034)),c=n(4013),l=n(246),f=(0,c.Ue)((0,l.Z)()),p={disableGeneration:!1,generateClassName:(0,s.Z)(),jss:f,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},d=u().createContext(p);function h(t){var e=t.children,n=t.injectFirst,a=void 0!==n&&n,s=t.disableGeneration,f=void 0!==s&&s,p=(0,o.Z)(t,["children","injectFirst","disableGeneration"]),h=u().useContext(d),v=(0,i.Z)({},h,{disableGeneration:f},p);if(!v.jss.options.insertionPoint&&a&&"undefined"!=typeof window){if(!r){var m=document.head;r=document.createComment("mui-inject-first"),m.insertBefore(r,m.firstChild)}v.jss=(0,c.Ue)({plugins:(0,l.Z)().plugins,insertionPoint:r})}return u().createElement(d.Provider,{value:v},e)}},7076:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},5034:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(7076),i=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.disableGlobal,n=void 0!==e&&e,o=t.productionPrefix,a=void 0===o?"jss":o,u=t.seed,s=void 0===u?"":u,c=""===s?"":"".concat(s,"-"),l=0,f=function(){return l+=1};return function(t,e){var o=e.options.name;if(o&&0===o.indexOf("Mui")&&!e.options.link&&!n){if(-1!==i.indexOf(t.key))return"Mui-".concat(t.key);var u="".concat(c).concat(o,"-").concat(t.key);return e.options.theme[r.Z]&&""===s?"".concat(u,"-").concat(f()):u}return"".concat(c).concat(a).concat(f())}}},246:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Tt});var r=n(4013),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i;var u=n(2122),s="@global",c="@global ",l=function(){function t(t,e,n){for(var i in this.type="global",this.at=s,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=t,this.options=n,this.rules=new r.RB((0,u.Z)({},n,{parent:this})),e)this.rules.add(i,e[i]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,e,n){var r=this.rules.add(t,e,n);return r&&this.options.jss.plugins.onProcessRule(r),r},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(){return this.rules.toString()},t}(),f=function(){function t(t,e,n){this.type="global",this.at=s,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=t,this.options=n;var r=t.substr(c.length);this.rule=n.jss.createRule(r,e,(0,u.Z)({},n,{parent:this}))}return t.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},t}(),p=/\s*,\s*/g;function d(t,e){for(var n=t.split(p),r="",i=0;i-1){var i=dt[t];if(!Array.isArray(i))return B+J(i)in e&&W+i;if(!r)return!1;for(var o=0;oe?1:-1:t.length-e.length},{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r={},i=Object.keys(e).sort(t),o=0;o{"use strict";n.d(e,{Z:()=>k});var r=n(1253),i=n(2122),o=n(6271),a=n.n(o),u=n(4013);function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.baseClasses,n=t.newClasses;if(t.Component,!n)return e;var r=(0,i.Z)({},e);return Object.keys(n).forEach((function(t){n[t]&&(r[t]="".concat(e[t]," ").concat(n[t]))})),r}const c=function(t,e,n,r){var i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)},l=function(t,e,n){var r=t.get(e);return r?r.get(n):void 0},f=function(t,e,n){t.get(e).delete(n)};var p=n(159),d=n(6975),h=-1e9;function v(){return h+=1}var m=n(5953);function g(t){var e="function"==typeof t;return{create:function(n,r){var o;try{o=e?t(n):t}catch(t){throw t}if(!r||!n.overrides||!n.overrides[r])return o;var a=n.overrides[r],u=(0,i.Z)({},o);return Object.keys(a).forEach((function(t){u[t]=(0,m.Z)(u[t],a[t])})),u},options:{}}}const y={};function b(t,e,n){var r=t.state;if(t.stylesOptions.disableGeneration)return e||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),e!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=e,i=!0),i&&(r.cacheClasses.value=s({baseClasses:r.cacheClasses.lastJSS,newClasses:e,Component:n})),r.cacheClasses.value}function w(t,e){var n=t.state,r=t.theme,o=t.stylesOptions,a=t.stylesCreator,f=t.name;if(!o.disableGeneration){var p=l(o.sheetsManager,a,r);p||(p={refs:0,staticSheet:null,dynamicStyles:null},c(o.sheetsManager,a,r,p));var d=(0,i.Z)({},a.options,o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});d.generateId=d.serverGenerateClassName||d.generateClassName;var h=o.sheetsRegistry;if(0===p.refs){var v;o.sheetsCache&&(v=l(o.sheetsCache,a,r));var m=a.create(r,f);v||((v=o.jss.createStyleSheet(m,(0,i.Z)({link:!1},d))).attach(),o.sheetsCache&&c(o.sheetsCache,a,r,v)),h&&h.add(v),p.staticSheet=v,p.dynamicStyles=(0,u._$)(m)}if(p.dynamicStyles){var g=o.jss.createStyleSheet(p.dynamicStyles,(0,i.Z)({link:!0},d));g.update(e),g.attach(),n.dynamicSheet=g,n.classes=s({baseClasses:p.staticSheet.classes,newClasses:g.classes}),h&&h.add(g)}else n.classes=p.staticSheet.classes;p.refs+=1}}function _(t,e){var n=t.state;n.dynamicSheet&&n.dynamicSheet.update(e)}function x(t){var e=t.state,n=t.theme,r=t.stylesOptions,i=t.stylesCreator;if(!r.disableGeneration){var o=l(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(f(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),e.dynamicSheet&&(r.jss.removeStyleSheet(e.dynamicSheet),a&&a.remove(e.dynamicSheet))}}function S(t,e){var n,r=a().useRef([]),i=a().useMemo((function(){return{}}),e);r.current!==i&&(r.current=i,n=t()),a().useEffect((function(){return function(){n&&n()}}),[i])}function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.name,o=e.classNamePrefix,u=e.Component,s=e.defaultTheme,c=void 0===s?y:s,l=(0,r.Z)(e,["name","classNamePrefix","Component","defaultTheme"]),f=g(t),h=n||o||"makeStyles";f.options={index:v(),name:n,meta:h,classNamePrefix:h};var m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,p.Z)()||c,r=(0,i.Z)({},a().useContext(d.NU),l),o=a().useRef(),s=a().useRef();S((function(){var i={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:e};return w(i,t),s.current=!1,o.current=i,function(){x(i)}}),[e,f]),a().useEffect((function(){s.current&&_(o.current,t),s.current=!0}));var h=b(o.current,t.classes,u);return h};return m}},3800:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(6271);const i=n.n(r)().createContext(null)},159:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(6271),i=n.n(r),o=n(3800);function a(){return i().useContext(o.Z)}},5953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2122),i=n(484);function o(t){return t&&"object"===(0,i.Z)(t)&&t.constructor===Object}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?(0,r.Z)({},t):t;return o(t)&&o(e)&&Object.keys(e).forEach((function(r){"__proto__"!==r&&(o(e[r])&&r in t?i[r]=a(t[r],e[r],n):i[r]=e[r])})),i}},288:(t,e,n)=>{"use strict";function r(t){for(var e="https://material-ui.com/production-error/?code="+t,n=1;nr})},6010:(t,e,n)=>{"use strict";function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ei})},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r,i,o=t[1]||"",a=t[3];if(!a)return o;if(e&&"function"==typeof btoa){var u=(n=a,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),s=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(s).concat([u]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(t){return r.isMemo(t)?a:u[t.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(h){var i=d(n);i&&i!==h&&t(e,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var u=s(e),v=s(n),m=0;m{"use strict";n.d(e,{Z:()=>i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};const i="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType},4013:(t,e,n)=>{"use strict";n.d(e,{RB:()=>q,xE:()=>K,Ue:()=>mt,JH:()=>f,_$:()=>ht,HZ:()=>vt,EK:()=>d});var r=n(2122),i=n(3827),o=n(5991),a=n(3552),u=n(3349),s=n(9756),c={}.constructor;function l(t){if(null==t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(l);if(t.constructor!==c)return t;var e={};for(var n in t)e[n]=l(t[n]);return e}function f(t,e,n){void 0===t&&(t="unnamed");var r=n.jss,i=l(e);return r.plugins.onCreateRule(t,i,n)||(t[0],null)}var p=function(t,e){for(var n="",r=0;r<+~=|^:(),"'`\s])/g,g="undefined"!=typeof CSS&&CSS.escape,y=function(t){return g?g(t):t.replace(m,"\\$1")},b=function(){function t(t,e,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=t,this.options=n,this.style=e,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return t.prototype.prop=function(t,e,n){if(void 0===e)return this.style[t];var r=!!n&&n.force;if(!r&&this.style[t]===e)return this;var i=e;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(e,t,this));var o=null==i||!1===i,a=t in this.style;if(o&&!a&&!r)return this;var u=o&&a;if(u?delete this.style[t]:this.style[t]=i,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,i),this;var s=this.options.sheet;return s&&s.attached,this},t}(),w=function(t){function e(e,n,r){var i;(i=t.call(this,e,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,c=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=c((0,u.Z)((0,u.Z)(i)),s),i.selectorText="."+y(i.id)),i}(0,a.Z)(e,t);var n=e.prototype;return n.applyTo=function(t){var e=this.renderer;if(e){var n=this.toJSON();for(var r in n)e.setProperty(t,r,n[r])}return this},n.toJSON=function(){var t={};for(var e in this.style){var n=this.style[e];"object"!=typeof n?t[e]=n:Array.isArray(n)&&(t[e]=d(n))}return t},n.toString=function(t){var e=this.options.sheet,n=e&&e.options.link?(0,r.Z)({},t,{allowEmpty:!0}):t;return v(this.selectorText,this.style,n)},(0,o.Z)(e,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var e=this.renderer,n=this.renderable;n&&e&&(e.setSelector(n,t)||e.replaceRule(n,this))}},get:function(){return this.selectorText}}]),e}(b),_={onCreateRule:function(t,e,n){return"@"===t[0]||n.parent&&"keyframes"===n.parent.type?null:new w(t,e,n)}},x={indent:1,children:!0},S=/@([\w-]+)/,k=function(){function t(t,e,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t;var i=t.match(S);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new q((0,r.Z)({},n,{parent:this})),e)this.rules.add(o,e[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,e,n){var r=this.rules.add(t,e,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},e.toString=function(t){if(void 0===t&&(t=x),null==t.indent&&(t.indent=x.indent),null==t.children&&(t.children=x.children),!1===t.children)return this.query+" {}";var e=this.rules.toString(t);return e?this.query+" {\n"+e+"\n}":""},t}(),E=/@media|@supports\s+/,R={onCreateRule:function(t,e,n){return E.test(t)?new k(t,e,n):null}},Z={indent:1,children:!0},O=/@keyframes\s+([\w-]+)/,C=function(){function t(t,e,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=t.match(O);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,u=n.generateId;for(var s in this.id=!1===o?this.name:y(u(this,a)),this.rules=new q((0,r.Z)({},n,{parent:this})),e)this.rules.add(s,e[s],(0,r.Z)({},n,{parent:this}));this.rules.process()}return t.prototype.toString=function(t){if(void 0===t&&(t=Z),null==t.indent&&(t.indent=Z.indent),null==t.children&&(t.children=Z.children),!1===t.children)return this.at+" "+this.id+" {}";var e=this.rules.toString(t);return e&&(e="\n"+e+"\n"),this.at+" "+this.id+" {"+e+"}"},t}(),T=/@keyframes\s+/,P=/\$([\w-]+)/g,j=function(t,e){return"string"==typeof t?t.replace(P,(function(t,n){return n in e?e[n]:t})):t},A=function(t,e,n){var r=t[e],i=j(r,n);i!==r&&(t[e]=i)},M={onCreateRule:function(t,e,n){return"string"==typeof t&&T.test(t)?new C(t,e,n):null},onProcessStyle:function(t,e,n){return"style"===e.type&&n?("animation-name"in t&&A(t,"animation-name",n.keyframes),"animation"in t&&A(t,"animation",n.keyframes),t):t},onChangeValue:function(t,e,n){var r=n.options.sheet;if(!r)return t;switch(e){case"animation":case"animation-name":return j(t,r.keyframes);default:return t}}},I=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i=this.index)e.push(t);else for(var r=0;rn)return void e.splice(r,0,t)},e.reset=function(){this.registry=[]},e.remove=function(t){var e=this.registry.indexOf(t);this.registry.splice(e,1)},e.toString=function(t){for(var e=void 0===t?{}:t,n=e.attached,r=(0,s.Z)(e,["attached"]),i="",o=0;on?n:e},ft=function(){function t(t){this.getPropertyValue=rt,this.setProperty=it,this.removeProperty=ot,this.setSelector=at,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],t&&J.add(t),this.sheet=t;var e,n=this.sheet?this.sheet.options:{},r=n.media,i=n.meta,o=n.element;this.element=o||((e=document.createElement("style")).textContent="\n",e),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),i&&this.element.setAttribute("data-meta",i);var a=st();a&&this.element.setAttribute("nonce",a)}var e=t.prototype;return e.attach=function(){if(!this.element.parentNode&&this.sheet){!function(t,e){var n=e.insertionPoint,r=function(t){var e=J.registry;if(e.length>0){var n=function(t,e){for(var n=0;ne.index&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.attached&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=t.insertionPoint;if(r&&"string"==typeof r){var i=function(t){for(var e=ut(),n=0;n"']/g,q=RegExp(H.source),G=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",St="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Et="["+kt+"]",Rt="["+_t+"]",Zt="\\d+",Ot="["+xt+"]",Ct="[^\\ud800-\\udfff"+kt+Zt+"\\u2700-\\u27bf"+xt+St+"]",Tt="\\ud83c[\\udffb-\\udfff]",Pt="[^\\ud800-\\udfff]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",Mt="["+St+"]",It="(?:"+Ot+"|"+Ct+")",Nt="(?:"+Mt+"|"+Ct+")",Lt="(?:['’](?:d|ll|m|re|s|t|ve))?",zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ft="(?:"+Rt+"|"+Tt+")?",Dt="[\\ufe0e\\ufe0f]?",Bt=Dt+Ft+"(?:\\u200d(?:"+[Pt,jt,At].join("|")+")"+Dt+Ft+")*",Wt="(?:"+["[\\u2700-\\u27bf]",jt,At].join("|")+")"+Bt,Ut="(?:"+[Pt+Rt+"?",Rt,jt,At,"[\\ud800-\\udfff]"].join("|")+")",$t=RegExp("['’]","g"),Ht=RegExp(Rt,"g"),Vt=RegExp(Tt+"(?="+Tt+")|"+Ut+Bt,"g"),qt=RegExp([Mt+"?"+Ot+"+"+Lt+"(?="+[Et,Mt,"$"].join("|")+")",Nt+"+"+zt+"(?="+[Et,Mt+It,"$"].join("|")+")",Mt+"?"+It+"+"+Lt,Mt+"+"+zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zt,Wt].join("|"),"g"),Gt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Yt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jt=-1,Xt={};Xt[A]=Xt[M]=Xt[I]=Xt[N]=Xt[L]=Xt[z]=Xt[F]=Xt[D]=Xt[B]=!0,Xt[v]=Xt[m]=Xt[P]=Xt[g]=Xt[j]=Xt[y]=Xt[b]=Xt[w]=Xt[x]=Xt[S]=Xt[k]=Xt[R]=Xt[Z]=Xt[O]=Xt[T]=!1;var Qt={};Qt[v]=Qt[m]=Qt[P]=Qt[j]=Qt[g]=Qt[y]=Qt[A]=Qt[M]=Qt[I]=Qt[N]=Qt[L]=Qt[x]=Qt[S]=Qt[k]=Qt[R]=Qt[Z]=Qt[O]=Qt[C]=Qt[z]=Qt[F]=Qt[D]=Qt[B]=!0,Qt[b]=Qt[w]=Qt[T]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,ne=parseInt,re="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=re||ie||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&re.process,le=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),fe=le&&le.isArrayBuffer,pe=le&&le.isDate,de=le&&le.isMap,he=le&&le.isRegExp,ve=le&&le.isSet,me=le&&le.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ye(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function ke(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function qe(t,e){for(var n=t.length;n--&&Ae(e,t[n],0)>-1;);return n}function Ge(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Ye=ze({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=ze({"&":"&","<":"<",">":">",'"':""","'":"'"});function Je(t){return"\\"+te[t]}function Xe(t){return Gt.test(t)}function Qe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function tn(t,e){return function(n){return t(e(n))}}function en(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"}),cn=function t(e){var n,r=(e=null==e?oe:cn.defaults(oe.Object(),e,cn.pick(oe,Kt))).Array,it=e.Date,_t=e.Error,xt=e.Function,St=e.Math,kt=e.Object,Et=e.RegExp,Rt=e.String,Zt=e.TypeError,Ot=r.prototype,Ct=xt.prototype,Tt=kt.prototype,Pt=e["__core-js_shared__"],jt=Ct.toString,At=Tt.hasOwnProperty,Mt=0,It=(n=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Nt=Tt.toString,Lt=jt.call(kt),zt=oe._,Ft=Et("^"+jt.call(At).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=se?e.Buffer:i,Bt=e.Symbol,Wt=e.Uint8Array,Ut=Dt?Dt.allocUnsafe:i,Vt=tn(kt.getPrototypeOf,kt),Gt=kt.create,te=Tt.propertyIsEnumerable,re=Ot.splice,ie=Bt?Bt.isConcatSpreadable:i,ae=Bt?Bt.iterator:i,ue=Bt?Bt.toStringTag:i,ce=function(){try{var t=co(kt,"defineProperty");return t({},"",{}),t}catch(t){}}(),le=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,Te=it&&it.now!==oe.Date.now&&it.now,ze=e.setTimeout!==oe.setTimeout&&e.setTimeout,ln=St.ceil,fn=St.floor,pn=kt.getOwnPropertySymbols,dn=Dt?Dt.isBuffer:i,hn=e.isFinite,vn=Ot.join,mn=tn(kt.keys,kt),gn=St.max,yn=St.min,bn=it.now,wn=e.parseInt,_n=St.random,xn=Ot.reverse,Sn=co(e,"DataView"),kn=co(e,"Map"),En=co(e,"Promise"),Rn=co(e,"Set"),Zn=co(e,"WeakMap"),On=co(kt,"create"),Cn=Zn&&new Zn,Tn={},Pn=Fo(Sn),jn=Fo(kn),An=Fo(En),Mn=Fo(Rn),In=Fo(Zn),Nn=Bt?Bt.prototype:i,Ln=Nn?Nn.valueOf:i,zn=Nn?Nn.toString:i;function Fn(t){if(nu(t)&&!Ha(t)&&!(t instanceof Un)){if(t instanceof Wn)return t;if(At.call(t,"__wrapped__"))return Do(t)}return new Wn(t)}var Dn=function(){function t(){}return function(e){if(!eu(e))return{};if(Gt)return Gt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function ur(t,e,n,r,o,a){var u,s=1&e,c=2&e,l=4&e;if(n&&(u=o?n(t,r,o,a):n(t)),u!==i)return u;if(!eu(t))return t;var f=Ha(t);if(f){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&At.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Zi(t,u)}else{var p=po(t),d=p==w||p==_;if(Ya(t))return _i(t,s);if(p==k||p==v||d&&!o){if(u=c||d?{}:vo(t),!s)return c?function(t,e){return Oi(t,fo(t),e)}(t,function(t,e){return t&&Oi(e,Au(e),t)}(u,t)):function(t,e){return Oi(t,lo(t),e)}(t,rr(u,t))}else{if(!Qt[p])return o?t:{};u=function(t,e,n){var r,i=t.constructor;switch(e){case P:return xi(t);case g:case y:return new i(+t);case j:return function(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case A:case M:case I:case N:case L:case z:case F:case D:case B:return Si(t,n);case x:return new i;case S:case O:return new i(t);case R:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case Z:return new i;case C:return r=t,Ln?kt(Ln.call(r)):{}}}(t,p,s)}}a||(a=new Gn);var h=a.get(t);if(h)return h;a.set(t,u),uu(t)?t.forEach((function(r){u.add(ur(r,e,n,r,t,a))})):ru(t)&&t.forEach((function(r,i){u.set(i,ur(r,e,n,i,t,a))}));var m=f?i:(l?c?no:eo:c?Au:ju)(t);return be(m||t,(function(r,i){m&&(r=t[i=r]),tr(u,i,ur(r,e,n,i,t,a))})),u}function sr(t,e,n){var r=n.length;if(null==t)return!r;for(t=kt(t);r--;){var o=n[r],a=e[o],u=t[o];if(u===i&&!(o in t)||!a(u))return!1}return!0}function cr(t,e,n){if("function"!=typeof t)throw new Zt(o);return To((function(){t.apply(i,n)}),e)}function lr(t,e,n,r){var i=-1,o=Se,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=Ee(e,Ue(n))),r?(o=ke,a=!1):e.length>=200&&(o=He,a=!1,e=new qn(e));t:for(;++i-1},Hn.prototype.set=function(t,e){var n=this.__data__,r=er(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(kn||Hn),string:new $n}},Vn.prototype.delete=function(t){var e=uo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return uo(this,t).get(t)},Vn.prototype.has=function(t){return uo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,a),this},qn.prototype.has=function(t){return this.__data__.has(t)},Gn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Gn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Gn.prototype.get=function(t){return this.__data__.get(t)},Gn.prototype.has=function(t){return this.__data__.has(t)},Gn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var fr=Pi(br),pr=Pi(wr,!0);function dr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function hr(t,e,n){for(var r=-1,o=t.length;++r0&&n(u)?e>1?mr(u,e-1,n,r,i):Re(i,u):r||(i[i.length]=u)}return i}var gr=ji(),yr=ji(!0);function br(t,e){return t&&gr(t,e,ju)}function wr(t,e){return t&&yr(t,e,ju)}function _r(t,e){return xe(e,(function(e){return Xa(t[e])}))}function xr(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&ne}function Rr(t,e){return null!=t&&At.call(t,e)}function Zr(t,e){return null!=t&&e in kt(t)}function Or(t,e,n){for(var o=n?ke:Se,a=t[0].length,u=t.length,s=u,c=r(u),l=1/0,f=[];s--;){var p=t[s];s&&e&&(p=Ee(p,Ue(e))),l=yn(p.length,l),c[s]=!n&&(e||a>=120&&p.length>=120)?new qn(s&&p):i}p=t[0];var d=-1,h=c[0];t:for(;++d=u?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(Lr(t,(function(t,n,i){return{criteria:Ee(e,(function(e){return e(t)})),index:++r,value:t}})))}function Ur(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)u!==t&&re.call(u,s,1),re.call(t,s,1);return t}function Hr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;go(i)?re.call(t,i,1):ci(t,i)}}return t}function Vr(t,e){return t+fn(_n()*(e-t+1))}function qr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=fn(e/2))&&(t+=t)}while(e);return n}function Gr(t,e){return Po(Eo(t,e,is),t+"")}function Yr(t){return Kn(Bu(t))}function Kr(t,e){var n=Bu(t);return Mo(n,ar(e,0,n.length))}function Jr(t,e,n,r){if(!eu(t))return t;for(var o=-1,a=(e=gi(e,t)).length,u=a-1,s=t;null!=s&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!cu(a)&&(n?a<=e:a=200){var c=e?null:qi(t);if(c)return nn(c);a=!1,i=He,s=new qn}else s=e?[]:u;t:for(;++r=r?t:ei(t,e,n)}var wi=le||function(t){return oe.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function xi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Si(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=cu(t),u=e!==i,s=null===e,c=e==e,l=cu(e);if(!s&&!l&&!a&&t>e||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t1?n[o-1]:i,u=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,u&&yo(n[0],n[1],u)&&(a=o<3?i:a,o=1),e=kt(e);++r-1?o[a?e[u]:u]:i}}function Li(t){return to((function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new Zt(o);if(a&&!s&&"wrapper"==io(u))var s=new Wn([],!0)}for(r=s?r:n;++r1&&b.reverse(),d&&fs))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&n?new qn:i;for(a.set(t,e),a.set(e,t);++p-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return be(h,(function(n){var r="_."+n[0];e&n[1]&&!Se(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ut):[]}(r),n)))}function Ao(t){var e=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Mo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,aa(t,n)}));function da(t){var e=Fn(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var va=to((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ma=Ci((function(t,e,n){At.call(t,n)?++t[n]:ir(t,n,1)})),ga=Ni($o),ya=Ni(Ho);function ba(t,e){return(Ha(t)?be:fr)(t,ao(e,3))}function wa(t,e){return(Ha(t)?we:pr)(t,ao(e,3))}var _a=Ci((function(t,e,n){At.call(t,n)?t[n].push(e):ir(t,n,[e])})),xa=Gr((function(t,e,n){var i=-1,o="function"==typeof e,a=qa(t)?r(t.length):[];return fr(t,(function(t){a[++i]=o?ge(e,t,n):Cr(t,e,n)})),a})),Sa=Ci((function(t,e,n){ir(t,n,e)}));function ka(t,e){return(Ha(t)?Ee:Lr)(t,ao(e,3))}var Ea=Ci((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ra=Gr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yo(t,e[0],e[1])?e=[]:n>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),Wr(t,mr(e,1),[])})),Za=Te||function(){return oe.Date.now()};function Oa(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function Ca(t,e){var n;if("function"!=typeof e)throw new Zt(o);return t=vu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ta=Gr((function(t,e,n){var r=1;if(n.length){var i=en(n,oo(Ta));r|=s}return Yi(t,r,e,n,i)})),Pa=Gr((function(t,e,n){var r=3;if(n.length){var i=en(n,oo(Pa));r|=s}return Yi(e,r,t,n,i)}));function ja(t,e,n){var r,a,u,s,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new Zt(o);function v(e){var n=r,o=a;return r=a=i,f=e,s=t.apply(o,n)}function m(t){return f=t,c=To(y,e),p?v(t):s}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=u}function y(){var t=Za();if(g(t))return b(t);c=To(y,function(t){var n=e-(t-l);return d?yn(n,u-(t-f)):n}(t))}function b(t){return c=i,h&&r?v(t):(r=a=i,s)}function w(){var t=Za(),n=g(t);if(r=arguments,a=this,l=t,n){if(c===i)return m(l);if(d)return wi(c),c=To(y,e),v(l)}return c===i&&(c=To(y,e)),s}return e=gu(e)||0,eu(n)&&(p=!!n.leading,u=(d="maxWait"in n)?gn(gu(n.maxWait)||0,e):u,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==i&&wi(c),f=0,r=l=a=c=i},w.flush=function(){return c===i?s:b(Za())},w}var Aa=Gr((function(t,e){return cr(t,1,e)})),Ma=Gr((function(t,e,n){return cr(t,gu(e)||0,n)}));function Ia(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Zt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ia.Cache||Vn),n}function Na(t){if("function"!=typeof t)throw new Zt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ia.Cache=Vn;var La=yi((function(t,e){var n=(e=1==e.length&&Ha(e[0])?Ee(e[0],Ue(ao())):Ee(mr(e,1),Ue(ao()))).length;return Gr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),$a=Tr(function(){return arguments}())?Tr:function(t){return nu(t)&&At.call(t,"callee")&&!te.call(t,"callee")},Ha=r.isArray,Va=fe?Ue(fe):function(t){return nu(t)&&kr(t)==P};function qa(t){return null!=t&&tu(t.length)&&!Xa(t)}function Ga(t){return nu(t)&&qa(t)}var Ya=dn||gs,Ka=pe?Ue(pe):function(t){return nu(t)&&kr(t)==y};function Ja(t){if(!nu(t))return!1;var e=kr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ou(t)}function Xa(t){if(!eu(t))return!1;var e=kr(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qa(t){return"number"==typeof t&&t==vu(t)}function tu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function eu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function nu(t){return null!=t&&"object"==typeof t}var ru=de?Ue(de):function(t){return nu(t)&&po(t)==x};function iu(t){return"number"==typeof t||nu(t)&&kr(t)==S}function ou(t){if(!nu(t)||kr(t)!=k)return!1;var e=Vt(t);if(null===e)return!0;var n=At.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&jt.call(n)==Lt}var au=he?Ue(he):function(t){return nu(t)&&kr(t)==R},uu=ve?Ue(ve):function(t){return nu(t)&&po(t)==Z};function su(t){return"string"==typeof t||!Ha(t)&&nu(t)&&kr(t)==O}function cu(t){return"symbol"==typeof t||nu(t)&&kr(t)==C}var lu=me?Ue(me):function(t){return nu(t)&&tu(t.length)&&!!Xt[kr(t)]},fu=$i(Nr),pu=$i((function(t,e){return t<=e}));function du(t){if(!t)return[];if(qa(t))return su(t)?an(t):Zi(t);if(ae&&t[ae])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ae]());var e=po(t);return(e==x?Qe:e==Z?nn:Bu)(t)}function hu(t){return t?(t=gu(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function vu(t){var e=hu(t),n=e%1;return e==e?n?e-n:e:0}function mu(t){return t?ar(vu(t),0,d):0}function gu(t){if("number"==typeof t)return t;if(cu(t))return p;if(eu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=eu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=We(t);var n=ht.test(t);return n||mt.test(t)?ne(t.slice(2),n?2:8):dt.test(t)?p:+t}function yu(t){return Oi(t,Au(t))}function bu(t){return null==t?"":ui(t)}var wu=Ti((function(t,e){if(xo(e)||qa(e))Oi(e,ju(e),t);else for(var n in e)At.call(e,n)&&tr(t,n,e[n])})),_u=Ti((function(t,e){Oi(e,Au(e),t)})),xu=Ti((function(t,e,n,r){Oi(e,Au(e),t,r)})),Su=Ti((function(t,e,n,r){Oi(e,ju(e),t,r)})),ku=to(or),Eu=Gr((function(t,e){t=kt(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(r=1);++n1),e})),Oi(t,no(t),n),r&&(n=ur(n,7,Xi));for(var i=e.length;i--;)ci(n,e[i]);return n})),Lu=to((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Ou(t,n)}))}(t,e)}));function zu(t,e){if(null==t)return{};var n=Ee(no(t),(function(t){return[t]}));return e=ao(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var Fu=Gi(ju),Du=Gi(Au);function Bu(t){return null==t?[]:$e(t,ju(t))}var Wu=Mi((function(t,e,n){return e=e.toLowerCase(),t+(n?Uu(e):e)}));function Uu(t){return Ju(bu(t).toLowerCase())}function $u(t){return(t=bu(t))&&t.replace(yt,Ye).replace(Ht,"")}var Hu=Mi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Vu=Mi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),qu=Ai("toLowerCase"),Gu=Mi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Yu=Mi((function(t,e,n){return t+(n?" ":"")+Ju(e)})),Ku=Mi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ju=Ai("toUpperCase");function Xu(t,e,n){return t=bu(t),(e=n?i:e)===i?function(t){return Yt.test(t)}(t)?function(t){return t.match(qt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Qu=Gr((function(t,e){try{return ge(t,i,e)}catch(t){return Ja(t)?t:new _t(t)}})),ts=to((function(t,e){return be(e,(function(e){e=zo(e),ir(t,e,Ta(t[e],t))})),t}));function es(t){return function(){return t}}var ns=Li(),rs=Li(!0);function is(t){return t}function os(t){return Mr("function"==typeof t?t:ur(t,1))}var as=Gr((function(t,e){return function(n){return Cr(n,t,e)}})),us=Gr((function(t,e){return function(n){return Cr(t,n,e)}}));function ss(t,e,n){var r=ju(e),i=_r(e,r);null!=n||eu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,ju(e)));var o=!(eu(n)&&"chain"in n&&!n.chain),a=Xa(t);return be(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Zi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cs(){}var ls=Bi(Ee),fs=Bi(_e),ps=Bi(Ce);function ds(t){return bo(t)?Le(zo(t)):function(t){return function(e){return xr(e,t)}}(t)}var hs=Ui(),vs=Ui(!0);function ms(){return[]}function gs(){return!1}var ys,bs=Di((function(t,e){return t+e}),0),ws=Vi("ceil"),_s=Di((function(t,e){return t/e}),1),xs=Vi("floor"),Ss=Di((function(t,e){return t*e}),1),ks=Vi("round"),Es=Di((function(t,e){return t-e}),0);return Fn.after=function(t,e){if("function"!=typeof e)throw new Zt(o);return t=vu(t),function(){if(--t<1)return e.apply(this,arguments)}},Fn.ary=Oa,Fn.assign=wu,Fn.assignIn=_u,Fn.assignInWith=xu,Fn.assignWith=Su,Fn.at=ku,Fn.before=Ca,Fn.bind=Ta,Fn.bindAll=ts,Fn.bindKey=Pa,Fn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ha(t)?t:[t]},Fn.chain=da,Fn.chunk=function(t,e,n){e=(n?yo(t,e,n):e===i)?1:gn(vu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,u=0,s=r(ln(o/e));ao?0:o+n),(r=r===i||r>o?o:vu(r))<0&&(r+=o),r=n>r?0:mu(r);n>>0)?(t=bu(t))&&("string"==typeof e||null!=e&&!au(e))&&!(e=ui(e))&&Xe(t)?bi(an(t),0,n):t.split(e,n):[]},Fn.spread=function(t,e){if("function"!=typeof t)throw new Zt(o);return e=null==e?0:gn(vu(e),0),Gr((function(n){var r=n[e],i=bi(n,0,e);return r&&Re(i,r),ge(t,this,i)}))},Fn.tail=function(t){var e=null==t?0:t.length;return e?ei(t,1,e):[]},Fn.take=function(t,e,n){return t&&t.length?ei(t,0,(e=n||e===i?1:vu(e))<0?0:e):[]},Fn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ei(t,(e=r-(e=n||e===i?1:vu(e)))<0?0:e,r):[]},Fn.takeRightWhile=function(t,e){return t&&t.length?fi(t,ao(e,3),!1,!0):[]},Fn.takeWhile=function(t,e){return t&&t.length?fi(t,ao(e,3)):[]},Fn.tap=function(t,e){return e(t),t},Fn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Zt(o);return eu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},Fn.thru=ha,Fn.toArray=du,Fn.toPairs=Fu,Fn.toPairsIn=Du,Fn.toPath=function(t){return Ha(t)?Ee(t,zo):cu(t)?[t]:Zi(Lo(bu(t)))},Fn.toPlainObject=yu,Fn.transform=function(t,e,n){var r=Ha(t),i=r||Ya(t)||lu(t);if(e=ao(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:eu(t)&&Xa(o)?Dn(Vt(t)):{}}return(i?be:br)(t,(function(t,r,i){return e(n,t,r,i)})),n},Fn.unary=function(t){return Oa(t,1)},Fn.union=na,Fn.unionBy=ra,Fn.unionWith=ia,Fn.uniq=function(t){return t&&t.length?si(t):[]},Fn.uniqBy=function(t,e){return t&&t.length?si(t,ao(e,2)):[]},Fn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?si(t,i,e):[]},Fn.unset=function(t,e){return null==t||ci(t,e)},Fn.unzip=oa,Fn.unzipWith=aa,Fn.update=function(t,e,n){return null==t?t:li(t,e,mi(n))},Fn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:li(t,e,mi(n),r)},Fn.values=Bu,Fn.valuesIn=function(t){return null==t?[]:$e(t,Au(t))},Fn.without=ua,Fn.words=Xu,Fn.wrap=function(t,e){return za(mi(e),t)},Fn.xor=sa,Fn.xorBy=ca,Fn.xorWith=la,Fn.zip=fa,Fn.zipObject=function(t,e){return hi(t||[],e||[],tr)},Fn.zipObjectDeep=function(t,e){return hi(t||[],e||[],Jr)},Fn.zipWith=pa,Fn.entries=Fu,Fn.entriesIn=Du,Fn.extend=_u,Fn.extendWith=xu,ss(Fn,Fn),Fn.add=bs,Fn.attempt=Qu,Fn.camelCase=Wu,Fn.capitalize=Uu,Fn.ceil=ws,Fn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=gu(n))==n?n:0),e!==i&&(e=(e=gu(e))==e?e:0),ar(gu(t),e,n)},Fn.clone=function(t){return ur(t,4)},Fn.cloneDeep=function(t){return ur(t,5)},Fn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:i)},Fn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:i)},Fn.conformsTo=function(t,e){return null==e||sr(t,e,ju(e))},Fn.deburr=$u,Fn.defaultTo=function(t,e){return null==t||t!=t?e:t},Fn.divide=_s,Fn.endsWith=function(t,e,n){t=bu(t),e=ui(e);var r=t.length,o=n=n===i?r:ar(vu(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Fn.eq=Ba,Fn.escape=function(t){return(t=bu(t))&&G.test(t)?t.replace(V,Ke):t},Fn.escapeRegExp=function(t){return(t=bu(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Fn.every=function(t,e,n){var r=Ha(t)?_e:dr;return n&&yo(t,e,n)&&(e=i),r(t,ao(e,3))},Fn.find=ga,Fn.findIndex=$o,Fn.findKey=function(t,e){return Pe(t,ao(e,3),br)},Fn.findLast=ya,Fn.findLastIndex=Ho,Fn.findLastKey=function(t,e){return Pe(t,ao(e,3),wr)},Fn.floor=xs,Fn.forEach=ba,Fn.forEachRight=wa,Fn.forIn=function(t,e){return null==t?t:gr(t,ao(e,3),Au)},Fn.forInRight=function(t,e){return null==t?t:yr(t,ao(e,3),Au)},Fn.forOwn=function(t,e){return t&&br(t,ao(e,3))},Fn.forOwnRight=function(t,e){return t&&wr(t,ao(e,3))},Fn.get=Zu,Fn.gt=Wa,Fn.gte=Ua,Fn.has=function(t,e){return null!=t&&ho(t,e,Rr)},Fn.hasIn=Ou,Fn.head=qo,Fn.identity=is,Fn.includes=function(t,e,n,r){t=qa(t)?t:Bu(t),n=n&&!r?vu(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),su(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ae(t,e,n)>-1},Fn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vu(n);return i<0&&(i=gn(r+i,0)),Ae(t,e,i)},Fn.inRange=function(t,e,n){return e=hu(e),n===i?(n=e,e=0):n=hu(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=f},Fn.isSet=uu,Fn.isString=su,Fn.isSymbol=cu,Fn.isTypedArray=lu,Fn.isUndefined=function(t){return t===i},Fn.isWeakMap=function(t){return nu(t)&&po(t)==T},Fn.isWeakSet=function(t){return nu(t)&&"[object WeakSet]"==kr(t)},Fn.join=function(t,e){return null==t?"":vn.call(t,e)},Fn.kebabCase=Hu,Fn.last=Jo,Fn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vu(n))<0?gn(r+o,0):yn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):je(t,Ie,o,!0)},Fn.lowerCase=Vu,Fn.lowerFirst=qu,Fn.lt=fu,Fn.lte=pu,Fn.max=function(t){return t&&t.length?hr(t,is,Er):i},Fn.maxBy=function(t,e){return t&&t.length?hr(t,ao(e,2),Er):i},Fn.mean=function(t){return Ne(t,is)},Fn.meanBy=function(t,e){return Ne(t,ao(e,2))},Fn.min=function(t){return t&&t.length?hr(t,is,Nr):i},Fn.minBy=function(t,e){return t&&t.length?hr(t,ao(e,2),Nr):i},Fn.stubArray=ms,Fn.stubFalse=gs,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=Ss,Fn.nth=function(t,e){return t&&t.length?Br(t,vu(e)):i},Fn.noConflict=function(){return oe._===this&&(oe._=zt),this},Fn.noop=cs,Fn.now=Za,Fn.pad=function(t,e,n){t=bu(t);var r=(e=vu(e))?on(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Wi(fn(i),n)+t+Wi(ln(i),n)},Fn.padEnd=function(t,e,n){t=bu(t);var r=(e=vu(e))?on(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=_n();return yn(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return Vr(t,e)},Fn.reduce=function(t,e,n){var r=Ha(t)?Ze:Fe,i=arguments.length<3;return r(t,ao(e,4),n,i,fr)},Fn.reduceRight=function(t,e,n){var r=Ha(t)?Oe:Fe,i=arguments.length<3;return r(t,ao(e,4),n,i,pr)},Fn.repeat=function(t,e,n){return e=(n?yo(t,e,n):e===i)?1:vu(e),qr(bu(t),e)},Fn.replace=function(){var t=arguments,e=bu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fn.result=function(t,e,n){var r=-1,o=(e=gi(e,t)).length;for(o||(o=1,t=i);++rf)return[];var n=d,r=yn(t,d);e=ao(e),t-=d;for(var i=Be(r,e);++n=a)return t;var s=n-on(r);if(s<1)return r;var c=u?bi(u,0,s).join(""):t.slice(0,s);if(o===i)return c+r;if(u&&(s+=c.length-s),au(o)){if(t.slice(s).search(o)){var l,f=c;for(o.global||(o=Et(o.source,bu(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?s:p)}}else if(t.indexOf(ui(o),s)!=s){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Fn.unescape=function(t){return(t=bu(t))&&q.test(t)?t.replace(H,sn):t},Fn.uniqueId=function(t){var e=++Mt;return bu(t)+e},Fn.upperCase=Ku,Fn.upperFirst=Ju,Fn.each=ba,Fn.eachRight=wa,Fn.first=qo,ss(Fn,(ys={},br(Fn,(function(t,e){At.call(Fn.prototype,e)||(ys[e]=t)})),ys),{chain:!1}),Fn.VERSION="4.17.21",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Fn[t].placeholder=Fn})),be(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:gn(vu(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ao(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),be(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),be(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(is)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Gr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Cr(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(Na(ao(t)))},Un.prototype.slice=function(t,e){t=vu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=vu(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(d)},br(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Fn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(Fn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,s=e instanceof Un,c=u[0],l=s||Ha(e),f=function(t){var e=o.apply(Fn,Re([t],u));return r&&p?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=s&&!d;if(!a&&l){e=v?e:new Un(this);var m=t.apply(e,u);return m.__actions__.push({func:ha,args:[f],thisArg:i}),new Wn(m,p)}return h&&v?t.apply(this,u):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Fn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ha(i)?i:[],t)}return this[n]((function(n){return e.apply(Ha(n)?n:[],t)}))}})),br(Un.prototype,(function(t,e){var n=Fn[e];if(n){var r=n.name+"";At.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:e,func:n})}})),Tn[zi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Zi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Zi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Zi(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ha(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Do(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Fn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ea)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,ae&&(Fn.prototype[ae]=function(){return this}),Fn}();oe._=cn,(r=function(){return cn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},9921:(t,e)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case l:case f:case o:case u:case a:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case m:case v:case s:return t;default:return e}}case i:return e}}}function x(t){return _(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=c,e.ContextProvider=s,e.Element=r,e.ForwardRef=p,e.Fragment=o,e.Lazy=m,e.Memo=v,e.Portal=i,e.Profiler=u,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return x(t)||_(t)===l},e.isConcurrentMode=x,e.isContextConsumer=function(t){return _(t)===c},e.isContextProvider=function(t){return _(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return _(t)===p},e.isFragment=function(t){return _(t)===o},e.isLazy=function(t){return _(t)===m},e.isMemo=function(t){return _(t)===v},e.isPortal=function(t){return _(t)===i},e.isProfiler=function(t){return _(t)===u},e.isStrictMode=function(t){return _(t)===a},e.isSuspense=function(t){return _(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===f||t===u||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===s||t.$$typeof===c||t.$$typeof===p||t.$$typeof===y||t.$$typeof===b||t.$$typeof===w||t.$$typeof===g)},e.typeOf=_},9864:(t,e,n)=>{"use strict";t.exports=n(9921)},3379:(t,e,n)=>{"use strict";var r,i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** + * A better abstraction over CSS. + * + * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present + * @website https://github.com/cssinjs/jss + * @license MIT + */ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1-lts + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ diff --git a/luxwidget/labextension/static/284.bc4d6e8fca3f4fa3429e.js b/luxwidget/labextension/static/284.bc4d6e8fca3f4fa3429e.js new file mode 100644 index 0000000..0eaef22 --- /dev/null +++ b/luxwidget/labextension/static/284.bc4d6e8fca3f4fa3429e.js @@ -0,0 +1,2 @@ +/*! For license information please see 284.bc4d6e8fca3f4fa3429e.js.LICENSE.txt */ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[284,823,990],{1127:e=>{"use strict";var t=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,n){var r,o,i;return n=n||{},r=JSON.stringify([1],void 0,void 0===n.indent?2:n.indent).slice(2,-3),o=""===r?1/0:void 0===n.maxLength?80:n.maxLength,i=n.replacer,function e(n,s,a){var l,c,u,h,p,f,d,g,m,v,E,b;if(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===(E=JSON.stringify(n,i)))return E;if(d=o-s.length-a,E.length<=d&&(m=E.replace(t,(function(e,t){return t||e+" "}))).length<=d)return m;if(null!=i&&(n=JSON.parse(E),i=void 0),"object"==typeof n&&null!==n){if(g=s+r,u=[],c=0,Array.isArray(n))for(v="[",l="]",d=n.length;c0)return[v,r+u.join(",\n"+g),l].join("\n"+s)}return E}(e,"",0)}},9593:(e,t,n)=>{"use strict";const r=n(4411),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),p=Symbol("cache"),f=Symbol("updateAgeOnGet"),d=()=>1,g=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(m(e,t)){if(E(e,r),!e[a])return}else n&&(e[f]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},v=e=>{if(e[i]>e[o])for(let t=e[h].tail;e[i]>e[o]&&null!==t;){const n=t.prev;E(e,t),t=n}},E=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[h].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const y=(e,t,n,r)=>{let o=n.value;m(e,o)&&(E(e,n),e[a]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||d;if(this[s]="function"!=typeof t?d:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,v(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,v(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[i]=0,this[h].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),v(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let n=this[h].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[h].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[h]=new r,this[i]=0}dump(){return this[h].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[o])return E(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[c]&&(this[u]||this[c](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),v(this),!0}const f=new b(e,t,a,r,n);return f.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=f.length,this[h].unshift(f),this[p].set(e,this[h].head),v(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[h].tail;return e?(E(this,e),e.value):null}del(e){E(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},4155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,l=[],c=!1,u=-1;function h(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u1)for(var n=1;n{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&s||a||c}}e.exports=o;const i=n(2893),{re:s,t:a}=n(5765),l=n(7539),c=n(4225),u=n(6376),h=n(6902)},6902:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!d(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(i,$(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],h),a("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],p)).replace(c[u.CARETTRIM],f)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],g=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new s(e,this.options))),m=(g.length,new Map);for(const e of g){if(d(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const E=[...m.values()];return o.set(t,E),E}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>m(n,t)&&e.set.some((e=>m(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=x(e,t),a("xrange",e),e=I(e,t),a("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,o,i)=>{let s;return a("tilde",e,t,n,r,o,i),E(n)?s="":E(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:E(o)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>O(e,t))).join(" "),O=(e,t)=>{a("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,s)=>{let l;return a("caret",e,t,n,o,i,s),E(n)?l="":E(o)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(i)?l="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===n?"0"===o?`>=${n}.${o}.${i}-${s} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${s} <${+n+1}.0.0-0`):(a("no pr"),l="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),a("caret return",l),l}))},x=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>A(e,t))).join(" ")),A=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,o,i,s,l)=>{a("xRange",e,n,r,o,i,s,l);const c=E(o),u=c||E(i),h=u||E(s),p=h;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(i=0),s=0,">"===r?(r=">=",u?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===r&&(r="<",u?o=+o+1:i=+i+1),"<"===r&&(l="-0"),n=`${r+o}.${i}.${s}${l}`):u?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:h&&(n=`>=${o}.${i}.0${l} <${o}.${+i+1}.0-0`),a("xRange return",n),n}))},I=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),$=e=>(t,n,r,o,i,s,a,l,c,u,h,p,f)=>`${n=E(r)?"":E(o)?`>=${r}.0.0${e?"-0":""}`:E(i)?`>=${r}.${o}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(h)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${h}-${p}`:e?`<${c}.${u}.${+h+1}-0`:`<=${l}`}`.trim(),N=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},6376:(e,t,n)=>{const r=n(4225),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(3295),{re:s,t:a}=n(5765),l=n(2893),{compareIdentifiers:c}=n(6742);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},3507:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:(e,t,n)=>{const r=n(8718),o=n(1194),i=n(1312),s=n(5903),a=n(1544),l=n(2056);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return s(e,n,c);case"<":return a(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},9038:(e,t,n)=>{const r=n(6376),o=n(3959),{re:i,t:s}=n(5765);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[s.COERCERTL].lastIndex=-1}else n=e.match(i[s.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},8880:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:(e,t,n)=>{const r=n(6269);e.exports=(e,t)=>r(e,t,!0)},6269:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},2378:(e,t,n)=>{const r=n(3959),o=n(8718);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,s=i?"pre":"",a=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return s+e;return a}}},8718:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0===r(e,t,n)},1312:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>0},5903:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>=0},253:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<0},2056:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<=0},6378:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).major},7789:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).minor},1194:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0!==r(e,t,n)},3959:(e,t,n)=>{const{MAX_LENGTH:r}=n(3295),{re:o,t:i}=n(5765),s=n(6376),a=n(2893);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},2358:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).patch},7559:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(t,e,n)},3657:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5712:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},6397:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},1249:(e,t,n)=>{const r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(6378),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:(e,t,n)=>{var r=n(4155);const o="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=o},6742:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:en(t,e)}},2893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},5765:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(3295),o=n(4225),i=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;o(r,t),a[e]=r,s[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),c("FULL",`^${s[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),c("LOOSE",`^${s[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),c("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",s[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,">",n)},2937:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},32:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,"<",n)},5775:(e,t,n)=>{const r=n(6376),o=n(6902);e.exports=(e,t,n)=>{let i=null,s=null,a=null;try{a=new o(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new r(i,n)))})),i}},1657:(e,t,n)=>{const r=n(6376),o=n(6902);e.exports=(e,t,n)=>{let i=null,s=null,a=null;try{a=new o(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new r(i,n)))})),i}},5316:(e,t,n)=>{const r=n(6376),o=n(6902),i=n(1312);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!i(n,s)||(n=s)}return n&&e.test(n)?n:null}},6826:(e,t,n)=>{const r=n(6376),o=n(2257),{ANY:i}=o,s=n(6902),a=n(5712),l=n(1312),c=n(1544),u=n(2056),h=n(5903);e.exports=(e,t,n,p)=>{let f,d,g,m,v;switch(e=new r(e,p),t=new s(t,p),n){case">":f=l,d=u,g=c,m=">",v=">=";break;case"<":f=c,d=h,g=l,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let n=0;n{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,f(e.semver,s.semver,p)?s=e:g(e.semver,a.semver,p)&&(a=e)})),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&d(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},7908:(e,t,n)=>{const r=n(5712),o=n(6269);e.exports=(e,t,n)=>{const i=[];let s=null,a=null;const l=e.sort(((e,t)=>o(e,t,n)));for(const e of l)r(e,t,n)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null);s&&i.push([s,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return u.length{const r=n(6902),o=n(2257),{ANY:i}=o,s=n(5712),a=n(6269),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let l,h,p,f,d,g,m;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?h=u(h,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&h){if(p=a(l.semver,h.semver,n),p>0)return null;if(0===p&&(">="!==l.operator||"<="!==h.operator))return null}for(const e of r){if(l&&!s(e,String(l),n))return null;if(h&&!s(e,String(h),n))return null;for(const r of t)if(!s(e,String(r),n))return!1;return!0}let v=!(!h||n.includePrerelease||!h.semver.prerelease.length)&&h.semver,E=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;v&&1===v.prerelease.length&&"<"===h.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,l)if(E&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===E.major&&e.semver.minor===E.minor&&e.semver.patch===E.patch&&(E=!1),">"===e.operator||">="===e.operator){if(f=c(l,e,n),f===e&&f!==l)return!1}else if(">="===l.operator&&!s(l.semver,String(e),n))return!1;if(h)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(d=u(h,e,n),d===e&&d!==h)return!1}else if("<="===h.operator&&!s(h.semver,String(e),n))return!1;if(!e.operator&&(h||l)&&0!==p)return!1}return!(l&&g&&!h&&0!==p||h&&m&&!l&&0!==p||E||v)},c=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},1042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},6284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_ACTIONS:()=>ke,default:()=>Xe,guessMode:()=>ze,vega:()=>Le,vegaLite:()=>Ce});var r={};n.r(r),n.d(r,{JsonPatchError:()=>E,_areEquals:()=>N,applyOperation:()=>x,applyPatch:()=>A,applyReducer:()=>I,deepClone:()=>b,getValueByPointer:()=>O,validate:()=>$,validator:()=>R});var o={};n.r(o),n.d(o,{compare:()=>P,generate:()=>k,observe:()=>D,unobserve:()=>C});var i={};n.r(i),n.d(i,{dark:()=>X,excel:()=>W,fivethirtyeight:()=>K,ggplot2:()=>Q,googlecharts:()=>ye,latimes:()=>ie,quartz:()=>le,urbaninstitute:()=>me,version:()=>we,vox:()=>ue});var s,a=(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=Object.prototype.hasOwnProperty;function c(e,t){return l.call(e,t)}function u(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&t<=57))return!1;n++}return!0}function f(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function g(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t=u){if(n&&"add"===t.op&&g>l.length)throw new E("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);if(!1===(s=w[t.op].call(t,l,g,e)).test)throw new E("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}}else if(g&&-1!=g.indexOf("~")&&(g=d(g)),c>=u){if(!1===(s=y[t.op].call(t,l,g,e)).test)throw new E("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}l=l[g]}}function A(e,t,n,r,o){if(void 0===r&&(r=!0),void 0===o&&(o=!0),n&&!Array.isArray(t))throw new E("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=h(e));for(var i=new Array(t.length),s=0,a=t.length;s0)throw new E('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new E("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&g(e.value))throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var o=e.path.split("/").length,i=r.split("/").length;if(o!==i+1&&o!==i)throw new E("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new E("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var s=$([{op:"_get",path:e.from,value:void 0}],n);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new E("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function $(e,t,n){try{if(!Array.isArray(e))throw new E("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)A(h(t),h(e),n||!0);else{n=n||R;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function F(e,t,n,r,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=u(t),s=u(e),a=!1,l=s.length-1;l>=0;l--){var p=e[g=s[l]];if(!c(t,g)||void 0===t[g]&&void 0!==p&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(o&&n.push({op:"test",path:r+"/"+f(g),value:h(p)}),n.push({op:"remove",path:r+"/"+f(g)}),a=!0):(o&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}));else{var d=t[g];"object"==typeof p&&null!=p&&"object"==typeof d&&null!=d?F(p,d,n,r+"/"+f(g),o):p!==d&&(o&&n.push({op:"test",path:r+"/"+f(g),value:h(p)}),n.push({op:"replace",path:r+"/"+f(g),value:h(d)}))}}if(a||i.length!=s.length)for(l=0;le?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}class Re{constructor(e){this.options=Object.assign(Object.assign({},Ae),e);const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n".toString().replace(xe,e)}(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el)),(null!=document.fullscreenElement?document.fullscreenElement:document.body).appendChild(this.el),null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=function(e,t,n){if((0,Oe.kJ)(e))return`[${e.map((e=>t((0,Oe.HD)(e)?e:Ie(e,n)))).join(", ")}]`;if((0,Oe.Kn)(e)){let r="";const o=e,{title:i,image:s}=o,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o${t(i)}`),s&&(r+=``);const l=Object.keys(a);if(l.length>0){r+="";for(const e of l){let o=a[e];void 0!==o&&((0,Oe.Kn)(o)&&(o=Ie(o,n)),r+=``)}r+="
${t(e)}:${t(o)}
"}return r||"{}"}return t(e)}(r,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:i}=function(e,t,n,r){let o=e.clientX+n;o+t.width>window.innerWidth&&(o=+e.clientX-n-t.width);let i=e.clientY+r;return i+t.height>window.innerHeight&&(i=+e.clientY-r-t.height),{x:o,y:i}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${i}px; left: ${o}px`)}}function $e(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}var Ne;function Te(e,...t){for(const n of t)Se(e,n);return e}function Se(e,t){for(const n of Object.keys(t))(0,z.writeConfig)(e,n,t[n],!0)}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e});const Le=z;let Ce=B;const De="undefined"!=typeof window?window:void 0;void 0===Ce&&(null===(Ne=null==De?void 0:De.vl)||void 0===Ne?void 0:Ne.compile)&&(Ce=De.vl);const ke={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},Fe={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},Pe={vega:"Vega","vega-lite":"Vega-Lite"},_e={vega:Le.version,"vega-lite":Ce?Ce.version:"not available"},je={vega:e=>e,"vega-lite":(e,t)=>Ce.compile(e,{config:t}).spec};function Me(e,t,n,r){const o=`${t}
`,i=`
${n}`,s=window.open("");s.document.write(o+e+i),s.document.title=`${Pe[r]} JSON Source`}function ze(e,t){var n;if(e.$schema){const r=G(e.$schema);t&&t!==r.library&&console.warn(`The given visualization spec is written in ${Pe[r.library]}, but mode argument sets ${null!==(n=Pe[t])&&void 0!==n?n:t}.`);const o=r.library;return(0,M.satisfies)(_e[o],`^${r.version.slice(1)}`)||console.warn(`The input spec uses ${Pe[o]} ${r.version}, but the current version of ${Pe[o]} is v${_e[o]}.`),o}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!=t?t:"vega"}function Be(e){return(t=e)&&"load"in t?e:Le.loader(e);var t}function Ge(e){var t;return null!==(t=e.usermeta&&e.usermeta.embedOptions)&&void 0!==t?t:{}}function Ue(e,t){var n;return $e(this,void 0,void 0,(function*(){const r=(0,z.isString)(e.config)?JSON.parse(yield t.load(e.config)):null!==(n=e.config)&&void 0!==n?n:{},o=(0,z.isString)(e.patch)?JSON.parse(yield t.load(e.patch)):e.patch;return Object.assign(Object.assign(Object.assign({},e),o?{patch:o}:{}),r?{config:r}:{})}))}const Xe=function(e,t,n={}){var r,o,s;return $e(this,void 0,void 0,(function*(){let a,l;(0,z.isString)(t)?(l=Be(n.loader),a=JSON.parse(yield l.load(t))):a=t;const c=Ge(a).loader;l&&!c||(l=Be(null!==(r=n.loader)&&void 0!==r?r:c));const u=yield Ue(Ge(a),l),h=yield Ue(n,l),p=Object.assign(Object.assign({},Te(h,u)),{config:(0,z.mergeConfig)(null!==(o=h.config)&&void 0!==o?o:{},null!==(s=u.config)&&void 0!==s?s:{})});return yield function(e,t,n={},r){var o,s,a,l,c,u;return $e(this,void 0,void 0,(function*(){const h=n.theme?(0,z.mergeConfig)(i[n.theme],null!==(o=n.config)&&void 0!==o?o:{}):n.config,p=(0,z.isBoolean)(n.actions)?n.actions:Te({},ke,null!==(s=n.actions)&&void 0!==s?s:{}),f=Object.assign(Object.assign({},Fe),n.i18n),d=null!==(a=n.renderer)&&void 0!==a?a:"canvas",g=null!==(l=n.logLevel)&&void 0!==l?l:Le.Warn,m=null!==(c=n.downloadFileName)&&void 0!==c?c:"visualization",v="string"==typeof e?document.querySelector(e):e;if(!v)throw new Error(`${e} does not exist`);if(!1!==n.defaultStyle){const e="vega-embed-style",{root:t,rootContainer:r}=function(e){var t;const n=e.getRootNode?e.getRootNode():document;return n instanceof ShadowRoot?{root:n,rootContainer:n}:{root:document,rootContainer:null!==(t=document.head)&&void 0!==t?t:document.body}}(v);if(!t.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerText=void 0===n.defaultStyle||!0===n.defaultStyle?'.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box; }\n .vega-embed.has-actions {\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer;\n line-height: 0px; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset; }\n .vega-embed summary svg {\n width: 14px;\n height: 14px; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left; }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n .vega-embed .chart-wrapper {\n width: 100%;\n height: 100%; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n'.toString():n.defaultStyle,r.appendChild(t)}}const E=ze(t,n.mode);let b=je[E](t,h);if("vega-lite"===E&&b.$schema){const e=G(b.$schema);(0,M.satisfies)(_e.vega,`^${e.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${e.version}, but current version is v${_e.vega}.`)}v.classList.add("vega-embed"),p&&v.classList.add("has-actions"),v.innerHTML="";let y=v;if(p){const e=document.createElement("div");e.classList.add("chart-wrapper"),v.appendChild(e),y=e}const w=n.patch;w&&(b=w instanceof Function?w(b):A(b,w,!0,!1).newDocument),n.formatLocale&&Le.formatLocale(n.formatLocale),n.timeFormatLocale&&Le.timeFormatLocale(n.timeFormatLocale);const{ast:O}=n,x=Le.parse(b,"vega-lite"===E?{}:h,{ast:O}),I=new(n.viewClass||Le.View)(x,Object.assign({loader:r,logLevel:g,renderer:d},O?{expr:Le.expressionInterpreter}:{}));if(!1!==n.tooltip){let e;e="function"==typeof n.tooltip?n.tooltip:new Re(!0===n.tooltip?{}:n.tooltip).call,I.tooltip(e)}let R,{hover:$}=n;if(void 0===$&&($="vega"===E),$){const{hoverSet:e,updateSet:t}="boolean"==typeof $?{}:$;I.hover(e,t)}if(n&&(null!=n.width&&I.width(n.width),null!=n.height&&I.height(n.height),null!=n.padding&&I.padding(n.padding)),yield I.initialize(y,n.bind).runAsync(),!1!==p){let e=v;if(!1!==n.defaultStyle){const t=document.createElement("details");t.title=f.CLICK_TO_VIEW_ACTIONS,v.append(t),e=t;const n=document.createElement("summary");n.innerHTML='\n\n \n \n \n',t.append(n),R=e=>{t.contains(e.target)||t.removeAttribute("open")},document.addEventListener("click",R)}const r=document.createElement("div");if(e.append(r),r.classList.add("vega-actions"),!0===p||!1!==p.export)for(const e of["svg","png"])if(!0===p||!0===p.export||p.export[e]){const t=f[`${e.toUpperCase()}_ACTION`],o=document.createElement("a");o.text=t,o.href="#",o.target="_blank",o.download=`${m}.${e}`,o.addEventListener("mousedown",(function(t){return $e(this,void 0,void 0,(function*(){t.preventDefault();const r=yield I.toImageURL(e,n.scaleFactor);this.href=r}))})),r.append(o)}if(!0===p||!1!==p.source){const e=document.createElement("a");e.text=f.SOURCE_ACTION,e.href="#",e.addEventListener("click",(function(e){var r,o;Me(j()(t),null!==(r=n.sourceHeader)&&void 0!==r?r:"",null!==(o=n.sourceFooter)&&void 0!==o?o:"",E),e.preventDefault()})),r.append(e)}if("vega-lite"===E&&(!0===p||!1!==p.compiled)){const e=document.createElement("a");e.text=f.COMPILED_ACTION,e.href="#",e.addEventListener("click",(function(e){var t,r;Me(j()(b),null!==(t=n.sourceHeader)&&void 0!==t?t:"",null!==(r=n.sourceFooter)&&void 0!==r?r:"","vega"),e.preventDefault()})),r.append(e)}if(!0===p||!1!==p.editor){const e=null!==(u=n.editorUrl)&&void 0!==u?u:"https://vega.github.io/editor/",o=document.createElement("a");o.text=f.EDITOR_ACTION,o.href="#",o.addEventListener("click",(function(n){!function(e,t,n){const r=e.open(t),{origin:o}=new URL(t);let i=40;e.addEventListener("message",(function t(n){n.source===r&&(i=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){i<=0||(r.postMessage(n,o),setTimeout(e,250),i-=1)}),250)}(window,e,{config:h,mode:E,renderer:d,spec:j()(t)}),n.preventDefault()})),r.append(o)}}return{view:I,spec:t,vgSpec:b,finalize:function(){R&&document.removeEventListener("click",R),I.finalize()}}}))}(e,a,p,l)}))}},8823:(e,t,n)=>{"use strict";function r(e,t,n){return e.fields=t||[],e.fname=n,e}function o(e){return null==e?null:e.fname}function i(e){return null==e?null:e.fields}function s(e){return 1===e.length?a(e[0]):l(e)}n.d(t,{cG:()=>x,jj:()=>y,kI:()=>O,Hq:()=>b,uU:()=>w,ZE:()=>r,Oj:()=>i,el:()=>o,IX:()=>Y,j2:()=>ee,l$:()=>K,qu:()=>Q,a9:()=>oe,Ds:()=>ie,vU:()=>c,l7:()=>se,We:()=>ae,dI:()=>le,k:()=>v,Xr:()=>pe,EP:()=>h,yl:()=>fe,nr:()=>ue,id:()=>p,yR:()=>f,XW:()=>de,u5:()=>ge,kJ:()=>I,jn:()=>me,J_:()=>ve,mf:()=>Z,TW:()=>Ee,hj:()=>be,Kn:()=>R,Kj:()=>ye,HD:()=>we,Jy:()=>Oe,t7:()=>xe,kg:()=>A,$m:()=>Ae,TS:()=>Ie,fE:()=>N,kX:()=>g,vk:()=>$e,Dw:()=>M,mJ:()=>z,QA:()=>B,Zw:()=>G,fj:()=>L,mS:()=>J,rx:()=>Re,yP:()=>Ne,_k:()=>u,m8:()=>Te,sw:()=>Se,ZU:()=>Ce,He:()=>C,Rg:()=>ke,BB:()=>De,$G:()=>Fe,yb:()=>m,N3:()=>q,FP:()=>Pe,iL:()=>T,bM:()=>d,ay:()=>X,dH:()=>V,mK:()=>W,bV:()=>H});const a=e=>function(t){return t[e]},l=e=>{const t=e.length;return function(n){for(let r=0;rr&&u(),a=r=o+1):"]"===i&&(a||c("Access path missing open bracket: "+e),a>0&&u(),a=0,r=o+1):o>r?u():r=o+1}return a&&c("Access path missing closing bracket: "+e),s&&c("Access path missing closing quote: "+e),o>r&&(o++,u()),t}function h(e,t,n){const o=u(e);return e=1===o.length?o[0]:e,r((n&&n.get||s)(o),[e],t||e)}const p=h("id"),f=r((e=>e),[],"identity"),d=r((()=>0),[],"zero"),g=r((()=>1),[],"one"),m=r((()=>!0),[],"true"),v=r((()=>!1),[],"false");function E(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const b=0,y=1,w=2,O=3,x=4;function A(e,t){let n=e||b;return{level(e){return arguments.length?(n=+e,this):n},error(){return n>=y&&E(t||"error","ERROR",arguments),this},warn(){return n>=w&&E(t||"warn","WARN",arguments),this},info(){return n>=O&&E(t||"log","INFO",arguments),this},debug(){return n>=x&&E(t||"log","DEBUG",arguments),this}}}var I=Array.isArray;function R(e){return e===Object(e)}const $=e=>"__proto__"!==e;function N(...e){return e.reduce(((e,t)=>{for(const n in t)if("signals"===n)e.signals=S(e.signals,t.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;T(e,n,t[n],r)}return e}),{})}function T(e,t,n,r){if(!$(t))return;let o,i;if(R(n)&&!I(n))for(o in i=R(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[o])?T(i,o,n[o]):$(o)&&(i[o]=n[o]);else e[t]=n}function S(e,t){if(null==e)return t;const n={},r=[];function o(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(o),e.forEach(o),r}function L(e){return e[e.length-1]}function C(e){return null==e||""===e?null:+e}const D=e=>t=>e*Math.exp(t),k=e=>t=>Math.log(e*t),F=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),P=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,_=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function j(e,t,n,r){const o=n(e[0]),i=n(L(e)),s=(i-o)*t;return[r(o-s),r(i-s)]}function M(e,t){return j(e,t,C,f)}function z(e,t){var n=Math.sign(e[0]);return j(e,t,k(n),D(n))}function B(e,t,n){return j(e,t,_(n),_(1/n))}function G(e,t,n){return j(e,t,F(n),P(n))}function U(e,t,n,r,o){const i=r(e[0]),s=r(L(e)),a=null!=t?r(t):(i+s)/2;return[o(a+(i-a)*n),o(a+(s-a)*n)]}function X(e,t,n){return U(e,t,n,C,f)}function V(e,t,n){const r=Math.sign(e[0]);return U(e,t,n,k(r),D(r))}function W(e,t,n,r){return U(e,t,n,_(r),_(1/r))}function H(e,t,n,r){return U(e,t,n,F(r),P(r))}function J(e){return 1+~~(new Date(e).getMonth()/3)}function q(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Y(e){return null!=e?I(e)?e:[e]:[]}function K(e,t,n){let r,o=e[0],i=e[1];return i=n-t?[t,n]:[o=Math.min(Math.max(o,t),n-r),o+r]}function Z(e){return"function"==typeof e}function Q(e,t,n){n=n||{},t=Y(t)||[];const o=[],s=[],a={},l=n.comparator||te;return Y(e).forEach(((e,r)=>{null!=e&&(o.push("descending"===t[r]?-1:1),s.push(e=Z(e)?e:h(e,null,n)),(i(e)||[]).forEach((e=>a[e]=1)))})),0===s.length?null:r(l(s,o),Object.keys(a))}const ee=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),te=(e,t)=>1===e.length?ne(e[0],t[0]):re(e,t,e.length),ne=(e,t)=>function(n,r){return ee(e(n),e(r))*t},re=(e,t,n)=>(t.push(0),function(r,o){let i,s=0,a=-1;for(;0===s&&++ae}function ie(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(t(r),n=null)),e)}}function se(e){for(let t,n,r=1,o=arguments.length;ri&&(i=r))}else{for(r=t(e[s]);si&&(i=r))}return[o,i]}function le(e,t){const n=e.length;let r,o,i,s,a,l=-1;if(null==t){for(;++l=o){r=i=o;break}if(l===n)return[-1,-1];for(s=a=l;++lo&&(r=o,s=l),i=o){r=i=o;break}if(l===n)return[-1,-1];for(s=a=l;++lo&&(r=o,s=l),ir(e)?n[e]:void 0,set(e,t){return r(e)||(++o.size,n[e]===he&&--o.empty),n[e]=t,this},delete(e){return r(e)&&(--o.size,++o.empty,n[e]=he),this},clear(){o.size=o.empty=0,o.object=n={}},test(e){return arguments.length?(t=e,o):t},clean(){const e={};let r=0;for(const o in n){const i=n[o];i===he||t&&t(i)||(e[o]=i,++r)}o.size=r,o.empty=0,o.object=n=e}};return e&&Object.keys(e).forEach((t=>{o.set(t,e[t])})),o}function fe(e,t,n,r,o,i){if(!n&&0!==n)return i;const s=+n;let a,l=e[0],c=L(e);cs&&(o=i,i=s,s=o),r=void 0===r||r,((n=void 0===n||n)?i<=e:ie.replace(/\\(.)/g,"$1"))):Y(e));const o=e&&e.length,i=n&&n.get||s,a=e=>i(t?[e]:u(e));let l;if(o)if(1===o){const t=a(e[0]);l=function(e){return""+t(e)}}else{const t=e.map(a);l=function(e){let n=""+t[0](e),r=0;for(;++r{t={},n={},r=0},i=(o,i)=>(++r>e&&(n=t,t={},r=1),t[o]=i);return o(),{clear:o,has:e=>ue(t,e)||ue(n,e),get:e=>ue(t,e)?t[e]:ue(n,e)?i(e,n[e]):void 0,set:(e,n)=>ue(t,e)?t[e]=n:i(e,n)}}function Ie(e,t,n,r){const o=t.length,i=n.length;if(!i)return t;if(!o)return n;const s=r||new t.constructor(o+i);let a=0,l=0,c=0;for(;a0?n[l++]:t[a++];for(;a=0;)n+=e;return n}function $e(e,t,n,r){const o=n||" ",i=e+"",s=t-i.length;return s<=0?i:"left"===r?Re(o,s)+i:"center"===r?Re(o,~~(s/2))+i+Re(o,Math.ceil(s/2)):i+Re(o,s)}function Ne(e){return e&&L(e)-e[0]||0}function Te(e){return I(e)?"["+e.map(Te)+"]":R(e)||we(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function Se(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const Le=e=>be(e)||ve(e)?e:Date.parse(e);function Ce(e,t){return t=t||Le,null==e||""===e?null:t(e)}function De(e){return null==e||""===e?null:e+""}function ke(e){const t={},n=e.length;for(let r=0;r{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r0&&(e?(d=o.default.createElement("i",{id:"deleteBtn",className:"fa fa-trash",title:"Delete selected visualizations",onClick:()=>n()}),p=o.default.createElement("i",{id:"exportBtn",className:"fa fa-upload",title:"Export selected visualizations into variable",onClick:e=>r()})):(d=o.default.createElement("i",{id:"deleteBtn",className:"fa fa-trash",style:{opacity:.2,cursor:"not-allowed"},title:"Select one or more visualizations to delete"}),p=o.default.createElement("i",{id:"exportBtn",className:"fa fa-upload",style:{opacity:.2,cursor:"not-allowed"},title:"Select one or more visualizations to export into variable"})),u=e&&c?o.default.createElement("i",{id:"intentBtn",className:"fa fa-search",title:"Set selected visualization as intent",onClick:()=>i()}):o.default.createElement("i",{id:"intentBtn",className:"fa fa-search",style:{opacity:.2,cursor:"not-allowed"},title:"Select no more than one visualization to set as intent"})),l&&(h=o.default.createElement(a.Alert,{id:"alertBox",key:"infoAlert",variant:"info",onClose:()=>s(),dismissible:!0},"Access exported visualizations via the property `exported` (",o.default.createElement("a",{href:"https://lux-api.readthedocs.io/en/latest/source/guide/export.html",target:"_blank"},"More details"),")")),o.default.createElement("div",null,d,h,u,p)}}t.default=l},935:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(6271)),l=o(n(6597)),c=n(5276),d=o(n(6802)),p=n(6988);class u extends a.Component{constructor(e){super(e);var t={selected:e.multiple?[]:-1};this.state=t}onItemSelected(e){this.setState(((t,n)=>{if(n.multiple){var r=t.selected;return r.indexOf(e)>-1?(p.dispatchLogEvent("unclickVis",{tabTitle:this.props.title,index:e,title:this.props.graphSpec[e].title,mark:this.props.graphSpec[e].mark,encoding:this.props.graphSpec[e].encoding}),r=r.filter((t=>t!=e)),n.onChange(r)):(p.dispatchLogEvent("clickVis",{tabTitle:this.props.title,index:e,title:this.props.graphSpec[e].title,mark:this.props.graphSpec[e].mark,encoding:this.props.graphSpec[e].encoding}),r.length>=n.maxSelectable||(r.push(e),n.onChange(r))),{selected:r}}return p.dispatchLogEvent("clickVis",e),n.onChange(e),{selected:e}}))}removeDeletedCharts(){this.setState({selected:[]})}render(){return a.default.createElement("div",{className:"chartGalleryTabContent"},a.default.createElement("p",{className:"text-description",dangerouslySetInnerHTML:{__html:this.props.description}}),a.default.createElement(d.default,{galleryItems:this.props.graphSpec.map(((e,t)=>a.default.createElement("div",{key:t.toString(),className:"graph-container",id:"graph-container-".concat(t.toString())},this.state.selected.indexOf(t)>-1?a.default.createElement(l.default,{key:t,selected:!0,onClick:e=>{this.onItemSelected(t)}},"vislib"in e&&"config"in e&&"matplotlib"===JSON.stringify(e.vislib).substring(1,JSON.stringify(e.vislib).length-1)?a.default.createElement("img",{id:"gal-img",src:"data:image/png;base64,"+JSON.stringify(e.config).substring(1,JSON.stringify(e.config).length-1)+" "}):a.default.createElement(c.VegaLite,{spec:e,padding:{left:10,top:5,right:5,bottom:5},actions:!1})):a.default.createElement(l.default,{key:t,selected:!1,onClick:e=>{this.onItemSelected(t)}},"vislib"in e&&"config"in e&&"matplotlib"===JSON.stringify(e.vislib).substring(1,JSON.stringify(e.vislib).length-1)?a.default.createElement("img",{id:"gal-img",src:"data:image/png;base64,"+JSON.stringify(e.config).substring(1,JSON.stringify(e.config).length-1)+" "}):a.default.createElement(c.VegaLite,{spec:e,padding:{left:10,top:5,right:5,bottom:5},actions:!1}))))),title:this.props.title,currentVisShow:this.props.currentVisShow}))}}t.default=u},104:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(6271)),l=n(5276),c=o(n(6597)),d=o(n(6486)),p=n(4349),u=o(n(8958)),h=o(n(4742));class f extends a.Component{constructor(e){super(e),this.state={selected:-1}}onItemSelected(){0==this.state.selected?(this.setState({selected:-1}),this.props.onChange(-2)):(this.setState({selected:0}),this.props.onChange(-1))}render(){if(d.default.isEmpty(this.props.currentVisSpec))return a.default.createElement("div",{className:"placeHolderVizContainer"});var e="vegalite",t="";if("vislib"in this.props.currentVisSpec&&"config"in this.props.currentVisSpec){e=(e=JSON.stringify(this.props.currentVisSpec.vislib)).substring(1,e.length-1);const n=JSON.stringify(this.props.currentVisSpec.config);t="data:image/png;base64,"+n.substring(1,n.length-1)+" "}if(0==this.props.numRecommendations)return a.default.createElement("div",{className:"vizContainer",style:{width:"320px"}},"matplotlib"===e?a.default.createElement("img",{id:"cur-img",src:t}):a.default.createElement(l.VegaLite,{spec:this.props.currentVisSpec,padding:{left:0,top:5,right:5,bottom:5},actions:!1}));{const n={tooltip:{width:"100px",fontSize:"13px",marginTop:"10px",textAlign:"center"}},r=p.withStyles(n)(h.default);return a.default.createElement("div",{id:"mainVizContainer"},a.default.createElement("p",{className:"title-description",style:{position:"absolute",fontSize:"20px",height:"25px",display:"inline",top:"10px",left:"40px"}},"Current Visualization"),a.default.createElement("p",{className:"text-description",style:{top:"40px",left:"40px",position:"absolute"}},"based on user specified ",a.default.createElement(r,{title:this.props.intent,arrow:!0},a.default.createElement(u.default,{style:{fontSize:"13px",minWidth:"0px",padding:"0px",background:"aliceblue",textTransform:"none",borderBottom:"1px dotted #505050"}},"intent"))),a.default.createElement("div",{id:"mainVizInnerContainer"},a.default.createElement("div",{className:"vizContainer"},a.default.createElement(c.default,{key:0,selected:this.state.selected>-1,onClick:e=>this.onItemSelected()},"matplotlib"===e?a.default.createElement("img",{id:"cur-img",src:t}):a.default.createElement(l.VegaLite,{spec:this.props.currentVisSpec,padding:{left:10,top:5,right:5,bottom:5},width:185,height:160,actions:!1})))))}}}t.default=f},8728:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=s(n(6271));class a extends o.Component{constructor(e){super(e)}render(){const{message:e,toggleInfoPanel:t,openInfo:n}=this.props;let r,i;return""!=e&&(r=o.default.createElement("i",{id:"infoBtn",className:"fa fa-info-circle",onClick:e=>t(e)}),i=o.default.createElement("div",{className:"info-footer",style:{display:n?"flex":"none"}},o.default.createElement("p",{className:"infoMsgText",dangerouslySetInnerHTML:{__html:e}}))),o.default.createElement("span",null,r,i)}}t.default=a},6802:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=s(n(6271)),a=n(6988);class l extends o.Component{constructor(e){super(e),this.state={isScrolling:!1,firstScroll:!0,scrollIndicator:!0},this.handleScroll=this.handleScroll.bind(this),this.scrollStartStopListener=this.scrollStartStopListener.bind(this)}handleScroll(e){this.setState({scrollIndicator:!1});var t=this;this.scrollStartStopListener((function(){a.dispatchLogEvent("stopScroll",t.props.title),t.setState({firstScroll:!0})}))}scrollStartStopListener(e){e&&"function"==typeof e&&(this.state.firstScroll&&(a.dispatchLogEvent("startScroll",this.props.title),this.setState({firstScroll:!1})),window.clearTimeout(this.state.isScrolling),this.setState({isScrolling:setTimeout((function(){e()}),60)}))}render(){let e=!1,t=this.props.galleryItems.length;var n;return this.props.currentVisShow&&this.props.galleryItems.length>2?(e=!0,t-=2):!this.props.currentVisShow&&this.props.galleryItems.length>3&&(e=!0,t-=3),n=1==t?"Scroll for "+t+" more chart":"Scroll for "+t+" more charts",o.default.createElement("div",{id:"staticOuterDiv",className:"recommendationStaticContentOuter",onScroll:this.handleScroll},o.default.createElement("div",{id:"mult-graph-container",className:"recommendationContentInner"},this.props.galleryItems),o.default.createElement("div",{id:"scroll-indicator-background",style:{visibility:this.state.scrollIndicator&&e?"visible":"hidden"}},o.default.createElement("p",{id:"scroll-indicator",style:{visibility:this.state.scrollIndicator&&e?"visible":"hidden"}},n,o.default.createElement("i",{id:"first-arrow",className:"fa fa-chevron-right"}),o.default.createElement("i",{id:"second-arrow",className:"fa fa-chevron-right"})," ")))}}t.default=l},6597:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(6271));class s extends i.default.Component{render(){var e="selectable "+(this.props.selected?"selected":"");return i.default.createElement("div",{className:"card",style:{display:"inline-block"}},i.default.createElement("div",{className:e,onClick:this.props.onClick},this.props.children,i.default.createElement("div",{className:"check"},i.default.createElement("span",{className:"checkmark"},"✔"))))}}t.default=s},6988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchLogEvent=void 0,t.dispatchLogEvent=function(e,t){var n=new CustomEvent("LOG",{detail:{action:e,param:t}});document.dispatchEvent(n)}},8657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MODULE_NAME=t.MODULE_VERSION=void 0;const r=n(306);t.MODULE_VERSION=r.version,t.MODULE_NAME=r.name},8604:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=s(n(6271));class a extends o.Component{constructor(e){super(e)}render(){const{message:e,toggleWarningPanel:t,openWarning:n}=this.props;let r,i;return""!=e&&(r=o.default.createElement("i",{id:"warnBtn",className:"fa fa-exclamation-triangle",onClick:e=>t(e)}),i=o.default.createElement("div",{className:"warning-footer",style:{display:n?"flex":"none"}},o.default.createElement("p",{className:"warnMsgText",dangerouslySetInnerHTML:{__html:e}}))),o.default.createElement("div",null,r,i)}}t.default=a},1367:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LuxWidgetView=t.LuxModel=void 0;const a=n(134),l=n(8657);n(9259);const c=s(n(6271)),d=s(n(4456)),p=o(n(6486)),u=n(8650),h=o(n(935)),f=o(n(104)),g=n(6988),m=o(n(974)),b=o(n(8604)),x=o(n(8728));class v extends a.DOMWidgetModel{defaults(){return Object.assign(Object.assign({},super.defaults()),{_model_name:v.model_name,_model_module:v.model_module,_model_module_version:v.model_module_version,_view_name:v.view_name,_view_module:v.view_module,_view_module_version:v.model_module_version})}}t.LuxModel=v,v.serializers=Object.assign({},a.DOMWidgetModel.serializers),v.model_name="LuxModel",v.model_module=l.MODULE_NAME,v.model_module_version=l.MODULE_VERSION,v.view_name="LuxWidgetView",v.view_module=l.MODULE_NAME,v.view_module_version=l.MODULE_VERSION;class y extends a.DOMWidgetView{initialize(){let e=this;class t extends c.Component{constructor(e){super(e),this.chartComponents=Array(),this.handleCurrentVisSelect=e=>{this.setState({currentVisSelected:e},(()=>{-1==e?this.onListChanged(-1,null):this.onListChanged(-2,null)}))};for(var t=0;t0))return"";e=this.props.model.get("recommendations")[0].action}var t="";for(var n of this.props.model.get("recommendations"))n.action===e&&(t=n.long_description);return t}handleSelect(e){e&&g.dispatchLogEvent("switchTab",e);var t=this.generateDescription(e);this.setState({activeTab:e,longDescription:t})}onListChanged(e,t){var n={};for(var r of(this.state.selectedRec[e]=t,Object.keys(this.state.selectedRec)))if(r in this.state.recommendations){var i=this.state.recommendations[r].action;this.state.selectedRec[r].length>0&&(n[i]=this.state.selectedRec[r])}else-1==this.state.currentVisSelected&&(n.currentVis=this.state.currentVis);this.setState({_selectedVisIdxs:n})}exportSelection(){g.dispatchLogEvent("exportBtnClick",this.state._selectedVisIdxs),this.setState((e=>({showAlert:!0}))),setTimeout((()=>{this.setState((e=>({showAlert:!1})))}),6e4),e.model.set("_selectedVisIdxs",this.state._selectedVisIdxs),e.model.save()}deleteSelection(){g.dispatchLogEvent("deleteBtnClick",this.state._selectedVisIdxs);var t=this.state._selectedVisIdxs;for(var n of this.state.recommendations)if(this.state._selectedVisIdxs[n.action]){let e=0;for(var r of this.state._selectedVisIdxs[n.action])n.vspec.splice(r-e,1),e++}this.setState({selectedRec:{},_selectedVisIdxs:{},deletedIndices:t});for(var i=0;ic.createElement(u.Tab,{eventKey:e.action,title:e.action},c.createElement(h.default,{key:"no refresh",ref:this.chartComponents[t],title:e.action,description:e.description,multiple:!0,maxSelectable:10,onChange:this.onListChanged.bind(this,t),graphSpec:e.vspec,currentVisShow:!p.default.isEmpty(this.props.model.get("current_vis"))}))))}generateNoRecsWarning(){if(""!=this.state.message)return c.createElement("div",{id:"no-recs-footer",style:{display:"flex"}},c.createElement("div",{id:"no-recs",className:"fa fa-exclamation-triangle"}),c.createElement("div",null,c.createElement("p",{className:"warnMsgText",dangerouslySetInnerHTML:{__html:this.state.message.replace(/<[^>]+>/g,"")}})))}render(){var e=Object.keys(this.state._selectedVisIdxs).length>0,t=1==Object.keys(this.state._selectedVisIdxs).length&&1==Object.values(this.state._selectedVisIdxs)[0].length;return 0==this.state.recommendations.length?c.createElement("div",{id:"oneViewWidgetContainer",style:{flexDirection:"column"}},c.createElement("div",{style:{display:"flex",flexDirection:"row"}},c.createElement(f.default,{intent:this.state.intent,currentVisSpec:this.state.currentVis,numRecommendations:this.state.recommendations.length,onChange:this.handleCurrentVisSelect})),c.createElement(m.default,{buttonsEnabled:e,deleteSelection:this.deleteSelection,exportSelection:this.exportSelection,setIntent:this.setIntent,closeExportInfo:this.closeExportInfo,tabItems:this.state.tabItems,showAlert:this.state.showAlert,intentEnabled:t}),this.generateNoRecsWarning()):this.state.recommendations.length>0?c.createElement("div",{id:"widgetContainer",style:{flexDirection:"column"}},c.createElement("div",{style:{display:"flex",flexDirection:"row"}},c.createElement(f.default,{intent:this.state.intent,currentVisSpec:this.state.currentVis,numRecommendations:this.state.recommendations.length,onChange:this.handleCurrentVisSelect}),c.createElement("div",{id:"tabBanner"},c.createElement("p",{className:"title-description",style:{visibility:p.default.isEmpty(this.state.currentVis)?"hidden":"visible"}},"You might be interested in..."),c.createElement(u.Tabs,{activeKey:this.state.activeTab,id:"tabBannerList",onSelect:this.handleSelect,className:p.default.isEmpty(this.state.currentVis)?"":"tabBannerPadding"},this.state.tabItems))),c.createElement(m.default,{buttonsEnabled:e,deleteSelection:this.deleteSelection,exportSelection:this.exportSelection,setIntent:this.setIntent,closeExportInfo:this.closeExportInfo,tabItems:this.state.tabItems,showAlert:this.state.showAlert,intentEnabled:t}),c.createElement(x.default,{message:this.state.longDescription,toggleInfoPanel:this.toggleInfoPanel,openInfo:this.state.openInfo}),c.createElement(b.default,{message:this.state.message,toggleWarningPanel:this.toggleWarningPanel,openWarning:this.state.openWarning})):void 0}}const n=document.createElement("div"),r=c.createElement(t,e);d.render(r,n),e.el.append(n),g.dispatchLogEvent("initWidget","")}}t.LuxWidgetView=y},1150:(e,t,n)=>{(t=n(3645)(!1)).push([e.id,".jp-OutputArea-output {\r\n height: auto;\r\n overflow: auto;\r\n user-select: text;\r\n -moz-user-select: text;\r\n -webkit-user-select: text;\r\n -ms-user-select: text;\r\n width: 90%;\r\n padding-bottom: 4px;\r\n }\r\n \r\n #widgetContainer{\r\n /* height: 315px; */\r\n width:100%;\r\n display:inline-flex;\r\n }\r\n \r\n #oneViewWidgetContainer {\r\n width:100%;\r\n display:inline-flex;\r\n }\r\n input[type=text], select {\r\n width: 100%;\r\n padding: 12px 20px;\r\n margin: 8px 0;\r\n display: inline-block;\r\n border: 1px solid #ccc;\r\n border-radius: 4px;\r\n box-sizing: border-box;\r\n }\r\n #mult-graph-container{\r\n display: inline-flex;\r\n }\r\n .recommendationStaticContentOuter{\r\n scroll-snap-align: start;\r\n /* border: 0.5px solid #bcbdbd; */\r\n overflow-x: auto;\r\n overflow-y: hidden;\r\n display: inline-block;\r\n text-align: left;\r\n /* padding-left: 20px; */\r\n /* padding-top: 10px; */\r\n /* height: 100%; */\r\n box-sizing: border-box;\r\n width: 100%;\r\n position: relative;\r\n }\r\n .recommendationContentOuter{\r\n /* overflow: scroll; */\r\n /* Prevents unneccesary x-scroll for specified facet */\r\n /* width: 100%; */\r\n /*height: 225px;*/\r\n display: flex;\r\n /* display: inline-block;*/\r\n margin-left: 10px;\r\n text-align: left;\r\n }\r\n .vega-embed {\r\n position: relative;\r\n display: inline-block;\r\n /* padding-right: 38px; */\r\n flex: 1 0 auto;\r\n padding-right: 10px !important;\r\n }\r\n /* .vega-embed:hover{\r\n border: solid 1px;\r\n border-color: rgba(0, 0, 0, 0.4);\r\n box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.5);\r\n cursor: pointer;\r\n } */\r\n .vega-embed:checked{\r\n border: solid 1px;\r\n border-color: blue;\r\n }\r\n .recommendationContentInner{\r\n /*width: auto;\r\n max-width: 150%;*/\r\n /*display: inline-block;*/\r\n /*margin-left: 8px;*/\r\n text-align: left;\r\n display: flex;\r\n flex-wrap: nowrap;\r\n align-items: flex-end;\r\n /* overflow-x: auto; */\r\n overflow-x: initial;\r\n padding-right: 50px;\r\n /*height: 280px;*/\r\n /* width: max-content;\r\n overflow-x: auto; */\r\n /* height: 100px; */\r\n }\r\n \r\n .toolDiv{\r\n position: relative;\r\n top: -20px;\r\n left: -5px;\r\n }\r\n .fa {\r\n color:gray;\r\n }\r\n .fa:hover{\r\n color:black;\r\n }\r\n \r\n .graph-container{\r\n height: 250px;\r\n max-height: 270px;\r\n margin: 10px 0px 5px 5px;\r\n padding: 0px 0px 0px 0px;\r\n }\r\n #mainVizTitle{\r\n font-size: 20px;\r\n display: inline-block;\r\n left: 10%;\r\n top: 0px;\r\n position: absolute;\r\n }\r\n #mainVizContainer{\r\n padding: 10px 0px 0px 0px;\r\n border: 0.5px solid #bcbdbd;\r\n overflow-y: auto;\r\n }\r\n \r\n #mainVizInnerContainer{\r\n margin-top: 50px;\r\n }\r\n \r\n #placeHolderVizContainer{\r\n min-height: 100%;\r\n min-width: 1px;\r\n }\r\n #tabBanner{\r\n border: 0.5px solid #bcbdbd;\r\n width: auto;\r\n overflow: hidden;\r\n flex: 1;\r\n }\r\n #exportBtn{\r\n position: absolute;\r\n /* bottom: 90%; */\r\n /* left: 97%; */\r\n top: 5px;\r\n right: 5px;\r\n font-size: 20px;\r\n padding: 5px;\r\n }\r\n \r\n #deleteBtn{\r\n position: absolute;\r\n top: 5px;\r\n right: 33px;\r\n font-size: 20px;\r\n padding: 5px;\r\n }\r\n \r\n #intentBtn{\r\n position: absolute;\r\n top: 5px;\r\n right: 59px;\r\n font-size: 20px;\r\n padding: 5px;\r\n }\r\n \r\n #alertBox{\r\n position: absolute;\r\n left: 23%;\r\n width: 54%;\r\n bottom: 6%;\r\n padding: 5px 30px 5px 10px;\r\n }\r\n \r\n /* \r\n JupyterLab does support bootstrap, so need to add bootstrap css\r\n https://gist.github.com/EvanHerman/315952ebf371cb83ee9db6c54499933d\r\n */\r\n \r\n .alert {\r\n padding: 15px;\r\n margin-bottom: 20px;\r\n border: 1px solid transparent;\r\n border-radius: 4px;\r\n }\r\n \r\n .alert-dismissable .close,\r\n .alert-dismissible .close {\r\n position: relative;\r\n top: -2px;\r\n right: -21px;\r\n color: inherit;\r\n }\r\n \r\n .alert-dismissable,\r\n .alert-dismissible {\r\n padding-right: 35px;\r\n }\r\n \r\n button.close {\r\n padding: 0;\r\n cursor: pointer;\r\n background: transparent;\r\n border: 0;\r\n -webkit-appearance: none;\r\n appearance: none;\r\n }\r\n \r\n .close {\r\n float: right;\r\n font-size: 19.5px;\r\n font-weight: bold;\r\n line-height: 1;\r\n color: #000;\r\n text-shadow: 0 1px 0 #fff;\r\n filter: alpha(opacity=20);\r\n opacity: 0.2;\r\n }\r\n \r\n .alert-info {\r\n background-color: #d9edf7;\r\n border-color: #bce8f1;\r\n color: #31708f;\r\n }\r\n \r\n /* canvas{\r\n width: 229px;\r\n height: 245px;\r\n } */\r\n /* Override .fade default to show tab*/\r\n .fade {\r\n opacity:1;\r\n }\r\n /* Copied from bootstrap.css */\r\n .nav {\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-wrap: wrap;\r\n flex-wrap: wrap;\r\n padding-left: 0;\r\n margin-bottom: 0;\r\n list-style: none;\r\n }\r\n \r\n .nav-link {\r\n display: block;\r\n padding: 0.5rem 1rem;\r\n }\r\n \r\n .nav-link:hover, .nav-link:focus {\r\n text-decoration: none;\r\n }\r\n \r\n .nav-link.disabled {\r\n color: #6c757d;\r\n pointer-events: none;\r\n cursor: default;\r\n }\r\n \r\n .nav-tabs {\r\n border-bottom: 1px solid #dee2e6;\r\n }\r\n \r\n .tabBannerPadding {\r\n padding-left: 210px;\r\n }\r\n \r\n .nav-tabs .nav-item {\r\n margin-bottom: -1px;\r\n }\r\n \r\n .nav-tabs .nav-link {\r\n border: 1px solid transparent;\r\n border-top-left-radius: 0.25rem;\r\n border-top-right-radius: 0.25rem;\r\n }\r\n \r\n .nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {\r\n border-color: #e9ecef #e9ecef #dee2e6;\r\n }\r\n \r\n .nav-tabs .nav-link.disabled {\r\n color: #6c757d;\r\n background-color: transparent;\r\n border-color: transparent;\r\n }\r\n \r\n .nav-tabs .nav-link.active,\r\n .nav-tabs .nav-item.show .nav-link {\r\n color: #495057;\r\n background-color: #fff;\r\n border-color: #dee2e6 #dee2e6 #fff;\r\n font-weight: 500;\r\n }\r\n \r\n .nav-tabs .dropdown-menu {\r\n margin-top: -1px;\r\n border-top-left-radius: 0;\r\n border-top-right-radius: 0;\r\n }\r\n \r\n .nav-pills .nav-link {\r\n border-radius: 0.25rem;\r\n }\r\n \r\n .nav-pills .nav-link.active,\r\n .nav-pills .show > .nav-link {\r\n color: #fff;\r\n background-color: #007bff;\r\n }\r\n \r\n .nav-fill .nav-item {\r\n -ms-flex: 1 1 auto;\r\n flex: 1 1 auto;\r\n text-align: center;\r\n }\r\n \r\n .nav-justified .nav-item {\r\n -ms-flex-preferred-size: 0;\r\n flex-basis: 0;\r\n -ms-flex-positive: 1;\r\n flex-grow: 1;\r\n text-align: center;\r\n }\r\n \r\n .tab-content > .tab-pane {\r\n display: none;\r\n }\r\n \r\n .tab-content > .active {\r\n display: block;\r\n }\r\n /* Selectable Card React Component CSS */\r\n /* Card */\r\n .card {\r\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\r\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\r\n background: #fff;\r\n margin: 20px 10px;\r\n cursor: pointer;\r\n }\r\n .card:hover {\r\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\r\n }\r\n /* Selectable */\r\n .card .selectable {\r\n position: relative;\r\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\r\n border: 4px solid transparent;\r\n }\r\n .card .selectable .check {\r\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 10;\r\n width: 20px;\r\n height: 20px;\r\n }\r\n .card .selectable .check:before {\r\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\r\n content: '';\r\n border: 20px solid;\r\n border-color: transparent;\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: -1;\r\n }\r\n .card .selectable .check .checkmark {\r\n display: block;\r\n font: 20px sans-serif;\r\n line-height: 20px;\r\n text-align: center;\r\n color: transparent;\r\n }\r\n .card .selectable.selected {\r\n border-color: #4ad;\r\n }\r\n .card .selectable.selected .check:before {\r\n border-color: #4ad #4ad rgba(0, 0, 255, 0) rgba(255, 0, 0, 0);\r\n }\r\n .card .selectable.selected .check .checkmark {\r\n color: #fff;\r\n }\r\n .content {\r\n padding: 24px;\r\n }\r\n .content .title, .content .description {\r\n margin: 0;\r\n padding: 4px;\r\n }\r\n .column {\r\n float: left;\r\n width: 50%;\r\n }\r\n .column > .title {\r\n text-align: center;\r\n }\r\n button.card {\r\n display: block;\r\n cursor: pointer;\r\n width: 180px;\r\n margin: 20px auto;\r\n text-align: center;\r\n padding: 16px;\r\n border-color: transparent;\r\n border-radius: 10px;\r\n background: #4ad !important;\r\n color: #fff;\r\n text-transform: uppercase;\r\n font-weight: bold;\r\n outline: none;\r\n }\r\n button.card:focus {\r\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\r\n }\r\n .title-description{\r\n line-height: 2;\r\n font-weight: 500;\r\n margin-left: 15px;\r\n margin-bottom: -27px;\r\n color: rgb(0, 0, 0);\r\n margin-top: 5px;\r\n }\r\n .text-description {\r\n line-height: 2.5;\r\n margin-left: 15px;\r\n margin-bottom: -25px;\r\n color: rgb(80, 80, 80);\r\n margin-top: 5px;\r\n }\r\n .warning-footer {\r\n padding: 10px;\r\n border: 0.5px solid #bcbdbd;\r\n background-color: lightyellow;\r\n display: flex;\r\n flex-direction: row;\r\n border-top: 0px;\r\n }\r\n .info-footer {\r\n padding: 10px;\r\n border: 0.5px solid #bcbdbd;\r\n background-color: rgb(206, 228, 255);\r\n display: flex;\r\n flex-direction: row;\r\n border-top: 0px;\r\n position: relative;\r\n }\r\n #no-recs-footer {\r\n padding: 10px;\r\n border: 0.5px solid #bcbdbd;\r\n background-color: lightyellow;\r\n display: flex;\r\n flex-direction: row;\r\n position: relative;\r\n }\r\n #no-recs {\r\n color: #ffbc00;\r\n pointer-events: none;\r\n position: relative;\r\n top: 5px;\r\n left: px;\r\n font-size: 25px;\r\n padding: 5px;\r\n }\r\n #no-recs-text {\r\n color: rgb(80, 80, 80);\r\n font-size: 20px;\r\n margin-top: 5px;\r\n margin-left: 5px;\r\n margin-right: 30px;\r\n }\r\n #scroll-indicator {\r\n margin-right: 10px;\r\n margin-top: 5px;\r\n text-align: right;\r\n color: rgb(80, 80, 80);\r\n font-weight: 700;\r\n z-index: 0;\r\n position: relative;\r\n margin-bottom: 15px;\r\n }\r\n #scroll-indicator-background {\r\n z-index: 0;\r\n position: relative;\r\n background-color: rgba(250, 250, 250, 0.8);\r\n /* width: 210px; */\r\n height: 25px;\r\n float: right;\r\n margin-top: -26px;\r\n }\r\n /* This forces the toggle button to overlap with widget.Output (main widget). This may leak to other .widget-button if there are non-Lux widgets in the notebook. */\r\n /* .widget-button{ \r\n position: absolute;\r\n z-index: 999;\r\n border-radius: 5px;\r\n } */\r\n \r\n #first-arrow{\r\n margin-left: 25px;\r\n opacity: 50%;\r\n }\r\n \r\n #second-arrow{\r\n margin-left: -4px;\r\n }\r\n \r\n .highlight-intent{\r\n font-weight: 500;\r\n background: aliceblue;\r\n display: inline;\r\n /* display: inline-table;\r\n text-align: left; */\r\n }\r\n .highlight-descriptor{\r\n font-weight: 500;\r\n background: #fffee1;\r\n display: inline;\r\n /* display: inline-table;\r\n text-align: left; */\r\n }\r\n #intent_str {\r\n margin-top: 5px;\r\n font-weight: 500;\r\n max-width:100px\r\n }\r\n \r\n #warnBtn{\r\n color: #ffbc00;\r\n position: absolute;\r\n top: 5px;\r\n right: 88px;\r\n font-size: 20px;\r\n padding: 5px;\r\n }\r\n #warnBtn:hover{\r\n color:black;\r\n }\r\n .warnMsgText{\r\n color: rgb(80, 80, 80);\r\n margin-top: 5px;\r\n margin-left: 5px;\r\n margin-right: 30px;\r\n }\r\n #infoBtn{\r\n position: absolute;\r\n top: 45px;\r\n right: 5px;\r\n font-size: 20px;\r\n padding: 5px;\r\n }\r\n .infoMsgText{\r\n color: rgb(80, 80, 80);\r\n margin-top: 5px;\r\n margin-left: 30px;\r\n margin-right: 30px;\r\n }\r\n \r\n #cur-img {\r\n all: revert;\r\n height: 218px;\r\n }\r\n \r\n #gal-img {\r\n all: revert;\r\n height: 212px;\r\n }\r\n ",""]),e.exports=t},9259:(e,t,n)=>{var r=n(3379),i=n(1150);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);r(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},306:e=>{"use strict";e.exports=JSON.parse('{"name":"luxwidget","version":"0.1.5","description":"A Custom Jupyter Widget Library","keywords":["jupyter","jupyterlab","jupyterlab-extension","widgets"],"files":["webpack.config.js","tsconfig.json","luxwidget/*.py","luxwidget/nbextension/static/*","luxwidget/labextension/static/*","luxwidget/labextension/package.json","*.py","src/*.tsx","src/*.ts","lib/**/*.js","lib/**/*.ts","dist/*.js","style/index.js"],"homepage":"https://github.com/lux-org/lux-widget","bugs":{"url":"https://github.com/lux-org/lux-widget/issues"},"license":"Apache-2.0","author":{"name":"Doris Jung-Lin Lee","email":"dorisjunglinlee@gmail.com"},"main":"lib/index.js","types":"./lib/index.d.ts","repository":{"type":"git","url":"https://github.com/lux-org/lux-widget"},"scripts":{"build":"jlpm run build:lib && jlpm run build:labextension:dev","build:prod":"jlpm run build:lib && jlpm run build:labextension","build:labextension":"jupyter labextension build .","build:labextension:dev":"jupyter labextension build --development True .","build:lib":"tsc","clean":"jlpm run clean:lib","clean:lib":"rimraf lib tsconfig.tsbuildinfo","clean:labextension":"rimraf {{ cookiecutter.python_name }}/labextension","clean:all":"jlpm run clean:lib && jlpm run clean:labextension","eslint":"eslint . --ext .ts,.tsx --fix","eslint:check":"eslint . --ext .ts,.tsx","install:extension":"jupyter labextension develop --overwrite .","prepare":"jlpm run clean && jlpm run build:prod","watch":"run-p watch:src watch:labextension","watch:src":"tsc -w","watch:labextension":"jupyter labextension watch ."},"dependencies":{"@jupyter-widgets/base":"^3 || ^4.0.0","@material-ui/core":"^4.11.0","bootstrap":"^4.4.1","detect-libc":"^1.0.3","jquery":"^3.4.1","needle":"^2.4.0","nopt":"^4.0.1","rc":"^1.2.8","react":"^17.0.1","react-bootstrap":"^1.0.0-beta.16","react-dom":"^17.0.1","react-vega":"7.1.1","vega":"^5.9.0","vega-embed":"^6.2.1","vega-lite":"^4.0.2"},"devDependencies":{"@babel/preset-react":"^7.7.4","@jupyterlab/builder":"^3.0.0","@lumino/application":"^1.13.1","@lumino/widgets":"^1.16.1","@types/expect.js":"^0.3.29","@types/jquery":"^3.5.4","@types/mocha":"^5.2.5","@types/node":"^10.11.6","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","@types/webpack-env":"^1.13.6","@typescript-eslint/eslint-plugin":"^4.8.1","@typescript-eslint/parser":"^4.8.1","css-loader":"^3.2.0","eslint":"^7.14.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","expect.js":"^0.3.1","fs-extra":"^7.0.0","mkdirp":"^0.5.1","mocha":"^5.2.0","npm-run-all":"^4.1.5","prettier":"^2.1.1","rimraf":"^3.0.2","source-map-loader":"^0.2.4","style-loader":"^1.0.0","ts-loader":"^6.2.1","typescript":"~4.1.3","webpack":"^4.46.0","webpack-cli":"^3.3.12"},"jupyterlab":{"extension":"lib/plugin","outputDir":"luxwidget/labextension"},"presets":["@babel/preset-env","@babel/preset-react"],"styleModule":"style/index.js"}')}}]); \ No newline at end of file diff --git a/luxwidget/labextension/static/480.e142971daf6d6dfe784e.js b/luxwidget/labextension/static/480.e142971daf6d6dfe784e.js new file mode 100644 index 0000000..e9196ba --- /dev/null +++ b/luxwidget/labextension/static/480.e142971daf6d6dfe784e.js @@ -0,0 +1 @@ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[480],{4480:function(e,t,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const a=i(134),o=u(i(1367)),c=i(8657),l={id:"luxwidget:plugin",requires:[a.IJupyterWidgetRegistry],activate:function(e,t){t.registerWidget({name:c.MODULE_NAME,version:c.MODULE_VERSION,exports:o})},autoStart:!0};t.default=l}}]); \ No newline at end of file diff --git a/luxwidget/labextension/static/534.1924b2ac3f8a8c599486.js b/luxwidget/labextension/static/534.1924b2ac3f8a8c599486.js new file mode 100644 index 0000000..882b9b3 --- /dev/null +++ b/luxwidget/labextension/static/534.1924b2ac3f8a8c599486.js @@ -0,0 +1 @@ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[534],{3534:(t,e,n)=>{"use strict";n.r(e),n.d(e,{DOMWidgetModel:()=>Y,DOMWidgetView:()=>tt,IJupyterWidgetRegistry:()=>ct,JUPYTER_WIDGETS_VERSION:()=>A,JupyterPhosphorPanelWidget:()=>Z,JupyterPhosphorWidget:()=>X,LayoutModel:()=>rt,LayoutView:()=>it,ManagerBase:()=>B,PROTOCOL_VERSION:()=>k,StyleModel:()=>st,StyleView:()=>at,ViewList:()=>ut,WidgetModel:()=>G,WidgetView:()=>Q,WrappedError:()=>_,assign:()=>d,base64ToBuffer:()=>E,bufferToBase64:()=>O,bufferToHex:()=>x,difference:()=>f,hexToBuffer:()=>j,isEqual:()=>p,put_buffers:()=>y,reject:()=>g,remove_buffers:()=>b,resolvePromisesDict:()=>m,serialize_state:()=>T,shims:()=>K,unpack_models:()=>q,uuid:()=>v});var r,i=n(9742),o=n(1797),s=n(8446),a=n.n(s),u=n(8630),c=n.n(u),l=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(n[r].buffers=o)})),{version_major:2,version_minor:0,state:n}}var z=function(){return(z=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0&&e.item(n)!==this;);return n>-1},L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return R(e,t),e.prototype._removeElement=function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype._setElement=function(t){this.el=t},e.prototype._setAttributes=function(t){for(var e in t)e in this.el?this.el[e]=t[e]:this.el.setAttribute(e,t[e])},e.prototype.delegate=function(t,e,n){"string"!=typeof e&&(n=e,e=null),void 0===this._domEvents&&(this._domEvents=[]);var r=this.el,i=e?function(t){for(var i=t.target||t.srcElement;i&&i!==r;i=i.parentNode)if(W.call(i,e))return t.delegateTarget=i,n.handleEvent?n.handleEvent(t):n(t)}:n;return this.el.addEventListener(t,i,!1),this._domEvents.push({eventName:t,handler:i,listener:n,selector:e}),i},e.prototype.undelegate=function(t,e,n){if("function"==typeof e&&(n=e,e=null),this.el&&this._domEvents)for(var r=this._domEvents.slice(),i=r.length;i--;){var o=r[i];!(o.eventName!==t||n&&o.listener!==n||e&&o.selector!==e)&&(this.el.removeEventListener(o.eventName,o.handler,!1),this._domEvents.splice(i,1))}return this},e.prototype.undelegateEvents=function(){if(this.el&&this._domEvents){for(var t=this._domEvents.length,e=0;e0){var u=n.callbacks||this.callbacks();if(this._pending_msgs>=1){switch(t){case"patch":this._msg_buffer=d(this._msg_buffer||{},a);break;case"update":case"create":this._msg_buffer=a;break;default:throw"unrecognized syncing method"}this._msg_buffer_callbacks=u}else this.send_sync_message(r,u)}},e.prototype.serialize=function(t){for(var e=this.constructor.serializers||{},n=0,r=Object.keys(t);n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this._models.length||t[s]!==this._models[s]);s++);for(var a=s,u=this.views.splice(a,this.views.length-a),c=0;c{var r,i,o;o="object"==typeof self&&self.self==self&&self||"object"==typeof n.g&&n.g.global==n.g&&n.g,r=[n(7963),n(445),e],void 0===(i=function(t,e,n){o.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.2.3",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,r){n.each(e,(function(e,i){n[i]&&(t.prototype[i]=function(t,e,r){switch(t){case 1:return function(){return n[e](this[r])};case 2:return function(t){return n[e](this[r],t)};case 3:return function(t,i){return n[e](this[r],a(t,this),i)};case 4:return function(t,i,o){return n[e](this[r],a(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),n[e].apply(n,t)}}}(e,i,r))}))},a=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?u(t):n.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},l=/\s+/,h=function(t,e,r,i,o){var s,a=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(s=n.keys(r);a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(z,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),B.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!B.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new B;g.extend=y.extend=k.extend=j.extend=B.extend=function(t,e){var r,i=this;r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,t&&n.extend(r.prototype,t),r.__super__=i.prototype,r};var N=function(){throw new Error('A "url" property or function must be specified')},D=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(o,n,t,e)}.apply(e,r))||(t.exports=i)},9742:(t,e)=>{"use strict";e.b$=function(t){var e,n,o=function(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}(t),s=o[0],a=o[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),c=0,l=a>0?s-4:s;for(n=0;n>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[c++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.JQ=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,c=r-i;ac?c:a+s));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),o=n(7667),s=n(1327),a=n(1866);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(7040),i=n(4125),o=n(2117),s=n(7518),a=n(4705);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),o=n(6e3),s=n(9916),a=n(5265);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),o=n(2385);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e{var r=n(8407),i=n(7465),o=n(3779),s=n(7599),a=n(4758),u=n(4309);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n{var r=n(2545),i=n(5694),o=n(1469),s=n(4144),a=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),h=!n&&!l&&s(t),f=!n&&!l&&!h&&u(t),p=n||l||h||f,d=p?r(t.length,String):[],v=d.length;for(var _ in t)!e&&!c.call(t,_)||p&&("length"==_||h&&("offset"==_||"parent"==_)||f&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||a(_,v))||d.push(_);return d}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),o=n(2333),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,o,s,a){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,s,t,a))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),o=n(8351),s=n(6096),a=n(4160),u=n(1469),c=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,_,m){var g=u(t),y=u(e),b=g?f:a(t),w=y?f:a(e),x=(b=b==h?p:b)==p,j=(w=w==h?p:w)==p,O=b==w;if(O&&c(t)){if(!c(e))return!1;g=!0,x=!1}if(O&&!x)return m||(m=new r),g||l(t)?i(t,e,n,v,_,m):o(t,e,b,n,v,_,m);if(!(1&n)){var E=x&&d.call(t,"__wrapped__"),A=j&&d.call(e,"__wrapped__");if(E||A){var k=E?t.value():t,S=A?e.value():e;return m||(m=new r),_(k,S,n,v,m)}}return!!O&&(m||(m=new r),s(t,e,n,v,_,m))}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),o=n(3218),s=n(346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:a).test(s(t))}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),o=n(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},280:(t,e,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{t.exports=function(t){return function(e){return t(e)}}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},7114:(t,e,n)=>{var r=n(8668),i=n(2908),o=n(4757);t.exports=function(t,e,n,s,a,u){var c=1&n,l=t.length,h=e.length;if(l!=h&&!(c&&h>l))return!1;var f=u.get(t),p=u.get(e);if(f&&p)return f==e&&p==t;var d=-1,v=!0,_=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d{var r=n(2705),i=n(1149),o=n(7813),s=n(7114),a=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var d=1&r;if(p||(p=u),t.size!=e.size&&!d)return!1;var v=f.get(t);if(v)return v==e;r|=2,f.set(t,e);var _=s(p(t),p(e),r,c,h,f);return f.delete(t),_;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,s,a){var u=1&n,c=r(t),l=c.length;if(l!=r(e).length&&!u)return!1;for(var h=l;h--;){var f=c[h];if(!(u?f in e:i.call(e,f)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var _=u;++h{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),o=n(3674);t.exports=function(t){return r(t,o,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),(function(e){return o.call(t,e)})))}:i;t.exports=a},4160:(t,e,n)=>{var r=n(8552),i=n(7071),o=n(3818),s=n(8525),a=n(577),u=n(4239),c=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",p="[object WeakMap]",d="[object DataView]",v=c(r),_=c(i),m=c(o),g=c(s),y=c(a),b=u;(r&&b(new r(new ArrayBuffer(1)))!=d||i&&b(new i)!=l||o&&b(o.resolve())!=h||s&&b(new s)!=f||a&&b(new a)!=p)&&(b=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case _:return l;case m:return h;case g:return f;case y:return p}return e}),t.exports=b},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),o=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5639:(t,e,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),o=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u},8446:(t,e,n)=>{var r=n(939);t.exports=function(t,e){return r(t,e)}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),i=n(5924),o=n(7005),s=Function.prototype,a=Object.prototype,u=s.toString,c=a.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),o=n(1167),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},3674:(t,e,n)=>{var r=n(4636),i=n(280),o=n(8612);t.exports=function(t){return o(t)?r(t):i(t)}},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},7963:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VERSION:()=>i,after:()=>ze,all:()=>tn,allKeys:()=>_t,any:()=>en,assign:()=>zt,before:()=>Ie,bind:()=>xe,bindAll:()=>Ee,chain:()=>ge,chunk:()=>Fn,clone:()=>Ft,collect:()=>Ke,compact:()=>kn,compose:()=>Te,constant:()=>X,contains:()=>nn,countBy:()=>vn,create:()=>Dt,debounce:()=>Ce,default:()=>Vn,defaults:()=>It,defer:()=>Se,delay:()=>ke,detect:()=>He,difference:()=>Pn,drop:()=>En,each:()=>qe,escape:()=>se,every:()=>tn,extend:()=>Tt,extendOwn:()=>zt,filter:()=>Xe,find:()=>He,findIndex:()=>Re,findKey:()=>De,findLastIndex:()=>Ue,findWhere:()=>Je,first:()=>On,flatten:()=>Sn,foldl:()=>Ye,foldr:()=>Qe,forEach:()=>qe,functions:()=>Mt,get:()=>Vt,groupBy:()=>pn,has:()=>$t,head:()=>On,identity:()=>Ht,include:()=>nn,includes:()=>nn,indexBy:()=>dn,indexOf:()=>Ve,initial:()=>jn,inject:()=>Ye,intersection:()=>Tn,invert:()=>Ct,invoke:()=>rn,isArguments:()=>G,isArray:()=>J,isArrayBuffer:()=>D,isBoolean:()=>S,isDataView:()=>H,isDate:()=>T,isElement:()=>P,isEmpty:()=>ut,isEqual:()=>vt,isError:()=>I,isFinite:()=>Y,isFunction:()=>U,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>Q,isNull:()=>A,isNumber:()=>B,isObject:()=>E,isRegExp:()=>z,isSet:()=>At,isString:()=>M,isSymbol:()=>N,isTypedArray:()=>it,isUndefined:()=>k,isWeakMap:()=>Et,isWeakSet:()=>kt,iteratee:()=>Yt,keys:()=>at,last:()=>An,lastIndexOf:()=>$e,map:()=>Ke,mapObject:()=>Xt,matcher:()=>Jt,matches:()=>Jt,max:()=>an,memoize:()=>Ae,methods:()=>Mt,min:()=>un,mixin:()=>Un,negate:()=>Be,noop:()=>Zt,now:()=>re,object:()=>Nn,omit:()=>xn,once:()=>Ne,pairs:()=>Pt,partial:()=>we,partition:()=>_n,pick:()=>wn,pluck:()=>on,property:()=>qt,propertyOf:()=>te,random:()=>ne,range:()=>Dn,reduce:()=>Ye,reduceRight:()=>Qe,reject:()=>Ze,rest:()=>En,restArguments:()=>O,result:()=>ve,sample:()=>cn,select:()=>Xe,shuffle:()=>ln,size:()=>yn,some:()=>en,sortBy:()=>hn,sortedIndex:()=>We,tail:()=>En,take:()=>On,tap:()=>Rt,template:()=>de,templateSettings:()=>ue,throttle:()=>Pe,times:()=>ee,toArray:()=>gn,toPath:()=>Ut,transpose:()=>zn,unescape:()=>ae,union:()=>Bn,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>zn,values:()=>St,where:()=>sn,without:()=>Cn,wrap:()=>Me,zip:()=>In});var r={};n.r(r),n.d(r,{VERSION:()=>i,after:()=>ze,all:()=>tn,allKeys:()=>_t,any:()=>en,assign:()=>zt,before:()=>Ie,bind:()=>xe,bindAll:()=>Ee,chain:()=>ge,chunk:()=>Fn,clone:()=>Ft,collect:()=>Ke,compact:()=>kn,compose:()=>Te,constant:()=>X,contains:()=>nn,countBy:()=>vn,create:()=>Dt,debounce:()=>Ce,default:()=>Wn,defaults:()=>It,defer:()=>Se,delay:()=>ke,detect:()=>He,difference:()=>Pn,drop:()=>En,each:()=>qe,escape:()=>se,every:()=>tn,extend:()=>Tt,extendOwn:()=>zt,filter:()=>Xe,find:()=>He,findIndex:()=>Re,findKey:()=>De,findLastIndex:()=>Ue,findWhere:()=>Je,first:()=>On,flatten:()=>Sn,foldl:()=>Ye,foldr:()=>Qe,forEach:()=>qe,functions:()=>Mt,get:()=>Vt,groupBy:()=>pn,has:()=>$t,head:()=>On,identity:()=>Ht,include:()=>nn,includes:()=>nn,indexBy:()=>dn,indexOf:()=>Ve,initial:()=>jn,inject:()=>Ye,intersection:()=>Tn,invert:()=>Ct,invoke:()=>rn,isArguments:()=>G,isArray:()=>J,isArrayBuffer:()=>D,isBoolean:()=>S,isDataView:()=>H,isDate:()=>T,isElement:()=>P,isEmpty:()=>ut,isEqual:()=>vt,isError:()=>I,isFinite:()=>Y,isFunction:()=>U,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>Q,isNull:()=>A,isNumber:()=>B,isObject:()=>E,isRegExp:()=>z,isSet:()=>At,isString:()=>M,isSymbol:()=>N,isTypedArray:()=>it,isUndefined:()=>k,isWeakMap:()=>Et,isWeakSet:()=>kt,iteratee:()=>Yt,keys:()=>at,last:()=>An,lastIndexOf:()=>$e,map:()=>Ke,mapObject:()=>Xt,matcher:()=>Jt,matches:()=>Jt,max:()=>an,memoize:()=>Ae,methods:()=>Mt,min:()=>un,mixin:()=>Un,negate:()=>Be,noop:()=>Zt,now:()=>re,object:()=>Nn,omit:()=>xn,once:()=>Ne,pairs:()=>Pt,partial:()=>we,partition:()=>_n,pick:()=>wn,pluck:()=>on,property:()=>qt,propertyOf:()=>te,random:()=>ne,range:()=>Dn,reduce:()=>Ye,reduceRight:()=>Qe,reject:()=>Ze,rest:()=>En,restArguments:()=>O,result:()=>ve,sample:()=>cn,select:()=>Xe,shuffle:()=>ln,size:()=>yn,some:()=>en,sortBy:()=>hn,sortedIndex:()=>We,tail:()=>En,take:()=>On,tap:()=>Rt,template:()=>de,templateSettings:()=>ue,throttle:()=>Pe,times:()=>ee,toArray:()=>gn,toPath:()=>Ut,transpose:()=>zn,unescape:()=>ae,union:()=>Bn,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>zn,values:()=>St,where:()=>sn,without:()=>Cn,wrap:()=>Me,zip:()=>In});var i="1.12.1",o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||Function("return this")()||{},s=Array.prototype,a=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,c=s.push,l=s.slice,h=a.toString,f=a.hasOwnProperty,p="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,v=Array.isArray,_=Object.keys,m=Object.create,g=p&&ArrayBuffer.isView,y=isNaN,b=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=Math.pow(2,53)-1;function O(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&n<=j}}function tt(t){return function(e){return null==e?void 0:e[t]}}const et=tt("byteLength"),nt=Z(et);var rt=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const it=p?function(t){return g?g(t)&&!H(t):nt(t)&&rt.test(h.call(t))}:X(!1),ot=tt("length");function st(t,e){e=function(t){for(var e={},n=t.length,r=0;r":">",'"':""","'":"'","`":"`"},se=ie(oe),ae=ie(Ct(oe)),ue=lt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ce=/(.)^/,le={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},he=/\\|'|\r|\n|\u2028|\u2029/g;function fe(t){return"\\"+le[t]}var pe=/^\s*(\w|\$)+\s*$/;function de(t,e,n){!e&&n&&(e=n),e=It({},e,lt.templateSettings);var r=RegExp([(e.escape||ce).source,(e.interpolate||ce).source,(e.evaluate||ce).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,s,a){return o+=t.slice(i,a).replace(he,fe),i=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e})),o+="';\n";var s,a=e.variable;if(a){if(!pe.test(a))throw new Error(a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{s=new Function(a,"_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,lt)};return u.source="function("+a+"){\n"+o+"}",u}function ve(t,e,n){var r=(e=Wt(e)).length;if(!r)return U(n)?n.call(t):n;for(var i=0;i1)Oe(a,e-1,n,r),i=r.length;else for(var u=0,c=a.length;ue?(r&&(clearTimeout(r),r=null),a=c,s=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,l)),s};return c.cancel=function(){clearTimeout(r),a=0,r=i=o=null},c}function Ce(t,e,n){var r,i,o,s,a,u=function(){var c=re()-i;e>c?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(a,o)),r||(o=a=null))},c=O((function(c){return a=this,o=c,i=re(),r||(r=setTimeout(u,e),n&&(s=t.apply(a,o))),s}));return c.cancel=function(){clearTimeout(r),r=o=a=null},c}function Me(t,e){return we(e,t)}function Be(t){return function(){return!t.apply(this,arguments)}}function Te(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function ze(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Ie(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Ne=we(Ie,2);function De(t,e,n){e=Qt(e,n);for(var r,i=at(t),o=0,s=i.length;o0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(l.call(r,s,a),Q))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o0?0:s-1;for(i||(r=e[o?o[a]:a],a+=t);a>=0&&a=3;return e(t,Kt(n,i,4),r,o)}}const Ye=Ge(1),Qe=Ge(-1);function Xe(t,e,n){var r=[];return e=Qt(e,n),qe(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Ze(t,e,n){return Xe(t,Be(Qt(e)),n)}function tn(t,e,n){e=Qt(e,n);for(var r=!je(t)&&at(t),i=(r||t).length,o=0;o=0}const rn=O((function(t,e,n){var r,i;return U(e)?i=e:(e=Wt(e),r=e.slice(0,-1),e=e[e.length-1]),Ke(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Lt(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function on(t,e){return Ke(t,qt(e))}function sn(t,e){return Xe(t,Jt(e))}function an(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,u=(t=je(t)?t:St(t)).length;ao&&(o=r);else e=Qt(e,n),qe(t,(function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)}));return o}function un(t,e,n){var r,i,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,u=(t=je(t)?t:St(t)).length;ar||void 0===n)return 1;if(n1&&(r=Kt(r,e[1])),e=_t(t)):(r=bn,e=Oe(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=Ke(Oe(e,!1,!1),String),r=function(t,n){return!nn(e,n)}),wn(t,r,n)}));function jn(t,e,n){return l.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function On(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:jn(t,t.length-e)}function En(t,e,n){return l.call(t,null==e||n?1:e)}function An(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:En(t,Math.max(0,t.length-e))}function kn(t){return Xe(t,Boolean)}function Sn(t,e){return Oe(t,e,!1)}const Pn=O((function(t,e){return e=Oe(e,!0,!0),Xe(t,(function(t){return!nn(e,t)}))})),Cn=O((function(t,e){return Pn(t,e)}));function Mn(t,e,n,r){S(e)||(r=n,n=e,e=!1),null!=n&&(n=Qt(n,r));for(var i=[],o=[],s=0,a=ot(t);s{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},4391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n,r,o,a){var i=r||"<>",s=a||n;if(null==t[n])return new Error("The "+o+" `"+s+"` is required to make `"+i+"` accessible for users of assistive technologies such as screen readers.");for(var l=arguments.length,c=Array(l>5?l-5:0),u=5;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,o,a,i){var s=o||"<>",l=i||r;if(null==n[r])return t?new Error("Required "+a+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d{"use strict";n.r(t),n.d(t,{Accordion:()=>ee,AccordionCollapse:()=>J,AccordionContext:()=>w,AccordionToggle:()=>C,Alert:()=>Ne,Badge:()=>Pe,Breadcrumb:()=>Re,BreadcrumbItem:()=>Oe,Button:()=>Se,ButtonGroup:()=>Me,ButtonToolbar:()=>Fe,Card:()=>Ye,CardColumns:()=>Je,CardDeck:()=>Qe,CardGroup:()=>et,CardImg:()=>Ke,Carousel:()=>vt,CarouselItem:()=>lt,CloseButton:()=>de,Col:()=>gt,Collapse:()=>$,Container:()=>fo,Dropdown:()=>Sr,DropdownButton:()=>Dr,Fade:()=>ie,Figure:()=>xo,Form:()=>co,FormCheck:()=>_r,FormControl:()=>Jr,FormFile:()=>$r,FormGroup:()=>eo,FormLabel:()=>no,FormText:()=>oo,Image:()=>vo,InputGroup:()=>Po,Jumbotron:()=>Oo,ListGroup:()=>Ao,ListGroupItem:()=>Do,Media:()=>Ko,Modal:()=>wa,ModalBody:()=>ca,ModalDialog:()=>fa,ModalFooter:()=>pa,ModalTitle:()=>ba,Nav:()=>Ra,NavDropdown:()=>ja,NavItem:()=>Ca,NavLink:()=>Oa,Navbar:()=>Ba,NavbarBrand:()=>Sa,Overlay:()=>qa,OverlayTrigger:()=>Xa,PageItem:()=>Ya,Pagination:()=>ai,Popover:()=>ci,PopoverContent:()=>si,PopoverTitle:()=>ii,ProgressBar:()=>pi,ResponsiveEmbed:()=>vi,Row:()=>gi,SafeAnchor:()=>he,Spinner:()=>xi,SplitButton:()=>Ni,Tab:()=>Ri,TabContainer:()=>Ci,TabContent:()=>Pi,TabPane:()=>Oi,Table:()=>Ti,Tabs:()=>Mi,ThemeProvider:()=>g,Toast:()=>Ki,ToastBody:()=>Li,ToastHeader:()=>Ai,ToggleButton:()=>zi,ToggleButtonGroup:()=>_i,Tooltip:()=>Ui,useAccordionToggle:()=>N});var r=n(2122),o=n(9756),a=n(4184),i=n.n(a),s=n(6271),l=n.n(s),c=n(1143),u=n.n(c);function d(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function f(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function p(e,t,n){var r=(0,s.useRef)(void 0!==e),o=(0,s.useState)(t),a=o[0],i=o[1],l=void 0!==e,c=r.current;return r.current=l,!l&&c&&a!==t&&i(t),[l?e:a,(0,s.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;oee?"next":"prev"),d&&J(!0),re(b||0)),(0,s.useEffect)((function(){z.current&&(z.current=null)}));var oe,ae=0;ut(B,(function(e,t){++ae,t===b&&(oe=e.props.interval)}));var ie=te(oe),se=(0,s.useCallback)((function(e){if(!Y){var t=ee-1;if(t<0){if(!O)return;t=ae-1}z.current="prev",g&&g(t,e)}}),[Y,ee,g,O,ae]),le=ne((function(e){if(!Y){var t=ee+1;if(t>=ae){if(!O)return;t=0}z.current="next",g&&g(t,e)}})),ce=(0,s.useRef)();(0,s.useImperativeHandle)(t,(function(){return{element:ce.current,prev:se,next:le}}));var ue,de,fe,pe=ne((function(){!document.hidden&&function(e){if(!(e&&e.style&&e.parentNode&&e.parentNode.style))return!1;var t=getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"none"!==getComputedStyle(e.parentNode).display}(ce.current)&&le()})),me="next"===q?"left":"right";ue=function(){d||(y&&y(ee,me),x&&x(ee,me))},de=[ee],fe=(0,s.useRef)(!0),(0,s.useEffect)((function(){if(!fe.current)return ue();fe.current=!1}),de);var ve=j+"-item-"+q,be=j+"-item-"+me,ge=(0,s.useCallback)((function(e){V(e),y&&y(ee,me)}),[y,ee,me]),ye=(0,s.useCallback)((function(){J(!1),x&&x(ee,me)}),[x,ee,me]),xe=(0,s.useCallback)((function(e){if(w&&!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":return e.preventDefault(),void se(e);case"ArrowRight":return e.preventDefault(),void le(e)}N&&N(e)}),[w,N,se,le]),Ee=(0,s.useCallback)((function(e){"hover"===C&&X(!0),P&&P(e)}),[C,P]),we=(0,s.useCallback)((function(e){X(!1),k&&k(e)}),[k]),Ne=(0,s.useRef)(0),Ce=(0,s.useRef)(0),Pe=at(),ke=(0,s.useCallback)((function(e){Ne.current=e.touches[0].clientX,Ce.current=0,"hover"===C&&X(!0),R&&R(e)}),[C,R]),Oe=(0,s.useCallback)((function(e){e.touches&&e.touches.length>1?Ce.current=0:Ce.current=e.touches[0].clientX-Ne.current,T&&T(e)}),[T]),Ze=(0,s.useCallback)((function(e){if(Z){var t=Ce.current;Math.abs(t)>40&&(t>0?se(e):le(e))}"hover"===C&&Pe.set((function(){X(!1)}),E||void 0),I&&I(e)}),[Z,C,se,le,Pe,E,I]),Re=null!=E&&!G&&!Y,Te=(0,s.useRef)();(0,s.useEffect)((function(){var e,t;if(Re)return Te.current=window.setInterval(document.visibilityState?pe:le,null!=(e=null!=(t=ie.current)?t:E)?e:void 0),function(){null!==Te.current&&clearInterval(Te.current)}}),[Re,le,ie,E,pe]);var Se=(0,s.useMemo)((function(){return v&&Array.from({length:ae},(function(e,t){return function(e){g&&g(t,e)}}))}),[v,ae,g]);return l().createElement(c,(0,r.Z)({ref:ce},K,{onKeyDown:xe,onMouseOver:Ee,onMouseOut:we,onTouchStart:ke,onTouchMove:Oe,onTouchEnd:Ze,className:i()(L,j,d&&"slide",f&&j+"-fade")}),v&&l().createElement("ol",{className:j+"-indicators"},ct(B,(function(e,t){return l().createElement("li",{key:t,className:t===ee?"active":void 0,onClick:Se?Se[t]:void 0})}))),l().createElement("div",{className:j+"-inner"},ct(B,(function(e,t){var n=t===ee;return d?l().createElement(S.ZP,{in:n,onEnter:n?ge:void 0,onEntered:n?ye:void 0,addEndListener:H},(function(t){return l().cloneElement(e,{className:i()(e.props.className,n&&"entered"!==t&&ve,("entered"===t||"exiting"===t)&&"active",("entering"===t||"exiting"===t)&&be)})})):l().cloneElement(e,{className:i()(e.props.className,n&&"active")})}))),p&&l().createElement(l().Fragment,null,(O||0!==b)&&l().createElement(he,{className:j+"-control-prev",onClick:se},M,D&&l().createElement("span",{className:"sr-only"},D)),(O||b!==ae-1)&&l().createElement(he,{className:j+"-control-next",onClick:le},F,A&&l().createElement("span",{className:"sr-only"},A))))}var mt=l().forwardRef(pt);mt.displayName="Carousel",mt.propTypes=dt,mt.defaultProps=ft,mt.Caption=it,mt.Item=lt;const vt=mt;var bt=["xl","lg","md","sm","xs"],ht=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.as,c=void 0===s?"div":s,u=(0,o.Z)(e,["bsPrefix","className","as"]),d=h(n,"col"),f=[],p=[];return bt.forEach((function(e){var t,n,r,o=u[e];if(delete u[e],"object"==typeof o&&null!=o){var a=o.span;t=void 0===a||a,n=o.offset,r=o.order}else t=o;var i="xs"!==e?"-"+e:"";t&&f.push(!0===t?""+d+i:""+d+i+"-"+t),null!=r&&p.push("order"+i+"-"+r),null!=n&&p.push("offset"+i+"-"+n)})),f.length||f.push(d),l().createElement(c,(0,r.Z)({},u,{ref:t,className:i().apply(void 0,[a].concat(f,p))}))}));ht.displayName="Col";const gt=ht;var yt,xt=Function.prototype.bind.call(Function.prototype.call,[].slice);function Et(e,t){return xt(e.querySelectorAll(t))}function wt(e){var t=(0,s.useRef)(null);return(0,s.useEffect)((function(){t.current=e})),t.current}function Nt(){return(0,s.useReducer)((function(e){return!e}),!1)[1]}const Ct=l().createContext(null);function Pt(){return(0,s.useState)(null)}function kt(e){return e.split("-")[0]}function Ot(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Zt(e){var t=Ot(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Rt(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Tt(e){return e instanceof Rt(e).Element||e instanceof Element}function St(e){return e instanceof Rt(e).HTMLElement||e instanceof HTMLElement}function It(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Rt(e).ShadowRoot||e instanceof ShadowRoot)}function Mt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&It(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Dt(e){return e?(e.nodeName||"").toLowerCase():null}function Ft(e){return Rt(e).getComputedStyle(e)}function At(e){return["table","td","th"].indexOf(Dt(e))>=0}function Lt(e){return((Tt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bt(e){return"html"===Dt(e)?e:e.assignedSlot||e.parentNode||(It(e)?e.host:null)||Lt(e)}function Kt(e){return St(e)&&"fixed"!==Ft(e).position?e.offsetParent:null}function jt(e){for(var t=Rt(e),n=Kt(e);n&&At(n)&&"static"===Ft(n).position;)n=Kt(n);return n&&("html"===Dt(n)||"body"===Dt(n)&&"static"===Ft(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&St(e)&&"fixed"===Ft(e).position)return null;for(var n=Bt(e);St(n)&&["html","body"].indexOf(Dt(n))<0;){var r=Ft(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Ht(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var zt=Math.max,Vt=Math.min,_t=Math.round;function qt(e,t,n){return zt(e,Vt(t,n))}function Ut(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Wt(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Gt="top",Xt="bottom",$t="right",Yt="left",Jt="auto",Qt=[Gt,Xt,$t,Yt],en="start",tn="end",nn="viewport",rn="popper",on=Qt.reduce((function(e,t){return e.concat([t+"-"+en,t+"-"+tn])}),[]),an=[].concat(Qt,[Jt]).reduce((function(e,t){return e.concat([t,t+"-"+en,t+"-"+tn])}),[]),sn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],ln={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cn(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.offsets,i=e.position,s=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,u=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:_t(_t(t*r)/r)||0,y:_t(_t(n*r)/r)||0}}(a):"function"==typeof c?c(a):a,d=u.x,f=void 0===d?0:d,p=u.y,m=void 0===p?0:p,v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),h=Yt,g=Gt,y=window;if(l){var x=jt(n),E="clientHeight",w="clientWidth";x===Rt(n)&&"static"!==Ft(x=Lt(n)).position&&(E="scrollHeight",w="scrollWidth"),x=x,o===Gt&&(g=Xt,m-=x[E]-r.height,m*=s?1:-1),o===Yt&&(h=$t,f-=x[w]-r.width,f*=s?1:-1)}var N,C=Object.assign({position:i},l&&ln);return s?Object.assign({},C,((N={})[g]=b?"0":"",N[h]=v?"0":"",N.transform=(y.devicePixelRatio||1)<2?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",N)):Object.assign({},C,((t={})[g]=b?m+"px":"",t[h]=v?f+"px":"",t.transform="",t))}var un={passive:!0},dn={left:"right",right:"left",bottom:"top",top:"bottom"};function fn(e){return e.replace(/left|right|bottom|top/g,(function(e){return dn[e]}))}var pn={start:"end",end:"start"};function mn(e){return e.replace(/start|end/g,(function(e){return pn[e]}))}function vn(e){var t=Rt(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bn(e){return Ot(Lt(e)).left+vn(e).scrollLeft}function hn(e){var t=Ft(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function gn(e){return["html","body","#document"].indexOf(Dt(e))>=0?e.ownerDocument.body:St(e)&&hn(e)?e:gn(Bt(e))}function yn(e,t){var n;void 0===t&&(t=[]);var r=gn(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Rt(r),i=o?[a].concat(a.visualViewport||[],hn(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(yn(Bt(i)))}function xn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function En(e,t){return t===nn?xn(function(e){var t=Rt(e),n=Lt(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,i=0,s=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,s=r.offsetTop)),{width:o,height:a,x:i+bn(e),y:s}}(e)):St(t)?function(e){var t=Ot(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):xn(function(e){var t,n=Lt(e),r=vn(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=zt(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=zt(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+bn(e),l=-r.scrollTop;return"rtl"===Ft(o||n).direction&&(s+=zt(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(Lt(e)))}function wn(e){return e.split("-")[1]}function Nn(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?kt(o):null,i=o?wn(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case Gt:t={x:s,y:n.y-r.height};break;case Xt:t={x:s,y:n.y+n.height};break;case $t:t={x:n.x+n.width,y:l};break;case Yt:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?Ht(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case en:t[c]=t[c]-(n[u]/2-r[u]/2);break;case tn:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Cn(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.boundary,i=void 0===a?"clippingParents":a,s=n.rootBoundary,l=void 0===s?nn:s,c=n.elementContext,u=void 0===c?rn:c,d=n.altBoundary,f=void 0!==d&&d,p=n.padding,m=void 0===p?0:p,v=Ut("number"!=typeof m?m:Wt(m,Qt)),b=u===rn?"reference":rn,h=e.elements.reference,g=e.rects.popper,y=e.elements[f?b:u],x=function(e,t,n){var r="clippingParents"===t?function(e){var t=yn(Bt(e)),n=["absolute","fixed"].indexOf(Ft(e).position)>=0&&St(e)?jt(e):e;return Tt(n)?t.filter((function(e){return Tt(e)&&Mt(e,n)&&"body"!==Dt(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],i=o.reduce((function(t,n){var r=En(e,n);return t.top=zt(r.top,t.top),t.right=Vt(r.right,t.right),t.bottom=Vt(r.bottom,t.bottom),t.left=zt(r.left,t.left),t}),En(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(Tt(y)?y:y.contextElement||Lt(e.elements.popper),i,l),E=Ot(h),w=Nn({reference:E,element:g,strategy:"absolute",placement:o}),N=xn(Object.assign({},g,w)),C=u===rn?N:E,P={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},k=e.modifiersData.offset;if(u===rn&&k){var O=k[o];Object.keys(P).forEach((function(e){var t=[$t,Xt].indexOf(e)>=0?1:-1,n=[Gt,Xt].indexOf(e)>=0?"y":"x";P[e]+=O[n]*t}))}return P}function Pn(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function kn(e){return[Gt,$t,Xt,Yt].some((function(t){return e[t]>=0}))}function On(e,t,n){void 0===n&&(n=!1);var r,o,a=Lt(t),i=Ot(e),s=St(t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&(("body"!==Dt(t)||hn(a))&&(l=(r=t)!==Rt(r)&&St(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:vn(r)),St(t)?((c=Ot(t)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=bn(a))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function Zn(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Rn={placement:"bottom",modifiers:[],strategy:"absolute"};function Tn(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[Yt,$t].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}(n,t.rects,a),e}),{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0===i||i,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=void 0===p||p,v=n.allowedAutoPlacements,b=t.options.placement,h=kt(b),g=l||(h!==b&&m?function(e){if(kt(e)===Jt)return[];var t=fn(e);return[mn(e),t,mn(t)]}(b):[fn(b)]),y=[b].concat(g).reduce((function(e,n){return e.concat(kt(n)===Jt?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?an:l,u=wn(r),d=u?s?on:on.filter((function(e){return wn(e)===u})):Qt,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=Cn(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[kt(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,E=t.rects.popper,w=new Map,N=!0,C=y[0],P=0;P=0,T=R?"width":"height",S=Cn(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),I=R?Z?$t:Yt:Z?Xt:Gt;x[T]>E[T]&&(I=fn(I));var M=fn(I),D=[];if(a&&D.push(S[O]<=0),s&&D.push(S[I]<=0,S[M]<=0),D.every((function(e){return e}))){C=k,N=!1;break}w.set(k,D)}if(N)for(var F=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},A=m?3:1;A>0&&"break"!==F(A);A--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0!==i&&i,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,m=n.tetherOffset,v=void 0===m?0:m,b=Cn(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),h=kt(t.placement),g=wn(t.placement),y=!g,x=Ht(h),E="x"===x?"y":"x",w=t.modifiersData.popperOffsets,N=t.rects.reference,C=t.rects.popper,P="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,k={x:0,y:0};if(w){if(a||s){var O="y"===x?Gt:Yt,Z="y"===x?Xt:$t,R="y"===x?"height":"width",T=w[x],S=w[x]+b[O],I=w[x]-b[Z],M=p?-C[R]/2:0,D=g===en?N[R]:C[R],F=g===en?-C[R]:-N[R],A=t.elements.arrow,L=p&&A?Zt(A):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=B[O],j=B[Z],H=qt(0,N[R],L[R]),z=y?N[R]/2-M-H-K-P:D-H-K-P,V=y?-N[R]/2+M+H+j+P:F+H+j+P,_=t.elements.arrow&&jt(t.elements.arrow),q=_?"y"===x?_.clientTop||0:_.clientLeft||0:0,U=t.modifiersData.offset?t.modifiersData.offset[t.placement][x]:0,W=w[x]+z-U-q,G=w[x]+V-U;if(a){var X=qt(p?Vt(S,W):S,T,p?zt(I,G):I);w[x]=X,k[x]=X-T}if(s){var $="x"===x?Gt:Yt,Y="x"===x?Xt:$t,J=w[E],Q=J+b[$],ee=J-b[Y],te=qt(p?Vt(Q,W):Q,J,p?zt(ee,G):ee);w[E]=te,k[E]=te-J}}t.modifiersData[r]=k}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=kt(n.placement),l=Ht(s),c=[Yt,$t].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return Ut("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Wt(e,Qt))}(o.padding,n),d=Zt(a),f="y"===l?Gt:Yt,p="y"===l?Xt:$t,m=n.rects.reference[c]+n.rects.reference[l]-i[l]-n.rects.popper[c],v=i[l]-n.rects.reference[l],b=jt(a),h=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,g=m/2-v/2,y=u[f],x=h-d[c]-u[p],E=h/2-d[c]/2+g,w=qt(y,E,x),N=l;n.modifiersData[r]=((t={})[N]=w,t.centerOffset=w-E,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Mt(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}),In=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Mn={name:"applyStyles",enabled:!1},Dn={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var o=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));o.length?n.setAttribute("aria-describedby",o.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,o=n.reference,a=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===a&&"setAttribute"in o){var i=o.getAttribute("aria-describedby");if(i&&-1!==i.split(",").indexOf(r.id))return;o.setAttribute("aria-describedby",i?i+","+r.id:r.id)}}},Fn=[];const An=function(e,t,n){var a,i,l=void 0===n?{}:n,c=l.enabled,u=void 0===c||c,d=l.placement,f=void 0===d?"bottom":d,p=l.strategy,m=void 0===p?"absolute":p,v=l.modifiers,b=void 0===v?Fn:v,h=(0,o.Z)(l,["enabled","placement","strategy","modifiers"]),g=(0,s.useRef)(),y=(0,s.useCallback)((function(){var e;null==(e=g.current)||e.update()}),[]),x=(0,s.useCallback)((function(){var e;null==(e=g.current)||e.forceUpdate()}),[]),E=(a=(0,s.useState)({placement:f,update:y,forceUpdate:x,attributes:{},styles:{popper:In(m),arrow:{}}}),i=tt(),[a[0],(0,s.useCallback)((function(e){if(i())return a[1](e)}),[i,a[1]])]),w=E[0],N=E[1],C=(0,s.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),N({state:t,styles:n,attributes:r,update:y,forceUpdate:x,placement:t.placement})}}}),[y,x,N]);return(0,s.useEffect)((function(){g.current&&u&&g.current.setOptions({placement:f,strategy:m,modifiers:[].concat(b,[C,Mn])})}),[m,f,C,u]),(0,s.useEffect)((function(){if(u&&null!=e&&null!=t)return g.current=Sn(e,t,(0,r.Z)({},h,{placement:f,strategy:m,modifiers:[].concat(b,[Dn,C])})),function(){null!=g.current&&(g.current.destroy(),g.current=void 0,N((function(e){return(0,r.Z)({},e,{attributes:{},styles:{popper:In(m)}})})))}}),[u,e,t]),w};function Ln(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var Bn=n(2473),Kn=n.n(Bn),jn=n(4456),Hn=n.n(jn);function zn(e){return e&&"setState"in e?Hn().findDOMNode(e):null!=e?e:null}var Vn=function(){},_n=function(e){return e&&("current"in e?e.current:e)};const qn=function(e,t,n){var r=void 0===n?{}:n,o=r.disabled,a=r.clickTrigger,i=void 0===a?"click":a,l=(0,s.useRef)(!1),c=t||Vn,u=(0,s.useCallback)((function(t){var n,r=_n(e);Kn()(!!r,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),l.current=!(r&&(n=t,!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey))&&function(e){return 0===e.button}(t)&&!Ln(r,t.target))}),[e]),d=ne((function(e){l.current||c(e)})),f=ne((function(e){27===e.keyCode&&c(e)}));(0,s.useEffect)((function(){if(!o&&null!=e){var t=window.event,n=P(zn(_n(e))),r=B(n,i,u,!0),a=B(n,i,(function(e){e!==t?d(e):t=void 0})),s=B(n,"keyup",(function(e){e!==t?f(e):t=void 0})),l=[];return"ontouchstart"in n.documentElement&&(l=[].slice.call(n.body.children).map((function(e){return B(e,"mousemove",Vn)}))),function(){r(),a(),s(),l.forEach((function(e){return e()}))}}}),[e,o,i,u,d,f])};function Un(e){return void 0===e&&(e={}),Array.isArray(e)?e:Object.keys(e).map((function(t){return e[t].name=t,e[t]}))}function Wn(e){var t,n,o,a,i=e.enabled,s=e.enableEvents,l=e.placement,c=e.flip,u=e.offset,d=e.fixed,f=e.containerPadding,p=e.arrowElement,m=e.popperConfig,v=void 0===m?{}:m,b=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(v.modifiers);return(0,r.Z)({},v,{placement:l,enabled:i,strategy:d?"fixed":v.strategy,modifiers:Un((0,r.Z)({},b,{eventListeners:{enabled:s},preventOverflow:(0,r.Z)({},b.preventOverflow,{options:f?(0,r.Z)({padding:f},null==(t=b.preventOverflow)?void 0:t.options):null==(n=b.preventOverflow)?void 0:n.options}),offset:{options:(0,r.Z)({offset:u},null==(o=b.offset)?void 0:o.options)},arrow:(0,r.Z)({},b.arrow,{enabled:!!p,options:(0,r.Z)({},null==(a=b.arrow)?void 0:a.options,{element:p})}),flip:(0,r.Z)({enabled:!!c},b.flip)}))})}var Gn=function(){};function Xn(e){void 0===e&&(e={});var t=(0,s.useContext)(Ct),n=Pt(),o=n[0],a=n[1],i=(0,s.useRef)(!1),l=e,c=l.flip,u=l.offset,d=l.rootCloseEvent,f=l.fixed,p=void 0!==f&&f,m=l.popperConfig,v=void 0===m?{}:m,b=l.usePopper,h=void 0===b?!!t:b,g=null==(null==t?void 0:t.show)?!!e.show:t.show,y=null==(null==t?void 0:t.alignEnd)?e.alignEnd:t.alignEnd;g&&!i.current&&(i.current=!0);var x=t||{},E=x.drop,w=x.setMenu,N=x.menuElement,C=x.toggleElement,P=y?"bottom-end":"bottom-start";"up"===E?P=y?"top-end":"top-start":"right"===E?P=y?"right-end":"right-start":"left"===E&&(P=y?"left-end":"left-start");var k=An(C,N,Wn({placement:P,enabled:!(!h||!g),enableEvents:g,offset:u,flip:c,fixed:p,arrowElement:o,popperConfig:v})),O=(0,r.Z)({ref:w||Gn,"aria-labelledby":null==C?void 0:C.id},k.attributes.popper,{style:k.styles.popper}),Z={show:g,alignEnd:y,hasShown:i.current,toggle:null==t?void 0:t.toggle,popper:h?k:null,arrowProps:h?(0,r.Z)({ref:a},k.attributes.arrow,{style:k.styles.arrow}):{}};return qn(N,(function(e){null==t||t.toggle(!1,e)}),{clickTrigger:d,disabled:!g}),[O,Z]}var $n={children:le().func.isRequired,show:le().bool,alignEnd:le().bool,flip:le().bool,usePopper:le().oneOf([!0,!1]),popperConfig:le().object,rootCloseEvent:le().string};function Yn(e){var t=e.children,n=Xn((0,o.Z)(e,["children"])),r=n[0],a=n[1];return l().createElement(l().Fragment,null,a.hasShown?t(r,a):null)}Yn.displayName="ReactOverlaysDropdownMenu",Yn.propTypes=$n,Yn.defaultProps={usePopper:!0};const Jn=Yn;var Qn=function(){};function er(){var e=(0,s.useContext)(Ct)||{},t=e.show,n=void 0!==t&&t,r=e.toggle,o=void 0===r?Qn:r,a=e.setToggle,i=(0,s.useCallback)((function(e){o(!n,e)}),[n,o]);return[{ref:a||Qn,onClick:i,"aria-haspopup":!0,"aria-expanded":!!n},{show:n,toggle:o}]}var tr={children:le().func.isRequired};function nr(e){var t=e.children,n=er(),r=n[0],o=n[1];return l().createElement(l().Fragment,null,t(r,o))}nr.displayName="ReactOverlaysDropdownToggle",nr.propTypes=tr;const rr=nr;var or={children:le().node,drop:le().oneOf(["up","left","right","down"]),focusFirstItemOnShow:le().oneOf([!1,!0,"keyboard"]),itemSelector:le().string,alignEnd:le().bool,show:le().bool,defaultShow:le().bool,onToggle:le().func};function ar(){var e=Nt(),t=(0,s.useRef)(null),n=(0,s.useCallback)((function(n){t.current=n,e()}),[e]);return[t,n]}function ir(e){var t=e.drop,n=e.alignEnd,r=e.defaultShow,o=e.show,a=e.onToggle,i=e.itemSelector,c=void 0===i?"* > *":i,u=e.focusFirstItemOnShow,d=e.children,f=p(o,r,a),m=f[0],v=f[1],b=ar(),h=b[0],g=b[1],y=h.current,x=ar(),E=x[0],w=x[1],N=E.current,C=wt(m),P=(0,s.useRef)(null),k=(0,s.useRef)(!1),O=(0,s.useCallback)((function(e,t){v(e,t)}),[v]),Z=(0,s.useMemo)((function(){return{toggle:O,drop:t,show:m,alignEnd:n,menuElement:y,toggleElement:N,setMenu:g,setToggle:w}}),[O,t,m,n,y,N,g,w]);y&&C&&!m&&(k.current=y.contains(document.activeElement));var R=ne((function(){N&&N.focus&&N.focus()})),T=ne((function(){var e=P.current,t=u;if(null==t&&(t=!(!h.current||!function(e,t){if(!yt){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;yt=function(e,t){return r.call(e,t)}}return yt(e,"[role=menu]")}(h.current))&&"keyboard"),!1!==t&&("keyboard"!==t||/^key.+$/.test(e))){var n=Et(h.current,c)[0];n&&n.focus&&n.focus()}}));(0,s.useEffect)((function(){m?T():k.current&&(k.current=!1,R())}),[m,k,R,T]),(0,s.useEffect)((function(){P.current=null}));var S,I,M,D=function(e,t){if(!h.current)return null;var n=Et(h.current,c),r=n.indexOf(e)+t;return n[r=Math.max(0,Math.min(r,n.length))]};return S="keydown",I=function(e){var t,n,r=e.key,o=e.target,a=null==(t=h.current)?void 0:t.contains(o),i=null==(n=E.current)?void 0:n.contains(o);if((!/input|textarea/i.test(o.tagName)||!(" "===r||"Escape"!==r&&a))&&(a||i))switch(P.current=e.type,r){case"ArrowUp":var s=D(o,-1);return s&&s.focus&&s.focus(),void e.preventDefault();case"ArrowDown":if(e.preventDefault(),m){var l=D(o,1);l&&l.focus&&l.focus()}else v(!0,e);return;case"Escape":case"Tab":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),v(!1,e)}},void 0===M&&(M=!1),function(e,t,n,r){void 0===r&&(r=!1);var o=ne(n);(0,s.useEffect)((function(){var n="function"==typeof e?e():e;return n.addEventListener(t,o,r),function(){return n.removeEventListener(t,o,r)}}),[e])}((0,s.useCallback)((function(){return document}),[]),S,I,M),l().createElement(Ct.Provider,{value:Z},d)}ir.displayName="ReactOverlaysDropdown",ir.propTypes=or,ir.Menu=Jn,ir.Toggle=rr;const sr=ir;var lr=l().createContext(null);lr.displayName="NavContext";const cr=lr;var ur={as:he,disabled:!1},dr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,c=e.children,u=e.eventKey,d=e.disabled,f=e.href,p=e.onClick,m=e.onSelect,v=e.active,b=e.as,g=(0,o.Z)(e,["bsPrefix","className","children","eventKey","disabled","href","onClick","onSelect","active","as"]),E=h(n,"dropdown-item"),w=(0,s.useContext)(x),N=((0,s.useContext)(cr)||{}).activeKey,C=y(u,f),P=null==v&&null!=C?y(N)===C:v,k=ne((function(e){d||(p&&p(e),w&&w(C,e),m&&m(C,e))}));return l().createElement(b,(0,r.Z)({},g,{ref:t,href:f,disabled:d,className:i()(a,E,P&&"active",d&&"disabled"),onClick:k}),c)}));dr.displayName="DropdownItem",dr.defaultProps=ur;const fr=dr;var pr=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};const mr=function(e,t){return(0,s.useMemo)((function(){return function(e,t){var n=pr(e),r=pr(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])};var vr=l().createContext(null);vr.displayName="NavbarContext";const br=vr;function hr(e,t){return e}function gr(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function yr(e){var t=window.getComputedStyle(e);return{top:parseFloat(t.marginTop)||0,right:parseFloat(t.marginRight)||0,bottom:parseFloat(t.marginBottom)||0,left:parseFloat(t.marginLeft)||0}}function xr(){var e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=h(void 0,"popover"),r=h(void 0,"dropdown-menu");return[(0,s.useCallback)((function(o){o&&(gr(o,n)||gr(o,r))&&(t.current=yr(o),o.style.margin="0",e.current=o)}),[n,r]),[(0,s.useMemo)((function(){return{name:"offset",options:{offset:function(e){var n=e.placement;if(!t.current)return[0,0];var r=t.current,o=r.top,a=r.left,i=r.bottom,s=r.right;switch(n.split("-")[0]){case"top":return[0,i];case"left":return[0,s];case"bottom":return[0,o];case"right":return[0,a];default:return[0,0]}}}}}),[t]),(0,s.useMemo)((function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",requiresIfExists:["arrow"],effect:function(t){var r=t.state;if(e.current&&r.elements.arrow&&gr(e.current,n)&&r.modifiersData["arrow#persistent"]){var o=yr(r.elements.arrow),a=o.top,i=o.right,s=a||i;return r.modifiersData["arrow#persistent"].padding={top:s,left:s,right:s,bottom:s},r.elements.arrow.style.margin="0",function(){r.elements.arrow&&(r.elements.arrow.style.margin="")}}}}}),[n])]]}var Er=le().oneOf(["left","right"]),wr=le().oneOfType([Er,le().shape({sm:Er}),le().shape({md:Er}),le().shape({lg:Er}),le().shape({xl:Er})]),Nr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,c=e.align,u=e.alignRight,d=e.rootCloseEvent,f=e.flip,p=e.show,m=e.renderOnMount,v=e.as,b=void 0===v?"div":v,g=e.popperConfig,y=(0,o.Z)(e,["bsPrefix","className","align","alignRight","rootCloseEvent","flip","show","renderOnMount","as","popperConfig"]),x=(0,s.useContext)(br),E=h(n,"dropdown-menu"),w=xr(),N=w[0],C=w[1],P=[];if(c)if("object"==typeof c){var k=Object.keys(c);if(k.length){var O=k[0],Z=c[O];u="left"===Z,P.push(E+"-"+O+"-"+Z)}}else"right"===c&&(u=!0);var R=Xn({flip:f,rootCloseEvent:d,show:p,alignEnd:u,usePopper:!x&&0===P.length,popperConfig:(0,r.Z)({},g,{modifiers:C.concat((null==g?void 0:g.modifiers)||[])})}),T=R[0],S=R[1],I=S.hasShown,M=S.popper,D=S.show,F=S.alignEnd,A=S.toggle;if(T.ref=mr(N,mr(hr(t),T.ref)),!I&&!m)return null;"string"!=typeof b&&(T.show=D,T.close=function(){return null==A?void 0:A(!1)},T.alignRight=F);var L=y.style;return null!=M&&M.placement&&(L=(0,r.Z)({},y.style,T.style),y["x-placement"]=M.placement),l().createElement(b,(0,r.Z)({},y,T,{style:L,className:i().apply(void 0,[a,E,D&&"show",F&&E+"-right"].concat(P))}))}));Nr.displayName="DropdownMenu",Nr.defaultProps={align:"left",alignRight:!1,flip:!0};const Cr=Nr;n(5638);var Pr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.split,s=e.className,c=e.childBsPrefix,u=e.as,d=void 0===u?Se:u,f=(0,o.Z)(e,["bsPrefix","split","className","childBsPrefix","as"]),p=h(n,"dropdown-toggle");void 0!==c&&(f.bsPrefix=c);var m=er()[0];return m.ref=mr(m.ref,hr(t)),l().createElement(d,(0,r.Z)({className:i()(s,p,a&&p+"-split")},m,f))}));Pr.displayName="DropdownToggle";const kr=Pr;var Or=me("dropdown-header",{defaultProps:{role:"heading"}}),Zr=me("dropdown-divider",{defaultProps:{role:"separator"}}),Rr=me("dropdown-item-text",{Component:"span"}),Tr=l().forwardRef((function(e,t){var n=m(e,{show:"onToggle"}),a=n.bsPrefix,c=n.drop,u=n.show,d=n.className,f=n.alignRight,p=n.onSelect,v=n.onToggle,b=n.focusFirstItemOnShow,g=n.as,y=void 0===g?"div":g,E=(n.navbar,(0,o.Z)(n,["bsPrefix","drop","show","className","alignRight","onSelect","onToggle","focusFirstItemOnShow","as","navbar"])),w=(0,s.useContext)(x),N=h(a,"dropdown"),C=ne((function(e,t,n){void 0===n&&(n=t.type),t.currentTarget!==document||"keydown"===n&&"Escape"!==t.key||(n="rootClose"),v&&v(e,t,{source:n})})),P=ne((function(e,t){w&&w(e,t),p&&p(e,t),C(!1,t,"select")}));return l().createElement(x.Provider,{value:P},l().createElement(sr,{drop:c,show:u,alignEnd:f,onToggle:C,focusFirstItemOnShow:b,itemSelector:"."+N+"-item:not(.disabled):not(:disabled)"},l().createElement(y,(0,r.Z)({},E,{ref:t,className:i()(d,u&&"show",(!c||"down"===c)&&N,"up"===c&&"dropup","right"===c&&"dropright","left"===c&&"dropleft")}))))}));Tr.displayName="Dropdown",Tr.defaultProps={navbar:!1},Tr.Divider=Zr,Tr.Header=Or,Tr.Item=fr,Tr.ItemText=Rr,Tr.Menu=Cr,Tr.Toggle=kr;const Sr=Tr;var Ir={id:le().any,href:le().string,onClick:le().func,title:le().node.isRequired,disabled:le().bool,menuAlign:wr,menuRole:le().string,renderMenuOnMount:le().bool,rootCloseEvent:le().string,bsPrefix:le().string,variant:le().string,size:le().string},Mr=l().forwardRef((function(e,t){var n=e.title,a=e.children,i=e.bsPrefix,s=e.rootCloseEvent,c=e.variant,u=e.size,d=e.menuAlign,f=e.menuRole,p=e.renderMenuOnMount,m=e.disabled,v=e.href,b=e.id,h=(0,o.Z)(e,["title","children","bsPrefix","rootCloseEvent","variant","size","menuAlign","menuRole","renderMenuOnMount","disabled","href","id"]);return l().createElement(Sr,(0,r.Z)({ref:t},h),l().createElement(kr,{id:b,href:v,size:u,variant:c,disabled:m,childBsPrefix:i},n),l().createElement(Cr,{align:d,role:f,renderOnMount:p,rootCloseEvent:s},a))}));Mr.displayName="DropdownButton",Mr.propTypes=Ir;const Dr=Mr;n(4391);var Fr={type:le().string,tooltip:le().bool,as:le().elementType},Ar=l().forwardRef((function(e,t){var n=e.as,a=void 0===n?"div":n,s=e.className,c=e.type,u=void 0===c?"valid":c,d=e.tooltip,f=void 0!==d&&d,p=(0,o.Z)(e,["as","className","type","tooltip"]);return l().createElement(a,(0,r.Z)({},p,{ref:t,className:i()(s,u+"-"+(f?"tooltip":"feedback"))}))}));Ar.displayName="Feedback",Ar.propTypes=Fr;const Lr=Ar,Br=l().createContext({controlId:void 0});var Kr=l().forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.className,d=e.type,f=void 0===d?"checkbox":d,p=e.isValid,m=void 0!==p&&p,v=e.isInvalid,b=void 0!==v&&v,g=e.isStatic,y=e.as,x=void 0===y?"input":y,E=(0,o.Z)(e,["id","bsPrefix","bsCustomPrefix","className","type","isValid","isInvalid","isStatic","as"]),w=(0,s.useContext)(Br),N=w.controlId,C=w.custom?[c,"custom-control-input"]:[a,"form-check-input"];return a=h(C[0],C[1]),l().createElement(x,(0,r.Z)({},E,{ref:t,type:f,id:n||N,className:i()(u,a,m&&"is-valid",b&&"is-invalid",g&&"position-static")}))}));Kr.displayName="FormCheckInput";const jr=Kr;var Hr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.bsCustomPrefix,c=e.className,u=e.htmlFor,d=(0,o.Z)(e,["bsPrefix","bsCustomPrefix","className","htmlFor"]),f=(0,s.useContext)(Br),p=f.controlId,m=f.custom?[a,"custom-control-label"]:[n,"form-check-label"];return n=h(m[0],m[1]),l().createElement("label",(0,r.Z)({},d,{ref:t,htmlFor:u||p,className:i()(c,n)}))}));Hr.displayName="FormCheckLabel";const zr=Hr;var Vr=l().forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.inline,d=void 0!==u&&u,f=e.disabled,p=void 0!==f&&f,m=e.isValid,v=void 0!==m&&m,b=e.isInvalid,g=void 0!==b&&b,y=e.feedbackTooltip,x=void 0!==y&&y,E=e.feedback,w=e.className,N=e.style,C=e.title,P=void 0===C?"":C,k=e.type,O=void 0===k?"checkbox":k,Z=e.label,R=e.children,T=e.custom,S=e.as,I=void 0===S?"input":S,M=(0,o.Z)(e,["id","bsPrefix","bsCustomPrefix","inline","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","title","type","label","children","custom","as"]),D="switch"===O||T,F=D?[c,"custom-control"]:[a,"form-check"];a=h(F[0],F[1]);var A=(0,s.useContext)(Br).controlId,L=(0,s.useMemo)((function(){return{controlId:n||A,custom:D}}),[A,D,n]),B=D||null!=Z&&!1!==Z&&!R,K=l().createElement(jr,(0,r.Z)({},M,{type:"switch"===O?"checkbox":O,ref:t,isValid:v,isInvalid:g,isStatic:!B,disabled:p,as:I}));return l().createElement(Br.Provider,{value:L},l().createElement("div",{style:N,className:i()(w,a,D&&"custom-"+O,d&&a+"-inline")},R||l().createElement(l().Fragment,null,K,B&&l().createElement(zr,{title:P},Z),(v||g)&&l().createElement(Lr,{type:v?"valid":"invalid",tooltip:x},E))))}));Vr.displayName="FormCheck",Vr.Input=jr,Vr.Label=zr;const _r=Vr;var qr=l().forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.className,d=e.isValid,f=e.isInvalid,p=e.lang,m=e.as,v=void 0===m?"input":m,b=(0,o.Z)(e,["id","bsPrefix","bsCustomPrefix","className","isValid","isInvalid","lang","as"]),g=(0,s.useContext)(Br),y=g.controlId,x=g.custom?[c,"custom-file-input"]:[a,"form-control-file"];return a=h(x[0],x[1]),l().createElement(v,(0,r.Z)({},b,{ref:t,id:n||y,type:"file",lang:p,className:i()(u,a,d&&"is-valid",f&&"is-invalid")}))}));qr.displayName="FormFileInput";const Ur=qr;var Wr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.bsCustomPrefix,c=e.className,u=e.htmlFor,d=(0,o.Z)(e,["bsPrefix","bsCustomPrefix","className","htmlFor"]),f=(0,s.useContext)(Br),p=f.controlId,m=f.custom?[a,"custom-file-label"]:[n,"form-file-label"];return n=h(m[0],m[1]),l().createElement("label",(0,r.Z)({},d,{ref:t,htmlFor:u||p,className:i()(c,n),"data-browse":d["data-browse"]}))}));Wr.displayName="FormFileLabel";const Gr=Wr;var Xr=l().forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.disabled,d=void 0!==u&&u,f=e.isValid,p=void 0!==f&&f,m=e.isInvalid,v=void 0!==m&&m,b=e.feedbackTooltip,g=void 0!==b&&b,y=e.feedback,x=e.className,E=e.style,w=e.label,N=e.children,C=e.custom,P=e.lang,k=e["data-browse"],O=e.as,Z=void 0===O?"div":O,R=e.inputAs,T=void 0===R?"input":R,S=(0,o.Z)(e,["id","bsPrefix","bsCustomPrefix","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","label","children","custom","lang","data-browse","as","inputAs"]),I=C?[c,"custom"]:[a,"form-file"];a=h(I[0],I[1]);var M=(0,s.useContext)(Br).controlId,D=(0,s.useMemo)((function(){return{controlId:n||M,custom:C}}),[M,C,n]),F=null!=w&&!1!==w&&!N,A=l().createElement(Ur,(0,r.Z)({},S,{ref:t,isValid:p,isInvalid:v,disabled:d,as:T,lang:P}));return l().createElement(Br.Provider,{value:D},l().createElement(Z,{style:E,className:i()(x,a,C&&"custom-file")},N||l().createElement(l().Fragment,null,C?l().createElement(l().Fragment,null,A,F&&l().createElement(Gr,{"data-browse":k},w)):l().createElement(l().Fragment,null,F&&l().createElement(Gr,null,w),A),(p||v)&&l().createElement(Lr,{type:p?"valid":"invalid",tooltip:g},y))))}));Xr.displayName="FormFile",Xr.Input=Ur,Xr.Label=Gr;const $r=Xr;var Yr=l().forwardRef((function(e,t){var n,a,c=e.bsPrefix,u=e.bsCustomPrefix,d=e.type,f=e.size,p=e.htmlSize,m=e.id,v=e.className,b=e.isValid,g=void 0!==b&&b,y=e.isInvalid,x=void 0!==y&&y,E=e.plaintext,w=e.readOnly,N=e.custom,C=e.as,P=void 0===C?"input":C,k=(0,o.Z)(e,["bsPrefix","bsCustomPrefix","type","size","htmlSize","id","className","isValid","isInvalid","plaintext","readOnly","custom","as"]),O=(0,s.useContext)(Br).controlId,Z=N?[u,"custom"]:[c,"form-control"];if(c=h(Z[0],Z[1]),E)(a={})[c+"-plaintext"]=!0,n=a;else if("file"===d){var R;(R={})[c+"-file"]=!0,n=R}else if("range"===d){var T;(T={})[c+"-range"]=!0,n=T}else if("select"===P&&N){var S;(S={})[c+"-select"]=!0,S[c+"-select-"+f]=f,n=S}else{var I;(I={})[c]=!0,I[c+"-"+f]=f,n=I}return l().createElement(P,(0,r.Z)({},k,{type:d,size:p,ref:t,readOnly:w,id:m||O,className:i()(v,n,g&&"is-valid",x&&"is-invalid")}))}));Yr.displayName="FormControl";const Jr=Object.assign(Yr,{Feedback:Lr});var Qr=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,c=e.children,u=e.controlId,d=e.as,f=void 0===d?"div":d,p=(0,o.Z)(e,["bsPrefix","className","children","controlId","as"]);n=h(n,"form-group");var m=(0,s.useMemo)((function(){return{controlId:u}}),[u]);return l().createElement(Br.Provider,{value:m},l().createElement(f,(0,r.Z)({},p,{ref:t,className:i()(a,n)}),c))}));Qr.displayName="FormGroup";const eo=Qr;var to=l().forwardRef((function(e,t){var n=e.as,a=void 0===n?"label":n,c=e.bsPrefix,u=e.column,d=e.srOnly,f=e.className,p=e.htmlFor,m=(0,o.Z)(e,["as","bsPrefix","column","srOnly","className","htmlFor"]),v=(0,s.useContext)(Br).controlId;c=h(c,"form-label");var b="col-form-label";"string"==typeof u&&(b=b+" "+b+"-"+u);var g=i()(f,c,d&&"sr-only",u&&b);return p=p||v,u?l().createElement(gt,(0,r.Z)({as:"label",className:g,htmlFor:p},m)):l().createElement(a,(0,r.Z)({ref:t,className:g,htmlFor:p},m))}));to.displayName="FormLabel",to.defaultProps={column:!1,srOnly:!1};const no=to;var ro=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.as,c=void 0===s?"small":s,u=e.muted,d=(0,o.Z)(e,["bsPrefix","className","as","muted"]);return n=h(n,"form-text"),l().createElement(c,(0,r.Z)({},d,{ref:t,className:i()(a,n,u&&"text-muted")}))}));ro.displayName="FormText";const oo=ro;var ao=l().forwardRef((function(e,t){return l().createElement(_r,(0,r.Z)({},e,{ref:t,type:"switch"}))}));ao.displayName="Switch",ao.Input=_r.Input,ao.Label=_r.Label;const io=ao;var so=me("form-row"),lo=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.inline,s=e.className,c=e.validated,u=e.as,d=void 0===u?"form":u,f=(0,o.Z)(e,["bsPrefix","inline","className","validated","as"]);return n=h(n,"form"),l().createElement(d,(0,r.Z)({},f,{ref:t,className:i()(s,c&&"was-validated",a&&n+"-inline")}))}));lo.displayName="Form",lo.defaultProps={inline:!1},lo.Row=so,lo.Group=eo,lo.Control=Jr,lo.Check=_r,lo.File=$r,lo.Switch=io,lo.Label=no,lo.Text=oo;const co=lo;var uo=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.fluid,s=e.as,c=void 0===s?"div":s,u=e.className,d=(0,o.Z)(e,["bsPrefix","fluid","as","className"]),f=h(n,"container"),p="string"==typeof a?"-"+a:"-fluid";return l().createElement(c,(0,r.Z)({ref:t},d,{className:i()(u,a?""+f+p:f)}))}));uo.displayName="Container",uo.defaultProps={fluid:!1};const fo=uo;var po={bsPrefix:le().string,fluid:le().bool,rounded:le().bool,roundedCircle:le().bool,thumbnail:le().bool},mo=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.fluid,c=e.rounded,u=e.roundedCircle,d=e.thumbnail,f=(0,o.Z)(e,["bsPrefix","className","fluid","rounded","roundedCircle","thumbnail"]);n=h(n,"img");var p=i()(s&&n+"-fluid",c&&"rounded",u&&"rounded-circle",d&&n+"-thumbnail");return l().createElement("img",(0,r.Z)({ref:t},f,{className:i()(a,p)}))}));mo.displayName="Image",mo.defaultProps={fluid:!1,rounded:!1,roundedCircle:!1,thumbnail:!1};const vo=mo;var bo=l().forwardRef((function(e,t){var n=e.className,a=(0,o.Z)(e,["className"]);return l().createElement(vo,(0,r.Z)({ref:t},a,{className:i()(n,"figure-img")}))}));bo.displayName="FigureImage",bo.propTypes=po,bo.defaultProps={fluid:!0};const ho=bo,go=me("figure-caption",{Component:"figcaption"});var yo=me("figure",{Component:"figure"});yo.Image=ho,yo.Caption=go;const xo=yo;var Eo=me("input-group-append"),wo=me("input-group-prepend"),No=me("input-group-text",{Component:"span"}),Co=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.size,s=e.hasValidation,c=e.className,u=e.as,d=void 0===u?"div":u,f=(0,o.Z)(e,["bsPrefix","size","hasValidation","className","as"]);return n=h(n,"input-group"),l().createElement(d,(0,r.Z)({ref:t},f,{className:i()(c,n,a&&n+"-"+a,s&&"has-validation")}))}));Co.displayName="InputGroup";const Po=(0,r.Z)({},Co,{Text:No,Radio:function(e){return l().createElement(No,null,l().createElement("input",(0,r.Z)({type:"radio"},e)))},Checkbox:function(e){return l().createElement(No,null,l().createElement("input",(0,r.Z)({type:"checkbox"},e)))},Append:Eo,Prepend:wo});var ko=l().forwardRef((function(e,t){var n,a=e.as,s=void 0===a?"div":a,c=e.className,u=e.fluid,d=e.bsPrefix,f=(0,o.Z)(e,["as","className","fluid","bsPrefix"]),p=((n={})[d=h(d,"jumbotron")]=!0,n[d+"-fluid"]=u,n);return l().createElement(s,(0,r.Z)({ref:t},f,{className:i()(c,p)}))}));ko.defaultProps={fluid:!1},ko.displayName="Jumbotron";const Oo=ko,Zo=l().createContext(null);var Ro=function(){};const To=l().forwardRef((function(e,t){var n,a,i=e.as,c=void 0===i?"ul":i,u=e.onSelect,d=e.activeKey,f=e.role,p=e.onKeyDown,m=(0,o.Z)(e,["as","onSelect","activeKey","role","onKeyDown"]),v=Nt(),b=(0,s.useRef)(!1),h=(0,s.useContext)(x),g=(0,s.useContext)(Zo);g&&(f=f||"tablist",d=g.activeKey,n=g.getControlledId,a=g.getControllerId);var E=(0,s.useRef)(null),w=function(e){var t=E.current;if(!t)return null;var n=Et(t,"[data-rb-event-key]:not(.disabled)"),r=t.querySelector(".active");if(!r)return null;var o=n.indexOf(r);if(-1===o)return null;var a=o+e;return a>=n.length&&(a=0),a<0&&(a=n.length-1),n[a]},N=function(e,t){null!=e&&(u&&u(e,t),h&&h(e,t))};(0,s.useEffect)((function(){if(E.current&&b.current){var e=E.current.querySelector("[data-rb-event-key].active");e&&e.focus()}b.current=!1}));var C=mr(t,E);return l().createElement(x.Provider,{value:N},l().createElement(cr.Provider,{value:{role:f,activeKey:y(d),getControlledId:n||Ro,getControllerId:a||Ro}},l().createElement(c,(0,r.Z)({},m,{onKeyDown:function(e){var t;switch(p&&p(e),e.key){case"ArrowLeft":case"ArrowUp":t=w(-1);break;case"ArrowRight":case"ArrowDown":t=w(1);break;default:return}t&&(e.preventDefault(),N(t.dataset.rbEventKey,e),b.current=!0,v())},ref:C,role:f}))))}));var So=l().forwardRef((function(e,t){var n=e.active,a=e.className,c=e.eventKey,u=e.onSelect,d=e.onClick,f=e.as,p=(0,o.Z)(e,["active","className","eventKey","onSelect","onClick","as"]),m=y(c,p.href),v=(0,s.useContext)(x),b=(0,s.useContext)(cr),h=n;if(b){p.role||"tablist"!==b.role||(p.role="tab");var g=b.getControllerId(m),E=b.getControlledId(m);p["data-rb-event-key"]=m,p.id=g||p.id,p["aria-controls"]=E||p["aria-controls"],h=null==n&&null!=m?b.activeKey===m:n}"tab"===p.role&&(p.disabled&&(p.tabIndex=-1,p["aria-disabled"]=!0),p["aria-selected"]=h);var w=ne((function(e){d&&d(e),null!=m&&(u&&u(m,e),v&&v(m,e))}));return l().createElement(f,(0,r.Z)({},p,{ref:t,onClick:w,className:i()(a,h&&"active")}))}));So.defaultProps={disabled:!1};const Io=So;var Mo=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.active,c=e.disabled,u=e.className,d=e.variant,f=e.action,p=e.as,m=e.eventKey,v=e.onClick,b=(0,o.Z)(e,["bsPrefix","active","disabled","className","variant","action","as","eventKey","onClick"]);n=h(n,"list-group-item");var g=(0,s.useCallback)((function(e){if(c)return e.preventDefault(),void e.stopPropagation();v&&v(e)}),[c,v]);return c&&void 0===b.tabIndex&&(b.tabIndex=-1,b["aria-disabled"]=!0),l().createElement(Io,(0,r.Z)({ref:t},b,{eventKey:y(m,b.href),as:p||(f?b.href?"a":"button":"div"),onClick:g,className:i()(u,n,a&&"active",c&&"disabled",d&&n+"-"+d,f&&n+"-action")}))}));Mo.defaultProps={variant:void 0,active:!1,disabled:!1},Mo.displayName="ListGroupItem";const Do=Mo;var Fo=l().forwardRef((function(e,t){var n,a=m(e,{activeKey:"onSelect"}),s=a.className,c=a.bsPrefix,u=a.variant,d=a.horizontal,f=a.as,p=void 0===f?"div":f,v=(0,o.Z)(a,["className","bsPrefix","variant","horizontal","as"]),b=h(c,"list-group");return n=d?!0===d?"horizontal":"horizontal-"+d:null,l().createElement(To,(0,r.Z)({ref:t},v,{as:p,className:i()(s,b,u&&b+"-"+u,n&&b+"-"+n)}))}));Fo.defaultProps={variant:void 0,horizontal:void 0},Fo.displayName="ListGroup",Fo.Item=Do;const Ao=Fo;var Lo=me("media-body"),Bo=l().forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.as,c=void 0===s?"div":s,u=(0,o.Z)(e,["bsPrefix","className","as"]),d=h(n,"media");return l().createElement(c,(0,r.Z)({},u,{ref:t,className:i()(a,d)}))}));Bo.displayName="Media",Bo.Body=Lo;const Ko=Bo;var jo;function Ho(e){if((!jo&&0!==jo||e)&&I){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),jo=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return jo}function zo(e){void 0===e&&(e=P());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}function Vo(e,t){e.classList?e.classList.add(t):gr(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function _o(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function qo(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=_o(e.className,t):e.setAttribute("class",_o(e.className&&e.className.baseVal||"",t))}function Uo(e){return"window"in e&&e.window===e?e:"nodeType"in(t=e)&&t.nodeType===document.DOCUMENT_NODE&&e.defaultView||!1;var t}function Wo(e){var t;return Uo(e)||(t=e)&&"body"===t.tagName.toLowerCase()?function(e){var t=Uo(e)?P():P(e),n=Uo(e)||t.defaultView;return t.body.clientWidthe.clientHeight}var Go=["template","script","style"],Xo=function(e,t,n){[].forEach.call(e.children,(function(e){var r,o,a;-1===t.indexOf(e)&&(o=(r=e).nodeType,a=r.tagName,1===o&&-1===Go.indexOf(a.toLowerCase()))&&n(e)}))};function $o(e,t){t&&(e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden"))}const Yo=function(){function e(e){var t=void 0===e?{}:e,n=t.hideSiblingNodes,r=void 0===n||n,o=t.handleContainerOverflow,a=void 0===o||o;this.hideSiblingNodes=void 0,this.handleContainerOverflow=void 0,this.modals=void 0,this.containers=void 0,this.data=void 0,this.scrollbarSize=void 0,this.hideSiblingNodes=r,this.handleContainerOverflow=a,this.modals=[],this.containers=[],this.data=[],this.scrollbarSize=Ho()}var t=e.prototype;return t.isContainerOverflowing=function(e){var t=this.data[this.containerIndexFromModal(e)];return t&&t.overflowing},t.containerIndexFromModal=function(e){return t=this.data,n=function(t){return-1!==t.modals.indexOf(e)},r=-1,t.some((function(e,t){return!!n(e)&&(r=t,!0)})),r;var t,n,r},t.setContainerStyle=function(e,t){var n={overflow:"hidden"};e.style={overflow:t.style.overflow,paddingRight:t.style.paddingRight},e.overflowing&&(n.paddingRight=parseInt(T(t,"paddingRight")||"0",10)+this.scrollbarSize+"px"),T(t,n)},t.removeContainerStyle=function(e,t){Object.assign(t.style,e.style)},t.add=function(e,t,n){var r=this.modals.indexOf(e),o=this.containers.indexOf(t);if(-1!==r)return r;if(r=this.modals.length,this.modals.push(e),this.hideSiblingNodes&&function(e,t){var n=t.dialog,r=t.backdrop;Xo(e,[n,r],(function(e){return $o(!0,e)}))}(t,e),-1!==o)return this.data[o].modals.push(e),r;var a={modals:[e],classes:n?n.split(/\s+/):[],overflowing:Wo(t)};return this.handleContainerOverflow&&this.setContainerStyle(a,t),a.classes.forEach(Vo.bind(null,t)),this.containers.push(t),this.data.push(a),r},t.remove=function(e){var t=this.modals.indexOf(e);if(-1!==t){var n=this.containerIndexFromModal(e),r=this.data[n],o=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.classes.forEach(qo.bind(null,o)),this.handleContainerOverflow&&this.removeContainerStyle(r,o),this.hideSiblingNodes&&function(e,t){var n=t.dialog,r=t.backdrop;Xo(e,[n,r],(function(e){return $o(!1,e)}))}(o,e),this.containers.splice(n,1),this.data.splice(n,1);else if(this.hideSiblingNodes){var a=r.modals[r.modals.length-1],i=a.backdrop;$o(!1,a.dialog),$o(!1,i)}}},t.isTopModal=function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e},e}();var Jo,Qo=function(e){var t;return"undefined"==typeof document?null:null==e?P().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function ea(e,t){var n=(0,s.useState)((function(){return Qo(e)})),r=n[0],o=n[1];if(!r){var a=Qo(e);a&&o(a)}return(0,s.useEffect)((function(){t&&r&&t(r)}),[t,r]),(0,s.useEffect)((function(){var t=Qo(e);t!==r&&o(t)}),[e,r]),r}var ta=(0,s.forwardRef)((function(e,t){var n=e.show,a=void 0!==n&&n,i=e.role,c=void 0===i?"dialog":i,u=e.className,d=e.style,f=e.children,p=e.backdrop,m=void 0===p||p,v=e.keyboard,b=void 0===v||v,h=e.onBackdropClick,g=e.onEscapeKeyDown,y=e.transition,x=e.backdropTransition,E=e.autoFocus,w=void 0===E||E,N=e.enforceFocus,C=void 0===N||N,P=e.restoreFocus,k=void 0===P||P,O=e.restoreFocusOptions,Z=e.renderDialog,R=e.renderBackdrop,T=void 0===R?function(e){return l().createElement("div",e)}:R,S=e.manager,M=e.container,D=e.containerClassName,F=e.onShow,A=e.onHide,L=void 0===A?function(){}:A,K=e.onExit,j=e.onExited,H=e.onExiting,z=e.onEnter,V=e.onEntering,_=e.onEntered,q=(0,o.Z)(e,["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","backdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","containerClassName","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"]),U=ea(M),W=function(e){var t=e||(Jo||(Jo=new Yo),Jo),n=(0,s.useRef)({dialog:null,backdrop:null});return Object.assign(n.current,{add:function(e,r){return t.add(n.current,e,r)},remove:function(){return t.remove(n.current)},isTopModal:function(){return t.isTopModal(n.current)},setDialogRef:(0,s.useCallback)((function(e){n.current.dialog=e}),[]),setBackdropRef:(0,s.useCallback)((function(e){n.current.backdrop=e}),[])})}(S),G=tt(),X=wt(a),$=(0,s.useState)(!a),Y=$[0],J=$[1],Q=(0,s.useRef)(null);(0,s.useImperativeHandle)(t,(function(){return W}),[W]),I&&!X&&a&&(Q.current=zo()),y||a||Y?a&&Y&&J(!1):J(!0);var ee=ne((function(){if(W.add(U,D),se.current=B(document,"keydown",ae),ie.current=B(document,"focus",(function(){return setTimeout(re)}),!0),F&&F(),w){var e=zo(document);W.dialog&&e&&!Ln(W.dialog,e)&&(Q.current=e,W.dialog.focus())}})),te=ne((function(){var e;W.remove(),null==se.current||se.current(),null==ie.current||ie.current(),k&&(null==(e=Q.current)||null==e.focus||e.focus(O),Q.current=null)}));(0,s.useEffect)((function(){a&&U&&ee()}),[a,U,ee]),(0,s.useEffect)((function(){Y&&te()}),[Y,te]),nt((function(){te()}));var re=ne((function(){if(C&&G()&&W.isTopModal()){var e=zo();W.dialog&&e&&!Ln(W.dialog,e)&&W.dialog.focus()}})),oe=ne((function(e){e.target===e.currentTarget&&(null==h||h(e),!0===m&&L())})),ae=ne((function(e){b&&27===e.keyCode&&W.isTopModal()&&(null==g||g(e),e.defaultPrevented||L())})),ie=(0,s.useRef)(),se=(0,s.useRef)(),le=y;if(!U||!(a||le&&!Y))return null;var ce=(0,r.Z)({role:c,ref:W.setDialogRef,"aria-modal":"dialog"===c||void 0},q,{style:d,className:u,tabIndex:-1}),ue=Z?Z(ce):l().createElement("div",ce,l().cloneElement(f,{role:"document"}));le&&(ue=l().createElement(le,{appear:!0,unmountOnExit:!0,in:!!a,onExit:K,onExiting:H,onExited:function(){J(!0);for(var e=arguments.length,t=new Array(e),n=0;nP(e).documentElement.clientHeight;_({paddingRight:t&&!n?Ho():void 0,paddingLeft:!t&&n?Ho():void 0})}}var ae=ne((function(){J&&oe(J.dialog)}));nt((function(){L(window,"resize",ae),$.current&&$.current()}));var ie=function(){G.current=!0},se=function(e){G.current&&J&&e.target===J.dialog&&(X.current=!0),G.current=!1},le=function(){W(!0),$.current=K(J.dialog,(function(){W(!1)}))},ce=function(e){"static"!==g?X.current||e.target!==e.currentTarget?X.current=!1:w():function(e){e.target===e.currentTarget&&le()}(e)},ue=(0,s.useCallback)((function(e){return l().createElement("div",(0,r.Z)({},e,{className:i()(n+"-backdrop",B,!b&&"show")}))}),[b,B,n]),de=(0,r.Z)({},c,V);return b||(de.display="block"),l().createElement(ua.Provider,{value:te},l().createElement(ra,{show:v,ref:Q,backdrop:g,container:N,keyboard:!0,autoFocus:C,enforceFocus:k,restoreFocus:O,restoreFocusOptions:Z,onEscapeKeyDown:function(e){y||"static"!==g?y&&x&&x(e):(e.preventDefault(),le())},onShow:E,onHide:w,onEnter:function(e){e&&(e.style.display="block",oe(e));for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r{"use strict";e.exports=function(){}}}]); \ No newline at end of file diff --git a/luxwidget/labextension/static/540.c887b5c70bc407051f77.js.LICENSE.txt b/luxwidget/labextension/static/540.c887b5c70bc407051f77.js.LICENSE.txt new file mode 100644 index 0000000..0c20a87 --- /dev/null +++ b/luxwidget/labextension/static/540.c887b5c70bc407051f77.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/luxwidget/labextension/static/568.7b322bdf8834be9e8237.js b/luxwidget/labextension/static/568.7b322bdf8834be9e8237.js new file mode 100644 index 0000000..9016b67 --- /dev/null +++ b/luxwidget/labextension/static/568.7b322bdf8834be9e8237.js @@ -0,0 +1 @@ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[568],{1568:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(8657),t),r(n(1367),t)}}]); \ No newline at end of file diff --git a/luxwidget/labextension/static/741.a084b42c89d2ff4f6d41.js b/luxwidget/labextension/static/741.a084b42c89d2ff4f6d41.js new file mode 100644 index 0000000..7a7479b --- /dev/null +++ b/luxwidget/labextension/static/741.a084b42c89d2ff4f6d41.js @@ -0,0 +1 @@ +(self.webpackChunkluxwidget=self.webpackChunkluxwidget||[]).push([[741],{3082:(t,e,n)=>{"use strict";n.d(e,{n:()=>u});const r=/[[\]{}]/,i={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let a,o;function u(t,e,n){return a=e||"view",o=n||i,l(t.trim()).map(c)}function s(t,e,n,r,i){const a=t.length;let o,u=0;for(;e=0?--u:r&&r.indexOf(o)>=0&&++u}return e}function l(t){const e=[],n=t.length;let r=0,i=0;for(;i"!==(t=t.slice(r+1).trim())[0])throw"Expected '>' after between selector: "+t;n=n.map(c);const i=c(t.slice(1).trim());return i.between?{between:n,stream:i}:(i.between=n,i)}(t):function(t){const e={source:a},n=[];let i,u,l=[0,0],c=0,f=0,h=t.length,d=0;if("}"===t[h-1]){if(d=t.lastIndexOf("{"),!(d>=0))throw"Unmatched right brace: "+t;try{l=function(t){const e=t.split(",");if(!t.length||e.length>2)throw t;return e.map((e=>{const n=+e;if(n!=n)throw t;return n}))}(t.substring(d+1,h-1))}catch(e){throw"Invalid throttle specification: "+t}h=(t=t.slice(0,d).trim()).length,d=0}if(!h)throw t;if("@"===t[0]&&(c=++d),i=s(t,d,":"),i1?(e.type=n[1],c?e.markname=n[0].slice(1):(p=n[0],o[p]?e.marktype=n[0]:e.source=n[0])):e.type=n[0],"!"===e.type.slice(-1)&&(e.consume=!0,e.type=e.type.slice(0,-1)),null!=u&&(e.filter=u),l[0]&&(e.throttle=l[0]),l[1]&&(e.debounce=l[1]),e}(t)}},9741:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Bounds:()=>Vd,CanvasHandler:()=>Ag,CanvasRenderer:()=>Sg,DATE:()=>Me,DAY:()=>Ae,DAYOFYEAR:()=>Ee,Dataflow:()=>Gi,Debug:()=>m.cG,Error:()=>m.jj,EventStream:()=>Ri,Gradient:()=>nd,GroupItem:()=>Kd,HOURS:()=>De,Handler:()=>og,Info:()=>m.kI,Item:()=>Gd,MILLISECONDS:()=>Se,MINUTES:()=>Ce,MONTH:()=>we,Marks:()=>Xm,MultiPulse:()=>Hi,None:()=>m.Hq,Operator:()=>Ni,Parameters:()=>Si,Pulse:()=>Ii,QUARTER:()=>be,RenderType:()=>yy,Renderer:()=>sg,ResourceLoader:()=>Zd,SECONDS:()=>Fe,SVGHandler:()=>Tg,SVGRenderer:()=>ny,SVGStringRenderer:()=>gy,Scenegraph:()=>Zm,TIME_UNITS:()=>Be,Transform:()=>Zi,View:()=>bS,WEEK:()=>ke,Warn:()=>m.uU,YEAR:()=>_e,accessor:()=>m.ZE,accessorFields:()=>m.Oj,accessorName:()=>m.el,array:()=>m.IX,ascending:()=>m.j2,bandwidthNRD:()=>da,bin:()=>pa,bootstrapCI:()=>ya,boundClip:()=>Ay,boundContext:()=>xp,boundItem:()=>$m,boundMark:()=>Ym,boundStroke:()=>ep,changeset:()=>Ci,clampRange:()=>m.l$,codegenExpression:()=>MD,compare:()=>m.qu,constant:()=>m.a9,cumulativeLogNormal:()=>Ta,cumulativeNormal:()=>Ea,cumulativeUniform:()=>La,dayofyear:()=>Le,debounce:()=>m.Ds,defaultLocale:()=>fi,definition:()=>ta,densityLogNormal:()=>Ba,densityNormal:()=>Aa,densityUniform:()=>Ua,domChild:()=>ng,domClear:()=>rg,domCreate:()=>tg,domFind:()=>eg,dotbin:()=>va,error:()=>m.vU,expressionFunction:()=>kF,extend:()=>m.l7,extent:()=>m.We,extentIndex:()=>m.dI,falsy:()=>m.k,fastmap:()=>m.Xr,field:()=>m.EP,flush:()=>m.yl,font:()=>Lm,fontFamily:()=>Um,fontSize:()=>Tm,format:()=>K,formatLocale:()=>ri,formats:()=>Z,hasOwnProperty:()=>m.nr,id:()=>m.id,identity:()=>m.yR,inferType:()=>S,inferTypes:()=>B,ingest:()=>wi,inherits:()=>m.XW,inrange:()=>m.u5,interpolate:()=>Dh,interpolateColors:()=>Mh,interpolateRange:()=>kh,intersect:()=>_y,intersectBoxLine:()=>Sp,intersectPath:()=>Ep,intersectPoint:()=>Dp,intersectRule:()=>Fp,isArray:()=>m.kJ,isBoolean:()=>m.jn,isDate:()=>m.J_,isFunction:()=>m.mf,isIterable:()=>m.TW,isNumber:()=>m.hj,isObject:()=>m.Kn,isRegExp:()=>m.Kj,isString:()=>m.HD,isTuple:()=>xi,key:()=>m.Jy,lerp:()=>m.t7,lineHeight:()=>Nm,loader:()=>pi,locale:()=>ci,logger:()=>m.kg,lruCache:()=>m.$m,markup:()=>Vg,merge:()=>m.TS,mergeConfig:()=>m.fE,multiLineOffset:()=>Om,one:()=>m.kX,pad:()=>m.vk,panLinear:()=>m.Dw,panLog:()=>m.mJ,panPow:()=>m.QA,panSymlog:()=>m.Zw,parse:()=>uz,parseExpression:()=>bD,parseSelector:()=>ES.n,pathCurves:()=>id,pathEqual:()=>Dy,pathParse:()=>ud,pathRectangle:()=>Bd,pathRender:()=>vd,pathSymbols:()=>wd,pathTrail:()=>Td,peek:()=>m.fj,point:()=>ag,projection:()=>pw,quantileLogNormal:()=>Na,quantileNormal:()=>Da,quantileUniform:()=>qa,quantiles:()=>fa,quantizeInterpolator:()=>Ah,quarter:()=>m.mS,quartiles:()=>ha,random:()=>ma,randomInteger:()=>_a,randomKDE:()=>Fa,randomLCG:()=>xa,randomLogNormal:()=>za,randomMixture:()=>Oa,randomNormal:()=>Ca,randomUniform:()=>Pa,read:()=>di,regressionExp:()=>Ya,regressionLinear:()=>$a,regressionLoess:()=>Za,regressionLog:()=>Ha,regressionPoly:()=>Ga,regressionPow:()=>Ja,regressionQuad:()=>Va,renderModule:()=>xy,repeat:()=>m.rx,resetDefaultLocale:()=>hi,resetSVGClipId:()=>Yd,resetSVGDefIds:()=>Cy,responseType:()=>Q,runtimeContext:()=>NF,sampleCurve:()=>no,sampleLogNormal:()=>Sa,sampleNormal:()=>Ma,sampleUniform:()=>Ra,scale:()=>dh,sceneEqual:()=>Ey,sceneFromJSON:()=>Gm,scenePickVisit:()=>jp,sceneToJSON:()=>Vm,sceneVisit:()=>Pp,sceneZOrder:()=>qp,scheme:()=>Bh,serializeXML:()=>Gg,setRandom:()=>ga,span:()=>m.yP,splitAccessPath:()=>m._k,stringValue:()=>m.m8,textMetrics:()=>Em,timeBin:()=>Mn,timeFloor:()=>tn,timeFormatLocale:()=>si,timeInterval:()=>un,timeOffset:()=>cn,timeSequence:()=>dn,timeUnitSpecifier:()=>Oe,timeUnits:()=>Ne,toBoolean:()=>m.sw,toDate:()=>m.ZU,toNumber:()=>m.He,toSet:()=>m.Rg,toString:()=>m.BB,transform:()=>ea,transforms:()=>Qi,truncate:()=>m.$G,truthy:()=>m.yb,tupleid:()=>_i,typeParsers:()=>D,utcFloor:()=>rn,utcInterval:()=>sn,utcOffset:()=>fn,utcSequence:()=>pn,utcdayofyear:()=>Xe,utcquarter:()=>m.N3,utcweek:()=>$e,version:()=>sz,visitArray:()=>m.FP,week:()=>qe,writeConfig:()=>m.iL,zero:()=>m.bM,zoomLinear:()=>m.ay,zoomLog:()=>m.dH,zoomPow:()=>m.mK,zoomSymlog:()=>m.bV});var r={};n.r(r),n.d(r,{aggregate:()=>bo,bin:()=>wo,collect:()=>Mo,compare:()=>Ao,countpattern:()=>Do,cross:()=>Co,density:()=>Bo,dotbin:()=>Ro,expression:()=>Uo,extent:()=>qo,facet:()=>jo,field:()=>Io,filter:()=>Xo,flatten:()=>$o,fold:()=>Ho,formula:()=>Yo,generate:()=>Jo,impute:()=>Ko,joinaggregate:()=>Zo,kde:()=>Qo,key:()=>tu,load:()=>nu,lookup:()=>iu,multiextent:()=>au,multivalues:()=>uu,params:()=>lu,pivot:()=>cu,prefacet:()=>fu,project:()=>hu,proxy:()=>du,quantile:()=>pu,relay:()=>mu,sample:()=>gu,sequence:()=>yu,sieve:()=>vu,subflow:()=>Po,timeunit:()=>xu,tupleindex:()=>bu,values:()=>wu,window:()=>Du});var i={};n.r(i),n.d(i,{interpolate:()=>ec,interpolateArray:()=>Yl,interpolateBasis:()=>Ol,interpolateBasisClosed:()=>Rl,interpolateCubehelix:()=>Of,interpolateCubehelixLong:()=>Rf,interpolateDate:()=>Vl,interpolateDiscrete:()=>Pc,interpolateHcl:()=>bf,interpolateHclLong:()=>wf,interpolateHsl:()=>Zc,interpolateHslLong:()=>Qc,interpolateHue:()=>jc,interpolateLab:()=>xf,interpolateNumber:()=>Gl,interpolateNumberArray:()=>$l,interpolateObject:()=>Kl,interpolateRgb:()=>jl,interpolateRgbBasis:()=>Wl,interpolateRgbBasisClosed:()=>Xl,interpolateRound:()=>nc,interpolateString:()=>tc,interpolateTransformCss:()=>Yc,interpolateTransformSvg:()=>Jc,interpolateZoom:()=>Gc,piecewise:()=>Uc,quantize:()=>Uf});var a={};n.r(a),n.d(a,{bound:()=>Zy,identifier:()=>ev,mark:()=>nv,overlap:()=>rv,render:()=>cv,viewlayout:()=>Bv});var o={};n.r(o),n.d(o,{axisticks:()=>Nv,datajoin:()=>zv,encode:()=>Rv,legendentries:()=>Uv,linkpath:()=>Iv,pie:()=>Yv,scale:()=>Gv,sortitems:()=>tx,stack:()=>ax});var u={};n.r(u),n.d(u,{contour:()=>Rw,geojson:()=>qw,geopath:()=>Pw,geopoint:()=>jw,geoshape:()=>Iw,graticule:()=>Ww,heatmap:()=>Xw,isocontour:()=>Ew,kde2d:()=>Nw,projection:()=>Hw});var s={};n.r(s),n.d(s,{force:()=>jk});var l={};n.r(l),n.d(l,{nest:()=>jM,pack:()=>YM,partition:()=>VM,stratify:()=>GM,tree:()=>QM,treelinks:()=>tA,treemap:()=>rA});var c={};n.r(c),n.d(c,{label:()=>wA});var f={};n.r(f),n.d(f,{loess:()=>MA,regression:()=>EA});var h={};n.r(h),n.d(h,{voronoi:()=>VA});var d={};n.r(d),n.d(d,{wordcloud:()=>lE});var p={};n.r(p),n.d(p,{crossfilter:()=>gE,resolvefilter:()=>yE});var m=n(8823);const g=/^([A-Za-z]+:)?\/\//,y=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,v=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x="file://";async function _(t,e){const n=await this.sanitize(t,e),r=n.href;return n.localFile?this.file(r):this.http(r,e)}async function b(t,e){e=(0,m.l7)({},this.options,e);const n=this.fileAccess,r={href:null};let i,a,o;const u=y.test(t.replace(v,""));null!=t&&"string"==typeof t&&u||(0,m.vU)("Sanitize failure, invalid URI: "+(0,m.m8)(t));const s=g.test(t);return(o=e.baseURL)&&!s&&(t.startsWith("/")||"/"===o[o.length-1]||(t="/"+t),t=o+t),a=(i=t.startsWith(x))||"file"===e.mode||"http"!==e.mode&&!s&&n,i?t=t.slice(x.length):t.startsWith("//")&&("file"===e.defaultProtocol?(t=t.slice(2),a=!0):t=(e.defaultProtocol||"http")+":"+t),Object.defineProperty(r,"localFile",{value:!!a}),r.href=t,e.target&&(r.target=e.target+""),e.rel&&(r.rel=e.rel+""),"image"===e.context&&e.crossOrigin&&(r.crossOrigin=e.crossOrigin+""),r}function w(t){return t?e=>new Promise(((n,r)=>{t.readFile(e,((t,e)=>{t?r(t):n(e)}))})):k}async function k(){(0,m.vU)("No file system access.")}function M(t){return t?async function(e,n){const r=(0,m.l7)({},this.options.http,n),i=n&&n.response,a=await t(e,r);return a.ok?(0,m.mf)(a[i])?a[i]():a.text():(0,m.vU)(a.status+""+a.statusText)}:A}async function A(){(0,m.vU)("No HTTP fetch method available.")}const E=t=>!(Number.isNaN(+t)||t instanceof Date),D={boolean:m.sw,integer:m.He,number:m.He,date:m.ZU,string:m.BB,unknown:m.yR},C=[t=>"true"===t||"false"===t||!0===t||!1===t,t=>E(t)&&Number.isInteger(+t),E,t=>!Number.isNaN(Date.parse(t))],F=["boolean","integer","number","date"];function S(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=C.length,i=C.map(((t,e)=>e+1));for(let o,u,s=0,l=0;s0===t?e:t),0)-1]}function B(t,e){return e.reduce(((e,n)=>(e[n]=S(t,n),e)),{})}var T={},N={};function z(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function O(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function R(t,e){var n=t+"",r=n.length;return r=a?s=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o9999?"+"+R(t,6):R(t,4)}(t.getUTCFullYear())+"-"+R(t.getUTCMonth()+1,2)+"-"+R(t.getUTCDate(),2)+(i?"T"+R(e,2)+":"+R(n,2)+":"+R(r,2)+"."+R(i,3)+"Z":r?"T"+R(e,2)+":"+R(n,2)+":"+R(r,2)+"Z":n||e?"T"+R(e,2)+":"+R(n,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=z(t);return function(r,i){return e(n(r),i,t)}}(t,e):z(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=O(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=O(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function L(t){const e=function(e,n){const r={delimiter:t};return q(e,n?(0,m.l7)(n,r):r)};return e.responseType="text",e}function q(t,e){return e.header&&(t=e.header.map(m.m8).join(e.delimiter)+"\n"+t),U(e.delimiter).parse(t+"")}function P(t,e){const n=e&&e.property?(0,m.EP)(e.property):m.yR;return!(0,m.Kn)(t)||(r=t,"function"==typeof Buffer&&(0,m.mf)(Buffer.isBuffer)&&Buffer.isBuffer(r))?n(JSON.parse(t)):function(t,e){return!(0,m.kJ)(t)&&(0,m.TW)(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}(n(t),e);var r}function j(t){return t}function I(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return W(t,e)}))}:W(t,e)}function W(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,a=X(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function X(t,e){var n=function(t){if(null==t)return j;var e,n,r=t.scale[0],i=t.scale[1],a=t.translate[0],o=t.translate[1];return function(t,u){u||(e=n=0);var s=2,l=t.length,c=new Array(l);for(c[0]=(e+=t[0])*r+a,c[1]=(n+=t[1])*i+o;s1)r=J(0,e,n);else for(i=0,r=new Array(a=t.arcs.length);it!==e,exterior:(t,e)=>t===e};function G(t,e){let n,r,i,a;return t=P(t,e),e&&e.feature?(n=I,i=e.feature):e&&e.mesh?(n=H,i=e.mesh,a=V[e.filter]):(0,m.vU)("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[i])?n(t,r,a):(0,m.vU)("Invalid TopoJSON object: "+i),r&&r.features||[r]}G.responseType="json";const K={dsv:q,csv:L(","),tsv:L("\t"),json:P,topojson:G};function Z(t,e){return arguments.length>1?(K[t]=e,this):(0,m.nr)(K,t)?K[t]:null}function Q(t){const e=Z(t);return e&&e.responseType||"text"}var tt=Math.sqrt(50),et=Math.sqrt(10),nt=Math.sqrt(2);function rt(t,e,n){var r,i,a,o,u=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=new Array(i=r-n+1);++ue&&--r,a=new Array(i=r-n+1);++u=0?(a>=tt?10:a>=et?5:a>=nt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=tt?10:a>=et?5:a>=nt?2:1)}function at(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=tt?i*=10:a>=et?i*=5:a>=nt&&(i*=2),e=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function st(t){if(!(e=ut.exec(t)))throw new Error("invalid format: "+t);var e;return new lt({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function lt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ct(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ft(t){return(t=ct(Math.abs(t)))?t[1]:NaN}function ht(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ft(e)/3)))-ft(Math.abs(t)))}function dt(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ft(e)-ft(t))+1}function pt(t){return Math.max(0,-ft(Math.abs(t)))}function mt(t,e){var n=ct(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}st.prototype=lt.prototype,lt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const gt={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>mt(100*t,e),r:mt,s:function(t,e){var n=ct(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(ot=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ct(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yt(t){return t}var vt,xt,_t,bt=Array.prototype.map,wt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kt(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?yt:(e=bt.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?yt:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(bt.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=st(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,m=t.comma,g=t.precision,y=t.trim,v=t.type;"n"===v?(m=!0,v="g"):gt[v]||(void 0===g&&(g=12),y=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===h?a:/[%p]/.test(v)?s:"",b=gt[v],w=/[defgprs%]/.test(v);function k(t){var i,a,s,h=x,k=_;if("c"===v)k=b(t)+k,t="";else{var M=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==f&&(M=!1),h=(M?"("===f?f:l:"-"===f||"("===f?"":f)+h,k=("s"===v?wt[8+ot/3]:"")+k+(M&&"("===f?")":""),w)for(i=-1,a=t.length;++i(s=t.charCodeAt(i))||s>57){k=(46===s?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!d&&(t=r(t,1/0));var A=h.length+t.length+k.length,E=A>1)+h+t+k+E.slice(A);break;default:t=E+h+t+k}return u(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=st(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ft(e)/3))),i=Math.pow(10,-r),a=wt[8+r/3];return function(t){return n(i*t)+a}}}}vt=kt({thousands:",",grouping:[3],currency:["$",""]}),xt=vt.format,_t=vt.formatPrefix;var Mt=new Date,At=new Date;function Et(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return u;do{u.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Mt.setTime(+e),At.setTime(+r),t(Mt),t(At),Math.floor(n(Mt,At))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Dt=1e3,Ct=6e4,Ft=36e5,St=864e5,Bt=6048e5,Tt=Et((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ct)/St),(t=>t.getDate()-1));const Nt=Tt;function zt(t){return Et((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ct)/Bt}))}Tt.range;var Ot=zt(0),Rt=zt(1),Ut=zt(2),Lt=zt(3),qt=zt(4),Pt=zt(5),jt=zt(6),It=(Ot.range,Rt.range,Ut.range,Lt.range,qt.range,Pt.range,jt.range,Et((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/St}),(function(t){return t.getUTCDate()-1})));const Wt=It;function Xt(t){return Et((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Bt}))}It.range;var $t=Xt(0),Ht=Xt(1),Yt=Xt(2),Jt=Xt(3),Vt=Xt(4),Gt=Xt(5),Kt=Xt(6),Zt=($t.range,Ht.range,Yt.range,Jt.range,Vt.range,Gt.range,Kt.range,Et((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));Zt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Et((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Qt=Zt;Zt.range;var te=Et((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ee=te;te.range;var ne=Et((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt-t.getMinutes()*Ct)}),(function(t,e){t.setTime(+t+e*Ft)}),(function(t,e){return(e-t)/Ft}),(function(t){return t.getHours()}));const re=ne;ne.range;var ie=Et((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt)}),(function(t,e){t.setTime(+t+e*Ct)}),(function(t,e){return(e-t)/Ct}),(function(t){return t.getMinutes()}));const ae=ie;ie.range;var oe=Et((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*Dt)}),(function(t,e){return(e-t)/Dt}),(function(t){return t.getUTCSeconds()}));const ue=oe;oe.range;var se=Et((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));se.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Et((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):se:null};const le=se;se.range;var ce=Et((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ce.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Et((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const fe=ce;ce.range;var he=Et((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const de=he;he.range;var pe=Et((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*Ft)}),(function(t,e){return(e-t)/Ft}),(function(t){return t.getUTCHours()}));const me=pe;pe.range;var ge=Et((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Ct)}),(function(t,e){return(e-t)/Ct}),(function(t){return t.getUTCMinutes()}));const ye=ge;function ve(t,e){return te?1:t>=e?0:NaN}function xe(t){let e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[a],e)<0?r=a+1:i=a}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>ve(t(e),n)}(t)),{left:r,center:function(t,n,i,a){null==i&&(i=0),null==a&&(a=t.length);const o=r(t,n,i,a-1);return o>i&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[a],e)>0?i=a:r=a+1}return r}}}ge.range;const _e="year",be="quarter",we="month",ke="week",Me="date",Ae="day",Ee="dayofyear",De="hours",Ce="minutes",Fe="seconds",Se="milliseconds",Be=[_e,be,we,ke,Me,Ae,Ee,De,Ce,Fe,Se],Te=Be.reduce(((t,e,n)=>(t[e]=1+n,t)),{});function Ne(t){const e=(0,m.IX)(t).slice(),n={};return e.length||(0,m.vU)("Missing time unit."),e.forEach((t=>{(0,m.nr)(Te,t)?n[t]=1:(0,m.vU)("Invalid time unit: ".concat(t,"."))})),(n[ke]||n[Ae]?1:0)+(n[be]||n[we]||n[Me]?1:0)+(n[Ee]?1:0)>1&&(0,m.vU)("Incompatible time units: ".concat(t)),e.sort(((t,e)=>Te[t]-Te[e])),e}const ze={[_e]:"%Y ",[be]:"Q%q ",[we]:"%b ",[Me]:"%d ",[ke]:"W%U ",[Ae]:"%a ",[Ee]:"%j ",[De]:"%H:00",[Ce]:"00:%M",[Fe]:":%S",[Se]:".%L",["".concat(_e,"-").concat(we)]:"%Y-%m ",["".concat(_e,"-").concat(we,"-").concat(Me)]:"%Y-%m-%d ",["".concat(De,"-").concat(Ce)]:"%H:%M"};function Oe(t,e){const n=(0,m.l7)({},ze,e),r=Ne(t),i=r.length;let a,o,u="",s=0;for(s=0;ss;--a)if(o=r.slice(s,a).join("-"),null!=n[o]){u+=n[o],s=a;break}return u.trim()}const Re=new Date;function Ue(t){return Re.setFullYear(t),Re.setMonth(0),Re.setDate(1),Re.setHours(0,0,0,0),Re}function Le(t){return Pe(new Date(t))}function qe(t){return je(new Date(t))}function Pe(t){return Nt.count(Ue(t.getFullYear())-1,t)}function je(t){return Ot.count(Ue(t.getFullYear())-1,t)}function Ie(t){return Ue(t).getDay()}function We(t,e,n,r,i,a,o){if(0<=t&&t<100){const u=new Date(-1,e,n,r,i,a,o);return u.setFullYear(t),u}return new Date(t,e,n,r,i,a,o)}function Xe(t){return He(new Date(t))}function $e(t){return Ye(new Date(t))}function He(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return Wt.count(e-1,t)}function Ye(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return $t.count(e-1,t)}function Je(t){return Re.setTime(Date.UTC(t,0,1)),Re.getUTCDay()}function Ve(t,e,n,r,i,a,o){if(0<=t&&t<100){const t=new Date(Date.UTC(-1,e,n,r,i,a,o));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(t,e,n,r,i,a,o))}function Ge(t,e,n,r,i){const a=e||1,o=(0,m.fj)(t),u=(t,e,i)=>function(t,e,n,r){const i=n<=1?t:r?(e,i)=>r+n*Math.floor((t(e,i)-r)/n):(e,r)=>n*Math.floor(t(e,r)/n);return e?(t,n)=>e(i(t,n),n):i}(n[i=i||t],r[i],t===o&&a,e),s=new Date,l=(0,m.Rg)(t),c=l[_e]?u(_e):(0,m.a9)(2012),f=l[we]?u(we):l[be]?u(be):m.bM,h=l[ke]&&l[Ae]?u(Ae,1,ke+Ae):l[ke]?u(ke,1):l[Ae]?u(Ae,1):l[Me]?u(Me,1):l[Ee]?u(Ee,1):m.kX,d=l[De]?u(De):m.bM,p=l[Ce]?u(Ce):m.bM,g=l[Fe]?u(Fe):m.bM,y=l[Se]?u(Se):m.bM;return function(t){s.setTime(+t);const e=c(s);return i(e,f(s),h(s,e),d(s),p(s),g(s),y(s))}}function Ke(t,e,n){return e+7*t-(n+6)%7}const Ze={[_e]:t=>t.getFullYear(),[be]:t=>Math.floor(t.getMonth()/3),[we]:t=>t.getMonth(),[Me]:t=>t.getDate(),[De]:t=>t.getHours(),[Ce]:t=>t.getMinutes(),[Fe]:t=>t.getSeconds(),[Se]:t=>t.getMilliseconds(),[Ee]:t=>Pe(t),[ke]:t=>je(t),[ke+Ae]:(t,e)=>Ke(je(t),t.getDay(),Ie(e)),[Ae]:(t,e)=>Ke(1,t.getDay(),Ie(e))},Qe={[be]:t=>3*t,[ke]:(t,e)=>Ke(t,0,Ie(e))};function tn(t,e){return Ge(t,e||1,Ze,Qe,We)}const en={[_e]:t=>t.getUTCFullYear(),[be]:t=>Math.floor(t.getUTCMonth()/3),[we]:t=>t.getUTCMonth(),[Me]:t=>t.getUTCDate(),[De]:t=>t.getUTCHours(),[Ce]:t=>t.getUTCMinutes(),[Fe]:t=>t.getUTCSeconds(),[Se]:t=>t.getUTCMilliseconds(),[Ee]:t=>He(t),[ke]:t=>Ye(t),[Ae]:(t,e)=>Ke(1,t.getUTCDay(),Je(e)),[ke+Ae]:(t,e)=>Ke(Ye(t),t.getUTCDay(),Je(e))},nn={[be]:t=>3*t,[ke]:(t,e)=>Ke(t,0,Je(e))};function rn(t,e){return Ge(t,e||1,en,nn,Ve)}const an={[_e]:Qt,[be]:ee.every(3),[we]:ee,[ke]:Ot,[Me]:Nt,[Ae]:Nt,[Ee]:Nt,[De]:re,[Ce]:ae,[Fe]:ue,[Se]:le},on={[_e]:fe,[be]:de.every(3),[we]:de,[ke]:$t,[Me]:Wt,[Ae]:Wt,[Ee]:Wt,[De]:me,[Ce]:ye,[Fe]:ue,[Se]:le};function un(t){return an[t]}function sn(t){return on[t]}function ln(t,e,n){return t?t.offset(e,n):void 0}function cn(t,e,n){return ln(un(t),e,n)}function fn(t,e,n){return ln(sn(t),e,n)}function hn(t,e,n,r){return t?t.range(e,n,r):void 0}function dn(t,e,n,r){return hn(un(t),e,n,r)}function pn(t,e,n,r){return hn(sn(t),e,n,r)}const mn=31536e6,gn=[_e,we,Me,De,Ce,Fe,Se],yn=gn.slice(0,-1),vn=yn.slice(0,-1),xn=vn.slice(0,-1),_n=xn.slice(0,-1),bn=[_e,we],wn=[_e],kn=[[yn,1,1e3],[yn,5,5e3],[yn,15,15e3],[yn,30,3e4],[vn,1,6e4],[vn,5,3e5],[vn,15,9e5],[vn,30,18e5],[xn,1,36e5],[xn,3,108e5],[xn,6,216e5],[xn,12,432e5],[_n,1,864e5],[[_e,ke],1,6048e5],[bn,1,2592e6],[bn,3,7776e6],[wn,1,mn]];function Mn(t){const e=t.extent,n=t.maxbins||40,r=Math.abs((0,m.yP)(e))/n;let i,a,o=xe((t=>t[2])).right(kn,r);return o===kn.length?(i=wn,a=at(e[0]/mn,e[1]/mn,n)):o?(o=kn[r/kn[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Vr,s:Gr,S:gr,u:yr,U:vr,V:_r,w:br,W:wr,x:null,X:null,y:kr,Y:Ar,Z:Dr,"%":Jr},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Cr,e:Cr,f:Nr,g:Xr,G:Hr,H:Fr,I:Sr,j:Br,L:Tr,m:zr,M:Or,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Vr,s:Gr,S:Rr,u:Ur,U:Lr,V:Pr,w:jr,W:Ir,x:null,X:null,y:Wr,Y:$r,Z:Yr,"%":Jr},b={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return M(t,e,n,r)},d:Zn,e:Zn,f:ir,g:Jn,G:Yn,H:tr,I:tr,j:Qn,L:rr,m:Kn,M:er,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:Gn,Q:or,s:ur,S:nr,u:Wn,U:Xn,V:$n,w:In,W:Hn,x:function(t,e,r){return M(t,n,e,r)},X:function(t,e,n){return M(t,r,e,n)},y:Jn,Y:Yn,Z:Vn,"%":ar};function w(t,e){return function(n){var r,i,a,o=[],u=-1,s=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=En(Dn(a.y,0,1))).getUTCDay(),r=i>4||0===i?Ht.ceil(r):Ht(r),r=Wt.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=An(Dn(a.y,0,1))).getDay(),r=i>4||0===i?Rt.ceil(r):Rt(r),r=Nt.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?En(Dn(a.y,0,1)).getUTCDay():An(Dn(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,En(a)):An(a)}}function M(t,e,n,r){for(var i,a,o=0,u=e.length,s=n.length;o=s)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=b[i in zn?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var Fn,Sn,Bn,Tn,Nn,zn={"-":"",_:" ",0:"0"},On=/^\s*\d+/,Rn=/^%/,Un=/[\\^$*+?|[\]().{}]/g;function Ln(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[t.toLowerCase(),e])))}function In(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wn(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Xn(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $n(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hn(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Yn(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Jn(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Vn(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Gn(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Kn(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Zn(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Qn(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function tr(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function er(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function nr(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function rr(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ir(t,e,n){var r=On.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ar(t,e,n){var r=Rn.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function or(t,e,n){var r=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ur(t,e,n){var r=On.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function sr(t,e){return Ln(t.getDate(),e,2)}function lr(t,e){return Ln(t.getHours(),e,2)}function cr(t,e){return Ln(t.getHours()%12||12,e,2)}function fr(t,e){return Ln(1+Nt.count(Qt(t),t),e,3)}function hr(t,e){return Ln(t.getMilliseconds(),e,3)}function dr(t,e){return hr(t,e)+"000"}function pr(t,e){return Ln(t.getMonth()+1,e,2)}function mr(t,e){return Ln(t.getMinutes(),e,2)}function gr(t,e){return Ln(t.getSeconds(),e,2)}function yr(t){var e=t.getDay();return 0===e?7:e}function vr(t,e){return Ln(Ot.count(Qt(t)-1,t),e,2)}function xr(t){var e=t.getDay();return e>=4||0===e?qt(t):qt.ceil(t)}function _r(t,e){return t=xr(t),Ln(qt.count(Qt(t),t)+(4===Qt(t).getDay()),e,2)}function br(t){return t.getDay()}function wr(t,e){return Ln(Rt.count(Qt(t)-1,t),e,2)}function kr(t,e){return Ln(t.getFullYear()%100,e,2)}function Mr(t,e){return Ln((t=xr(t)).getFullYear()%100,e,2)}function Ar(t,e){return Ln(t.getFullYear()%1e4,e,4)}function Er(t,e){var n=t.getDay();return Ln((t=n>=4||0===n?qt(t):qt.ceil(t)).getFullYear()%1e4,e,4)}function Dr(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ln(e/60|0,"0",2)+Ln(e%60,"0",2)}function Cr(t,e){return Ln(t.getUTCDate(),e,2)}function Fr(t,e){return Ln(t.getUTCHours(),e,2)}function Sr(t,e){return Ln(t.getUTCHours()%12||12,e,2)}function Br(t,e){return Ln(1+Wt.count(fe(t),t),e,3)}function Tr(t,e){return Ln(t.getUTCMilliseconds(),e,3)}function Nr(t,e){return Tr(t,e)+"000"}function zr(t,e){return Ln(t.getUTCMonth()+1,e,2)}function Or(t,e){return Ln(t.getUTCMinutes(),e,2)}function Rr(t,e){return Ln(t.getUTCSeconds(),e,2)}function Ur(t){var e=t.getUTCDay();return 0===e?7:e}function Lr(t,e){return Ln($t.count(fe(t)-1,t),e,2)}function qr(t){var e=t.getUTCDay();return e>=4||0===e?Vt(t):Vt.ceil(t)}function Pr(t,e){return t=qr(t),Ln(Vt.count(fe(t),t)+(4===fe(t).getUTCDay()),e,2)}function jr(t){return t.getUTCDay()}function Ir(t,e){return Ln(Ht.count(fe(t)-1,t),e,2)}function Wr(t,e){return Ln(t.getUTCFullYear()%100,e,2)}function Xr(t,e){return Ln((t=qr(t)).getUTCFullYear()%100,e,2)}function $r(t,e){return Ln(t.getUTCFullYear()%1e4,e,4)}function Hr(t,e){var n=t.getUTCDay();return Ln((t=n>=4||0===n?Vt(t):Vt.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yr(){return"+0000"}function Jr(){return"%"}function Vr(t){return+t}function Gr(t){return Math.floor(+t/1e3)}function Kr(t){const e={};return n=>e[n]||(e[n]=t(n))}function Zr(t){const e=Kr(t.format),n=t.formatPrefix;return{format:e,formatPrefix:n,formatFloat(t){const n=st(t||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return r=e(n),i=e(".1f")(1)[1],t=>{const e=r(t),n=e.indexOf(i);if(n<0)return e;let a=function(t,e){let n,r=t.lastIndexOf("e");if(r>0)return r;for(r=t.length;--r>e;)if(n=t.charCodeAt(r),n>=48&&n<=57)return r+1}(e,n);const o=an;)if("0"!==e[a]){++a;break}return e.slice(0,a)+o}}return e(n);var r,i},formatSpan(t,r,i,a){a=st(null==a?",f":a);const o=at(t,r,i),u=Math.max(Math.abs(t),Math.abs(r));let s;if(null==a.precision)switch(a.type){case"s":return isNaN(s=ht(o,u))||(a.precision=s),n(a,u);case"":case"e":case"g":case"p":case"r":isNaN(s=dt(o,u))||(a.precision=s-("e"===a.type));break;case"f":case"%":isNaN(s=pt(o))||(a.precision=s-2*("%"===a.type))}return e(a)}}}let Qr,ti;function ei(){return Qr=Zr({format:xt,formatPrefix:_t})}function ni(t){return Zr(kt(t))}function ri(t){return arguments.length?Qr=ni(t):Qr}function ii(t,e,n){n=n||{},(0,m.Kn)(n)||(0,m.vU)("Invalid time multi-format specifier: ".concat(n));const r=e(Fe),i=e(Ce),a=e(De),o=e(Me),u=e(ke),s=e(we),l=e(be),c=e(_e),f=t(n[Se]||".%L"),h=t(n[Fe]||":%S"),d=t(n[Ce]||"%I:%M"),p=t(n[De]||"%I %p"),g=t(n[Me]||n[Ae]||"%a %d"),y=t(n[ke]||"%b %d"),v=t(n[we]||"%B"),x=t(n[be]||"%B"),_=t(n[_e]||"%Y");return t=>(r(t)(0,m.HD)(t)?e(t):ii(e,un,t),utcFormat:t=>(0,m.HD)(t)?n(t):ii(n,sn,t),timeParse:Kr(t.parse),utcParse:Kr(t.utcParse)}}function oi(){return ti=ai({format:Sn,parse:Bn,utcFormat:Tn,utcParse:Nn})}function ui(t){return ai(Cn(t))}function si(t){return arguments.length?ti=ui(t):ti}Fn=Cn({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Sn=Fn.format,Bn=Fn.parse,Tn=Fn.utcFormat,Nn=Fn.utcParse,ei(),oi();const li=(t,e)=>(0,m.l7)({},t,e);function ci(t,e){const n=t?ni(t):ri(),r=e?ui(e):si();return li(n,r)}function fi(t,e){const n=arguments.length;return n&&2!==n&&(0,m.vU)("defaultLocale expects either zero or two arguments."),n?li(ri(t),si(e)):li(ri(),si())}function hi(){return ei(),oi(),fi()}function di(t,e,n,r){const i=Z((e=e||{}).type||"json");return i||(0,m.vU)("Unknown data format type: "+e.type),t=i(t,e),e.parse&&function(t,e,n,r){if(!t.length)return;const i=si();n=n||i.timeParse,r=r||i.utcParse;let a,o,u,s,l,c,f=t.columns||Object.keys(t[0]);"auto"===e&&(e=B(t,f)),f=Object.keys(e);const h=f.map((t=>{const i=e[t];let a,o;if(i&&(i.startsWith("date:")||i.startsWith("utc:")))return a=i.split(/:(.+)?/,2),o=a[1],("'"===o[0]&&"'"===o[o.length-1]||'"'===o[0]&&'"'===o[o.length-1])&&(o=o.slice(1,-1)),("utc"===a[0]?r:n)(o);if(!D[i])throw Error("Illegal format pattern: "+t+":"+i);return D[i]}));for(u=0,l=t.length,c=f.length;u({options:e||{},sanitize:b,load:_,fileAccess:!1,file:w(null),http:M(t)})}("undefined"!=typeof fetch&&fetch);function mi(t){const e=t||m.yR,n=[],r={};return n.add=t=>{const i=e(t);return r[i]||(r[i]=1,n.push(t)),n},n.remove=t=>{const i=e(t);if(r[i]){r[i]=0;const e=n.indexOf(t);e>=0&&n.splice(e,1)}return n},n}async function gi(t,e){try{await e(t)}catch(e){t.error(e)}}const yi=Symbol("vega_id");let vi=1;function xi(t){return!(!t||!_i(t))}function _i(t){return t[yi]}function bi(t,e){return t[yi]=e,t}function wi(t){const e=t===Object(t)?t:{data:t};return _i(e)?e:bi(e,vi++)}function ki(t){return Mi(t,wi({}))}function Mi(t,e){for(const n in t)e[n]=t[n];return e}function Ai(t,e){return bi(e,_i(t))}function Ei(t,e){return t?e?(n,r)=>t(n,r)||_i(e(n))-_i(e(r)):(e,n)=>t(e,n)||_i(e)-_i(n):null}function Di(t){return t&&t.constructor===Ci}function Ci(){const t=[],e=[],n=[],r=[],i=[];let a=null,o=!1;return{constructor:Ci,insert(e){const n=(0,m.IX)(e),r=n.length;for(let e=0;e{p(t)&&(l[_i(t)]=-1)}));for(f=0,h=t.length;f0&&(y(m,p,d.value),u.modifies(p));for(f=0,h=i.length;f{p(t)&&l[_i(t)]>0&&y(t,d.field,d.value)})),u.modifies(d.field);if(o)u.mod=e.length||r.length?s.filter((t=>l[_i(t)]>0)):s.slice();else for(g in c)u.mod.push(c[g]);return(a||null==a&&(e.length||r.length))&&u.clean(!0),u}}}const Fi="_:mod:_";function Si(){Object.defineProperty(this,Fi,{writable:!0,value:{}})}Si.prototype={set(t,e,n,r){const i=this,a=i[t],o=i[Fi];return null!=e&&e>=0?(a[e]!==n||r)&&(a[e]=n,o[e+":"+t]=-1,o[t]=-1):(a!==n||r)&&(i[t]=n,o[t]=(0,m.kJ)(n)?1+n.length:-1),i},modified(t,e){const n=this[Fi];if(!arguments.length){for(const t in n)if(n[t])return!0;return!1}if((0,m.kJ)(t)){for(let e=0;e=0?e+1{o instanceof Ni?(o!==this&&(e&&o.targets().add(this),a.push(o)),i.push({op:o,name:t,index:n})):r.set(t,n,o)};for(o in t)if(u=t[o],"pulse"===o)(0,m.IX)(u).forEach((t=>{t instanceof Ni?t!==this&&(t.targets().add(this),a.push(t)):(0,m.vU)("Pulse parameters must be operator instances.")})),this.source=u;else if((0,m.kJ)(u))for(r.set(o,-1,Array(s=u.length)),l=0;l{const n=Date.now();return n-e>t?(e=n,1):0}))},debounce(t){const e=Ui();return this.targets().add(Ui(null,null,(0,m.Ds)(t,(t=>{const n=t.dataflow;e.receive(t),n&&n.run&&n.run()})))),e},between(t,e){let n=!1;return t.targets().add(Ui(null,null,(()=>n=!0))),e.targets().add(Ui(null,null,(()=>n=!1))),this.filter((()=>n))},detach(){this._filter=m.yb,this._targets=null}};const Li={skip:!0};function qi(t,e,n,r,i,a){const o=(0,m.l7)({},a,Li);let u,s;(0,m.mf)(n)||(n=(0,m.a9)(n)),void 0===r?u=e=>t.touch(n(e)):(0,m.mf)(r)?(s=new Ni(null,r,i,!1),u=e=>{s.evaluate(e);const r=n(e),i=s.value;Di(i)?t.pulse(r,i,a):t.update(r,i,o)}):u=e=>t.update(n(e),r,o),e.apply(u)}function Pi(t,e,n,r,i,a){if(void 0===r)e.targets().add(n);else{const o=a||{},u=new Ni(null,function(t,e){return e=(0,m.mf)(e)?e:(0,m.a9)(e),t?function(n,r){const i=e(n,r);return t.skip()||(t.skip(i!==this.value).value=i),i}:e}(n,r),i,!1);u.modified(o.force),u.rank=e.rank,e.targets().add(u),n&&(u.skip(!0),u.value=n.value,u.targets().add(n),t.connect(n,[u]))}}const ji={};function Ii(t,e,n){this.dataflow=t,this.stamp=null==e?-1:e,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function Wi(t,e){const n=[];return(0,m.FP)(t,e,(t=>n.push(t))),n}function Xi(t,e){const n={};return t.visit(e,(t=>{n[_i(t)]=1})),t=>n[_i(t)]?null:t}function $i(t,e){return t?(n,r)=>t(n,r)&&e(n,r):e}function Hi(t,e,n,r){const i=this,a=n.length;let o=0;this.dataflow=t,this.stamp=e,this.fields=null,this.encode=r||null,this.pulses=n;for(let t=0;te[t]=!0)):e[t]=!0,this},modified(t,e){const n=this.fields;return!(!e&&!this.mod.length||!n)&&(arguments.length?(0,m.kJ)(t)?t.some((t=>n[t])):n[t]:!!n)},filter(t,e){const n=this;return 1&t&&(n.addF=$i(n.addF,e)),2&t&&(n.remF=$i(n.remF,e)),4&t&&(n.modF=$i(n.modF,e)),16&t&&(n.srcF=$i(n.srcF,e)),n},materialize(t){const e=this;return 1&(t=t||7)&&e.addF&&(e.add=Wi(e.add,e.addF),e.addF=null),2&t&&e.remF&&(e.rem=Wi(e.rem,e.remF),e.remF=null),4&t&&e.modF&&(e.mod=Wi(e.mod,e.modF),e.modF=null),16&t&&e.srcF&&(e.source=e.source.filter(e.srcF),e.srcF=null),e},visit(t,e){const n=this,r=e;if(16&t)return(0,m.FP)(n.source,n.srcF,r),n;1&t&&(0,m.FP)(n.add,n.addF,r),2&t&&(0,m.FP)(n.rem,n.remF,r),4&t&&(0,m.FP)(n.mod,n.modF,r);const i=n.source;if(8&t&&i){const t=n.add.length+n.mod.length;t===i.length||(t?(0,m.FP)(i,Xi(n,5),r):(0,m.FP)(i,n.srcF,r))}return n}},(0,m.XW)(Hi,Ii,{fork(t){const e=new Ii(this.dataflow).init(this,t&this.NO_FIELDS);return void 0!==t&&(t&e.ADD&&this.visit(e.ADD,(t=>e.add.push(t))),t&e.REM&&this.visit(e.REM,(t=>e.rem.push(t))),t&e.MOD&&this.visit(e.MOD,(t=>e.mod.push(t)))),e},changed(t){return this.changes&t},modified(t){const e=this,n=e.fields;return n&&e.changes&e.MOD?(0,m.kJ)(t)?t.some((t=>n[t])):n[t]:0},filter(){(0,m.vU)("MultiPulse does not support filtering.")},materialize(){(0,m.vU)("MultiPulse does not support materialization.")},visit(t,e){const n=this,r=n.pulses,i=r.length;let a=0;if(t&n.SOURCE)for(;ae&&(a=n-1>>1,i=t[a],r(o,i)<0);)t[n]=i,n=a;return t[n]=o}function Gi(){this.logger((0,m.kg)()),this.logLevel(m.jj),this._clock=0,this._rank=0,this._locale=fi();try{this._loader=pi()}catch(t){}this._touched=mi(m.id),this._input={},this._pulse=null,this._heap=function(t){let e=[];return{clear:()=>e=[],size:()=>e.length,peek:()=>e[0],push:n=>(e.push(n),Vi(e,0,e.length-1,t)),pop:()=>{const n=e.pop();let r;return e.length?(r=e[0],e[0]=n,function(t,e,n){const r=e,i=t.length,a=t[e];let o,u=1+(e<<1);for(;u=0&&(u=o),t[e]=t[u],u=1+((e=u)<<1);t[e]=a,Vi(t,r,e,n)}(e,0,t)):r=n,r}}}(((t,e)=>t.qrank-e.qrank)),this._postrun=[]}function Ki(t){return function(){return this._log[t].apply(this,arguments)}}function Zi(t,e){Ni.call(this,t,null,e)}Gi.prototype={stamp(){return this._clock},loader(t){return arguments.length?(this._loader=t,this):this._loader},locale(t){return arguments.length?(this._locale=t,this):this._locale},logger(t){return arguments.length?(this._log=t,this):this._log},error:Ki("error"),warn:Ki("warn"),info:Ki("info"),debug:Ki("debug"),logLevel:Ki("level"),cleanThreshold:1e4,add:function(t,e,n,r){let i,a=1;return t instanceof Ni?i=t:t&&t.prototype instanceof Ni?i=new t:(0,m.mf)(t)?i=new Ni(null,t):(a=0,i=new Ni(t,e)),this.rank(i),a&&(r=n,n=e),n&&this.connect(i,i.parameters(n,r)),this.touch(i),i},connect:function(t,e){const n=t.rank,r=e.length;for(let i=0;i=0;)e.push(n=r[i]),n===t&&(0,m.vU)("Cycle detected in dataflow graph.")},pulse:function(t,e,n){this.touch(t,n||Ji);const r=new Ii(this,this._clock+(this._pulse?0:1)),i=t.pulse&&t.pulse.source||[];return r.target=t,this._input[t.id]=e.pulse(r,i),this},touch:function(t,e){const n=e||Ji;return this._pulse?this._enqueue(t):this._touched.add(t),n.skip&&t.skip(!0),this},update:function(t,e,n){const r=n||Ji;return(t.set(e)||r.force)&&this.touch(t,r),this},changeset:Ci,ingest:function(t,e,n){return e=this.parse(e,n),this.pulse(t,this.changeset().insert(e))},parse:function(t,e){const n=this.locale();return di(t,e,n.timeParse,n.utcParse)},preload:async function(t,e,n){const r=this,i=r._pending||function(t){let e;const n=new Promise((t=>e=t));return n.requests=0,n.done=()=>{0==--n.requests&&(t._pending=null,e(t))},t._pending=n}(r);i.requests+=1;const a=await r.request(e,n);return r.pulse(t,r.changeset().remove(m.yb).insert(a.data||[])),i.done(),a},request:async function(t,e){const n=this;let r,i=0;try{r=await n.loader().load(t,{context:"dataflow",response:Q(e&&e.type)});try{r=n.parse(r,e)}catch(e){i=-2,n.warn("Data ingestion failed",t,e)}}catch(e){i=-1,n.warn("Loading failed",t,e)}return{data:r,status:i}},events:function(t,e,n,r){const i=this,a=Ui(n,r),o=function(t){t.dataflow=i;try{a.receive(t)}catch(t){i.error(t)}finally{i.run()}};let u;u="string"==typeof t&&"undefined"!=typeof document?document.querySelectorAll(t):(0,m.IX)(t);const s=u.length;for(let t=0;tr._enqueue(t,!0))),r._touched=mi(m.id);let o,u,s,l=0;try{for(;r._heap.size()>0;)o=r._heap.pop(),o.rank===o.qrank?(u=o.run(r._getPulse(o,t)),u.then?u=await u:u.async&&(i.push(u.async),u=ji),u!==ji&&o._targets&&o._targets.forEach((t=>r._enqueue(t))),++l):r._enqueue(o,!0)}catch(t){r._heap.clear(),s=t}if(r._input={},r._pulse=null,r.debug(`Pulse ${a}: ${l} operators`),s&&(r._postrun=[],r.error(s)),r._postrun.length){const t=r._postrun.sort(((t,e)=>e.priority-t.priority));r._postrun=[];for(let e=0;er.runAsync(null,(()=>{t.forEach((t=>{try{t(r)}catch(t){r.error(t)}}))})))),r},run:function(t,e,n){return this._pulse?Yi(this):(this.evaluate(t,e,n),this)},runAsync:async function(t,e,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(t,e,n)).then(r,r),this._running},runAfter:function(t,e,n){if(this._pulse||e)this._postrun.push({priority:n||0,callback:t});else try{t(this)}catch(t){this.error(t)}},_enqueue:function(t,e){const n=t.stampt.pulse)),e):this._input[t.id]||function(t,e){return e&&e.stamp===t.stamp?e:(t=t.fork(),e&&e!==ji&&(t.source=e.source),t)}(this._pulse,n&&n.pulse)}},(0,m.XW)(Zi,Ni,{run(t){if(t.stampthis.pulse=t)):e!==t.StopPropagation&&(this.pulse=e),e},evaluate(t){const e=this.marshall(t.stamp),n=this.transform(e,t);return e.clear(),n},transform(){}});const Qi={};function ta(t){const e=ea(t);return e&&e.Definition||null}function ea(t){return t=t&&t.toLowerCase(),(0,m.nr)(Qi,t)?Qi[t]:null}function na(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function ra(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function ia(t,e,n=0,r=t.length-1,i=ve){for(;r>n;){if(r-n>600){const a=r-n+1,o=e-n+1,u=Math.log(a),s=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*s*(a-s)/a)*(o-a/2<0?-1:1);ia(t,e,Math.max(n,Math.floor(e-o*s/a+l)),Math.min(r,Math.floor(e+(a-o)*s/a+l)),i)}const a=t[e];let o=n,u=r;for(aa(t,n,e),i(t[r],a)>0&&aa(t,n,r);o0;)--u}0===i(t[n],a)?aa(t,n,u):(++u,aa(t,u,r)),u<=e&&(n=u+1),e<=u&&(r=u-1)}return t}function aa(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function oa(t){return null===t?NaN:+t}function ua(t,e,n){if(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length){if((e=+e)<=0||r<2)return ra(t);if(e>=1)return na(t);var r,i=(r-1)*e,a=Math.floor(i),o=na(ia(t,a).subarray(0,a+1));return o+(ra(t.subarray(a+1))-o)*(i-a)}}function sa(t,e,n=oa){if(r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function la(t,e){return ua(t,.5,e)}function*ca(t,e){if(null==e)for(let e of t)null!=e&&""!==e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)r=e(r,++n,t),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function fa(t,e,n){const r=Float64Array.from(ca(t,n));return r.sort(ve),e.map((t=>sa(r,t)))}function ha(t,e){return fa(t,[.25,.5,.75],e)}function da(t,e){const n=t.length,r=function(t,e){const n=function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let u of t)null!=(u=e(u,++o,t))&&(u=+u)>=u&&(n=u-i,i+=n/++r,a+=n*(u-i))}if(r>1)return a/(r-1)}(t,e);return n?Math.sqrt(n):n}(t,e),i=ha(t,e),a=(i[2]-i[0])/1.34;return 1.06*(Math.min(r,a)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)}function pa(t){const e=t.maxbins||20,n=t.base||10,r=Math.log(n),i=t.divide||[5,2];let a,o,u,s,l,c,f=t.extent[0],h=t.extent[1];const d=t.span||h-f||Math.abs(f)||1;if(t.step)a=t.step;else if(t.steps){for(s=d/e,l=0,c=t.steps.length;le;)a*=n;for(l=0,c=i.length;l=u&&d/s<=e&&(a=s)}s=Math.log(a);const p=s>=0?0:1+~~(-s/r),m=Math.pow(n,-p-1);return(t.nice||void 0===t.nice)&&(s=Math.floor(f/a+m)*a,f=ft);const i=t.length,a=new Float64Array(i);let o,u=0,s=1,l=r(t[0]),c=l,f=l+e;for(;s=f){for(c=(l+c)/2;u>1);io;)t[i--]=t[a]}a=o,o=r}return t}(a,e+e/4):a}function xa(t){return function(){return(t=(1103515245*t+12345)%2147483647)/2147483647}}function _a(t,e){let n,r,i;null==e&&(e=t,t=0);const a={min(t){return arguments.length?(n=t||0,i=r-n,a):n},max(t){return arguments.length?(r=t||0,i=r-n,a):r},sample:()=>n+Math.floor(i*ma()),pdf:t=>t===Math.floor(t)&&t>=n&&t=r?1:(e-n+1)/i},icdf:t=>t>=0&&t<=1?n-1+Math.floor(t*i):NaN};return a.min(t).max(e)}const ba=Math.sqrt(2*Math.PI),wa=Math.SQRT2;let ka=NaN;function Ma(t,e){t=t||0,e=null==e?1:e;let n,r,i=0,a=0;if(ka==ka)i=ka,ka=NaN;else{do{i=2*ma()-1,a=2*ma()-1,n=i*i+a*a}while(0===n||n>1);r=Math.sqrt(-2*Math.log(n)/n),i*=r,ka=a*r}return t+i*e}function Aa(t,e,n){const r=(t-(e||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*ba)}function Ea(t,e,n){const r=(t-(e=e||0))/(n=null==n?1:n),i=Math.abs(r);let a;if(i>37)a=0;else{const t=Math.exp(-i*i/2);let e;i<7.07106781186547?(e=.0352624965998911*i+.700383064443688,e=e*i+6.37396220353165,e=e*i+33.912866078383,e=e*i+112.079291497871,e=e*i+221.213596169931,e=e*i+220.206867912376,a=t*e,e=.0883883476483184*i+1.75566716318264,e=e*i+16.064177579207,e=e*i+86.7807322029461,e=e*i+296.564248779674,e=e*i+637.333633378831,e=e*i+793.826512519948,e=e*i+440.413735824752,a/=e):(e=i+.65,e=i+4/e,e=i+3/e,e=i+2/e,e=i+1/e,a=t/e/2.506628274631)}return r>0?1-a:a}function Da(t,e,n){return t<0||t>1?NaN:(e||0)+(null==n?1:n)*wa*function(t){let e,n=-Math.log((1-t)*(1+t));return n<6.25?(n-=3.125,e=-364441206401782e-35,e=e*n-16850591381820166e-35,e=128584807152564e-32+e*n,e=11157877678025181e-33+e*n,e=e*n-1333171662854621e-31,e=20972767875968562e-33+e*n,e=6637638134358324e-30+e*n,e=e*n-4054566272975207e-29,e=e*n-8151934197605472e-29,e=26335093153082323e-28+e*n,e=e*n-12975133253453532e-27,e=e*n-5415412054294628e-26,e=1.0512122733215323e-9+e*n,e=e*n-4.112633980346984e-9,e=e*n-2.9070369957882005e-8,e=4.2347877827932404e-7+e*n,e=e*n-13654692000834679e-22,e=e*n-13882523362786469e-21,e=.00018673420803405714+e*n,e=e*n-.000740702534166267,e=e*n-.006033670871430149,e=.24015818242558962+e*n,e=1.6536545626831027+e*n):n<16?(n=Math.sqrt(n)-3.25,e=2.2137376921775787e-9,e=9.075656193888539e-8+e*n,e=e*n-2.7517406297064545e-7,e=1.8239629214389228e-8+e*n,e=15027403968909828e-22+e*n,e=e*n-4013867526981546e-21,e=29234449089955446e-22+e*n,e=12475304481671779e-21+e*n,e=e*n-47318229009055734e-21,e=6828485145957318e-20+e*n,e=24031110387097894e-21+e*n,e=e*n-.0003550375203628475,e=.0009532893797373805+e*n,e=e*n-.0016882755560235047,e=.002491442096107851+e*n,e=e*n-.003751208507569241,e=.005370914553590064+e*n,e=1.0052589676941592+e*n,e=3.0838856104922208+e*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,e=-27109920616438573e-27,e=e*n-2.555641816996525e-10,e=1.5076572693500548e-9+e*n,e=e*n-3.789465440126737e-9,e=7.61570120807834e-9+e*n,e=e*n-1.496002662714924e-8,e=2.914795345090108e-8+e*n,e=e*n-6.771199775845234e-8,e=2.2900482228026655e-7+e*n,e=e*n-9.9298272942317e-7,e=4526062597223154e-21+e*n,e=e*n-1968177810553167e-20,e=7599527703001776e-20+e*n,e=e*n-.00021503011930044477,e=e*n-.00013871931833623122,e=1.0103004648645344+e*n,e=4.849906401408584+e*n):e=1/0,e*t}(2*t-1)}function Ca(t,e){let n,r;const i={mean(t){return arguments.length?(n=t||0,i):n},stdev(t){return arguments.length?(r=null==t?1:t,i):r},sample:()=>Ma(n,r),pdf:t=>Aa(t,n,r),cdf:t=>Ea(t,n,r),icdf:t=>Da(t,n,r)};return i.mean(t).stdev(e)}function Fa(t,e){const n=Ca();let r=0;const i={data(n){return arguments.length?(t=n,r=n?n.length:0,i.bandwidth(e)):t},bandwidth(n){return arguments.length?(!(e=n)&&t&&(e=da(t)),i):e},sample:()=>t[~~(ma()*r)]+e*n.sample(),pdf(i){let a=0,o=0;for(;oSa(n,r),pdf:t=>Ba(t,n,r),cdf:t=>Ta(t,n,r),icdf:t=>Na(t,n,r)};return i.mean(t).stdev(e)}function Oa(t,e){let n,r=0;const i={weights(t){return arguments.length?(n=function(t){const e=[];let n,i=0;for(n=0;n=e&&t<=n?1/(n-e):0}function La(t,e,n){return null==n&&(n=null==e?1:e,e=0),tn?1:(t-e)/(n-e)}function qa(t,e,n){return null==n&&(n=null==e?1:e,e=0),t>=0&&t<=1?e+t*(n-e):NaN}function Pa(t,e){let n,r;const i={min(t){return arguments.length?(n=t||0,i):n},max(t){return arguments.length?(r=null==t?1:t,i):r},sample:()=>Ra(n,r),pdf:t=>Ua(t,n,r),cdf:t=>La(t,n,r),icdf:t=>qa(t,n,r)};return null==e&&(e=null==t?1:t,t=0),i.min(t).max(e)}function ja(t,e,n,r){const i=r-t*t,a=Math.abs(i)<1e-24?0:(n-t*e)/i;return[e-a*t,a]}function Ia(t,e,n,r){t=t.filter((t=>{let r=e(t),i=n(t);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&t.sort(((t,n)=>e(t)-e(n)));const i=t.length,a=new Float64Array(i),o=new Float64Array(i);let u,s,l,c=0,f=0,h=0;for(l of t)a[c]=u=+e(l),o[c]=s=+n(l),++c,f+=(u-f)/c,h+=(s-h)/c;for(c=0;c=i&&null!=a&&(a=+a)>=a&&r(i,a,++o)}function Xa(t,e,n,r,i){let a=0,o=0;return Wa(t,e,n,((t,e)=>{const n=e-i(t),u=e-r;a+=n*n,o+=u*u})),1-a/o}function $a(t,e,n){let r=0,i=0,a=0,o=0,u=0;Wa(t,e,n,((t,e)=>{++u,r+=(t-r)/u,i+=(e-i)/u,a+=(t*e-a)/u,o+=(t*t-o)/u}));const s=ja(r,i,a,o),l=t=>s[0]+s[1]*t;return{coef:s,predict:l,rSquared:Xa(t,e,n,i,l)}}function Ha(t,e,n){let r=0,i=0,a=0,o=0,u=0;Wa(t,e,n,((t,e)=>{++u,t=Math.log(t),r+=(t-r)/u,i+=(e-i)/u,a+=(t*e-a)/u,o+=(t*t-o)/u}));const s=ja(r,i,a,o),l=t=>s[0]+s[1]*Math.log(t);return{coef:s,predict:l,rSquared:Xa(t,e,n,i,l)}}function Ya(t,e,n){const[r,i,a,o]=Ia(t,e,n);let u,s,l,c=0,f=0,h=0,d=0,p=0;Wa(t,e,n,((t,e)=>{u=r[p++],s=Math.log(e),l=u*e,c+=(e*s-c)/p,f+=(l-f)/p,h+=(l*s-h)/p,d+=(u*l-d)/p}));const[m,g]=ja(f/o,c/o,h/o,d/o),y=t=>Math.exp(m+g*(t-a));return{coef:[Math.exp(m-g*a),g],predict:y,rSquared:Xa(t,e,n,o,y)}}function Ja(t,e,n){let r=0,i=0,a=0,o=0,u=0,s=0;Wa(t,e,n,((t,e)=>{const n=Math.log(t),l=Math.log(e);++s,r+=(n-r)/s,i+=(l-i)/s,a+=(n*l-a)/s,o+=(n*n-o)/s,u+=(e-u)/s}));const l=ja(r,i,a,o),c=t=>l[0]*Math.pow(t,l[1]);return l[0]=Math.exp(l[0]),{coef:l,predict:c,rSquared:Xa(t,e,n,u,c)}}function Va(t,e,n){const[r,i,a,o]=Ia(t,e,n),u=r.length;let s,l,c,f,h=0,d=0,p=0,m=0,g=0;for(s=0;sx*(t-=a)*t+_*t+b+o;return{coef:[b-_*a+x*a*a+o,_-2*x*a,x],predict:w,rSquared:Xa(t,e,n,o,w)}}function Ga(t,e,n,r){if(1===r)return $a(t,e,n);if(2===r)return Va(t,e,n);const[i,a,o,u]=Ia(t,e,n),s=i.length,l=[],c=[],f=r+1;let h,d,p,m,g;for(h=0;hMath.abs(t[r][o])&&(o=i);for(a=r;a=r;a--)t[a][i]-=t[a][r]*t[r][i]/t[r][r]}for(i=e-1;i>=0;--i){for(u=0,a=i+1;a{t-=o;let e=u+y[0]+y[1]*t+y[2]*t*t;for(h=3;h=0;--a)for(u=e[a],s=1,i[a]+=u,o=1;o<=a;++o)s*=(a+1-o)/o,i[a-o]+=u*Math.pow(n,o)*s;return i[0]+=r,i}function Za(t,e,n,r){const[i,a,o,u]=Ia(t,e,n,!0),s=i.length,l=Math.max(2,~~(r*s)),c=new Float64Array(s),f=new Float64Array(s),h=new Float64Array(s).fill(1);for(let t=-1;++t<=2;){const e=[0,l-1];for(let t=0;ti[o]-n?r:o;let s=0,l=0,d=0,p=0,m=0;const g=1/Math.abs(i[u]-n||1);for(let t=r;t<=o;++t){const e=i[t],r=a[t],o=Qa(Math.abs(n-e)*g)*h[t],u=e*o;s+=o,l+=u,d+=r*o,p+=r*u,m+=e*u}const[y,v]=ja(l/s,d/s,p/s,m/s);c[t]=y+v*n,f[t]=Math.abs(a[t]-c[t]),to(i,t+1,e)}if(2===t)break;const n=la(f);if(Math.abs(n)<1e-12)break;for(let t,e,r=0;r=1?1e-12:(e=1-t*t)*e}return function(t,e,n,r){const i=t.length,a=[];let o,u=0,s=0,l=[];for(;u=t.length))for(;e>i&&t[a]-r<=r-t[i];)n[0]=++i,n[1]=a,++a}const eo=.1*Math.PI/180;function no(t,e,n,r){n=n||25,r=Math.max(n,r||200);const i=e=>[e,t(e)],a=e[0],o=e[1],u=o-a,s=u/r,l=[i(a)],c=[];if(n===r){for(let t=1;t0;)c.push(i(a+t/n*u));let f=l[0],h=c[c.length-1];for(;h;){const t=i((f[0]+h[0])/2);t[0]-f[0]>=s&&ro(f,t,h)>eo?c.push(t):(f=h,l.push(h),c.pop()),h=c[c.length-1]}return l}function ro(t,e,n){const r=Math.atan2(n[1]-t[1],n[0]-t[0]),i=Math.atan2(e[1]-t[1],e[0]-t[0]);return Math.abs(r-i)}function io(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r{const n=e.length;let r=1,i=String(e[0](t));for(;r{},so={init:uo,add:uo,rem:uo,idx:0},lo={values:{init:t=>t.cell.store=!0,value:t=>t.cell.data.values(),idx:-1},count:{value:t=>t.cell.num},__count__:{value:t=>t.missing+t.valid},missing:{value:t=>t.missing},valid:{value:t=>t.valid},sum:{init:t=>t.sum=0,value:t=>t.sum,add:(t,e)=>t.sum+=+e,rem:(t,e)=>t.sum-=e},product:{init:t=>t.product=1,value:t=>t.valid?t.product:void 0,add:(t,e)=>t.product*=e,rem:(t,e)=>t.product/=e},mean:{init:t=>t.mean=0,value:t=>t.valid?t.mean:void 0,add:(t,e)=>(t.mean_d=e-t.mean,t.mean+=t.mean_d/t.valid),rem:(t,e)=>(t.mean_d=e-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean)},average:{value:t=>t.valid?t.mean:void 0,req:["mean"],idx:1},variance:{init:t=>t.dev=0,value:t=>t.valid>1?t.dev/(t.valid-1):void 0,add:(t,e)=>t.dev+=t.mean_d*(e-t.mean),rem:(t,e)=>t.dev-=t.mean_d*(e-t.mean),req:["mean"],idx:1},variancep:{value:t=>t.valid>1?t.dev/t.valid:void 0,req:["variance"],idx:2},stdev:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:t=>t.valid>1?Math.sqrt(t.dev/t.valid):void 0,req:["variance"],idx:2},stderr:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:t=>t.cell.data.distinct(t.get),req:["values"],idx:3},ci0:{value:t=>t.cell.data.ci0(t.get),req:["values"],idx:3},ci1:{value:t=>t.cell.data.ci1(t.get),req:["values"],idx:3},median:{value:t=>t.cell.data.q2(t.get),req:["values"],idx:3},q1:{value:t=>t.cell.data.q1(t.get),req:["values"],idx:3},q3:{value:t=>t.cell.data.q3(t.get),req:["values"],idx:3},min:{init:t=>t.min=void 0,value:t=>t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min,add:(t,e)=>{(e{e<=t.min&&(t.min=NaN)},req:["values"],idx:4},max:{init:t=>t.max=void 0,value:t=>t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max,add:(t,e)=>{(e>t.max||void 0===t.max)&&(t.max=e)},rem:(t,e)=>{e>=t.max&&(t.max=NaN)},req:["values"],idx:4},argmin:{init:t=>t.argmin=void 0,value:t=>t.argmin||t.cell.data.argmin(t.get),add:(t,e,n)=>{e{e<=t.min&&(t.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:t=>t.argmax=void 0,value:t=>t.argmax||t.cell.data.argmax(t.get),add:(t,e,n)=>{e>t.max&&(t.argmax=n)},rem:(t,e)=>{e>=t.max&&(t.argmax=void 0)},req:["max","values"],idx:3}},co=Object.keys(lo);function fo(t,e){return lo[t](e)}function ho(t,e){return t.idx-e.idx}function po(){this.valid=0,this.missing=0,this._ops.forEach((t=>t.init(this)))}function mo(t,e){null!=t&&""!==t?t==t&&(++this.valid,this._ops.forEach((n=>n.add(this,t,e)))):++this.missing}function go(t,e){null!=t&&""!==t?t==t&&(--this.valid,this._ops.forEach((n=>n.rem(this,t,e)))):--this.missing}function yo(t){return this._out.forEach((e=>t[e.out]=e.value(this))),t}function vo(t,e){const n=e||m.yR,r=function(t){const e={};t.forEach((t=>e[t.name]=t));const n=t=>{t.req&&t.req.forEach((t=>{e[t]||n(e[t]=lo[t]())}))};return t.forEach(n),Object.values(e).sort(ho)}(t),i=t.slice().sort(ho);function a(t){this._ops=r,this._out=i,this.cell=t,this.init()}return a.prototype.init=po,a.prototype.add=mo,a.prototype.rem=go,a.prototype.set=yo,a.prototype.get=n,a.fields=t.map((t=>t.out)),a}function xo(t){this._key=t?(0,m.EP)(t):_i,this.reset()}co.forEach((t=>{lo[t]=function(t,e){return n=>(0,m.l7)({name:t,out:n||t},so,e)}(t,lo[t])}));const _o=xo.prototype;function bo(t){Zi.call(this,null,t),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function wo(t){Zi.call(this,null,t)}function ko(t,e,n){const r=t;let i=e||[],a=n||[],o={},u=0;return{add:t=>a.push(t),remove:t=>o[r(t)]=++u,size:()=>i.length,data:(t,e)=>(u&&(i=i.filter((t=>!o[r(t)])),o={},u=0),e&&t&&i.sort(t),a.length&&(i=t?(0,m.TS)(t,i,a.sort(t)):i.concat(a),a=[]),i)}}function Mo(t){Zi.call(this,[],t)}function Ao(t){Ni.call(this,null,Eo,t)}function Eo(t){return this.value&&!t.modified()?this.value:(0,m.qu)(t.fields,t.orders)}function Do(t){Zi.call(this,null,t)}function Co(t){Zi.call(this,null,t)}_o.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},_o.add=function(t){this._add.push(t)},_o.rem=function(t){this._rem.push(t)},_o.values=function(){if(this._get=null,0===this._rem.length)return this._add;const t=this._add,e=this._rem,n=this._key,r=t.length,i=e.length,a=Array(r-i),o={};let u,s,l;for(u=0;u=0;)r=t(e[i])+"",(0,m.nr)(n,r)||(n[r]=1,++a);return a},_o.extent=function(t){if(this._get!==t||!this._ext){const e=this.values(),n=(0,m.dI)(e,t);this._ext=[e[n[0]],e[n[1]]],this._get=t}return this._ext},_o.argmin=function(t){return this.extent(t)[0]||{}},_o.argmax=function(t){return this.extent(t)[1]||{}},_o.min=function(t){const e=this.extent(t)[0];return null!=e?t(e):void 0},_o.max=function(t){const e=this.extent(t)[1];return null!=e?t(e):void 0},_o.quartile=function(t){return this._get===t&&this._q||(this._q=ha(this.values(),t),this._get=t),this._q},_o.q1=function(t){return this.quartile(t)[0]},_o.q2=function(t){return this.quartile(t)[1]},_o.q3=function(t){return this.quartile(t)[2]},_o.ci=function(t){return this._get===t&&this._ci||(this._ci=ya(this.values(),1e3,.05,t),this._get=t),this._ci},_o.ci0=function(t){return this.ci(t)[0]},_o.ci1=function(t){return this.ci(t)[1]},bo.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:co},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},(0,m.XW)(bo,Zi,{transform(t,e){const n=this,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.modified();return n.stamp=r.stamp,n.value&&(i||e.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(t):{},e.visit(e.SOURCE,(t=>n.add(t)))):(n.value=n.value||n.init(t),e.visit(e.REM,(t=>n.rem(t))),e.visit(e.ADD,(t=>n.add(t)))),r.modifies(n._outputs),n._drop=!1!==t.drop,t.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),e.clean()&&n._drop&&r.clean(!0).runAfter((()=>this.clean())),n.changes(r)},cross(){const t=this,e=t.value,n=t._dnames,r=n.map((()=>({}))),i=n.length;function a(t){let e,a,o,u;for(e in t)for(o=t[e].tuple,a=0;a{const e=(0,m.el)(t);return i(t),n.push(e),e})),this.cellkey=t.key?t.key:ao(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const a=t.fields||[null],o=t.ops||["count"],u=t.as||[],s=a.length,l={};let c,f,h,d,p,g;for(s!==o.length&&(0,m.vU)("Unmatched number of fields and aggregate ops."),g=0;gvo(t,t.field))),{}},cellkey:ao(),cell(t,e){let n=this.value[t];return n?0===n.num&&this._drop&&n.stamp{const e=r(t);t[u]=e,t[s]=null==e?null:i+a*(1+(e-i)/a)}:t=>t[u]=r(t)),e.modifies(n?o:u)},_bins(t){if(this.value&&!t.modified())return this.value;const e=t.field,n=pa(t),r=n.step;let i,a,o=n.start,u=o+Math.ceil((n.stop-o)/r)*r;null!=(i=t.anchor)&&(a=i-(o+r*Math.floor((i-o)/r)),o+=a,u+=a);const s=function(t){let n=(0,m.He)(e(t));return null==n?null:nu?1/0:(n=Math.max(o,Math.min(n,u-r)),o+r*Math.floor(1e-14+(n-o)/r))};return s.start=o,s.stop=n.stop,s.step=r,this.value=(0,m.ZE)(s,(0,m.Oj)(e),t.name||"bin_"+(0,m.el)(e))}}),Mo.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},(0,m.XW)(Mo,Zi,{transform(t,e){const n=e.fork(e.ALL),r=ko(_i,this.value,n.materialize(n.ADD).add),i=t.sort,a=e.changed()||i&&(t.modified("sort")||e.modified(i.fields));return n.visit(n.REM,r.remove),this.modified(a),this.value=n.source=r.data(Ei(i),a),e.source&&e.source.root&&(this.value.root=e.source.root),n}}),(0,m.XW)(Ao,Ni),Do.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},(0,m.XW)(Do,Zi,{transform(t,e){const n=e=>n=>{for(var r,i=function(t,e,n){switch(e){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase()}return t.match(n)}(u(n),t.case,a)||[],s=0,l=i.length;si[t]=1+(i[t]||0))),c=n((t=>i[t]-=1));return r?e.visit(e.SOURCE,l):(e.visit(e.ADD,l),e.visit(e.REM,c)),this._finish(e,s)},_parameterCheck(t,e){let n=!1;return!t.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(t.stopwords||"")+"$","i"),n=!0),!t.modified("pattern")&&this._match||(this._match=new RegExp(t.pattern||"[\\w']+","g"),n=!0),(t.modified("field")||e.modified(t.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(t,e){const n=this._counts,r=this._tuples||(this._tuples={}),i=e[0],a=e[1],o=t.fork(t.NO_SOURCE|t.NO_FIELDS);let u,s,l;for(u in n)s=r[u],l=n[u]||0,!s&&l?(r[u]=s=wi({}),s[i]=u,s[a]=l,o.add.push(s)):0===l?(s&&o.rem.push(s),n[u]=null,r[u]=null):s[a]!==l&&(s[a]=l,o.mod.push(s));return o.modifies(e)}}),Co.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},(0,m.XW)(Co,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.as||["a","b"],i=r[0],a=r[1],o=!this.value||e.changed(e.ADD_REM)||t.modified("as")||t.modified("filter");let u=this.value;return o?(u&&(n.rem=u),u=e.materialize(e.SOURCE).source,n.add=this.value=function(t,e,n,r){for(var i,a,o=[],u={},s=t.length,l=0;lSo(t,e)))):"function"==typeof r[n]&&r[n](t[n]);return r}function Bo(t){Zi.call(this,null,t)}const To=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],No={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:To},{name:"weights",type:"number",array:!0}]};function zo(t,e){return t?t.map(((t,n)=>e[n]||(0,m.el)(t))):null}function Oo(t,e,n){const r=[],i=t=>t(s);let a,o,u,s,l,c;if(null==e)r.push(t.map(n));else for(a={},o=0,u=t.length;oe(n,t)),(0,m.Oj)(e),(0,m.el)(e))}function qo(t){Zi.call(this,[void 0,void 0],t)}function Po(t,e){Ni.call(this,t),this.parent=e,this.count=0}function jo(t){Zi.call(this,{},t),this._keys=(0,m.Xr)();const e=this._targets=[];e.active=0,e.forEach=t=>{for(let n=0,r=e.active;n(0,m.EP)(t))):(0,m.EP)(t.name,t.as)}function Xo(t){Zi.call(this,(0,m.Xr)(),t)}function $o(t){Zi.call(this,[],t)}function Ho(t){Zi.call(this,[],t)}function Yo(t){Zi.call(this,null,t)}function Jo(t){Zi.call(this,[],t)}Bo.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:To.concat(No)},{name:"as",type:"string",array:!0,default:["value","density"]}]},(0,m.XW)(Bo,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const r=So(t.distribution,function(t){return()=>t.materialize(t.SOURCE).source}(e)),i=t.steps||t.minsteps||25,a=t.steps||t.maxsteps||200;let o=t.method||"pdf";"pdf"!==o&&"cdf"!==o&&(0,m.vU)("Invalid density method: "+o),t.extent||r.data||(0,m.vU)("Missing density extent parameter."),o=r[o];const u=t.as||["value","density"],s=no(o,t.extent||(0,m.We)(r.data()),i,a).map((t=>{const e={};return e[u[0]]=t[0],e[u[1]]=t[1],wi(e)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=s}return n}}),Ro.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},(0,m.XW)(Ro,Zi,{transform(t,e){if(this.value&&!t.modified()&&!e.changed())return e;const n=e.materialize(e.SOURCE).source,r=Oo(e.source,t.groupby,m.yR),i=t.smooth||!1,a=t.field,o=t.step||((t,e)=>(0,m.yP)((0,m.We)(t,e))/30)(n,a),u=Ei(((t,e)=>a(t)-a(e))),s=t.as||"bin",l=r.length;let c,f=1/0,h=-1/0,d=0;for(;dh&&(h=e),t[++c][s]=e}return this.value={start:f,stop:h,step:o},e.reflow(!0).modifies(s)}}),(0,m.XW)(Uo,Ni),qo.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},(0,m.XW)(qo,Zi,{transform(t,e){const n=this.value,r=t.field,i=e.changed()||e.modified(r.fields)||t.modified("field");let a=n[0],o=n[1];if((i||null==a)&&(a=1/0,o=-1/0),e.visit(i?e.SOURCE:e.ADD,(t=>{const e=(0,m.He)(r(t));null!=e&&(eo&&(o=e))})),!Number.isFinite(a)||!Number.isFinite(o)){let t=(0,m.el)(r);t&&(t=` for field "${t}"`),e.dataflow.warn(`Infinite extent${t}: [${a}, ${o}]`),a=o=void 0}this.value=[a,o]}}),(0,m.XW)(Po,Ni,{connect(t){return this.detachSubflow=t.detachSubflow,this.targets().add(t),t.source=this},add(t){this.count+=1,this.value.add.push(t)},rem(t){this.count-=1,this.value.rem.push(t)},mod(t){this.value.mod.push(t)},init(t){this.value.init(t,t.NO_SOURCE)},evaluate(){return this.value}}),(0,m.XW)(jo,Zi,{activate(t){this._targets[this._targets.active++]=t},subflow(t,e,n,r){const i=this.value;let a,o,u=(0,m.nr)(i,t)&&i[t];return u?u.value.stampt&&t.count>0));this.initTargets(t)}},initTargets(t){const e=this._targets,n=e.length,r=t?t.length:0;let i=0;for(;ithis.subflow(t,i,e);return this._group=t.group||{},this.initTargets(),e.visit(e.REM,(t=>{const e=_i(t),n=a.get(e);void 0!==n&&(a.delete(e),u(n).rem(t))})),e.visit(e.ADD,(t=>{const e=r(t);a.set(_i(t),e),u(e).add(t)})),o||e.modified(r.fields)?e.visit(e.MOD,(t=>{const e=_i(t),n=a.get(e),i=r(t);n===i?u(i).mod(t):(a.set(e,i),u(n).rem(t),u(i).add(t))})):e.changed(e.MOD)&&e.visit(e.MOD,(t=>{u(a.get(_i(t))).mod(t)})),o&&e.visit(e.REFLOW,(t=>{const e=_i(t),n=a.get(e),i=r(t);n!==i&&(a.set(e,i),u(n).rem(t),u(i).add(t))})),e.clean()?n.runAfter((()=>{this.clean(),a.clean()})):a.empty>n.cleanThreshold&&n.runAfter(a.clean),e}}),(0,m.XW)(Io,Ni),Xo.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},(0,m.XW)(Xo,Zi,{transform(t,e){const n=e.dataflow,r=this.value,i=e.fork(),a=i.add,o=i.rem,u=i.mod,s=t.expr;let l=!0;function c(e){const n=_i(e),i=s(e,t),c=r.get(n);i&&c?(r.delete(n),a.push(e)):i||c?l&&i&&!c&&u.push(e):(r.set(n,1),o.push(e))}return e.visit(e.REM,(t=>{const e=_i(t);r.has(e)?r.delete(e):o.push(t)})),e.visit(e.ADD,(e=>{s(e,t)?a.push(e):r.set(_i(e),1)})),e.visit(e.MOD,c),t.modified()&&(l=!1,e.visit(e.REFLOW,c)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i}}),$o.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},(0,m.XW)($o,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.fields,i=zo(r,t.as||[]),a=t.index||null,o=i.length;return n.rem=this.value,e.visit(e.SOURCE,(t=>{const e=r.map((e=>e(t))),u=e.reduce(((t,e)=>Math.max(t,e.length)),0);let s,l,c,f=0;for(;f{for(let e,a=0;ae[r]=n(e,t)))}}),(0,m.XW)(Jo,Zi,{transform(t,e){const n=e.fork(e.ALL),r=t.generator;let i,a,o,u=this.value,s=t.size-u.length;if(s>0){for(i=[];--s>=0;)i.push(o=wi(r(t))),u.push(o);n.add=n.add.length?n.materialize(n.ADD).add.concat(i):i}else a=u.slice(0,-s),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,u=u.slice(-s);return n.source=this.value=u,n}});const Vo={value:"value",median:la,mean:function(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n},min:ra,max:na},Go=[];function Ko(t){Zi.call(this,[],t)}function Zo(t){bo.call(this,t)}function Qo(t){Zi.call(this,null,t)}function tu(t){Ni.call(this,null,eu,t)}function eu(t){return this.value&&!t.modified()?this.value:(0,m.Jy)(t.fields,t.flat)}function nu(t){Zi.call(this,[],t),this._pending=null}function ru(t,e,n){n.forEach(wi);const r=e.fork(e.NO_FIELDS&e.NO_SOURCE);return r.rem=t.value,t.value=r.source=r.add=n,t._pending=null,r.rem.length&&r.clean(!0),r}function iu(t){Zi.call(this,{},t)}function au(t){Ni.call(this,null,ou,t)}function ou(t){if(this.value&&!t.modified())return this.value;const e=t.extents,n=e.length;let r,i,a=1/0,o=-1/0;for(r=0;ro&&(o=i[1]);return[a,o]}function uu(t){Ni.call(this,null,su,t)}function su(t){return this.value&&!t.modified()?this.value:t.values.reduce(((t,e)=>t.concat(e)),[])}function lu(t){Zi.call(this,null,t)}function cu(t){bo.call(this,t)}function fu(t){jo.call(this,t)}function hu(t){Zi.call(this,null,t)}function du(t){Zi.call(this,null,t)}function pu(t){Zi.call(this,null,t)}function mu(t){Zi.call(this,null,t)}function gu(t){Zi.call(this,[],t),this.count=0}function yu(t){Zi.call(this,null,t)}function vu(t){Zi.call(this,null,t),this.modified(!0)}function xu(t){Zi.call(this,null,t)}Ko.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},(0,m.XW)(Ko,Zi,{transform(t,e){var n,r,i,a,o,u,s,l,c,f,h=e.fork(e.ALL),d=function(t){var e,n=t.method||Vo.value;if(null!=Vo[n])return n===Vo.value?(e=void 0!==t.value?t.value:0,()=>e):Vo[n];(0,m.vU)("Unrecognized imputation method: "+n)}(t),p=function(t){const e=t.field;return t=>t?e(t):NaN}(t),g=(0,m.el)(t.field),y=(0,m.el)(t.key),v=(t.groupby||[]).map(m.el),x=function(t,e,n,r){var i,a,o,u,s,l,c,f,h=t=>t(f),d=[],p=r?r.slice():[],m={},g={};for(p.forEach(((t,e)=>m[t]=e+1)),u=0,c=t.length;un.add(t)))):(i=n.value=n.value||this.init(t),e.visit(e.REM,(t=>n.rem(t))),e.visit(e.ADD,(t=>n.add(t)))),n.changes(),e.visit(e.SOURCE,(t=>{(0,m.l7)(t,i[n.cellkey(t)].tuple)})),e.reflow(r).modifies(this._outputs)},changes(){const t=this._adds,e=this._mods;let n,r;for(n=0,r=this._alen;n{const n=Fa(e,o)[u],r=t.counts?e.length:1;no(n,c||(0,m.We)(e),f,h).forEach((t=>{const n={};for(let t=0;t(this._pending=(0,m.IX)(t.data),t=>t.touch(this))))}:n.request(t.url,t.format).then((t=>ru(this,e,(0,m.IX)(t.data))))}}),iu.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},(0,m.XW)(iu,Zi,{transform(t,e){const n=t.fields,r=t.index,i=t.values,a=null==t.default?null:t.default,o=t.modified(),u=n.length;let s,l,c,f=o?e.SOURCE:e.ADD,h=e,d=t.as;return i?(l=i.length,u>1&&!d&&(0,m.vU)('Multi-field lookup requires explicit "as" parameter.'),d&&d.length!==u*l&&(0,m.vU)('The "as" parameter has too few output field names.'),d=d||i.map(m.el),s=function(t){for(var e,o,s=0,c=0;se.modified(t.fields))),f|=c?e.MOD:0),e.visit(f,s),h.modifies(d)}}),(0,m.XW)(au,Ni),(0,m.XW)(uu,Ni),(0,m.XW)(lu,Zi,{transform(t,e){return this.modified(t.modified()),this.value=t,e.fork(e.NO_SOURCE|e.NO_FIELDS)}}),cu.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:co,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},(0,m.XW)(cu,bo,{_transform:bo.prototype.transform,transform(t,e){return this._transform(function(t,e){const n=t.field,r=t.value,i=("count"===t.op?"__count__":t.op)||"sum",a=(0,m.Oj)(n).concat((0,m.Oj)(r)),o=function(t,e,n){const r={},i=[];return n.visit(n.SOURCE,(e=>{const n=t(e);r[n]||(r[n]=1,i.push(n))})),i.sort(m.j2),e?i.slice(0,e):i}(n,t.limit||0,e);return e.changed()&&t.set("__pivot__",null,null,!0),{key:t.key,groupby:t.groupby,ops:o.map((()=>i)),fields:o.map((t=>function(t,e,n,r){return(0,m.ZE)((r=>e(r)===t?n(r):NaN),r,t+"")}(t,n,r,a))),as:o.map((t=>t+"")),modified:t.modified.bind(t)}}(t,e),e)}}),(0,m.XW)(fu,jo,{transform(t,e){const n=t.subflow,r=t.field,i=t=>this.subflow(_i(t),n,e,t);return(t.modified("field")||r&&e.modified((0,m.Oj)(r)))&&(0,m.vU)("PreFacet does not support field modification."),this.initTargets(),r?(e.visit(e.MOD,(t=>{const e=i(t);r(t).forEach((t=>e.mod(t)))})),e.visit(e.ADD,(t=>{const e=i(t);r(t).forEach((t=>e.add(wi(t))))})),e.visit(e.REM,(t=>{const e=i(t);r(t).forEach((t=>e.rem(t)))}))):(e.visit(e.MOD,(t=>i(t).mod(t))),e.visit(e.ADD,(t=>i(t).add(t))),e.visit(e.REM,(t=>i(t).rem(t)))),e.clean()&&e.runAfter((()=>this.clean())),e}}),hu.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},(0,m.XW)(hu,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.fields,i=zo(t.fields,t.as||[]),a=r?(t,e)=>function(t,e,n,r){for(let i=0,a=n.length;i{const e=_i(t);n.rem.push(o[e]),o[e]=null})),e.visit(e.ADD,(t=>{const e=a(t,wi({}));o[_i(t)]=e,n.add.push(e)})),e.visit(e.MOD,(t=>{n.mod.push(a(t,o[_i(t)]))})),n}}),(0,m.XW)(du,Zi,{transform(t,e){return this.value=t.value,t.modified("value")?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}}),pu.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},(0,m.XW)(pu,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=t.as||["prob","value"];if(this.value&&!t.modified()&&!e.changed())return n.source=this.value,n;const i=Oo(e.materialize(e.SOURCE).source,t.groupby,t.field),a=(t.groupby||[]).map(m.el),o=[],u=t.step||.01,s=t.probs||io(u/2,1-1e-14,u),l=s.length;return i.forEach((t=>{const e=fa(t,s);for(let n=0;n{const e=_i(t);n.rem.push(r[e]),r[e]=null})),e.visit(e.ADD,(t=>{const e=ki(t);r[_i(t)]=e,n.add.push(e)})),e.visit(e.MOD,(t=>{const e=r[_i(t)];for(const r in t)e[r]=t[r],n.modifies(r);n.mod.push(e)}))),n}}),gu.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},(0,m.XW)(gu,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.modified("size"),i=t.size,a=this.value.reduce(((t,e)=>(t[_i(e)]=1,t)),{});let o=this.value,u=this.count,s=0;function l(t){let e,r;o.length=s&&(e=o[r],a[_i(e)]&&n.rem.push(e),o[r]=t)),++u}if(e.rem.length&&(e.visit(e.REM,(t=>{const e=_i(t);a[e]&&(a[e]=-1,n.rem.push(t)),--u})),o=o.filter((t=>-1!==a[_i(t)]))),(e.rem.length||r)&&o.length{a[_i(t)]||l(t)})),s=-1),r&&o.length>i){const t=o.length-i;for(let e=0;e{a[_i(t)]&&n.mod.push(t)})),e.add.length&&e.visit(e.ADD,l),(e.add.length||s<0)&&(n.add=o.filter((t=>!a[_i(t)]))),this.count=u,this.value=n.source=o,n}}),yu.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},(0,m.XW)(yu,Zi,{transform(t,e){if(this.value&&!t.modified())return;const n=e.materialize().fork(e.MOD),r=t.as||"data";return n.rem=this.value?e.rem.concat(this.value):e.rem,this.value=io(t.start,t.stop,t.step||1).map((t=>{const e={};return e[r]=t,wi(e)})),n.add=e.add.concat(this.value),n}}),(0,m.XW)(vu,Zi,{transform(t,e){return this.value=e.source,e.changed()?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}});const _u=["unit0","unit1"];function bu(t){Zi.call(this,(0,m.Xr)(),t)}function wu(t){Zi.call(this,null,t)}xu.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:Be,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:_u}]},(0,m.XW)(xu,Zi,{transform(t,e){const n=t.field,r=!1!==t.interval,i="utc"===t.timezone,a=this._floor(t,e),o=(i?sn:un)(a.unit).offset,u=t.as||_u,s=u[0],l=u[1],c=a.step;let f=a.start||1/0,h=a.stop||-1/0,d=e.ADD;return(t.modified()||e.modified((0,m.Oj)(n)))&&(d=(e=e.reflow(!0)).SOURCE,f=1/0,h=-1/0),e.visit(d,(t=>{const e=n(t);let i,u;null==e?(t[s]=null,r&&(t[l]=null)):(t[s]=i=u=a(e),r&&(t[l]=u=o(i,c)),ih&&(h=u))})),a.start=f,a.stop=h,e.modifies(r?u:s)},_floor(t,e){const n="utc"===t.timezone,{units:r,step:i}=t.units?{units:t.units,step:t.step||1}:Mn({extent:t.extent||(0,m.We)(e.materialize(e.SOURCE).source,t.field),maxbins:t.maxbins}),a=Ne(r),o=this.value||{},u=(n?rn:tn)(a,i);return u.unit=(0,m.fj)(a),u.units=a,u.step=i,u.start=o.start,u.stop=o.stop,this.value=u}}),(0,m.XW)(bu,Zi,{transform(t,e){const n=e.dataflow,r=t.field,i=this.value,a=t=>i.set(r(t),t);let o=!0;return t.modified("field")||e.modified(r.fields)?(i.clear(),e.visit(e.SOURCE,a)):e.changed()?(e.visit(e.REM,(t=>i.delete(r(t)))),e.visit(e.ADD,a)):o=!1,this.modified(o),i.empty>n.cleanThreshold&&n.runAfter(i.clean),e.fork()}}),(0,m.XW)(wu,Zi,{transform(t,e){(!this.value||t.modified("field")||t.modified("sort")||e.changed()||t.sort&&e.modified(t.sort.fields))&&(this.value=(t.sort?e.source.slice().sort(Ei(t.sort)):e.source).map(t.field))}});const ku={row_number:function(){return{next:t=>t.index+1}},rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,r=e.data;return n&&e.compare(r[n-1],r[n])?t=n+1:t}}},dense_rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,r=e.data;return n&&e.compare(r[n-1],r[n])?++t:t}}},percent_rank:function(){const t=ku.rank(),e=t.next;return{init:t.init,next:t=>(e(t)-1)/(t.data.length-1)}},cume_dist:function(){let t;return{init:()=>t=0,next:e=>{const n=e.data,r=e.compare;let i=e.index;if(t0||(0,m.vU)("ntile num must be greater than zero.");const n=ku.cume_dist(),r=n.next;return{init:n.init,next:t=>Math.ceil(e*r(t))}},lag:function(t,e){return e=+e||1,{next:n=>{const r=n.index-e;return r>=0?t(n.data[r]):null}}},lead:function(t,e){return e=+e||1,{next:n=>{const r=n.index+e,i=n.data;return rt(e.data[e.i0])}},last_value:function(t){return{next:e=>t(e.data[e.i1-1])}},nth_value:function(t,e){return(e=+e)>0||(0,m.vU)("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(e-1);return re=null,next:n=>{const r=t(n.data[n.index]);return null!=r?e=r:e}}},next_value:function(t){let e,n;return{init:()=>(e=null,n=-1),next:r=>{const i=r.data;return r.index<=n?e:(n=function(t,e,n){for(let r=e.length;nu[t]=1))}h(t.sort),e.forEach(((t,e)=>{const u=n[e],d=(0,m.el)(u),p=oo(t,d,i[e]);if(h(u),a.push(p),(0,m.nr)(ku,t))o.push(function(t,e,n,r){const i=ku[t](e,n);return{init:i.init||m.bM,update:function(t,e){e[r]=i.next(t)}}}(t,n[e],r[e],p));else{if(null==u&&"count"!==t&&(0,m.vU)("Null aggregate field specified."),"count"===t)return void l.push(p);f=!1;let e=s[d];e||(e=s[d]=[],e.field=u,c.push(e)),e.push(fo(t,p))}})),(l.length||c.length)&&(this.cell=function(t,e,n){t=t.map((t=>vo(t,t.field)));const r={num:0,agg:null,store:!1,count:e};if(!n)for(var i=t.length,a=r.agg=Array(i),o=0;o0&&!i(a[n],a[n-1])&&(t.i0=e.left(a,a[n])),rt.init())),this.cell&&this.cell.init()},Eu.update=function(t,e){const n=this.cell,r=this.windows,i=t.data,a=r&&r.length;let o;if(n){for(o=t.p0;othis.group(i(t));let o=this.state;o&&!n||(o=this.state=new Au(t)),n||e.modified(o.inputs)?(this.value={},e.visit(e.SOURCE,(t=>a(t).add(t)))):(e.visit(e.REM,(t=>a(t).remove(t))),e.visit(e.ADD,(t=>a(t).add(t))));for(let e=0,n=this._mlen;e0)for(var r,i=t[0],a=e[0],o=t[n]-i,u=e[n]-a,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*o),this._beta*e[s]+(1-this._beta)*(a+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Uu=function t(e){function n(t){return 1===e?new Tu(t):new Ru(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Lu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function qu(t,e){this._context=t,this._k=(1-e)/6}qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Lu(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Lu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Pu=function t(e){function n(t){return new qu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ju(t,e){this._context=t,this._k=(1-e)/6}ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Lu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Iu=function t(e){function n(t){return new ju(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Wu(t,e){this._context=t,this._k=(1-e)/6}Wu.prototype={areaStart:Nu,areaEnd:Nu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Lu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Xu=function t(e){function n(t){return new Wu(t,e)}return n.tension=function(e){return t(+e)},n}(0);var $u=Math.abs,Hu=Math.atan2,Yu=Math.cos,Ju=Math.max,Vu=Math.min,Gu=Math.sin,Ku=Math.sqrt,Zu=1e-12,Qu=Math.PI,ts=Qu/2,es=2*Qu;function ns(t){return t>1?0:t<-1?Qu:Math.acos(t)}function rs(t){return t>=1?ts:t<=-1?-ts:Math.asin(t)}function is(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Zu){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>Zu){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function as(t,e){this._context=t,this._alpha=e}as.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:is(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const os=function t(e){function n(t){return e?new as(t,e):new qu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function us(t,e){this._context=t,this._alpha=e}us.prototype={areaStart:Nu,areaEnd:Nu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:is(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ss=function t(e){function n(t){return e?new us(t,e):new Wu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ls(t,e){this._context=t,this._alpha=e}ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:is(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const cs=function t(e){function n(t){return e?new ls(t,e):new ju(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fs(t){this._context=t}function hs(t){return new fs(t)}function ds(t){this._context=t}function ps(t){return t<0?-1:1}function ms(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),u=(a*i+o*r)/(r+i);return(ps(a)+ps(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function gs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ys(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,u=(a-r)/3;t._context.bezierCurveTo(r+u,i+u*e,a-u,o-u*n,a,o)}function vs(t){this._context=t}function xs(t){this._context=new _s(t)}function _s(t){this._context=t}function bs(t){this._context=t}function ws(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};const Ms=Math.PI,As=2*Ms,Es=1e-6,Ds=As-Es;function Cs(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Fs(){return new Cs}Cs.prototype=Fs.prototype={constructor:Cs,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,u=n-t,s=r-e,l=a-t,c=o-e,f=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>Es)if(Math.abs(c*u-s*l)>Es&&i){var h=n-a,d=r-o,p=u*u+s*s,m=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(f),v=i*Math.tan((Ms-Math.acos((p+f-m)/(2*g*y)))/2),x=v/y,_=v/g;Math.abs(x-1)>Es&&(this._+="L"+(t+x*l)+","+(e+x*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>l*d)+","+(this._x1=t+_*u)+","+(this._y1=e+_*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),u=n*Math.sin(r),s=t+o,l=e+u,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+l:(Math.abs(this._x1-s)>Es||Math.abs(this._y1-l)>Es)&&(this._+="L"+s+","+l),n&&(f<0&&(f=f%As+As),f>Ds?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-u)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=l):f>Es&&(this._+="A"+n+","+n+",0,"+ +(f>=Ms)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Ss=Fs;function Bs(t){return function(){return t}}function Ts(t){return t.innerRadius}function Ns(t){return t.outerRadius}function zs(t){return t.startAngle}function Os(t){return t.endAngle}function Rs(t){return t&&t.padAngle}function Us(t,e,n,r,i,a,o,u){var s=n-t,l=r-e,c=o-i,f=u-a,h=f*s-c*l;if(!(h*hS*S+B*B&&(M=E,A=D),{cx:M,cy:A,x01:-c,y01:-f,x11:M*(i/b-1),y11:A*(i/b-1)}}function qs(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ps(t){return t[0]}function js(t){return t[1]}function Is(t,e){var n=Bs(!0),r=null,i=hs,a=null;function o(o){var u,s,l,c=(o=qs(o)).length,f=!1;for(null==r&&(a=i(l=Ss())),u=0;u<=c;++u)!(u=c;--f)u.point(g[f],y[f]);u.lineEnd(),u.areaEnd()}m&&(g[l]=+t(h,l,s),y[l]=+e(h,l,s),u.point(r?+r(h,l,s):g[l],n?+n(h,l,s):y[l]))}if(d)return u=null,d+""||null}function l(){return Is().defined(i).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Ps:Bs(+t),e="function"==typeof e?e:Bs(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?js:Bs(+n),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),r=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),s):t},s.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Bs(+t),s):r},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Bs(+t),n=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:Bs(+t),s):e},s.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Bs(+t),s):n},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(n)},s.lineX1=function(){return l().x(r).y(e)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:Bs(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=a&&(u=o(a)),s):o},s.context=function(t){return arguments.length?(null==t?a=u=null:u=o(a=t),s):a},s}Array.prototype.slice;const Xs={draw:function(t,e){var n=Math.sqrt(e/Qu);t.moveTo(n,0),t.arc(0,0,n,0,es)}};Math.sqrt(1/3);Math.sin(Qu/10),Math.sin(7*Qu/10);function $s(t,e){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=t,n.height=e,n}return null}Math.sin(es/10),Math.cos(es/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);const Hs=()=>"undefined"!=typeof Image?Image:null,Ys=xe(ve),Js=Ys.right,Vs=Ys.left,Gs=(xe(oa).center,Js);function Ks(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Zs(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const Qs=Symbol("implicit");function tl(){var t=new Map,e=[],n=[],r=Qs;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Qs)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;for(const r of n){const n=r+"";t.has(n)||t.set(n,e.push(r))}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return tl(e,n).unknown(r)},Ks.apply(i,arguments),i}function el(t,e,n,r){var i,a=at(t,e,n);switch((r=st(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ht(a,o))||(r.precision=i),_t(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=dt(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=pt(a))||(r.precision=i-2*("%"===r.type))}return xt(r)}function nl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rl(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function il(){}var al=.7,ol=1/al,ul="\\s*([+-]?\\d+)\\s*",sl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ll="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cl=/^#([0-9a-f]{3,8})$/,fl=new RegExp("^rgb\\("+[ul,ul,ul]+"\\)$"),hl=new RegExp("^rgb\\("+[ll,ll,ll]+"\\)$"),dl=new RegExp("^rgba\\("+[ul,ul,ul,sl]+"\\)$"),pl=new RegExp("^rgba\\("+[ll,ll,ll,sl]+"\\)$"),ml=new RegExp("^hsl\\("+[sl,ll,ll]+"\\)$"),gl=new RegExp("^hsla\\("+[sl,ll,ll,sl]+"\\)$"),yl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function vl(){return this.rgb().formatHex()}function xl(){return this.rgb().formatRgb()}function _l(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cl.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?bl(e):3===n?new Al(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?wl(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?wl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=fl.exec(t))?new Al(e[1],e[2],e[3],1):(e=hl.exec(t))?new Al(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dl.exec(t))?wl(e[1],e[2],e[3],e[4]):(e=pl.exec(t))?wl(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ml.exec(t))?Fl(e[1],e[2]/100,e[3]/100,1):(e=gl.exec(t))?Fl(e[1],e[2]/100,e[3]/100,e[4]):yl.hasOwnProperty(t)?bl(yl[t]):"transparent"===t?new Al(NaN,NaN,NaN,0):null}function bl(t){return new Al(t>>16&255,t>>8&255,255&t,1)}function wl(t,e,n,r){return r<=0&&(t=e=n=NaN),new Al(t,e,n,r)}function kl(t){return t instanceof il||(t=_l(t)),t?new Al((t=t.rgb()).r,t.g,t.b,t.opacity):new Al}function Ml(t,e,n,r){return 1===arguments.length?kl(t):new Al(t,e,n,null==r?1:r)}function Al(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function El(){return"#"+Cl(this.r)+Cl(this.g)+Cl(this.b)}function Dl(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Cl(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Fl(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Tl(t,e,n,r)}function Sl(t){if(t instanceof Tl)return new Tl(t.h,t.s,t.l,t.opacity);if(t instanceof il||(t=_l(t)),!t)return new Tl;if(t instanceof Tl)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=e===a?(n-r)/u+6*(n0&&s<1?0:o,new Tl(o,u,s,t.opacity)}function Bl(t,e,n,r){return 1===arguments.length?Sl(t):new Tl(t,e,n,null==r?1:r)}function Tl(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Nl(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function zl(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Ol(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=r=240?t-240:t+120,i,r),Nl(t,i,r),Nl(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Ul=t=>()=>t;function Ll(t,e){return function(n){return t+n*e}}function ql(t,e){var n=e-t;return n?Ll(t,n>180||n<-180?n-360*Math.round(n/360):n):Ul(isNaN(t)?e:t)}function Pl(t,e){var n=e-t;return n?Ll(t,n):Ul(isNaN(t)?e:t)}const jl=function t(e){var n=function(t){return 1==(t=+t)?Pl:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ul(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Ml(t)).r,(e=Ml(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Pl(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Il(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),u=new Array(i);for(n=0;na&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:Gl(n,r)})),a=Ql.lastIndex;return ae&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?sc:uc,i=a=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),u,s)))(t(l(e)))}return f.invert=function(n){return l(e((a||(a=r(u,o.map(t),Gl)))(n)))},f.domain=function(t){return arguments.length?(o=Array.from(t,rc),c()):o.slice()},f.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},f.rangeRound=function(t){return u=Array.from(t),s=nc,c()},f.clamp=function(t){return arguments.length?(l=!!t||ac,c()):l!==ac},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function fc(){return cc()(ac,ac)}function hc(t){var e=t.domain;return t.ticks=function(t){var n=e();return rt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return el(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,u=a.length-1,s=a[o],l=a[u],c=10;for(l0;){if((i=it(s,l,n))===r)return a[o]=s,a[u]=l,e(a);if(i>0)s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function dc(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;h<=d;++h)for(c=1,l=n(h);cs)break;m.push(f)}}else for(;h<=d;++h)for(c=a-1,l=n(h);c>=1;--c)if(!((f=l*c)s)break;m.push(f)}2*m.length180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Gl(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,u,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Gl(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,u,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:Gl(t,n)},{i:u-2,x:Gl(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,s),a=o=null,function(t){for(var e,n=-1,r=s.length;++n.008856451679035631?Math.pow(t,1/3):t/uf+af}function hf(t){return t>of?t*t*t:uf*(t-af)}function df(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function pf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mf(t){if(t instanceof yf)return new yf(t.h,t.c,t.l,t.opacity);if(t instanceof cf||(t=sf(t)),0===t.a&&0===t.b)return new yf(NaN,00?r:1:0}const qf="linear",Pf="log",jf="pow",If="sqrt",Wf="symlog",Xf="time",$f="utc",Hf="sequential",Yf="diverging",Jf="quantile",Vf="quantize",Gf="threshold",Kf="ordinal",Zf="point",Qf="band",th="bin-ordinal",eh="continuous",nh="discrete",rh="discretizing",ih="interpolating",ah="temporal";function oh(){const t=tl().unknown(void 0),e=t.domain,n=t.range;let r,i,a=[0,1],o=!1,u=0,s=0,l=.5;function c(){const t=e().length,c=a[1]d+r*t));return n(c?p.reverse():p)}return delete t.unknown,t.domain=function(t){return arguments.length?(e(t),c()):e()},t.range=function(t){return arguments.length?(a=[+t[0],+t[1]],c()):a.slice()},t.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,c()},t.bandwidth=function(){return i},t.step=function(){return r},t.round=function(t){return arguments.length?(o=!!t,c()):o},t.padding=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),u=s,c()):u},t.paddingInner=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),c()):u},t.paddingOuter=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),c()):s},t.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},t.invertRange=function(t){if(null==t[0]||null==t[1])return;const r=a[1]a[1-r])?void 0:(s=Math.max(0,Js(o,f)-1),l=f===h?s:Js(o,h)-1,f-o[s]>i+1e-10&&++s,r&&(c=s,s=u-l,l=u-c),s>l?void 0:e().slice(s,l+1))},t.invert=function(e){const n=t.invertRange([e,e]);return n?n[0]:n},t.copy=function(){return oh().domain(e()).range(a).round(o).paddingInner(u).paddingOuter(s).align(l)},c()}function uh(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return uh(e())},t}var sh=Array.prototype.map;function lh(t){return sh.call(t,m.He)}const ch=Array.prototype.slice,fh={};function hh(t,e,n){const r=function(){const n=e();return n.invertRange||(n.invertRange=n.invert?(r=n,function(t){let e,n=t[0],i=t[1];return i=u&&n[a]<=s&&(l<0&&(l=a),r=a);if(!(l<0))return u=t.invertExtent(n[l]),s=t.invertExtent(n[r]),[void 0===u[0]?u[1]:u[0],void 0===s[1]?s[0]:s[1]]}}(n):void 0),n.type=t,n;var r};return r.metadata=(0,m.Rg)((0,m.IX)(n)),r}function dh(t,e,n){return arguments.length>1?(fh[t]=hh(t,e,n),this):ph(t)?fh[t]:void 0}function ph(t){return(0,m.nr)(fh,t)}function mh(t,e){const n=fh[t];return n&&n.metadata[e]}function gh(t){return mh(t,eh)}function yh(t){return mh(t,nh)}function vh(t){return mh(t,rh)}function xh(t){return mh(t,Pf)}function _h(t){return mh(t,ih)}function bh(t){return mh(t,Jf)}dh("identity",(function t(e){var n;function r(t){return null==t||isNaN(t=+t)?n:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=Array.from(t,rc),r):e.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(e).unknown(n)},e=arguments.length?Array.from(e,rc):[0,1],hc(r)})),dh(qf,(function t(){var e=fc();return e.copy=function(){return lc(e,t())},Ks.apply(e,arguments),hc(e)}),eh),dh(Pf,(function t(){var e=_c(cc()).domain([1,10]);return e.copy=function(){return lc(e,t()).base(e.base())},Ks.apply(e,arguments),e}),[eh,Pf]),dh(jf,Ac,eh),dh(If,(function(){return Ac.apply(null,arguments).exponent(.5)}),eh),dh(Wf,(function t(){var e=Cc(cc());return e.copy=function(){return lc(e,t()).constant(e.constant())},Ks.apply(e,arguments)}),eh),dh(Xf,(function(){return Ks.apply(Tc(Qt,ee,Ot,Nt,re,ae,ue,le,Sn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[eh,ah]),dh($f,(function(){return Ks.apply(Tc(fe,de,$t,Wt,me,ye,ue,le,Tn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[eh,ah]),dh(Hf,Oc,[eh,ih]),dh("".concat(Hf,"-").concat(qf),Oc,[eh,ih]),dh("".concat(Hf,"-").concat(Pf),(function t(){var e=_c(Nc()).domain([1,10]);return e.copy=function(){return zc(e,t()).base(e.base())},Zs.apply(e,arguments)}),[eh,ih,Pf]),dh("".concat(Hf,"-").concat(jf),Rc,[eh,ih]),dh("".concat(Hf,"-").concat(If),(function(){return Rc.apply(null,arguments).exponent(.5)}),[eh,ih]),dh("".concat(Hf,"-").concat(Wf),(function t(){var e=Cc(Nc());return e.copy=function(){return zc(e,t()).constant(e.constant())},Zs.apply(e,arguments)}),[eh,ih]),dh("".concat(Yf,"-").concat(qf),(function t(){var e=hc(Lc()(ac));return e.copy=function(){return zc(e,t())},Zs.apply(e,arguments)}),[eh,ih]),dh("".concat(Yf,"-").concat(Pf),(function t(){var e=_c(Lc()).domain([.1,1,10]);return e.copy=function(){return zc(e,t()).base(e.base())},Zs.apply(e,arguments)}),[eh,ih,Pf]),dh("".concat(Yf,"-").concat(jf),qc,[eh,ih]),dh("".concat(Yf,"-").concat(If),(function(){return qc.apply(null,arguments).exponent(.5)}),[eh,ih]),dh("".concat(Yf,"-").concat(Wf),(function t(){var e=Cc(Lc());return e.copy=function(){return zc(e,t()).constant(e.constant())},Zs.apply(e,arguments)}),[eh,ih]),dh(Jf,(function t(){var e,n=[],r=[],i=[];function a(){var t=0,e=Math.max(1,r.length);for(i=new Array(e-1);++t0?i[e-1]:n[0],e=i?[a[i-1],r]:[a[e-1],a[e]]},u.unknown=function(t){return arguments.length?(e=t,u):u},u.thresholds=function(){return a.slice()},u.copy=function(){return t().domain([n,r]).range(o).unknown(e)},Ks.apply(hc(u),arguments)}),rh),dh(Gf,(function t(){var e,n=[.5],r=[0,1],i=1;function a(t){return null!=t&&t<=t?r[Gs(n,t,0,i)]:e}return a.domain=function(t){return arguments.length?(n=Array.from(t),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(n).range(r).unknown(e)},Ks.apply(a,arguments)}),rh),dh(th,(function t(){let e=[],n=[];function r(t){return null==t||t!=t?void 0:n[(Gs(e,t)-1)%n.length]}return r.domain=function(t){return arguments.length?(e=lh(t),r):e.slice()},r.range=function(t){return arguments.length?(n=ch.call(t),r):n.slice()},r.tickFormat=function(t,n){return el(e[0],(0,m.fj)(e),null==t?10:t,n)},r.copy=function(){return t().domain(r.domain()).range(r.range())},r}),[nh,rh]),dh(Kf,tl,nh),dh(Qf,oh,nh),dh(Zf,(function(){return uh(oh().paddingInner(1))}),nh);const wh=["clamp","base","constant","exponent"];function kh(t,e){const n=e[0],r=(0,m.fj)(e)-n;return function(e){return t(n+e*r)}}function Mh(t,e,n){return Uc(Dh(e||"rgb",n),t)}function Ah(t,e){const n=new Array(e),r=e+1;for(let i=0;it[e]?o[e](t[e]()):0)),o):(0,m.a9)(.5)}function Dh(t,e){const n=i[function(t){return"interpolate"+t.toLowerCase().split("-").map((t=>t[0].toUpperCase()+t.slice(1))).join("")}(t)];return null!=e&&n&&n.gamma?n.gamma(e):n}function Ch(t){const e=t.length/6|0,n=new Array(e);for(let r=0;r1?(Sh[t]=e,this):Sh[t]}Fh({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},Ch),Fh({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(t=>Mh(Ch(t))));const Th="symbol",Nh=t=>(0,m.kJ)(t)?t.map((t=>String(t))):String(t),zh=(t,e)=>t[1]-e[1],Oh=(t,e)=>e[1]-t[1];function Rh(t,e,n){let r;return(0,m.hj)(e)&&(t.bins&&(e=Math.max(e,t.bins.length)),null!=n&&(e=Math.min(e,Math.floor((0,m.yP)(t.domain())/n||1)))),(0,m.Kn)(e)&&(r=e.step,e=e.interval),(0,m.HD)(e)&&(e=t.type===Xf?un(e):t.type==$f?sn(e):(0,m.vU)("Only time and utc scales accept interval strings."),r&&(e=e.every(r))),e}function Uh(t,e,n){let r=t.range(),i=r[0],a=(0,m.fj)(r),o=zh;if(i>a&&(r=a,a=i,i=r,o=Oh),i=Math.floor(i),a=Math.ceil(a),e=e.map((e=>[e,t(e)])).filter((t=>i<=t[1]&&t[1]<=a)).sort(o).map((t=>t[0])),n>0&&e.length>1){const t=[e[0],(0,m.fj)(e)];for(;e.length>n&&e.length>=3;)e=e.filter(((t,e)=>!(e%2)));e.length<3&&(e=t)}return e}function Lh(t,e){return t.bins?Uh(t,t.bins):t.ticks?t.ticks(e):t.domain()}function qh(t,e,n,r,i,a){const o=e.type;let u=Nh;if(o===Xf||i===Xf)u=t.timeFormat(r);else if(o===$f||i===$f)u=t.utcFormat(r);else if(xh(o)){const i=t.formatFloat(r);if(a||e.bins)u=i;else{const t=Ph(e,n,!1);u=e=>t(e)?i(e):""}}else if(e.tickFormat){const i=e.domain();u=t.formatSpan(i[0],i[i.length-1],n,r)}else r&&(u=t.format(r));return u}function Ph(t,e,n){const r=Lh(t,e),i=t.base(),a=Math.log(i),o=Math.max(1,i*e/r.length),u=t=>{let e=t/Math.pow(i,Math.round(Math.log(t)/a));return e*i1?r[1]-r[0]:r[0];for(a=1;ajh[t.type]||t.bins)(e)?$h(u):"discrete"===r?Yh(u):Jh(u)}const $h=t=>(e,n,r)=>{const i=Hh(r[n+1],Hh(r.max,1/0)),a=Vh(e,t),o=Vh(i,t);return a&&o?a+" – "+o:o?"< "+o:"≥ "+a},Hh=(t,e)=>null!=t?t:e,Yh=t=>(e,n)=>n?t(e):null,Jh=t=>e=>t(e),Vh=(t,e)=>Number.isFinite(t)?e(t):null;function Gh(t,e,n){n=n||{};const r=Math.max(3,n.maxlen||7),i=function(t,e,n,r){const i=r||e.type;return(0,m.HD)(n)&&mh(i,ah)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||i!==Xf?n||i!==$f?Xh(t,e,5,null,n,r,!0):t.utcFormat("%A, %d %B %Y, %X UTC"):t.timeFormat("%A, %d %B %Y, %X")}(t,e,n.format,n.formatType);if(vh(e.type)){const t=Wh(e).slice(1).map(i),n=t.length;return"".concat(n," boundar").concat(1===n?"y":"ies",": ").concat(t.join(", "))}if(yh(e.type)){const t=e.domain(),n=t.length,a=n>r?t.slice(0,r-2).map(i).join(", ")+", ending with "+t.slice(-1).map(i):t.map(i).join(", ");return"".concat(n," value").concat(1===n?"":"s",": ").concat(a)}{const t=e.domain();return"values from ".concat(i(t[0])," to ").concat(i((0,m.fj)(t)))}}let Kh=0;const Zh="p_";function Qh(t){return t&&t.gradient}function td(t,e,n){const r=t.gradient;let i=t.id,a="radial"===r?Zh:"";return i||(i=t.id="gradient_"+Kh++,"radial"===r?(t.x1=ed(t.x1,.5),t.y1=ed(t.y1,.5),t.r1=ed(t.r1,0),t.x2=ed(t.x2,.5),t.y2=ed(t.y2,.5),t.r2=ed(t.r2,.5),a=Zh):(t.x1=ed(t.x1,0),t.y1=ed(t.y1,0),t.x2=ed(t.x2,1),t.y2=ed(t.y2,0))),e[i]=t,"url("+(n||"")+"#"+a+i+")"}function ed(t,e){return null!=t?t:e}function nd(t,e){var n,r=[];return n={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:r,stop:function(t,e){return r.push({offset:t,color:e}),n}}}const rd={basis:{curve:function(t){return new Tu(t)}},"basis-closed":{curve:function(t){return new zu(t)}},"basis-open":{curve:function(t){return new Ou(t)}},bundle:{curve:Uu,tension:"beta",value:.85},cardinal:{curve:Pu,tension:"tension",value:0},"cardinal-open":{curve:Iu,tension:"tension",value:0},"cardinal-closed":{curve:Xu,tension:"tension",value:0},"catmull-rom":{curve:os,tension:"alpha",value:.5},"catmull-rom-closed":{curve:ss,tension:"alpha",value:.5},"catmull-rom-open":{curve:cs,tension:"alpha",value:.5},linear:{curve:hs},"linear-closed":{curve:function(t){return new ds(t)}},monotone:{horizontal:function(t){return new xs(t)},vertical:function(t){return new vs(t)}},natural:{curve:function(t){return new bs(t)}},step:{curve:function(t){return new ks(t,.5)}},"step-after":{curve:function(t){return new ks(t,1)}},"step-before":{curve:function(t){return new ks(t,0)}}};function id(t,e,n){var r=(0,m.nr)(rd,t)&&rd[t],i=null;return r&&(i=r.curve||r[e||"vertical"],r.tension&&null!=n&&(i=i[r.tension](n))),i}const ad={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},od=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\.\d+)(\.\d)/g,/(\d)([-+])/g,/\s|,|###/];function ud(t){const e=[];let n,r,i,a,o,u,s,l,c,f;const h=t.slice().replace(od[0],"###$1").split(od[1]).slice(1);for(s=0,c=h.length;su){const t=i.length;for(l=1,e.push([o].concat(i.slice(l,l+=u))),o="M"===o?"L":"m"===o?"l":o;l1&&(m=Math.sqrt(m),n*=m,r*=m);const g=h/n,y=f/n,v=-f/r,x=h/r,_=g*u+y*s,b=v*u+x*s,w=g*t+y*e,k=v*t+x*e;let M=1/((w-_)*(w-_)+(k-b)*(k-b))-.25;M<0&&(M=0);let A=Math.sqrt(M);a==i&&(A=-A);const E=.5*(_+w)-A*(k-b),D=.5*(b+k)+A*(w-_),C=Math.atan2(b-D,_-E);let F=Math.atan2(k-D,w-E)-C;F<0&&1===a?F+=cd:F>0&&0===a&&(F-=cd);const S=Math.ceil(Math.abs(F/(ld+.001))),B=[];for(let t=0;t+t}function Sd(t,e,n){return Math.max(e,Math.min(t,n))}function Bd(){var t=Ad,e=Ed,n=Dd,r=Cd,i=Fd(0),a=i,o=i,u=i,s=null;function l(l,c,f){var h,d=null!=c?c:+t.call(this,l),p=null!=f?f:+e.call(this,l),m=+n.call(this,l),g=+r.call(this,l),y=Math.min(m,g)/2,v=Sd(+i.call(this,l),0,y),x=Sd(+a.call(this,l),0,y),_=Sd(+o.call(this,l),0,y),b=Sd(+u.call(this,l),0,y);if(s||(s=h=Ss()),v<=0&&x<=0&&_<=0&&b<=0)s.rect(d,p,m,g);else{var w=d+m,k=p+g;s.moveTo(d+v,p),s.lineTo(w-x,p),s.bezierCurveTo(w-Md*x,p,w,p+Md*x,w,p+x),s.lineTo(w,k-b),s.bezierCurveTo(w,k-Md*b,w-Md*b,k,w-b,k),s.lineTo(d+_,k),s.bezierCurveTo(d+Md*_,k,d,k-Md*_,d,k-_),s.lineTo(d,p+v),s.bezierCurveTo(d,p+Md*v,d+Md*v,p,d+v,p),s.closePath()}if(h)return s=null,h+""||null}return l.x=function(e){return arguments.length?(t=Fd(e),l):t},l.y=function(t){return arguments.length?(e=Fd(t),l):e},l.width=function(t){return arguments.length?(n=Fd(t),l):n},l.height=function(t){return arguments.length?(r=Fd(t),l):r},l.cornerRadius=function(t,e,n,r){return arguments.length?(i=Fd(t),a=null!=e?Fd(e):i,u=null!=n?Fd(n):i,o=null!=r?Fd(r):a,l):i},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function Td(){var t,e,n,r,i,a,o,u,s=null;function l(t,e,n){const r=n/2;if(i){var l=o-e,c=t-a;if(l||c){var f=Math.sqrt(l*l+c*c),h=(l/=f)*u,d=(c/=f)*u,p=Math.atan2(c,l);s.moveTo(a-h,o-d),s.lineTo(t-l*r,e-c*r),s.arc(t,e,r,p-Math.PI,p),s.lineTo(a+h,o+d),s.arc(a,o,u,p,p+Math.PI)}else s.arc(t,e,r,0,cd);s.closePath()}else i=1;a=t,o=e,u=r}function c(a){var o,u,c,f=a.length,h=!1;for(null==s&&(s=c=Ss()),o=0;o<=f;++o)!(ot.x||0,Od=t=>t.y||0,Rd=t=>!(!1===t.defined),Ud=function(){var t=Ts,e=Ns,n=Bs(0),r=null,i=zs,a=Os,o=Rs,u=null;function s(){var s,l,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-ts,d=a.apply(this,arguments)-ts,p=$u(d-h),m=d>h;if(u||(u=s=Ss()),fZu)if(p>es-Zu)u.moveTo(f*Yu(h),f*Gu(h)),u.arc(0,0,f,h,d,!m),c>Zu&&(u.moveTo(c*Yu(d),c*Gu(d)),u.arc(0,0,c,d,h,m));else{var g,y,v=h,x=d,_=h,b=d,w=p,k=p,M=o.apply(this,arguments)/2,A=M>Zu&&(r?+r.apply(this,arguments):Ku(c*c+f*f)),E=Vu($u(f-c)/2,+n.apply(this,arguments)),D=E,C=E;if(A>Zu){var F=rs(A/c*Gu(M)),S=rs(A/f*Gu(M));(w-=2*F)>Zu?(_+=F*=m?1:-1,b-=F):(w=0,_=b=(h+d)/2),(k-=2*S)>Zu?(v+=S*=m?1:-1,x-=S):(k=0,v=x=(h+d)/2)}var B=f*Yu(v),T=f*Gu(v),N=c*Yu(b),z=c*Gu(b);if(E>Zu){var O,R=f*Yu(x),U=f*Gu(x),L=c*Yu(_),q=c*Gu(_);if(pZu?C>Zu?(g=Ls(L,q,B,T,f,C,m),y=Ls(R,U,N,z,f,C,m),u.moveTo(g.cx+g.x01,g.cy+g.y01),CZu&&w>Zu?D>Zu?(g=Ls(N,z,R,U,c,-D,m),y=Ls(B,T,L,q,c,-D,m),u.lineTo(g.cx+g.x01,g.cy+g.y01),Dt.startAngle||0)).endAngle((t=>t.endAngle||0)).padAngle((t=>t.padAngle||0)).innerRadius((t=>t.innerRadius||0)).outerRadius((t=>t.outerRadius||0)).cornerRadius((t=>t.cornerRadius||0)),Ld=Ws().x(zd).y1(Od).y0((t=>(t.y||0)+(t.height||0))).defined(Rd),qd=Ws().y(Od).x1(zd).x0((t=>(t.x||0)+(t.width||0))).defined(Rd),Pd=Is().x(zd).y(Od).defined(Rd),jd=Bd().x(zd).y(Od).width((t=>t.width||0)).height((t=>t.height||0)).cornerRadius((t=>Nd(t.cornerRadiusTopLeft,t.cornerRadius)||0),(t=>Nd(t.cornerRadiusTopRight,t.cornerRadius)||0),(t=>Nd(t.cornerRadiusBottomRight,t.cornerRadius)||0),(t=>Nd(t.cornerRadiusBottomLeft,t.cornerRadius)||0)),Id=function(t,e){var n=null;function r(){var r;if(n||(n=r=Ss()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return t="function"==typeof t?t:Bs(t||Xs),e="function"==typeof e?e:Bs(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"==typeof e?e:Bs(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Bs(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}().type((t=>wd(t.shape||"circle"))).size((t=>Nd(t.size,64))),Wd=Td().x(zd).y(Od).defined(Rd).size((t=>t.size||1));function Xd(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function $d(t,e,n,r){return jd.context(t)(e,n,r)}var Hd=1;function Yd(){Hd=1}function Jd(t,e,n){var r=e.clip,i=t._defs,a=e.clip_id||(e.clip_id="clip"+Hd++),o=i.clipping[a]||(i.clipping[a]={id:a});return(0,m.mf)(r)?o.path=r(null):Xd(n)?o.path=$d(null,n,0,0):(o.width=n.width||0,o.height=n.height||0),"url(#"+a+")"}function Vd(t){this.clear(),t&&this.union(t)}function Gd(t){this.mark=t,this.bounds=this.bounds||new Vd}function Kd(t){Gd.call(this,t),this.items=this.items||[]}function Zd(t){this._pending=0,this._loader=t||pi()}function Qd(t){t._pending+=1}function tp(t){t._pending-=1}function ep(t,e,n){if(e.stroke&&0!==e.opacity&&0!==e.strokeOpacity){const r=null!=e.strokeWidth?+e.strokeWidth:1;t.expand(r+(n?function(t,e){return t.strokeJoin&&"miter"!==t.strokeJoin?0:e}(e,r):0))}return t}Vd.prototype={clone(){return new Vd(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},set(t,e,n,r){return nthis.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},expand(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},translate(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},rotate(t,e,n){const r=this.rotatedPoints(t,e,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(t,e,n){var{x1:r,y1:i,x2:a,y2:o}=this,u=Math.cos(t),s=Math.sin(t),l=e-e*u+n*s,c=n-e*s-n*u;return[u*r-s*i+l,s*r+u*i+c,u*r-s*o+l,s*r+u*o+c,u*a-s*i+l,s*a+u*i+c,u*a-s*o+l,s*a+u*o+c]},union(t){return t.x1this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},alignsWith(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},intersects(t){return t&&!(this.x2t.x2||this.y2t.y2)},contains(t,e){return!(tthis.x2||ethis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},(0,m.XW)(Kd,Gd),Zd.prototype={pending(){return this._pending},sanitizeURL(t){const e=this;return Qd(e),e._loader.sanitize(t,{context:"href"}).then((t=>(tp(e),t))).catch((()=>(tp(e),null)))},loadImage(t){const e=this,n=Hs();return Qd(e),e._loader.sanitize(t,{context:"image"}).then((t=>{const r=t.href;if(!r||!n)throw{url:r};const i=new n,a=(0,m.nr)(t,"crossOrigin")?t.crossOrigin:"anonymous";return null!=a&&(i.crossOrigin=a),i.onload=()=>tp(e),i.onerror=()=>tp(e),i.src=r,i})).catch((t=>(tp(e),{complete:!1,width:0,height:0,src:t&&t.url||""})))},ready(){const t=this;return new Promise((e=>{!function n(r){t.pending()?setTimeout((()=>{n(!0)}),10):e(r)}(!1)}))}};const np=cd-1e-8;let rp,ip,ap,op,up,sp,lp,cp;const fp=(t,e)=>rp.add(t,e),hp=(t,e)=>fp(ip=t,ap=e),dp=t=>fp(t,rp.y1),pp=t=>fp(rp.x1,t),mp=(t,e)=>up*t+lp*e,gp=(t,e)=>sp*t+cp*e,yp=(t,e)=>fp(mp(t,e),gp(t,e)),vp=(t,e)=>hp(mp(t,e),gp(t,e));function xp(t,e){return rp=t,e?(op=e*sd,up=cp=Math.cos(op),sp=Math.sin(op),lp=-sp):(up=cp=1,op=sp=lp=0),_p}const _p={beginPath(){},closePath(){},moveTo:vp,lineTo:vp,rect(t,e,n,r){op?(yp(t+n,e),yp(t+n,e+r),yp(t,e+r),vp(t,e)):(fp(t+n,e+r),hp(t,e))},quadraticCurveTo(t,e,n,r){const i=mp(t,e),a=gp(t,e),o=mp(n,r),u=gp(n,r);bp(ip,i,o,dp),bp(ap,a,u,pp),hp(o,u)},bezierCurveTo(t,e,n,r,i,a){const o=mp(t,e),u=gp(t,e),s=mp(n,r),l=gp(n,r),c=mp(i,a),f=gp(i,a);wp(ip,o,s,c,dp),wp(ap,u,l,f,pp),hp(c,f)},arc(t,e,n,r,i,a){if(r+=op,i+=op,ip=n*Math.cos(i)+t,ap=n*Math.sin(i)+e,Math.abs(i-r)>np)fp(t-n,e-n),fp(t+n,e+n);else{const o=r=>fp(n*Math.cos(r)+t,n*Math.sin(r)+e);let u,s;if(o(r),o(i),i!==r)if((r%=cd)<0&&(r+=cd),(i%=cd)<0&&(i+=cd),ii;++s,u-=ld)o(u);else for(u=r-r%ld+ld,s=0;s<4&&u1e-14?(s=o*o+u*a,s>=0&&(s=Math.sqrt(s),l=(-o+s)/a,c=(-o-s)/a)):l=.5*u/o,0g)return!1;d>m&&(m=d)}else if(f>0){if(d0&&(t.globalAlpha=n,t.fillStyle=zp(t,e,e.fill),!0)}var Rp=[];function Up(t,e,n){var r=null!=(r=e.strokeWidth)?r:1;return!(r<=0)&&(n*=null==e.strokeOpacity?1:e.strokeOpacity)>0&&(t.globalAlpha=n,t.strokeStyle=zp(t,e,e.stroke),t.lineWidth=r,t.lineCap=e.strokeCap||"butt",t.lineJoin=e.strokeJoin||"miter",t.miterLimit=e.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(e.strokeDash||Rp),t.lineDashOffset=e.strokeDashOffset||0),!0)}function Lp(t,e){return t.zindex-e.zindex||t.index-e.index}function qp(t){if(!t.zdirty)return t.zitems;var e,n,r,i=t.items,a=[];for(n=0,r=i.length;n=0;)if(n=e(i[r]))return n;if(i===a)for(r=(i=t.items).length;--r>=0;)if(!i[r].zindex&&(n=e(i[r])))return n;return null}function Ip(t){return function(e,n,r){Pp(n,(n=>{r&&!r.intersects(n.bounds)||Xp(t,e,n,n)}))}}function Wp(t){return function(e,n,r){!n.items.length||r&&!r.intersects(n.bounds)||Xp(t,e,n.items[0],n.items)}}function Xp(t,e,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(t(e,r)||(Bp(e,n),n.fill&&Op(e,n,i)&&e.fill(),n.stroke&&Up(e,n,i)&&e.stroke()))}function $p(t){return t=t||m.yb,function(e,n,r,i,a,o){return r*=e.pixelRatio,i*=e.pixelRatio,jp(n,(n=>{const u=n.bounds;if((!u||u.contains(a,o))&&u)return t(e,n,r,i,a,o)?n:void 0}))}}function Hp(t,e){return function(n,r,i,a){var o,u,s=Array.isArray(r)?r[0]:r,l=null==e?s.fill:e,c=s.stroke&&n.isPointInStroke;return c&&(o=s.strokeWidth,u=s.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=u?u:"butt"),!t(n,r)&&(l&&n.isPointInPath(i,a)||c&&n.isPointInStroke(i,a))}}function Yp(t){return $p(Hp(t))}function Jp(t,e){return"translate("+t+","+e+")"}function Vp(t){return"rotate("+t+")"}function Gp(t){return Jp(t.x||0,t.y||0)}function Kp(t,e,n){function r(t,n){var r=n.x||0,i=n.y||0,a=n.angle||0;t.translate(r,i),a&&t.rotate(a*=sd),t.beginPath(),e(t,n),a&&t.rotate(-a),t.translate(-r,-i)}return{type:t,tag:"path",nested:!1,attr:function(t,n){t("transform",function(t){return Jp(t.x||0,t.y||0)+(t.angle?" "+Vp(t.angle):"")}(n)),t("d",e(null,n))},bound:function(t,n){return e(xp(t,n.angle),n),ep(t,n).translate(n.x||0,n.y||0)},draw:Ip(r),pick:Yp(r),isect:n||Ep(r)}}var Zp=Kp("arc",(function(t,e){return Ud.context(t)(e)}));function Qp(t,e,n){function r(t,n){t.beginPath(),e(t,n)}const i=Hp(r);return{type:t,tag:"path",nested:!0,attr:function(t,n){var r=n.mark.items;r.length&&t("d",e(null,r))},bound:function(t,n){var r=n.items;return 0===r.length?t:(e(xp(t),r),ep(t,r[0]))},draw:Wp(r),pick:function(t,e,n,r,a,o){var u=e.items,s=e.bounds;return!u||!u.length||s&&!s.contains(a,o)?null:(n*=t.pixelRatio,r*=t.pixelRatio,i(t,u,n,r)?u[0]:null)},isect:Dp,tip:n}}var tm=Qp("area",(function(t,e){const n=e[0],r=n.interpolate||"linear";return("horizontal"===n.orient?qd:Ld).curve(id(r,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,r,i="horizontal"===t[0].orient?e[1]:e[0],a="horizontal"===t[0].orient?"y":"x",o=t.length,u=1/0;--o>=0;)!1!==t[o].defined&&(r=Math.abs(t[o][a]-i)).5&&e<1.5?.5-Math.abs(e-1):0}function rm(t,e){const n=nm(e);t("d",$d(null,e,n,n))}function im(t,e,n,r){const i=nm(e);t.beginPath(),$d(t,e,(n||0)+i,(r||0)+i)}const am=Hp(im),om=Hp(im,!1),um=Hp(im,!0);var sm={type:"group",tag:"g",nested:!1,attr:function(t,e){t("transform",Gp(e))},bound:function(t,e){if(!e.clip&&e.items){const n=e.items,r=n.length;for(let e=0;e{const r=e.x||0,i=e.y||0,a=e.strokeForeground,o=null==e.opacity?1:e.opacity;(e.stroke||e.fill)&&o&&(im(t,e,r,i),Bp(t,e),e.fill&&Op(t,e,o)&&t.fill(),e.stroke&&!a&&Up(t,e,o)&&t.stroke()),t.save(),t.translate(r,i),e.clip&&em(t,e),n&&n.translate(-r,-i),Pp(e,(e=>{this.draw(t,e,n)})),n&&n.translate(r,i),t.restore(),a&&e.stroke&&o&&(im(t,e,r,i),Bp(t,e),Up(t,e,o)&&t.stroke())}))},pick:function(t,e,n,r,i,a){if(e.bounds&&!e.bounds.contains(i,a)||!e.items)return null;const o=n*t.pixelRatio,u=r*t.pixelRatio;return jp(e,(s=>{let l,c,f;const h=s.bounds;if(h&&!h.contains(i,a))return;c=s.x||0,f=s.y||0;const d=c+(s.width||0),p=f+(s.height||0),m=s.clip;if(m&&(id||ap))return;if(t.save(),t.translate(c,f),c=i-c,f=a-f,m&&Xd(s)&&!um(t,s,o,u))return t.restore(),null;const g=s.strokeForeground,y=!1!==e.interactive;return y&&g&&s.stroke&&om(t,s,o,u)?(t.restore(),s):(l=jp(s,(t=>function(t,e,n){return(!1!==t.interactive||"group"===t.marktype)&&t.bounds&&t.bounds.contains(e,n)}(t,c,f)?this.pick(t,n,r,c,f):null)),!l&&y&&(s.fill||!g&&s.stroke)&&am(t,s,o,u)&&(l=s),t.restore(),l||null)}))},isect:Cp,content:function(t,e,n){t("clip-path",e.clip?Jd(n,e,e):null)},background:function(t,e){t("class","background"),t("aria-hidden",!0),rm(t,e)},foreground:function(t,e){t("class","foreground"),t("aria-hidden",!0),e.strokeForeground?rm(t,e):t("d","")}},lm={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function cm(t,e){var n=t.image;return(!n||t.url&&t.url!==n.url)&&(n={complete:!1,width:0,height:0},e.loadImage(t.url).then((e=>{t.image=e,t.image.url=t.url}))),n}function fm(t,e){return null!=t.width?t.width:e&&e.width?!1!==t.aspect&&t.height?t.height*e.width/e.height:e.width:0}function hm(t,e){return null!=t.height?t.height:e&&e.height?!1!==t.aspect&&t.width?t.width*e.height/e.width:e.height:0}function dm(t,e){return"center"===t?e/2:"right"===t?e:0}function pm(t,e){return"middle"===t?e/2:"bottom"===t?e:0}var mm={type:"image",tag:"image",nested:!1,attr:function(t,e,n){const r=cm(e,n),i=fm(e,r),a=hm(e,r),o=(e.x||0)-dm(e.align,i),u=(e.y||0)-pm(e.baseline,a);t("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",lm["xmlns:xlink"],"xlink:href"),t("transform",Jp(o,u)),t("width",i),t("height",a),t("preserveAspectRatio",!1===e.aspect?"none":"xMidYMid")},bound:function(t,e){const n=e.image,r=fm(e,n),i=hm(e,n),a=(e.x||0)-dm(e.align,r),o=(e.y||0)-pm(e.baseline,i);return t.set(a,o,a+r,o+i)},draw:function(t,e,n){Pp(e,(e=>{if(n&&!n.intersects(e.bounds))return;const r=cm(e,this);let i=fm(e,r),a=hm(e,r);if(0===i||0===a)return;let o,u,s,l,c=(e.x||0)-dm(e.align,i),f=(e.y||0)-pm(e.baseline,a);!1!==e.aspect&&(u=r.width/r.height,s=e.width/e.height,u==u&&s==s&&u!==s&&(s=0;)if(!1!==t[a].defined&&(n=t[a].x-e[0])*n+(r=t[a].y-e[1])*r{if(!n||n.intersects(e.bounds)){var r=null==e.opacity?1:e.opacity;r&&bm(t,e,r)&&(Bp(t,e),t.stroke())}}))},pick:$p((function(t,e,n,r){return!!t.isPointInStroke&&bm(t,e,1)&&t.isPointInStroke(n,r)})),isect:Fp},km=Kp("shape",(function(t,e){return(e.mark.shape||e.shape).context(t)(e)})),Mm=Kp("symbol",(function(t,e){return Id.context(t)(e)}),Dp);const Am=(0,m.$m)();var Em={height:Tm,measureWidth:Sm,estimateWidth:Cm,width:Cm,canvas:Dm};function Dm(t){Em.width=t&&Mp?Sm:Cm}function Cm(t,e){return Fm(Rm(t,e),Tm(t))}function Fm(t,e){return~~(.8*t.length*e)}function Sm(t,e){return Tm(t)<=0||!(e=Rm(t,e))?0:Bm(e,Lm(t))}function Bm(t,e){const n=`(${e}) ${t}`;let r=Am.get(n);return void 0===r&&(Mp.font=e,r=Mp.measureText(t).width,Am.set(n,r)),r}function Tm(t){return null!=t.fontSize?+t.fontSize||0:11}function Nm(t){return null!=t.lineHeight?t.lineHeight:Tm(t)+2}function zm(t){return e=t.lineBreak&&t.text&&!(0,m.kJ)(t.text)?t.text.split(t.lineBreak):t.text,(0,m.kJ)(e)?e.length>1?e:e[0]:e;var e}function Om(t){const e=zm(t);return((0,m.kJ)(e)?e.length-1:0)*Nm(t)}function Rm(t,e){const n=null==e?"":(e+"").trim();return t.limit>0&&n.length?function(t,e){var n=+t.limit,r=function(t){if(Em.width===Sm){const e=Lm(t);return t=>Bm(t,e)}{const e=Tm(t);return t=>Fm(t,e)}}(t);if(r(e)>>1,r(e.slice(i))>n?u=i+1:s=i;return a+e.slice(u)}for(;u>>1),r(e.slice(0,i))Math.max(t,Em.width(e,n))),0)):r=Em.width(e,f),"center"===a?l-=r/2:"right"===a&&(l-=r),t.set(l+=u,c+=s,l+r,c+i),e.angle&&!n)t.rotate(e.angle*sd,u,s);else if(2===n)return t.rotatedPoints(e.angle*sd,u,s);return t}var Xm={arc:Zp,area:tm,group:sm,image:mm,line:gm,path:vm,rect:_m,rule:wm,shape:km,symbol:Mm,text:{type:"text",tag:"text",nested:!1,attr:function(t,e){var n,r=e.dx||0,i=(e.dy||0)+qm(e),a=Im(e),o=a.x1,u=a.y1,s=e.angle||0;t("text-anchor",Pm[e.align]||"start"),s?(n=Jp(o,u)+" "+Vp(s),(r||i)&&(n+=" "+Jp(r,i))):n=Jp(o+r,u+i),t("transform",n)},bound:Wm,draw:function(t,e,n){Pp(e,(e=>{var r,i,a,o,u,s,l,c=null==e.opacity?1:e.opacity;if(!(n&&!n.intersects(e.bounds)||0===c||e.fontSize<=0||null==e.text||0===e.text.length)){if(t.font=Lm(e),t.textAlign=e.align||"left",i=(r=Im(e)).x1,a=r.y1,e.angle&&(t.save(),t.translate(i,a),t.rotate(e.angle*sd),i=a=0),i+=e.dx||0,a+=(e.dy||0)+qm(e),s=zm(e),Bp(t,e),(0,m.kJ)(s))for(u=Nm(e),o=0;o=0;)if(!1!==t[i].defined&&(n=t[i].x-e[0])*n+(r=t[i].y-e[1])*r<(n=t[i].size||1)*n)return t[i];return null}))};function $m(t,e,n){var r=Xm[t.mark.marktype],i=e||r.bound;return r.nested&&(t=t.mark),i(t.bounds||(t.bounds=new Vd),t,n)}var Hm={mark:null};function Ym(t,e,n){var r,i,a,o,u=Xm[t.marktype],s=u.bound,l=t.items,c=l&&l.length;if(u.nested)return c?a=l[0]:(Hm.mark=t,a=Hm),o=$m(a,s,n),e&&e.union(o)||o;if(e=e||t.bounds&&t.bounds.clear()||new Vd,c)for(r=0,i=l.length;re;)t.removeChild(n[--r]);return t}function ig(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function ag(t,e){const n=e.getBoundingClientRect();return[t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0)]}function og(t,e){this._active=null,this._handlers={},this._loader=t||pi(),this._tooltip=e||ug}function ug(t,e,n,r){t.element().setAttribute("title",r||"")}function sg(t){this._el=null,this._bgcolor=null,this._loader=new Zd(t)}Zm.prototype={toJSON(t){return Vm(this.root,t||0)},mark(t,e,n){const r=Qm(t,e=e||this.root.items[0]);return e.items[n]=r,r.zindex&&(r.group.zdirty=!0),r}},og.prototype={initialize(t,e,n){return this._el=t,this._obj=n||null,this.origin(e)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},scene(t){return arguments.length?(this._scene=t,this):this._scene},on(){},off(){},_handlerIndex(t,e,n){for(let r=t?t.length:0;--r>=0;)if(t[r].type===e&&(!n||t[r].handler===n))return r;return-1},handlers(t){const e=this._handlers,n=[];if(t)n.push(...e[this.eventName(t)]);else for(const t in e)n.push(...e[t]);return n},eventName(t){const e=t.indexOf(".");return e<0?t:t.slice(0,e)},handleHref(t,e,n){this._loader.sanitize(n,{context:"href"}).then((e=>{const n=new MouseEvent(t.type,t),r=tg(null,"a");for(const t in e)r.setAttribute(t,e[t]);r.dispatchEvent(n)})).catch((()=>{}))},handleTooltip(t,e,n){if(e&&null!=e.tooltip){e=function(t,e,n,r){var i,a,o=t&&t.mark;if(o&&(i=Xm[o.marktype]).tip){for((a=ag(e,n))[0]-=r[0],a[1]-=r[1];t=t.mark.group;)a[0]-=t.x||0,a[1]-=t.y||0;t=i.tip(o.items,a)}return t}(e,t,this.canvas(),this._origin);const r=n&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,r)}},getItemBoundingClientRect(t){const e=this.canvas();if(!e)return;const n=e.getBoundingClientRect(),r=this._origin,i=t.bounds,a=i.width(),o=i.height();let u=i.x1+r[0]+n.left,s=i.y1+r[1]+n.top;for(;t.mark&&(t=t.mark.group);)u+=t.x||0,s+=t.y||0;return{x:u,y:s,width:a,height:o,left:u,top:s,right:u+a,bottom:s+o}}},sg.prototype={initialize(t,e,n,r,i){return this._el=t,this.resize(e,n,r,i)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)},resize(t,e,n,r){return this._width=t,this._height=e,this._origin=n||[0,0],this._scale=r||1,this},dirty(){},render(t){const e=this;return e._call=function(){e._render(t)},e._call(),e._call=null,e},_render(){},renderAsync(t){const e=this.render(t);return this._ready?this._ready.then((()=>e)):Promise.resolve(e)},_load(t,e){var n=this,r=n._loader[t](e);if(!n._ready){const t=n._call;n._ready=n._loader.ready().then((e=>{e&&t(),n._ready=null}))}return r},sanitizeURL(t){return this._load("sanitizeURL",t)},loadImage(t){return this._load("loadImage",t)}};const lg="dragenter",cg="dragleave",fg="dragover",hg="mousedown",dg="mousemove",pg="mouseout",mg="mouseover",gg="click",yg="mousewheel",vg="touchstart",xg="touchmove",_g="touchend",bg=["keydown","keypress","keyup",lg,cg,fg,hg,"mouseup",dg,pg,mg,gg,"dblclick","wheel",yg,vg,xg,_g],wg=dg,kg=pg,Mg=gg;function Ag(t,e){og.call(this,t,e),this._down=null,this._touch=null,this._first=!0,this._events={}}function Eg(t,e){(t=>t===vg||t===xg||t===_g?[vg,xg,_g]:[t])(e).forEach((e=>function(t,e){const n=t.canvas();n&&!t._events[e]&&(t._events[e]=1,n.addEventListener(e,t[e]?n=>t[e](n):n=>t.fire(e,n)))}(t,e)))}function Dg(t,e,n){return function(r){const i=this._active,a=this.pickEvent(r);a===i||(i&&i.exit||this.fire(n,r),this._active=a,this.fire(e,r)),this.fire(t,r)}}function Cg(t){return function(e){this.fire(t,e),this._active=null}}(0,m.XW)(Ag,og,{initialize(t,e,n){return this._canvas=t&&eg(t,"canvas"),[gg,hg,dg,pg,cg].forEach((t=>Eg(this,t))),og.prototype.initialize.call(this,t,e,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:bg,DOMMouseScroll(t){this.fire(yg,t)},mousemove:Dg(dg,mg,pg),dragover:Dg(fg,lg,cg),mouseout:Cg(pg),dragleave:Cg(cg),mousedown(t){this._down=this._active,this.fire(hg,t)},click(t){this._down===this._active&&(this.fire(gg,t),this._down=null)},touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(vg,t,!0)},touchmove(t){this.fire(xg,t,!0)},touchend(t){this.fire(_g,t,!0),this._touch=null},fire(t,e,n){const r=n?this._touch:this._active,i=this._handlers[t];if(e.vegaType=t,t===Mg&&r&&r.href?this.handleHref(e,r,r.href):t!==wg&&t!==kg||this.handleTooltip(e,r,t!==kg),i)for(let t=0,n=i.length;t=0&&r.splice(i,1),this},pickEvent(t){const e=ag(t,this._canvas),n=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-n[0],e[1]-n[1])},pick(t,e,n,r,i){const a=this.context();return Xm[t.marktype].pick.call(this,a,t,e,n,r,i)}});var Fg="undefined"!=typeof window&&window.devicePixelRatio||1;function Sg(t){sg.call(this,t),this._options={},this._redraw=!1,this._dirty=new Vd,this._tempb=new Vd}const Bg=sg.prototype;function Tg(t,e){og.call(this,t,e);const n=this;n._hrefHandler=Ng(n,((t,e)=>{e&&e.href&&n.handleHref(t,e,e.href)})),n._tooltipHandler=Ng(n,((t,e)=>{n.handleTooltip(t,e,t.type!==kg)}))}(0,m.XW)(Sg,sg,{initialize(t,e,n,r,i,a){return this._options=a||{},this._canvas=this._options.externalContext?null:$s(1,1,this._options.type),t&&this._canvas&&(rg(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),Bg.initialize.call(this,t,e,n,r,i)},resize(t,e,n,r){if(Bg.resize.call(this,t,e,n,r),this._canvas)!function(t,e,n,r,i,a){const o="undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&null!=t.parentNode,u=t.getContext("2d"),s=o?Fg:i;t.width=e*s,t.height=n*s;for(const t in a)u[t]=a[t];o&&1!==s&&(t.style.width=e+"px",t.style.height=n+"px"),u.pixelRatio=s,u.setTransform(s,0,0,s,s*r[0],s*r[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const t=this._options.externalContext;t||(0,m.vU)("CanvasRenderer is missing a valid canvas or context"),t.scale(this._scale,this._scale),t.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(t){const e=this._tempb.clear().union(t.bounds);let n=t.mark.group;for(;n;)e.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(e)},_render(t){const e=this.context(),n=this._origin,r=this._width,i=this._height,a=this._dirty,o=((t,e,n)=>(new Vd).set(0,0,e,n).translate(-t[0],-t[1]))(n,r,i);e.save();const u=this._redraw||a.empty()?(this._redraw=!1,o.expand(1)):function(t,e,n){return e.expand(1).round(),t.pixelRatio%1&&e.scale(t.pixelRatio).round().scale(1/t.pixelRatio),e.translate(-n[0]%1,-n[1]%1),t.beginPath(),t.rect(e.x1,e.y1,e.width(),e.height()),t.clip(),e}(e,o.intersect(a),n);return this.clear(-n[0],-n[1],r,i),this.draw(e,t,u),e.restore(),a.clear(),this},draw(t,e,n){const r=Xm[e.marktype];e.clip&&function(t,e){var n=e.clip;t.save(),(0,m.mf)(n)?(t.beginPath(),n(t),t.clip()):em(t,e.group)}(t,e),r.draw.call(this,t,e,n),e.clip&&t.restore()},clear(t,e,n,r){const i=this._options,a=this.context();"pdf"===i.type||i.externalContext||a.clearRect(t,e,n,r),null!=this._bgcolor&&(a.fillStyle=this._bgcolor,a.fillRect(t,e,n,r))}});const Ng=(t,e)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,e.call(t._obj,n,r)};(0,m.XW)(Tg,og,{initialize(t,e,n){let r=this._svg;return r&&(r.removeEventListener(Mg,this._hrefHandler),r.removeEventListener(wg,this._tooltipHandler),r.removeEventListener(kg,this._tooltipHandler)),this._svg=r=t&&eg(t,"svg"),r&&(r.addEventListener(Mg,this._hrefHandler),r.addEventListener(wg,this._tooltipHandler),r.addEventListener(kg,this._tooltipHandler)),og.prototype.initialize.call(this,t,e,n)},canvas(){return this._svg},on(t,e){const n=this.eventName(t),r=this._handlers;if(this._handlerIndex(r[n],t,e)<0){const i={type:t,handler:e,listener:Ng(this,e)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this},off(t,e){const n=this.eventName(t),r=this._handlers[n],i=this._handlerIndex(r,t,e);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}});const zg="aria-hidden",Og="aria-label",Rg="role",Ug="aria-roledescription",Lg="graphics-object",qg="graphics-symbol",Pg=(t,e,n)=>({[Rg]:t,[Ug]:e,[Og]:n||void 0}),jg=(0,m.Rg)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Ig={axis:{desc:"axis",caption:function(t){const e=t.datum,n=t.orient,r=e.title?Yg(t):null,i=t.context,a=i.scales[e.scale].value,o=i.dataflow.locale(),u=a.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(r?` titled '${r}'`:"")+` for a ${yh(u)?"discrete":u} scale`+` with ${Gh(o,a,t)}`}},legend:{desc:"legend",caption:function(t){const e=t.datum,n=e.title?Yg(t):null,r=`${e.type||""} legend`.trim(),i=e.scales,a=Object.keys(i),o=t.context,u=o.scales[i[a[0]]].value,s=o.dataflow.locale();return((l=r).length?l[0].toUpperCase()+l.slice(1):l)+(n?` titled '${n}'`:"")+` for ${function(t){return(t=t.map((t=>t+("fill"===t||"stroke"===t?" color":"")))).length<2?t[0]:t.slice(0,-1).join(", ")+" and "+(0,m.fj)(t)}(a)}`+` with ${Gh(s,u,t)}`;var l}},"title-text":{desc:"title",caption:t=>`Title text '${Hg(t)}'`},"title-subtitle":{desc:"subtitle",caption:t=>`Subtitle text '${Hg(t)}'`}},Wg={ariaRole:Rg,ariaRoleDescription:Ug,description:Og};function Xg(t,e){const n=!1===e.aria;if(t(zg,n||void 0),n||null==e.description)for(const e in Wg)t(Wg[e],void 0);else{const n=e.mark.marktype;t(Og,e.description),t(Rg,e.ariaRole||("group"===n?Lg:qg)),t(Ug,e.ariaRoleDescription||`${n} mark`)}}function $g(t){return!1===t.aria?{[zg]:!0}:jg[t.role]?null:Ig[t.role]?function(t,e){try{const n=t.items[0],r=e.caption||(()=>"");return Pg(e.role||qg,e.desc,n.description||r(n))}catch(t){return null}}(t,Ig[t.role]):function(t){const e=t.marktype,n="group"===e||"text"===e||t.items.some((t=>null!=t.description&&!1!==t.aria));return Pg(n?Lg:qg,`${e} mark container`,t.description)}(t)}function Hg(t){return(0,m.IX)(t.text).join(" ")}function Yg(t){try{return(0,m.IX)((0,m.fj)(t.items).items[0].text).join(" ")}catch(t){return null}}const Jg=t=>(t+"").replace(/&/g,"&").replace(//g,">");function Vg(){let t="",e="",n="";const r=[],i=()=>e=n="",a=(t,n)=>{var r;return null!=n&&(e+=` ${t}="${r=n,Jg(r).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ")}"`),o},o={open(u,...s){(a=>{e&&(t+=`${e}>${n}`,i()),r.push(a)})(u),e="<"+u;for(const t of s)for(const e in t)a(e,t[e]);return o},close(){const a=r.pop();return t+=e?e+(n?`>${n}`:"/>"):``,i(),o},attr:a,text:t=>(n+=Jg(t),o),toString:()=>t};return o}const Gg=t=>Kg(Vg(),t)+"";function Kg(t,e){if(t.open(e.tagName),e.hasAttributes()){const n=e.attributes,r=n.length;for(let e=0;e1&&t.previousSibling!=e}(o,n))&&e.insertBefore(o,n?n.nextSibling:e.firstChild),o}(0,m.XW)(ny,sg,{initialize(t,e,n,r,i){return this._defs={},this._clearDefs(),t&&(this._svg=ng(t,0,"svg",ey),this._svg.setAttributeNS(ty,"xmlns",ey),this._svg.setAttributeNS(ty,"xmlns:xlink",lm["xmlns:xlink"]),this._svg.setAttribute("version",lm.version),this._svg.setAttribute("class","marks"),rg(t,1),this._root=ng(this._svg,0,"g",ey),dy(this._root,Qg),rg(this._svg,1)),this.background(this._bgcolor),ry.initialize.call(this,t,e,n,r,i)},background(t){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",t),ry.background.apply(this,arguments)},resize(t,e,n,r){return ry.resize.call(this,t,e,n,r),this._svg&&(dy(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const t=this._svg,e=this._bgcolor;if(!t)return null;let n;e&&(t.removeAttribute("style"),n=ng(t,0,"rect",ey),dy(n,{width:this._width,height:this._height,fill:e}));const r=Gg(t);return e&&(t.removeChild(n),this._svg.style.setProperty("background-color",e)),r},_render(t){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,t),rg(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(t){t.dirty!==this._dirtyID&&(t.dirty=this._dirtyID,this._dirty.push(t))},isDirty(t){return this._dirtyAll||!t._svg||t.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const t=this._dirty;if(!t.length||!this._dirtyID)return!0;const e=++this._dirtyID;let n,r,i,a,o,u,s;for(o=0,u=t.length;o{t.dirty=e}))),r.zdirty||(n.exit?(a.nested&&r.items.length?(s=r.items[0],s._svg&&this._update(a,s._svg,s)):n._svg&&(s=n._svg.parentNode,s&&s.removeChild(n._svg)),n._svg=null):(n=a.nested?r.items[0]:n,n._update!==e&&(n._svg&&n._svg.ownerSVGElement?this._update(a,n._svg,n):(this._dirtyAll=!1,iy(n,e)),n._update=e)));return!this._dirtyAll},mark(t,e,n){if(!this.isDirty(e))return e._svg;const r=this._svg,i=Xm[e.marktype],a=!1===e.interactive?"none":null,o="g"===i.tag;let u=null,s=0;const l=uy(e,t,n,"g",r);l.setAttribute("class",ig(e));const c=$g(e);for(const t in c)py(l,t,c[t]);o||py(l,"pointer-events",a),py(l,"clip-path",e.clip?Jd(this,e,e.group):null);const f=t=>{const e=this.isDirty(t),n=uy(t,l,u,i.tag,r);e&&(this._update(i,n,t),o&&function(t,e,n){e=e.lastChild.previousSibling;let r,i=0;Pp(n,(n=>{r=t.mark(e,n,r),++i})),rg(e,1+i)}(this,n,t)),u=n,++s};return i.nested?e.items.length&&f(e.items[0]):Pp(e,f),rg(l,s),l},_update(t,e,n){sy=e,ly=e.__values__,Xg(fy,n),t.attr(fy,n,this);const r=cy[t.type];r&&r.call(this,t,e,n),sy&&this.style(sy,n)},style(t,e){if(null!=e)for(const n in Zg){let r="font"===n?Um(e):e[n];if(r===ly[n])continue;const i=Zg[n];null==r?t.removeAttribute(i):(Qh(r)&&(r=td(r,this._defs.gradient,my())),t.setAttribute(i,r+"")),ly[n]=r}},defs(){const t=this._svg,e=this._defs;let n=e.el,r=0;for(const i in e.gradient)n||(e.el=n=ng(t,1,"defs",ey)),r=ay(n,e.gradient[i],r);for(const i in e.clipping)n||(e.el=n=ng(t,1,"defs",ey)),r=oy(n,e.clipping[i],r);n&&(0===r?(t.removeChild(n),e.el=null):rg(n,r))},_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}});let sy=null,ly=null;const cy={group(t,e,n){const r=sy=e.childNodes[2];ly=r.__values__,t.foreground(fy,n,this),ly=e.__values__,sy=e.childNodes[1],t.content(fy,n,this);const i=sy=e.childNodes[0];t.background(fy,n,this);const a=!1===n.mark.interactive?"none":null;if(a!==ly.events&&(py(r,"pointer-events",a),py(i,"pointer-events",a),ly.events=a),n.strokeForeground&&n.stroke){const t=n.fill;py(r,"display",null),this.style(i,n),py(i,"stroke",null),t&&(n.fill=null),ly=r.__values__,this.style(r,n),t&&(n.fill=t),sy=null}else py(r,"display","none")},image(t,e,n){!1===n.smooth?(hy(e,"image-rendering","optimizeSpeed"),hy(e,"image-rendering","pixelated")):hy(e,"image-rendering",null)},text(t,e,n){const r=zm(n);let i,a,o,u;(0,m.kJ)(r)?(a=r.map((t=>Rm(n,t))),i=a.join("\n"),i!==ly.text&&(rg(e,0),o=e.ownerDocument,u=Nm(n),a.forEach(((t,r)=>{const i=tg(o,"tspan",ey);i.__data__=n,i.textContent=t,r&&(i.setAttribute("x",0),i.setAttribute("dy",u)),e.appendChild(i)})),ly.text=i)):(a=Rm(n,r),a!==ly.text&&(e.textContent=a,ly.text=a)),py(e,"font-family",Um(n)),py(e,"font-size",Tm(n)+"px"),py(e,"font-style",n.fontStyle),py(e,"font-variant",n.fontVariant),py(e,"font-weight",n.fontWeight)}};function fy(t,e,n){e!==ly[t]&&(n?function(t,e,n,r){null!=n?t.setAttributeNS(r,e,n):t.removeAttributeNS(r,e)}(sy,t,e,n):py(sy,t,e),ly[t]=e)}function hy(t,e,n){n!==ly[e]&&(null==n?t.style.removeProperty(e):t.style.setProperty(e,n+""),ly[e]=n)}function dy(t,e){for(const n in e)py(t,n,e[n])}function py(t,e,n){null!=n?t.setAttribute(e,n):t.removeAttribute(e)}function my(){let t;return"undefined"==typeof window?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function gy(t){sg.call(this,t),this._text=null,this._defs={gradient:{},clipping:{}}}(0,m.XW)(gy,sg,{svg(){return this._text},_render(t){const e=Vg();e.open("svg",(0,m.l7)({},lm,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&"transparent"!==n&&"none"!==n&&e.open("rect",{width:this._width,height:this._height,fill:n}).close(),e.open("g",Qg,{transform:"translate("+this._origin+")"}),this.mark(e,t),e.close(),this.defs(e),this._text=e.close()+"",this},mark(t,e){const n=Xm[e.marktype],r=n.tag,i=[Xg,n.attr];t.open("g",{class:ig(e),"clip-path":e.clip?Jd(this,e,e.group):null},$g(e),{"pointer-events":"g"!==r&&!1===e.interactive?"none":null});const a=a=>{const o=this.href(a);if(o&&t.open("a",o),t.open(r,this.attr(e,a,i,"g"!==r?r:null)),"text"===r){const e=zm(a);if((0,m.kJ)(e)){const n={x:0,dy:Nm(a)};for(let r=0;rthis.mark(t,e))),t.close(),r&&o?(i&&(a.fill=null),a.stroke=o,t.open("path",this.attr(e,a,n.foreground,"bgrect")).close(),i&&(a.fill=i)):t.open("path",this.attr(e,a,n.foreground,"bgfore")).close()}t.close(),o&&t.close()};return n.nested?e.items&&e.items.length&&a(e.items[0]):Pp(e,a),t.close()},href(t){const e=t.href;let n;if(e){if(n=this._hrefs&&this._hrefs[e])return n;this.sanitizeURL(e).then((t=>{t["xlink:href"]=t.href,t.href=null,(this._hrefs||(this._hrefs={}))[e]=t}))}return null},attr(t,e,n,r){const i={},a=(t,e,n,r)=>{i[r||t]=e};return Array.isArray(n)?n.forEach((t=>t(a,e,this))):n(a,e,this),r&&function(t,e,n,r,i){if(null==e)return t;if("bgrect"===r&&!1===n.interactive&&(t["pointer-events"]="none"),"bgfore"===r&&(!1===n.interactive&&(t["pointer-events"]="none"),t.display="none",null!==e.fill))return t;"image"===r&&!1===e.smooth&&(t.style="image-rendering: optimizeSpeed; image-rendering: pixelated;"),"text"===r&&(t["font-family"]=Um(e),t["font-size"]=Tm(e)+"px",t["font-style"]=e.fontStyle,t["font-variant"]=e.fontVariant,t["font-weight"]=e.fontWeight);for(const n in Zg){let r=e[n];const a=Zg[n];("transparent"!==r||"fill"!==a&&"stroke"!==a)&&null!=r&&(Qh(r)&&(r=td(r,i.gradient,"")),t[a]=r)}}(i,e,t,r,this._defs),i},defs(t){const e=this._defs.gradient,n=this._defs.clipping;if(0!==Object.keys(e).length+Object.keys(n).length){t.open("defs");for(const n in e){const r=e[n],i=r.stops;"radial"===r.gradient?(t.open("pattern",{id:Zh+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+n+")"}).close(),t.close(),t.open("radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):t.open("linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let e=0;e1?(vy[t]=e,this):vy[t]}function _y(t,e,n){const r=[],i=(new Vd).union(e),a=t.marktype;return a?by(t,i,n,r):"group"===a?wy(t,i,n,r):(0,m.vU)("Intersect scene must be mark node or group item.")}function by(t,e,n,r){if(function(t,e,n){return t.bounds&&e.intersects(t.bounds)&&("group"===t.marktype||!1!==t.interactive&&(!n||n(t)))}(t,e,n)){const i=t.items,a=t.marktype,o=i.length;let u=0;if("group"===a)for(;u=0;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;r>=0;r--)if(!Ey(t[n=i[r]],e[n],n))return!1;return typeof t==typeof e}(t,e):t==e)}function Dy(t,e){return Ey(ud(t),ud(e))}function Cy(){Yd(),Kh=0}const Fy="top",Sy="left",By="right",Ty="bottom",Ny="start",zy="middle",Oy="end",Ry="group",Uy="axis",Ly="title",qy="legend",Py="row-header",jy="row-footer",Iy="row-title",Wy="column-header",Xy="column-footer",$y="column-title",Hy="none",Yy="all",Jy="each",Vy="flush",Gy="column",Ky="row";function Zy(t){Zi.call(this,null,t)}function Qy(t,e,n){return e(t.bounds.clear(),t,n)}(0,m.XW)(Zy,Zi,{transform(t,e){const n=e.dataflow,r=t.mark,i=r.marktype,a=Xm[i],o=a.bound;let u,s=r.bounds;if(a.nested)r.items.length&&n.dirty(r.items[0]),s=Qy(r,o),r.items.forEach((t=>{t.bounds.clear().union(s)}));else if(i===Ry||t.modified())switch(e.visit(e.MOD,(t=>n.dirty(t))),s.clear(),r.items.forEach((t=>s.union(Qy(t,o)))),r.role){case Uy:case qy:case Ly:e.reflow()}else u=e.changed(e.REM),e.visit(e.ADD,(t=>{s.union(Qy(t,o))})),e.visit(e.MOD,(t=>{u=u||s.alignsWith(t.bounds),n.dirty(t),s.union(Qy(t,o))})),u&&(s.clear(),r.items.forEach((t=>s.union(t.bounds))));return Ay(r),e.modifies("bounds")}});const tv=":vega_identifier:";function ev(t){Zi.call(this,0,t)}function nv(t){Zi.call(this,null,t)}function rv(t){Zi.call(this,null,t)}ev.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},(0,m.XW)(ev,Zi,{transform(t,e){const n=(i=e.dataflow)._signals[tv]||(i._signals[tv]=i.add(0)),r=t.as;var i;let a=n.value;return e.visit(e.ADD,(t=>t[r]=t[r]||++a)),n.set(this.value=a),e}}),(0,m.XW)(nv,Zi,{transform(t,e){let n=this.value;n||(n=e.dataflow.scenegraph().mark(t.markdef,function(t){const e=t.groups,n=t.parent;return e&&1===e.size?e.get(Object.keys(e.object)[0]):e&&n?e.lookup(n):null}(t),t.index),n.group.context=t.context,t.context.group||(t.context.group=n.group),n.source=this.source,n.clip=t.clip,n.interactive=t.interactive,this.value=n);const r=n.marktype===Ry?Kd:Gd;return e.visit(e.ADD,(t=>r.call(t,n))),(t.modified("clip")||t.modified("interactive"))&&(n.clip=t.clip,n.interactive=!!t.interactive,n.zdirty=!0,e.reflow()),n.items=e.source,e}});const iv={parity:t=>t.filter(((t,e)=>e%2?t.opacity=0:1)),greedy:(t,e)=>{let n;return t.filter(((t,r)=>r&&av(n.bounds,t.bounds,e)?t.opacity=0:(n=t,1)))}},av=(t,e,n)=>n>Math.max(e.x1-t.x2,t.x1-e.x2,e.y1-t.y2,t.y1-e.y2),ov=(t,e)=>{for(var n,r=1,i=t.length,a=t[0].bounds;r{const e=t.bounds;return e.width()>1&&e.height()>1},sv=t=>(t.forEach((t=>t.opacity=1)),t),lv=(t,e)=>t.reflow(e.modified()).modifies("opacity");function cv(t){Zi.call(this,null,t)}(0,m.XW)(rv,Zi,{transform(t,e){const n=iv[t.method]||iv.parity,r=t.separation||0;let i,a,o=e.materialize(e.SOURCE).source;if(!o||!o.length)return;if(!t.method)return t.modified("method")&&(sv(o),e=lv(e,t)),e;if(o=o.filter(uv),!o.length)return;if(t.sort&&(o=o.slice().sort(t.sort)),i=sv(o),e=lv(e,t),i.length>=3&&ov(i,r)){do{i=n(i,r)}while(i.length>=3&&ov(i,r));i.length<3&&!(0,m.fj)(o).opacity&&(i.length>1&&((0,m.fj)(i).opacity=0),(0,m.fj)(o).opacity=1)}t.boundScale&&t.boundTolerance>=0&&(a=((t,e,n)=>{var r=t.range(),i=new Vd;return e===Fy||e===Ty?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),t=>i.encloses(t.bounds)})(t.boundScale,t.boundOrient,+t.boundTolerance),o.forEach((t=>{a(t)||(t.opacity=0)})));const u=i[0].mark.bounds.clear();return o.forEach((t=>{t.opacity&&u.union(t.bounds)})),e}}),(0,m.XW)(cv,Zi,{transform(t,e){const n=e.dataflow;if(e.visit(e.ALL,(t=>n.dirty(t))),e.fields&&e.fields.zindex){const t=e.source&&e.source[0];t&&(t.mark.zdirty=!0)}}});const fv=new Vd;function hv(t,e,n){return t[e]===n?0:(t[e]=n,1)}function dv(t){var e=t.items[0].orient;return e===Sy||e===By}function pv(t,e,n,r){var i,a,o=e.items[0],u=o.datum,s=null!=o.translate?o.translate:.5,l=o.orient,c=function(t){let e=+t.grid;return[t.ticks?e++:-1,t.labels?e++:-1,e+ +t.domain]}(u),f=o.range,h=o.offset,d=o.position,p=o.minExtent,m=o.maxExtent,g=u.title&&o.items[c[2]].items[0],y=o.titlePadding,v=o.bounds,x=g&&Om(g),_=0,b=0;switch(fv.clear().union(v),v.clear(),(i=c[0])>-1&&v.union(o.items[i].bounds),(i=c[1])>-1&&v.union(o.items[i].bounds),l){case Fy:_=d||0,b=-h,a=Math.max(p,Math.min(m,-v.y1)),v.add(0,-a).add(f,0),g&&mv(t,g,a,y,x,0,-1,v);break;case Sy:_=-h,b=d||0,a=Math.max(p,Math.min(m,-v.x1)),v.add(-a,0).add(0,f),g&&mv(t,g,a,y,x,1,-1,v);break;case By:_=n+h,b=d||0,a=Math.max(p,Math.min(m,v.x2)),v.add(0,0).add(a,f),g&&mv(t,g,a,y,x,1,1,v);break;case Ty:_=d||0,b=r+h,a=Math.max(p,Math.min(m,v.y2)),v.add(0,0).add(f,a),g&&mv(t,g,a,y,0,0,1,v);break;default:_=o.x,b=o.y}return ep(v.translate(_,b),o),hv(o,"x",_+s)|hv(o,"y",b+s)&&(o.bounds=fv,t.dirty(o),o.bounds=v,t.dirty(o)),o.mark.bounds.clear().union(v)}function mv(t,e,n,r,i,a,o,u){const s=e.bounds;if(e.auto){const u=o*(n+i+r);let l=0,c=0;t.dirty(e),a?l=(e.x||0)-(e.x=u):c=(e.y||0)-(e.y=u),e.mark.bounds.clear().union(s.translate(-l,-c)),t.dirty(e)}u.union(s)}const gv=(t,e)=>Math.floor(Math.min(t,e)),yv=(t,e)=>Math.ceil(Math.max(t,e));function vv(t){return(new Vd).set(0,0,t.width||0,t.height||0)}function xv(t){const e=t.bounds.clone();return e.empty()?e.set(0,0,0,0):e.translate(-(t.x||0),-(t.y||0))}function _v(t,e,n){const r=(0,m.Kn)(t)?t[e]:t;return null!=r?r:void 0!==n?n:0}function bv(t){return t<0?Math.ceil(-t):0}function wv(t,e,n){var r,i,a,o,u,s,l,c,f,h,d,p=!n.nodirty,m=n.bounds===Vy?vv:xv,g=fv.set(0,0,0,0),y=_v(n.align,Gy),v=_v(n.align,Ky),x=_v(n.padding,Gy),_=_v(n.padding,Ky),b=n.columns||e.length,w=b<=0?1:Math.ceil(e.length/b),k=e.length,M=Array(k),A=Array(b),E=0,D=Array(k),C=Array(w),F=0,S=Array(k),B=Array(k),T=Array(k);for(i=0;i1)for(i=0;i0&&(S[i]+=f/2);if(v&&_v(n.center,Ky)&&1!==b)for(i=0;i0&&(B[i]+=h/2);for(i=0;ii&&(t.warn("Grid headers exceed limit: "+i),e=e.slice(0,i)),M+=a,m=0,y=e.length;m=0&&null==(_=n[g]);g-=h);u?(b=null==d?_.x:Math.round(_.bounds.x1+d*_.bounds.width()),w=M):(b=M,w=null==d?_.y:Math.round(_.bounds.y1+d*_.bounds.height())),v.union(x.bounds.translate(b-(x.x||0),w-(x.y||0))),x.x=b,x.y=w,t.dirty(x),A=o(A,v[l])}return A}function Ev(t,e,n,r,i,a){if(e){t.dirty(e);var o=n,u=n;r?o=Math.round(i.x1+a*i.width()):u=Math.round(i.y1+a*i.height()),e.bounds.translate(o-(e.x||0),u-(e.y||0)),e.mark.bounds.clear().union(e.bounds),e.x=o,e.y=u,t.dirty(e)}}function Dv(t,e,n,r,i,a,o){const u=function(t,e){const n=t[e]||{};return(e,r)=>null!=n[e]?n[e]:null!=t[e]?t[e]:r}(n,e),s=function(t,e){let n=-1/0;return t.forEach((t=>{null!=t.offset&&(n=Math.max(n,t.offset))})),n>-1/0?n:e}(t,u("offset",0)),l=u("anchor",Ny),c=l===Oy?1:l===zy?.5:0,f={align:Jy,bounds:u("bounds",Vy),columns:"vertical"===u("direction")?1:t.length,padding:u("margin",8),center:u("center"),nodirty:!0};switch(e){case Sy:f.anchor={x:Math.floor(r.x1)-s,column:Oy,y:c*(o||r.height()+2*r.y1),row:l};break;case By:f.anchor={x:Math.ceil(r.x2)+s,y:c*(o||r.height()+2*r.y1),row:l};break;case Fy:f.anchor={y:Math.floor(i.y1)-s,row:Oy,x:c*(a||i.width()+2*i.x1),column:l};break;case Ty:f.anchor={y:Math.ceil(i.y2)+s,x:c*(a||i.width()+2*i.x1),column:l};break;case"top-left":f.anchor={x:s,y:s};break;case"top-right":f.anchor={x:a-s,y:s,column:Oy};break;case"bottom-left":f.anchor={x:s,y:o-s,row:Oy};break;case"bottom-right":f.anchor={x:a-s,y:o-s,column:Oy,row:Oy}}return f}function Cv(t,e){var n,r,i=e.items[0],a=i.datum,o=i.orient,u=i.bounds,s=i.x,l=i.y;return i._bounds?i._bounds.clear().union(u):i._bounds=u.clone(),u.clear(),function(t,e,n){var r=e.padding,i=r-n.x,a=r-n.y;if(e.datum.title){var o=e.items[1].items[0],u=o.anchor,s=e.titlePadding||0,l=r-o.x,c=r-o.y;switch(o.orient){case Sy:i+=Math.ceil(o.bounds.width())+s;break;case By:case Ty:break;default:a+=o.bounds.height()+s}switch((i||a)&&Sv(t,n,i,a),o.orient){case Sy:c+=Fv(e,n,o,u,1,1);break;case By:l+=Fv(e,n,o,Oy,0,0)+s,c+=Fv(e,n,o,u,1,1);break;case Ty:l+=Fv(e,n,o,u,0,0),c+=Fv(e,n,o,Oy,-1,0,1)+s;break;default:l+=Fv(e,n,o,u,0,0)}(l||c)&&Sv(t,o,l,c),(l=Math.round(o.bounds.x1-r))<0&&(Sv(t,n,-l,0),Sv(t,o,-l,0))}else(i||a)&&Sv(t,n,i,a)}(t,i,i.items[0].items[0]),u=function(t,e){return t.items.forEach((t=>e.union(t.bounds))),e.x1=t.padding,e.y1=t.padding,e}(i,u),n=2*i.padding,r=2*i.padding,u.empty()||(n=Math.ceil(u.width()+n),r=Math.ceil(u.height()+r)),"symbol"===a.type&&function(t){const e=t.reduce(((t,e)=>(t[e.column]=Math.max(e.bounds.x2-e.x,t[e.column]||0),t)),{});t.forEach((t=>{t.width=e[t.column],t.height=t.bounds.y2-t.y}))}(i.items[0].items[0].items[0].items),o!==Hy&&(i.x=s=0,i.y=l=0),i.width=n,i.height=r,ep(u.set(s,l,s+n,l+r),i),i.mark.bounds.clear().union(u),i}function Fv(t,e,n,r,i,a,o){const u="symbol"!==t.datum.type,s=n.datum.vgrad,l=(!u||!a&&s||o?e:e.items[0]).bounds[i?"y2":"x2"]-t.padding,c=s&&a?l:0,f=s&&a?0:l,h=i<=0?0:Om(n);return Math.round(r===Ny?c:r===Oy?f-h:.5*(l-h))}function Sv(t,e,n,r){e.x+=n,e.y+=r,e.bounds.translate(n,r),e.mark.bounds.translate(n,r),t.dirty(e)}function Bv(t){Zi.call(this,null,t)}function Tv(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Nv(t){Zi.call(this,null,t)}function zv(t){Zi.call(this,null,t)}function Ov(){return wi({})}function Rv(t){Zi.call(this,null,t)}function Uv(t){Zi.call(this,[],t)}(0,m.XW)(Bv,Zi,{transform(t,e){const n=e.dataflow;return t.mark.items.forEach((e=>{t.layout&&function(t,e,n){var r,i,a,o,u,s,l,c=function(t){var e,n,r=t.items,i=r.length,a=0;const o={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;a{(a=t.orient||By)!==Hy&&(e[a]||(e[a]=[])).push(t)}));for(const r in e){const i=e[r];wv(t,i,Dv(i,r,n.legends,h,d,l,c))}p.forEach((e=>{const r=e.bounds;if(r.equals(e._bounds)||(e.bounds=e._bounds,t.dirty(e),e.bounds=r,t.dirty(e)),n.autosize&&"fit"===n.autosize.type)switch(e.orient){case Sy:case By:f.add(r.x1,0).add(r.x2,0);break;case Fy:case Ty:f.add(0,r.y1).add(0,r.y2)}else f.union(r)}))}f.union(h).union(d),r&&f.union(function(t,e,n,r,i){var a,o=e.items[0],u=o.frame,s=o.orient,l=o.anchor,c=o.offset,f=o.padding,h=o.items[0].items[0],d=o.items[1]&&o.items[1].items[0],p=s===Sy||s===By?r:n,m=0,g=0,y=0,v=0,x=0;if(u!==Ry?s===Sy?(m=i.y2,p=i.y1):s===By?(m=i.y1,p=i.y2):(m=i.x1,p=i.x2):s===Sy&&(m=r,p=0),a=l===Ny?m:l===Oy?p:(m+p)/2,d&&d.text){switch(s){case Fy:case Ty:x=h.bounds.height()+f;break;case Sy:v=h.bounds.width()+f;break;case By:v=-h.bounds.width()-f}fv.clear().union(d.bounds),fv.translate(v-(d.x||0),x-(d.y||0)),hv(d,"x",v)|hv(d,"y",x)&&(t.dirty(d),d.bounds.clear().union(fv),d.mark.bounds.clear().union(fv),t.dirty(d)),fv.clear().union(d.bounds)}else fv.clear();switch(fv.union(h.bounds),s){case Fy:g=a,y=i.y1-fv.height()-c;break;case Sy:g=i.x1-fv.width()-c,y=a;break;case By:g=i.x2+fv.width()+c,y=a;break;case Ty:g=a,y=i.y2+c;break;default:g=o.x,y=o.y}return hv(o,"x",g)|hv(o,"y",y)&&(fv.translate(g,y),t.dirty(o),o.bounds.clear().union(fv),e.bounds.clear().union(fv),t.dirty(o)),o.bounds}(t,r,l,c,f)),e.clip&&f.set(0,0,e.width||0,e.height||0),function(t,e,n,r){const i=r.autosize||{},a=i.type;if(t._autosize<1||!a)return;let o=t._width,u=t._height,s=Math.max(0,e.width||0),l=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,e.height||0),f=Math.max(0,Math.ceil(-n.y1));const h=Math.max(0,Math.ceil(n.x2-s)),d=Math.max(0,Math.ceil(n.y2-c));if("padding"===i.contains){const e=t.padding();o-=e.left+e.right,u-=e.top+e.bottom}a===Hy?(l=0,f=0,s=o,c=u):"fit"===a?(s=Math.max(0,o-l-h),c=Math.max(0,u-f-d)):"fit-x"===a?(s=Math.max(0,o-l-h),u=c+f+d):"fit-y"===a?(o=s+l+h,c=Math.max(0,u-f-d)):"pad"===a&&(o=s+l+h,u=c+f+d),t._resizeView(o,u,s,c,[l,f],i.resize)}(t,e,f,n)}(n,e,t)})),function(t){return t&&"legend-entry"!==t.mark.role}(t.mark.group)?e.reflow():e}}),(0,m.XW)(Nv,Zi,{transform(t,e){if(this.value&&!t.modified())return e.StopPropagation;var n=e.dataflow.locale(),r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=this.value,a=t.scale,o=Rh(a,null==t.count?t.values?t.values.length:10:t.count,t.minstep),u=t.format||qh(n,a,o,t.formatSpecifier,t.formatType,!!t.values),s=t.values?Uh(a,t.values,o):Lh(a,o);return i&&(r.rem=i),i=s.map(((t,e)=>wi({index:e/(s.length-1||1),value:t,label:u(t)}))),t.extra&&i.length&&i.push(wi({index:-1,extra:{value:i[0].value},label:""})),r.source=i,r.add=i,this.value=i,r}}),(0,m.XW)(zv,Zi,{transform(t,e){var n=e.dataflow,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.item||Ov,a=t.key||_i,o=this.value;return(0,m.kJ)(r.encode)&&(r.encode=null),o&&(t.modified("key")||e.modified(a))&&(0,m.vU)("DataJoin does not support modified key function or fields."),o||(e=e.addAll(),this.value=o=function(t){const e=(0,m.Xr)().test((t=>t.exit));return e.lookup=n=>e.get(t(n)),e}(a)),e.visit(e.ADD,(t=>{const e=a(t);let n=o.get(e);n?n.exit?(o.empty--,r.add.push(n)):r.mod.push(n):(n=i(t),o.set(e,n),r.add.push(n)),n.datum=t,n.exit=!1})),e.visit(e.MOD,(t=>{const e=a(t),n=o.get(e);n&&(n.datum=t,r.mod.push(n))})),e.visit(e.REM,(t=>{const e=a(t),n=o.get(e);t!==n.datum||n.exit||(r.rem.push(n),n.exit=!0,++o.empty)})),e.changed(e.ADD_MOD)&&r.modifies("datum"),(e.clean()||t.clean&&o.empty>n.cleanThreshold)&&n.runAfter(o.clean),r}}),(0,m.XW)(Rv,Zi,{transform(t,e){var n=e.fork(e.ADD_REM),r=t.mod||!1,i=t.encoders,a=e.encode;if((0,m.kJ)(a)){if(!n.changed()&&!a.every((t=>i[t])))return e.StopPropagation;a=a[0],n.encode=null}var o="enter"===a,u=i.update||m.k,s=i.enter||m.k,l=i.exit||m.k,c=(a&&!o?i[a]:u)||m.k;if(e.changed(e.ADD)&&(e.visit(e.ADD,(e=>{s(e,t),u(e,t)})),n.modifies(s.output),n.modifies(u.output),c!==m.k&&c!==u&&(e.visit(e.ADD,(e=>{c(e,t)})),n.modifies(c.output))),e.changed(e.REM)&&l!==m.k&&(e.visit(e.REM,(e=>{l(e,t)})),n.modifies(l.output)),o||c!==m.k){const i=e.MOD|(t.modified()?e.REFLOW:0);o?(e.visit(i,(e=>{const i=s(e,t)||r;(c(e,t)||i)&&n.mod.push(e)})),n.mod.length&&n.modifies(s.output)):e.visit(i,(e=>{(c(e,t)||r)&&n.mod.push(e)})),n.mod.length&&n.modifies(c.output)}return n.changed()?n:e.StopPropagation}}),(0,m.XW)(Uv,Zi,{transform(t,e){if(null!=this.value&&!t.modified())return e.StopPropagation;var n,r,i,a,o,u=e.dataflow.locale(),s=e.fork(e.NO_SOURCE|e.NO_FIELDS),l=this.value,c=t.type||Th,f=t.scale,h=+t.limit,d=Rh(f,null==t.count?5:t.count,t.minstep),p=!!t.values||c===Th,g=t.format||Xh(u,f,d,c,t.formatSpecifier,t.formatType,p),y=t.values||Wh(f,d);return l&&(s.rem=l),c===Th?(h&&y.length>h?(e.dataflow.warn("Symbol legend count exceeds limit, filtering items."),l=y.slice(0,h-1),o=!0):l=y,(0,m.mf)(i=t.size)?(t.values||0!==f(l[0])||(l=l.slice(1)),a=l.reduce(((e,n)=>Math.max(e,i(n,t))),0)):i=(0,m.a9)(a=i||8),l=l.map(((e,n)=>wi({index:n,label:g(e,n,l),value:e,offset:a,size:i(e,t)}))),o&&(o=y[l.length],l.push(wi({index:l.length,label:"…".concat(y.length-l.length," entries"),value:o,offset:a,size:i(o,t)})))):"gradient"===c?(n=f.domain(),r=Eh(f,n[0],(0,m.fj)(n)),y.length<3&&!t.values&&n[0]!==(0,m.fj)(n)&&(y=[n[0],(0,m.fj)(n)]),l=y.map(((t,e)=>wi({index:e,label:g(t,e,y),value:t,perc:r(t)})))):(i=y.length-1,r=function(t){const e=t.domain(),n=e.length-1;let r=+e[0],i=+(0,m.fj)(e),a=i-r;if(t.type===Gf){const t=n?a/n:.1;r-=t,i+=t,a=i-r}return t=>(t-r)/a}(f),l=y.map(((t,e)=>wi({index:e,label:g(t,e,y),value:t,perc:e?r(t):0,perc2:e===i?1:r(y[e+1])})))),s.source=l,s.add=l,this.value=l,s}});const Lv=t=>t.source.x,qv=t=>t.source.y,Pv=t=>t.target.x,jv=t=>t.target.y;function Iv(t){Zi.call(this,{},t)}Iv.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},(0,m.XW)(Iv,Zi,{transform(t,e){var n=t.sourceX||Lv,r=t.sourceY||qv,i=t.targetX||Pv,a=t.targetY||jv,o=t.as||"path",u=t.orient||"vertical",s=t.shape||"line",l=Hv.get(s+"-"+u)||Hv.get(s);return l||(0,m.vU)("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:"")),e.visit(e.SOURCE,(t=>{t[o]=l(n(t),r(t),i(t),a(t))})),e.reflow(t.modified()).modifies(o)}});const Wv=(t,e,n,r)=>"M"+t+","+e+"L"+n+","+r,Xv=(t,e,n,r)=>{var i=n-t,a=r-e,o=Math.sqrt(i*i+a*a)/2;return"M"+t+","+e+"A"+o+","+o+" "+180*Math.atan2(a,i)/Math.PI+" 0 1 "+n+","+r},$v=(t,e,n,r)=>{const i=n-t,a=r-e,o=.2*(i+a),u=.2*(a-i);return"M"+t+","+e+"C"+(t+o)+","+(e+u)+" "+(n+u)+","+(r-o)+" "+n+","+r},Hv=(0,m.Xr)({line:Wv,"line-radial":(t,e,n,r)=>Wv(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),arc:Xv,"arc-radial":(t,e,n,r)=>Xv(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),curve:$v,"curve-radial":(t,e,n,r)=>$v(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),"orthogonal-horizontal":(t,e,n,r)=>"M"+t+","+e+"V"+r+"H"+n,"orthogonal-vertical":(t,e,n,r)=>"M"+t+","+e+"H"+n+"V"+r,"orthogonal-radial":(t,e,n,r)=>{const i=Math.cos(t),a=Math.sin(t),o=Math.cos(n),u=Math.sin(n);return"M"+e*i+","+e*a+"A"+e+","+e+" 0 0,"+((Math.abs(n-t)>Math.PI?n<=t:n>t)?1:0)+" "+e*o+","+e*u+"L"+r*o+","+r*u},"diagonal-horizontal":(t,e,n,r)=>{const i=(t+n)/2;return"M"+t+","+e+"C"+i+","+e+" "+i+","+r+" "+n+","+r},"diagonal-vertical":(t,e,n,r)=>{const i=(e+r)/2;return"M"+t+","+e+"C"+t+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":(t,e,n,r)=>{const i=Math.cos(t),a=Math.sin(t),o=Math.cos(n),u=Math.sin(n),s=(e+r)/2;return"M"+e*i+","+e*a+"C"+s*i+","+s*a+" "+s*o+","+s*u+" "+r*o+","+r*u}});function Yv(t){Zi.call(this,null,t)}function Jv(t){return gh(t)&&t!==Hf}Yv.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},(0,m.XW)(Yv,Zi,{transform(t,e){var n,r,i,a=t.as||["startAngle","endAngle"],o=a[0],u=a[1],s=t.field||m.kX,l=t.startAngle||0,c=null!=t.endAngle?t.endAngle:2*Math.PI,f=e.source,h=f.map(s),d=h.length,p=l,g=(c-l)/Tv(h),y=io(d);for(t.sort&&y.sort(((t,e)=>h[t]-h[e])),n=0;nt+(e<0?-1:e>0?1:0)),0))!==e.length&&n.warn("Log scale domain includes zero: "+(0,m.m8)(e)),e}function Zv(t,e,n){return(0,m.mf)(t)&&(e||n)?kh(t,Qv(e||[0,1],n)):t}function Qv(t,e){return e?t.slice().reverse():t}function tx(t){Zi.call(this,null,t)}(0,m.XW)(Gv,Zi,{transform(t,e){var n=e.dataflow,r=this.value,i=function(t){var e,n=t.type,r="";return n===Hf?"sequential-linear":(function(t){const e=t.type;return gh(e)&&e!==Xf&&e!==$f&&(t.scheme||t.range&&t.range.length&&t.range.every(m.HD))}(t)&&(r=2===(e=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(null!=t.domainMid):0)?"sequential-":3===e?"diverging-":""),(r+n||qf).toLowerCase())}(t);for(i in r&&i===r.type||(this.value=r=dh(i)()),t)if(!Vv[i]){if("padding"===i&&Jv(r.type))continue;(0,m.mf)(r[i])?r[i](t[i]):n.warn("Unsupported scale property: "+i)}return function(t,e,n){var r=t.type,i=e.round||!1,a=e.range;if(null!=e.rangeStep)a=function(t,e,n){t!==Qf&&t!==Zf&&(0,m.vU)("Only band and point scales support rangeStep.");var r=(null!=e.paddingOuter?e.paddingOuter:e.padding)||0,i=t===Zf?1:(null!=e.paddingInner?e.paddingInner:e.padding)||0;return[0,e.rangeStep*Lf(n,i,r)]}(r,e,n);else if(e.scheme&&(a=function(t,e,n){var r,i=e.schemeExtent;return(0,m.kJ)(e.scheme)?r=Mh(e.scheme,e.interpolate,e.interpolateGamma):(r=Bh(e.scheme.toLowerCase()))||(0,m.vU)("Unrecognized scheme name: ".concat(e.scheme)),n=t===Gf?n+1:t===th?n-1:t===Jf||t===Vf?+e.schemeCount||5:n,_h(t)?Zv(r,i,e.reverse):(0,m.mf)(r)?Ah(Zv(r,i),n):t===Kf?r:r.slice(0,n)}(r,e,n),(0,m.mf)(a))){if(t.interpolator)return t.interpolator(a);(0,m.vU)("Scale type ".concat(r," does not support interpolating color schemes."))}if(a&&_h(r))return t.interpolator(Mh(Qv(a,e.reverse),e.interpolate,e.interpolateGamma));a&&e.interpolate&&t.interpolate?t.interpolate(Dh(e.interpolate,e.interpolateGamma)):(0,m.mf)(t.round)?t.round(i):(0,m.mf)(t.rangeRound)&&t.interpolate(i?nc:ec),a&&t.range(Qv(a,e.reverse))}(r,t,function(t,e,n){let r=e.bins;if(r&&!(0,m.kJ)(r)){const e=t.domain(),n=e[0],i=(0,m.fj)(e),a=r.step;let o=null==r.start?n:r.start,u=null==r.stop?i:r.stop;a||(0,m.vU)("Scale bins parameter missing step property."),oi&&(u=a*Math.floor(i/a)),r=io(o,u+a/2,a)}return r?t.bins=r:t.bins&&delete t.bins,t.type===th&&(r?e.domain||e.domainRaw||(t.domain(r),n=r.length):t.bins=t.domain()),n}(r,t,function(t,e,n){const r=function(t,e,n){return e?(t.domain(Kv(t.type,e,n)),e.length):-1}(t,e.domainRaw,n);if(r>-1)return r;var i,a,o=e.domain,u=t.type,s=e.zero||void 0===e.zero&&function(t){const e=t.type;return!t.bins&&(e===qf||e===jf||e===If)}(t);if(!o)return 0;if(Jv(u)&&e.padding&&o[0]!==(0,m.fj)(o)&&(o=function(t,e,n,r,i,a){var o=Math.abs((0,m.fj)(n)-n[0]),u=o/(o-2*r),s=t===Pf?(0,m.dH)(e,null,u):t===If?(0,m.mK)(e,null,u,.5):t===jf?(0,m.mK)(e,null,u,i||1):t===Wf?(0,m.bV)(e,null,u,a||1):(0,m.ay)(e,null,u);return(e=e.slice())[0]=s[0],e[e.length-1]=s[1],e}(u,o,e.range,e.padding,e.exponent,e.constant)),(s||null!=e.domainMin||null!=e.domainMax||null!=e.domainMid)&&(i=(o=o.slice()).length-1||1,s&&(o[0]>0&&(o[0]=0),o[i]<0&&(o[i]=0)),null!=e.domainMin&&(o[0]=e.domainMin),null!=e.domainMax&&(o[i]=e.domainMax),null!=e.domainMid)){const t=(a=e.domainMid)>o[i]?i+1:at(s);if(null==e)d.push(t.slice());else for(i={},a=0,o=t.length;ah&&(h=f),n&&c.sort(n)}return d.max=h,d}(e.source,t.groupby,l,c),r=0,i=n.length,a=n.max;rt;function cx(t,e){t&&hx.hasOwnProperty(t.type)&&hx[t.type](t,e)}var fx={Feature:function(t,e){cx(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0){for(a=t[--i];i>0&&(e=a,n=t[--i],a=e+n,r=n-(a-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=a+n,n==e-a&&(a=e))}return a}}var yx=1e-6,vx=1e-12,xx=Math.PI,_x=xx/2,bx=xx/4,wx=2*xx,kx=180/xx,Mx=xx/180,Ax=Math.abs,Ex=Math.atan,Dx=Math.atan2,Cx=Math.cos,Fx=Math.ceil,Sx=Math.exp,Bx=(Math.floor,Math.hypot),Tx=Math.log,Nx=Math.pow,zx=Math.sin,Ox=Math.sign||function(t){return t>0?1:t<0?-1:0},Rx=Math.sqrt,Ux=Math.tan;function Lx(t){return t>1?0:t<-1?xx:Math.acos(t)}function qx(t){return t>1?_x:t<-1?-_x:Math.asin(t)}function Px(){}var jx,Ix,Wx,Xx,$x=new gx,Hx=new gx,Yx={point:Px,lineStart:Px,lineEnd:Px,polygonStart:function(){Yx.lineStart=Jx,Yx.lineEnd=Kx},polygonEnd:function(){Yx.lineStart=Yx.lineEnd=Yx.point=Px,$x.add(Ax(Hx)),Hx=new gx},result:function(){var t=$x/2;return $x=new gx,t}};function Jx(){Yx.point=Vx}function Vx(t,e){Yx.point=Gx,jx=Wx=t,Ix=Xx=e}function Gx(t,e){Hx.add(Xx*t-Wx*e),Wx=t,Xx=e}function Kx(){Gx(jx,Ix)}const Zx=Yx;var Qx=1/0,t_=Qx,e_=-Qx,n_=e_;const r_={point:function(t,e){te_&&(e_=t),en_&&(n_=e)},lineStart:Px,lineEnd:Px,polygonStart:Px,polygonEnd:Px,result:function(){var t=[[Qx,t_],[e_,n_]];return e_=n_=-(t_=Qx=1/0),t}};var i_,a_,o_,u_,s_=0,l_=0,c_=0,f_=0,h_=0,d_=0,p_=0,m_=0,g_=0,y_={point:v_,lineStart:x_,lineEnd:w_,polygonStart:function(){y_.lineStart=k_,y_.lineEnd=M_},polygonEnd:function(){y_.point=v_,y_.lineStart=x_,y_.lineEnd=w_},result:function(){var t=g_?[p_/g_,m_/g_]:d_?[f_/d_,h_/d_]:c_?[s_/c_,l_/c_]:[NaN,NaN];return s_=l_=c_=f_=h_=d_=p_=m_=g_=0,t}};function v_(t,e){s_+=t,l_+=e,++c_}function x_(){y_.point=__}function __(t,e){y_.point=b_,v_(o_=t,u_=e)}function b_(t,e){var n=t-o_,r=e-u_,i=Rx(n*n+r*r);f_+=i*(o_+t)/2,h_+=i*(u_+e)/2,d_+=i,v_(o_=t,u_=e)}function w_(){y_.point=v_}function k_(){y_.point=A_}function M_(){E_(i_,a_)}function A_(t,e){y_.point=E_,v_(i_=o_=t,a_=u_=e)}function E_(t,e){var n=t-o_,r=e-u_,i=Rx(n*n+r*r);f_+=i*(o_+t)/2,h_+=i*(u_+e)/2,d_+=i,p_+=(i=u_*t-o_*e)*(o_+t),m_+=i*(u_+e),g_+=3*i,v_(o_=t,u_=e)}const D_=y_;function C_(t){this._context=t}C_.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,wx)}},result:Px};var F_,S_,B_,T_,N_,z_=new gx,O_={point:Px,lineStart:function(){O_.point=R_},lineEnd:function(){F_&&U_(S_,B_),O_.point=Px},polygonStart:function(){F_=!0},polygonEnd:function(){F_=null},result:function(){var t=+z_;return z_=new gx,t}};function R_(t,e){O_.point=U_,S_=T_=t,B_=N_=e}function U_(t,e){T_-=t,N_-=e,z_.add(Rx(T_*T_+N_*N_)),T_=t,N_=e}const L_=O_;function q_(){this._string=[]}function P_(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function j_(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),mx(t,n(r))),r.result()}return a.area=function(t){return mx(t,n(Zx)),Zx.result()},a.measure=function(t){return mx(t,n(L_)),L_.result()},a.bounds=function(t){return mx(t,n(r_)),r_.result()},a.centroid=function(t){return mx(t,n(D_)),D_.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,lx):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new q_):new C_(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function I_(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Px,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function W_(t,e){return Ax(t[0]-e[0])=0;--a)i.point((c=l[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function H_(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=A*M,D=E>xx,C=g*w;if(s.add(Dx(C*A*zx(E),y*k+C*Cx(E))),o+=D?M+A*wx:M,D^p>=n^_>=n){var F=G_(J_(d),J_(x));Q_(F);var S=G_(a,F);Q_(S);var B=(D^M>=0?-1:1)*qx(S[2]);(r>B||r===B&&(F[0]||F[1]))&&(u+=D^M>=0?1:-1)}}return(o<-1e-6||o0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t1&&2&s&&h.push(h.pop().concat(h.shift())),o.push(h.filter(rb))}return h}}function rb(t){return t.length>1}function ib(t,e){return((t=t.x)[0]<0?t[1]-_x-yx:_x-t[1])-((e=e.x)[0]<0?e[1]-_x-yx:_x-e[1])}q_.prototype={_radius:4.5,_circle:P_(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=P_(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};const ab=nb((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var u=a>0?xx:-xx,s=Ax(a-n);Ax(s-xx)0?_x:-_x),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):i!==u&&s>=xx&&(Ax(n-i)yx?Ex((zx(e)*(a=Cx(r))*zx(n)-zx(r)*(i=Cx(e))*zx(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=a,r=o),i=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*_x,r.point(-xx,i),r.point(0,i),r.point(xx,i),r.point(xx,0),r.point(xx,-i),r.point(0,-i),r.point(-xx,-i),r.point(-xx,0),r.point(-xx,i);else if(Ax(t[0]-e[0])>yx){var a=t[0]0,i=Ax(e)>yx;function a(t,n){return Cx(t)*Cx(n)>e}function o(t,n,r){var i=[1,0,0],a=G_(J_(t),J_(n)),o=V_(a,a),u=a[0],s=o-u*u;if(!s)return!r&&t;var l=e*o/s,c=-e*u/s,f=G_(i,a),h=Z_(i,l);K_(h,Z_(a,c));var d=f,p=V_(h,d),m=V_(d,d),g=p*p-m*(V_(h,h)-1);if(!(g<0)){var y=Rx(g),v=Z_(d,(-p-y)/m);if(K_(v,h),v=Y_(v),!r)return v;var x,_=t[0],b=n[0],w=t[1],k=n[1];b<_&&(x=_,_=b,b=x);var M=b-_,A=Ax(M-xx)0^v[1]<(Ax(v[0]-_)xx^(_<=v[0]&&v[0]<=b)){var E=Z_(d,(-p+y)/m);return K_(E,h),[v,Y_(E)]}}}function u(e,n){var i=r?t:xx-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return nb(a,(function(t){var e,n,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var d,p=[f,h],m=a(f,h),g=r?m?0:u(f,h):m?u(f+(f<0?xx:-xx),h):0;if(!e&&(l=s=m)&&t.lineStart(),m!==s&&(!(d=o(e,p))||W_(e,d)||W_(p,d))&&(p[2]=1),m!==s)c=0,m?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^m){var y;g&n||!(y=o(p,e,!0))||(c=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&W_(e,p)||t.point(p[0],p[1]),e=p,s=m,n=g},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(l&&s)<<1}}}),(function(e,r,i,a){!function(t,e,n,r,i,a){if(n){var o=Cx(e),u=zx(e),s=r*n;null==i?(i=e+r*wx,a=e-s/2):(i=ob(o,i),a=ob(o,a),(r>0?ia)&&(i+=r*wx));for(var l,c=i;r>0?c>a:c0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+u+4)%4)!==f);else l.point(a[0],a[1])}function o(r,i){return Ax(r[0]-t)0?0:3:Ax(r[0]-n)0?2:1:Ax(r[1]-e)0?1:0:i>0?3:2}function u(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var s,l,c,f,h,d,p,m,g,y,v,x=o,_=I_(),b={point:w,lineStart:function(){b.point=k,l&&l.push(c=[]),y=!0,g=!1,p=m=NaN},lineEnd:function(){s&&(k(f,h),d&&g&&_.rejoin(),s.push(_.result())),b.point=w,g&&x.lineEnd()},polygonStart:function(){x=_,s=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;nr&&(h-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(h-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(s=eb(s)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&$_(s,u,e,a,o),o.polygonEnd()),x=o,s=l=c=null}};function w(t,e){i(t,e)&&x.point(t,e)}function k(a,o){var u=i(a,o);if(l&&c.push([a,o]),y)f=a,h=o,d=u,y=!1,u&&(x.lineStart(),x.point(a,o));else if(u&&g)x.point(a,o);else{var s=[p=Math.max(lb,Math.min(sb,p)),m=Math.max(lb,Math.min(sb,m))],_=[a=Math.max(lb,Math.min(sb,a)),o=Math.max(lb,Math.min(sb,o))];!function(t,e,n,r,i,a){var o,u=t[0],s=t[1],l=0,c=1,f=e[0]-u,h=e[1]-s;if(o=n-u,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>c)return;o>l&&(l=o)}if(o=i-u,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>l&&(l=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>c)return;o>l&&(l=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>l&&(l=o)}else if(h>0){if(o0&&(t[0]=u+l*f,t[1]=s+l*h),c<1&&(e[0]=u+c*f,e[1]=s+c*h),!0}}}}}(s,_,t,e,n,r)?u&&(x.lineStart(),x.point(a,o),v=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(_[0],_[1]),u||x.lineEnd(),v=!1)}p=a,m=o,g=u}return b}}function fb(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function hb(t,e){return[Ax(t)>xx?t+Math.round(-t/wx)*wx:t,e]}function db(t,e,n){return(t%=wx)?e||n?fb(mb(t),gb(e,n)):mb(t):e||n?gb(e,n):hb}function pb(t){return function(e,n){return[(e+=t)>xx?e-wx:e<-xx?e+wx:e,n]}}function mb(t){var e=pb(t);return e.invert=pb(-t),e}function gb(t,e){var n=Cx(t),r=zx(t),i=Cx(e),a=zx(e);function o(t,e){var o=Cx(e),u=Cx(t)*o,s=zx(t)*o,l=zx(e),c=l*n+u*r;return[Dx(s*i-c*a,u*n-l*r),qx(c*i+s*a)]}return o.invert=function(t,e){var o=Cx(e),u=Cx(t)*o,s=zx(t)*o,l=zx(e),c=l*i-s*a;return[Dx(s*i+l*a,u*n+c*r),qx(c*n-u*r)]},o}function yb(t){return function(e){var n=new vb;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vb(){}function xb(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),mx(n,t.stream(r_)),e(r_.result()),null!=r&&t.clipExtent(r),t}function _b(t,e,n){return xb(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,u])}),n)}function bb(t,e,n){return _b(t,[[0,0],e],n)}function wb(t,e,n){return xb(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function kb(t,e,n){return xb(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}hb.invert=hb,vb.prototype={constructor:vb,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Mb=Cx(30*Mx);function Ab(t,e){return+e?function(t,e){function n(r,i,a,o,u,s,l,c,f,h,d,p,m,g){var y=l-r,v=c-i,x=y*y+v*v;if(x>4*e&&m--){var _=o+h,b=u+d,w=s+p,k=Rx(_*_+b*b+w*w),M=qx(w/=k),A=Ax(Ax(w)-1)e||Ax((y*F+v*S)/x-.5)>.3||o*h+u*d+s*p2?t[2]%360*Mx:0,F()):[g*kx,y*kx,v*kx]},D.angle=function(t){return arguments.length?(x=t%360*Mx,F()):x*kx},D.reflectX=function(t){return arguments.length?(_=t?-1:1,F()):_<0},D.reflectY=function(t){return arguments.length?(b=t?-1:1,F()):b<0},D.precision=function(t){return arguments.length?(o=Ab(u,E=t*t),S()):Rx(E)},D.fitExtent=function(t,e){return _b(D,t,e)},D.fitSize=function(t,e){return bb(D,t,e)},D.fitWidth=function(t,e){return wb(D,t,e)},D.fitHeight=function(t,e){return kb(D,t,e)},function(){return e=t.apply(this,arguments),D.invert=e.invert&&C,F()}}function Sb(t){var e=0,n=xx/3,r=Fb(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Mx,n=t[1]*Mx):[e*kx,n*kx]},i}function Bb(t,e){var n=zx(t),r=(n+zx(e))/2;if(Ax(r)2?t[2]*Mx:0),e.invert=function(e){return(e=t.invert(e[0]*Mx,e[1]*Mx))[0]*=kx,e[1]*=kx,e},e}(i.rotate()).invert([0,0]));return s(null==l?[[u[0]-a,u[1]-a],[u[0]+a,u[1]+a]]:t===Lb?[[Math.max(u[0]-a,l),e],[Math.min(u[0]+a,n),r]]:[[l,Math.max(u[1]-a,e)],[n,Math.min(u[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),c()):o()},i.translate=function(t){return arguments.length?(u(t),c()):u()},i.center=function(t){return arguments.length?(a(t),c()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==l?null:[[l,e],[n,r]]},c()}function Pb(t){return Ux((_x+t)/2)}function jb(t,e){var n=Cx(t),r=t===e?zx(t):Tx(n/Cx(e))/Tx(Pb(e)/Pb(t)),i=n*Nx(Pb(t),r)/r;if(!r)return Lb;function a(t,e){i>0?e<-_x+yx&&(e=-_x+yx):e>_x-yx&&(e=_x-yx);var n=i/Nx(Pb(e),r);return[n*zx(r*t),i-n*Cx(r*t)]}return a.invert=function(t,e){var n=i-e,a=Ox(r)*Rx(t*t+n*n),o=Dx(t,Ax(n))*Ox(n);return n*r<0&&(o-=xx*Ox(t)*Ox(n)),[o/r,2*Ex(Nx(i/a,1/r))-_x]},a}function Ib(t,e){return[t,e]}function Wb(t,e){var n=Cx(t),r=t===e?zx(t):(n-Cx(e))/(e-t),i=n/r+t;if(Ax(r)yx&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},Zb.invert=Ob(qx),Qb.invert=Ob((function(t){return 2*Ex(t)})),tw.invert=function(t,e){return[-e,2*Ex(Sx(t))-_x]};var ew=Math.abs,nw=(Math.atan,Math.atan2,Math.ceil,Math.cos),rw=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),iw=(Math.tan,Math.PI),aw=iw/2,ow=(Math.SQRT1_2,sw(2));function uw(t){return t>1?aw:t<-1?-aw:Math.asin(t)}function sw(t){return t>0?Math.sqrt(t):0}function lw(t,e){var n,r=t*rw(e),i=30;do{e-=n=(e+rw(e)-r)/(1+nw(e))}while(ew(n)>1e-6&&--i>0);return e/2}sw(iw);var cw=function(t,e,n){function r(r,i){return[t*r*nw(i=lw(n,i)),e*rw(i)]}return r.invert=function(r,i){return i=uw(i/e),[r/(t*nw(i)),uw((2*i+rw(2*i))/n)]},r}(ow/aw,ow,iw);const fw=j_(),hw=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function dw(t,e){return function n(){const r=e();return r.type=t,r.path=j_().projection(r),r.copy=r.copy||function(){const t=n();return hw.forEach((e=>{r[e]&&t[e](r[e]())})),t.path.pointRadius(r.path.pointRadius()),t},r}}function pw(t,e){if(!t||"string"!=typeof t)throw new Error("Projection type must be a name string.");return t=t.toLowerCase(),arguments.length>1?(gw[t]=dw(t,e),this):gw[t]||null}function mw(t){return t&&t.path||fw}const gw={albers:Nb,albersusa:function(){var t,e,n,r,i,a,o=Nb(),u=Tb().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Tb().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e]}};function c(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function f(){return t=e=null,c}return c.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(t)},c.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),u.stream(n),s.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}};for(const t in gw)pw(t,gw[t]);function yw(t,e,n){var r=io(t,e-yx,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function vw(t,e,n){var r=io(t,e-yx,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function xw(){}const _w=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function bw(){var t=1,e=1,n=o;function r(t,e){return e.map((e=>i(t,e)))}function i(r,i){var o=[],u=[];return function(n,r,i){var o,u,s,l,c,f,h=new Array,d=new Array;for(o=u=-1,l=n[0]>=r,_w[l<<1].forEach(p);++o=r,_w[s|l<<1].forEach(p);for(_w[l<<0].forEach(p);++u=r,c=n[u*t]>=r,_w[l<<1|c<<2].forEach(p);++o=r,f=c,c=n[u*t+o+1]>=r,_w[s|l<<1|c<<2|f<<3].forEach(p);_w[l|c<<3].forEach(p)}for(o=-1,c=n[u*t]>=r,_w[c<<2].forEach(p);++o=r,_w[c<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+o,t[0][1]+u],s=[t[1][0]+o,t[1][1]+u],l=a(r),c=a(s);(e=d[l])?(n=h[c])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(s),i(e.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(s),d[e.end=c]=e):(e=h[c])?(n=d[l])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(s),i(e.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=l]=e):h[l]=d[c]={start:l,end:c,ring:[r,s]}}_w[c<<3].forEach(p)}(r,i,(t=>{n(t,r,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?o.push([t]):u.push(t)})),u.forEach((t=>{for(var e,n=0,r=o.length;n{var a,o=n[0],u=n[1],s=0|o,l=0|u,c=r[l*t+s];o>0&&o0&&u=0&&a>=0||(0,m.vU)("invalid size"),t=i,e=a,r},r.smooth=function(t){return arguments.length?(n=t?o:xw,r):n===o},r}function ww(t,e){for(var n,r=-1,i=e.length;++rr!=d>r&&n<(h-l)*(r-c)/(d-c)+l&&(i=-i)}return i}function Mw(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Aw(t,e,n){return function(r){var i=(0,m.We)(r),a=n?Math.min(i[0],0):i[0],o=i[1],u=o-a,s=e?at(a,o,t):u/(t+1);return io(a+s,o,s)}}function Ew(t){Zi.call(this,null,t)}function Dw(t,e,n,r,i){const a=t.x1||0,o=t.y1||0,u=e*n<0;function s(t){t.forEach(l)}function l(t){u&&t.reverse(),t.forEach(c)}function c(t){t[0]=(t[0]-a)*e+r,t[1]=(t[1]-o)*n+i}return function(t){return t.coordinates.forEach(s),t}}function Cw(t,e,n){const r=t>=0?t:da(e,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function Fw(t){return(0,m.mf)(t)?t:(0,m.a9)(+t)}function Sw(){var t=t=>t[0],e=t=>t[1],n=m.kX,r=[-1,-1],i=960,a=500,o=2;function u(u,s){const l=Cw(r[0],u,t)>>o,c=Cw(r[1],u,e)>>o,f=l?l+2:0,h=c?c+2:0,d=2*f+(i>>o),p=2*h+(a>>o),m=new Float32Array(d*p),g=new Float32Array(d*p);let y=m;u.forEach((r=>{const i=f+(+t(r)>>o),a=h+(+e(r)>>o);i>=0&&i=0&&a0&&c>0?(Bw(d,p,m,g,l),Tw(d,p,g,m,c),Bw(d,p,m,g,l),Tw(d,p,g,m,c),Bw(d,p,m,g,l),Tw(d,p,g,m,c)):l>0?(Bw(d,p,m,g,l),Bw(d,p,g,m,l),Bw(d,p,m,g,l),y=g):c>0&&(Tw(d,p,m,g,c),Tw(d,p,g,m,c),Tw(d,p,m,g,c),y=g);const v=s?Math.pow(2,-2*o):1/Tv(y);for(let t=0,e=d*p;t>o),y2:h+(a>>o)}}return u.x=function(e){return arguments.length?(t=Fw(e),u):t},u.y=function(t){return arguments.length?(e=Fw(t),u):e},u.weight=function(t){return arguments.length?(n=Fw(t),u):n},u.size=function(t){if(!arguments.length)return[i,a];var e=+t[0],n=+t[1];return e>=0&&n>=0||(0,m.vU)("invalid size"),i=e,a=n,u},u.cellSize=function(t){return arguments.length?((t=+t)>=1||(0,m.vU)("invalid cell size"),o=Math.floor(Math.log(t)/Math.LN2),u):1<=i&&(e>=a&&(u-=n[e-a+o*t]),r[e-i+o*t]=u/Math.min(e+1,t-1+a-e,a))}function Tw(t,e,n,r,i){const a=1+(i<<1);for(let o=0;o=i&&(u>=a&&(s-=n[o+(u-a)*t]),r[o+(u-i)*t]=s/Math.min(u+1,e-1+a-u,a))}function Nw(t){Zi.call(this,null,t)}Ew.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},(0,m.XW)(Ew,Zi,{transform(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=e.materialize(e.SOURCE).source,i=t.field||m.yR,a=bw().smooth(!1!==t.smooth),o=t.thresholds||function(t,e,n){const r=Aw(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(t.map((t=>na(e(t).values))))}(r,i,t),u=null===t.as?null:t.as||"contour",s=[];return r.forEach((e=>{const n=i(e),r=a.size([n.width,n.height])(n.values,(0,m.kJ)(o)?o:o(n.values));!function(t,e,n,r){let i=r.scale||e.scale,a=r.translate||e.translate;if((0,m.mf)(i)&&(i=i(n,r)),(0,m.mf)(a)&&(a=a(n,r)),(1===i||null==i)&&!a)return;const o=((0,m.hj)(i)?i:i[0])||1,u=((0,m.hj)(i)?i:i[1])||1,s=a&&a[0]||0,l=a&&a[1]||0;t.forEach(Dw(e,o,u,s,l))}(r,n,e,t),r.forEach((t=>{s.push(Mi(e,wi(null!=u?{[u]:t}:t)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=s,n}}),Nw.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const zw=["x","y","weight","size","cellSize","bandwidth"];function Ow(t,e){return zw.forEach((n=>null!=e[n]?t[n](e[n]):0)),t}function Rw(t){Zi.call(this,null,t)}(0,m.XW)(Nw,Zi,{transform(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var n,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=function(t,e){var n,r,i,a,o,u,s=[],l=t=>t(a);if(null==e)s.push(t);else for(n={},r=0,i=t.length;rwi(function(t,e){for(let n=0;nyx})).map(s)).concat(io(Fx(a/d)*d,i,d).filter((function(t){return Ax(t%m)>yx})).map(l))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(o).slice(1),c(n).reverse().slice(1),f(u).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),u>o&&(t=u,u=o,o=t),y.precision(g)):[[r,u],[n,o]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(g)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],m=+t[1],y):[p,m]},y.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],y):[h,d]},y.precision=function(h){return arguments.length?(g=+h,s=yw(a,i,90),l=vw(e,t,g),c=yw(u,o,90),f=vw(r,n,g),y):g},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()}function Xw(t){Zi.call(this,null,t)}function $w(t){if(!(0,m.mf)(t))return!1;const e=(0,m.Rg)((0,m.Oj)(t));return e.$x||e.$y||e.$value||e.$max}function Hw(t){Zi.call(this,null,t),this.modified(!0)}function Yw(t,e,n){(0,m.mf)(t[e])&&t[e](n)}function Jw(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,u,s,l,c,f,h,d=t._root,p={data:r},m=t._x0,g=t._y0,y=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(a=(m+y)/2))?m=a:y=a,(c=n>=(o=(g+v)/2))?g=o:v=o,i=d,!(d=d[f=c<<1|l]))return i[f]=p,t;if(u=+t._x.call(null,d.data),s=+t._y.call(null,d.data),e===u&&n===s)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=e>=(a=(m+y)/2))?m=a:y=a,(c=n>=(o=(g+v)/2))?g=o:v=o}while((f=c<<1|l)==(h=(s>=o)<<1|u>=a));return i[h]=d,i[f]=p,t}function Vw(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Gw(t){return t[0]}function Kw(t){return t[1]}function Zw(t,e,n){var r=new Qw(null==e?Gw:e,null==n?Kw:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Qw(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function tk(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}qw.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},(0,m.XW)(qw,Zi,{transform(t,e){var n,r=this._features,i=this._points,a=t.fields,o=a&&a[0],u=a&&a[1],s=t.geojson||!a&&m.yR,l=e.ADD;n=t.modified()||e.changed(e.REM)||e.modified((0,m.Oj)(s))||o&&e.modified((0,m.Oj)(o))||u&&e.modified((0,m.Oj)(u)),this.value&&!n||(l=e.SOURCE,this._features=r=[],this._points=i=[]),s&&e.visit(l,(t=>r.push(s(t)))),o&&u&&(e.visit(l,(t=>{var e=o(t),n=u(t);null!=e&&null!=n&&(e=+e)===e&&(n=+n)===n&&i.push([e,n])})),r=r.concat({type:Uw,geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:Lw,features:r}}}),Pw.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},(0,m.XW)(Pw,Zi,{transform(t,e){var n=e.fork(e.ALL),r=this.value,i=t.field||m.yR,a=t.as||"path",o=n.SOURCE;!r||t.modified()?(this.value=r=mw(t.projection),n.materialize().reflow()):o=i===m.yR||e.modified(i.fields)?n.ADD_MOD:n.ADD;const u=function(t,e){const n=t.pointRadius();return t.context(null),null!=e&&t.pointRadius(e),n}(r,t.pointRadius);return n.visit(o,(t=>t[a]=r(i(t)))),r.pointRadius(u),n.modifies(a)}}),jw.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},(0,m.XW)(jw,Zi,{transform(t,e){var n,r=t.projection,i=t.fields[0],a=t.fields[1],o=t.as||["x","y"],u=o[0],s=o[1];function l(t){const e=r([i(t),a(t)]);e?(t[u]=e[0],t[s]=e[1]):(t[u]=void 0,t[s]=void 0)}return t.modified()?e=e.materialize().reflow(!0).visit(e.SOURCE,l):(n=e.modified(i.fields)||e.modified(a.fields),e.visit(n?e.ADD_MOD:e.ADD,l)),e.modifies(o)}}),Iw.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},(0,m.XW)(Iw,Zi,{transform(t,e){var n=e.fork(e.ALL),r=this.value,i=t.as||"shape",a=n.ADD;return r&&!t.modified()||(this.value=r=function(t,e,n){const r=null==n?n=>t(e(n)):r=>{var i=t.pointRadius(),a=t.pointRadius(n)(e(r));return t.pointRadius(i),a};return r.context=e=>(t.context(e),r),r}(mw(t.projection),t.field||(0,m.EP)("datum"),t.pointRadius),n.materialize().reflow(),a=n.SOURCE),n.visit(a,(t=>t[i]=r)),n.modifies(i)}}),Ww.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},(0,m.XW)(Ww,Zi,{transform(t,e){var n,r=this.value,i=this.generator;if(!r.length||t.modified())for(const e in t)(0,m.mf)(i[e])&&i[e](t[e]);return n=i(),r.length?e.mod.push(Ai(r[0],n)):e.add.push(wi(n)),r[0]=n,e}}),Xw.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},(0,m.XW)(Xw,Zi,{transform(t,e){if(!e.changed()&&!t.modified())return e.StopPropagation;var n=e.materialize(e.SOURCE).source,r="shared"===t.resolve,i=t.field||m.yR,a=function(t,e){let n;return(0,m.mf)(t)?(n=n=>t(n,e),n.dep=$w(t)):t?n=(0,m.a9)(t):(n=t=>t.$value/t.$max||0,n.dep=!0),n}(t.opacity,t),o=function(t,e){let n;return(0,m.mf)(t)?(n=n=>Ml(t(n,e)),n.dep=$w(t)):n=(0,m.a9)(Ml(t||"#888")),n}(t.color,t),u=t.as||"image",s={$x:0,$y:0,$value:0,$max:r?na(n.map((t=>na(i(t).values)))):0};return n.forEach((t=>{const e=i(t),n=(0,m.l7)({},t,s);r||(n.$max=na(e.values||[])),t[u]=function(t,e,n,r){const i=t.width,a=t.height,o=t.x1||0,u=t.y1||0,s=t.x2||i,l=t.y2||a,c=t.values,f=c?t=>c[t]:m.bM,h=$s(s-o,l-u),d=h.getContext("2d"),p=d.getImageData(0,0,s-o,l-u),g=p.data;for(let t=u,a=0;t{null!=t[e]&&Yw(n,e,t[e])}))):hw.forEach((e=>{t.modified(e)&&Yw(n,e,t[e])})),null!=t.pointRadius&&n.path.pointRadius(t.pointRadius),t.fit&&function(t,e){const n=function(t){return 1===(t=(0,m.IX)(t)).length?t[0]:{type:Lw,features:t.reduce(((t,e)=>t.concat(function(t){return t.type===Lw?t.features:(0,m.IX)(t).filter((t=>null!=t)).map((t=>t.type===Uw?t:{type:Uw,geometry:t}))}(e))),[])}}(e.fit);e.extent?t.fitExtent(e.extent,n):e.size&&t.fitSize(e.size,n)}(n,t),e.fork(e.NO_SOURCE|e.NO_FIELDS)}});var ek=Zw.prototype=Qw.prototype;function nk(t){return function(){return t}}function rk(t){return 1e-6*(t()-.5)}function ik(t){return t.x+t.vx}function ak(t){return t.y+t.vy}ek.copy=function(){var t,e,n=new Qw(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=tk(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=tk(e));return n},ek.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Jw(this.cover(e,n),e,n,t)},ek.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),u=new Array(a),s=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;nc&&(c=r),if&&(f=i));if(s>c||l>f)return this;for(this.cover(s,l).cover(c,f),n=0;nt||t>=i||r>e||e>=a;)switch(u=(eh||(a=s.y0)>d||(o=s.x1)=y)<<1|t>=g)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=s)}else{var v=t-+this._x.call(null,m.data),x=e-+this._y.call(null,m.data),_=v*v+x*x;if(_=(u=(p+g)/2))?p=u:g=u,(c=o>=(s=(m+y)/2))?m=s:y=s,e=d,!(d=d[f=c<<1|l]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},ek.removeAll=function(t){for(var e=0,n=t.length;e{}};function uk(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ck(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a=0&&e._call.call(null,t),e=e._next;--mk}()}finally{mk=0,function(){for(var t,e,n=dk,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:dk=e);pk=t,Fk(r)}(),xk=0}}function Ck(){var t=bk.now(),e=t-vk;e>1e3&&(_k-=e,vk=t)}function Fk(t){mk||(gk&&(gk=clearTimeout(gk)),t-xk>24?(t<1/0&&(gk=setTimeout(Dk,t-bk.now()-_k)),yk&&(yk=clearInterval(yk))):(yk||(vk=bk.now(),yk=setInterval(Ck,1e3)),mk=1,wk(Dk)))}Ak.prototype=Ek.prototype={constructor:Ak,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?kk():+n)+(null==e?0:+e),this._next||pk===this||(pk?pk._next=this:dk=this,pk=this),this._call=t,this._time=n,Fk()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fk())}};const Sk=4294967296;function Bk(t){return t.x}function Tk(t){return t.y}var Nk=Math.PI*(3-Math.sqrt(5));function zk(t){return t.index}function Ok(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}const Rk={center:function(t,e){var n,r=1;function i(){var i,a,o=n.length,u=0,s=0;for(i=0;il+p||ac+p||os.index){var m=l-u.x-u.vx,g=c-u.y-u.vy,y=m*m+g*g;yt.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r=u)){(t.data!==e||t.next)&&(0===f&&(p+=(f=rk(n))*f),0===h&&(p+=(h=rk(n))*h),p[u(t,e,r),t])));for(o=0,i=new Array(l);oe(t,n):e)}function Hk(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Yk(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Vk)):void 0===e&&(e=Jk);for(var n,r,i,a,o,u=new Zk(t),s=[u];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)s.push(r=i[a]=new Zk(i[a])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(Kk)}function Jk(t){return t.children}function Vk(t){return Array.isArray(t)?t[1]:null}function Gk(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Kk(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Zk(t){this.data=t,this.depth=this.height=0,this.parent=null}function Qk(t,e){var n,r;if(nM(e,t))return[e];for(n=0;n0&&n*n>r*r+i*i}function nM(t,e){for(var n=0;n(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*u-a*s,n.y=t.y-r*s+a*u):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*u-a*s,n.y=e.y+r*s+a*u)):(n.x=e.x+n.r,n.y=e.y)}function uM(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function sM(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function lM(t){this._=t,this.next=null,this.previous=null}function cM(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,n,r,i,a,o,u,s,l,c,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;oM(n,e,r=t[2]),e=new lM(e),n=new lM(n),r=new lM(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(u=3;u(t=(1664525*t+1013904223)%Sk)/Sk}();function f(){h(),l.call("tick",e),n1?(null==n?u.delete(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var i,a,o,u,s,l=0,c=t.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(t,n),e):l.on(t)}}}(t),r=n.stop,i=n.restart;let a=!1;return n.stopped=()=>a,n.restart=()=>(a=!1,i()),n.stop=()=>(a=!0,r()),Ik(n,e,!0).on("end",(()=>a=!0))}(e.source,t),i.on("tick",(n=e.dataflow,r=this,()=>n.touch(r).run())),t.static||(a=!0,i.tick()),e.modifies("index")),o||a||t.modified(qk)||e.changed()&&t.restart)if(i.alpha(Math.max(i.alpha(),t.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/u)),t.static)for(i.stop();--u>=0;)i.tick();else if(i.stopped()&&i.restart(),!a)return e.StopPropagation;return this.finish(t,e)},finish(t,e){const n=e.dataflow;for(let t,e=this._argops,u=0,s=e.length;u=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Yk(this).eachBefore(Gk)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=hM(e),n):t},n.parentId=function(t){return arguments.length?(e=hM(t),n):e},n}function EM(t,e){return t.parent===e.parent?1:2}function DM(t){var e=t.children;return e?e[0]:t.t}function CM(t){var e=t.children;return e?e[e.length-1]:t.t}function FM(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function SM(t,e,n){return t.a.parent===e.parent?t.a:n}function BM(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function TM(t,e){return t.parent===e.parent?1:2}function NM(t,e){return t+e.x}function zM(t,e){return Math.max(t,e.y)}function OM(t,e,n,r,i){for(var a,o=t.children,u=-1,s=o.length,l=t.value&&(i-n)/t.value;++uh&&(h=u),g=c*c*m,(d=Math.max(h/g,g/f))>p){c-=u;break}p=d}y.push(o={value:c,dice:s1?e:1)},n}(RM),qM=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,u,s,l,c,f=-1,h=o.length,d=t.value;++f1?e:1)},n}(RM);function PM(t,e,n){const r={};return t.each((t=>{const i=t.data;n(i)&&(r[e(i)]=t)})),t.lookup=r,t}function jM(t){Zi.call(this,null,t)}jM.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const IM=t=>t.values;function WM(){const t=[],e={entries:t=>r(n(t,0),0),key:n=>(t.push(n),e)};function n(e,r){if(r>=t.length)return e;const i=e.length,a=t[r++],o={},u={};let s,l,c,f=-1;for(;++ft.length)return e;const i=[];for(const t in e)i.push({key:t,values:r(e[t],n)});return i}return e}function XM(t){Zi.call(this,null,t)}(0,m.XW)(jM,Zi,{transform(t,e){e.source||(0,m.vU)("Nest transform requires an upstream data source.");var n=t.generate,r=t.modified(),i=e.clone(),a=this.value;return(!a||r||e.changed())&&(a&&a.each((t=>{t.children&&xi(t.data)&&i.rem.push(t.data)})),this.value=a=Yk({values:(0,m.IX)(t.keys).reduce(((t,e)=>(t.key(e),t)),WM()).entries(i.source)},IM),n&&a.each((t=>{t.children&&(t=wi(t.data),i.add.push(t),i.source.push(t))})),PM(a,_i,_i)),i.source.root=a,i}});const $M=(t,e)=>t.parent===e.parent?1:2;(0,m.XW)(XM,Zi,{transform(t,e){e.source&&e.source.root||(0,m.vU)(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(t.method),r=this.fields,i=e.source.root,a=t.as||r;t.field?i.sum(t.field):i.count(),t.sort&&i.sort(Ei(t.sort,(t=>t.data))),function(t,e,n){for(let r,i=0,a=e.length;ifunction(t,e,n){const r=t.data,i=e.length-1;for(let a=0;a=0;--i)u.push(n=e.children[i]=new BM(r[i],i)),n.parent=e;return(o.parent=new BM(null,0)).children=[o],o}(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(u);else{var l=i,c=i,f=i;i.eachBefore((function(t){t.xc.x&&(c=t),t.depth>f.depth&&(f=t)}));var h=l===c?1:t(l,c)/2,d=h-l.x,p=e/(c.x+h+d),m=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*m}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,u=n,s=a.parent.children[0],l=a.m,c=o.m,f=u.m,h=s.m;u=CM(u),a=DM(a),u&&a;)s=DM(s),(o=CM(o)).a=e,(i=u.z+f-a.z-l+t(u._,a._))>0&&(FM(SM(u,e,r),e,i),l+=i,c+=i),f+=u.m,l+=a.m,h+=s.m,c+=o.m;u&&!CM(o)&&(o.t=u,o.m+=f-c),a&&!DM(s)&&(s.t=a,s.m+=l-h,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},cluster:function(){var t=TM,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(NM,0)/t.length}(n),e.y=function(t){return 1+t.reduce(zM,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var u=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=u.x-t(u,s)/2,c=s.x+t(s,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(c-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}},ZM=["x","y","depth","children"];function QM(t){XM.call(this,t)}function tA(t){Zi.call(this,[],t)}QM.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:ZM.length,default:ZM}]},(0,m.XW)(QM,XM,{layout(t){const e=t||"tidy";if((0,m.nr)(KM,e))return KM[e]();(0,m.vU)("Unrecognized Tree layout method: "+e)},params:["size","nodeSize"],fields:ZM}),tA.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},(0,m.XW)(tA,Zi,{transform(t,e){const n=this.value,r=e.source&&e.source.root,i=e.fork(e.NO_SOURCE),a={};return r||(0,m.vU)("TreeLinks transform requires a tree data source."),e.changed(e.ADD_REM)?(i.rem=n,e.visit(e.SOURCE,(t=>a[_i(t)]=1)),r.each((t=>{const e=t.data,n=t.parent&&t.parent.data;n&&a[_i(e)]&&a[_i(n)]&&i.add.push(wi({source:n,target:e}))})),this.value=i.add):e.changed(e.MOD)&&(e.visit(e.MOD,(t=>a[_i(t)]=1)),n.forEach((t=>{(a[_i(t.source)]||a[_i(t.target)])&&i.mod.push(t)}))),i}});const eA={binary:function(t,e,n,r,i){var a,o,u=t.children,s=u.length,l=new Array(s+1);for(l[0]=o=a=0;a=n-1){var c=u[e];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=s)}for(var f=l[e],h=r/2+f,d=e+1,p=n-1;d>>1;l[m]s-a){var v=r?(i*y+o*g)/r:o;t(e,d,g,i,a,v,s),t(d,n,y,v,a,o,s)}else{var x=r?(a*y+s*g)/r:s;t(e,d,g,i,a,o,x),t(d,n,y,i,x,o,s)}}(0,s,t.value,e,n,r,i)},dice:_M,slice:OM,slicedice:function(t,e,n,r,i){(1&t.depth?OM:_M)(t,e,n,r,i)},squarify:LM,resquarify:qM},nA=["x0","y0","x1","y1","depth","children"];function rA(t){XM.call(this,t)}function iA(t,e,n,r){const i=t.width,a=t.height,o=n||r,u=$s(i,a).getContext("2d");e.forEach((t=>aA(u,t,o)));const s=new Uint32Array(u.getImageData(0,0,i,a).data.buffer),l=t.bitmap(),c=o&&t.bitmap();let f,h,d,p,m;for(h=0;h{e.items.forEach((e=>aA(t,e.items,n)))})):Xm[r].draw(t,{items:n?e.map(oA):e})}function oA(t){const e=Mi(t,{});return e.stroke&&(e.strokeOpacity=1),e.fill&&(e.fillOpacity=.0625,e.stroke="#000",e.strokeOpacity=1,e.strokeWidth=2),e}rA.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:nA.length,default:nA}]},(0,m.XW)(rA,XM,{layout(){const t=function(){var t=LM,e=!1,n=1,r=1,i=[0],a=dM,o=dM,u=dM,s=dM,l=dM;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(xM),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f{const n=t.tile();n.ratio&&t.tile(n.ratio(e))},t.method=e=>{(0,m.nr)(eA,e)?t.tile(eA[e]):(0,m.vU)("Unrecognized Treemap layout method: "+e)},t},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:nA});const uA=31,sA=new Uint32Array(33),lA=new Uint32Array(33);lA[0]=0,sA[0]=~lA[0];for(let t=1;t<=32;++t)lA[t]=lA[t-1]<<1|1,sA[t]=~lA[t];function cA(t,e,n,r,i,a){let o=n/2;return t-o<0||t+o>i||e-(o=r/2)<0||e+o>a}function fA(t,e,n,r,i,a,o,u){const s=i*a/(2*r),l=t(e-s),c=t(e+s),f=t(n-(a/=2)),h=t(n+a);return o.outOfBounds(l,f,c,h)||o.getRange(l,f,c,h)||u&&u.getRange(l,f,c,h)}const hA=[-1,-1,1,1],dA=[-1,1,-1,1],pA=["right","center","left"],mA=["bottom","middle","top"];function gA(t,e,n,r,i,a,o,u,s,l,c,f){return!(i.outOfBounds(t,n,e,r)||(f&&a?a.getRange(t,n,e,r)||!function(t,e,n,r,i){return i[0]<=t&&n<=i[2]&&i[3]<=e&&r<=i[5]}(o,s,u,l,c):i.getRange(t,n,e,r)))}const yA={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},vA={naive:function(t,e,n,r){const i=t.width,a=t.height;return function(t){const e=t.datum.datum.items[r].items,n=e.length,o=t.datum.fontSize,u=Em.width(t.datum,t.datum.text);let s,l,c,f,h,d,p,m=0;for(let r=0;r=m&&(m=p,t.x=h,t.y=d);return h=u/2,d=o/2,s=t.x-h,l=t.x+h,c=t.y-d,f=t.y+d,t.align="center",s<0&&l<=i?t.align="left":0<=s&&i=1;)h=(d+p)/2,fA(t,c,f,l,s,h,o,u)?p=h:d=h;if(d>r)return[c,f,d,!0]}}return function(e){const u=e.datum.datum.items[r].items,l=u.length,c=e.datum.fontSize,f=Em.width(e.datum,e.datum.text);let h,d,p,m,g,y,v,x,_,b,w,k,M,A,E,D,C,F=n?c:0,S=!1,B=!1,T=0;for(let r=0;rd&&(C=h,h=d,d=C),p>m&&(C=p,p=m,m=C),_=t(h),w=t(d),b=~~((_+w)/2),k=t(p),A=t(m),M=~~((k+A)/2),v=b;v>=_;--v)for(x=M;x>=k;--x)D=s(v,x,F,f,c),D&&([e.x,e.y,F,S]=D);for(v=b;v<=w;++v)for(x=M;x<=A;++x)D=s(v,x,F,f,c),D&&([e.x,e.y,F,S]=D);S||n||(E=Math.abs(d-h+m-p),g=(h+d)/2,y=(p+m)/2,E>=T&&!cA(g,y,f,c,i,a)&&!fA(t,g,y,c,f,c,o,null)&&(T=E,e.x=g,e.y=y,B=!0))}return!(!S&&!B||(g=f/2,y=c/2,o.setRange(t(e.x-g),t(e.y-y),t(e.x+g),t(e.y+y)),e.align="center",e.baseline="middle",0))}},floodfill:function(t,e,n,r){const i=t.width,a=t.height,o=e[0],u=e[1],s=t.bitmap();return function(e){const l=e.datum.datum.items[r].items,c=l.length,f=e.datum.fontSize,h=Em.width(e.datum,e.datum.text),d=[];let p,m,g,y,v,x,_,b,w,k,M,A,E=n?f:0,D=!1,C=!1,F=0;for(let r=0;r=1;)M=(w+k)/2,fA(t,v,x,f,h,M,o,u)?k=M:w=M;w>E&&(e.x=v,e.y=x,E=w,D=!0)}}D||n||(A=Math.abs(m-p+y-g),v=(p+m)/2,x=(g+y)/2,A>=F&&!cA(v,x,h,f,i,a)&&!fA(t,v,x,f,h,f,o,null)&&(F=A,e.x=v,e.y=x,C=!0))}return!(!D&&!C||(v=h/2,x=f/2,o.setRange(t(e.x-v),t(e.y-x),t(e.x+v),t(e.y+x)),e.align="center",e.baseline="middle",0))}}};function xA(t,e,n,r,i,a,o,u,s,l,c){if(!t.length)return t;const f=Math.max(r.length,i.length),h=function(t,e){const n=new Float64Array(e),r=t.length;for(let e=0;e[t.x,t.x,t.x,t.y,t.y,t.y];return t?"line"===t||"area"===t?t=>i(t.datum):"line"===e?t=>{const e=t.datum.items[r].items;return i(e.length?e["start"===n?0:e.length-1]:{x:NaN,y:NaN})}:t=>{const e=t.datum.bounds;return[e.x1,(e.x1+e.x2)/2,e.x2,e.y1,(e.y1+e.y2)/2,e.y2]}:i}(p,m,u,s),v=function(t,e,n){const r=Math.max(1,Math.sqrt(t*e/1e6)),i=~~((t+2*n+r)/r),a=~~((e+2*n+r)/r),o=t=>~~((t+n)/r);return o.invert=t=>t*r-n,o.bitmap=()=>function(t,e){const n=new Uint32Array(~~((t*e+32)/32));function r(t,e){n[t]|=e}function i(t,e){n[t]&=e}return{array:n,get:(e,r)=>{const i=r*t+e;return n[i>>>5]&1<<(i&uA)},set:(e,n)=>{const i=n*t+e;r(i>>>5,1<<(i&uA))},clear:(e,n)=>{const r=n*t+e;i(r>>>5,~(1<<(r&uA)))},getRange:(e,r,i,a)=>{let o,u,s,l,c=a;for(;c>=r;--c)if(o=c*t+e,u=c*t+i,s=o>>>5,l=u>>>5,s===l){if(n[s]&sA[o&uA]&lA[1+(u&uA)])return!0}else{if(n[s]&sA[o&uA])return!0;if(n[l]&lA[1+(u&uA)])return!0;for(let t=s+1;t{let o,u,s,l,c;for(;n<=a;++n)if(o=n*t+e,u=n*t+i,s=o>>>5,l=u>>>5,s===l)r(s,sA[o&uA]&lA[1+(u&uA)]);else for(r(s,sA[o&uA]),r(l,lA[1+(u&uA)]),c=s+1;c{let o,u,s,l,c;for(;n<=a;++n)if(o=n*t+e,u=n*t+r,s=o>>>5,l=u>>>5,s===l)i(s,lA[o&uA]|sA[1+(u&uA)]);else for(i(s,lA[o&uA]),i(l,sA[1+(u&uA)]),c=s+1;cn<0||r<0||a>=e||i>=t}}(i,a),o.ratio=r,o.padding=n,o.width=t,o.height=e,o}(e[0],e[1],l),x=g&&"naive"===c;var _;const b=t.map((t=>({datum:t,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:y(t)})));let w;if(!x){n&&b.sort(((t,e)=>n(t.datum,e.datum)));let e=!1;for(let t=0;tt.datum))].concat(a)),w=a.length?iA(v,a,e,g):function(t,e){const n=t.bitmap();return(e||[]).forEach((e=>n.set(t(e.boundary[0]),t(e.boundary[3])))),[n,void 0]}(v,o&&b)}const k=g?vA[c](v,w,o,s):function(t,e,n,r){const i=t.width,a=t.height,o=e[0],u=e[1],s=r.length;return function(e){const l=e.boundary,c=e.datum.fontSize;if(l[2]<0||l[5]<0||l[0]>i||l[3]>a)return!1;let f,h,d,p,m,g,y,v,x,_,b,w,k,M,A,E=0;for(let i=0;i>>2&3)-1,d=0===f&&0===h||r[i]<0,p=f&&h?Math.SQRT1_2:1,m=r[i]<0?-1:1,g=l[1+f]+r[i]*f*p,b=l[4+h]+m*c*h/2+r[i]*h*p,v=b-c/2,x=b+c/2,w=t(g),M=t(v),A=t(x),!E){if(!gA(w,w,M,A,o,u,g,g,v,x,l,d))continue;E=Em.width(e.datum,e.datum.text)}if(_=g+m*E*f/2,g=_-E/2,y=_+E/2,w=t(g),k=t(y),gA(w,k,M,A,o,u,g,y,v,x,l,d))return e.x=f?f*m<0?y:g:_,e.y=h?h*m<0?x:v:b,e.align=pA[f*m+1],e.baseline=mA[h*m+1],o.setRange(w,M,k,A),!0}return!1}}(v,w,d,h);return b.forEach((t=>t.opacity=+k(t))),b}const _A=["x","y","opacity","align","baseline"],bA=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function wA(t){Zi.call(this,null,t)}function kA(t,e){var n,r,i,a,o,u,s=[],l=function(t){return t(a)};if(null==e)s.push(t);else for(n={},r=0,i=t.length;r{const e=t.datum;e[r[0]]=t.x,e[r[1]]=t.y,e[r[2]]=t.opacity,e[r[3]]=t.align,e[r[4]]=t.baseline})),e.reflow(n).modifies(r)}}),MA.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},(0,m.XW)(MA,Zi,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const r=kA(e.materialize(e.SOURCE).source,t.groupby),i=(t.groupby||[]).map(m.el),a=i.length,o=t.as||[(0,m.el)(t.x),(0,m.el)(t.y)],u=[];r.forEach((e=>{Za(e,t.x,t.y,t.bandwidth||.3).forEach((t=>{const n={};for(let t=0;t"poly"===t?e:"quad"===t?2:1)(a,o),s=t.as||[(0,m.el)(t.x),(0,m.el)(t.y)],l=AA[a],c=[];let f=t.extent;(0,m.nr)(AA,a)||(0,m.vU)("Invalid regression method: "+a),null!=f&&"log"===a&&f[0]<=0&&(e.dataflow.warn("Ignoring extent with values <= 0 for log regression."),f=null),r.forEach((n=>{if(n.length<=u)return void e.dataflow.warn("Skipping regression with more parameters than data points.");const r=l(n,t.x,t.y,o);if(t.params)return void c.push(wi({keys:n.dims,coef:r.coef,rSquared:r.rSquared}));const h=f||(0,m.We)(n,t.x),d=t=>{const e={};for(let t=0;td([t,r.predict(t)]))):no(r.predict,h,25,200).forEach(d)})),this.value&&(n.rem=this.value),this.value=n.add=n.source=c}return n}});const DA=Math.pow(2,-52),CA=new Uint32Array(512);class FA{static from(t,e=UA,n=LA){const r=t.length,i=new Float64Array(2*r);for(let a=0;a>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=t.length>>1;let o=1/0,u=1/0,s=-1/0,l=-1/0;for(let e=0;es&&(s=n),r>l&&(l=r),this._ids[e]=e}const c=(o+s)/2,f=(u+l)/2;let h,d,p,m=1/0;for(let e=0;e0&&(d=e,m=n)}let v=t[2*d],x=t[2*d+1],_=1/0;for(let e=0;er&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(TA(g,y,v,x,b,w)){const t=d,e=v,n=x;d=p,v=b,x=w,p=t,b=e,w=n}const k=function(t,e,n,r,i,a){const o=n-t,u=r-e,s=i-t,l=a-e,c=o*o+u*u,f=s*s+l*l,h=.5/(o*l-u*s);return{x:t+(l*c-u*f)*h,y:e+(o*f-s*c)*h}}(g,y,v,x,b,w);this._cx=k.x,this._cy=k.y;for(let e=0;e0&&Math.abs(l-a)<=DA&&Math.abs(c-o)<=DA)continue;if(a=l,o=c,s===h||s===d||s===p)continue;let f=0;for(let t=0,e=this._hashKey(l,c);t0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[t],u=t-t%3;if(a=u+(t+2)%3,-1===o){if(0===i)break;t=CA[--i];continue}const s=o-o%3,l=u+(t+1)%3,c=s+(o+2)%3,f=e[a],h=e[t],d=e[l],p=e[c];if(NA(r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){e[t]=p,e[o]=f;const r=n[c];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===c){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(o,n[a]),this._link(a,c);const u=s+(o+1)%3;i=33306690738754716e-32*Math.abs(o+u)?o-u:0}function TA(t,e,n,r,i,a){return(BA(i,a,t,e,n,r)||BA(t,e,n,r,i,a)||BA(n,r,i,a,t,e))<0}function NA(t,e,n,r,i,a,o,u){const s=t-o,l=e-u,c=n-o,f=r-u,h=i-o,d=a-u,p=c*c+f*f,m=h*h+d*d;return s*(f*m-p*d)-l*(c*m-p*h)+(s*s+l*l)*(c*d-f*h)<0}function zA(t,e,n,r,i,a){const o=n-t,u=r-e,s=i-t,l=a-e,c=o*o+u*u,f=s*s+l*l,h=.5/(o*l-u*s),d=(l*c-u*f)*h,p=(o*f-s*c)*h;return d*d+p*p}function OA(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],a=e[r];let o=i-1;for(;o>=n&&e[t[o]]>a;)t[o+1]=t[o--];t[o+1]=r}else{let i=n+1,a=r;RA(t,n+r>>1,i),e[t[n]]>e[t[r]]&&RA(t,n,r),e[t[i]]>e[t[r]]&&RA(t,i,r),e[t[n]]>e[t[i]]&&RA(t,n,i);const o=t[i],u=e[o];for(;;){do{i++}while(e[t[i]]u);if(a=a-n?(OA(t,e,i,r),OA(t,e,n,a-1)):(OA(t,e,n,a-1),OA(t,e,i,r))}}function RA(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function UA(t){return t[0]}function LA(t){return t[1]}const qA=1e-6;class PA{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>qA||Math.abs(this._y1-i)>qA)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class jA{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class IA{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let e,r,a=0,o=0,u=n.length;a1;)i-=2;for(let t=2;t4)for(let t=0;t0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}}const WA=2*Math.PI,XA=Math.pow;function $A(t){return t[0]}function HA(t){return t[1]}function YA(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class JA{static from(t,e=$A,n=HA,r){return new JA("length"in t?function(t,e,n,r){const i=t.length,a=new Float64Array(2*i);for(let o=0;o2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],this.triangles[1]=r[1],this.triangles[2]=r[1],a[r[0]]=1,2===r.length&&(a[r[1]]=0))}voronoi(t){return new IA(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const e=o.indexOf(t);return e>0&&(yield o[e-1]),void(e=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:u,points:s}=this;if(-1===r[t]||!s.length)return(t+1)%(s.length>>1);let l=t,c=XA(e-s[2*t],2)+XA(n-s[2*t+1],2);const f=r[t];let h=f;do{let r=u[h];const f=XA(e-s[2*r],2)+XA(n-s[2*r+1],2);if(f>5<<5,s=~~Math.max(Math.abs(v+x),Math.abs(v-x))}else o=o+31>>5<<5;if(s>d&&(d=s),f+o>=2048&&(f=0,h+=d,d=0),h+s>=QA)break;i.translate((f+(o>>1))/a,(h+(s>>1))/a),e.rotate&&i.rotate(e.rotate*ZA),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=o,e.height=s,e.xoff=f,e.yoff=h,e.x1=o>>1,e.y1=s>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,f+=o}for(var b=i.getImageData(0,0,2048/a,QA/a).data,w=[];--r>=0;)if((e=n[r]).hasText){for(u=(o=e.width)>>5,s=e.y1-e.y0,l=0;l>5),E=b[2048*(h+c)+(f+l)<<2]?1<<31-l%32:0;w[A]|=E,k|=E}k?M=c:(e.y0++,s--,c--,h++)}e.y1=e.y0+M,e.sprite=w.slice(0,(e.y1-e.y0)*u)}}}function eE(t,e,n){n>>=5;for(var r,i=t.sprite,a=t.width>>5,o=t.x-(a<<4),u=127&o,s=32-u,l=t.y1-t.y0,c=(t.y+t.y0)*n+(o>>5),f=0;f>>u:0))&e[c+h])return!0;c+=n}return!1}function nE(t,e){var n=t[0],r=t[1];e.x+e.x0r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function rE(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0=f));)if(e.x=o+i,e.y=l+a,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>u[0]||e.y+e.y1>u[1])&&(!n||!eE(e,t,u[0]))&&(!n||rE(e,n))){for(var m,g=e.sprite,y=e.width>>5,v=u[0]>>5,x=e.x-(y<<4),_=127&x,b=32-_,w=e.y1-e.y0,k=(e.y+e.y0)*v+(x>>5),M=0;M>>_:0);k+=v}return e.sprite=null,!0}return!1}return f.layout=function(){for(var s=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=QA/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}($s()),f=function(t){for(var e=[],n=-1;++n>5)*u[1]),d=null,p=l.length,m=-1,g=[],y=l.map((u=>({text:t(u),font:e(u),style:r(u),weight:i(u),rotate:a(u),size:~~(n(u)+1e-14),padding:o(u),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:u}))).sort(((t,e)=>e.size-t.size));++m>1,v.y=u[1]*(c()+.5)>>1,tE(s,v,y,m),v.hasText&&h(f,v,d)&&(g.push(v),d?nE(d,v):d=[{x:v.x+v.x0,y:v.y+v.y0},{x:v.x+v.x1,y:v.y+v.y1}],v.x-=u[0]>>1,v.y-=u[1]>>1)}return g},f.words=function(t){return arguments.length?(l=t,f):l},f.size=function(t){return arguments.length?(u=[+t[0],+t[1]],f):u},f.font=function(t){return arguments.length?(e=aE(t),f):e},f.fontStyle=function(t){return arguments.length?(r=aE(t),f):r},f.fontWeight=function(t){return arguments.length?(i=aE(t),f):i},f.rotate=function(t){return arguments.length?(a=aE(t),f):a},f.text=function(e){return arguments.length?(t=aE(e),f):t},f.spiral=function(t){return arguments.length?(s=oE[t]||t,f):s},f.fontSize=function(t){return arguments.length?(n=aE(t),f):n},f.padding=function(t){return arguments.length?(o=aE(t),f):o},f.random=function(t){return arguments.length?(c=t,f):c},f}(),t)}lE.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:uE}]},(0,m.XW)(lE,Zi,{transform(t,e){!t.size||t.size[0]&&t.size[1]||(0,m.vU)("Wordcloud size dimensions must be non-zero.");const n=t.modified();if(!(n||e.changed(e.ADD_REM)||sE.some((function(n){const r=t[n];return(0,m.mf)(r)&&e.modified(r.fields)}))))return;const r=e.materialize(e.SOURCE).source,i=this.value,a=t.as||uE;let o,u=t.fontSize||14;if((0,m.mf)(u)?o=t.fontSizeRange:u=(0,m.a9)(u),o){const t=u,e=dh("sqrt")().domain((0,m.We)(r,t)).range(o);u=n=>e(t(n))}r.forEach((t=>{t[a[0]]=NaN,t[a[1]]=NaN,t[a[3]]=0}));const s=i.words(r).text(t.text).size(t.size||[500,500]).padding(t.padding||1).spiral(t.spiral||"archimedean").rotate(t.rotate||0).font(t.font||"sans-serif").fontStyle(t.fontStyle||"normal").fontWeight(t.fontWeight||"normal").fontSize(u).random(ma).layout(),l=i.size(),c=l[0]>>1,f=l[1]>>1,h=s.length;for(let t,e,n=0;nnew Uint8Array(t),fE=t=>new Uint16Array(t),hE=t=>new Uint32Array(t);function dE(t,e,n){const r=(e<257?cE:e<65537?fE:hE)(t);return n&&r.set(n),r}function pE(t,e,n){const r=1<{const r=t[e],i=t[n];return ri?1:0})),function(t,e){return Array.from(e,(e=>t[e]))}(t,e)}(h,s),o)l=e,c=t,e=Array(o+u),t=hE(o+u),function(t,e,n,r,i,a,o,u,s){let l,c=0,f=0;for(l=0;c0)for(f=0;ft,size:()=>n}}function gE(t){Zi.call(this,function(){let t=8,e=[],n=hE(0),r=dE(0,t),i=dE(0,t);return{data:()=>e,seen:()=>n=function(t,e,n){return t.length>=e?t:((n=n||new t.constructor(e)).set(t),n)}(n,e.length),add(t){for(let n,r=0,i=e.length,a=t.length;re.length,curr:()=>r,prev:()=>i,reset:t=>i[t]=r[t],all:()=>t<257?255:t<65537?65535:4294967295,set(t,e){r[t]|=e},clear(t,e){r[t]&=~e},resize(e,n){(e>r.length||n>t)&&(t=Math.max(n,t),r=dE(e,t,r),i=dE(e,t))}}}(),t),this._indices=null,this._dims=null}function yE(t){Zi.call(this,null,t)}gE.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},(0,m.XW)(gE,Zi,{transform(t,e){return this._dims?t.modified("fields")||t.fields.some((t=>e.modified(t.fields)))?this.reinit(t,e):this.eval(t,e):this.init(t,e)},init(t,e){const n=t.fields,r=t.query,i=this._indices={},a=this._dims=[],o=r.length;let u,s,l=0;for(;l{const t=i.remove(e,n);for(const e in r)r[e].reindex(t)}))},update(t,e,n){const r=this._dims,i=t.query,a=e.stamp,o=r.length;let u,s,l=0;for(n.filters=0,s=0;sd)for(g=d,y=Math.min(f,p);gp)for(g=Math.max(f,p),y=h;gc)for(d=c,p=Math.min(s,f);df)for(d=Math.max(s,f),p=l;du[t]&n?null:o[t];return a.filter(a.MOD,l),i&i-1?(a.filter(a.ADD,(t=>{const e=u[t]&n;return!e&&e^s[t]&n?o[t]:null})),a.filter(a.REM,(t=>{const e=u[t]&n;return!e||e^e^s[t]&n?null:o[t]}))):(a.filter(a.ADD,l),a.filter(a.REM,(t=>(u[t]&n)===i?o[t]:null))),a.filter(a.SOURCE,(t=>l(t._index)))}});const vE="Literal",xE="CallExpression";function _E(t){this.type=t}var bE,wE,kE,ME,AE;_E.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=function(t){switch(t.type){case"ArrayExpression":return t.elements;case"BinaryExpression":case"LogicalExpression":return[t.left,t.right];case xE:return[t.callee].concat(t.arguments);case"ConditionalExpression":return[t.test,t.consequent,t.alternate];case"MemberExpression":return[t.object,t.property];case"ObjectExpression":return t.properties;case"Property":return[t.key,t.value];case"UnaryExpression":return[t.argument];case"Identifier":case vE:case"RawCode":default:return[]}}(this),n=0,r=e.length;n",bE[3]="Identifier",bE[4]="Keyword",bE[5]="Null",bE[6]="Numeric",bE[7]="Punctuator",bE[8]="String",bE[9]="RegularExpression";var EE="Identifier",DE="Unexpected token %0",CE="Invalid regular expression",FE="Invalid regular expression: missing /",SE="Octal literals are not allowed in strict mode.",BE="ILLEGAL",TE="Disabled.",NE=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),zE=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function OE(t,e){if(!t)throw new Error("ASSERT: "+e)}function RE(t){return t>=48&&t<=57}function UE(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function LE(t){return"01234567".indexOf(t)>=0}function qE(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function PE(t){return 10===t||13===t||8232===t||8233===t}function jE(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&NE.test(String.fromCharCode(t))}function IE(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&zE.test(String.fromCharCode(t))}const WE={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function XE(){for(;kE1114111||"}"!==t)&&aD({},DE,BE),e<=65535?String.fromCharCode(e):(n=55296+(e-65536>>10),r=56320+(e-65536&1023),String.fromCharCode(n,r))}function YE(){var t,e;for(t=wE.charCodeAt(kE++),e=String.fromCharCode(t),92===t&&(117!==wE.charCodeAt(kE)&&aD({},DE,BE),++kE,(t=$E("u"))&&"\\"!==t&&jE(t.charCodeAt(0))||aD({},DE,BE),e=t);kE>>="===(r=wE.substr(kE,4))?{type:7,value:r,start:i,end:kE+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:7,value:n,start:i,end:kE+=3}:o===(e=n.substr(0,2))[1]&&"+-<>&|".indexOf(o)>=0||"=>"===e?{type:7,value:e,start:i,end:kE+=2}:("//"===e&&aD({},DE,BE),"<>=!+-*%&|^/".indexOf(o)>=0?{type:7,value:o,start:i,end:++kE}:void aD({},DE,BE))}function VE(){var t,e,n;if(OE(RE((n=wE[kE]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),e=kE,t="","."!==n){if(t=wE[kE++],n=wE[kE],"0"===t){if("x"===n||"X"===n)return++kE,function(t){let e="";for(;kE=ME)return{type:2,start:kE,end:kE};const t=wE.charCodeAt(kE);return jE(t)?(e=kE,{type:1===(n=92===wE.charCodeAt(kE)?YE():function(){var t,e;for(t=kE++;kE=0&&kE(OE(e=0&&aD({},CE,n),{value:n,literal:e}}(),r=function(t,e){let n=t;e.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((t,e)=>{if(parseInt(e,16)<=1114111)return"x";aD({},CE)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(t){aD({},CE)}try{return new RegExp(t,e)}catch(t){return null}}(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:kE}}()),ZE()):oD(KE())}return n}function pD(){const t=[];if(uD("("),!sD(")"))for(;kE":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11}return e}function xD(){var t,e;return t=function(){var t,e,n,r,i,a,o,u,s,l;if(t=AE,s=yD(),0===(i=vD(r=AE)))return s;for(r.prec=i,KE(),e=[t,AE],a=[s,r,o=yD()];(i=vD(AE))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),u=a.pop().value,s=a.pop(),e.pop(),n=QE(u,s,o),a.push(n);(r=KE()).prec=i,a.push(r),e.push(AE),n=yD(),a.push(n)}for(n=a[l=a.length-1],e.pop();l>1;)e.pop(),n=QE(a[l-1].value,a[l-2],n),l-=2;return n}(),sD("?")&&(KE(),e=xD(),uD(":"),t=function(t,e,n){const r=new _E("ConditionalExpression");return r.test=t,r.consequent=e,r.alternate=n,r}(t,e,xD())),t}function _D(){const t=xD();if(sD(","))throw new Error(TE);return t}function bD(t){kE=0,ME=(wE=t).length,AE=null,ZE();const e=_D();if(2!==AE.type)throw new Error("Unexpect token after expression.");return e}var wD={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function kD(t){function e(e,n,r){return i=>function(e,n,r,i){let a=t(n[0]);return r&&(a=r+"("+a+")",0===r.lastIndexOf("new ",0)&&(a="("+a+")")),a+"."+e+(i<0?"":0===i?"()":"("+n.slice(1).map(t).join(",")+")")}(e,i,n,r)}const n="new Date",r="String",i="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(e){e.length<3&&(0,m.vU)("Missing arguments to clamp function."),e.length>3&&(0,m.vU)("Too many arguments to clamp function.");const n=e.map(t);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:e("getDate",n,0),day:e("getDay",n,0),year:e("getFullYear",n,0),month:e("getMonth",n,0),hours:e("getHours",n,0),minutes:e("getMinutes",n,0),seconds:e("getSeconds",n,0),milliseconds:e("getMilliseconds",n,0),time:e("getTime",n,0),timezoneoffset:e("getTimezoneOffset",n,0),utcdate:e("getUTCDate",n,0),utcday:e("getUTCDay",n,0),utcyear:e("getUTCFullYear",n,0),utcmonth:e("getUTCMonth",n,0),utchours:e("getUTCHours",n,0),utcminutes:e("getUTCMinutes",n,0),utcseconds:e("getUTCSeconds",n,0),utcmilliseconds:e("getUTCMilliseconds",n,0),length:e("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:e("toUpperCase",r,0),lower:e("toLowerCase",r,0),substring:e("substring",r),split:e("split",r),trim:e("trim",r,0),regexp:i,test:e("test",i),if:function(e){e.length<3&&(0,m.vU)("Missing arguments to if function."),e.length>3&&(0,m.vU)("Too many arguments to if function.");const n=e.map(t);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}function MD(t){const e=(t=t||{}).allowed?(0,m.Rg)(t.allowed):{},n=t.forbidden?(0,m.Rg)(t.forbidden):{},r=t.constants||wD,i=(t.functions||kD)(f),a=t.globalvar,o=t.fieldvar,u=(0,m.mf)(a)?a:t=>"".concat(a,'["').concat(t,'"]');let s={},l={},c=0;function f(t){if((0,m.HD)(t))return t;const e=h[t.type];return null==e&&(0,m.vU)("Unsupported type: "+t.type),e(t)}const h={Literal:t=>t.raw,Identifier:t=>{const i=t.name;return c>0?i:(0,m.nr)(n,i)?(0,m.vU)("Illegal identifier: "+i):(0,m.nr)(r,i)?r[i]:(0,m.nr)(e,i)?i:(s[i]=1,u(i))},MemberExpression:t=>{const e=!t.computed,n=f(t.object);e&&(c+=1);const r=f(t.property);return n===o&&(l[function(t){const e=t&&t.length-1;return e&&('"'===t[0]&&'"'===t[e]||"'"===t[0]&&"'"===t[e])?t.slice(1,-1):t}(r)]=1),e&&(c-=1),n+(e?"."+r:"["+r+"]")},CallExpression:t=>{"Identifier"!==t.callee.type&&(0,m.vU)("Illegal callee type: "+t.callee.type);const e=t.callee.name,n=t.arguments,r=(0,m.nr)(i,e)&&i[e];return r||(0,m.vU)("Unrecognized function: "+e),(0,m.mf)(r)?r(n):r+"("+n.map(f).join(",")+")"},ArrayExpression:t=>"["+t.elements.map(f).join(",")+"]",BinaryExpression:t=>"("+f(t.left)+" "+t.operator+" "+f(t.right)+")",UnaryExpression:t=>"("+t.operator+f(t.argument)+")",ConditionalExpression:t=>"("+f(t.test)+"?"+f(t.consequent)+":"+f(t.alternate)+")",LogicalExpression:t=>"("+f(t.left)+t.operator+f(t.right)+")",ObjectExpression:t=>"{"+t.properties.map(f).join(",")+"}",Property:t=>{c+=1;const e=f(t.key);return c-=1,e+":"+f(t.value)}};function d(t){const e={code:f(t),globals:Object.keys(s),fields:Object.keys(l)};return s={},l={},e}return d.functions=i,d.constants=r,d}var AD,ED,DD,CD,FD,SD,BD,TD,ND,zD,OD,RD,UD,LD,qD,PD,jD=new gx,ID=new gx,WD={point:Px,lineStart:Px,lineEnd:Px,polygonStart:function(){jD=new gx,WD.lineStart=XD,WD.lineEnd=$D},polygonEnd:function(){var t=+jD;ID.add(t<0?wx+t:t),this.lineStart=this.lineEnd=this.point=Px},sphere:function(){ID.add(wx)}};function XD(){WD.point=HD}function $D(){YD(AD,ED)}function HD(t,e){WD.point=YD,AD=t,ED=e,DD=t*=Mx,CD=Cx(e=(e*=Mx)/2+bx),FD=zx(e)}function YD(t,e){var n=(t*=Mx)-DD,r=n>=0?1:-1,i=r*n,a=Cx(e=(e*=Mx)/2+bx),o=zx(e),u=FD*o,s=CD*a+u*Cx(i),l=u*r*zx(i);jD.add(Dx(l,s)),DD=t,CD=a,FD=o}var JD,VD,GD,KD,ZD,QD,tC,eC,nC,rC,iC,aC,oC,uC,sC,lC,cC={point:fC,lineStart:dC,lineEnd:pC,polygonStart:function(){cC.point=mC,cC.lineStart=gC,cC.lineEnd=yC,LD=new gx,WD.polygonStart()},polygonEnd:function(){WD.polygonEnd(),cC.point=fC,cC.lineStart=dC,cC.lineEnd=pC,jD<0?(SD=-(TD=180),BD=-(ND=90)):LD>yx?ND=90:LD<-1e-6&&(BD=-90),PD[0]=SD,PD[1]=TD},sphere:function(){SD=-(TD=180),BD=-(ND=90)}};function fC(t,e){qD.push(PD=[SD=t,TD=t]),eND&&(ND=e)}function hC(t,e){var n=J_([t*Mx,e*Mx]);if(UD){var r=G_(UD,n),i=G_([r[1],-r[0],0],r);Q_(i),i=Y_(i);var a,o=t-zD,u=o>0?1:-1,s=i[0]*kx*u,l=Ax(o)>180;l^(u*zDND&&(ND=a):l^(u*zD<(s=(s+360)%360-180)&&sND&&(ND=e)),l?tvC(SD,TD)&&(TD=t):vC(t,TD)>vC(SD,TD)&&(SD=t):TD>=SD?(tTD&&(TD=t)):t>zD?vC(SD,t)>vC(SD,TD)&&(TD=t):vC(t,TD)>vC(SD,TD)&&(SD=t)}else qD.push(PD=[SD=t,TD=t]);eND&&(ND=e),UD=n,zD=t}function dC(){cC.point=hC}function pC(){PD[0]=SD,PD[1]=TD,cC.point=fC,UD=null}function mC(t,e){if(UD){var n=t-zD;LD.add(Ax(n)>180?n+(n>0?360:-360):n)}else OD=t,RD=e;WD.point(t,e),hC(t,e)}function gC(){WD.lineStart()}function yC(){mC(OD,RD),WD.lineEnd(),Ax(LD)>yx&&(SD=-(TD=180)),PD[0]=SD,PD[1]=TD,UD=null}function vC(t,e){return(e-=t)<0?e+360:e}function xC(t,e){return t[0]-e[0]}function _C(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e>>1;n(t[a],e)<0?r=a+1:i=a}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>function(t,e){return te?1:t>=e?0:NaN}(t(e),n)}(t)),{left:r,center:function(t,n,i,a){null==i&&(i=0),null==a&&(a=t.length);const o=r(t,n,i,a-1);return o>i&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[a],e)>0?i=a:r=a+1}return r}}}(RC),LC=UC.left,qC=UC.right;var PC={E_union:function(t,e){if(!t.length)return e;for(var n=0,r=e.length;ne.indexOf(t)>=0)):e},R_union:function(t,e){var n=(0,m.He)(e[0]),r=(0,m.He)(e[1]);return n>r&&(n=e[1],r=e[0]),t.length?(t[0]>n&&(t[0]=n),t[1]r&&(n=e[1],r=e[0]),t.length?rr&&(t[1]=r),t):[n,r]}};function jC(t,e,n,r){e[0].type!==vE&&(0,m.vU)("First argument to selection functions must be a string literal.");const i=e[0].value,a=":"+i;(e.length>=2&&(0,m.fj)(e).value)!==TC||(0,m.nr)(r,"@unit")||(r["@unit"]=n.getData(i).indataRef(n,"unit")),(0,m.nr)(r,a)||(r[a]=n.getData(i).tuplesRef())}function IC(t){const e=this.context.data[t];return e?e.values.value:[]}const WC=t=>function(e,n){return this.context.dataflow.locale()[t](n)(e)},XC=WC("format"),$C=WC("timeFormat"),HC=WC("utcFormat"),YC=WC("timeParse"),JC=WC("utcParse"),VC=new Date(2e3,0,1);function GC(t,e,n){return Number.isInteger(t)&&Number.isInteger(e)?(VC.setYear(2e3),VC.setMonth(t),VC.setDate(e),$C.call(this,VC,n)):""}function KC(t,e,n,r){e[0].type!==vE&&(0,m.vU)("First argument to data functions must be a string literal.");const i=e[0].value,a=":"+i;if(!(0,m.nr)(a,r))try{r[a]=n.getData(i).tuplesRef()}catch(t){}}function ZC(t,e,n,r){if(e[0].type===vE)QC(n,r,e[0].value);else for(t in n.scales)QC(n,r,t)}function QC(t,e,n){const r="%"+n;if(!(0,m.nr)(e,r))try{e[r]=t.scaleRef(n)}catch(t){}}function tF(t,e){let n;return(0,m.mf)(t)?t:(0,m.HD)(t)?(n=e.scales[t])&&n.value:void 0}function eF(t,e){return function(n,r,i){if(n){const e=tF(n,(i||this).context);return e&&e.path[t](r)}return e(r)}}const nF=eF("area",(function(t){return ID=new gx,mx(t,WD),2*ID})),rF=eF("bounds",(function(t){var e,n,r,i,a,o,u;if(ND=TD=-(SD=BD=1/0),qD=[],mx(t,cC),n=qD.length){for(qD.sort(xC),e=1,a=[r=qD[0]];evC(r[0],r[1])&&(r[1]=i[1]),vC(i[0],r[1])>vC(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(u=vC(r[1],i[0]))>o&&(o=u,SD=i[0],TD=r[1])}return qD=PD=null,SD===1/0||BD===1/0?[[NaN,NaN],[NaN,NaN]]:[[SD,BD],[TD,ND]]})),iF=eF("centroid",(function(t){JD=VD=GD=KD=ZD=QD=tC=eC=0,nC=new gx,rC=new gx,iC=new gx,mx(t,bC);var e=+nC,n=+rC,r=+iC,i=Bx(e,n,r);return ilF(t,e)}const fF={};function hF(t){return(0,m.kJ)(t)||ArrayBuffer.isView(t)?t:null}function dF(t){return hF(t)||((0,m.HD)(t)?t:null)}const pF=t=>t.data;function mF(t,e){const n=IC.call(e,t);return n.root&&n.root.lookup||{}}const gF=()=>"undefined"!=typeof window&&window||null,yF={random:()=>ma(),cumulativeNormal:Ea,cumulativeLogNormal:Ta,cumulativeUniform:La,densityNormal:Aa,densityLogNormal:Ba,densityUniform:Ua,quantileNormal:Da,quantileLogNormal:Na,quantileUniform:qa,sampleNormal:Ma,sampleLogNormal:Sa,sampleUniform:Ra,isArray:m.kJ,isBoolean:m.jn,isDate:m.J_,isDefined:t=>void 0!==t,isNumber:m.hj,isObject:m.Kn,isRegExp:m.Kj,isString:m.HD,isTuple:xi,isValid:t=>null!=t&&t==t,toBoolean:m.sw,toDate:m.ZU,toNumber:m.He,toString:m.BB,indexof:function(t,...e){return dF(t).indexOf(...e)},join:function(t,...e){return hF(t).join(...e)},lastindexof:function(t,...e){return dF(t).lastIndexOf(...e)},replace:function(t,e,n){return(0,m.mf)(n)&&(0,m.vU)("Function argument passed to replace."),String(t).replace(e,n)},reverse:function(t){return hF(t).slice().reverse()},slice:function(t,...e){return dF(t).slice(...e)},flush:m.yl,lerp:m.t7,merge:function(){const t=[].slice.call(arguments);return t.unshift({}),(0,m.l7)(...t)},pad:m.vk,peek:m.fj,pluck:function(t,e){const n=fF[e]||(fF[e]=(0,m.EP)(e));return(0,m.kJ)(t)?t.map(n):n(t)},span:m.yP,inrange:m.u5,truncate:m.$G,rgb:Ml,lab:lf,hcl:gf,hsl:Bl,luminance:uF,contrast:function(t,e){const n=uF(t),r=uF(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},sequence:io,format:XC,utcFormat:HC,utcParse:JC,utcOffset:fn,utcSequence:pn,timeFormat:$C,timeParse:YC,timeOffset:cn,timeSequence:dn,timeUnitSpecifier:Oe,monthFormat:function(t){return GC.call(this,t,1,"%B")},monthAbbrevFormat:function(t){return GC.call(this,t,1,"%b")},dayFormat:function(t){return GC.call(this,0,2+t,"%A")},dayAbbrevFormat:function(t){return GC.call(this,0,2+t,"%a")},quarter:m.mS,utcquarter:m.N3,week:qe,utcweek:$e,dayofyear:Le,utcdayofyear:Xe,warn:function(){return aF(this.context.dataflow,"warn",arguments)},info:function(){return aF(this.context.dataflow,"info",arguments)},debug:function(){return aF(this.context.dataflow,"debug",arguments)},extent:m.We,inScope:function(t){const e=this.context.group;let n=!1;if(e)for(;t;){if(t===e){n=!0;break}t=t.mark.group}return n},intersect:function(t,e,n){if(!t)return[];const[r,i]=t,a=(new Vd).set(r[0],r[1],i[0],i[1]);return _y(n||this.context.dataflow.scenegraph().root,a,function(t){let e=null;if(t){const n=(0,m.IX)(t.marktype),r=(0,m.IX)(t.markname);e=t=>(!n.length||n.some((e=>t.marktype===e)))&&(!r.length||r.some((e=>t.name===e)))}return e}(e))},clampRange:m.l$,pinchDistance:function(t){const e=t.touches,n=e[0].clientX-e[1].clientX,r=e[0].clientY-e[1].clientY;return Math.sqrt(n*n+r*r)},pinchAngle:function(t){const e=t.touches;return Math.atan2(e[0].clientY-e[1].clientY,e[0].clientX-e[1].clientX)},screen:function(){const t=gF();return t?t.screen:{}},containerSize:function(){const t=this.context.dataflow,e=t.container&&t.container();return e?[e.clientWidth,e.clientHeight]:[void 0,void 0]},windowSize:function(){const t=gF();return t?[t.innerWidth,t.innerHeight]:[void 0,void 0]},bandspace:function(t,e,n){return Lf(t||0,e||0,n||0)},setdata:function(t,e){const n=this.context.dataflow,r=this.context.data[t].input;return n.pulse(r,n.changeset().remove(m.yb).insert(e)),1},pathShape:function(t){let e=null;return function(n){return n?vd(n,e=e||ud(t)):t}},panLinear:m.Dw,panLog:m.mJ,panPow:m.QA,panSymlog:m.Zw,zoomLinear:m.ay,zoomLog:m.dH,zoomPow:m.mK,zoomSymlog:m.bV,encode:function(t,e,n){if(t){const n=this.context.dataflow,r=t.mark.source;n.pulse(r,n.changeset().encode(t,e))}return void 0!==n?n:t},modify:function(t,e,n,r,i,a){const o=this.context.dataflow,u=this.context.data[t],s=u.input,l=o.stamp();let c,f,h=u.changes;if(!1===o._trigger||!(s.value.length||e||r))return 0;if((!h||h.stamp{u.modified=!0,o.pulse(s,h).run()}),!0,1)),n&&(c=!0===n?m.yb:(0,m.kJ)(n)||xi(n)?n:cF(n),h.remove(c)),e&&h.insert(e),r&&(c=cF(r),s.value.some(c)?h.remove(c):h.insert(r)),i)for(f in a)h.modify(i,f,a[f]);return 1}},vF=["view","item","group","xy","x","y"],xF="this.",_F={},bF={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:t=>"_[".concat((0,m.m8)("$"+t),"]"),functions:function(t){const e=kD(t);vF.forEach((t=>e[t]="event.vega."+t));for(const t in yF)e[t]=xF+t;return(0,m.l7)(e,function(t,e,n){e.__bandwidth=t=>t&&t.bandwidth?t.bandwidth():0,n._bandwidth=ZC,n._range=ZC,n._scale=ZC;const r=e=>"_["+(e.type===vE?(0,m.m8)("%"+e.value):(0,m.m8)("%")+"+"+t(e))+"]";return{_bandwidth:t=>"this.__bandwidth(".concat(r(t[0]),")"),_range:t=>"".concat(r(t[0]),".range()"),_scale:e=>"".concat(r(e[0]),"(").concat(t(e[1]),")")}}(t,yF,_F)),e},constants:wD,visitors:_F},wF=MD(bF);function kF(t,e,n){return 1===arguments.length?yF[t]:(yF[t]=e,n&&(_F[t]=n),wF&&(wF.functions[t]=xF+t),this)}function MF(t,e){const n={};let r;try{r=bD(t=(0,m.HD)(t)?t:(0,m.m8)(t)+"")}catch(e){(0,m.vU)("Expression parse error: "+t)}r.visit((t=>{if(t.type!==xE)return;const r=t.callee.name,i=bF.visitors[r];i&&i(r,t.arguments,e,n)}));const i=wF(r);return i.globals.forEach((t=>{const r="$"+t;!(0,m.nr)(n,r)&&e.getSignal(t)&&(n[r]=e.signalRef(t))})),{$expr:(0,m.l7)({code:i.code},e.options.ast?{ast:r}:null),$fields:i.fields,$params:n}}kF("bandwidth",(function(t,e){const n=tF(t,(e||this).context);return n&&n.bandwidth?n.bandwidth():0}),ZC),kF("copy",(function(t,e){const n=tF(t,(e||this).context);return n?n.copy():void 0}),ZC),kF("domain",(function(t,e){const n=tF(t,(e||this).context);return n?n.domain():[]}),ZC),kF("range",(function(t,e){const n=tF(t,(e||this).context);return n&&n.range?n.range():[]}),ZC),kF("invert",(function(t,e,n){const r=tF(t,(n||this).context);return r?(0,m.kJ)(e)?(r.invertRange||r.invert)(e):(r.invert||r.invertExtent)(e):void 0}),ZC),kF("scale",(function(t,e,n){const r=tF(t,(n||this).context);return r?r(e):void 0}),ZC),kF("gradient",(function(t,e,n,r,i){t=tF(t,(i||this).context);const a=nd(e,n);let o=t.domain(),u=o[0],s=(0,m.fj)(o),l=m.yR;return s-u?l=Eh(t,u,s):t=(t.interpolator?dh("sequential")().interpolator(t.interpolator()):dh("linear")().interpolate(t.interpolate()).range(t.range())).domain([u=0,s=1]),t.ticks&&(o=t.ticks(+r||15),u!==o[0]&&o.unshift(u),s!==(0,m.fj)(o)&&o.push(s)),o.forEach((e=>a.stop(l(e),t(e)))),a}),ZC),kF("geoArea",nF,ZC),kF("geoBounds",rF,ZC),kF("geoCentroid",iF,ZC),kF("geoShape",(function(t,e,n){const r=tF(t,(n||this).context);return function(t){return r?r.path.context(t)(e):""}}),ZC),kF("indata",(function(t,e,n){const r=this.context.data[t]["index:"+e],i=r?r.value.get(n):void 0;return i?i.count:i}),(function(t,e,n,r){e[0].type!==vE&&(0,m.vU)("First argument to indata must be a string literal."),e[1].type!==vE&&(0,m.vU)("Second argument to indata must be a string literal.");const i=e[0].value,a=e[1].value,o="@"+a;(0,m.nr)(o,r)||(r[o]=n.getData(i).indataRef(n,a))})),kF("data",IC,KC),kF("treePath",(function(t,e,n){const r=mF(t,this),i=r[e],a=r[n];return i&&a?i.path(a).map(pF):void 0}),KC),kF("treeAncestors",(function(t,e){const n=mF(t,this)[e];return n?n.ancestors().map(pF):void 0}),KC),kF("vlSelectionTest",(function(t,e,n){for(var r,i,a,o,u,s=this.context.data[t],l=s?s.values.value:[],c=s?s[zC]&&s[zC].value:void 0,f=n===TC,h=l.length,d=0;d(t[a[n].field]=e,t)),{}))}return e=e||NC,Object.keys(v).forEach((t=>{v[t]=Object.keys(v[t]).map((e=>v[t][e])).reduce(((n,r)=>void 0===n?r:PC[_[t]+"_"+e](n,r)))})),y=Object.keys(x),n&&y.length&&(v[r?"vlPoint":"vlMulti"]=e===NC?{or:y.reduce(((t,e)=>(t.push(...x[e]),t)),[])}:{and:y.map((t=>({or:x[t]})))}),v}),jC),kF("vlSelectionTuples",(function(t,e){return t.map((t=>(0,m.l7)({values:e.fields.map((e=>(e.getter||(e.getter=(0,m.EP)(e.field)))(t.datum)))},e)))}));const AF=(0,m.Rg)(["rule"]),EF=(0,m.Rg)(["group","image","rect"]);function DF(t){return(t+"").toLowerCase()}function CF(t,e,n){";"!==n[n.length-1]&&(n="return("+n+");");const r=Function(...e.concat(n));return t&&t.functions?r.bind(t.functions):r}var FF={operator:(t,e)=>CF(t,["_"],e.code),parameter:(t,e)=>CF(t,["datum","_"],e.code),event:(t,e)=>CF(t,["event"],e.code),handler:(t,e)=>CF(t,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(e.code,";")),encode:(t,e)=>{const{marktype:n,channels:r}=e;let i="var o=item,datum=o.datum,m=0,$;";for(const t in r){const e="o["+(0,m.m8)(t)+"]";i+="$=".concat(r[t].code,";if(").concat(e,"!==$)").concat(e,"=$,m=1;")}return i+=function(t,e){let n="";return AF[e]||(t.x2&&(t.x?(EF[e]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),t.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),t.y2&&(t.y?(EF[e]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),t.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(r,n),i+="return m;",CF(t,["item","_"],i)},codegen:{get(t){const e="[".concat(t.map(m.m8).join("]["),"]"),n=Function("_","return _".concat(e,";"));return n.path=e,n},comparator(t,e){let n;const r=Function("a","b","var u, v; return "+t.map(((t,r)=>{const i=e[r];let a,o;return t.path?(a="a".concat(t.path),o="b".concat(t.path)):((n=n||{})["f"+r]=t,a="this.f".concat(r,"(a)"),o="this.f".concat(r,"(b)")),function(t,e,n,r){return"((u = ".concat(t,") < (v = ").concat(e,") || u == null) && v != null ? ").concat(n,"\n : (u > v || v == null) && u != null ? ").concat(r,"\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(n,"\n : v !== v && u === u ? ").concat(r," : ")}(a,o,-i,i)})).join("")+"0;");return n?r.bind(n):r}}};function SF(t,e,n){if(!t||!(0,m.Kn)(t))return t;for(let r,i=0,a=BF.length;it&&t.$tupleid?_i:t));return e.fn[n]||(e.fn[n]=(0,m.qu)(r,t.$order,e.expr.codegen))}},{key:"$context",parse:function(t,e){return e}},{key:"$subflow",parse:function(t,e){const n=t.$subflow;return function(t,r,i){const a=e.fork().parse(n),o=a.get(n.operators[0].id),u=a.signals.parent;return u&&u.set(i),o.detachSubflow=()=>e.detach(a),o}}},{key:"$tupleid",parse:function(){return _i}}];const TF={skip:!0};function NF(t,e,n,r){return new zF(t,e,n,r)}function zF(t,e,n,r){this.dataflow=t,this.transforms=e,this.events=t.events.bind(t),this.expr=r||FF,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function OF(t){this.dataflow=t.dataflow,this.transforms=t.transforms,this.events=t.events,this.expr=t.expr,this.signals=Object.create(t.signals),this.scales=Object.create(t.scales),this.nodes=Object.create(t.nodes),this.data=Object.create(t.data),this.fn=Object.create(t.fn),t.functions&&(this.functions=Object.create(t.functions),this.functions.context=this)}function RF(t,e){t&&(null==e?t.removeAttribute("aria-label"):t.setAttribute("aria-label",e))}zF.prototype=OF.prototype={fork(){const t=new OF(this);return(this.subcontext||(this.subcontext=[])).push(t),t},detach(t){this.subcontext=this.subcontext.filter((e=>e!==t));const e=Object.keys(t.nodes);for(const n of e)t.nodes[n]._targets=null;for(const n of e)t.nodes[n].detach();t.nodes=null},get(t){return this.nodes[t]},set(t,e){return this.nodes[t]=e},add(t,e){const n=this,r=n.dataflow,i=t.value;if(n.set(t.id,e),"collect"===DF(t.type)&&i&&(i.$ingest?r.ingest(e,i.$ingest,i.$format):i.$request?r.preload(e,i.$request,i.$format):r.pulse(e,r.changeset().insert(i))),t.root&&(n.root=e),t.parent){let i=n.get(t.parent.$ref);i?(r.connect(i,[e]),e.targets().add(i)):(n.unresolved=n.unresolved||[]).push((()=>{i=n.get(t.parent.$ref),r.connect(i,[e]),e.targets().add(i)}))}if(t.signal&&(n.signals[t.signal]=e),t.scale&&(n.scales[t.scale]=e),t.data)for(const r in t.data){const i=n.data[r]||(n.data[r]={});t.data[r].forEach((t=>i[t]=e))}},resolve(){return(this.unresolved||[]).forEach((t=>t())),delete this.unresolved,this},operator(t,e){this.add(t,this.dataflow.add(t.value,e))},transform(t,e){this.add(t,this.dataflow.add(this.transforms[DF(e)]))},stream(t,e){this.set(t.id,e)},update(t,e,n,r,i){this.dataflow.on(e,n,r,i,t.options)},operatorExpression(t){return this.expr.operator(this,t)},parameterExpression(t){return this.expr.parameter(this,t)},eventExpression(t){return this.expr.event(this,t)},handlerExpression(t){return this.expr.handler(this,t)},encodeExpression(t){return this.expr.encode(this,t)},parse:function(t){const e=this,n=t.operators||[];return t.background&&(e.background=t.background),t.eventConfig&&(e.eventConfig=t.eventConfig),t.locale&&(e.locale=t.locale),n.forEach((t=>e.parseOperator(t))),n.forEach((t=>e.parseOperatorParameters(t))),(t.streams||[]).forEach((t=>e.parseStream(t))),(t.updates||[]).forEach((t=>e.parseUpdate(t))),e.resolve()},parseOperator:function(t){const e=this;"operator"!==DF(t.type)&&t.type?e.transform(t,t.type):e.operator(t,t.update?e.operatorExpression(t.update):null)},parseOperatorParameters:function(t){const e=this;if(t.params){const n=e.get(t.id);n||(0,m.vU)("Invalid operator id: "+t.id),e.dataflow.connect(n,n.parameters(e.parseParameters(t.params),t.react,t.initonly))}},parseParameters:function(t,e){e=e||{};const n=this;for(const r in t){const i=t[r];e[r]=(0,m.kJ)(i)?i.map((t=>SF(t,n,e))):SF(i,n,e)}return e},parseStream:function(t){var e,n=this,r=null!=t.filter?n.eventExpression(t.filter):void 0,i=null!=t.stream?n.get(t.stream):void 0;t.source?i=n.events(t.source,t.type,r):t.merge&&(i=(e=t.merge.map((t=>n.get(t))))[0].merge.apply(e[0],e.slice(1))),t.between&&(e=t.between.map((t=>n.get(t))),i=i.between(e[0],e[1])),t.filter&&(i=i.filter(r)),null!=t.throttle&&(i=i.throttle(+t.throttle)),null!=t.debounce&&(i=i.debounce(+t.debounce)),null==i&&(0,m.vU)("Invalid stream definition: "+JSON.stringify(t)),t.consume&&i.consume(!0),n.stream(t,i)},parseUpdate:function(t){var e,n=this,r=(0,m.Kn)(r=t.source)?r.$ref:r,i=n.get(r),a=t.update,o=void 0;i||(0,m.vU)("Source not defined: "+t.source),e=t.target&&t.target.$expr?n.eventExpression(t.target.$expr):n.get(t.target),a&&a.$expr&&(a.$params&&(o=n.parseParameters(a.$params)),a=n.handlerExpression(a.$expr)),n.update(t,i,e,a,o)},getState:function(t){var e=this,n={};if(t.signals){var r=n.signals={};Object.keys(e.signals).forEach((n=>{const i=e.signals[n];t.signals(n,i)&&(r[n]=i.value)}))}if(t.data){var i=n.data={};Object.keys(e.data).forEach((n=>{const r=e.data[n];t.data(n,r)&&(i[n]=r.input.value)}))}return e.subcontext&&!1!==t.recurse&&(n.subcontext=e.subcontext.map((e=>e.getState(t)))),n},setState:function(t){var e=this,n=e.dataflow,r=t.data,i=t.signals;Object.keys(i||{}).forEach((t=>{n.update(e.signals[t],i[t],TF)})),Object.keys(r||{}).forEach((t=>{n.pulse(e.data[t].input,n.changeset().remove(m.yb).insert(r[t]))})),(t.subcontext||[]).forEach(((t,n)=>{const r=e.subcontext[n];r&&r.setState(t)}))}};const UF="default";function LF(t,e){const n=t.globalCursor()?"undefined"!=typeof document&&document.body:t.container();if(n)return null==e?n.style.removeProperty("cursor"):n.style.cursor=e}function qF(t,e){var n=t._runtime.data;return(0,m.nr)(n,e)||(0,m.vU)("Unrecognized data set: "+e),n[e]}function PF(t,e){Di(e)||(0,m.vU)("Second argument to changes must be a changeset.");const n=qF(this,t);return n.modified=!0,this.pulse(n.input,e)}function jF(t){var e=t.padding();return Math.max(0,t._viewWidth+e.left+e.right)}function IF(t){var e=t.padding();return Math.max(0,t._viewHeight+e.top+e.bottom)}function WF(t){var e=t.padding(),n=t._origin;return[e.left+n[0],e.top+n[1]]}const XF="view",$F={trap:!1};function HF(t,e,n,r){t._eventListeners.push({type:n,sources:(0,m.IX)(e),handler:r})}function YF(t,e,n){const r=t._eventConfig&&t._eventConfig[e];return!(!1===r||(0,m.Kn)(r)&&!r[n])||(t.warn(`Blocked ${e} ${n} event listener.`),!1)}function JF(t){return t.item}function VF(t){return t.item.mark.source}function GF(t){return function(e,n){return n.vega.view().changeset().encode(n.item,t)}}function KF(t,e,n){const r=document.createElement(t);for(const t in e)r.setAttribute(t,e[t]);return null!=n&&(r.textContent=n),r}function ZF(t,e,n,r){const i=n.event||"input",a=()=>t.update(e.value);r.signal(n.signal,e.value),e.addEventListener(i,a),HF(r,e,i,a),t.set=t=>{e.value=t,e.dispatchEvent(function(t){return"undefined"!=typeof Event?new Event(t):{type:t}}(i))}}function QF(t,e,n,r){const i=r.signal(n.signal),a=KF("div",{class:"vega-bind"}),o="radio"===n.input?a:a.appendChild(KF("label"));o.appendChild(KF("span",{class:"vega-bind-name"},n.name||n.signal)),e.appendChild(a);let u=tS;switch(n.input){case"checkbox":u=eS;break;case"select":u=nS;break;case"radio":u=rS;break;case"range":u=iS}u(t,o,n,i)}function tS(t,e,n,r){const i=KF("input");for(const t in n)"signal"!==t&&"element"!==t&&i.setAttribute("input"===t?"type":t,n[t]);i.setAttribute("name",n.signal),i.value=r,e.appendChild(i),i.addEventListener("input",(()=>t.update(i.value))),t.elements=[i],t.set=t=>i.value=t}function eS(t,e,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const a=KF("input",i);e.appendChild(a),a.addEventListener("change",(()=>t.update(a.checked))),t.elements=[a],t.set=t=>a.checked=!!t||null}function nS(t,e,n,r){const i=KF("select",{name:n.signal}),a=n.labels||[];n.options.forEach(((t,e)=>{const n={value:t};aS(t,r)&&(n.selected=!0),i.appendChild(KF("option",n,(a[e]||t)+""))})),e.appendChild(i),i.addEventListener("change",(()=>{t.update(n.options[i.selectedIndex])})),t.elements=[i],t.set=t=>{for(let e=0,r=n.options.length;e{const u={type:"radio",name:n.signal,value:e};aS(e,r)&&(u.checked=!0);const s=KF("input",u);s.addEventListener("change",(()=>t.update(e)));const l=KF("label",{},(a[o]||e)+"");return l.prepend(s),i.appendChild(l),s})),t.set=e=>{const n=t.elements,r=n.length;for(let t=0;t{s.textContent=u.value,t.update(+u.value)};u.addEventListener("input",l),u.addEventListener("change",l),t.elements=[u],t.set=t=>{u.value=t,s.textContent=t}}function aS(t,e){return t===e||t+""==e+""}function oS(t,e,n,r,i,a){return(e=e||new r(t.loader())).initialize(n,jF(t),IF(t),WF(t),i,a).background(t.background())}function uS(t,e){return e?function(){try{e.apply(this,arguments)}catch(e){t.error(e)}}:null}function sS(t,e,n){if("string"==typeof e){if("undefined"==typeof document)return t.error("DOM document instance not found."),null;if(!(e=document.querySelector(e)))return t.error("Signal bind element not found: "+e),null}if(e&&n)try{e.innerHTML=""}catch(n){e=null,t.error(n)}return e}const lS=t=>+t||0;function cS(t){return(0,m.Kn)(t)?{top:lS(t.top),bottom:lS(t.bottom),left:lS(t.left),right:lS(t.right)}:(t=>({top:t,bottom:t,left:t,right:t}))(lS(t))}async function fS(t,e,n,r){const i=xy(e),a=i&&i.headless;return a||(0,m.vU)("Unrecognized renderer type: "+e),await t.runAsync(),oS(t,null,null,a,n,r).renderAsync(t._scenegraph.root)}var hS="padding",dS={skip:!0};function pS(t,e){var n=t.autosize(),r=t.padding();return e-(n&&n.contains===hS?r.left+r.right:0)}function mS(t,e){var n=t.autosize(),r=t.padding();return e-(n&&n.contains===hS?r.top+r.bottom:0)}function gS(t,e){return e.modified&&(0,m.kJ)(e.input.value)&&t.indexOf("_:vega:_")}function yS(t,e){return!("parent"===t||e instanceof Qi.proxy)}function vS(t,e,n,r){const i=t.element();i&&i.setAttribute("title",function(t){return null==t?"":(0,m.kJ)(t)?xS(t):(0,m.Kn)(t)&&!(0,m.J_)(t)?(e=t,Object.keys(e).map((t=>{const n=e[t];return t+": "+((0,m.kJ)(n)?xS(n):_S(n))})).join("\n")):t+"";var e}(r))}function xS(t){return"["+t.map(_S).join(", ")+"]"}function _S(t){return(0,m.kJ)(t)?"[…]":(0,m.Kn)(t)&&!(0,m.J_)(t)?"{…}":t}function bS(t,e){const n=this;if(e=e||{},Gi.call(n),e.loader&&n.loader(e.loader),e.logger&&n.logger(e.logger),null!=e.logLevel&&n.logLevel(e.logLevel),e.locale||t.locale){const r=(0,m.l7)({},t.locale,e.locale);n.locale(ci(r.number,r.time))}n._el=null,n._elBind=null,n._renderType=e.renderer||yy.Canvas,n._scenegraph=new Zm;const r=n._scenegraph.root;n._renderer=null,n._tooltip=e.tooltip||vS,n._redraw=!0,n._handler=(new Ag).scene(r),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function(t){const e=(0,m.l7)({defaults:{}},t),n=(t,e)=>{e.forEach((e=>{(0,m.kJ)(t[e])&&(t[e]=(0,m.Rg)(t[e]))}))};return n(e.defaults,["prevent","allow"]),n(e,["view","window","selector"]),e}(t.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const i=function(t,e,n){return NF(t,Qi,yF,n).parse(e)}(n,t,e.expr);n._runtime=i,n._signals=i.signals,n._bind=(t.bindings||[]).map((t=>({state:null,param:(0,m.l7)({},t)}))),i.root&&i.root.set(r),r.source=i.data.root.input,n.pulse(i.data.root.input,n.changeset().insert(r.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=pS(n,n._width),n._viewHeight=mS(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function(t){var e=t._signals,n=e.width,r=e.height,i=e.padding;function a(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,(e=>{t._width=e.size,t._viewWidth=pS(t,e.size),a()}),{size:n}),t._resizeHeight=t.add(null,(e=>{t._height=e.size,t._viewHeight=mS(t,e.size),a()}),{size:r});const o=t.add(null,a,{pad:i});t._resizeWidth.rank=n.rank+1,t._resizeHeight.rank=r.rank+1,o.rank=i.rank+1}(n),function(t){t.add(null,(e=>(t._background=e.bg,t._resize=1,e.bg)),{bg:t._signals.background})}(n),function(t){const e=t._signals.cursor||(t._signals.cursor=t.add({user:UF,item:null}));t.on(t.events("view","mousemove"),e,((t,n)=>{const r=e.value,i=r?(0,m.HD)(r)?r:r.user:UF,a=n.item&&n.item.cursor||null;return r&&i===r.user&&a==r.item?r:{user:i,item:a}})),t.add(null,(function(e){let n=e.cursor,r=this.value;return(0,m.HD)(n)||(r=n.item,n=n.user),LF(t,n&&n!==UF?n:r||n),r}),{cursor:e})}(n),n.description(t.description),e.hover&&n.hover(),e.container&&n.initialize(e.container,e.bind)}function wS(t,e){return(0,m.nr)(t._signals,e)?t._signals[e]:(0,m.vU)("Unrecognized signal name: "+(0,m.m8)(e))}function kS(t,e){const n=(t._targets||[]).filter((t=>t._update&&t._update.handler===e));return n.length?n[0]:null}function MS(t,e,n,r){let i=kS(n,r);return i||(i=uS(t,(()=>r(e,n.value))),i.handler=r,t.on(n,null,i)),t}function AS(t,e,n){const r=kS(e,n);return r&&e._targets.remove(r),t}(0,m.XW)(bS,Gi,{async evaluate(t,e,n){if(await Gi.prototype.evaluate.call(this,t,e),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,i=WF(r=this),a=jF(r),o=IF(r),r._renderer.background(r.background()),r._renderer.resize(a,o,i),r._handler.origin(i),r._resizeListeners.forEach((t=>{try{t(a,o)}catch(t){r.error(t)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(t){this.error(t)}var r,i,a,o;return n&&gi(this,n),this},dirty(t){this._redraw=!0,this._renderer&&this._renderer.dirty(t)},description(t){if(arguments.length){const e=null!=t?t+"":null;return e!==this._desc&&RF(this._el,this._desc=e),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(t,e,n){const r=wS(this,t);return 1===arguments.length?r.value:this.update(r,e,n)},width(t){return arguments.length?this.signal("width",t):this.signal("width")},height(t){return arguments.length?this.signal("height",t):this.signal("height")},padding(t){return arguments.length?this.signal("padding",cS(t)):cS(this.signal("padding"))},autosize(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},background(t){return arguments.length?this.signal("background",t):this.signal("background")},renderer(t){return arguments.length?(xy(t)||(0,m.vU)("Unrecognized renderer type: "+t),t!==this._renderType&&(this._renderType=t,this._resetRenderer()),this):this._renderType},tooltip(t){return arguments.length?(t!==this._tooltip&&(this._tooltip=t,this._resetRenderer()),this):this._tooltip},loader(t){return arguments.length?(t!==this._loader&&(Gi.prototype.loader.call(this,t),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(wS(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(t,e,n,r,i,a){this.runAfter((o=>{let u=0;o._autosize=0,o.width()!==n&&(u=1,o.signal("width",n,dS),o._resizeWidth.skip(!0)),o.height()!==r&&(u=1,o.signal("height",r,dS),o._resizeHeight.skip(!0)),o._viewWidth!==t&&(o._resize=1,o._viewWidth=t),o._viewHeight!==e&&(o._resize=1,o._viewHeight=e),o._origin[0]===i[0]&&o._origin[1]===i[1]||(o._resize=1,o._origin=i),u&&o.run("enter"),a&&o.runAfter((t=>t.resize()))}),!1,1)},addEventListener(t,e,n){let r=e;return n&&!1===n.trap||(r=uS(this,e),r.raw=e),this._handler.on(t,r),this},removeEventListener(t,e){for(var n,r,i=this._handler.handlers(t),a=i.length;--a>=0;)if(r=i[a].type,n=i[a].handler,t===r&&(e===n||e===n.raw)){this._handler.off(r,n);break}return this},addResizeListener(t){const e=this._resizeListeners;return e.indexOf(t)<0&&e.push(t),this},removeResizeListener(t){var e=this._resizeListeners,n=e.indexOf(t);return n>=0&&e.splice(n,1),this},addSignalListener(t,e){return MS(this,t,wS(this,t),e)},removeSignalListener(t,e){return AS(this,wS(this,t),e)},addDataListener(t,e){return MS(this,t,qF(this,t).values,e)},removeDataListener(t,e){return AS(this,qF(this,t).values,e)},globalCursor(t){if(arguments.length){if(this._globalCursor!==!!t){const e=LF(this,null);this._globalCursor=!!t,e&&LF(this,e)}return this}return this._globalCursor},preventDefault(t){return arguments.length?(this._preventDefault=t,this):this._preventDefault},timer:function(t,e){this._timers.push(function(t,e,n){var r=new Ak,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?kk():+n,r._restart((function a(o){o+=i,r._restart(a,i+=e,n),t(o)}),e,n)},r.restart(t,e,n),r)}((function(e){t({timestamp:Date.now(),elapsed:e})}),e))},events:function(t,e,n){var r,i=this,a=new Ri(n),o=function(n,r){i.runAsync(null,(()=>{t===XF&&function(t,e){var n=t._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[e]:i?!i[e]:t.preventDefault()))}(i,e)&&n.preventDefault(),a.receive(function(t,e,n){var r,i,a=t._renderer,o=a&&a.canvas();return o&&(i=WF(t),(r=ag(e.changedTouches?e.changedTouches[0]:e,o))[0]-=i[0],r[1]-=i[1]),e.dataflow=t,e.item=n,e.vega=function(t,e,n){const r=e?"group"===e.mark.marktype?e:e.mark.group:null;function i(t){var n,i=r;if(t)for(n=e;n;n=n.mark.group)if(n.mark.name===t){i=n;break}return i&&i.mark&&i.mark.interactive?i:{}}function a(t){if(!t)return n;(0,m.HD)(t)&&(t=i(t));const e=n.slice();for(;t;)e[0]-=t.x||0,e[1]-=t.y||0,t=t.mark&&t.mark.group;return e}return{view:(0,m.a9)(t),item:(0,m.a9)(e||{}),group:i,xy:a,x:t=>a(t)[0],y:t=>a(t)[1]}}(t,n,r),e}(i,n,r))}))};if("timer"===t)YF(i,"timer",e)&&i.timer(o,e);else if(t===XF)YF(i,"view",e)&&i.addEventListener(e,o,$F);else if("window"===t?YF(i,"window",e)&&"undefined"!=typeof window&&(r=[window]):"undefined"!=typeof document&&YF(i,"selector",e)&&(r=document.querySelectorAll(t)),r){for(var u=0,s=r.length;u=0;)i[t].stop();for(t=a.length;--t>=0;)for(e=(n=a[t]).sources.length;--e>=0;)n.sources[e].removeEventListener(n.type,n.handler);return r&&r.call(this,this._handler,null,null,null),this},hover:function(t,e){return e=[e||"update",(t=[t||"hover"])[0]],this.on(this.events("view","mouseover",JF),VF,GF(t)),this.on(this.events("view","mouseout",JF),VF,GF(e)),this},data:function(t,e){return arguments.length<2?qF(this,t).values.value:PF.call(this,t,Ci().remove(m.yb).insert(e))},change:PF,insert:function(t,e){return PF.call(this,t,Ci().insert(e))},remove:function(t,e){return PF.call(this,t,Ci().remove(e))},scale:function(t){var e=this._runtime.scales;return(0,m.nr)(e,t)||(0,m.vU)("Unrecognized scale or projection: "+t),e[t].value},initialize:function(t,e){const n=this,r=n._renderType,i=n._eventConfig.bind,a=xy(r);t=n._el=t?sS(n,t,!0):null,function(t){const e=t.container();e&&(e.setAttribute("role","graphics-document"),e.setAttribute("aria-roleDescription","visualization"),RF(e,t.description()))}(n),a||n.error("Unrecognized renderer type: "+r);const o=a.handler||Ag,u=t?a.renderer:a.headless;return n._renderer=u?oS(n,n._renderer,t,u):null,n._handler=function(t,e,n,r){const i=new r(t.loader(),uS(t,t.tooltip())).scene(t.scenegraph().root).initialize(n,WF(t),t);return e&&e.handlers().forEach((t=>{i.on(t.type,t.handler)})),i}(n,n._handler,t,o),n._redraw=!0,t&&"none"!==i&&(e=e?n._elBind=sS(n,e,!0):t.appendChild(KF("form",{class:"vega-bindings"})),n._bind.forEach((t=>{t.param.element&&"container"!==i&&(t.element=sS(n,t.param.element,!!t.param.input))})),n._bind.forEach((t=>{!function(t,e,n){if(!e)return;const r=n.param;let i=n.state;i||(i=n.state={elements:null,active:!1,set:null,update:e=>{e!=t.signal(r.signal)&&t.runAsync(null,(()=>{i.source=!0,t.signal(r.signal,e)}))}},r.debounce&&(i.update=(0,m.Ds)(r.debounce,i.update))),(null==r.input&&r.element?ZF:QF)(i,e,r,t),i.active||(t.on(t._signals[r.signal],null,(()=>{i.source?i.source=!1:i.set(t.signal(r.signal))})),i.active=!0)}(n,t.element||e,t)}))),n},toImageURL:async function(t,e){t!==yy.Canvas&&t!==yy.SVG&&t!==yy.PNG&&(0,m.vU)("Unrecognized image type: "+t);const n=await fS(this,t,e);return t===yy.SVG?function(t,e){const n=new Blob([t],{type:"image/svg+xml"});return window.URL.createObjectURL(n)}(n.svg()):n.canvas().toDataURL("image/png")},toCanvas:async function(t,e){return(await fS(this,yy.Canvas,t,e)).canvas()},toSVG:async function(t){return(await fS(this,yy.SVG,t)).svg()},getState:function(t){return this._runtime.getState(t||{data:gS,signals:yS,recurse:!0})},setState:function(t){return this.runAsync(null,(e=>{e._trigger=!1,e._runtime.setState(t)}),(t=>{t._trigger=!0})),this}});var ES=n(3082);function DS(t){return(0,m.Kn)(t)?t:{type:t||"pad"}}const CS=t=>+t||0;function FS(t){return(0,m.Kn)(t)?t.signal?t:{top:CS(t.top),bottom:CS(t.bottom),left:CS(t.left),right:CS(t.right)}:{top:e=CS(t),bottom:e,left:e,right:e};var e}const SS=t=>(0,m.Kn)(t)&&!(0,m.kJ)(t)?(0,m.l7)({},t):{value:t};function BS(t,e,n,r){return null!=n?((0,m.Kn)(n)&&!(0,m.kJ)(n)||(0,m.kJ)(n)&&n.length&&(0,m.Kn)(n[0])?t.update[e]=n:t[r||"enter"][e]={value:n},1):0}function TS(t,e,n){for(const n in e)BS(t,n,e[n]);for(const e in n)BS(t,e,n[e],"update")}function NS(t,e,n){for(const r in e)n&&(0,m.nr)(n,r)||(t[r]=(0,m.l7)(t[r]||{},e[r]));return t}function zS(t,e){return e&&(e.enter&&e.enter[t]||e.update&&e.update[t])}const OS="mark",RS="frame",US="scope",LS="legend-label";function qS(t,e,n){t[e]=n&&n.signal?{signal:n.signal}:{value:n}}const PS=t=>(0,m.HD)(t)?(0,m.m8)(t):t.signal?"(".concat(t.signal,")"):XS(t);function jS(t){if(null!=t.gradient)return function(t){const e=[t.start,t.stop,t.count].map((t=>null==t?null:(0,m.m8)(t)));for(;e.length&&null==(0,m.fj)(e);)e.pop();return e.unshift(PS(t.gradient)),"gradient(".concat(e.join(","),")")}(t);let e=t.signal?"(".concat(t.signal,")"):t.color?function(t){return t.c?IS("hcl",t.h,t.c,t.l):t.h||t.s?IS("hsl",t.h,t.s,t.l):t.l||t.a?IS("lab",t.l,t.a,t.b):t.r||t.g||t.b?IS("rgb",t.r,t.g,t.b):null}(t.color):null!=t.field?XS(t.field):void 0!==t.value?(0,m.m8)(t.value):void 0;return null!=t.scale&&(e=function(t,e){const n=PS(t.scale);return null!=t.range?e="lerp(_range(".concat(n,"), ").concat(+t.range,")"):(void 0!==e&&(e="_scale(".concat(n,", ").concat(e,")")),t.band&&(e=(e?e+"+":"")+"_bandwidth(".concat(n,")")+(1==+t.band?"":"*"+WS(t.band)),t.extra&&(e="(datum.extra ? _scale(".concat(n,", datum.extra.value) : ").concat(e,")"))),null==e&&(e="0")),e}(t,e)),void 0===e&&(e=null),null!=t.exponent&&(e="pow(".concat(e,",").concat(WS(t.exponent),")")),null!=t.mult&&(e+="*".concat(WS(t.mult))),null!=t.offset&&(e+="+".concat(WS(t.offset))),t.round&&(e="round(".concat(e,")")),e}const IS=(t,e,n,r)=>"(".concat(t,"(").concat([e,n,r].map(jS).join(","),")+'')");function WS(t){return(0,m.Kn)(t)?"("+jS(t)+")":t}function XS(t){return $S((0,m.Kn)(t)?t:{datum:t})}function $S(t){let e,n,r;if(t.signal)e="datum",r=t.signal;else if(t.group||t.parent){for(n=Math.max(1,t.level||1),e="item";n-- >0;)e+=".mark.group";t.parent?(r=t.parent,e+=".datum"):r=t.group}else t.datum?(e="datum",r=t.datum):(0,m.vU)("Invalid field reference: "+(0,m.m8)(t));return t.signal||(r=(0,m.HD)(r)?(0,m._k)(r).map(m.m8).join("]["):$S(r)),e+"["+r+"]"}function HS(t,e,n,r,i,a){const o={};(a=a||{}).encoders={$encode:o},t=function(t,e,n,r,i){const a={},o={};let u,s,l,c;for(s in s="lineBreak","text"!==e||null==i[s]||zS(s,t)||qS(a,s,i[s]),("legend"==n||String(n).startsWith("axis"))&&(n=null),c=n===RS?i.group:n===OS?(0,m.l7)({},i.mark,i[e]):null,c)l=zS(s,t)||("fill"===s||"stroke"===s)&&(zS("fill",t)||zS("stroke",t)),l||qS(a,s,c[s]);for(s in(0,m.IX)(r).forEach((e=>{const n=i.style&&i.style[e];for(const e in n)zS(e,t)||qS(a,e,n[e])})),t=(0,m.l7)({},t),a)c=a[s],c.signal?(u=u||{})[s]=c:o[s]=c;return t.enter=(0,m.l7)(o,t.enter),u&&(t.update=(0,m.l7)(u,t.update)),t}(t,e,n,r,i.config);for(const n in t)o[n]=YS(t[n],e,a,i);return a}function YS(t,e,n,r){const i={},a={};for(const e in t)null!=t[e]&&(i[e]=JS((o=t[e],(0,m.kJ)(o)?function(t){let e="";return t.forEach((t=>{const n=jS(t);e+=t.test?"(".concat(t.test,")?").concat(n,":"):n})),":"===(0,m.fj)(e)&&(e+="null"),e}(o):jS(o)),r,n,a));var o;return{$expr:{marktype:e,channels:i},$fields:Object.keys(a),$output:Object.keys(t)}}function JS(t,e,n,r){const i=MF(t,e);return i.$fields.forEach((t=>r[t]=1)),(0,m.l7)(n,i.$params),i.$expr}const VS=["value","update","init","react","bind"];function GS(t,e){(0,m.vU)(t+' for "outer" push: '+(0,m.m8)(e))}function KS(t,e){const n=t.name;if("outer"===t.push)e.signals[n]||GS("No prior signal definition",n),VS.forEach((e=>{void 0!==t[e]&&GS("Invalid property ",e)}));else{const r=e.addSignal(n,t.value);!1===t.react&&(r.react=!1),t.bind&&e.addBinding(n,t.bind)}}function ZS(t,e,n,r){this.id=-1,this.type=t,this.value=e,this.params=n,r&&(this.parent=r)}function QS(t,e,n,r){return new ZS(t,e,n,r)}function tB(t,e){return QS("operator",t,e)}function eB(t){const e={$ref:t.id};return t.id<0&&(t.refs=t.refs||[]).push(e),e}function nB(t,e){return e?{$field:t,$name:e}:{$field:t}}const rB=nB("key");function iB(t,e){return{$compare:t,$order:e}}function aB(t,e){return(t&&t.signal?"$"+t.signal:t||"")+(t&&e?"_":"")+(e&&e.signal?"$"+e.signal:e||"")}const oB="scope",uB="view";function sB(t){return t&&t.signal}function lB(t){if(sB(t))return!0;if((0,m.Kn)(t))for(const e in t)if(lB(t[e]))return!0;return!1}function cB(t,e){return null!=t?t:e}function fB(t){return t&&t.signal||t}const hB="timer";function dB(t,e){return(t.merge?pB:t.stream?mB:t.type?gB:(0,m.vU)("Invalid stream specification: "+(0,m.m8)(t)))(t,e)}function pB(t,e){const n=yB({merge:t.merge.map((t=>dB(t,e)))},t,e);return e.addStream(n).id}function mB(t,e){const n=yB({stream:dB(t.stream,e)},t,e);return e.addStream(n).id}function gB(t,e){let n;var r;t.type===hB?(n=e.event(hB,t.throttle),t={between:t.between,filter:t.filter}):n=e.event((r=t.source)===oB?uB:r||uB,t.type);const i=yB({stream:n},t,e);return 1===Object.keys(i).length?n:e.addStream(i).id}function yB(t,e,n){let r=e.between;return r&&(2!==r.length&&(0,m.vU)('Stream "between" parameter must have 2 entries: '+(0,m.m8)(e)),t.between=[dB(r[0],n),dB(r[1],n)]),r=e.filter?[].concat(e.filter):[],(e.marktype||e.markname||e.markrole)&&r.push(function(t,e,n){const r="event.item";return r+(t&&"*"!==t?"&&"+r+".mark.marktype==='"+t+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(e?"&&"+r+".mark.name==='"+e+"'":"")}(e.marktype,e.markname,e.markrole)),e.source===oB&&r.push("inScope(event.item)"),r.length&&(t.filter=MF("("+r.join(")&&(")+")",n).$expr),null!=(r=e.throttle)&&(t.throttle=+r),null!=(r=e.debounce)&&(t.debounce=+r),e.consume&&(t.consume=!0),t}const vB={code:"_.$value",ast:{type:"Identifier",value:"value"}};function xB(t){return{signal:"["+t.map((t=>t.scale?'scale("'+t.scale+'")':t.signal))+"]"}}const _B=t=>(e,n,r)=>QS(t,n,e||void 0,r),bB=_B("aggregate"),wB=_B("axisticks"),kB=_B("bound"),MB=_B("collect"),AB=_B("compare"),EB=_B("datajoin"),DB=_B("encode"),CB=_B("expression"),FB=_B("facet"),SB=_B("field"),BB=_B("key"),TB=_B("legendentries"),NB=_B("load"),zB=_B("mark"),OB=_B("multiextent"),RB=_B("multivalues"),UB=_B("overlap"),LB=_B("params"),qB=_B("prefacet"),PB=_B("projection"),jB=_B("proxy"),IB=_B("relay"),WB=_B("render"),XB=_B("scale"),$B=_B("sieve"),HB=_B("sortitems"),YB=_B("viewlayout"),JB=_B("values");let VB=0;const GB={min:"min",max:"max",count:"sum"};function KB(t,e){const n=e.getScale(t.name).params;let r;for(r in n.domain=eT(t.domain,t,e),null!=t.range&&(n.range=lT(t,e,n)),null!=t.interpolate&&function(t,e){e.interpolate=ZB(t.type||t),null!=t.gamma&&(e.interpolateGamma=ZB(t.gamma))}(t.interpolate,n),null!=t.nice&&(n.nice=function(t){return(0,m.Kn)(t)?{interval:ZB(t.interval),step:ZB(t.step)}:ZB(t)}(t.nice)),null!=t.bins&&(n.bins=function(t,e){return t.signal||(0,m.kJ)(t)?QB(t,e):e.objectProperty(t)}(t.bins,e)),t)(0,m.nr)(n,r)||"name"===r||(n[r]=ZB(t[r],e))}function ZB(t,e){return(0,m.Kn)(t)?t.signal?e.signalRef(t.signal):(0,m.vU)("Unsupported object: "+(0,m.m8)(t)):t}function QB(t,e){return t.signal?e.signalRef(t.signal):t.map((t=>ZB(t,e)))}function tT(t){(0,m.vU)("Can not find data set: "+(0,m.m8)(t))}function eT(t,e,n){if(t)return t.signal?n.signalRef(t.signal):((0,m.kJ)(t)?nT:t.fields?iT:rT)(t,e,n);null==e.domainMin&&null==e.domainMax||(0,m.vU)("No scale domain defined for domainMin/domainMax to override.")}function nT(t,e,n){return t.map((t=>ZB(t,n)))}function rT(t,e,n){const r=n.getData(t.data);return r||tT(t.data),yh(e.type)?r.valuesRef(n,t.field,oT(t.sort,!1)):bh(e.type)?r.domainRef(n,t.field):r.extentRef(n,t.field)}function iT(t,e,n){const r=t.data,i=t.fields.reduce(((t,e)=>(e=(0,m.HD)(e)?{data:r,field:e}:(0,m.kJ)(e)||e.signal?function(t,e){const n="_:vega:_"+VB++,r=MB({});if((0,m.kJ)(t))r.value={$ingest:t};else if(t.signal){const i="setdata("+(0,m.m8)(n)+","+t.signal+")";r.params.input=e.signalRef(i)}return e.addDataPipeline(n,[r,$B({})]),{data:n,field:"data"}}(e,n):e,t.push(e),t)),[]);return(yh(e.type)?aT:bh(e.type)?uT:sT)(t,n,i)}function aT(t,e,n){const r=oT(t.sort,!0);let i,a;const o=n.map((t=>{const n=e.getData(t.data);return n||tT(t.data),n.countsRef(e,t.field,r)})),u={groupby:rB,pulse:o};r&&(i=r.op||"count",a=r.field?aB(i,r.field):"count",u.ops=[GB[i]],u.fields=[e.fieldRef(a)],u.as=[a]),i=e.add(bB(u));const s=e.add(MB({pulse:eB(i)}));return a=e.add(JB({field:rB,sort:e.sortRef(r),pulse:eB(s)})),eB(a)}function oT(t,e){return t&&(t.field||t.op?t.field||"count"===t.op?e&&t.field&&t.op&&!GB[t.op]&&(0,m.vU)("Multiple domain scales can not be sorted using "+t.op):(0,m.vU)("No field provided for sort aggregate op: "+t.op):(0,m.Kn)(t)?t.field="key":t={field:"key"}),t}function uT(t,e,n){const r=n.map((t=>{const n=e.getData(t.data);return n||tT(t.data),n.domainRef(e,t.field)}));return eB(e.add(RB({values:r})))}function sT(t,e,n){const r=n.map((t=>{const n=e.getData(t.data);return n||tT(t.data),n.extentRef(e,t.field)}));return eB(e.add(OB({extents:r})))}function lT(t,e,n){const r=e.config.range;let i=t.range;if(i.signal)return e.signalRef(i.signal);if((0,m.HD)(i)){if(r&&(0,m.nr)(r,i))return lT(t=(0,m.l7)({},t,{range:r[i]}),e,n);"width"===i?i=[0,{signal:"width"}]:"height"===i?i=yh(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]:(0,m.vU)("Unrecognized scale range value: "+(0,m.m8)(i))}else{if(i.scheme)return n.scheme=(0,m.kJ)(i.scheme)?QB(i.scheme,e):ZB(i.scheme,e),i.extent&&(n.schemeExtent=QB(i.extent,e)),void(i.count&&(n.schemeCount=ZB(i.count,e)));if(i.step)return void(n.rangeStep=ZB(i.step,e));if(yh(t.type)&&!(0,m.kJ)(i))return eT(i,t,e);(0,m.kJ)(i)||(0,m.vU)("Unsupported range type: "+(0,m.m8)(i))}return i.map((t=>((0,m.kJ)(t)?QB:ZB)(t,e)))}function cT(t,e,n){return(0,m.kJ)(t)?t.map((t=>cT(t,e,n))):(0,m.Kn)(t)?t.signal?n.signalRef(t.signal):"fit"===e?t:(0,m.vU)("Unsupported parameter object: "+(0,m.m8)(t)):t}const fT="top",hT="left",dT="right",pT="bottom",mT="center",gT="index",yT="label",vT="perc",xT="value",_T="guide-label",bT="guide-title",wT="symbol",kT="gradient",MT="discrete",AT="size",ET=[AT,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],DT={name:1,style:1,interactive:1},CT={value:0},FT={value:1},ST="group",BT="rect",TT="rule",NT="text";function zT(t){return t.type=ST,t.interactive=t.interactive||!1,t}function OT(t,e){const n=(n,r)=>cB(t[n],cB(e[n],r));return n.isVertical=n=>"vertical"===cB(t.direction,e.direction||(n?e.symbolDirection:e.gradientDirection)),n.gradientLength=()=>cB(t.gradientLength,e.gradientLength||e.gradientWidth),n.gradientThickness=()=>cB(t.gradientThickness,e.gradientThickness||e.gradientHeight),n.entryColumns=()=>cB(t.columns,cB(e.columns,+n.isVertical(!0))),n}function RT(t,e){const n=e&&(e.update&&e.update[t]||e.enter&&e.enter[t]);return n&&n.signal?n:n?n.value:null}function UT(t,e,n){return"item.anchor === '".concat("start","' ? ").concat(t," : item.anchor === '").concat("end","' ? ").concat(e," : ").concat(n)}const LT=UT((0,m.m8)(hT),(0,m.m8)(dT),(0,m.m8)(mT));function qT(t,e){return e?t?(0,m.Kn)(t)?Object.assign({},t,{offset:qT(t.offset,e)}):{value:t,offset:e}:e:t}function PT(t,e){return e?(t.name=e.name,t.style=e.style||t.style,t.interactive=!!e.interactive,t.encode=NS(t.encode,e,DT)):t.interactive=!1,t}function jT(t,e,n,r){const i=OT(t,n),a=i.isVertical(),o=i.gradientThickness(),u=i.gradientLength();let s,l,c,f,h;a?(l=[0,1],c=[0,0],f=o,h=u):(l=[0,0],c=[1,0],f=u,h=o);const d={enter:s={opacity:CT,x:CT,y:CT,width:SS(f),height:SS(h)},update:(0,m.l7)({},s,{opacity:FT,fill:{gradient:e,start:l,stop:c}}),exit:{opacity:CT}};return TS(d,{stroke:i("gradientStrokeColor"),strokeWidth:i("gradientStrokeWidth")},{opacity:i("gradientOpacity")}),PT({type:BT,role:"legend-gradient",encode:d},r)}function IT(t,e,n,r,i){const a=OT(t,n),o=a.isVertical(),u=a.gradientThickness(),s=a.gradientLength();let l,c,f,h,d="";o?(l="y",f="y2",c="x",h="width",d="1-"):(l="x",f="x2",c="y",h="height");const p={opacity:CT,fill:{scale:e,field:xT}};p[l]={signal:d+"datum."+vT,mult:s},p[c]=CT,p[f]={signal:d+"datum.perc2",mult:s},p[h]=SS(u);const g={enter:p,update:(0,m.l7)({},p,{opacity:FT}),exit:{opacity:CT}};return TS(g,{stroke:a("gradientStrokeColor"),strokeWidth:a("gradientStrokeWidth")},{opacity:a("gradientOpacity")}),PT({type:BT,role:"legend-band",key:xT,from:i,encode:g},r)}const WT="datum.".concat(vT,'<=0?"').concat(hT,'":datum.').concat(vT,'>=1?"').concat(dT,'":"').concat(mT,'"'),XT="datum.".concat(vT,'<=0?"').concat(pT,'":datum.').concat(vT,'>=1?"').concat(fT,'":"').concat("middle",'"');function $T(t,e,n,r){const i=OT(t,e),a=i.isVertical(),o=SS(i.gradientThickness()),u=i.gradientLength();let s,l,c,f,h=i("labelOverlap"),d="";const p={enter:s={opacity:CT},update:l={opacity:FT,text:{field:yT}},exit:{opacity:CT}};return TS(p,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:cB(t.labelLimit,e.gradientLabelLimit)}),a?(s.align={value:"left"},s.baseline=l.baseline={signal:XT},c="y",f="x",d="1-"):(s.align=l.align={signal:WT},s.baseline={value:"top"},c="x",f="y"),s[c]=l[c]={signal:d+"datum."+vT,mult:u},s[f]=l[f]=o,o.offset=cB(t.labelOffset,e.gradientLabelOffset)||0,h=h?{separation:i("labelSeparation"),method:h,order:"datum.index"}:void 0,PT({type:NT,role:LS,style:_T,key:xT,from:r,encode:p,overlap:h},n)}function HT(t,e,n,r,i){const a=OT(t,e),o=n.entries,u=!(!o||!o.interactive),s=o?o.name:void 0,l=a("clipHeight"),c=a("symbolOffset"),f={data:"value"},h="(".concat(i,") ? datum.").concat("offset"," : datum.").concat(AT),d=l?SS(l):{field:AT},p="datum.".concat(gT),m="max(1, ".concat(i,")");let g,y,v,x,_;d.mult=.5,g={enter:y={opacity:CT,x:{signal:h,mult:.5,offset:c},y:d},update:v={opacity:FT,x:y.x,y:y.y},exit:{opacity:CT}};let b=null,w=null;t.fill||(b=e.symbolBaseFillColor,w=e.symbolBaseStrokeColor),TS(g,{fill:a("symbolFillColor",b),shape:a("symbolType"),size:a("symbolSize"),stroke:a("symbolStrokeColor",w),strokeDash:a("symbolDash"),strokeDashOffset:a("symbolDashOffset"),strokeWidth:a("symbolStrokeWidth")},{opacity:a("symbolOpacity")}),ET.forEach((e=>{t[e]&&(v[e]=y[e]={scale:t[e],field:xT})}));const k=PT({type:"symbol",role:"legend-symbol",key:xT,from:f,clip:!!l||void 0,encode:g},n.symbols),M=SS(c);M.offset=a("labelOffset"),g={enter:y={opacity:CT,x:{signal:h,offset:M},y:d},update:v={opacity:FT,text:{field:yT},x:y.x,y:y.y},exit:{opacity:CT}},TS(g,{align:a("labelAlign"),baseline:a("labelBaseline"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontStyle:a("labelFontStyle"),fontWeight:a("labelFontWeight"),limit:a("labelLimit")});const A=PT({type:NT,role:LS,style:_T,key:xT,from:f,encode:g},n.labels);return g={enter:{noBound:{value:!l},width:CT,height:l?SS(l):CT,opacity:CT},exit:{opacity:CT},update:v={opacity:FT,row:{signal:null},column:{signal:null}}},a.isVertical(!0)?(x="ceil(item.mark.items.length / ".concat(m,")"),v.row.signal="".concat(p,"%").concat(x),v.column.signal="floor(".concat(p," / ").concat(x,")"),_={field:["row",p]}):(v.row.signal="floor(".concat(p," / ").concat(m,")"),v.column.signal="".concat(p," % ").concat(m),_={field:p}),v.column.signal="(".concat(i,")?").concat(v.column.signal,":").concat(p),zT({role:US,from:r={facet:{data:r,name:"value",groupby:gT}},encode:NS(g,o,DT),marks:[k,A],name:s,interactive:u,sort:_})}const YT='item.orient === "left"',JT='item.orient === "right"',VT="(".concat(YT," || ").concat(JT,")"),GT="datum.vgrad && ".concat(VT),KT=UT('"top"','"bottom"','"middle"'),ZT=UT('"right"','"left"','"center"'),QT="datum.vgrad && ".concat(JT," ? (").concat(ZT,") : (").concat(VT," && !(datum.vgrad && ").concat(YT,')) ? "left" : ').concat(LT),tN="item._anchor || (".concat(VT,' ? "middle" : "start")'),eN="".concat(GT," ? (").concat(YT," ? -90 : 90) : 0"),nN="".concat(VT," ? (datum.vgrad ? (").concat(JT,' ? "bottom" : "top") : ').concat(KT,') : "top"');function rN(t,e){let n;return(0,m.Kn)(t)&&(t.signal?n=t.signal:t.path?n="pathShape("+iN(t.path)+")":t.sphere&&(n="geoShape("+iN(t.sphere)+', {type: "Sphere"})')),n?e.signalRef(n):!!t}function iN(t){return(0,m.Kn)(t)&&t.signal?t.signal:(0,m.m8)(t)}function aN(t){const e=t.role||"";return e.indexOf("axis")&&e.indexOf("legend")&&e.indexOf("title")?t.type===ST?US:e||OS:e}function oN(t){return{marktype:t.type,name:t.name||void 0,role:t.role||aN(t),zindex:+t.zindex||void 0,aria:t.aria,description:t.description}}function uN(t,e){return t&&t.signal?e.signalRef(t.signal):!1!==t}function sN(t,e){const n=ta(t.type);n||(0,m.vU)("Unrecognized transform type: "+(0,m.m8)(t.type));const r=QS(n.type.toLowerCase(),null,lN(n,t,e));return t.signal&&e.addSignal(t.signal,e.proxy(r)),r.metadata=n.metadata||{},r}function lN(t,e,n){const r={},i=t.params.length;for(let a=0;ahN(t,e,n)))):hN(t,r,n)}(t,e,n):"projection"===r?n.projectionRef(e[t.name]):t.array&&!sB(i)?i.map((e=>fN(t,e,n))):fN(t,i,n):void(t.required&&(0,m.vU)("Missing required "+(0,m.m8)(e.type)+" parameter: "+(0,m.m8)(t.name)))}function fN(t,e,n){const r=t.type;if(sB(e))return gN(r)?(0,m.vU)("Expression references can not be signals."):yN(r)?n.fieldRef(e):vN(r)?n.compareRef(e):n.signalRef(e.signal);{const i=t.expr||yN(r);return i&&dN(e)?n.exprRef(e.expr,e.as):i&&pN(e)?nB(e.field,e.as):gN(r)?MF(e,n):mN(r)?eB(n.getData(e).values):yN(r)?nB(e):vN(r)?n.compareRef(e):e}}function hN(t,e,n){const r=t.params.length;let i;for(let n=0;nt&&t.expr,pN=t=>t&&t.field,mN=t=>"data"===t,gN=t=>"expr"===t,yN=t=>"field"===t,vN=t=>"compare"===t;function xN(t,e){return t.$ref?t:t.data&&t.data.$ref?t.data:eB(e.getData(t.data).output)}function _N(t,e,n,r,i){this.scope=t,this.input=e,this.output=n,this.values=r,this.aggregate=i,this.index={}}function bN(t){return(0,m.HD)(t)?t:null}function wN(t,e,n){const r=aB(n.op,n.field);let i;if(e.ops){for(let t=0,n=e.as.length;tnull==t?"null":t)).join(",")+"),0)",e);s.update=l.$expr,s.params=l.$params}function AN(t,e){const n=aN(t),r=t.type===ST,i=t.from&&t.from.facet,a=t.overlap;let o,u,s,l,c,f,h,d=t.layout||n===US||n===RS;const p=n===OS||d||i,g=function(t,e,n){let r,i,a,o,u;return t?(r=t.facet)&&(e||(0,m.vU)("Only group marks can be faceted."),null!=r.field?o=u=xN(r,n):(t.data?u=eB(n.getData(t.data).aggregate):(a=sN((0,m.l7)({type:"aggregate",groupby:(0,m.IX)(r.groupby)},r.aggregate),n),a.params.key=n.keyRef(r.groupby),a.params.pulse=xN(r,n),o=u=eB(n.add(a))),i=n.keyRef(r.groupby,!0))):o=eB(n.add(MB(null,[{}]))),o||(o=xN(t,n)),{key:i,pulse:o,parent:u}}(t.from,r,e);u=e.add(EB({key:g.key||(t.key?nB(t.key):void 0),pulse:g.pulse,clean:!r}));const y=eB(u);u=s=e.add(MB({pulse:y})),u=e.add(zB({markdef:oN(t),interactive:uN(t.interactive,e),clip:rN(t.clip,e),context:{$context:!0},groups:e.lookup(),parent:e.signals.parent?e.signalRef("parent"):null,index:e.markpath(),pulse:eB(u)}));const v=eB(u);u=l=e.add(DB(HS(t.encode,t.type,n,t.style,e,{mod:!1,pulse:v}))),u.params.parent=e.encode(),t.transform&&t.transform.forEach((t=>{const n=sN(t,e),r=n.metadata;(r.generates||r.changes)&&(0,m.vU)("Mark transforms should not generate new data."),r.nomod||(l.params.mod=!0),n.params.pulse=eB(u),e.add(u=n)})),t.sort&&(u=e.add(HB({sort:e.compareRef(t.sort),pulse:eB(u)})));const x=eB(u);(i||d)&&(d=e.add(YB({layout:e.objectProperty(t.layout),legends:e.legends,mark:v,pulse:x})),f=eB(d));const _=e.add(kB({mark:v,pulse:f||x}));h=eB(_),r&&(p&&(o=e.operators,o.pop(),d&&o.pop()),e.pushState(x,f||h,y),i?function(t,e,n){const r=t.from.facet,i=r.name,a=xN(r,e);let o;r.name||(0,m.vU)("Facet must have a name: "+(0,m.m8)(r)),r.data||(0,m.vU)("Facet must reference a data set: "+(0,m.m8)(r)),r.field?o=e.add(qB({field:e.fieldRef(r.field),pulse:a})):r.groupby?o=e.add(FB({key:e.keyRef(r.groupby),group:eB(e.proxy(n.parent)),pulse:a})):(0,m.vU)("Facet must specify groupby or field: "+(0,m.m8)(r));const u=e.fork(),s=u.add(MB()),l=u.add($B({pulse:eB(s)}));u.addData(i,new _N(u,s,s,l)),u.addSignal("parent",null),o.params.subflow={$subflow:u.parse(t).toRuntime()}}(t,e,g):p?function(t,e,n){const r=e.add(qB({pulse:n.pulse})),i=e.fork();i.add($B()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(t).toRuntime()}}(t,e,g):e.parse(t),e.popState(),p&&(d&&o.push(d),o.push(_))),a&&(h=function(t,e,n){const r=t.method,i=t.bound,a=t.separation,o={separation:sB(a)?n.signalRef(a.signal):a,method:sB(r)?n.signalRef(r.signal):r,pulse:e};if(t.order&&(o.sort=n.compareRef({field:t.order})),i){const t=i.tolerance;o.boundTolerance=sB(t)?n.signalRef(t.signal):+t,o.boundScale=n.scaleRef(i.scale),o.boundOrient=i.orient}return eB(n.add(UB(o)))}(a,h,e));const b=e.add(WB({pulse:h})),w=e.add($B({pulse:eB(b)},void 0,e.parent()));null!=t.name&&(c=t.name,e.addData(c,new _N(e,s,b,w)),t.on&&t.on.forEach((t=>{(t.insert||t.remove||t.toggle)&&(0,m.vU)("Marks only support modify triggers."),MN(t,e,c)})))}function EN(t,e,n){const r={enter:{},update:{}};return TS(r,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:t("legendX"),y:t("legendY"),format:e.format,formatType:e.formatType}),r}function DN(t,e,n){return e[t]?'scale("'.concat(e[t],'",datum)'):RT(t,n[0].encode)}_N.fromEntries=function(t,e){const n=e.length,r=e[n-1],i=e[n-2];let a=e[0],o=null,u=1;for(a&&"load"===a.type&&(a=e[1]),t.add(e[0]);ut===pT||t===fT,NN=(t,e,n)=>sB(t)?qN(t.signal,e,n):t===hT||t===fT?e:n,zN=(t,e,n)=>sB(t)?UN(t.signal,e,n):TN(t)?e:n,ON=(t,e,n)=>sB(t)?LN(t.signal,e,n):TN(t)?n:e,RN=(t,e,n)=>sB(t)?PN(t.signal,e,n):t===fT?{value:e}:{value:n},UN=(t,e,n)=>jN("".concat(t," === '").concat(fT,"' || ").concat(t," === '").concat(pT,"'"),e,n),LN=(t,e,n)=>jN("".concat(t," !== '").concat(fT,"' && ").concat(t," !== '").concat(pT,"'"),e,n),qN=(t,e,n)=>WN("".concat(t," === '").concat(hT,"' || ").concat(t," === '").concat(fT,"'"),e,n),PN=(t,e,n)=>WN("".concat(t," === '").concat(fT,"'"),e,n),jN=(t,e,n)=>(e=null!=e?SS(e):e,n=null!=n?SS(n):n,IN(e)&&IN(n)?(e=e?e.signal||(0,m.m8)(e.value):null,n=n?n.signal||(0,m.m8)(n.value):null,{signal:"".concat(t," ? (").concat(e,") : (").concat(n,")")}):[(0,m.l7)({test:t},e)].concat(n||[])),IN=t=>null==t||1===Object.keys(t).length,WN=(t,e,n)=>({signal:"".concat(t," ? (").concat($N(e),") : (").concat($N(n),")")}),XN=(t,e,n,r,i)=>({signal:(null!=r?"".concat(t," === '").concat(hT,"' ? (").concat($N(r),") : "):"")+(null!=n?"".concat(t," === '").concat(pT,"' ? (").concat($N(n),") : "):"")+(null!=i?"".concat(t," === '").concat(dT,"' ? (").concat($N(i),") : "):"")+(null!=e?"".concat(t," === '").concat(fT,"' ? (").concat($N(e),") : "):"")+"(null)"}),$N=t=>sB(t)?t.signal:null==t?null:(0,m.m8)(t),HN=(t,e)=>{const n=t.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+e.signal}:t};function YN(t,e,n,r){let i;if(e&&(0,m.nr)(e,t))return e[t];if((0,m.nr)(n,t))return n[t];if(t.startsWith("title")){switch(t){case"titleColor":i="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":i=t[5].toLowerCase()+t.slice(6)}return r["guide-title"][i]}if(t.startsWith("label")){switch(t){case"labelColor":i="fill";break;case"labelFont":case"labelFontSize":i=t[5].toLowerCase()+t.slice(6)}return r["guide-label"][i]}return null}function JN(t){const e={};for(const n of t)if(n)for(const t in n)e[t]=1;return Object.keys(e)}function VN(t,e){return{scale:t.scale,range:e}}function GN(t,e,n,r,i){return{signal:'flush(range("'+t+'"), scale("'+t+'", datum.value), '+e+","+n+","+r+","+i+")"}}function KN(t,e,n,r,i,a){const o=OT(t,e),u=t.orient,s=t.scale,l=NN(u,-1,1),c=fB(o("labelFlush")),f=fB(o("labelFlushOffset")),h=o("labelAlign"),d=o("labelBaseline");let p,m=0===c||!!c;const g=SS(i);g.mult=l,g.offset=SS(o("labelPadding")||0),g.offset.mult=l;const y={scale:s,field:xT,band:.5,offset:qT(a.offset,o("labelOffset"))},v=zN(u,m?GN(s,c,'"left"','"right"','"center"'):{value:"center"},((t,e,n)=>sB(t)?((t,e,n)=>WN("".concat(t," === '").concat(dT,"'"),e,n))(t.signal,e,n):t===dT?{value:e}:{value:n})(u,"left","right")),x=zN(u,RN(u,"bottom","top"),m?GN(s,c,'"top"','"bottom"','"middle"'):{value:"middle"}),_=GN(s,c,"-(".concat(f,")"),f,0);m=m&&f;const b={opacity:CT,x:zN(u,y,g),y:ON(u,y,g)},w={enter:b,update:p={opacity:FT,text:{field:yT},x:b.x,y:b.y,align:v,baseline:x},exit:{opacity:CT,x:b.x,y:b.y}};TS(w,{dx:!h&&m?zN(u,_):null,dy:!d&&m?ON(u,_):null}),TS(w,{angle:o("labelAngle"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontWeight:o("labelFontWeight"),fontStyle:o("labelFontStyle"),limit:o("labelLimit"),lineHeight:o("labelLineHeight")},{align:h,baseline:d});const k=o("labelBound");let M=o("labelOverlap");return M=M||k?{separation:o("labelSeparation"),method:M,order:"datum.index",bound:k?{scale:s,orient:u,tolerance:k}:null}:void 0,p.align!==v&&(p.align=HN(p.align,v)),p.baseline!==x&&(p.baseline=HN(p.baseline,x)),PT({type:NT,role:"axis-label",style:_T,key:xT,from:r,encode:w,overlap:M},n)}function ZN(t,e){const n=function(t,e){var n,r,i,a=e.config,o=a.style,u=a.axis,s="band"===e.scaleType(t.scale)&&a.axisBand,l=t.orient;if(sB(l)){const t=JN([a.axisX,a.axisY]),e=JN([a.axisTop,a.axisBottom,a.axisLeft,a.axisRight]);for(i of(n={},t))n[i]=zN(l,YN(i,a.axisX,u,o),YN(i,a.axisY,u,o));for(i of(r={},e))r[i]=XN(l.signal,YN(i,a.axisTop,u,o),YN(i,a.axisBottom,u,o),YN(i,a.axisLeft,u,o),YN(i,a.axisRight,u,o))}else n=l===fT||l===pT?a.axisX:a.axisY,r=a["axis"+l[0].toUpperCase()+l.slice(1)];return n||r||s?(0,m.l7)({},u,n,r,s):u}(t,e),r=t.encode||{},i=r.axis||{},a=i.name||void 0,o=i.interactive,u=i.style,s=OT(t,n),l=function(t){const e=t("tickBand");let n,r,i=t("tickOffset");return e?e.signal?(n={signal:"(".concat(e.signal,") === 'extent' ? 1 : 0.5")},r={signal:"(".concat(e.signal,") === 'extent'")},(0,m.Kn)(i)||(i={signal:"(".concat(e.signal,") === 'extent' ? 0 : ").concat(i)})):"extent"===e?(n=1,r=!0,i=0):(n=.5,r=!1):(n=t("bandPosition"),r=t("tickExtra")),{extra:r,band:n,offset:i}}(s),c={scale:t.scale,ticks:!!s("ticks"),labels:!!s("labels"),grid:!!s("grid"),domain:!!s("domain"),title:null!=t.title},f=eB(e.add(MB({},[c]))),h=eB(e.add(wB({scale:e.scaleRef(t.scale),extra:e.property(l.extra),count:e.objectProperty(t.tickCount),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)}))),d=[];let p;return c.grid&&d.push(function(t,e,n,r,i){const a=OT(t,e),o=t.orient,u=t.gridScale,s=NN(o,1,-1),l=function(t,e){if(1===e);else if((0,m.Kn)(t)){let n=t=(0,m.l7)({},t);for(;null!=n.mult;){if(!(0,m.Kn)(n.mult))return n.mult=sB(e)?{signal:"(".concat(n.mult,") * (").concat(e.signal,")")}:n.mult*e,t;n=n.mult=(0,m.l7)({},n.mult)}n.mult=e}else t=sB(e)?{signal:"(".concat(e.signal,") * (").concat(t||0,")")}:e*(t||0);return t}(t.offset,s);let c,f,h;const d={enter:c={opacity:CT},update:h={opacity:FT},exit:f={opacity:CT}};TS(d,{stroke:a("gridColor"),strokeCap:a("gridCap"),strokeDash:a("gridDash"),strokeDashOffset:a("gridDashOffset"),strokeOpacity:a("gridOpacity"),strokeWidth:a("gridWidth")});const p={scale:t.scale,field:xT,band:i.band,extra:i.extra,offset:i.offset,round:a("tickRound")},g=zN(o,{signal:"height"},{signal:"width"}),y=u?{scale:u,range:0,mult:s,offset:l}:{value:0,offset:l},v=u?{scale:u,range:1,mult:s,offset:l}:(0,m.l7)(g,{mult:s,offset:l});return c.x=h.x=zN(o,p,y),c.y=h.y=ON(o,p,y),c.x2=h.x2=ON(o,v),c.y2=h.y2=zN(o,v),f.x=zN(o,p),f.y=ON(o,p),PT({type:TT,role:"axis-grid",key:xT,from:r,encode:d},n)}(t,n,r.grid,h,l)),c.ticks&&(p=s("tickSize"),d.push(function(t,e,n,r,i,a){const o=OT(t,e),u=t.orient,s=NN(u,-1,1);let l,c,f;const h={enter:l={opacity:CT},update:f={opacity:FT},exit:c={opacity:CT}};TS(h,{stroke:o("tickColor"),strokeCap:o("tickCap"),strokeDash:o("tickDash"),strokeDashOffset:o("tickDashOffset"),strokeOpacity:o("tickOpacity"),strokeWidth:o("tickWidth")});const d=SS(i);d.mult=s;const p={scale:t.scale,field:xT,band:a.band,extra:a.extra,offset:a.offset,round:o("tickRound")};return f.y=l.y=zN(u,CT,p),f.y2=l.y2=zN(u,d),c.x=zN(u,p),f.x=l.x=ON(u,CT,p),f.x2=l.x2=ON(u,d),c.y=ON(u,p),PT({type:TT,role:"axis-tick",key:xT,from:r,encode:h},n)}(t,n,r.ticks,h,p,l))),c.labels&&(p=c.ticks?p:0,d.push(KN(t,n,r.labels,h,p,l))),c.domain&&d.push(function(t,e,n,r){const i=OT(t,e),a=t.orient;let o,u;const s={enter:o={opacity:CT},update:u={opacity:FT},exit:{opacity:CT}};TS(s,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const l=VN(t,0),c=VN(t,1);return o.x=u.x=zN(a,l,CT),o.x2=u.x2=zN(a,c),o.y=u.y=ON(a,l,CT),o.y2=u.y2=ON(a,c),PT({type:TT,role:"axis-domain",from:r,encode:s},n)}(t,n,r.domain,f)),c.title&&d.push(function(t,e,n,r){const i=OT(t,e),a=t.orient,o=NN(a,-1,1);let u,s;const l={enter:u={opacity:CT,anchor:SS(i("titleAnchor",null)),align:{signal:LT}},update:s=(0,m.l7)({},u,{opacity:FT,text:SS(t.title)}),exit:{opacity:CT}},c={signal:'lerp(range("'.concat(t.scale,'"), ').concat(UT(0,1,.5),")")};return s.x=zN(a,c),s.y=ON(a,c),u.angle=zN(a,CT,((t,e)=>sB(t)?{signal:"(".concat(t.signal,") * ").concat(90)}:{value:90*t})(o)),u.baseline=zN(a,RN(a,pT,fT),{value:pT}),s.angle=u.angle,s.baseline=u.baseline,TS(l,{fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),angle:i("titleAngle"),baseline:i("titleBaseline")}),function(t,e,n,r){const i=(t,e)=>null!=t?(n.update[e]=HN(SS(t),n.update[e]),!1):!zS(e,r),a=i(t("titleX"),"x"),o=i(t("titleY"),"y");n.enter.auto=o===a?SS(o):zN(e,SS(o),SS(a))}(i,a,l,n),l.update.align=HN(l.update.align,u.align),l.update.angle=HN(l.update.angle,u.angle),l.update.baseline=HN(l.update.baseline,u.baseline),PT({type:NT,role:"axis-title",style:bT,from:r,encode:l},n)}(t,n,r.title,f)),AN(zT({role:"axis",from:f,encode:NS(QN(s,t),i,DT),marks:d,aria:s("aria"),description:s("description"),zindex:s("zindex"),name:a,interactive:o,style:u}),e)}function QN(t,e){const n={enter:{},update:{}};return TS(n,{orient:t("orient"),offset:t("offset")||0,position:cB(e.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:'abs(span(range("'.concat(e.scale,'")))')},translate:t("translate"),format:e.format,formatType:e.formatType}),n}function tz(t,e,n){const r=(0,m.IX)(t.signals),i=(0,m.IX)(t.scales);return n||r.forEach((t=>KS(t,e))),(0,m.IX)(t.projections).forEach((t=>function(t,e){const n=e.config.projection||{},r={};for(const n in t)"name"!==n&&(r[n]=cT(t[n],n,e));for(const t in n)null==r[t]&&(r[t]=cT(n[t],t,e));e.addProjection(t.name,r)}(t,e))),i.forEach((t=>function(t,e){const n=t.type||"linear";ph(n)||(0,m.vU)("Unrecognized scale type: "+(0,m.m8)(n)),e.addScale(t.name,{type:n,domain:void 0})}(t,e))),(0,m.IX)(t.data).forEach((t=>function(t,e){const n=[];t.transform&&t.transform.forEach((t=>{n.push(sN(t,e))})),t.on&&t.on.forEach((n=>{MN(n,e,t.name)})),e.addDataPipeline(t.name,function(t,e,n){const r=[];let i,a,o,u,s,l=null,c=!1,f=!1;for(t.values?sB(t.values)||lB(t.format)?(r.push(BN(e,t)),r.push(l=SN())):r.push(l=SN({$ingest:t.values,$format:t.format})):t.url?lB(t.url)||lB(t.format)?(r.push(BN(e,t)),r.push(l=SN())):r.push(l=SN({$request:t.url,$format:t.format})):t.source&&(l=i=(0,m.IX)(t.source).map((t=>eB(e.getData(t).output))),r.push(null)),a=0,o=n.length;aKB(t,e))),(n||r).forEach((t=>function(t,e){const n=e.getSignal(t.name);let r=t.update;t.init&&(r?(0,m.vU)("Signals can not include both init and update expressions."):(r=t.init,n.initonly=!0)),r&&(r=MF(r,e),n.update=r.$expr,n.params=r.$params),t.on&&t.on.forEach((t=>function(t,e,n){const r=t.encode,i={target:n};let a=t.events,o=t.update,u=[];a||(0,m.vU)("Signal update missing events specification."),(0,m.HD)(a)&&(a=(0,ES.n)(a,e.isSubscope()?oB:uB)),a=(0,m.IX)(a).filter((t=>t.signal||t.scale?(u.push(t),0):1)),u.length>1&&(u=[xB(u)]),a.length&&u.push(a.length>1?{merge:a}:a[0]),null!=r&&(o&&(0,m.vU)("Signal encode and update are mutually exclusive."),o="encode(item(),"+(0,m.m8)(r)+")"),i.update=(0,m.HD)(o)?MF(o,e):null!=o.expr?MF(o.expr,e):null!=o.value?o.value:null!=o.signal?{$expr:vB,$params:{$value:e.signalRef(o.signal)}}:(0,m.vU)("Invalid signal update specification."),t.force&&(i.options={force:!0}),u.forEach((t=>e.addUpdate((0,m.l7)(function(t,e){return{source:t.signal?e.signalRef(t.signal):t.scale?e.scaleRef(t.scale):dB(t,e)}}(t,e),i))))}(t,e,n.id)))}(t,e))),(0,m.IX)(t.axes).forEach((t=>ZN(t,e))),(0,m.IX)(t.marks).forEach((t=>AN(t,e))),(0,m.IX)(t.legends).forEach((t=>function(t,e){const n=e.config.legend,r=t.encode||{},i=OT(t,n),a=r.legend||{},o=a.name||void 0,u=a.interactive,s=a.style,l={};let c,f,h,d=0;ET.forEach((e=>t[e]?(l[e]=t[e],d=d||t[e]):0)),d||(0,m.vU)("Missing valid scale for legend.");const p=function(t,e){let n=t.type||wT;return t.type||1!==function(t){return ET.reduce(((e,n)=>e+(t[n]?1:0)),0)}(t)||!t.fill&&!t.stroke||(n=gh(e)?kT:vh(e)?MT:wT),n!==kT?n:vh(e)?MT:kT}(t,e.scaleType(d)),g={title:null!=t.title,scales:l,type:p,vgrad:"symbol"!==p&&i.isVertical()},y=eB(e.add(MB(null,[g]))),v=eB(e.add(TB(f={type:p,scale:e.scaleRef(d),count:e.objectProperty(i("tickCount")),limit:e.property(i("symbolLimit")),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)})));return p===kT?(h=[jT(t,d,n,r.gradient),$T(t,n,r.labels,v)],f.count=f.count||e.signalRef("max(2,2*floor((".concat(fB(i.gradientLength()),")/100))"))):p===MT?h=[IT(t,d,n,r.gradient,v),$T(t,n,r.labels,v)]:(c=function(t,e){const n=OT(t,e);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(t,n),h=[HT(t,n,r,v,fB(c.columns))],f.size=function(t,e,n){const r=fB(DN("size",t,n)),i=fB(DN("strokeWidth",t,n)),a=fB(function(t,e,n){return RT("fontSize",t)||function(t,e,n){const r=e.config.style["guide-label"];return r&&r.fontSize}(0,e)}(n[1].encode,e));return MF("max(ceil(sqrt(".concat(r,")+").concat(i,"),").concat(a,")"),e)}(t,e,h[0].marks)),h=[zT({role:"legend-entry",from:y,encode:{enter:{x:{value:0},y:{value:0}}},marks:h,layout:c,interactive:u})],g.title&&h.push(function(t,e,n,r){const i=OT(t,e),a={enter:{opacity:CT},update:{opacity:FT,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:CT}};return TS(a,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:tN},angle:{signal:eN},align:{signal:QT},baseline:{signal:nN},text:t.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),PT({type:NT,role:"legend-title",style:bT,from:r,encode:a},n)}(t,n,r.title,y)),AN(zT({role:"legend",from:y,encode:NS(EN(i,t,n),a,DT),marks:h,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:o,interactive:u,style:s}),e)}(t,e))),t.title&&function(t,e){const n=OT(t=(0,m.HD)(t)?{text:t}:t,e.config.title),r=t.encode||{},i=r.group||{},a=i.name||void 0,o=i.interactive,u=i.style,s=[],l=eB(e.add(MB(null,[{}])));s.push(function(t,e,n,r){const i={value:0},a={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return TS(a,{text:t.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("color"),font:e("font"),fontSize:e("fontSize"),fontStyle:e("fontStyle"),fontWeight:e("fontWeight"),lineHeight:e("lineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")}),PT({type:NT,role:"title-text",style:"group-title",from:r,encode:a},n)}(t,n,function(t){const e=t.encode;return e&&e.title||(0,m.l7)({name:t.name,interactive:t.interactive,style:t.style},e)}(t),l)),t.subtitle&&s.push(function(t,e,n,r){const i={value:0},a={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return TS(a,{text:t.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("subtitleColor"),font:e("subtitleFont"),fontSize:e("subtitleFontSize"),fontStyle:e("subtitleFontStyle"),fontWeight:e("subtitleFontWeight"),lineHeight:e("subtitleLineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")}),PT({type:NT,role:"title-subtitle",style:"group-subtitle",from:r,encode:a},n)}(t,n,r.subtitle,l)),AN(zT({role:"title",from:l,encode:FN(n,i),marks:s,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:a,interactive:o,style:u}),e)}(t.title,e),e.parseLambdas(),e}function ez(t,e){return e&&e.signal?{name:t,update:e.signal}:{name:t,value:e}}function nz(t,e){this.config=t||{},this.options=e||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function rz(t){this.config=t.config,this.options=t.options,this.legends=t.legends,this.field=Object.create(t.field),this.signals=Object.create(t.signals),this.lambdas=Object.create(t.lambdas),this.scales=Object.create(t.scales),this.events=Object.create(t.events),this.data=Object.create(t.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++t._nextsub[0],this._nextsub=t._nextsub,this._parent=t._parent.slice(),this._encode=t._encode.slice(),this._lookup=t._lookup.slice(),this._markpath=t._markpath}function iz(t){return((0,m.kJ)(t)?az:oz)(t)}function az(t){const e=t.length;let n="[";for(let r=0;r0?",":"")+((0,m.Kn)(e)?e.signal||iz(e):(0,m.m8)(e))}return n+"]"}function oz(t){let e,n,r="{",i=0;for(e in t)n=t[e],r+=(++i>1?",":"")+(0,m.m8)(e)+":"+((0,m.Kn)(n)?n.signal||iz(n):(0,m.m8)(n));return r+"}"}function uz(t,e,n){return(0,m.Kn)(t)||(0,m.vU)("Input Vega specification must be an object."),function(t,e){const n=e.config,r=eB(e.root=e.add(tB())),i=function(t,e){const n=n=>cB(t[n],e[n]),r=[ez("background",n("background")),ez("autosize",DS(n("autosize"))),ez("padding",FS(n("padding"))),ez("width",n("width")||0),ez("height",n("height")||0)],i=r.reduce(((t,e)=>(t[e.name]=e,t)),{}),a={};return(0,m.IX)(t.signals).forEach((t=>{(0,m.nr)(i,t.name)?t=(0,m.l7)(i[t.name],t):r.push(t),a[t.name]=t})),(0,m.IX)(e.signals).forEach((t=>{(0,m.nr)(a,t.name)||(0,m.nr)(i,t.name)||r.push(t)})),r}(t,n);i.forEach((t=>KS(t,e))),e.description=t.description||n.description,e.eventConfig=n.events,e.legends=e.objectProperty(n.legend&&n.legend.layout),e.locale=n.locale;const a=e.add(MB()),o=e.add(DB(HS((t=>NS({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t))(t.encode),ST,RS,t.style,e,{pulse:eB(a)}))),u=e.add(YB({layout:e.objectProperty(t.layout),legends:e.legends,autosize:e.signalRef("autosize"),mark:r,pulse:eB(o)}));e.operators.pop(),e.pushState(eB(o),eB(u),null),tz(t,e,i),e.operators.push(u);let s=e.add(kB({mark:r,pulse:eB(u)}));return s=e.add(WB({pulse:eB(s)})),s=e.add($B({pulse:eB(s)})),e.addData("root",new _N(e,a,a,s)),e}(t,new nz(e=(0,m.fE)(function(){const t="sans-serif",e="#4c78a8",n="#000",r="#888",i="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:e},area:{fill:e},image:null,line:{stroke:e,strokeWidth:2},path:{stroke:e},rect:{fill:e},rule:{stroke:n},shape:{stroke:e},symbol:{fill:e,size:64},text:{fill:n,font:t,fontSize:11},trail:{fill:e,size:2},style:{"guide-label":{fill:n,font:t,fontSize:10},"guide-title":{fill:n,font:t,fontSize:11,fontWeight:"bold"},"group-title":{fill:n,font:t,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:n,font:t,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:i}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:i,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:i,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),e,t.config),n)).toRuntime()}nz.prototype=rz.prototype={parse(t){return tz(t,this)},fork(){return new rz(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(t){return this.operators.push(t),t.id=this.id(),t.refs&&(t.refs.forEach((e=>{e.$ref=t.id})),t.refs=null),t},proxy(t){const e=t instanceof ZS?eB(t):t;return this.add(jB({value:e}))},addStream(t){return this.streams.push(t),t.id=this.id(),t},addUpdate(t){return this.updates.push(t),t},finish(){let t,e;for(t in this.root&&(this.root.root=!0),this.signals)this.signals[t].signal=t;for(t in this.scales)this.scales[t].scale=t;function n(t,e,n){let r,i;t&&(r=t.data||(t.data={}),i=r[e]||(r[e]=[]),i.push(n))}for(t in this.data){e=this.data[t],n(e.input,t,"input"),n(e.output,t,"output"),n(e.values,t,"values");for(const r in e.index)n(e.index[r],t,"index:"+r)}return this},pushState(t,e,n){this._encode.push(eB(this.add($B({pulse:t})))),this._parent.push(e),this._lookup.push(n?eB(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return(0,m.fj)(this._parent)},encode(){return(0,m.fj)(this._encode)},lookup(){return(0,m.fj)(this._lookup)},markpath(){const t=this._markpath;return++t[t.length-1]},fieldRef(t,e){if((0,m.HD)(t))return nB(t,e);t.signal||(0,m.vU)("Unsupported field reference: "+(0,m.m8)(t));const n=t.signal;let r=this.field[n];if(!r){const t={name:this.signalRef(n)};e&&(t.as=e),this.field[n]=r=eB(this.add(SB(t)))}return r},compareRef(t){let e=!1;const n=t=>sB(t)?(e=!0,this.signalRef(t.signal)):function(t){return t&&t.expr}(t)?(e=!0,this.exprRef(t.expr)):t,r=(0,m.IX)(t.field).map(n),i=(0,m.IX)(t.order).map(n);return e?eB(this.add(AB({fields:r,orders:i}))):iB(r,i)},keyRef(t,e){let n=!1;const r=this.signals;return t=(0,m.IX)(t).map((t=>sB(t)?(n=!0,eB(r[t.signal])):t)),n?eB(this.add(BB({fields:t,flat:e}))):function(t,e){const n={$key:t};return e&&(n.$flat=!0),n}(t,e)},sortRef(t){if(!t)return t;const e=aB(t.op,t.field),n=t.order||"ascending";return n.signal?eB(this.add(AB({fields:e,orders:this.signalRef(n.signal)}))):iB(e,n)},event(t,e){const n=t+":"+e;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:t,type:e}),this.events[n]=r}return this.events[n]},hasOwnSignal(t){return(0,m.nr)(this.signals,t)},addSignal(t,e){this.hasOwnSignal(t)&&(0,m.vU)("Duplicate signal name: "+(0,m.m8)(t));const n=e instanceof ZS?e:this.add(tB(e));return this.signals[t]=n},getSignal(t){return this.signals[t]||(0,m.vU)("Unrecognized signal name: "+(0,m.m8)(t)),this.signals[t]},signalRef(t){return this.signals[t]?eB(this.signals[t]):((0,m.nr)(this.lambdas,t)||(this.lambdas[t]=this.add(tB(null))),eB(this.lambdas[t]))},parseLambdas(){const t=Object.keys(this.lambdas);for(let e=0,n=t.length;e0&&t-1 in e)}E.fn=E.prototype={jquery:C,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{H.apply(j=O.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(e){H={apply:j.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,h,y,m=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||d,g)){if(11!==w&&(f=Z.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return H.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return H.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!v||!v.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(y=e,m=t,1===w&&(U.test(e)||z.test(e))){for((m=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=b)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+xe(h[s]);y=h.join(",")}try{return H.apply(r,m.querySelectorAll(y)),r}catch(t){A(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace($,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[b]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return h.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(d.getElementsByClassName),n.getById=ce((function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=K.test(d.querySelectorAll))&&(ce((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+R+")"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=K.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",F)})),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=K.test(h.compareDocumentPosition),x=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==w&&x(w,e)?-1:t==d||t.ownerDocument==w&&x(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!A[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&p(e),x(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(N),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+M+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace($,"$1"));return r[b]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve((function(){return[0]})),last:ve((function(e,t){return[t-1]})),eq:ve((function(e,t,n){return[n<0?n+t:n]})),even:ve((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:ve((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=f))}}else y=Te(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)}))}function Ee(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=be((function(e){return e===t}),s,!0),f=be((function(e){return P(t,e)>-1}),s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&we(p),u>1&&xe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace($,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,v,y=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,S=C.length;for(c&&(l=a==d||a||c);m!==S&&null!=(f=C[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!g);v=e[h++];)if(v(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!v&&f)&&y--,o&&x.push(f))}if(y+=m,n&&m!==y){for(h=0;v=t[h++];)v(x,b,a,s);if(o){if(y>0)for(;m--;)x[m]||b[m]||(b[m]=q.call(u));b=Te(b)}H.apply(u,b),c&&!o&&b.length>0&&y+t.length>1&&se.uniqueSort(u)}return c&&(T=E,l=w),x};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=G.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&xe(u)))return H.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=b.split("").sort(N).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(R,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);E.find=k,E.expr=k.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=k.uniqueSort,E.text=k.getText,E.isXMLDoc=k.isXML,E.contains=k.contains,E.escapeSelector=k.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},N=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=E.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return y(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return c.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&D.test(e)?E(e):e||[],!1).length}});var H,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:x,!0)),q.test(r[1])&&E.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=x.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,H=E(x);var P=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function M(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(E(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return M(e,"nextSibling")},prev:function(e){return M(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(j(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(R[e]||E.uniqueSort(i),P.test(e)&&i.reverse()),this.pushStack(i)}}));var I=/[^\x20\t\r\n\f]+/g;function W(e){return e}function F(e){throw e}function B(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(I)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e=o&&(n!==F&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(E.Deferred.getStackHook&&(c.stackTrace=E.Deferred.getStackHook()),r.setTimeout(c))}}return E.Deferred((function(r){t[0][3].add(a(0,r,y(i)?i:W,r.notifyWith)),t[1][3].add(a(0,r,y(e)?e:W)),t[2][3].add(a(0,r,y(n)?n:F))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},o={};return E.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=E.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(B(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&$.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){r.setTimeout((function(){throw e}))};var _=E.Deferred();function z(){x.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),E.ready()}E.fn.ready=function(e){return _.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||_.resolveWith(x,[E]))}}),E.ready.then=_.then,"complete"===x.readyState||"loading"!==x.readyState&&!x.documentElement.doScroll?r.setTimeout(E.ready):(x.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var U=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)U(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){E.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:E.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,me=/^$|^module$|\/(?:java|ecma)script/i;he=x.createDocumentFragment().appendChild(x.createElement("div")),(ge=x.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),he.appendChild(ge),v.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",v.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",v.option=!!he.lastChild;var xe={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?E.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n",""]);var Te=/<|&#?\w+;/;function Ce(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d-1)i&&i.push(o);else if(l=se(o),a=be(f.appendChild(o),"script"),l&&we(a),n)for(c=0;o=a[c++];)me.test(o.type||"")&&n.push(o);return f}var Ee=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function ke(){return!1}function Ae(e,t){return e===function(){try{return x.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ne(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function De(e,t,n){n?(K.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=K.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),K.set(this,t,o),r=n(this,t),this[t](),o!==(i=K.get(this,t))||r?K.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(K.set(this,t,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&E.event.add(e,t,Se)}E.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.get(e);if(Q(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(ae,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.hasData(e)&&K.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(K.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function He(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(i in K.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!v.checkClone&&qe.test(h))return e.each((function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),Ie(o,t,n,r)}));if(p&&(o=(i=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(be(i,"script"),Oe)).length;f0&&we(a,!u&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),E.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return U(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ie(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return Ie(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!je.test(e)&&!xe[(ye.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function nt(e,t,n){var r=Be(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&j(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function rt(e,t,n,r,i){return new rt.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=Y(t),u=Je.test(t),l=e.style;if(u||(t=Ye(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=Y(t);return Je.test(t)||(t=Ye(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in Ze&&(i=Ze[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!Qe.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):$e(e,Ke,(function(){return nt(e,t,r)}))},set:function(e,n,r){var i,o=Be(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(e,"boxSizing",!1,o),u=r?tt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),et(0,n,u)}}})),E.cssHooks.marginLeft=Ue(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=et)})),E.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Be(e),i=t.length;a1)}}),E.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=rt.prototype.init,E.fx.step={};var it,ot,at=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ut(){ot&&(!1===x.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ut):r.setTimeout(ut,E.fx.interval),E.fx.tick())}function lt(){return r.setTimeout((function(){it=void 0})),it=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ft(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||E.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function yt(e){return(e.match(I)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}E.fn.extend({prop:function(e,t){return U(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each((function(t){E(this).addClass(e.call(this,t,mt(this)))}));if((t=xt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+yt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=yt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each((function(t){E(this).removeClass(e.call(this,t,mt(this)))}));if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+yt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=yt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,mt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=E(this),a=xt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=mt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+yt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:yt(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in r;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,i){var o,a,s,u,l,c,f,p,h=[n||x],g=d.call(e,"type")?e.type:e,v=d.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=n=n||x,3!==n.nodeType&&8!==n.nodeType&&!wt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),f=E.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!m(n)){for(u=f.delegateType||g,wt.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||x)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)p=a,e.type=o>1?u:f.bindType||g,(c=(K.get(a,"events")||Object.create(null))[e.type]&&K.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&Q(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!Q(n)||l&&y(n[g])&&!m(n)&&((s=n[l])&&(n[l]=null),E.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,Tt),n[g](),e.isPropagationStopped()&&p.removeEventListener(g,Tt),E.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),v.focusin||E.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){E.event.simulate(t,e.target,E.event.fix(e))};E.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}}));var Ct=r.location,Et={guid:Date.now()},St=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var kt=/\[\]$/,At=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||kt.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)jt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Dt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(At,"\r\n")}})):{name:t.name,value:n.replace(At,"\r\n")}})).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Rt=/^\/\//,Mt={},It={},Wt="*/".concat("*"),Ft=x.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(I)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function $t(e,t,n,r){var i={},o=e===It;function a(s){var u;return i[s]=!0,E.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function _t(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Ft.href=Ct.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_t(_t(e,E.ajaxSettings),t):_t(E.ajaxSettings,e)},ajaxPrefilter:Bt(Mt),ajaxTransport:Bt(It),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,u,l,c,f,p,d=E.ajaxSetup({},t),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?E(h):E.event,v=E.Deferred(),y=E.Callbacks("once memory"),m=d.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ot.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)m[t]=[m[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),S(0,t),this}};if(v.promise(C),d.url=((e||d.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(I)||[""],null==d.crossDomain){u=x.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Ft.protocol+"//"+Ft.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=E.param(d.data,d.traditional)),$t(Mt,d,t,C),l)return C;for(f in(c=E.event&&d.global)&&0==E.active++&&E.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Pt.test(d.type),i=d.url.replace(Lt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(qt,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(St.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ht,"$1"),p=(St.test(i)?"&":"?")+"_="+Et.guid+++p),d.url=i+p),d.ifModified&&(E.lastModified[i]&&C.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&C.setRequestHeader("If-None-Match",E.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wt+"; q=0.01":""):d.accepts["*"]),d.headers)C.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,C,d)||l))return C.abort();if(T="abort",y.add(d.complete),C.done(d.success),C.fail(d.error),n=$t(It,d,t,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,d]),l)return C;d.async&&d.timeout>0&&(s=r.setTimeout((function(){C.abort("timeout")}),d.timeout));try{l=!1,n.send(b,S)}catch(e){if(l)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,a,u){var f,p,x,b,w,T=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",C.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,C,a)),!f&&E.inArray("script",d.dataTypes)>-1&&E.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,b,C,f),f?(d.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=w),(w=C.getResponseHeader("etag"))&&(E.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,f=!(x=b.error))):(x=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",f?v.resolveWith(h,[p,T,C]):v.rejectWith(h,[C,T,x]),C.statusCode(m),m=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[C,d,f?p:x]),y.fireWith(h,[C,T]),c&&(g.trigger("ajaxComplete",[C,d]),--E.active||E.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ut=E.ajaxSettings.xhr();v.cors=!!Ut&&"withCredentials"in Ut,v.ajax=Ut=!!Ut,E.ajaxTransport((function(e){var t,n;if(v.cors||Ut&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E("