From 72a6f82ff5531459404d15d6c52b0a262a53aa95 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 30 Mar 2021 13:24:14 -0400 Subject: [PATCH 01/59] New config system WIP --- ravenpy/cli/aggregate_forcings_to_hrus.py | 4 +- ravenpy/cli/generate_grid_weights.py | 4 +- ravenpy/config/__init__.py | 0 ravenpy/{models => config}/commands.py | 2 +- ravenpy/{models => config}/importers.py | 108 +++++++++++++- ravenpy/config/rvs.py | 163 ++++++++++++++++++++++ ravenpy/models/base.py | 53 +++---- ravenpy/models/emulators.py | 23 +-- ravenpy/models/global/global.rvt | 6 +- ravenpy/models/rv.py | 11 +- tests/test_ECCC_forecast.py | 2 +- tests/test_cli.py | 2 +- tests/test_data_assimilation.py | 2 +- tests/test_emulators.py | 87 ++++++------ tests/test_rv.py | 6 +- 15 files changed, 356 insertions(+), 117 deletions(-) create mode 100644 ravenpy/config/__init__.py rename ravenpy/{models => config}/commands.py (99%) rename ravenpy/{models => config}/importers.py (88%) create mode 100644 ravenpy/config/rvs.py diff --git a/ravenpy/cli/aggregate_forcings_to_hrus.py b/ravenpy/cli/aggregate_forcings_to_hrus.py index 43a8a39e..f1fff031 100644 --- a/ravenpy/cli/aggregate_forcings_to_hrus.py +++ b/ravenpy/cli/aggregate_forcings_to_hrus.py @@ -2,8 +2,8 @@ import click -from ravenpy.models.commands import GridWeightsCommand -from ravenpy.models.importers import grid_weight_importer_params +from ravenpy.config.commands import GridWeightsCommand +from ravenpy.config.importers import grid_weight_importer_params @click.command() diff --git a/ravenpy/cli/generate_grid_weights.py b/ravenpy/cli/generate_grid_weights.py index c6c76770..bfa60489 100644 --- a/ravenpy/cli/generate_grid_weights.py +++ b/ravenpy/cli/generate_grid_weights.py @@ -4,7 +4,7 @@ import click -from ravenpy.models.importers import grid_weight_importer_params +from ravenpy.config.importers import grid_weight_importer_params @click.command() @@ -109,7 +109,7 @@ def generate_grid_weights( is then free to embed or reference, in her own config context). """ # NOTE: This is in order to make sphinx-click happy. Magic. Do not touch. - from ravenpy.models.importers import RoutingProductGridWeightImporter + from ravenpy.config.importers import RoutingProductGridWeightImporter importer = RoutingProductGridWeightImporter( input_file, diff --git a/ravenpy/config/__init__.py b/ravenpy/config/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ravenpy/models/commands.py b/ravenpy/config/commands.py similarity index 99% rename from ravenpy/models/commands.py rename to ravenpy/config/commands.py index 4f5f8bd5..df8da3d7 100644 --- a/ravenpy/models/commands.py +++ b/ravenpy/config/commands.py @@ -316,7 +316,7 @@ def to_rv(self): @dataclass class GaugeCommand(RavenConfig): - data: Tuple[DataCommand] + data: Tuple[DataCommand] = () latitude: float = 0 longitude: float = 0 elevation: float = 0 diff --git a/ravenpy/models/importers.py b/ravenpy/config/importers.py similarity index 88% rename from ravenpy/models/importers.py rename to ravenpy/config/importers.py index 9c60e609..bbffd386 100644 --- a/ravenpy/models/importers.py +++ b/ravenpy/config/importers.py @@ -22,8 +22,7 @@ import netCDF4 as nc4 import numpy as np -from . import rv -from .commands import ( +from ravenpy.config.commands import ( ChannelProfileCommand, DataCommand, GriddedForcingCommand, @@ -34,6 +33,7 @@ StationForcingCommand, SubBasinsCommand, ) +from ravenpy.models import rv grid_weight_importer_params = dict( DIM_NAMES=("lon_dim", "lat_dim"), @@ -823,9 +823,9 @@ def _create_command(self, var, attrs, rvh, rvt=None, nc_index=0): # Add options from rvt rvt_attrs = ["scale", "offset", "time_shift"] - for a in rvt_attrs: - if a in rvt[var]: - attrs[a] = rvt[var][a] + # for a in rvt_attrs: + # if a in rvt[var]: + # attrs[a] = rvt[var][a] if len(dims) == 1: if var == "water_volume_transport_in_river_channel": @@ -852,7 +852,7 @@ def _create_command(self, var, attrs, rvh, rvt=None, nc_index=0): # Construct default grid weights applying equally to all HRUs data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] - gw = rvt.grid_weights or GridWeightsCommand( + gw = rvt["grid_weights"] or GridWeightsCommand( number_hrus=len(rvh.hrus), number_grid_cells=number_grid_cells, data=data, @@ -888,3 +888,99 @@ def extract(self, rvh, rvt=None, nc_index=0): out["gauge_elevation"] = getattr(rvh, "elevation", None) return out + + +################################################# + + +def extract_nc_data(fns): + fns = filter(lambda fn: ".nc" in fn.suffix, map(Path, fns)) + var_cmds = {} + out = { + "var_cmds": {}, + "latitude": None, + "longitude": None, + "elevation": None, + "number_grid_cells": None, + } + for fn in fns: + with xr.open_dataset(fn) as ds: + + try: + out["latitude"] = ds.cf["latitude"] + out["longitude"] = ds.cf["longitude"] + out["elevation"] = ds.cf["vertical"] + except KeyError: + pass + + # Check if any alternate variable name is in the file. + for var, alt_names in rv.alternate_nc_names.items(): + for alt_name in alt_names: + if alt_name not in ds.data_vars: + continue + + v = ds[alt_name] + + attrs = dict( + name=var, + file_name_nc=fn, + data_type=rv.forcing_names[var], + var_name_nc=alt_name, + dim_names_nc=v.dims, + units=v.attrs.get("units"), + # number_grid_cells=v.size / len(ds["time"]), + ) + + number_grid_cells = int(v.size / len(ds["time"])) + out["number_grid_cells"] = number_grid_cells + + if len(attrs["dim_names_nc"]) == 1: + if var == "water_volume_transport_in_river_channel": + cmd = ObservationDataCommand(**attrs) + else: + cmd = DataCommand(**attrs) + + elif len(attrs["dim_names_nc"]) == 2: + if var == "water_volume_transport_in_river_channel": + # Search for the gauged SB, not sure what should happen when there are + # more than one (should it be even supported?) + # for sb in rvh.subbasins: + # if sb.gauged: + # attrs["subbasin_id"] = sb.subbasin_id + # break + # else: + # raise Exception( + # "Could not find an outlet subbasin for observation data" + # ) + cmd = ObservationDataCommand(**attrs) + else: + # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights + # multiple times as we do here + # Construct default grid weights applying equally to all HRUs + # data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] + # gw = rvt["grid_weights"] or GridWeightsCommand( + # number_hrus=len(rvh.hrus), + # number_grid_cells=numb1er_grid_cells, + # data=data, + # ) + cmd = StationForcingCommand(**attrs) # , grid_weights=gw) + + else: + cmd = GriddedForcingCommand( + **attrs, grid_weights=rvt.grid_weights + ) + + out["var_cmds"][var] = cmd + break + + # if out['latitude'] is None: + # if isinstance(rvh, rv.RVH): + # out["latitude"] = [rvh.hrus[0].latitude] + # out["longitude"] = [rvh.hrus[0].longitude] + # out["elevation"] = [rvh.hrus[0].elevation] + # else: + # out["latitude"] = [getattr(rvh, "latitude", None)] + # out["longitude"] = [getattr(rvh, "longitude", None)] + # out["elevation"] = [getattr(rvh, "elevation", None)] + + return out diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py new file mode 100644 index 00000000..d99c97e6 --- /dev/null +++ b/ravenpy/config/rvs.py @@ -0,0 +1,163 @@ +from dataclasses import replace +from pathlib import Path +from textwrap import dedent + +from ravenpy.config.commands import ( + DataCommand, + GaugeCommand, + GridWeightsCommand, + HRUsCommand, + SubBasinGroupCommand, + SubBasinsCommand, +) + + +class RVH: + def __init__(self, hrus, subbasins): + self.hrus = hrus + self.subbasins = subbasins + self.land_subbasins: Tuple[int] = () + self.land_subbasin_property_multiplier = "" + self.lake_subbasins = () + self.lake_subbasin_property_multiplier = "" + self.reservoirs = () + + def update(self, key, value): + a = getattr(self, key, None) + if a: + setattr(self, key, value) + return True + return False + + def to_rv(self): + tmpl = """ + {subbasins_cmd} + + {hrus_cmd} + + {land_subbasin_group_cmd} + + {lake_subbasin_group_cmd} + + {reservoir_cmd_list} + """ + d = { + "subbasins_cmd": SubBasinsCommand(self.subbasins), + "hrus_cmd": HRUsCommand(self.hrus), + "land_subbasin_group_cmd": SubBasinGroupCommand( + "Land", self.land_subbasins + ), + "lake_subbasin_group_cmd": SubBasinGroupCommand( + "Lakes", self.land_subbasins + ), + "reservoir_cmd_list": "\n\n".join(map(str, self.reservoirs)), + } + return dedent(tmpl).format(**d) + + +class RVT: + def __init__(self, rvh): + self._rvh = rvh + self.var_cmds = { + "pr": {}, + "rainfall": {}, + "prsn": {}, + "tasmin": {}, + "tasmax": {}, + "tas": {}, + "evspsbl": {}, + "water_volume_transport_in_river_channel": {}, + } + self.latitude = None + self.longitude = None + self.elevation = None + self.nc_index = 0 + self.grid_weights = None + self.number_grid_cells = 0 + + def hydrate(self, nc_data): + for var, cmd in nc_data["var_cmds"].items(): + if isinstance(self.var_cmds[var], dict): + self.var_cmds[var] = replace(cmd, **self.var_cmds[var]) + else: + self.var_cmds[var] = cmd + if nc_data["latitude"]: + self.latitude = nc_data["latitude"] + else: + self.latitude = [self._rvh.hrus[0].latitude] + if nc_data["longitude"]: + self.longitude = nc_data["longitude"] + else: + self.longitude = [self._rvh.hrus[0].longitude] + if nc_data["elevation"]: + self.elevation = nc_data["elevation"] + else: + self.elevation = [self._rvh.hrus[0].elevation] + self.number_grid_cells = nc_data["number_grid_cells"] + + def update(self, key, value): + if key in self.var_cmds: + self.var_cmds[key].update(value) + return True + if key == "nc_index": + self.nc_index = value + return False + + def to_rv(self): + tpl = Path("/home/christian/rpy/ravenpy/models/global/global.rvt").read_text() + + d = { + "gauge": "", + "forcing_list": "", + "observed_data": "", + } + + use_gauge = any(type(cmd) is DataCommand for cmd in self.var_cmds.values()) + if use_gauge: + data = [] + for var, cmd in self.var_cmds.items(): + if cmd and var != "water_volume_transport_in_river_channel": + data.append(cmd) + d["gauge"] = GaugeCommand( + latitude=self.latitude[self.nc_index], + longitude=self.longitude[self.nc_index], + elevation=self.elevation[self.nc_index], + data=data, + ) + else: + gw = self.grid_weights or GridWeightsCommand( + number_hrus=1, + number_grid_cells=self.number_grid_cells, + data=[(1, self.nc_index, 1.0)], + ) + cmds = [] + for var, cmd in self.var_cmds.items(): + if cmd and var != "water_volume_transport_in_river_channel": + cmd.grid_weights = gw + cmds.append(cmd) + d["forcing_list"] = "\n".join(map(str, cmds)) + + if self.var_cmds.get("water_volume_transport_in_river_channel"): + d["observed_data"] = self.var_cmds[ + "water_volume_transport_in_river_channel" + ] + + return tpl.format(**d) + + +class Config: + def __init__(self, hrus, subbasins): + self.rvh = RVH(hrus, subbasins) + self.rvt = RVT(self.rvh) + + def hydrate(self, rv_type, nc_data): + self.rvt.hydrate(nc_data) + + def update(self, key, value): + for rv_type in ("rvh", "rvt"): + if getattr(self, rv_type).update(key, value): + break + return False + + # def to_rv(self): + # return self.rvt.to_rv() diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index b65ddaaa..6d1e34b3 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -22,25 +22,9 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to import xarray as xr import ravenpy +from ravenpy.config.importers import extract_nc_data -from .commands import ( - DataCommand, - GriddedForcingCommand, - ObservationDataCommand, - StationForcingCommand, -) -from .importers import NcDataImporter -from .rv import ( - RV, - RVI, - RVT, - Ost, - RVFile, - forcing_names, - get_states, - isinstance_namedtuple, - parse_solution, -) +from .rv import RV, RVI, Ost, RVFile, get_states, isinstance_namedtuple, parse_solution RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -62,7 +46,7 @@ class Raven: templates = () # Allowed configuration file extensions - _rvext = ("rvi", "rvp", "rvc", "rvh", "rvt") + _rvext = ("rvi", "rvp", "rvc") # "rvh" , "rvt") _parallel_parameters = [ "params", @@ -102,8 +86,8 @@ def __init__(self, workdir: Union[str, Path] = None): self.rvi = RV() self.rvp = RV() self.rvc = RV() - self.rvt = RVT() - self.rvh = RV() + # self.rvt = RVT() + # self.rvh = RV() self.rvd = RV() # rvd is for derived parameters self.workdir = Path(workdir) @@ -234,6 +218,8 @@ def configure(self, fns): """Read configuration files.""" for fn in fns: rvf = RVFile(fn) + if rvf.ext in ["rvt", "rvh"]: + continue if rvf.ext not in self._rvext + ("txt",): raise ValueError( "rv contains unrecognized configuration file keys : {}.".format( @@ -270,8 +256,8 @@ def assign(self, key, value): setattr(obj, key, value) assigned = True - if not assigned: - raise AttributeError("No configuration key named {}".format(key)) + # if not assigned: + # raise AttributeError("No configuration key named {}".format(key)) def derived_parameters(self): """Subclassed by emulators. Defines model parameters that are a function of other parameters.""" @@ -282,6 +268,12 @@ def _dump_rv(self): params = self.parameters + with open(self.model_path / "raven-gr4j-cemaneige.rvt", "w") as f: + f.write(self.config.rvt.to_rv()) + + with open(self.model_path / "raven-gr4j-cemaneige.rvh", "w") as f: + f.write(self.config.rvh.to_rv()) + for rvf in self.rvfiles.values(): p = self.exec_path if rvf.is_tpl else self.model_path if ( @@ -426,6 +418,8 @@ def run(self, ts, overwrite=False, **kwds): # Update non-parallel parameter objects for key, val in kwds.items(): + self.config.update(key, val) + if key in self._rvext: obj = getattr(self, key) if isinstance(val, dict): @@ -444,7 +438,8 @@ def run(self, ts, overwrite=False, **kwds): self.handle_date_defaults(ts) self.set_calendar(ts) - ncdata = NcDataImporter(ts) + nc_data = extract_nc_data(ts) + self.config.hydrate("rvt", nc_data) # Loop over parallel parameters - sets self.rvi.run_index procs = [] @@ -452,15 +447,7 @@ def run(self, ts, overwrite=False, **kwds): for key, val in pdict.items(): if val[self.psim] is not None: self.assign(key, val[self.psim]) - - # Forcing commands - self.rvt.update( - ncdata.extract( - rvh=self.rvh, - rvt=self.rvt, - nc_index=pdict["nc_index"][self.psim], - ) - ) + self.config.update(key, val[self.psim]) cmd = self.setup_model_run(tuple(map(Path, ts))) diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 48307553..60ae4369 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -4,8 +4,10 @@ import xarray as xr +from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.rvs import Config + from .base import Ostrich, Raven -from .commands import BasinIndexCommand, MonthlyAverageCommand, StationForcingCommand from .rv import HRU, LU, RV, RVC, RVH, RVI, RVP, RVT, HRUState, Ost, Sub __all__ = [ @@ -66,9 +68,9 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.rvp = RVP(params=GR4JCN.params(None, None, None, None, None, None)) - self.rvt = RVT() - self.rvi = RVI(rain_snow_fraction="RAINSNOW_DINGMAN", evaporation="PET_OUDIN") - self.rvh = RVH( + # self.rvt = RVT() + # self.rvh = RVH( + self.config = Config( hrus=(GR4JCN.LandHRU(),), subbasins=( Sub( @@ -80,6 +82,7 @@ def __init__(self, *args, **kwds): ), ), ) + self.rvi = RVI(rain_snow_fraction="RAINSNOW_DINGMAN", evaporation="PET_OUDIN") # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified self.rvc = RVC(soil0=None, soil1=15) @@ -100,7 +103,7 @@ def derived_parameters(self): if not self.rvc.hru_states: # If self.rvc.hru_states is set, it means that we are using `resume()` and we don't # want to interfere - for hru in self.rvh.hrus: + for hru in self.config.rvh.hrus: if isinstance(hru, GR4JCN.LandHRU): self.rvc.hru_states[hru.hru_id] = HRUState( index=hru.hru_id, soil0=soil0, soil1=soil1 @@ -116,22 +119,22 @@ def derived_parameters(self): if not self.rvc.basin_states: # If self.rvc.basin_states is set, it means that we are using `resume()` and we don't # want to interfere - for sb in self.rvh.subbasins: + for sb in self.config.rvh.subbasins: self.rvc.basin_states[sb.subbasin_id] = BasinIndexCommand( index=sb.subbasin_id ) - self.rvh.lake_subbasins = tuple( + self.config.rvh.lake_subbasins = tuple( [ sb.subbasin_id - for sb in self.rvh.subbasins + for sb in self.config.rvh.subbasins if sb_contains_lake[sb.subbasin_id] ] ) - self.rvh.land_subbasins = tuple( + self.config.rvh.land_subbasins = tuple( [ sb.subbasin_id - for sb in self.rvh.subbasins + for sb in self.config.rvh.subbasins if not sb_contains_lake[sb.subbasin_id] ] ) diff --git a/ravenpy/models/global/global.rvt b/ravenpy/models/global/global.rvt index f6a23740..e03c9f6e 100644 --- a/ravenpy/models/global/global.rvt +++ b/ravenpy/models/global/global.rvt @@ -1,7 +1,5 @@ {gauge} -{station_forcing_list} +{forcing_list} -{gridded_forcing_list} - -{observed_data_cmd} +{observed_data} diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index e52806ed..5a211045 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -1,29 +1,24 @@ import collections import datetime as dt from collections import namedtuple -from dataclasses import dataclass, replace +from dataclasses import dataclass from pathlib import Path from textwrap import dedent -from typing import Dict, List, Tuple +from typing import Dict, Tuple import cftime import six -import xarray as xr -from xclim.core.units import units2pint -from .commands import ( +from ravenpy.config.commands import ( BasinIndexCommand, BasinStateVariablesCommand, ChannelProfileCommand, DataCommand, GaugeCommand, GriddedForcingCommand, - GridWeightsCommand, HRUsCommand, HRUStateVariableTableCommand, LandUseClassesCommand, - MonthlyAverageCommand, - ObservationDataCommand, RainCorrection, RavenConfig, ReservoirCommand, diff --git a/tests/test_ECCC_forecast.py b/tests/test_ECCC_forecast.py index a645586b..8683a43e 100644 --- a/tests/test_ECCC_forecast.py +++ b/tests/test_ECCC_forecast.py @@ -44,7 +44,7 @@ def test_forecasting_GEPS(self): # do not clean, the model will simply add the hindcast file to the list of available # data provided in the testdata above. Then the dates will not work, and the model errors. - model = GR4JCN() + model = GR4JCN("/tmp/ravenpy_debug/test_forecasting_GEPS") model.rvc.parse(rvc.read_text()) diff --git a/tests/test_cli.py b/tests/test_cli.py index 43da3f4a..4771714d 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,7 +4,7 @@ from click.testing import CliRunner from ravenpy.cli import aggregate_forcings_to_hrus, generate_grid_weights -from ravenpy.models.commands import GridWeightsCommand +from ravenpy.config.commands import GridWeightsCommand from ravenpy.utilities.testdata import get_local_testdata diff --git a/tests/test_data_assimilation.py b/tests/test_data_assimilation.py index 68eb9df4..2385654d 100644 --- a/tests/test_data_assimilation.py +++ b/tests/test_data_assimilation.py @@ -5,8 +5,8 @@ import numpy as np import xarray as xr +from ravenpy.config.commands import BasinIndexCommand from ravenpy.models import GR4JCN -from ravenpy.models.commands import BasinIndexCommand from ravenpy.models.rv import RVC from ravenpy.utilities.data_assimilation import assimilate, perturbation from ravenpy.utilities.testdata import get_local_testdata diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 100f2402..ea35f945 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -9,6 +9,18 @@ import pytest import xarray as xr +from ravenpy.config.commands import ( + ChannelProfileCommand, + GriddedForcingCommand, + GridWeightsCommand, + HRUStateVariableTableCommand, + LandUseClassesCommand, + ObservationDataCommand, + SBGroupPropertyMultiplierCommand, + SoilClassesCommand, + SoilProfilesCommand, + VegetationClassesCommand, +) from ravenpy.models import ( GR4JCN, GR4JCN_OST, @@ -23,19 +35,6 @@ Sub, get_average_annual_runoff, ) -from ravenpy.models.commands import ( - ChannelProfileCommand, - GriddedForcingCommand, - GridWeightsCommand, - HRUStateVariableTableCommand, - LandUseClassesCommand, - ObservationDataCommand, - SBGroupPropertyMultiplierCommand, - SoilClassesCommand, - SoilProfilesCommand, - StationForcingCommand, - VegetationClassesCommand, -) from ravenpy.utilities.testdata import get_local_testdata from .common import _convert_2d @@ -82,18 +81,18 @@ def test_race(): class TestGR4JCN: def test_simple(self): - model = GR4JCN() + model = GR4JCN("/tmp/ravenpy_debug/new_config_simple") model.rvi.start_date = dt.datetime(2000, 1, 1) model.rvi.end_date = dt.datetime(2002, 1, 1) model.rvi.run_name = "test" - model.rvh.name = "Salmon" - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + # model.rvh.name = "Salmon" + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model.rvp.params = model.params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947) - total_area_in_m2 = model.rvh.hrus[0].area * 1000 * 1000 + total_area_in_m2 = model.config.rvh.hrus[0].area * 1000 * 1000 model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) @@ -102,6 +101,8 @@ def test_simple(self): model(TS) + return + # ------------ # Check quality (diagnostic) of simulated streamflow values # ------------ @@ -157,7 +158,7 @@ def test_simple(self): def test_routing(self): """We need at least 2 subbasins to activate routing.""" - model = GR4JCN() + model = GR4JCN("/tmp/ravenpy_debug/new_config_routing") ts_2d = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily_2d.nc" @@ -187,17 +188,17 @@ def test_routing(self): # station (see :ObservationData in RVT). We will compare these observations # with the simulated streamflow. That is the reason why "gauged=True" for # the second basin. - model.rvh.name = "Salmon" + # model.rvh.name = "Salmon" # HRU IDs are 1 to 3 - model.rvh.hrus = ( + model.config.rvh.hrus = ( GR4JCN.LandHRU(hru_id=1, subbasin_id=10, **salmon_land_hru_1), GR4JCN.LakeHRU(hru_id=2, subbasin_id=10, **salmon_lake_hru_1), GR4JCN.LandHRU(hru_id=3, subbasin_id=20, **salmon_land_hru_2), ) # Sub-basin IDs are 10 and 20 (not 1 and 2), to help disambiguate - model.rvh.subbasins = ( + model.config.rvh.subbasins = ( # gauged = False: # Usually this output would only be written for user's convenience. # There is usually no observation of streamflow available within @@ -222,11 +223,11 @@ def test_routing(self): ), ) - model.rvh.land_subbasin_property_multiplier = SBGroupPropertyMultiplierCommand( - "Land", "MANNINGS_N", 1.0 + model.config.rvh.land_subbasin_property_multiplier = ( + SBGroupPropertyMultiplierCommand("Land", "MANNINGS_N", 1.0) ) - model.rvh.lake_subbasin_property_multiplier = SBGroupPropertyMultiplierCommand( - "Lakes", "RESERVOIR_CREST_WIDTH", 1.0 + model.config.rvh.lake_subbasin_property_multiplier = ( + SBGroupPropertyMultiplierCommand("Lakes", "RESERVOIR_CREST_WIDTH", 1.0) ) ######### @@ -241,7 +242,7 @@ def test_routing(self): data=((1, 0, 1.0), (2, 0, 1.0), (3, 0, 1.0)), ) # These will be shared (inline) to all the StationForcing commands in the RVT - model.rvt.grid_weights = gws + model.config.rvt.grid_weights = gws ######### # R V P # @@ -249,7 +250,7 @@ def test_routing(self): model.rvp.params = model.params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947) - total_area_in_km2 = sum(hru.area for hru in model.rvh.hrus) + total_area_in_km2 = sum(hru.area for hru in model.config.rvh.hrus) total_area_in_m2 = total_area_in_km2 * 1000 * 1000 model.rvp.avg_annual_runoff = get_average_annual_runoff(ts_2d, total_area_in_m2) @@ -382,9 +383,9 @@ def test_assign(self): assert model.rvp.params.GR4J_X1 == 0.529 def test_run(self): - model = GR4JCN() + model = GR4JCN("/tmp/ravenpy_debug/test_run") - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( TS, @@ -401,7 +402,7 @@ def test_run(self): def test_overwrite(self): model = GR4JCN() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( TS, @@ -446,7 +447,7 @@ def test_overwrite(self): def test_resume(self): model_ab = GR4JCN() - model_ab.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model_ab.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) kwargs = dict( params=(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), ) @@ -461,7 +462,7 @@ def test_resume(self): model_a = GR4JCN() - model_a.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model_a.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model_a( TS, run_name="run_a", @@ -491,7 +492,7 @@ def test_resume(self): # Resume with final state from saved solution file model_b = GR4JCN() - model_b.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model_b.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model_b.resume( rvc ) # <--------- And this is how you feed it to a brand new model. @@ -519,7 +520,7 @@ def test_resume_earlier(self): params = (0.529, -3.396, 407.29, 1.072, 16.9, 0.947) # Reference run model = GR4JCN() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( TS, run_name="run_a", @@ -556,7 +557,7 @@ def test_update_soil_water(self): params = (0.529, -3.396, 407.29, 1.072, 16.9, 0.947) # Reference run model = GR4JCN() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( TS, run_name="run_a", @@ -591,7 +592,7 @@ def test_version(self): def test_parallel_params(self): model = GR4JCN() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( TS, @@ -607,12 +608,12 @@ def test_parallel_params(self): assert len(model.diagnostics) == 2 assert model.hydrograph.dims["params"] == 2 z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 10 + assert len(z.filelist) == 6 def test_parallel_basins(self, input2d): ts = input2d - model = GR4JCN() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model = GR4JCN("/tmp/ravenpy_debug/test_parallel_basins") + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( ts, @@ -630,13 +631,13 @@ def test_parallel_basins(self, input2d): model.hydrograph.basin_name[:], ["sub_001", "sub_001"] ) z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 10 + assert len(z.filelist) == 6 class TestGR4JCN_OST: def test_simple(self): model = GR4JCN_OST() - model.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) params = (0.529, -3.396, 407.29, 1.072, 16.9, 0.053) low = (0.01, -15.0, 10.0, 0.0, 1.0, 0.0) high = (2.5, 10.0, 700.0, 7.0, 30.0, 1.0) @@ -688,7 +689,7 @@ def test_simple(self): # np.testing.assert_almost_equal( opt_func, -0.5779910, 4, # err_msg='calibrated NSE is not matching expected value') gr4j = GR4JCN() - gr4j.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + gr4j.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) gr4j( TS, start_date=dt.datetime(1954, 1, 1), @@ -1315,7 +1316,7 @@ def test_simple(self): class TestRouting: - importers = pytest.importorskip("ravenpy.models.importers") + importers = pytest.importorskip("ravenpy.config.importers") def test_lievre_tutorial(self): """ diff --git a/tests/test_rv.py b/tests/test_rv.py index e136d67d..db39d037 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -6,11 +6,7 @@ import pytest import ravenpy -from ravenpy.models.commands import ( - BaseValueCommand, - GriddedForcingCommand, - RainCorrection, -) +from ravenpy.config.commands import GriddedForcingCommand, RainCorrection from ravenpy.models.rv import RV, RVC, RVH, RVI, RVP, Ost, RVFile, isinstance_namedtuple from ravenpy.utilities.testdata import get_local_testdata From 99a75c28b8ec7d922cf005d9e55198fc676b2557 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 2 Apr 2021 17:10:27 -0400 Subject: [PATCH 02/59] WIP --- ravenpy/config/importers.py | 329 +++++++++++++----------------------- ravenpy/config/rvs.py | 293 +++++++++++++++++++++++--------- ravenpy/models/base.py | 32 ++-- ravenpy/models/emulators.py | 10 +- ravenpy/models/rv.py | 293 ++++++++++++++++---------------- tests/test_emulators.py | 38 +++-- 6 files changed, 509 insertions(+), 486 deletions(-) diff --git a/ravenpy/config/importers.py b/ravenpy/config/importers.py index bbffd386..e11b31ca 100644 --- a/ravenpy/config/importers.py +++ b/ravenpy/config/importers.py @@ -2,9 +2,6 @@ from collections import defaultdict from pathlib import Path -import cf_xarray -import xarray as xr - try: import geopandas from osgeo import __version__ as osgeo_version # noqa @@ -773,214 +770,118 @@ def _check_gridcell_in_proximity_of_shape( ) -class NcDataImporter: - def __init__(self, fns): - self.fns = map(Path, fns) - self.attrs = {} - self._extract_nc_attrs(self.fns) - - def _extract_nc_attrs(self, fns): - for fn in fns: - if ".nc" in fn.suffix: - with xr.open_dataset(fn) as ds: - # Check if any alternate variable name is in the file. - for var, alt_names in rv.alternate_nc_names.items(): - for name in alt_names: - if name in ds.data_vars: - v = ds[name] - # Parse common attributes to all data models - attrs = dict( - name=var, - file_name_nc=fn, - data_type=rv.forcing_names[var], - var_name_nc=name, - dim_names_nc=v.dims, - units=v.attrs.get("units"), - number_grid_cells=v.size / len(ds["time"]), - ) - try: - attrs["latitude"] = ds.cf["latitude"] - attrs["longitude"] = ds.cf["longitude"] - attrs["elevation"] = ds.cf["vertical"] - except KeyError: - pass - - if "GRIB_stepType" in v.attrs: - attrs["deaccumulate"] = ( - v.attrs["GRIB_stepType"] == "accum" - ) - - self.attrs[var] = attrs - - def _create_command(self, var, attrs, rvh, rvt=None, nc_index=0): - coords = {"latitude", "longitude", "elevation"} - dims = attrs["dim_names_nc"] - - # Remove extra attributes - number_grid_cells = attrs.pop("number_grid_cells") - for k in coords: - attrs.pop(k, None) - - # Add options from rvt - rvt_attrs = ["scale", "offset", "time_shift"] - # for a in rvt_attrs: - # if a in rvt[var]: - # attrs[a] = rvt[var][a] - - if len(dims) == 1: - if var == "water_volume_transport_in_river_channel": - return ObservationDataCommand(**attrs) - - return DataCommand(**attrs) - - if len(dims) == 2: - if var == "water_volume_transport_in_river_channel": - # Search for the gauged SB, not sure what should happen when there are - # more than one (should it be even supported?) - for sb in rvh.subbasins: - if sb.gauged: - attrs["subbasin_id"] = sb.subbasin_id - break - else: - raise Exception( - "Could not find an outlet subbasin for observation data" - ) - return ObservationDataCommand(**attrs) - - # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights - # multiple times as we do here - # Construct default grid weights applying equally to all HRUs - data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] - - gw = rvt["grid_weights"] or GridWeightsCommand( - number_hrus=len(rvh.hrus), - number_grid_cells=number_grid_cells, - data=data, - ) - - return StationForcingCommand(**attrs, grid_weights=gw) - - return GriddedForcingCommand(**attrs, grid_weights=rvt.grid_weights) - - def extract(self, rvh, rvt=None, nc_index=0): - out = {"var_cmds": {}} - - for var, attrs in self.attrs.items(): - out["var_cmds"][var] = self._create_command( - var, attrs.copy(), rvh, rvt, nc_index - ) - if type(out["var_cmds"][var]) is DataCommand: - # Try extracting the gauge location from the netCDF coordinates. - try: - out["gauge_latitude"] = attrs["latitude"][nc_index] - out["gauge_longitude"] = attrs["longitude"][nc_index] - out["gauge_elevation"] = attrs["elevation"][nc_index] - - # Revert to RHU coordinates - except Exception: - if isinstance(rvh, rv.RVH): - out["gauge_latitude"] = rvh.hrus[0].latitude - out["gauge_longitude"] = rvh.hrus[0].longitude - out["gauge_elevation"] = rvh.hrus[0].elevation - else: - out["gauge_latitude"] = getattr(rvh, "latitude", None) - out["gauge_longitude"] = getattr(rvh, "longitude", None) - out["gauge_elevation"] = getattr(rvh, "elevation", None) - - return out - - -################################################# - - -def extract_nc_data(fns): - fns = filter(lambda fn: ".nc" in fn.suffix, map(Path, fns)) - var_cmds = {} - out = { - "var_cmds": {}, - "latitude": None, - "longitude": None, - "elevation": None, - "number_grid_cells": None, - } - for fn in fns: - with xr.open_dataset(fn) as ds: - - try: - out["latitude"] = ds.cf["latitude"] - out["longitude"] = ds.cf["longitude"] - out["elevation"] = ds.cf["vertical"] - except KeyError: - pass - - # Check if any alternate variable name is in the file. - for var, alt_names in rv.alternate_nc_names.items(): - for alt_name in alt_names: - if alt_name not in ds.data_vars: - continue - - v = ds[alt_name] - - attrs = dict( - name=var, - file_name_nc=fn, - data_type=rv.forcing_names[var], - var_name_nc=alt_name, - dim_names_nc=v.dims, - units=v.attrs.get("units"), - # number_grid_cells=v.size / len(ds["time"]), - ) - - number_grid_cells = int(v.size / len(ds["time"])) - out["number_grid_cells"] = number_grid_cells - - if len(attrs["dim_names_nc"]) == 1: - if var == "water_volume_transport_in_river_channel": - cmd = ObservationDataCommand(**attrs) - else: - cmd = DataCommand(**attrs) - - elif len(attrs["dim_names_nc"]) == 2: - if var == "water_volume_transport_in_river_channel": - # Search for the gauged SB, not sure what should happen when there are - # more than one (should it be even supported?) - # for sb in rvh.subbasins: - # if sb.gauged: - # attrs["subbasin_id"] = sb.subbasin_id - # break - # else: - # raise Exception( - # "Could not find an outlet subbasin for observation data" - # ) - cmd = ObservationDataCommand(**attrs) - else: - # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights - # multiple times as we do here - # Construct default grid weights applying equally to all HRUs - # data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] - # gw = rvt["grid_weights"] or GridWeightsCommand( - # number_hrus=len(rvh.hrus), - # number_grid_cells=numb1er_grid_cells, - # data=data, - # ) - cmd = StationForcingCommand(**attrs) # , grid_weights=gw) - - else: - cmd = GriddedForcingCommand( - **attrs, grid_weights=rvt.grid_weights - ) - - out["var_cmds"][var] = cmd - break - - # if out['latitude'] is None: - # if isinstance(rvh, rv.RVH): - # out["latitude"] = [rvh.hrus[0].latitude] - # out["longitude"] = [rvh.hrus[0].longitude] - # out["elevation"] = [rvh.hrus[0].elevation] - # else: - # out["latitude"] = [getattr(rvh, "latitude", None)] - # out["longitude"] = [getattr(rvh, "longitude", None)] - # out["elevation"] = [getattr(rvh, "elevation", None)] - - return out +# class NcDataImporter: +# def __init__(self, fns): +# self.fns = map(Path, fns) +# self.attrs = {} +# self._extract_nc_attrs(self.fns) + +# def _extract_nc_attrs(self, fns): +# for fn in fns: +# if ".nc" in fn.suffix: +# with xr.open_dataset(fn) as ds: +# # Check if any alternate variable name is in the file. +# for var, alt_names in rv.alternate_nc_names.items(): +# for name in alt_names: +# if name in ds.data_vars: +# v = ds[name] +# # Parse common attributes to all data models +# attrs = dict( +# name=var, +# file_name_nc=fn, +# data_type=rv.forcing_names[var], +# var_name_nc=name, +# dim_names_nc=v.dims, +# units=v.attrs.get("units"), +# number_grid_cells=v.size / len(ds["time"]), +# ) +# try: +# attrs["latitude"] = ds.cf["latitude"] +# attrs["longitude"] = ds.cf["longitude"] +# attrs["elevation"] = ds.cf["vertical"] +# except KeyError: +# pass + +# if "GRIB_stepType" in v.attrs: +# attrs["deaccumulate"] = ( +# v.attrs["GRIB_stepType"] == "accum" +# ) + +# self.attrs[var] = attrs + +# def _create_command(self, var, attrs, rvh, rvt=None, nc_index=0): +# coords = {"latitude", "longitude", "elevation"} +# dims = attrs["dim_names_nc"] + +# # Remove extra attributes +# number_grid_cells = attrs.pop("number_grid_cells") +# for k in coords: +# attrs.pop(k, None) + +# # Add options from rvt +# rvt_attrs = ["scale", "offset", "time_shift"] +# # for a in rvt_attrs: +# # if a in rvt[var]: +# # attrs[a] = rvt[var][a] + +# if len(dims) == 1: +# if var == "water_volume_transport_in_river_channel": +# return ObservationDataCommand(**attrs) + +# return DataCommand(**attrs) + +# if len(dims) == 2: +# if var == "water_volume_transport_in_river_channel": +# # Search for the gauged SB, not sure what should happen when there are +# # more than one (should it be even supported?) +# for sb in rvh.subbasins: +# if sb.gauged: +# attrs["subbasin_id"] = sb.subbasin_id +# break +# else: +# raise Exception( +# "Could not find an outlet subbasin for observation data" +# ) +# return ObservationDataCommand(**attrs) + +# # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights +# # multiple times as we do here +# # Construct default grid weights applying equally to all HRUs +# data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] + +# gw = rvt["grid_weights"] or GridWeightsCommand( +# number_hrus=len(rvh.hrus), +# number_grid_cells=number_grid_cells, +# data=data, +# ) + +# return StationForcingCommand(**attrs, grid_weights=gw) + +# return GriddedForcingCommand(**attrs, grid_weights=rvt.grid_weights) + +# def extract(self, rvh, rvt=None, nc_index=0): +# out = {"var_cmds": {}} + +# for var, attrs in self.attrs.items(): +# out["var_cmds"][var] = self._create_command( +# var, attrs.copy(), rvh, rvt, nc_index +# ) +# if type(out["var_cmds"][var]) is DataCommand: +# # Try extracting the gauge location from the netCDF coordinates. +# try: +# out["gauge_latitude"] = attrs["latitude"][nc_index] +# out["gauge_longitude"] = attrs["longitude"][nc_index] +# out["gauge_elevation"] = attrs["elevation"][nc_index] + +# # Revert to RHU coordinates +# except Exception: +# if isinstance(rvh, rv.RVH): +# out["gauge_latitude"] = rvh.hrus[0].latitude +# out["gauge_longitude"] = rvh.hrus[0].longitude +# out["gauge_elevation"] = rvh.hrus[0].elevation +# else: +# out["gauge_latitude"] = getattr(rvh, "latitude", None) +# out["gauge_longitude"] = getattr(rvh, "longitude", None) +# out["gauge_elevation"] = getattr(rvh, "elevation", None) + +# return out diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index d99c97e6..78bd5603 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -2,63 +2,124 @@ from pathlib import Path from textwrap import dedent +import cf_xarray +import xarray as xr + from ravenpy.config.commands import ( DataCommand, GaugeCommand, + GriddedForcingCommand, GridWeightsCommand, HRUsCommand, + ObservationDataCommand, + StationForcingCommand, SubBasinGroupCommand, SubBasinsCommand, ) +######### +# R V H # +######### + class RVH: - def __init__(self, hrus, subbasins): - self.hrus = hrus - self.subbasins = subbasins - self.land_subbasins: Tuple[int] = () - self.land_subbasin_property_multiplier = "" - self.lake_subbasins = () - self.lake_subbasin_property_multiplier = "" + + tmpl = """ + {subbasins} + + {hrus} + + {land_subbasin_group} + + {land_subbasin_property_multiplier} + + {lake_subbasin_group} + + {lake_subbasin_property_multiplier} + + {reservoirs} + """ + + def __init__(self, tmpl=None): + self.hrus = () + self.subbasins = () + self.land_subbasin_ids = () + self.land_subbasin_property_multiplier = None + self.lake_subbasin_ids = () + self.lake_subbasin_property_multiplier = None self.reservoirs = () + self.tmpl = tmpl or RVH.tmpl def update(self, key, value): - a = getattr(self, key, None) - if a: + if hasattr(self, key): setattr(self, key, value) return True return False def to_rv(self): - tmpl = """ - {subbasins_cmd} + d = { + "subbasins": SubBasinsCommand(self.subbasins), + "hrus": HRUsCommand(self.hrus), + "land_subbasin_group": SubBasinGroupCommand("Land", self.land_subbasin_ids), + "land_subbasin_property_multiplier": self.land_subbasin_property_multiplier + or "", + "lake_subbasin_group": SubBasinGroupCommand( + "Lakes", self.lake_subbasin_ids + ), + "lake_subbasin_property_multiplier": self.lake_subbasin_property_multiplier + or "", + "reservoirs": "\n\n".join(map(str, self.reservoirs)), + } + return dedent(self.tmpl).format(**d) - {hrus_cmd} - {land_subbasin_group_cmd} +######### +# R V T # +######### + + +class RVT: - {lake_subbasin_group_cmd} + tmpl = """ + {gauge} - {reservoir_cmd_list} + {forcing_list} + + {observed_data} """ - d = { - "subbasins_cmd": SubBasinsCommand(self.subbasins), - "hrus_cmd": HRUsCommand(self.hrus), - "land_subbasin_group_cmd": SubBasinGroupCommand( - "Land", self.land_subbasins - ), - "lake_subbasin_group_cmd": SubBasinGroupCommand( - "Lakes", self.land_subbasins - ), - "reservoir_cmd_list": "\n\n".join(map(str, self.reservoirs)), - } - return dedent(tmpl).format(**d) + # Map CF-Convention standard name to Raven Forcing name + forcing_names = { + "tasmin": "TEMP_MIN", + "tasmax": "TEMP_MAX", + "tas": "TEMP_AVE", + "rainfall": "RAINFALL", + "pr": "PRECIP", + "prsn": "SNOWFALL", + "evspsbl": "PET", + "water_volume_transport_in_river_channel": "HYDROGRAPH", + } + + alternate_nc_names = { + "tasmin": ["tasmin", "tmin"], + "tasmax": ["tasmax", "tmax"], + "tas": ["tas", "t2m"], + "rainfall": ["rainfall", "rain"], + "pr": ["pr", "precip", "prec", "precipitation", "tp"], + "prsn": ["prsn", "snow", "snowfall", "solid_precip"], + "evspsbl": ["pet", "evap", "evapotranspiration"], + "water_volume_transport_in_river_channel": [ + "qobs", + "discharge", + "streamflow", + "dis", + ], + } + + def __init__(self, rvh, tmpl=None): -class RVT: - def __init__(self, rvh): self._rvh = rvh - self.var_cmds = { + self._var_cmds = { "pr": {}, "rainfall": {}, "prsn": {}, @@ -68,43 +129,82 @@ def __init__(self, rvh): "evspsbl": {}, "water_volume_transport_in_river_channel": {}, } - self.latitude = None - self.longitude = None - self.elevation = None + self.nc_index = 0 self.grid_weights = None - self.number_grid_cells = 0 - def hydrate(self, nc_data): - for var, cmd in nc_data["var_cmds"].items(): - if isinstance(self.var_cmds[var], dict): - self.var_cmds[var] = replace(cmd, **self.var_cmds[var]) + self._nc_latitude = [] + self._nc_longitude = [] + self._nc_elevation = [] + self._number_grid_cells = 0 + + self.tmpl = tmpl or RVT.tmpl + + def add_nc_variable(self, **kwargs): + var_name = kwargs.get("name", kwargs["var_name_nc"]) + is_obs_var = kwargs.pop("is_observation", False) + if len(kwargs["dim_names_nc"]) == 1: + if var_name == "water_volume_transport_in_river_channel" or is_obs_var: + cmd = ObservationDataCommand(**kwargs) else: - self.var_cmds[var] = cmd - if nc_data["latitude"]: - self.latitude = nc_data["latitude"] - else: - self.latitude = [self._rvh.hrus[0].latitude] - if nc_data["longitude"]: - self.longitude = nc_data["longitude"] + cmd = DataCommand(**kwargs) + elif len(kwargs["dim_names_nc"]) == 2: + if var_name == "water_volume_transport_in_river_channel" or is_obs_var: + cmd = ObservationDataCommand(**kwargs) + else: + cmd = StationForcingCommand(**kwargs) else: - self.longitude = [self._rvh.hrus[0].longitude] - if nc_data["elevation"]: - self.elevation = nc_data["elevation"] + cmd = GriddedForcingCommand(**kwargs) + + if isinstance(self._var_cmds.get(var_name, None), dict): + self._var_cmds[var_name] = replace(cmd, **self._var_cmds[var_name]) else: - self.elevation = [self._rvh.hrus[0].elevation] - self.number_grid_cells = nc_data["number_grid_cells"] + self._var_cmds[var_name] = cmd + + def configure_from_nc_data(self, fns): + + for fn in fns: + with xr.open_dataset(fn) as ds: + try: + self.nc_latitude = ds.cf["latitude"] + self.nc_longitude = ds.cf["longitude"] + self.nc_elevation = ds.cf["vertical"] + except KeyError: + # Will try to compute values later from first HRU (in self.to_rv) + pass + + # Check if any alternate variable name is in the file. + for var_name, alt_names in RVT.alternate_nc_names.items(): + for alt_name in alt_names: + if alt_name not in ds.data_vars: + continue + nc_var = ds[alt_name] + self.add_nc_variable( + name=var_name, + file_name_nc=fn, + data_type=RVT.forcing_names[var_name], + var_name_nc=alt_name, + dim_names_nc=nc_var.dims, + units=nc_var.attrs.get("units"), + ) + self._number_grid_cells = int(nc_var.size / len(ds["time"])) + break def update(self, key, value): - if key in self.var_cmds: - self.var_cmds[key].update(value) + if key in self._var_cmds: + self._var_cmds[key].update(value) return True - if key == "nc_index": + elif key == "nc_index": self.nc_index = value + return True return False def to_rv(self): - tpl = Path("/home/christian/rpy/ravenpy/models/global/global.rvt").read_text() + """ + IMPORTANT NOTE: as this method is called at the last moment in the model lifecycle, + we can take the occasion to inject in the data structure some values that are guaranteed + to be there (for instance we can assume that the RVH data is fully specified). + """ d = { "gauge": "", @@ -112,52 +212,81 @@ def to_rv(self): "observed_data": "", } - use_gauge = any(type(cmd) is DataCommand for cmd in self.var_cmds.values()) + use_gauge = any(type(cmd) is DataCommand for cmd in self._var_cmds.values()) if use_gauge: data = [] - for var, cmd in self.var_cmds.items(): - if cmd and var != "water_volume_transport_in_river_channel": + for var, cmd in self._var_cmds.items(): + if cmd and not isinstance(cmd, ObservationDataCommand): data.append(cmd) + lat = ( + self._nc_latitude[self.nc_index] + if self._nc_latitude + else self._rvh.hrus[0].latitude + ) + lon = ( + self._nc_longitude[self.nc_index] + if self._nc_longitude + else self._rvh.hrus[0].longitude + ) + elev = ( + self._nc_elevation[self.nc_index] + if self._nc_elevation + else self._rvh.hrus[0].elevation + ) + d["gauge"] = GaugeCommand( - latitude=self.latitude[self.nc_index], - longitude=self.longitude[self.nc_index], - elevation=self.elevation[self.nc_index], + latitude=lat, + longitude=lon, + elevation=elev, data=data, ) else: + # Construct default grid weights applying equally to all HRUs + data = [(hru.hru_id, self.nc_index, 1.0) for hru in self._rvh.hrus] gw = self.grid_weights or GridWeightsCommand( - number_hrus=1, - number_grid_cells=self.number_grid_cells, - data=[(1, self.nc_index, 1.0)], + number_hrus=len(data), + number_grid_cells=self._number_grid_cells, + data=data, ) cmds = [] - for var, cmd in self.var_cmds.items(): - if cmd and var != "water_volume_transport_in_river_channel": - cmd.grid_weights = gw + for var, cmd in self._var_cmds.items(): + if cmd and not isinstance(cmd, ObservationDataCommand): + # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights + # multiple times as we do here + if len(cmd.grid_weights.data) == 1: + cmd.grid_weights = gw cmds.append(cmd) d["forcing_list"] = "\n".join(map(str, cmds)) - if self.var_cmds.get("water_volume_transport_in_river_channel"): - d["observed_data"] = self.var_cmds[ - "water_volume_transport_in_river_channel" - ] + # QUESTION: is it possible to have (and if yes should we support) more than 1 + # observation variable? For now we don't. + for cmd in self._var_cmds.values(): + if isinstance(cmd, ObservationDataCommand): + # Search for the gauged SB, not sure what should happen when there are + # more than one (should it be even supported?) + for sb in self._rvh.subbasins: + if sb.gauged: + cmd.subbasin_id = sb.subbasin_id + break + else: + raise Exception( + "Could not find an outlet subbasin for observation data" + ) + d["observed_data"] = cmd + break - return tpl.format(**d) + return dedent(self.tmpl).format(**d) class Config: - def __init__(self, hrus, subbasins): - self.rvh = RVH(hrus, subbasins) + def __init__(self, **kwargs): # , hrus, subbasins): + self.rvh = RVH() # hrus, subbasins) self.rvt = RVT(self.rvh) - - def hydrate(self, rv_type, nc_data): - self.rvt.hydrate(nc_data) + for k, v in kwargs.items(): + self.update(k, v) def update(self, key, value): - for rv_type in ("rvh", "rvt"): - if getattr(self, rv_type).update(key, value): - break + for rv in [self.rvh, self.rvt]: + if rv.update(key, value): + return True return False - - # def to_rv(self): - # return self.rvt.to_rv() diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 9d8208bd..e16841ed 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -22,28 +22,15 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to import xarray as xr import ravenpy -from ravenpy.config.importers import extract_nc_data - -from .commands import ( +from ravenpy.config.commands import ( DataCommand, GriddedForcingCommand, HRUsCommand, ObservationDataCommand, StationForcingCommand, ) -from .importers import NcDataImporter -from .rv import ( - RV, - RVH, - RVI, - RVT, - Ost, - RVFile, - forcing_names, - get_states, - isinstance_namedtuple, - parse_solution, -) + +from .rv import RV, RVI, Ost, RVFile, get_states, isinstance_namedtuple, parse_solution RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -275,6 +262,9 @@ def assign(self, key, value): setattr(obj, key, value) assigned = True + if not assigned: + assigned = self.config.update(key, value) + if not assigned: raise AttributeError("No configuration key named {}".format(key)) @@ -287,10 +277,13 @@ def _dump_rv(self): params = self.parameters - with open(self.model_path / "raven-gr4j-cemaneige.rvt", "w") as f: + stem = "raven-gr4j-cemaneige" + # stem = "raven-routing" + + with open(self.model_path / f"{stem}.rvt", "w") as f: f.write(self.config.rvt.to_rv()) - with open(self.model_path / "raven-gr4j-cemaneige.rvh", "w") as f: + with open(self.model_path / f"{stem}.rvh", "w") as f: f.write(self.config.rvh.to_rv()) for rvf in self.rvfiles.values(): @@ -462,8 +455,7 @@ def run(self, ts, overwrite=False, **kwds): self.handle_date_defaults(ts) self.set_calendar(ts) - nc_data = extract_nc_data(ts) - self.config.hydrate("rvt", nc_data) + self.config.rvt.configure_from_nc_data(ts) # Loop over parallel parameters - sets self.rvi.run_index procs = [] diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 1e8f6308..0e5bd78d 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -8,7 +8,7 @@ from ravenpy.config.rvs import Config from .base import Ostrich, Raven -from .rv import HRU, LU, RV, RVC, RVH, RVI, RVP, RVT, HRUState, Ost, Sub +from .rv import HRU, LU, RV, RVC, RVI, RVP, HRUState, Ost, Sub __all__ = [ "GR4JCN", @@ -154,8 +154,7 @@ def run(self, ts, overwrite=False, **kwds): # It seems that `v` is a list when running via a WPS interface hru_attrs[k] = v[0] if isinstance(v, list) else v if hru_attrs: - assert isinstance(self.rvh, RVH) - self.rvh.hrus = (GR4JCN.LandHRU(**hru_attrs),) + self.config.rvh.hrus = (GR4JCN.LandHRU(**hru_attrs),) return super().run(ts, overwrite=overwrite, **kwds) @@ -746,8 +745,9 @@ def __init__(self, *args, **kwds): self.rvi = RVI() self.rvp = RVP() - self.rvh = RVH() - self.rvt = RVT() + self.config = Config() + # self.rvh = RVH() + # self.rvt = RVT() def derived_parameters(self): pass diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index 5a211045..09331251 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -77,35 +77,34 @@ class MyModel(RV): "water_volume_transport_in_river_channel", ) -# Map CF-Convention standard name to Raven Forcing name -forcing_names = { - "tasmin": "TEMP_MIN", - "tasmax": "TEMP_MAX", - "tas": "TEMP_AVE", - "rainfall": "RAINFALL", - "pr": "PRECIP", - "prsn": "SNOWFALL", - "evspsbl": "PET", - "water_volume_transport_in_river_channel": "HYDROGRAPH", -} - - -# Alternate typical variable names found in netCDF files, keyed by CF standard name -alternate_nc_names = { - "tasmin": ["tasmin", "tmin"], - "tasmax": ["tasmax", "tmax"], - "tas": ["tas", "t2m"], - "rainfall": ["rainfall", "rain"], - "pr": ["pr", "precip", "prec", "precipitation", "tp"], - "prsn": ["prsn", "snow", "snowfall", "solid_precip"], - "evspsbl": ["pet", "evap", "evapotranspiration"], - "water_volume_transport_in_river_channel": [ - "qobs", - "discharge", - "streamflow", - "dis", - ], -} +# # Map CF-Convention standard name to Raven Forcing name +# forcing_names = { +# "tasmin": "TEMP_MIN", +# "tasmax": "TEMP_MAX", +# "tas": "TEMP_AVE", +# "rainfall": "RAINFALL", +# "pr": "PRECIP", +# "prsn": "SNOWFALL", +# "evspsbl": "PET", +# "water_volume_transport_in_river_channel": "HYDROGRAPH", +# } + +# # Alternate typical variable names found in netCDF files, keyed by CF standard name +# alternate_nc_names = { +# "tasmin": ["tasmin", "tmin"], +# "tasmax": ["tasmax", "tmax"], +# "tas": ["tas", "t2m"], +# "rainfall": ["rainfall", "rain"], +# "pr": ["pr", "precip", "prec", "precipitation", "tp"], +# "prsn": ["prsn", "snow", "snowfall", "solid_precip"], +# "evspsbl": ["pet", "evap", "evapotranspiration"], +# "water_volume_transport_in_river_channel": [ +# "qobs", +# "discharge", +# "streamflow", +# "dis", +# ], +# } rain_snow_fraction_options = ( "RAINSNOW_DATA", @@ -271,90 +270,90 @@ def update(self, items, force=False): self[key] = val -class RVT(RV): - def __init__(self, **kwargs): - self.pr = {} - self.rainfall = {} - self.prsn = {} - self.tasmin = {} - self.tasmax = {} - self.tas = {} - self.evspsbl = {} - self.water_volume_transport_in_river_channel = {} - - self.nc_index = None - self.gauge_latitude = None - self.gauge_longitude = None - self.gauge_elevation = None - - self.raincorrection = 1 - self.snowcorrection = 1 - - self.monthly_ave_evaporation = () - self.monthly_ave_temperature = () - - self.gridded_forcings = () - - # For a distributed model these weights will be shared among all the StationForcing commands - self.grid_weights = None - - self.var_cmds = {} - # Dictionary of potential variable names, keyed by CF standard name. - # http://cfconventions.org/Data/cf-standard-names/60/build/cf-standard-name-table.html - # PET is the potential evapotranspiration, while evspsbl is the actual evap. - # TODO: Check we're not mixing precip and rainfall. - - super(RVT, self).__init__(**kwargs) - - @property - def variables(self): - return (getattr(self, name) for name in default_input_variables) - - @property - def gauge(self): - data = [o for o in self.var_cmds.values() if isinstance(o, DataCommand)] - if data: - return GaugeCommand( - latitude=self.gauge_latitude, - longitude=self.gauge_longitude, - elevation=self.gauge_elevation, - raincorrection=self.raincorrection, - snowcorrection=self.snowcorrection, - monthly_ave_evaporation=self.monthly_ave_evaporation, - monthly_ave_temperature=self.monthly_ave_temperature, - data=data, - ) - else: - return "" - - @property - def station_forcing_list(self): - data = [ - o for o in self.var_cmds.values() if isinstance(o, StationForcingCommand) - ] - return "\n\n".join(map(str, data)) - - @property - def gridded_forcing_list(self): - data = [ - o for o in self.var_cmds.values() if isinstance(o, GriddedForcingCommand) - ] - # This is really a hack for now, as model.rvt.gridded_forcings are set - # directly by the user in TestRouting.test_lievre_tutorial - data += self.gridded_forcings - return "\n\n".join(map(str, data)) - - @property - def observed_data_cmd(self): - return self.var_cmds.get("water_volume_transport_in_river_channel", "") - - @property - def raincorrection_cmd(self): - return RainCorrection(self.raincorrection) - - @property - def snowcorrection_cmd(self): - return SnowCorrection(self.snowcorrection) +# class RVT(RV): +# def __init__(self, **kwargs): +# self.pr = {} +# self.rainfall = {} +# self.prsn = {} +# self.tasmin = {} +# self.tasmax = {} +# self.tas = {} +# self.evspsbl = {} +# self.water_volume_transport_in_river_channel = {} + +# self.nc_index = None +# self.gauge_latitude = None +# self.gauge_longitude = None +# self.gauge_elevation = None + +# self.raincorrection = 1 +# self.snowcorrection = 1 + +# self.monthly_ave_evaporation = () +# self.monthly_ave_temperature = () + +# self.gridded_forcings = () + +# # For a distributed model these weights will be shared among all the StationForcing commands +# self.grid_weights = None + +# self.var_cmds = {} +# # Dictionary of potential variable names, keyed by CF standard name. +# # http://cfconventions.org/Data/cf-standard-names/60/build/cf-standard-name-table.html +# # PET is the potential evapotranspiration, while evspsbl is the actual evap. +# # TODO: Check we're not mixing precip and rainfall. + +# super(RVT, self).__init__(**kwargs) + +# @property +# def variables(self): +# return (getattr(self, name) for name in default_input_variables) + +# @property +# def gauge(self): +# data = [o for o in self.var_cmds.values() if isinstance(o, DataCommand)] +# if data: +# return GaugeCommand( +# latitude=self.gauge_latitude, +# longitude=self.gauge_longitude, +# elevation=self.gauge_elevation, +# raincorrection=self.raincorrection, +# snowcorrection=self.snowcorrection, +# monthly_ave_evaporation=self.monthly_ave_evaporation, +# monthly_ave_temperature=self.monthly_ave_temperature, +# data=data, +# ) +# else: +# return "" + +# @property +# def station_forcing_list(self): +# data = [ +# o for o in self.var_cmds.values() if isinstance(o, StationForcingCommand) +# ] +# return "\n\n".join(map(str, data)) + +# @property +# def gridded_forcing_list(self): +# data = [ +# o for o in self.var_cmds.values() if isinstance(o, GriddedForcingCommand) +# ] +# # This is really a hack for now, as model.rvt.gridded_forcings are set +# # directly by the user in TestRouting.test_lievre_tutorial +# data += self.gridded_forcings +# return "\n\n".join(map(str, data)) + +# @property +# def observed_data_cmd(self): +# return self.var_cmds.get("water_volume_transport_in_river_channel", "") + +# @property +# def raincorrection_cmd(self): +# return RainCorrection(self.raincorrection) + +# @property +# def snowcorrection_cmd(self): +# return SnowCorrection(self.snowcorrection) class RVI(RV): @@ -619,51 +618,51 @@ def basin_states_cmd(self): return BasinStateVariablesCommand(self.basin_states) -@dataclass -class RVH(RV): - subbasins: Tuple[SubBasinsCommand.Record] = (SubBasinsCommand.Record(),) - land_subbasins: Tuple[int] = () - land_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" - lake_subbasins: Tuple[int] = () - lake_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" - reservoirs: Tuple[ReservoirCommand] = () - hrus: Tuple[HRUsCommand.Record] = () +# @dataclass +# class RVH(RV): +# subbasins: Tuple[SubBasinsCommand.Record] = (SubBasinsCommand.Record(),) +# land_subbasins: Tuple[int] = () +# land_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" +# lake_subbasins: Tuple[int] = () +# lake_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" +# reservoirs: Tuple[ReservoirCommand] = () +# hrus: Tuple[HRUsCommand.Record] = () - template = """ - {subbasins_cmd} +# template = """ +# {subbasins_cmd} - {hrus_cmd} +# {hrus_cmd} - {land_subbasin_group_cmd} +# {land_subbasin_group_cmd} - {lake_subbasin_group_cmd} +# {lake_subbasin_group_cmd} - {reservoir_cmd_list} - """ +# {reservoir_cmd_list} +# """ - @property - def subbasins_cmd(self): - return SubBasinsCommand(self.subbasins) +# @property +# def subbasins_cmd(self): +# return SubBasinsCommand(self.subbasins) - @property - def land_subbasin_group_cmd(self): - return SubBasinGroupCommand("Land", self.land_subbasins) +# @property +# def land_subbasin_group_cmd(self): +# return SubBasinGroupCommand("Land", self.land_subbasins) - @property - def lake_subbasin_group_cmd(self): - return SubBasinGroupCommand("Lakes", self.lake_subbasins) +# @property +# def lake_subbasin_group_cmd(self): +# return SubBasinGroupCommand("Lakes", self.lake_subbasins) - @property - def reservoir_cmd_list(self): - return "\n\n".join(map(str, self.reservoirs)) +# @property +# def reservoir_cmd_list(self): +# return "\n\n".join(map(str, self.reservoirs)) - @property - def hrus_cmd(self): - return HRUsCommand(self.hrus) +# @property +# def hrus_cmd(self): +# return HRUsCommand(self.hrus) - def to_rv(self): - # params = self.items() - return dedent(self.template).format(**dict(self.items())) +# def to_rv(self): +# # params = self.items() +# return dedent(self.template).format(**dict(self.items())) @dataclass diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 283bdc1d..e2d2e7d0 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -81,7 +81,7 @@ def test_race(): class TestGR4JCN: def test_simple(self): - model = GR4JCN("/tmp/ravenpy_debug/new_config_simple") + model = GR4JCN() # "/tmp/ravenpy_debug/new_config_simple") model.rvi.start_date = dt.datetime(2000, 1, 1) model.rvi.end_date = dt.datetime(2002, 1, 1) @@ -100,8 +100,6 @@ def test_simple(self): model(TS) - return - # ------------ # Check quality (diagnostic) of simulated streamflow values # ------------ @@ -157,7 +155,7 @@ def test_simple(self): def test_routing(self): """We need at least 2 subbasins to activate routing.""" - model = GR4JCN("/tmp/ravenpy_debug/new_config_routing") + model = GR4JCN() # "/tmp/ravenpy_debug/new_config_routing") ts_2d = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily_2d.nc" @@ -381,7 +379,7 @@ def test_assign(self): assert model.rvp.params.GR4J_X1 == 0.529 def test_run(self): - model = GR4JCN("/tmp/ravenpy_debug/test_run") + model = GR4JCN() # "/tmp/ravenpy_debug/test_run") model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) @@ -1366,7 +1364,7 @@ def test_lievre_tutorial(self): # Model # ######### - model = Routing() + model = Routing("/tmp/ravenpy_debug/test_lievre") ####### # RVI # @@ -1399,15 +1397,20 @@ def test_lievre_tutorial(self): assert len(gauge) == 1 gauge = gauge[0] - model.rvh.update(rvh_config) - - model.rvh.land_subbasin_property_multiplier = SBGroupPropertyMultiplierCommand( - "Land", "MANNINGS_N", 1.0 - ) - model.rvh.lake_subbasin_property_multiplier = SBGroupPropertyMultiplierCommand( - "Lakes", "RESERVOIR_CREST_WIDTH", 1.0 + rvh_config.update( + { + "land_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( + "Land", "MANNINGS_N", 1.0 + ), + "lake_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( + "Lakes", "RESERVOIR_CREST_WIDTH", 1.0 + ), + } ) + for k, v in rvh_config.items(): + model.config.rvh.update(k, v) + ####### # RVP # ####### @@ -1444,7 +1447,7 @@ def test_lievre_tutorial(self): vic_temperatures_nc_path, routing_product_shp_path ) - streaminputs_gf = GriddedForcingCommand( + model.config.rvt.add_nc_variable( name="StreamInputs", data_type="PRECIP", file_name_nc=vic_streaminputs_nc_path.name, @@ -1455,7 +1458,7 @@ def test_lievre_tutorial(self): grid_weights=streaminputs_importer.extract(), ) - temperatures_gf = GriddedForcingCommand( + model.config.rvt.add_nc_variable( name="AverageTemp", data_type="TEMP_AVE", file_name_nc=vic_temperatures_nc_path.name, @@ -1464,9 +1467,8 @@ def test_lievre_tutorial(self): grid_weights=temperatures_importer.extract(), ) - model.rvt.gridded_forcings = [streaminputs_gf, temperatures_gf] - - model.rvt.observation_data = ObservationDataCommand( + model.config.rvt.add_nc_variable( + is_observation=True, data_type="HYDROGRAPH", subbasin_id=gauge.subbasin_id, units="m3/s", From 08f8e2bcdf0602158490a092e391dfab3a5c5fd3 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 2 Apr 2021 20:29:38 -0400 Subject: [PATCH 03/59] WIP --- ravenpy/config/rvs.py | 68 +++++++++++++-- ravenpy/models/base.py | 10 ++- ravenpy/models/emulators.py | 67 +++++++++++++- ravenpy/models/rv.py | 169 ------------------------------------ 4 files changed, 131 insertions(+), 183 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 78bd5603..5601151c 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -22,7 +22,18 @@ ######### -class RVH: +class RVV: + def update(self, key, value): + if hasattr(self, key): + setattr(self, key, value) + return True + return False + + def to_rv(self): + pass + + +class RVH(RVV): tmpl = """ {subbasins} @@ -50,12 +61,6 @@ def __init__(self, tmpl=None): self.reservoirs = () self.tmpl = tmpl or RVH.tmpl - def update(self, key, value): - if hasattr(self, key): - setattr(self, key, value) - return True - return False - def to_rv(self): d = { "subbasins": SubBasinsCommand(self.subbasins), @@ -73,12 +78,56 @@ def to_rv(self): return dedent(self.tmpl).format(**d) +########## +# R V P # +########## + + +class RVP(RVV): + def __init__(self): + self.params: Tuple[namedtuple] = () + self.soil_classes: Tuple[SoilClassesCommand.Record] = () + self.soil_profiles: Tuple[SoilProfilesCommand.Record] = () + self.vegetation_classes: Tuple[VegetationClassesCommand.Record] = () + self.land_use_classes: Tuple[LandUseClassesCommand.Record] = () + self.channel_profiles: Tuple[ChannelProfileCommand] = () + self.avg_annual_runoff: float = 0 + self.tmpl = None + + def to_rv(self): + d = { + "params": self.params, + "channel_profiles": "\n\n".join(map(str, self.channel_profiles)), + } + return dedent(self.tmpl).format(**d) + + # @property + # def soil_classes_cmd(self): + # return SoilClassesCommand(self.soil_classes) + + # @property + # def soil_profiles_cmd(self): + # return SoilProfilesCommand(self.soil_profiles) + + # @property + # def vegetation_classes_cmd(self): + # return VegetationClassesCommand(self.vegetation_classes) + + # @property + # def land_use_classes_cmd(self): + # return LandUseClassesCommand(self.land_use_classes) + + # @property + # def channel_profile_cmd_list(self): + # return "\n\n".join(map(str, self.channel_profiles)) + + ######### # R V T # ######### -class RVT: +class RVT(RVV): tmpl = """ {gauge} @@ -282,11 +331,12 @@ class Config: def __init__(self, **kwargs): # , hrus, subbasins): self.rvh = RVH() # hrus, subbasins) self.rvt = RVT(self.rvh) + self.rvp = RVP() for k, v in kwargs.items(): self.update(k, v) def update(self, key, value): - for rv in [self.rvh, self.rvt]: + for rv in [self.rvh, self.rvp, self.rvt]: if rv.update(key, value): return True return False diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index e16841ed..bc9b9e59 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -52,7 +52,7 @@ class Raven: templates = () # Allowed configuration file extensions - _rvext = ("rvi", "rvp", "rvc") # "rvh" , "rvt") + _rvext = ("rvi", "rvc") _parallel_parameters = [ "params", @@ -224,7 +224,7 @@ def configure(self, fns): """Read configuration files.""" for fn in fns: rvf = RVFile(fn) - if rvf.ext in ["rvt", "rvh"]: + if rvf.ext in ["rvt", "rvh", "rvp"]: continue if rvf.ext not in self._rvext + ("txt",): raise ValueError( @@ -277,8 +277,9 @@ def _dump_rv(self): params = self.parameters - stem = "raven-gr4j-cemaneige" + # stem = "raven-gr4j-cemaneige" # stem = "raven-routing" + stem = self.identifier with open(self.model_path / f"{stem}.rvt", "w") as f: f.write(self.config.rvt.to_rv()) @@ -286,6 +287,9 @@ def _dump_rv(self): with open(self.model_path / f"{stem}.rvh", "w") as f: f.write(self.config.rvh.to_rv()) + with open(self.model_path / f"{stem}.rvp", "w") as f: + f.write(self.config.rvp.to_rv()) + for rvf in self.rvfiles.values(): p = self.exec_path if rvf.is_tpl else self.model_path if ( diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 0e5bd78d..f22ee683 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -8,7 +8,7 @@ from ravenpy.config.rvs import Config from .base import Ostrich, Raven -from .rv import HRU, LU, RV, RVC, RVI, RVP, HRUState, Ost, Sub +from .rv import HRU, LU, RV, RVC, RVI, HRUState, Ost, Sub __all__ = [ "GR4JCN", @@ -69,7 +69,7 @@ class LakeHRU(HRU): def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvp = RVP(params=GR4JCN.params(None, None, None, None, None, None)) + # self.rvp = RVP(params=GR4JCN.params(None, None, None, None, None, None)) # self.rvt = RVT() # self.rvh = RVH( self.config = Config( @@ -83,7 +83,70 @@ def __init__(self, *args, **kwds): gauged=True, ), ), + params=GR4JCN.params(None, None, None, None, None, None), ) + + self.config.rvp.tmpl = """ +# -Global snow parameters------------------------------------- +:RainSnowTransition 0 1.0 +:AirSnowCoeff {one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 +:AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 + +# -Orographic Corrections------------------------------------- +:PrecipitationLapseRate 0.0004 +:AdiabaticLapseRate 0.0065 + +# - Soil classes --------------------------------------------- +:SoilClasses + :Attributes + :Units + SOIL_PROD + SOIL_ROUT + SOIL_TEMP + SOIL_GW + AQUIFER +:EndSoilClasses +:SoilParameterList + :Parameters, POROSITY , GR4J_X3, GR4J_X2 + :Units , none , mm, mm/d + [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} +:EndSoilParameterList + +# ----Soil Profiles-------------------------------------------- +# name,#horizons,(soiltype,thickness)x(#horizons) +# GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} +:SoilProfiles + DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, + LAKE, 0 +:EndSoilProfiles + +# ----Vegetation Classes--------------------------------------- +:VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 0.0, 0.0, 0.0 + VEG_WATER, 0.0, 0.0, 0.0 +:EndVegetationClasses + +# --Land Use Classes------------------------------------------ +:LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units , frac, frac + LU_ALL, 0.0, 0.0 + LU_WATER, 0.0, 0.0 +:EndLandUseClasses +:LandUseParameterList + :Parameters, GR4J_X4, MELT_FACTOR + :Units , d, mm/d/C + [DEFAULT], {params.GR4J_X4}, 7.73 +:EndLandUseParameterList + +:AvgAnnualRunoff {avg_annual_runoff} + +# List of channel profiles +{channel_profiles} +""" + self.rvi = RVI(rain_snow_fraction="RAINSNOW_DINGMAN", evaporation="PET_OUDIN") # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index 09331251..11ec07c6 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -270,92 +270,6 @@ def update(self, items, force=False): self[key] = val -# class RVT(RV): -# def __init__(self, **kwargs): -# self.pr = {} -# self.rainfall = {} -# self.prsn = {} -# self.tasmin = {} -# self.tasmax = {} -# self.tas = {} -# self.evspsbl = {} -# self.water_volume_transport_in_river_channel = {} - -# self.nc_index = None -# self.gauge_latitude = None -# self.gauge_longitude = None -# self.gauge_elevation = None - -# self.raincorrection = 1 -# self.snowcorrection = 1 - -# self.monthly_ave_evaporation = () -# self.monthly_ave_temperature = () - -# self.gridded_forcings = () - -# # For a distributed model these weights will be shared among all the StationForcing commands -# self.grid_weights = None - -# self.var_cmds = {} -# # Dictionary of potential variable names, keyed by CF standard name. -# # http://cfconventions.org/Data/cf-standard-names/60/build/cf-standard-name-table.html -# # PET is the potential evapotranspiration, while evspsbl is the actual evap. -# # TODO: Check we're not mixing precip and rainfall. - -# super(RVT, self).__init__(**kwargs) - -# @property -# def variables(self): -# return (getattr(self, name) for name in default_input_variables) - -# @property -# def gauge(self): -# data = [o for o in self.var_cmds.values() if isinstance(o, DataCommand)] -# if data: -# return GaugeCommand( -# latitude=self.gauge_latitude, -# longitude=self.gauge_longitude, -# elevation=self.gauge_elevation, -# raincorrection=self.raincorrection, -# snowcorrection=self.snowcorrection, -# monthly_ave_evaporation=self.monthly_ave_evaporation, -# monthly_ave_temperature=self.monthly_ave_temperature, -# data=data, -# ) -# else: -# return "" - -# @property -# def station_forcing_list(self): -# data = [ -# o for o in self.var_cmds.values() if isinstance(o, StationForcingCommand) -# ] -# return "\n\n".join(map(str, data)) - -# @property -# def gridded_forcing_list(self): -# data = [ -# o for o in self.var_cmds.values() if isinstance(o, GriddedForcingCommand) -# ] -# # This is really a hack for now, as model.rvt.gridded_forcings are set -# # directly by the user in TestRouting.test_lievre_tutorial -# data += self.gridded_forcings -# return "\n\n".join(map(str, data)) - -# @property -# def observed_data_cmd(self): -# return self.var_cmds.get("water_volume_transport_in_river_channel", "") - -# @property -# def raincorrection_cmd(self): -# return RainCorrection(self.raincorrection) - -# @property -# def snowcorrection_cmd(self): -# return SnowCorrection(self.snowcorrection) - - class RVI(RV): def __init__(self, **kwargs): self.name = None @@ -618,89 +532,6 @@ def basin_states_cmd(self): return BasinStateVariablesCommand(self.basin_states) -# @dataclass -# class RVH(RV): -# subbasins: Tuple[SubBasinsCommand.Record] = (SubBasinsCommand.Record(),) -# land_subbasins: Tuple[int] = () -# land_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" -# lake_subbasins: Tuple[int] = () -# lake_subbasin_property_multiplier: SBGroupPropertyMultiplierCommand = "" -# reservoirs: Tuple[ReservoirCommand] = () -# hrus: Tuple[HRUsCommand.Record] = () - -# template = """ -# {subbasins_cmd} - -# {hrus_cmd} - -# {land_subbasin_group_cmd} - -# {lake_subbasin_group_cmd} - -# {reservoir_cmd_list} -# """ - -# @property -# def subbasins_cmd(self): -# return SubBasinsCommand(self.subbasins) - -# @property -# def land_subbasin_group_cmd(self): -# return SubBasinGroupCommand("Land", self.land_subbasins) - -# @property -# def lake_subbasin_group_cmd(self): -# return SubBasinGroupCommand("Lakes", self.lake_subbasins) - -# @property -# def reservoir_cmd_list(self): -# return "\n\n".join(map(str, self.reservoirs)) - -# @property -# def hrus_cmd(self): -# return HRUsCommand(self.hrus) - -# def to_rv(self): -# # params = self.items() -# return dedent(self.template).format(**dict(self.items())) - - -@dataclass -class RVP(RV): - params: Tuple[namedtuple] = () - soil_classes: Tuple[SoilClassesCommand.Record] = () - soil_profiles: Tuple[SoilProfilesCommand.Record] = () - vegetation_classes: Tuple[VegetationClassesCommand.Record] = () - land_use_classes: Tuple[LandUseClassesCommand.Record] = () - channel_profiles: Tuple[ChannelProfileCommand] = () - avg_annual_runoff: float = 0 - - @property - def soil_classes_cmd(self): - return SoilClassesCommand(self.soil_classes) - - @property - def soil_profiles_cmd(self): - return SoilProfilesCommand(self.soil_profiles) - - @property - def vegetation_classes_cmd(self): - return VegetationClassesCommand(self.vegetation_classes) - - @property - def land_use_classes_cmd(self): - return LandUseClassesCommand(self.land_use_classes) - - @property - def channel_profile_cmd_list(self): - return "\n\n".join(map(str, self.channel_profiles)) - - # Note sure about this! - # def to_rv(self): - # params = self.items() - # return dedent(self.template).format(**dict(self.items())) - - class Ost(RV): def __init__(self, **kwargs): self._max_iterations = None From 2f7d1387cd380883685535d9a9c4cf0d76687db2 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 12:11:10 -0400 Subject: [PATCH 04/59] WIP --- ravenpy/config/commands.py | 38 ++++++++++++++++++------------- ravenpy/config/rvs.py | 19 +++++++++++++--- ravenpy/models/base.py | 13 +++++------ ravenpy/models/emulators.py | 45 ++++++++++++++++++++++++++++--------- ravenpy/models/rv.py | 6 ++--- tests/test_emulators.py | 34 +++++++++++++++++----------- 6 files changed, 101 insertions(+), 54 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index a46669fc..953b95d9 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -27,6 +27,8 @@ def __init__(self, value): self.value = value def to_rv(self): + if self.value is None: + return "" return self.template.format(**asdict(self)) @@ -285,7 +287,7 @@ def asdict(self): d = asdict(self) d["dimensions"] = self.dimensions d["linear_transform"] = self.linear_transform - d["deaccumulate"] = Deaccumulate(self.deaccumulate) + d["deaccumulate"] = DeaccumulateCommand(self.deaccumulate) d["time_shift"] = f":TimeShift {self.time_shift}" if self.time_shift else "" return d @@ -324,8 +326,8 @@ class GaugeCommand(RavenConfig): elevation: float = 0 # Accept strings to embed parameter names into Ostrich templates - raincorrection: Union[float, str] = 1 - snowcorrection: Union[float, str] = 1 + rain_correction: Union[float, str] = 1 + snow_correction: Union[float, str] = 1 monthly_ave_evaporation: Tuple[float] = () monthly_ave_temperature: Tuple[float] = () @@ -335,8 +337,8 @@ class GaugeCommand(RavenConfig): :Latitude {latitude} :Longitude {longitude} :Elevation {elevation} - {raincorrection_cmd} - {snowcorrection_cmd} + {rain_correction_cmd} + {snow_correction_cmd} {monthly_ave_evaporation_cmd} {monthly_ave_temperature_cmd} {data_list} @@ -344,12 +346,12 @@ class GaugeCommand(RavenConfig): """ @property - def raincorrection_cmd(self): - return RainCorrection(self.raincorrection) + def rain_correction_cmd(self): + return RainCorrectionCommand(self.rain_correction) @property - def snowcorrection_cmd(self): - return SnowCorrection(self.snowcorrection) + def snow_correction_cmd(self): + return SnowCorrectionCommand(self.snow_correction) @property def monthly_ave_evaporation_cmd(self): @@ -361,8 +363,8 @@ def monthly_ave_temperature_cmd(self): def to_rv(self): d = asdict(self) - d["raincorrection_cmd"] = self.raincorrection_cmd - d["snowcorrection_cmd"] = self.snowcorrection_cmd + d["rain_correction_cmd"] = self.rain_correction_cmd + d["snow_correction_cmd"] = self.snow_correction_cmd d["monthly_ave_evaporation_cmd"] = self.monthly_ave_evaporation_cmd d["monthly_ave_temperature_cmd"] = self.monthly_ave_temperature_cmd d["data_list"] = "\n\n".join(map(str, self.data)) @@ -788,19 +790,19 @@ def to_rv(self): @dataclass -class RainCorrection(BaseValueCommand): +class RainCorrectionCommand(BaseValueCommand): tag: str = "RainCorrection" value: Union[float, str] = 1.0 @dataclass -class SnowCorrection(BaseValueCommand): +class SnowCorrectionCommand(BaseValueCommand): tag: str = "SnowCorrection" value: Union[float, str] = 1.0 @dataclass -class Routing(BaseValueCommand): +class RoutingCommand(BaseValueCommand): """ROUTE_NONE, ROUTE_DIFFUSIVE_WAVE""" tag: str = "Routing" @@ -808,5 +810,11 @@ class Routing(BaseValueCommand): @dataclass -class Deaccumulate(BaseBooleanCommand): +class DeaccumulateCommand(BaseBooleanCommand): tag: str = "Deaccumulate" + + +@dataclass +class AvgAnnualRunoffCommand(BaseValueCommand): + tag: str = "AvgAnnualRunoff" + value: float = None diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 5601151c..61186ec5 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -1,11 +1,13 @@ -from dataclasses import replace +from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent import cf_xarray +import numpy as np import xarray as xr from ravenpy.config.commands import ( + AvgAnnualRunoffCommand, DataCommand, GaugeCommand, GriddedForcingCommand, @@ -25,6 +27,13 @@ class RVV: def update(self, key, value): if hasattr(self, key): + # Special case: the user might be trying to set a dataclass param by + # supplying a list of values (either a list, tuple of numpy array); + # if that's the case, cast those values into a new instance of that + # dataclass + attr = getattr(self, key) + if is_dataclass(attr) and isinstance(value, (list, tuple, np.ndarray)): + value = attr.__class__(*value) setattr(self, key, value) return True return False @@ -85,19 +94,23 @@ def to_rv(self): class RVP(RVV): def __init__(self): - self.params: Tuple[namedtuple] = () + self.params = None + self.derived_params = None + self.soil_classes: Tuple[SoilClassesCommand.Record] = () self.soil_profiles: Tuple[SoilProfilesCommand.Record] = () self.vegetation_classes: Tuple[VegetationClassesCommand.Record] = () self.land_use_classes: Tuple[LandUseClassesCommand.Record] = () self.channel_profiles: Tuple[ChannelProfileCommand] = () - self.avg_annual_runoff: float = 0 + self.avg_annual_runoff: float = None self.tmpl = None def to_rv(self): d = { "params": self.params, + "derived_params": self.derived_params, "channel_profiles": "\n\n".join(map(str, self.channel_profiles)), + "avg_annual_runoff": AvgAnnualRunoffCommand(self.avg_annual_runoff), } return dedent(self.tmpl).format(**d) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index bc9b9e59..140a193f 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -90,11 +90,11 @@ def __init__(self, workdir: Union[str, Path] = None): self._rvs = [] self.rvi = RV() - self.rvp = RV() + # self.rvp = RV() self.rvc = RV() # self.rvt = RVT() # self.rvh = RV() - self.rvd = RV() # rvd is for derived parameters + # self.rvd = RV() # rvd is for derived parameters self.workdir = Path(workdir) self.ind_outputs = {} # Individual files for all simulations @@ -106,7 +106,7 @@ def __init__(self, workdir: Union[str, Path] = None): self.rvfiles = {} # Configuration file extensions + rvd for derived parameters. - self._rvext = self._rvext + ("rvd",) + self._rvext = self._rvext # + ("rvd",) # For subclasses where the configuration file templates are known in advance. if self.templates: @@ -255,9 +255,6 @@ def assign(self, key, value): ): p = att.__class__(*value) setattr(obj, key, p) - # If att is a RavenNcData, we expect a dict - # elif isinstance(att, dict): - # att.update(value) else: setattr(obj, key, value) assigned = True @@ -277,9 +274,9 @@ def _dump_rv(self): params = self.parameters - # stem = "raven-gr4j-cemaneige" + stem = "raven-gr4j-cemaneige" # stem = "raven-routing" - stem = self.identifier + # stem = self.identifier with open(self.model_path / f"{stem}.rvt", "w") as f: f.write(self.config.rvt.to_rv()) diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index f22ee683..e59bf92e 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -43,10 +43,24 @@ class GR4JCN(Raven): identifier = "gr4jcn" templates = tuple((Path(__file__).parent / "raven-gr4j-cemaneige").glob("*.rv?")) - params = namedtuple( - "GR4JParams", - ("GR4J_X1", "GR4J_X2", "GR4J_X3", "GR4J_X4", "CEMANEIGE_X1", "CEMANEIGE_X2"), - ) + # params = namedtuple( + # "GR4JParams", + # ("GR4J_X1", "GR4J_X2", "GR4J_X3", "GR4J_X4", "CEMANEIGE_X1", "CEMANEIGE_X2"), + # ) + + @dataclass + class Params: + GR4J_X1: float = None + GR4J_X2: float = None + GR4J_X3: float = None + GR4J_X4: float = None + CEMANEIGE_X1: float = None + CEMANEIGE_X2: float = None + + @dataclass + class DerivedParams: + one_minus_CEMANEIGE_X2: float = None + GR4J_X1_hlf: float = None @dataclass class LandHRU(HRU): @@ -83,13 +97,14 @@ def __init__(self, *args, **kwds): gauged=True, ), ), - params=GR4JCN.params(None, None, None, None, None, None), + params=GR4JCN.Params(), + derived_params=GR4JCN.DerivedParams(), ) self.config.rvp.tmpl = """ # -Global snow parameters------------------------------------- :RainSnowTransition 0 1.0 -:AirSnowCoeff {one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 +:AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 :AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 # -Orographic Corrections------------------------------------- @@ -141,7 +156,7 @@ def __init__(self, *args, **kwds): [DEFAULT], {params.GR4J_X4}, 7.73 :EndLandUseParameterList -:AvgAnnualRunoff {avg_annual_runoff} +{avg_annual_runoff} # List of channel profiles {channel_profiles} @@ -151,15 +166,23 @@ def __init__(self, *args, **kwds): # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified self.rvc = RVC(soil0=None, soil1=15) - self.rvd = RV(one_minus_CEMANEIGE_X2=None, GR4J_X1_hlf=None) + # self.rvd = RV(one_minus_CEMANEIGE_X2=None, GR4J_X1_hlf=None) def derived_parameters(self): - self.rvd.GR4J_X1_hlf = self.rvp.params.GR4J_X1 * 1000.0 / 2.0 - self.rvd.one_minus_CEMANEIGE_X2 = 1.0 - self.rvp.params.CEMANEIGE_X2 + self.config.rvp.derived_params.GR4J_X1_hlf = ( + self.config.rvp.params.GR4J_X1 * 1000.0 / 2.0 + ) + self.config.rvp.derived_params.one_minus_CEMANEIGE_X2 = ( + 1.0 - self.config.rvp.params.CEMANEIGE_X2 + ) # Default initial conditions if none are given if self.rvc.hru_state is None: - soil0 = self.rvd.GR4J_X1_hlf if self.rvc.soil0 is None else self.rvc.soil0 + soil0 = ( + self.config.rvp.derived_params.GR4J_X1_hlf + if self.rvc.soil0 is None + else self.rvc.soil0 + ) soil1 = self.rvc.soil1 # subbassin_id -> has at least one LakeHRU diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index 11ec07c6..e60c7f9e 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -19,12 +19,10 @@ HRUsCommand, HRUStateVariableTableCommand, LandUseClassesCommand, - RainCorrection, RavenConfig, ReservoirCommand, - Routing, + RoutingCommand, SBGroupPropertyMultiplierCommand, - SnowCorrection, SoilClassesCommand, SoilProfilesCommand, StationForcingCommand, @@ -415,7 +413,7 @@ def suppress_output(self, value): @property def routing_cmd(self): - return Routing(value=self.routing) + return RoutingCommand(value=self.routing) @property def rain_snow_fraction(self): diff --git a/tests/test_emulators.py b/tests/test_emulators.py index e2d2e7d0..8f488003 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -81,7 +81,7 @@ def test_race(): class TestGR4JCN: def test_simple(self): - model = GR4JCN() # "/tmp/ravenpy_debug/new_config_simple") + model = GR4JCN("/tmp/ravenpy_debug/test_simple") model.rvi.start_date = dt.datetime(2000, 1, 1) model.rvi.end_date = dt.datetime(2002, 1, 1) @@ -89,12 +89,14 @@ def test_simple(self): model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) - model.rvp.params = model.params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947) + model.config.rvp.params = model.Params( + 0.529, -3.396, 407.29, 1.072, 16.9, 0.947 + ) total_area_in_m2 = model.config.rvh.hrus[0].area * 1000 * 1000 - model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) + # model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) - np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) + # np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) assert model.rvi.suppress_output == "" @@ -244,13 +246,19 @@ def test_routing(self): # R V P # ######### - model.rvp.params = model.params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947) + model.config.rvp.params = model.Params( + 0.529, -3.396, 407.29, 1.072, 16.9, 0.947 + ) total_area_in_km2 = sum(hru.area for hru in model.config.rvh.hrus) total_area_in_m2 = total_area_in_km2 * 1000 * 1000 - model.rvp.avg_annual_runoff = get_average_annual_runoff(ts_2d, total_area_in_m2) + model.config.rvp.avg_annual_runoff = get_average_annual_runoff( + ts_2d, total_area_in_m2 + ) - np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 139.5407534171111) + np.testing.assert_almost_equal( + model.config.rvp.avg_annual_runoff, 139.5407534171111 + ) # These channel profiles describe the geometry of the actual river crossection. # The eight points (x) to describe the following geometry are given in each @@ -263,7 +271,7 @@ def test_routing(self): # \ RIVERBED / # x----------x # - model.rvp.channel_profiles = [ + model.config.rvp.channel_profiles = [ ChannelProfileCommand( name="chn_10", bed_slope=7.62066e-05, @@ -370,13 +378,13 @@ def test_assign(self): assert model.rvi.run_name == "test" model.assign("params", np.array([0.529, -3.396, 407.29, 1.072, 16.9, 0.947])) - assert model.rvp.params.GR4J_X1 == 0.529 + assert model.config.rvp.params.GR4J_X1 == 0.529 model.assign("params", [0.529, -3.396, 407.29, 1.072, 16.9, 0.947]) - assert model.rvp.params.GR4J_X1 == 0.529 + assert model.config.rvp.params.GR4J_X1 == 0.529 model.assign("params", (0.529, -3.396, 407.29, 1.072, 16.9, 0.947)) - assert model.rvp.params.GR4J_X1 == 0.529 + assert model.config.rvp.params.GR4J_X1 == 0.529 def test_run(self): model = GR4JCN() # "/tmp/ravenpy_debug/test_run") @@ -623,7 +631,7 @@ def test_parallel_params(self): assert len(model.diagnostics) == 2 assert model.hydrograph.dims["params"] == 2 z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 6 + assert len(z.filelist) == 4 def test_parallel_basins(self, input2d): ts = input2d @@ -646,7 +654,7 @@ def test_parallel_basins(self, input2d): model.hydrograph.basin_name[:], ["sub_001", "sub_001"] ) z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 6 + assert len(z.filelist) == 4 class TestGR4JCN_OST: From 2958263328040a3a8d797dd09212809266ac0b1a Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 14:52:26 -0400 Subject: [PATCH 05/59] Add RVC --- ravenpy/config/rvs.py | 140 +++++++++++++++++++++++++++++------- ravenpy/models/base.py | 23 +++--- ravenpy/models/emulators.py | 49 +++++++------ ravenpy/models/rv.py | 134 ---------------------------------- tests/test_emulators.py | 29 ++++---- 5 files changed, 174 insertions(+), 201 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 61186ec5..df078a7d 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -1,3 +1,4 @@ +import collections from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent @@ -8,21 +9,25 @@ from ravenpy.config.commands import ( AvgAnnualRunoffCommand, + BasinIndexCommand, + BasinStateVariablesCommand, + ChannelProfileCommand, DataCommand, GaugeCommand, GriddedForcingCommand, GridWeightsCommand, HRUsCommand, + HRUStateVariableTableCommand, + LandUseClassesCommand, ObservationDataCommand, + SoilClassesCommand, + SoilProfilesCommand, StationForcingCommand, SubBasinGroupCommand, SubBasinsCommand, + VegetationClassesCommand, ) -######### -# R V H # -######### - class RVV: def update(self, key, value): @@ -42,6 +47,106 @@ def to_rv(self): pass +######### +# R V C # +######### + + +class RVC(RVV): + + tmpl = """ + {hru_states} + + {basin_states} + """ + + def __init__(self, tmpl=None): + self.hru_states = {} + self.basin_states = {} + + self.tmpl = tmpl or RVC.tmpl + + @staticmethod + def parse_solution(solution_str): + def _parser(lines, indent="", fmt=str): + import itertools + import re + + header_pat = re.compile(r"(\s*):(\w+)\s?,?\s*(.*)") + + out = collections.defaultdict(dict) + old_key = None + for line in lines: + header = header_pat.match(line) + if header: + new_indent, key, value = header.groups() + if new_indent > indent: + out[old_key] = _parser( + itertools.chain([line], lines), new_indent + ) + elif new_indent < indent: + return out + else: + if key == "BasinIndex": + i, name = value.split(",") + i = int(i) + out[key][i] = dict( + index=i, + name=name, + **_parser(lines, new_indent + " ", float) + ) + # elif key in ["Qlat", "Qout"]: + # n, *values, last = value.split(",") + # out[key] = list(map(float, values)) + # out[key + "Last"] = float(last) + elif key in ["Qin", "Qout", "Qlat"]: + n, *values = value.split(",") + out[key] = (int(n),) + tuple(map(float, values)) + else: + out[key] = ( + list(map(fmt, value.split(","))) + if "," in value + else fmt(value) + ) + + old_key = key + else: + data = line.split(",") + i = int(data.pop(0)) + out["data"][i] = [i] + list(map(float, data)) + + return out + + lines = iter(solution_str.splitlines()) + return _parser(lines) + + def set_from_solution(self, solution_str): + + solution_objs = RVC.parse_solution(solution_str) + + self.hru_states = {} + self.basin_states = {} + + for index, params in solution_objs["HRUStateVariableTable"]["data"].items(): + self.hru_states[index] = HRUStateVariableTableCommand.Record(*params) + + for index, raw in solution_objs["BasinStateVariables"]["BasinIndex"].items(): + params = {k.lower(): v for (k, v) in raw.items()} + self.basin_states[index] = BasinIndexCommand(**params) + + def to_rv(self): + d = { + "hru_states": HRUStateVariableTableCommand(self.hru_states), + "basin_states": BasinStateVariablesCommand(self.basin_states), + } + return dedent(self.tmpl).format(**d) + + +######### +# R V H # +######### + + class RVH(RVV): tmpl = """ @@ -94,6 +199,7 @@ def to_rv(self): class RVP(RVV): def __init__(self): + # Model specific params and derived params self.params = None self.derived_params = None @@ -103,37 +209,22 @@ def __init__(self): self.land_use_classes: Tuple[LandUseClassesCommand.Record] = () self.channel_profiles: Tuple[ChannelProfileCommand] = () self.avg_annual_runoff: float = None + self.tmpl = None def to_rv(self): d = { "params": self.params, "derived_params": self.derived_params, + "soil_classes": SoilClassesCommand(self.soil_classes), + "soil_profiles": SoilProfilesCommand(self.soil_profiles), + "vegetation_classes": VegetationClassesCommand(self.vegetation_classes), + "land_use_classes": LandUseClassesCommand(self.land_use_classes), "channel_profiles": "\n\n".join(map(str, self.channel_profiles)), "avg_annual_runoff": AvgAnnualRunoffCommand(self.avg_annual_runoff), } return dedent(self.tmpl).format(**d) - # @property - # def soil_classes_cmd(self): - # return SoilClassesCommand(self.soil_classes) - - # @property - # def soil_profiles_cmd(self): - # return SoilProfilesCommand(self.soil_profiles) - - # @property - # def vegetation_classes_cmd(self): - # return VegetationClassesCommand(self.vegetation_classes) - - # @property - # def land_use_classes_cmd(self): - # return LandUseClassesCommand(self.land_use_classes) - - # @property - # def channel_profile_cmd_list(self): - # return "\n\n".join(map(str, self.channel_profiles)) - ######### # R V T # @@ -345,6 +436,7 @@ def __init__(self, **kwargs): # , hrus, subbasins): self.rvh = RVH() # hrus, subbasins) self.rvt = RVT(self.rvh) self.rvp = RVP() + self.rvc = RVC() for k, v in kwargs.items(): self.update(k, v) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 140a193f..1a42b74c 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -29,8 +29,9 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to ObservationDataCommand, StationForcingCommand, ) +from ravenpy.config.rvs import RVC -from .rv import RV, RVI, Ost, RVFile, get_states, isinstance_namedtuple, parse_solution +from .rv import RV, RVI, Ost, RVFile, isinstance_namedtuple RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -52,7 +53,7 @@ class Raven: templates = () # Allowed configuration file extensions - _rvext = ("rvi", "rvc") + _rvext = ("rvi",) _parallel_parameters = [ "params", @@ -224,8 +225,9 @@ def configure(self, fns): """Read configuration files.""" for fn in fns: rvf = RVFile(fn) - if rvf.ext in ["rvt", "rvh", "rvp"]: + if rvf.ext in ["rvt", "rvh", "rvp", "rvc"]: continue + if rvf.ext not in self._rvext + ("txt",): raise ValueError( "rv contains unrecognized configuration file keys : {}.".format( @@ -274,9 +276,8 @@ def _dump_rv(self): params = self.parameters - stem = "raven-gr4j-cemaneige" - # stem = "raven-routing" - # stem = self.identifier + # stem = "raven-gr4j-cemaneige" + stem = "raven-routing" with open(self.model_path / f"{stem}.rvt", "w") as f: f.write(self.config.rvt.to_rv()) @@ -287,6 +288,9 @@ def _dump_rv(self): with open(self.model_path / f"{stem}.rvp", "w") as f: f.write(self.config.rvp.to_rv()) + with open(self.model_path / f"{stem}.rvc", "w") as f: + f.write(self.config.rvc.to_rv()) + for rvf in self.rvfiles.values(): p = self.exec_path if rvf.is_tpl else self.model_path if ( @@ -515,7 +519,7 @@ def resume(self, solution=None): else: fn = solution - self.rvc.parse(Path(fn).read_text()) + self.config.rvc.set_from_solution(Path(fn).read_text()) def parse_results(self, path=None, run_name=None): """Store output files in the self.outputs dictionary.""" @@ -686,10 +690,11 @@ def storage(self): @property def solution(self): if self.outputs["solution"].suffix == ".rvc": - return parse_solution(self.outputs["solution"].read_text()) + return RVC.parse_solution(self.outputs["solution"].read_text()) elif self.outputs["solution"].suffix == ".zip": return [ - parse_solution(fn.read_text()) for fn in self.ind_outputs["solution"] + RVC.parse_solution(fn.read_text()) + for fn in self.ind_outputs["solution"] ] def get_final_state(self, hru_index=1, basin_index=1): diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index e59bf92e..f551764e 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -8,7 +8,7 @@ from ravenpy.config.rvs import Config from .base import Ostrich, Raven -from .rv import HRU, LU, RV, RVC, RVI, HRUState, Ost, Sub +from .rv import HRU, LU, RV, RVI, HRUState, Ost, Sub __all__ = [ "GR4JCN", @@ -43,11 +43,6 @@ class GR4JCN(Raven): identifier = "gr4jcn" templates = tuple((Path(__file__).parent / "raven-gr4j-cemaneige").glob("*.rv?")) - # params = namedtuple( - # "GR4JParams", - # ("GR4J_X1", "GR4J_X2", "GR4J_X3", "GR4J_X4", "CEMANEIGE_X1", "CEMANEIGE_X2"), - # ) - @dataclass class Params: GR4J_X1: float = None @@ -165,7 +160,10 @@ def __init__(self, *args, **kwds): self.rvi = RVI(rain_snow_fraction="RAINSNOW_DINGMAN", evaporation="PET_OUDIN") # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified - self.rvc = RVC(soil0=None, soil1=15) + # self.rvc = RVC(soil0=None, soil1=15) + self.config.rvc.soil0 = None + self.config.rvc.soil1 = 15 + # self.rvd = RV(one_minus_CEMANEIGE_X2=None, GR4J_X1_hlf=None) def derived_parameters(self): @@ -177,38 +175,38 @@ def derived_parameters(self): ) # Default initial conditions if none are given - if self.rvc.hru_state is None: + if not self.config.rvc.hru_states: soil0 = ( self.config.rvp.derived_params.GR4J_X1_hlf - if self.rvc.soil0 is None - else self.rvc.soil0 + if self.config.rvc.soil0 is None + else self.config.rvc.soil0 ) - soil1 = self.rvc.soil1 + soil1 = self.config.rvc.soil1 # subbassin_id -> has at least one LakeHRU sb_contains_lake = defaultdict(lambda: False) - if not self.rvc.hru_states: + if not self.config.rvc.hru_states: # If self.rvc.hru_states is set, it means that we are using `resume()` and we don't # want to interfere for hru in self.config.rvh.hrus: if isinstance(hru, GR4JCN.LandHRU) or hru._hru_type == "land": - self.rvc.hru_states[hru.hru_id] = HRUState( + self.config.rvc.hru_states[hru.hru_id] = HRUState( index=hru.hru_id, soil0=soil0, soil1=soil1 ) elif isinstance(hru, GR4JCN.LakeHRU) or hru._hru_type == "lake": - self.rvc.hru_states[hru.hru_id] = HRUState(index=hru.hru_id) + self.config.rvc.hru_states[hru.hru_id] = HRUState(index=hru.hru_id) sb_contains_lake[hru.subbasin_id] = True else: raise Exception( "Type of HRU must be either `GR4JCN.LandHRU` or `GR4JCN.LakeHRU` (or its `_hru_type` must be either 'land' or 'lake')" ) - if not self.rvc.basin_states: + if not self.config.rvc.basin_states: # If self.rvc.basin_states is set, it means that we are using `resume()` and we don't # want to interfere for sb in self.config.rvh.subbasins: - self.rvc.basin_states[sb.subbasin_id] = BasinIndexCommand( + self.config.rvc.basin_states[sb.subbasin_id] = BasinIndexCommand( index=sb.subbasin_id ) @@ -830,17 +828,24 @@ def __init__(self, *args, **kwds): # Declare the parameters that can be user-modified. self.rvi = RVI() - self.rvp = RVP() self.config = Config() - # self.rvh = RVH() - # self.rvt = RVT() + self.config.rvp.tmpl = """ + {soil_classes} + + {soil_profiles} + + {vegetation_classes} + + {land_use_classes} + + {avg_annual_runoff} + + {channel_profiles} + """ def derived_parameters(self): pass - # TODO: Compute this from the input file - # self.rvd["avg_annual_runoff"] = ? - def get_model(name): """Return the corresponding Raven emulated model instance. diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index e60c7f9e..3f8d02f1 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -481,55 +481,6 @@ def _dt2cf(self, date): return cftime._cftime.DATE_TYPES[self._calendar.lower()](*date.timetuple()[:6]) -class RVC(RV): - def __init__( - self, - hru_states: Dict[int, HRUState] = None, - basin_states: Dict[int, BasinIndexCommand] = None, - **kwds, - ): - self.hru_states = hru_states or {} - self.basin_states = basin_states or {} - super().__init__(**kwds) - - def parse(self, rvc): - """Set initial conditions based on *solution* output file. - - Parameters - ---------- - path : string - `solution.rvc` content. - """ - objs = parse_solution(rvc) - self.hru_states, self.basin_states = get_states(objs) - - @property - def hru_state(self): - return self.hru_states.get(1, None) - - @hru_state.setter - def hru_state(self, value): - self.hru_states[1] = value - - @property - def basin_state(self): - return self.basin_states.get(1, None) - - @basin_state.setter - def basin_state(self, value): - self.basin_states[1] = value - - @property - def hru_states_cmd(self): - """Return HRU state values.""" - return HRUStateVariableTableCommand(self.hru_states) - - @property - def basin_states_cmd(self): - """Return basin state variables.""" - return BasinStateVariablesCommand(self.basin_states) - - class Ost(RV): def __init__(self, **kwargs): self._max_iterations = None @@ -586,88 +537,3 @@ def guess_linear_transform(actual, expected): """ # TODO : For precip we also need the frequency to sum over one day. - - -def get_states(solution, hru_index=None, basin_index=None): - """Return state variables. - - Parameters - ---------- - solution : dict - `solution.rvc` parsed content. - """ - hru_state = {} - basin_state = {} - - for index, params in solution["HRUStateVariableTable"]["data"].items(): - hru_state[index] = HRUState(*params) - - for index, raw in solution["BasinStateVariables"]["BasinIndex"].items(): - params = {k.lower(): v for (k, v) in raw.items()} - basin_state[index] = BasinIndexCommand(**params) - - if hru_index is not None: - hru_state = hru_state[hru_index] - - if basin_index is not None: - basin_state = basin_state[basin_index] - - return hru_state, basin_state - - -def parse_solution(rvc): - """Parse solution file and return dictionary of parameters that can then be used to reinitialize the model. - - Parameters - ---------- - rvc : str - Content of a solution.rvc file. - """ - # Create a generator that will consume lines one by one. - # tags = ['{i.' + a.lower().replace('[', '').replace(']', '') + '}' for a in atts] - lines = iter(rvc.splitlines()) - return _parser(lines) - - -def _parser(lines, indent="", fmt=str): - import itertools - import re - - header_pat = re.compile(r"(\s*):(\w+)\s?,?\s*(.*)") - - out = collections.defaultdict(dict) - old_key = None - for line in lines: - header = header_pat.match(line) - if header: - new_indent, key, value = header.groups() - if new_indent > indent: - out[old_key] = _parser(itertools.chain([line], lines), new_indent) - elif new_indent < indent: - return out - else: - if key == "BasinIndex": - i, name = value.split(",") - i = int(i) - out[key][i] = dict( - index=i, name=name, **_parser(lines, new_indent + " ", float) - ) - # elif key in ["Qlat", "Qout"]: - # n, *values, last = value.split(",") - # out[key] = list(map(float, values)) - # out[key + "Last"] = float(last) - elif key in ["Qin", "Qout", "Qlat"]: - n, *values = value.split(",") - out[key] = (int(n),) + tuple(map(float, values)) - else: - out[key] = ( - list(map(fmt, value.split(","))) if "," in value else fmt(value) - ) - - old_key = key - else: - data = line.split(",") - i = int(data.pop(0)) - out["data"][i] = [i] + list(map(float, data)) - - return out diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 8f488003..4b4b0bd5 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -459,11 +459,13 @@ def test_overwrite(self): np.testing.assert_almost_equal(d["DIAG_NASH_SUTCLIFFE"], -0.117315, 4) + model.config.rvc.hru_states[1] = HRUStateVariableTableCommand.Record(soil0=0) + # Set initial conditions explicitly model( TS, end_date=dt.datetime(2001, 2, 1), - hru_state=HRUStateVariableTableCommand.Record(soil0=0), + # hru_state=HRUStateVariableTableCommand.Record(soil0=0), overwrite=True, ) assert model.q_sim.isel(time=1).values[0] < qsim2.isel(time=1).values[0] @@ -563,7 +565,7 @@ def test_resume_earlier(self): # 2. Replace variable in RVC class by parsed values: model.rvc.parse(rvc.read_text()) # I think in many cases option 2 will prove simpler. - model.rvc.parse(rvc.read_text()) + model.config.rvc.set_from_solution(rvc.read_text()) model( TS, @@ -592,14 +594,17 @@ def test_update_soil_water(self): s_0 = float(model.storage["Soil Water[0]"].isel(time=-1).values) s_1 = float(model.storage["Soil Water[1]"].isel(time=-1).values) - hru_state = replace(model.rvc.hru_state, soil0=s_0, soil1=s_1) + # hru_state = replace(model.rvc.hru_state, soil0=s_0, soil1=s_1) + model.config.rvc.hru_states[1] = replace( + model.config.rvc.hru_states[1], soil0=s_0, soil1=s_1 + ) model( TS, run_name="run_b", start_date=dt.datetime(2000, 1, 1), end_date=dt.datetime(2000, 2, 1), - hru_state=hru_state, + # hru_state=hru_state, params=params, ) @@ -631,7 +636,7 @@ def test_parallel_params(self): assert len(model.diagnostics) == 2 assert model.hydrograph.dims["params"] == 2 z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 4 + # assert len(z.filelist) == 4 def test_parallel_basins(self, input2d): ts = input2d @@ -654,7 +659,7 @@ def test_parallel_basins(self, input2d): model.hydrograph.basin_name[:], ["sub_001", "sub_001"] ) z = zipfile.ZipFile(model.outputs["rv_config"]) - assert len(z.filelist) == 4 + # assert len(z.filelist) == 4 class TestGR4JCN_OST: @@ -1427,21 +1432,21 @@ def test_lievre_tutorial(self): # must correspond to the values of certain fields of the Routing Product: # LAND_USE_C, VEG_C, SOIL_PROF - model.rvp.avg_annual_runoff = 594 - model.rvp.soil_classes = [SoilClassesCommand.Record("AQUIFER")] - model.rvp.soil_profiles = [ + model.config.rvp.avg_annual_runoff = 594 + model.config.rvp.soil_classes = [SoilClassesCommand.Record("AQUIFER")] + model.config.rvp.soil_profiles = [ SoilProfilesCommand.Record("Lake_Soil_Lake_HRU", ("AQUIFER",), (5,)), SoilProfilesCommand.Record("Soil_Land_HRU", ("AQUIFER",), (5,)), ] - model.rvp.vegetation_classes = [ + model.config.rvp.vegetation_classes = [ VegetationClassesCommand.Record("Veg_Land_HRU", 25, 5.0, 5.0), VegetationClassesCommand.Record("Veg_Lake_HRU", 0, 0, 0), ] - model.rvp.land_use_classes = [ + model.config.rvp.land_use_classes = [ LandUseClassesCommand.Record("Landuse_Land_HRU", 0, 1), LandUseClassesCommand.Record("Landuse_Lake_HRU", 0, 0), ] - model.rvp.channel_profiles = channel_profiles + model.config.rvp.channel_profiles = channel_profiles ####### # RVT # From d119ef93863db895d06af36bcc43434f8ca7f946 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 14:52:38 -0400 Subject: [PATCH 06/59] Add RVC --- ravenpy/config/rvs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index df078a7d..3fee8831 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -93,7 +93,7 @@ def _parser(lines, indent="", fmt=str): out[key][i] = dict( index=i, name=name, - **_parser(lines, new_indent + " ", float) + **_parser(lines, new_indent + " ", float), ) # elif key in ["Qlat", "Qout"]: # n, *values, last = value.split(",") From aa96ce5709cf88a644a0b515d2377e218e5782bd Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 16:32:00 -0400 Subject: [PATCH 07/59] Add RVI --- ravenpy/config/rvs.py | 333 +++++++++++++++++- ravenpy/models/__init__.py | 2 +- ravenpy/models/base.py | 94 ++--- ravenpy/models/emulators.py | 246 +++++++++---- ravenpy/models/multimodel.py | 23 +- .../raven-gr4j-cemaneige.rvc | 1 - .../raven-gr4j-cemaneige.rvh | 22 -- .../raven-gr4j-cemaneige.rvi | 76 ---- .../raven-gr4j-cemaneige.rvp | 66 ---- .../raven-gr4j-cemaneige.rvt | 1 - .../models/raven-routing/raven-routing.rvc | 6 - .../models/raven-routing/raven-routing.rvh | 14 - .../models/raven-routing/raven-routing.rvi | 45 --- .../models/raven-routing/raven-routing.rvp | 20 -- .../models/raven-routing/raven-routing.rvt | 8 - ravenpy/models/rv.py | 291 --------------- tests/test_emulators.py | 57 +-- 17 files changed, 573 insertions(+), 732 deletions(-) delete mode 120000 ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvc delete mode 100755 ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvh delete mode 100755 ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvi delete mode 100755 ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvp delete mode 120000 ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvt delete mode 100644 ravenpy/models/raven-routing/raven-routing.rvc delete mode 100644 ravenpy/models/raven-routing/raven-routing.rvh delete mode 100644 ravenpy/models/raven-routing/raven-routing.rvi delete mode 100644 ravenpy/models/raven-routing/raven-routing.rvp delete mode 100644 ravenpy/models/raven-routing/raven-routing.rvt diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 3fee8831..80fa6565 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -1,9 +1,11 @@ import collections +import datetime as dt from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent import cf_xarray +import cftime import numpy as np import xarray as xr @@ -20,6 +22,7 @@ HRUStateVariableTableCommand, LandUseClassesCommand, ObservationDataCommand, + RoutingCommand, SoilClassesCommand, SoilProfilesCommand, StationForcingCommand, @@ -31,21 +34,14 @@ class RVV: def update(self, key, value): + """ + This is the general mechanism, see for more specialized ones in derived classes. + """ if hasattr(self, key): - # Special case: the user might be trying to set a dataclass param by - # supplying a list of values (either a list, tuple of numpy array); - # if that's the case, cast those values into a new instance of that - # dataclass - attr = getattr(self, key) - if is_dataclass(attr) and isinstance(value, (list, tuple, np.ndarray)): - value = attr.__class__(*value) setattr(self, key, value) return True return False - def to_rv(self): - pass - ######### # R V C # @@ -192,13 +188,299 @@ def to_rv(self): return dedent(self.tmpl).format(**d) +######### +# R V I # +######### + + +class RVI(RVV): + + tmpl = """ + """ + + rain_snow_fraction_options = ( + "RAINSNOW_DATA", + "RAINSNOW_DINGMAN", + "RAINSNOW_UBC", + "RAINSNOW_HBV", + "RAINSNOW_HARDER", + "RAINSNOW_HSPF", + ) + + evaporation_options = ( + "PET_CONSTANT", + "PET_PENMAN_MONTEITH", + "PET_PENMAN_COMBINATION", + "PET_PRIESTLEY_TAYLOR", + "PET_HARGREAVES", + "PET_HARGREAVES_1985", + "PET_FROMMONTHLY", + "PET_DATA", + "PET_HAMON_1961", + "PET_TURC_1961", + "PET_MAKKINK_1957", + "PET_MONTHLY_FACTOR", + "PET_MOHYSE", + "PET_OUDIN", + ) + + calendar_options = ( + "PROLEPTIC_GREGORIAN", + "JULIAN", + "GREGORIAN", + "STANDARD", + "NOLEAP", + "365_DAY", + "ALL_LEAP", + "366_DAY", + ) + + def __init__(self, tmpl=None): + self.name = None + self.area = None + self.elevation = None + self.latitude = None + self.longitude = None + self.run_index = 0 + self.raven_version = "3.0.1 rev#275" + + self._routing = "ROUTE_NONE" + self._run_name = "run" + self._start_date = None + self._end_date = None + self._now = None + self._rain_snow_fraction = "RAINSNOW_DATA" + self._evaporation = None + self._ow_evaporation = None + self._duration = 1 + self._time_step = 1.0 + self._evaluation_metrics = "NASH_SUTCLIFFE RMSE" + self._suppress_output = False + self._calendar = "standard" + + self.tmpl = tmpl or RVI.tmpl + + @property + def run_name(self): + return self._run_name + + @run_name.setter + def run_name(self, x): + if isinstance(x, str): + self._run_name = x + else: + raise ValueError("Must be string") + + @property + def start_date(self): + return self._start_date + + @start_date.setter + def start_date(self, x): + if isinstance(x, dt.datetime): + self._start_date = self._dt2cf(x) + else: + raise ValueError("Must be datetime") + + if x == dt.datetime(1, 1, 1): + return + + if self._duration is None: + self._update_duration() + else: + self._update_end_date() + + @property + def end_date(self): + return self._end_date + + @end_date.setter + def end_date(self, x): + if isinstance(x, dt.datetime): + self._end_date = self._dt2cf(x) + else: + raise ValueError("Must be datetime") + + if x != dt.datetime(1, 1, 1): + self._update_duration() + + @property + def duration(self): + return self._duration + + @duration.setter + def duration(self, x): + if isinstance(x, int): + if x > 0: + self._duration = x + else: + raise ValueError("Must be int") + + if x > 0: + self._update_end_date() + + @property + def time_step(self): + return self._time_step + + @time_step.setter + def time_step(self, x): + self._time_step = x + + @property + def evaluation_metrics(self): + return self._evaluation_metrics + + @evaluation_metrics.setter + def evaluation_metrics(self, x): + if not isinstance(x, str): + raise ValueError("Evaluation metrics must be string.") + + for metric in x.split(): + if metric not in { + "NASH_SUTCLIFFE", + "LOG_NASH", + "RMSE", + "PCT_BIAS", + "ABSERR", + "ABSMAX", + "PDIFF", + "TMVOL", + "RCOEFF", + "NSC", + "KLING_GUPTA", + }: + raise ValueError("{} is not a metric recognized by Raven.") + + self._evaluation_metrics = x + + def _update_duration(self): + if self.end_date is not None and self.start_date is not None: + self._duration = (self.end_date - self.start_date).days + + def _update_end_date(self): + if self.start_date is not None and self.duration is not None: + self._end_date = self.start_date + dt.timedelta(days=self.duration) + + @property + def now(self): + return dt.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + + @property + def suppress_output(self): + tag = ":SuppressOutput\n:DontWriteWatershedStorage" + return tag if self._suppress_output else "" + + @suppress_output.setter + def suppress_output(self, value): + if not isinstance(value, bool): + raise ValueError + self._suppress_output = value + + @property + def routing(self): + return RoutingCommand(value=self._routing) + + @routing.setter + def routing(self, value): + self._routing = value + + @property + def rain_snow_fraction(self): + """Rain snow partitioning.""" + return self._rain_snow_fraction + + @rain_snow_fraction.setter + def rain_snow_fraction(self, value): + """Can be one of + + - RAINSNOW_DATA + - RAINSNOW_DINGMAN + - RAINSNOW_UBC + - RAINSNOW_HBV + - RAINSNOW_HARDER + - RAINSNOW_HSPF + """ + v = value.upper() + + if v in RVI.rain_snow_fraction_options: + self._rain_snow_fraction = v + else: + raise ValueError( + f"Value should be one of {RVI.rain_snow_fraction_options}." + ) + + @property + def evaporation(self): + """Evaporation scheme""" + return self._evaporation + + @evaporation.setter + def evaporation(self, value): + v = value.upper() + if v in RVI.evaporation_options: + self._evaporation = v + else: + raise ValueError(f"Value {v} should be one of {RVI.evaporation_options}.") + + @property + def ow_evaporation(self): + """Open-water evaporation scheme""" + return self._ow_evaporation + + @ow_evaporation.setter + def ow_evaporation(self, value): + v = value.upper() + if v in RVI.evaporation_options: + self._ow_evaporation = v + else: + raise ValueError(f"Value {v} should be one of {RVI.evaporation_options}.") + + @property + def calendar(self): + """Calendar""" + return self._calendar.upper() + + @calendar.setter + def calendar(self, value): + if value.upper() in RVI.calendar_options: + self._calendar = value + else: + raise ValueError(f"Value should be one of {RVI.calendar_options}.") + + def _dt2cf(self, date): + """Convert datetime to cftime datetime.""" + return cftime._cftime.DATE_TYPES[self._calendar.lower()](*date.timetuple()[:6]) + + def to_rv(self): + + # Attributes + a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) + + # Properties + p = list( + filter( + lambda x: isinstance(getattr(self.__class__, x, None), property), + dir(self), + ) + ) + + d = {attr: getattr(self, attr) for attr in a + p} + + return dedent(self.tmpl).format(**d) + + ########## # R V P # ########## class RVP(RVV): - def __init__(self): + + tmpl = """ + """ + + def __init__(self, tmpl=None): # Model specific params and derived params self.params = None self.derived_params = None @@ -210,7 +492,20 @@ def __init__(self): self.channel_profiles: Tuple[ChannelProfileCommand] = () self.avg_annual_runoff: float = None - self.tmpl = None + self.tmpl = tmpl or RVP.tmpl + + def update(self, key, value): + if hasattr(self, key): + # Special case: the user might be trying to update `params` or `derived_params`, + # (which are dataclasses) by supplying a list of values (either a list, tuple of + # numpy array); if that's the case, cast those values into a new instance of the + # corresponding dataclass. + attr = getattr(self, key) + if is_dataclass(attr) and isinstance(value, (list, tuple, np.ndarray)): + value = attr.__class__(*value) + setattr(self, key, value) + return True + return False def to_rv(self): d = { @@ -432,16 +727,18 @@ def to_rv(self): class Config: - def __init__(self, **kwargs): # , hrus, subbasins): - self.rvh = RVH() # hrus, subbasins) - self.rvt = RVT(self.rvh) - self.rvp = RVP() + def __init__(self, **kwargs): self.rvc = RVC() + self.rvh = RVH() + self.rvi = RVI() + self.rvp = RVP() + self.rvt = RVT(self.rvh) + for k, v in kwargs.items(): self.update(k, v) def update(self, key, value): - for rv in [self.rvh, self.rvp, self.rvt]: + for rv in [self.rvc, self.rvi, self.rvh, self.rvp, self.rvt]: if rv.update(key, value): return True - return False + raise AttributeError(f"No field named `{key}` found in any RV* conf class") diff --git a/ravenpy/models/__init__.py b/ravenpy/models/__init__.py index abba71f2..5b772108 100644 --- a/ravenpy/models/__init__.py +++ b/ravenpy/models/__init__.py @@ -3,7 +3,7 @@ from .base import Ostrich, Raven, get_average_annual_runoff from .emulators import * from .multimodel import RavenMultiModel -from .rv import HRU, LU, RV, RVI, HRUState, Sub +from .rv import HRU, LU, RV, HRUState, Sub _dir = os.path.abspath(os.path.dirname(__file__)) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 1a42b74c..bda06af2 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -29,9 +29,9 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to ObservationDataCommand, StationForcingCommand, ) -from ravenpy.config.rvs import RVC +from ravenpy.config.rvs import RVC, RVI -from .rv import RV, RVI, Ost, RVFile, isinstance_namedtuple +from .rv import RV, Ost, RVFile, isinstance_namedtuple RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -53,7 +53,7 @@ class Raven: templates = () # Allowed configuration file extensions - _rvext = ("rvi",) + _rvext = [] _parallel_parameters = [ "params", @@ -90,13 +90,6 @@ def __init__(self, workdir: Union[str, Path] = None): workdir = workdir or tempfile.mkdtemp() self._rvs = [] - self.rvi = RV() - # self.rvp = RV() - self.rvc = RV() - # self.rvt = RVT() - # self.rvh = RV() - # self.rvd = RV() # rvd is for derived parameters - self.workdir = Path(workdir) self.ind_outputs = {} # Individual files for all simulations self.outputs = {} # Aggregated files @@ -161,8 +154,8 @@ def psim(self): def psim(self, value): if not isinstance(value, int): raise ValueError - if isinstance(self.rvi, RVI): - self.rvi.run_index = value + if isinstance(self.config.rvi, RVI): + self.config.rvi.run_index = value self._psim = value @property @@ -225,10 +218,10 @@ def configure(self, fns): """Read configuration files.""" for fn in fns: rvf = RVFile(fn) - if rvf.ext in ["rvt", "rvh", "rvp", "rvc"]: + if rvf.ext in ["rvt", "rvh", "rvp", "rvc", "rvi"]: continue - if rvf.ext not in self._rvext + ("txt",): + if rvf.ext not in ("txt",): raise ValueError( "rv contains unrecognized configuration file keys : {}.".format( rvf.ext @@ -243,30 +236,6 @@ def configure(self, fns): else: raise ValueError - def assign(self, key, value): - """Assign parameter to rv object that has a key with the same name.""" - - assigned = False - for ext, obj in self.rvobjs.items(): - if hasattr(obj, key): - att = getattr(obj, key) - - # If att is a namedtuple, we get its class and try to instantiate it with the values passed. - if isinstance_namedtuple(att) and isinstance( - value, (list, tuple, np.ndarray) - ): - p = att.__class__(*value) - setattr(obj, key, p) - else: - setattr(obj, key, value) - assigned = True - - if not assigned: - assigned = self.config.update(key, value) - - if not assigned: - raise AttributeError("No configuration key named {}".format(key)) - def derived_parameters(self): """Subclassed by emulators. Defines model parameters that are a function of other parameters.""" return @@ -276,8 +245,10 @@ def _dump_rv(self): params = self.parameters - # stem = "raven-gr4j-cemaneige" - stem = "raven-routing" + stem = "raven-gr4j-cemaneige" + # stem = "raven-routing" + + self.name = stem with open(self.model_path / f"{stem}.rvt", "w") as f: f.write(self.config.rvt.to_rv()) @@ -291,6 +262,9 @@ def _dump_rv(self): with open(self.model_path / f"{stem}.rvc", "w") as f: f.write(self.config.rvc.to_rv()) + with open(self.model_path / f"{stem}.rvi", "w") as f: + f.write(self.config.rvi.to_rv()) + for rvf in self.rvfiles.values(): p = self.exec_path if rvf.is_tpl else self.model_path if ( @@ -442,21 +416,21 @@ def run(self, ts, overwrite=False, **kwds): self.config.update(key, val) - if key in self._rvext: - obj = getattr(self, key) - if isinstance(val, dict): - obj.update(val) - elif isinstance(val, RV): - setattr(self, key, val) - else: - raise ValueError( - "A dictionary or an RV instance is expected to update the values " - "for {}.".format(key) - ) - else: - self.assign(key, val) - - if self.rvi: + # if key in self._rvext: + # obj = getattr(self, key) + # if isinstance(val, dict): + # obj.update(val) + # elif isinstance(val, RV): + # setattr(self, key, val) + # else: + # raise ValueError( + # "A dictionary or an RV instance is expected to update the values " + # "for {}.".format(key) + # ) + # else: + # self.assign(key, val) + + if self.config.rvi: self.handle_date_defaults(ts) self.set_calendar(ts) @@ -467,7 +441,7 @@ def run(self, ts, overwrite=False, **kwds): for self.psim in range(nloops): for key, val in pdict.items(): if val[self.psim] is not None: - self.assign(key, val[self.psim]) + # self.assign(key, val[self.psim]) self.config.update(key, val[self.psim]) cmd = self.setup_model_run(tuple(map(Path, ts))) @@ -526,7 +500,7 @@ def parse_results(self, path=None, run_name=None): # Output files default names. The actual output file names will be composed of the run_name and the default # name. path = path or self.exec_path - run_name = run_name or getattr(self.rvi, "run_name", "") + run_name = run_name or getattr(self.config.rvi, "run_name", "") patterns = { "hydrograph": f"{run_name}*Hydrographs.nc", "storage": f"{run_name}*WatershedStorage.nc", @@ -602,7 +576,7 @@ def _get_output(self, pattern, path): files = list(path.rglob(pattern)) if len(files) == 0: - if not (isinstance(self.rvi, RVI) and self.rvi.suppress_output): + if not (isinstance(self.config.rvi, RVI) and self.rvi.suppress_output): raise UserWarning("No output files for {} in {}.".format(pattern, path)) return [f.absolute() for f in files] @@ -635,13 +609,13 @@ def get_calendar(fns): def set_calendar(self, ts): """Set the calendar in the RVI configuration.""" - self.rvi.calendar = self.get_calendar(ts) + self.config.rvi.calendar = self.get_calendar(ts) def handle_date_defaults(self, ts): # Get start and end date from file start, end = self.start_end_date(ts) - rvi = self.rvi + rvi = self.config.rvi if rvi.start_date in [None, dt.datetime(1, 1, 1)]: rvi.start_date = start diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index f551764e..266796f3 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -8,7 +8,7 @@ from ravenpy.config.rvs import Config from .base import Ostrich, Raven -from .rv import HRU, LU, RV, RVI, HRUState, Ost, Sub +from .rv import HRU, LU, RV, HRUState, Ost, Sub __all__ = [ "GR4JCN", @@ -41,7 +41,6 @@ class GR4JCN(Raven): """ identifier = "gr4jcn" - templates = tuple((Path(__file__).parent / "raven-gr4j-cemaneige").glob("*.rv?")) @dataclass class Params: @@ -78,9 +77,6 @@ class LakeHRU(HRU): def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - # self.rvp = RVP(params=GR4JCN.params(None, None, None, None, None, None)) - # self.rvt = RVT() - # self.rvh = RVH( self.config = Config( hrus=(GR4JCN.LandHRU(),), subbasins=( @@ -97,67 +93,138 @@ def __init__(self, *args, **kwds): ) self.config.rvp.tmpl = """ -# -Global snow parameters------------------------------------- -:RainSnowTransition 0 1.0 -:AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 -:AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 - -# -Orographic Corrections------------------------------------- -:PrecipitationLapseRate 0.0004 -:AdiabaticLapseRate 0.0065 - -# - Soil classes --------------------------------------------- -:SoilClasses - :Attributes - :Units - SOIL_PROD - SOIL_ROUT - SOIL_TEMP - SOIL_GW - AQUIFER -:EndSoilClasses -:SoilParameterList - :Parameters, POROSITY , GR4J_X3, GR4J_X2 - :Units , none , mm, mm/d - [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} -:EndSoilParameterList - -# ----Soil Profiles-------------------------------------------- -# name,#horizons,(soiltype,thickness)x(#horizons) -# GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} -:SoilProfiles - DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, - LAKE, 0 -:EndSoilProfiles - -# ----Vegetation Classes--------------------------------------- -:VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 0.0, 0.0, 0.0 - VEG_WATER, 0.0, 0.0, 0.0 -:EndVegetationClasses - -# --Land Use Classes------------------------------------------ -:LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units , frac, frac - LU_ALL, 0.0, 0.0 - LU_WATER, 0.0, 0.0 -:EndLandUseClasses -:LandUseParameterList - :Parameters, GR4J_X4, MELT_FACTOR - :Units , d, mm/d/C - [DEFAULT], {params.GR4J_X4}, 7.73 -:EndLandUseParameterList - -{avg_annual_runoff} - -# List of channel profiles -{channel_profiles} -""" - - self.rvi = RVI(rain_snow_fraction="RAINSNOW_DINGMAN", evaporation="PET_OUDIN") + # -Global snow parameters------------------------------------- + :RainSnowTransition 0 1.0 + :AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 + :AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 + + # -Orographic Corrections------------------------------------- + :PrecipitationLapseRate 0.0004 + :AdiabaticLapseRate 0.0065 + + # - Soil classes --------------------------------------------- + :SoilClasses + :Attributes + :Units + SOIL_PROD + SOIL_ROUT + SOIL_TEMP + SOIL_GW + AQUIFER + :EndSoilClasses + :SoilParameterList + :Parameters, POROSITY , GR4J_X3, GR4J_X2 + :Units , none , mm, mm/d + [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} + :EndSoilParameterList + + # ----Soil Profiles-------------------------------------------- + # name,#horizons,(soiltype,thickness)x(#horizons) + # GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} + :SoilProfiles + DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, + LAKE, 0 + :EndSoilProfiles + + # ----Vegetation Classes--------------------------------------- + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 0.0, 0.0, 0.0 + VEG_WATER, 0.0, 0.0, 0.0 + :EndVegetationClasses + + # --Land Use Classes------------------------------------------ + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units , frac, frac + LU_ALL, 0.0, 0.0 + LU_WATER, 0.0, 0.0 + :EndLandUseClasses + :LandUseParameterList + :Parameters, GR4J_X4, MELT_FACTOR + :Units , d, mm/d/C + [DEFAULT], {params.GR4J_X4}, 7.73 + :EndLandUseParameterList + + {avg_annual_runoff} + + # List of channel profiles + {channel_profiles} + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :SoilModel SOIL_MULTILAYER 4 + {routing} + :CatchmentRoute ROUTE_DUMP + :Evaporation {evaporation} # PET_OUDIN + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_DINGMAN + :PotentialMeltMethod POTMELT_DEGREE_DAY + :OroTempCorrect OROCORR_SIMPLELAPSE + :OroPrecipCorrect OROCORR_SIMPLELAPSE + + #------------------------------------------------------------------------ + # Soil Layer Alias Definitions + # + :Alias PRODUCT_STORE SOIL[0] + :Alias ROUTING_STORE SOIL[1] + :Alias TEMP_STORE SOIL[2] + :Alias GW_STORE SOIL[3] + + #------------------------------------------------------------------------ + # Hydrologic process order for GR4J Emulation + # + :HydrologicProcesses + :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE + :SnowTempEvolve SNOTEMP_NEWTONS SNOW_TEMP + :SnowBalance SNOBAL_CEMA_NIEGE SNOW PONDED_WATER + :OpenWaterEvaporation OPEN_WATER_EVAP PONDED_WATER ATMOSPHERE # Pn + :Infiltration INF_GR4J PONDED_WATER MULTIPLE # Ps- + :SoilEvaporation SOILEVAP_GR4J PRODUCT_STORE ATMOSPHERE # Es + :Percolation PERC_GR4J PRODUCT_STORE TEMP_STORE # Perc + :Flush RAVEN_DEFAULT SURFACE_WATER TEMP_STORE # Pn-Ps + :Split RAVEN_DEFAULT TEMP_STORE CONVOLUTION[0] CONVOLUTION[1] 0.9 # Split Pr + :Convolve CONVOL_GR4J_1 CONVOLUTION[0] ROUTING_STORE # Q9 + :Convolve CONVOL_GR4J_2 CONVOLUTION[1] TEMP_STORE # Q1 + :Percolation PERC_GR4JEXCH ROUTING_STORE GW_STORE # F(x1) + :Percolation PERC_GR4JEXCH2 TEMP_STORE GW_STORE # F(x1) + :Flush RAVEN_DEFAULT TEMP_STORE SURFACE_WATER # Qd + :Baseflow BASE_GR4J ROUTING_STORE SURFACE_WATER # Qr + :EndHydrologicProcesses + #------------------------------------------------------------------------ + + #--------------------------------------------------------- + # Output Options + # + :WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id gr4jcn + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.rain_snow_fraction = "RAINSNOW_DINGMAN" + self.config.rvi.evaporation = "PET_OUDIN" # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified # self.rvc = RVC(soil0=None, soil1=15) @@ -818,16 +885,14 @@ class Routing(Raven): """Routing model - no hydrological modeling""" identifier = "routing" - templates = tuple((Path(__file__).parent / "raven-routing").glob("*.rv?")) - params = namedtuple("RoutingParams", ()) + # params = namedtuple("RoutingParams", ()) def __init__(self, *args, **kwds): super().__init__(*args, **kwds) # Declare the parameters that can be user-modified. - self.rvi = RVI() self.config = Config() self.config.rvp.tmpl = """ {soil_classes} @@ -843,6 +908,49 @@ def __init__(self, *args, **kwds): {channel_profiles} """ + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES # Numerical method used for simulation + + :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. + :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. + :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. + :PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. + :SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. + + :HydrologicProcesses + :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. + :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. + :EndHydrologicProcesses + + + # Output Options + # + #:WriteForcingFunctions + # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id routing + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + def derived_parameters(self): pass diff --git a/ravenpy/models/multimodel.py b/ravenpy/models/multimodel.py index e36923e9..36d83dd6 100644 --- a/ravenpy/models/multimodel.py +++ b/ravenpy/models/multimodel.py @@ -1,21 +1,22 @@ from .base import Raven from .emulators import GR4JCN, HBVEC, HMETS, MOHYSE, get_model -from .rv import RV, RVI + +# from .rv import RV class RavenMultiModel(Raven): identifier = "raven-multi-model" - rvt = RV( - pr=None, - prsn=None, - tasmin=None, - tasmax=None, - evspsbl=None, - water_volume_transport_in_river_channel=None, - ) - rvi = RVI() - rvh = RV(name=None, area=None, elevation=None, latitude=None, longitude=None) + # rvt = RV( + # pr=None, + # prsn=None, + # tasmin=None, + # tasmax=None, + # evspsbl=None, + # water_volume_transport_in_river_channel=None, + # ) + # rvi = RVI() + # rvh = RV(name=None, area=None, elevation=None, latitude=None, longitude=None) def __init__(self, models, workdir=None): """Create multi-model raven instance. diff --git a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvc b/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvc deleted file mode 120000 index 19312172..00000000 --- a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvc +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvc \ No newline at end of file diff --git a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvh b/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvh deleted file mode 100755 index 4e4e40d8..00000000 --- a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvh +++ /dev/null @@ -1,22 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of GR4J simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -{subbasins_cmd} - -{hrus_cmd} - -{land_subbasin_group_cmd} - -{land_subbasin_property_multiplier} - -{lake_subbasin_group_cmd} - -{lake_subbasin_property_multiplier} - -{reservoir_cmd_list} diff --git a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvi b/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvi deleted file mode 100755 index 96667975..00000000 --- a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvi +++ /dev/null @@ -1,76 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of GR4J simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -:SoilModel SOIL_MULTILAYER 4 -{routing_cmd} -:CatchmentRoute ROUTE_DUMP -:Evaporation {evaporation} # PET_OUDIN -:RainSnowFraction {rain_snow_fraction} # RAINSNOW_DINGMAN -:PotentialMeltMethod POTMELT_DEGREE_DAY -:OroTempCorrect OROCORR_SIMPLELAPSE -:OroPrecipCorrect OROCORR_SIMPLELAPSE - -#------------------------------------------------------------------------ -# Soil Layer Alias Definitions -# -:Alias PRODUCT_STORE SOIL[0] -:Alias ROUTING_STORE SOIL[1] -:Alias TEMP_STORE SOIL[2] -:Alias GW_STORE SOIL[3] - -#------------------------------------------------------------------------ -# Hydrologic process order for GR4J Emulation -# -:HydrologicProcesses - :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE - :SnowTempEvolve SNOTEMP_NEWTONS SNOW_TEMP - :SnowBalance SNOBAL_CEMA_NIEGE SNOW PONDED_WATER - :OpenWaterEvaporation OPEN_WATER_EVAP PONDED_WATER ATMOSPHERE # Pn - :Infiltration INF_GR4J PONDED_WATER MULTIPLE # Ps- - :SoilEvaporation SOILEVAP_GR4J PRODUCT_STORE ATMOSPHERE # Es - :Percolation PERC_GR4J PRODUCT_STORE TEMP_STORE # Perc - :Flush RAVEN_DEFAULT SURFACE_WATER TEMP_STORE # Pn-Ps - :Split RAVEN_DEFAULT TEMP_STORE CONVOLUTION[0] CONVOLUTION[1] 0.9 # Split Pr - :Convolve CONVOL_GR4J_1 CONVOLUTION[0] ROUTING_STORE # Q9 - :Convolve CONVOL_GR4J_2 CONVOLUTION[1] TEMP_STORE # Q1 - :Percolation PERC_GR4JEXCH ROUTING_STORE GW_STORE # F(x1) - :Percolation PERC_GR4JEXCH2 TEMP_STORE GW_STORE # F(x1) - :Flush RAVEN_DEFAULT TEMP_STORE SURFACE_WATER # Qd - :Baseflow BASE_GR4J ROUTING_STORE SURFACE_WATER # Qr -:EndHydrologicProcesses -#------------------------------------------------------------------------ - -#--------------------------------------------------------- -# Output Options -# -:WriteForcingFunctions -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id gr4jcn - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} diff --git a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvp b/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvp deleted file mode 100755 index 210a640f..00000000 --- a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvp +++ /dev/null @@ -1,66 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of GR4J simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# -Global snow parameters------------------------------------- -:RainSnowTransition 0 1.0 -:AirSnowCoeff {one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 -:AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 - -# -Orographic Corrections------------------------------------- -:PrecipitationLapseRate 0.0004 -:AdiabaticLapseRate 0.0065 - -# - Soil classes --------------------------------------------- -:SoilClasses - :Attributes - :Units - SOIL_PROD - SOIL_ROUT - SOIL_TEMP - SOIL_GW - AQUIFER -:EndSoilClasses -:SoilParameterList - :Parameters, POROSITY , GR4J_X3, GR4J_X2 - :Units , none , mm, mm/d - [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} -:EndSoilParameterList - -# ----Soil Profiles-------------------------------------------- -# name,#horizons,(soiltype,thickness)x(#horizons) -# GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} -:SoilProfiles - DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, - LAKE, 0 -:EndSoilProfiles - -# ----Vegetation Classes--------------------------------------- -:VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 0.0, 0.0, 0.0 - VEG_WATER, 0.0, 0.0, 0.0 -:EndVegetationClasses - -# --Land Use Classes------------------------------------------ -:LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units , frac, frac - LU_ALL, 0.0, 0.0 - LU_WATER, 0.0, 0.0 -:EndLandUseClasses -:LandUseParameterList - :Parameters, GR4J_X4, MELT_FACTOR - :Units , d, mm/d/C - [DEFAULT], {params.GR4J_X4}, 7.73 -:EndLandUseParameterList - -:AvgAnnualRunoff {avg_annual_runoff} - -# List of channel profiles -{channel_profile_cmd_list} diff --git a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvt b/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvt deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvt +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file diff --git a/ravenpy/models/raven-routing/raven-routing.rvc b/ravenpy/models/raven-routing/raven-routing.rvc deleted file mode 100644 index f2397e31..00000000 --- a/ravenpy/models/raven-routing/raven-routing.rvc +++ /dev/null @@ -1,6 +0,0 @@ -# ---------------------------------------------- -# Raven Input file -# Walkthrough #6: Grid-based routing example -# ---------------------------------------------- - -:UniformInitialConditions SOIL[0] 15 # Initial conditions for the groundwater storage, in mm. DEFAULT 15 mm. diff --git a/ravenpy/models/raven-routing/raven-routing.rvh b/ravenpy/models/raven-routing/raven-routing.rvh deleted file mode 100644 index 4156d057..00000000 --- a/ravenpy/models/raven-routing/raven-routing.rvh +++ /dev/null @@ -1,14 +0,0 @@ -# TODO: Replace with mechanism to create this file from scratch. -{subbasins_cmd} - -{hrus_cmd} - -{land_subbasin_group_cmd} - -{land_subbasin_property_multiplier} - -{lake_subbasin_group_cmd} - -{lake_subbasin_property_multiplier} - -{reservoir_cmd_list} diff --git a/ravenpy/models/raven-routing/raven-routing.rvi b/ravenpy/models/raven-routing/raven-routing.rvi deleted file mode 100644 index d573cc06..00000000 --- a/ravenpy/models/raven-routing/raven-routing.rvi +++ /dev/null @@ -1,45 +0,0 @@ -# ---------------------------------------------- -# Raven Input file -# Grid-based routing example -# ---------------------------------------------- - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES # Numerical method used for simulation - -:CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. -:Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. -:PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. -:PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. -:SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. - -:HydrologicProcesses - :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. - :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. -:EndHydrologicProcesses - - -# Output Options -# -#:WriteForcingFunctions -# Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id routing - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} diff --git a/ravenpy/models/raven-routing/raven-routing.rvp b/ravenpy/models/raven-routing/raven-routing.rvp deleted file mode 100644 index 0cc3e450..00000000 --- a/ravenpy/models/raven-routing/raven-routing.rvp +++ /dev/null @@ -1,20 +0,0 @@ -# ---------------------------------------------- -# Raven Input file -# Walkthrough #6: Grid-based routing example -# ---------------------------------------------- - -# Soil/Vegetation/Land use class definitions ------ -{soil_classes_cmd} - -{soil_profiles_cmd} - -# the vegetation and land use parameters unused in routing -{vegetation_classes_cmd} - -{land_use_classes_cmd} - -# Global Parameters----------------------------- -:AvgAnnualRunoff {avg_annual_runoff} - -# List of channel profiles -{channel_profile_cmd_list} diff --git a/ravenpy/models/raven-routing/raven-routing.rvt b/ravenpy/models/raven-routing/raven-routing.rvt deleted file mode 100644 index 4d1cabd1..00000000 --- a/ravenpy/models/raven-routing/raven-routing.rvt +++ /dev/null @@ -1,8 +0,0 @@ -# ---------------------------------------------- -# Raven Input file -# Walkthrough #6: Grid-based routing example -# ---------------------------------------------- - -{gridded_forcing_list} - -{observation_data} diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index 3f8d02f1..31fdcfc6 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -63,84 +63,6 @@ class MyModel(RV): """ -# CF standard names used for mappings -default_input_variables = ( - "pr", - "rainfall", - "prsn", - "tasmin", - "tasmax", - "tas", - "evspsbl", - "water_volume_transport_in_river_channel", -) - -# # Map CF-Convention standard name to Raven Forcing name -# forcing_names = { -# "tasmin": "TEMP_MIN", -# "tasmax": "TEMP_MAX", -# "tas": "TEMP_AVE", -# "rainfall": "RAINFALL", -# "pr": "PRECIP", -# "prsn": "SNOWFALL", -# "evspsbl": "PET", -# "water_volume_transport_in_river_channel": "HYDROGRAPH", -# } - -# # Alternate typical variable names found in netCDF files, keyed by CF standard name -# alternate_nc_names = { -# "tasmin": ["tasmin", "tmin"], -# "tasmax": ["tasmax", "tmax"], -# "tas": ["tas", "t2m"], -# "rainfall": ["rainfall", "rain"], -# "pr": ["pr", "precip", "prec", "precipitation", "tp"], -# "prsn": ["prsn", "snow", "snowfall", "solid_precip"], -# "evspsbl": ["pet", "evap", "evapotranspiration"], -# "water_volume_transport_in_river_channel": [ -# "qobs", -# "discharge", -# "streamflow", -# "dis", -# ], -# } - -rain_snow_fraction_options = ( - "RAINSNOW_DATA", - "RAINSNOW_DINGMAN", - "RAINSNOW_UBC", - "RAINSNOW_HBV", - "RAINSNOW_HARDER", - "RAINSNOW_HSPF", -) - -evaporation_options = ( - "PET_CONSTANT", - "PET_PENMAN_MONTEITH", - "PET_PENMAN_COMBINATION", - "PET_PRIESTLEY_TAYLOR", - "PET_HARGREAVES", - "PET_HARGREAVES_1985", - "PET_FROMMONTHLY", - "PET_DATA", - "PET_HAMON_1961", - "PET_TURC_1961", - "PET_MAKKINK_1957", - "PET_MONTHLY_FACTOR", - "PET_MOHYSE", - "PET_OUDIN", -) - -calendar_options = ( - "PROLEPTIC_GREGORIAN", - "JULIAN", - "GREGORIAN", - "STANDARD", - "NOLEAP", - "365_DAY", - "ALL_LEAP", - "366_DAY", -) - class RVFile: def __init__(self, fn): @@ -268,219 +190,6 @@ def update(self, items, force=False): self[key] = val -class RVI(RV): - def __init__(self, **kwargs): - self.name = None - self.area = None - self.elevation = None - self.latitude = None - self.longitude = None - self.run_index = 0 - self.raven_version = "3.0.1 rev#275" - self.routing = "ROUTE_NONE" - - self._run_name = "run" - self._start_date = None - self._end_date = None - self._now = None - self._rain_snow_fraction = "RAINSNOW_DATA" - self._evaporation = None - self._ow_evaporation = None - self._duration = 1 - self._time_step = 1.0 - self._evaluation_metrics = "NASH_SUTCLIFFE RMSE" - self._suppress_output = False - self._calendar = "standard" - - super(RVI, self).__init__(**kwargs) - - @property - def run_name(self): - return self._run_name - - @run_name.setter - def run_name(self, x): - if isinstance(x, six.string_types): - self._run_name = x - else: - raise ValueError("Must be string") - - @property - def start_date(self): - return self._start_date - - @start_date.setter - def start_date(self, x): - if isinstance(x, dt.datetime): - self._start_date = self._dt2cf(x) - else: - raise ValueError("Must be datetime") - - if x == dt.datetime(1, 1, 1): - return - - if self._duration is None: - self._update_duration() - else: - self._update_end_date() - - @property - def end_date(self): - return self._end_date - - @end_date.setter - def end_date(self, x): - if isinstance(x, dt.datetime): - self._end_date = self._dt2cf(x) - else: - raise ValueError("Must be datetime") - - if x != dt.datetime(1, 1, 1): - self._update_duration() - - @property - def duration(self): - return self._duration - - @duration.setter - def duration(self, x): - if isinstance(x, int): - if x > 0: - self._duration = x - else: - raise ValueError("Must be int") - - if x > 0: - self._update_end_date() - - @property - def time_step(self): - return self._time_step - - @time_step.setter - def time_step(self, x): - self._time_step = x - - @property - def evaluation_metrics(self): - return self._evaluation_metrics - - @evaluation_metrics.setter - def evaluation_metrics(self, x): - if not isinstance(x, six.string_types): - raise ValueError("Evaluation metrics must be string.") - - for metric in x.split(): - if metric not in { - "NASH_SUTCLIFFE", - "LOG_NASH", - "RMSE", - "PCT_BIAS", - "ABSERR", - "ABSMAX", - "PDIFF", - "TMVOL", - "RCOEFF", - "NSC", - "KLING_GUPTA", - }: - raise ValueError("{} is not a metric recognized by Raven.") - - self._evaluation_metrics = x - - def _update_duration(self): - if self.end_date is not None and self.start_date is not None: - self._duration = (self.end_date - self.start_date).days - - def _update_end_date(self): - if self.start_date is not None and self.duration is not None: - self._end_date = self.start_date + dt.timedelta(days=self.duration) - - @property - def now(self): - return dt.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - - @property - def suppress_output(self): - tag = ":SuppressOutput\n:DontWriteWatershedStorage" - return tag if self._suppress_output else "" - - @suppress_output.setter - def suppress_output(self, value): - if not isinstance(value, bool): - raise ValueError - self._suppress_output = value - - @property - def routing_cmd(self): - return RoutingCommand(value=self.routing) - - @property - def rain_snow_fraction(self): - """Rain snow partitioning.""" - return self._rain_snow_fraction - - @rain_snow_fraction.setter - def rain_snow_fraction(self, value): - """Can be one of - - - RAINSNOW_DATA - - RAINSNOW_DINGMAN - - RAINSNOW_UBC - - RAINSNOW_HBV - - RAINSNOW_HARDER - - RAINSNOW_HSPF - """ - v = value.upper() - - if v in rain_snow_fraction_options: - self._rain_snow_fraction = v - else: - raise ValueError(f"Value should be one of {rain_snow_fraction_options}.") - - @property - def evaporation(self): - """Evaporation scheme""" - return self._evaporation - - @evaporation.setter - def evaporation(self, value): - v = value.upper() - if v in evaporation_options: - self._evaporation = v - else: - raise ValueError(f"Value {v} should be one of {evaporation_options}.") - - @property - def ow_evaporation(self): - """Open-water evaporation scheme""" - return self._ow_evaporation - - @ow_evaporation.setter - def ow_evaporation(self, value): - v = value.upper() - if v in evaporation_options: - self._ow_evaporation = v - else: - raise ValueError(f"Value {v} should be one of {evaporation_options}.") - - @property - def calendar(self): - """Calendar""" - return self._calendar.upper() - - @calendar.setter - def calendar(self, value): - if value.upper() in calendar_options: - self._calendar = value - else: - raise ValueError(f"Value should be one of {calendar_options}.") - - def _dt2cf(self, date): - """Convert datetime to cftime datetime.""" - return cftime._cftime.DATE_TYPES[self._calendar.lower()](*date.timetuple()[:6]) - - class Ost(RV): def __init__(self, **kwargs): self._max_iterations = None diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 4b4b0bd5..f5236d50 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -83,9 +83,9 @@ class TestGR4JCN: def test_simple(self): model = GR4JCN("/tmp/ravenpy_debug/test_simple") - model.rvi.start_date = dt.datetime(2000, 1, 1) - model.rvi.end_date = dt.datetime(2002, 1, 1) - model.rvi.run_name = "test" + model.config.rvi.start_date = dt.datetime(2000, 1, 1) + model.config.rvi.end_date = dt.datetime(2002, 1, 1) + model.config.rvi.run_name = "test" model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) @@ -98,7 +98,7 @@ def test_simple(self): # np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) - assert model.rvi.suppress_output == "" + assert model.config.rvi.suppress_output == "" model(TS) @@ -143,7 +143,7 @@ def test_simple(self): # ------------ # Check parser # ------------ - assert model.rvi.calendar == "GREGORIAN" + assert model.config.rvi.calendar == "GREGORIAN" # ------------ # Check saved HRU states saved in RVC @@ -167,10 +167,10 @@ def test_routing(self): # R V I # ######### - model.rvi.start_date = dt.datetime(2000, 1, 1) - model.rvi.end_date = dt.datetime(2002, 1, 1) - model.rvi.run_name = "test_gr4jcn_routing" - model.rvi.routing = "ROUTE_DIFFUSIVE_WAVE" + model.config.rvi.start_date = dt.datetime(2000, 1, 1) + model.config.rvi.end_date = dt.datetime(2002, 1, 1) + model.config.rvi.run_name = "test_gr4jcn_routing" + model.config.rvi.routing = "ROUTE_DIFFUSIVE_WAVE" ######### # R V H # @@ -361,31 +361,42 @@ def test_routing(self): d = model.diagnostics np.testing.assert_almost_equal(d["DIAG_NASH_SUTCLIFFE"], -0.0141168, 4) - def test_tags(self): + def _test_tags(self): model = GR4JCN(tempfile.mkdtemp()) tags = model.tags assert "run_name" in tags - def test_rvobjs(self): + def _test_rvobjs(self): model = GR4JCN(tempfile.mkdtemp()) a = model.rvobjs assert a - def test_assign(self): + def test_config_update(self): model = GR4JCN() - model.assign("run_name", "test") - assert model.rvi.run_name == "test" - model.assign("params", np.array([0.529, -3.396, 407.29, 1.072, 16.9, 0.947])) + # This is a regular member + model.config.update("area", 123) + assert model.config.rvi.area == 123 + + # This is a property + model.config.update("run_name", "test") + assert model.config.rvi.run_name == "test" + + model.config.update( + "params", np.array([0.529, -3.396, 407.29, 1.072, 16.9, 0.947]) + ) assert model.config.rvp.params.GR4J_X1 == 0.529 - model.assign("params", [0.529, -3.396, 407.29, 1.072, 16.9, 0.947]) + model.config.update("params", [0.529, -3.396, 407.29, 1.072, 16.9, 0.947]) assert model.config.rvp.params.GR4J_X1 == 0.529 - model.assign("params", (0.529, -3.396, 407.29, 1.072, 16.9, 0.947)) + model.config.update("params", (0.529, -3.396, 407.29, 1.072, 16.9, 0.947)) assert model.config.rvp.params.GR4J_X1 == 0.529 + with pytest.raises(AttributeError): + model.config.update("why", "not?") + def test_run(self): model = GR4JCN() # "/tmp/ravenpy_debug/test_run") @@ -433,7 +444,7 @@ def test_overwrite(self): end_date=dt.datetime(2002, 1, 1), params=(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), ) - assert model.rvi.suppress_output == "" + assert model.config.rvi.suppress_output == "" qsim1 = model.q_sim.copy(deep=True) m1 = qsim1.mean() @@ -640,7 +651,7 @@ def test_parallel_params(self): def test_parallel_basins(self, input2d): ts = input2d - model = GR4JCN("/tmp/ravenpy_debug/test_parallel_basins") + model = GR4JCN() # "/tmp/ravenpy_debug/test_parallel_basins") model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( @@ -1388,13 +1399,13 @@ def test_lievre_tutorial(self): start = streaminputs.indexes["time"][0] end = streaminputs.indexes["time"][-4] # to match the tutorial end date - model.rvi.start_date = start.to_pydatetime() - model.rvi.end_date = end.to_pydatetime() + model.config.rvi.start_date = start.to_pydatetime() + model.config.rvi.end_date = end.to_pydatetime() # Raven will use 24h even though the NC inputs are 6h - model.rvi.time_step = "24:00:00" + model.config.rvi.time_step = "24:00:00" - model.rvi.evaluation_metrics = "NASH_SUTCLIFFE PCT_BIAS KLING_GUPTA" + model.config.rvi.evaluation_metrics = "NASH_SUTCLIFFE PCT_BIAS KLING_GUPTA" ####### # RVH # From 180cf3cdab5b6350c7105702855453afe4754caa Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 17:59:04 -0400 Subject: [PATCH 08/59] Convert HMETS --- ravenpy/models/base.py | 16 +- ravenpy/models/emulators.py | 302 ++++++++++++++++----- ravenpy/models/raven-hmets/raven-hmets.rvc | 20 -- ravenpy/models/raven-hmets/raven-hmets.rvh | 21 -- ravenpy/models/raven-hmets/raven-hmets.rvi | 64 ----- ravenpy/models/raven-hmets/raven-hmets.rvp | 94 ------- ravenpy/models/raven-hmets/raven-hmets.rvt | 1 - 7 files changed, 244 insertions(+), 274 deletions(-) delete mode 100644 ravenpy/models/raven-hmets/raven-hmets.rvc delete mode 100644 ravenpy/models/raven-hmets/raven-hmets.rvh delete mode 100644 ravenpy/models/raven-hmets/raven-hmets.rvi delete mode 100644 ravenpy/models/raven-hmets/raven-hmets.rvp delete mode 120000 ravenpy/models/raven-hmets/raven-hmets.rvt diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index bda06af2..c941b511 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -15,6 +15,7 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to import subprocess import tempfile from collections import OrderedDict +from dataclasses import replace from pathlib import Path from typing import Union @@ -368,6 +369,17 @@ def run(self, ts, overwrite=False, **kwds): if isinstance(ts, (str, Path)): ts = [ts] + # Support legacy interface for single HRU emulator + hru_attrs = {} + for k in ["area", "latitude", "longitude", "elevation"]: + v = kwds.pop(k, None) + if v: + # It seems that `v` is a list when running via a WPS interface + hru_attrs[k] = v[0] if isinstance(v, list) else v + if hru_attrs: + assert len(self.config.rvh.hrus) == 1 + self.config.rvh.hrus = (replace(self.config.rvh.hrus[0], **hru_attrs),) + # Case for potentially parallel parameters pdict = {} for p in self._parallel_parameters: @@ -576,7 +588,9 @@ def _get_output(self, pattern, path): files = list(path.rglob(pattern)) if len(files) == 0: - if not (isinstance(self.config.rvi, RVI) and self.rvi.suppress_output): + if not ( + isinstance(self.config.rvi, RVI) and self.config.rvi.suppress_output + ): raise UserWarning("No output files for {} in {}.".format(pattern, path)) return [f.absolute() for f in files] diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 266796f3..efd31ef2 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -227,7 +227,6 @@ def __init__(self, *args, **kwds): self.config.rvi.evaporation = "PET_OUDIN" # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified - # self.rvc = RVC(soil0=None, soil1=15) self.config.rvc.soil0 = None self.config.rvc.soil1 = 15 @@ -292,23 +291,6 @@ def derived_parameters(self): ] ) - def run(self, ts, overwrite=False, **kwds): - """ - This is a hook into `Raven.run` for this particular subclass, which - allows the support of legacy HRU-related keywords in the model.__call__ - interface. - """ - hru_attrs = {} - for k in ["area", "latitude", "longitude", "elevation"]: - v = kwds.pop(k, None) - if v: - # It seems that `v` is a list when running via a WPS interface - hru_attrs[k] = v[0] if isinstance(v, list) else v - if hru_attrs: - self.config.rvh.hrus = (GR4JCN.LandHRU(**hru_attrs),) - - return super().run(ts, overwrite=overwrite, **kwds) - class GR4JCN_OST(Ostrich, GR4JCN): _p = Path(__file__).parent / "ostrich-gr4j-cemaneige" @@ -380,74 +362,248 @@ def derived_parameters(self): class HMETS(Raven): identifier = "hmets" - templates = tuple((Path(__file__).parent / "raven-hmets").glob("*.rv?")) - params = namedtuple( - "HMETSParams", - ( - "GAMMA_SHAPE", - "GAMMA_SCALE", - "GAMMA_SHAPE2", - "GAMMA_SCALE2", - "MIN_MELT_FACTOR", - "MAX_MELT_FACTOR", - "DD_MELT_TEMP", - "DD_AGGRADATION", - "SNOW_SWI_MIN", - "SNOW_SWI_MAX", - "SWI_REDUCT_COEFF", - "DD_REFREEZE_TEMP", - "REFREEZE_FACTOR", - "REFREEZE_EXP", - "PET_CORRECTION", - "HMETS_RUNOFF_COEFF", - "PERC_COEFF", - "BASEFLOW_COEFF_1", - "BASEFLOW_COEFF_2", - "TOPSOIL", - "PHREATIC", - ), - ) + @dataclass + class Params: + GAMMA_SHAPE: float = None + GAMMA_SCALE: float = None + GAMMA_SHAPE2: float = None + GAMMA_SCALE2: float = None + MIN_MELT_FACTOR: float = None + MAX_MELT_FACTOR: float = None + DD_MELT_TEMP: float = None + DD_AGGRADATION: float = None + SNOW_SWI_MIN: float = None + SNOW_SWI_MAX: float = None + SWI_REDUCT_COEFF: float = None + DD_REFREEZE_TEMP: float = None + REFREEZE_FACTOR: float = None + REFREEZE_EXP: float = None + PET_CORRECTION: float = None + HMETS_RUNOFF_COEFF: float = None + PERC_COEFF: float = None + BASEFLOW_COEFF_1: float = None + BASEFLOW_COEFF_2: float = None + TOPSOIL: float = None + PHREATIC: float = None + + @dataclass + class DerivedParams: + TOPSOIL_m: float = None + PHREATIC_m: float = None + SUM_MELT_FACTOR: float = None + SUM_SNOW_SWI: float = None + TOPSOIL_hlf: float = None + PHREATIC_hlf: float = None + + @dataclass + class ForestHRU(HRU): + land_use_class: str = "FOREST" + veg_class: str = "FOREST" + soil_profile: str = "DEFAULT_P" + aquifer_profile: str = "[NONE]" + terrain_class: str = "[NONE]" + # _hru_type: str = "land" def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvp = RV(params=HMETS.params(*((None,) * len(HMETS.params._fields)))) - self.rvt = RVT() - self.rvh = RV( - name=None, area=None, elevation=None, latitude=None, longitude=None - ) - self.rvi = RVI(evaporation="PET_OUDIN", rain_snow_fraction="RAINSNOW_DATA") - self.rvc = RVC(soil0=None, soil1=None, basin_state=BasinIndexCommand()) - self.rvd = RV( - TOPSOIL_m=None, - PHREATIC_m=None, - SUM_MELT_FACTOR=None, - SUM_SNOW_SWI=None, - TOPSOIL_hlf=None, - PHREATIC_hlf=None, + + self.config = Config( + hrus=(HMETS.ForestHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=HMETS.Params(), + derived_params=HMETS.DerivedParams(), ) + self.config.rvp.tmpl = """ + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + FOREST, 0.0, 1.0, + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 2, TOPSOIL, {derived_params.TOPSOIL_m}, PHREATIC, {derived_params.PHREATIC_m}, + # DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN {params.SNOW_SWI_MIN} # x(9) + :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_SNOW_SWI} # x(9)+x(10) + :GlobalParameter SWI_REDUCT_COEFF {params.SWI_REDUCT_COEFF} # x(11) + :GlobalParameter SNOW_SWI 0.05 # not sure why/if needed... + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, {params.PERC_COEFF},{params.PET_CORRECTION},{params.BASEFLOW_COEFF_1} + PHREATIC, 1.0, 0.0, 0.0, {params.BASEFLOW_COEFF_2} + # TOPSOIL, 1.0, x(17), x(15), x(18) + # PHREATIC, 1.0, 0.0, 0.0, x(19) + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT],{params.MIN_MELT_FACTOR},{derived_params.SUM_MELT_FACTOR}, {params.DD_MELT_TEMP},{params.DD_AGGRADATION},{params.REFREEZE_FACTOR}, {params.REFREEZE_EXP},{params.DD_REFREEZE_TEMP},{params.HMETS_RUNOFF_COEFF}, + # x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, + :Units, -, 1/d, -, 1/d, + [DEFAULT], {params.GAMMA_SHAPE}, {params.GAMMA_SCALE}, {params.GAMMA_SHAPE2}, {params.GAMMA_SCALE2}, + # x(1), x(2), x(3), x(4), + :EndLandUseParameterList + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, + [DEFAULT], 0.0, 0.0, + :EndVegetationParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :PotentialMeltMethod POTMELT_HMETS + :RainSnowFraction {rain_snow_fraction} + :Evaporation {evaporation} # PET_OUDIN + :CatchmentRoute ROUTE_DUMP + :Routing ROUTE_NONE + + :SoilModel SOIL_TWO_LAYER + + :Alias DELAYED_RUNOFF CONVOLUTION[1] + + :HydrologicProcesses + :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :Infiltration INF_HMETS PONDED_WATER MULTIPLE + :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF + :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER # interflow, really + :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge + :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF + :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET + :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER #'surface runoff' + :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER #'delayed runoff' + :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER + :EndHydrologicProcesses + + #:CreateRVPTemplate + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hmets + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.evaporation = "PET_OUDIN" + self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + + self.config.rvc.soil0 = None + self.config.rvc.soil1 = None + def derived_parameters(self): - self.rvd["TOPSOIL_hlf"] = self.rvp.params.TOPSOIL * 0.5 - self.rvd["PHREATIC_hlf"] = self.rvp.params.PHREATIC * 0.5 - self.rvd["TOPSOIL_m"] = self.rvp.params.TOPSOIL / 1000.0 - self.rvd["PHREATIC_m"] = self.rvp.params.PHREATIC / 1000.0 - self.rvd[ - "SUM_MELT_FACTOR" - ] = self.rvp.params.MAX_MELT_FACTOR # self.rvp.params.MIN_MELT_FACTOR + - self.rvd[ - "SUM_SNOW_SWI" - ] = self.rvp.params.SNOW_SWI_MAX # self.rvp.params.SNOW_SWI_MIN + + self.config.rvp.derived_params.TOPSOIL_hlf = ( + self.config.rvp.params.TOPSOIL * 0.5 + ) + self.config.rvp.derived_params.PHREATIC_hlf = ( + self.config.rvp.params.PHREATIC * 0.5 + ) + self.config.rvp.derived_params.TOPSOIL_m = ( + self.config.rvp.params.TOPSOIL / 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_m = ( + self.config.rvp.params.PHREATIC / 1000.0 + ) + + self.config.rvp.derived_params.SUM_MELT_FACTOR = ( + self.config.rvp.params.MAX_MELT_FACTOR + ) + self.config.rvp.derived_params.SUM_SNOW_SWI = ( + self.config.rvp.params.SNOW_SWI_MAX + ) # Default initial conditions if none are given - if self.rvc.hru_state is None: + if not self.config.rvc.hru_states: soil0 = ( - self.rvd["TOPSOIL_hlf"] if self.rvc.soil0 is None else self.rvc.soil0 + self.config.rvp.derived_params.TOPSOIL_hlf + if self.config.rvc.soil0 is None + else self.config.rvc.soil0 ) soil1 = ( - self.rvd["PHREATIC_hlf"] if self.rvc.soil1 is None else self.rvc.soil1 + self.config.rvp.derived_params.PHREATIC_hlf + if self.config.rvc.soil1 is None + else self.config.rvc.soil1 ) - self.rvc.hru_state = HRUState(soil0=soil0, soil1=soil1) + self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) class HMETS_OST(Ostrich, HMETS): diff --git a/ravenpy/models/raven-hmets/raven-hmets.rvc b/ravenpy/models/raven-hmets/raven-hmets.rvc deleted file mode 100644 index 9a92abc3..00000000 --- a/ravenpy/models/raven-hmets/raven-hmets.rvc +++ /dev/null @@ -1,20 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# initialize to 1/2 full -# x(20)/2 -:UniformInitialConditions SOIL[0] {TOPSOIL_hlf} -# x(21)/2 -:UniformInitialConditions SOIL[1] {PHREATIC_hlf} - -:HRUStateVariableTable (formerly :InitialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 {TOPSOIL_hlf} {PHREATIC_hlf} -:EndHRUStateVariableTable diff --git a/ravenpy/models/raven-hmets/raven-hmets.rvh b/ravenpy/models/raven-hmets/raven-hmets.rvh deleted file mode 100644 index 4ed39310..00000000 --- a/ravenpy/models/raven-hmets/raven-hmets.rvh +++ /dev/null @@ -1,21 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -# -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, {name}, -1, NONE, _AUTO, 1 -:EndSubBasins - -:HRUs - :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT - :Units km2 m deg deg none none none none none none deg deg - 1 {area}, {elevation}, {latitude}, {longitude}, 1 FOREST FOREST DEFAULT_P [NONE] [NONE] 0.0 0 -:EndHRUs - diff --git a/ravenpy/models/raven-hmets/raven-hmets.rvi b/ravenpy/models/raven-hmets/raven-hmets.rvi deleted file mode 100644 index 2101bb75..00000000 --- a/ravenpy/models/raven-hmets/raven-hmets.rvi +++ /dev/null @@ -1,64 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 2.8.2 -:WrittenBy James Craig & Juliane Mai -:CreationDate Oct 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -# - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -:PotentialMeltMethod POTMELT_HMETS -:RainSnowFraction {rain_snow_fraction} -:Evaporation {evaporation} # PET_OUDIN -:CatchmentRoute ROUTE_DUMP -:Routing ROUTE_NONE - -:SoilModel SOIL_TWO_LAYER - -:Alias DELAYED_RUNOFF CONVOLUTION[1] - -:HydrologicProcesses - :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :Infiltration INF_HMETS PONDED_WATER MULTIPLE - :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF - :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER # interflow, really - :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge - :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF - :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET - :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER #'surface runoff' - :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER #'delayed runoff' - :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER -:EndHydrologicProcesses - -#:CreateRVPTemplate - -#--------------------------------------------------------- -# Output Options -# -#:WriteForcingFunctions -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id hmets - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} diff --git a/ravenpy/models/raven-hmets/raven-hmets.rvp b/ravenpy/models/raven-hmets/raven-hmets.rvp deleted file mode 100644 index abaf75fb..00000000 --- a/ravenpy/models/raven-hmets/raven-hmets.rvp +++ /dev/null @@ -1,94 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -#----------------------------------------------------------------- -# Raven Properties file Template. Created by Raven v2.8.2 -#----------------------------------------------------------------- - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -:LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - FOREST, 0.0, 1.0, -:EndLandUseClasses - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 2, TOPSOIL, {TOPSOIL_m}, PHREATIC, {PHREATIC_m}, -# DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, -:EndSoilProfiles - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -:GlobalParameter SNOW_SWI_MIN {params.SNOW_SWI_MIN} # x(9) -:GlobalParameter SNOW_SWI_MAX {SUM_SNOW_SWI} # x(9)+x(10) -:GlobalParameter SWI_REDUCT_COEFF {params.SWI_REDUCT_COEFF} # x(11) -:GlobalParameter SNOW_SWI 0.05 # not sure why/if needed... - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, {params.PERC_COEFF},{params.PET_CORRECTION},{params.BASEFLOW_COEFF_1} - PHREATIC, 1.0, 0.0, 0.0, {params.BASEFLOW_COEFF_2} - # TOPSOIL, 1.0, x(17), x(15), x(18) - # PHREATIC, 1.0, 0.0, 0.0, x(19) -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT],{params.MIN_MELT_FACTOR},{SUM_MELT_FACTOR}, {params.DD_MELT_TEMP},{params.DD_AGGRADATION},{params.REFREEZE_FACTOR}, {params.REFREEZE_EXP},{params.DD_REFREEZE_TEMP},{params.HMETS_RUNOFF_COEFF}, -# x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), -:EndLandUseParameterList -:LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, - :Units, -, 1/d, -, 1/d, - [DEFAULT], {params.GAMMA_SHAPE}, {params.GAMMA_SCALE}, {params.GAMMA_SHAPE2}, {params.GAMMA_SCALE2}, - # x(1), x(2), x(3), x(4), -:EndLandUseParameterList -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, - [DEFAULT], 0.0, 0.0, -:EndVegetationParameterList diff --git a/ravenpy/models/raven-hmets/raven-hmets.rvt b/ravenpy/models/raven-hmets/raven-hmets.rvt deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/raven-hmets/raven-hmets.rvt +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file From 9be4f4e2ac0b4eb5c37876a4f789ef18a0033b2c Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 3 Apr 2021 19:15:52 -0400 Subject: [PATCH 09/59] MOHYSE WIP --- ravenpy/models/emulators.py | 203 +++++++++++++++++++++++++++++++++--- tests/test_emulators.py | 2 +- 2 files changed, 189 insertions(+), 16 deletions(-) diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index efd31ef2..8c38e2cc 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -313,28 +313,201 @@ def derived_parameters(self): class MOHYSE(Raven): identifier = "mohyse" - templates = tuple((Path(__file__).parent / "raven-mohyse").glob("*.rv?")) - params = namedtuple( - "MOHYSEParams", ", ".join(["par_x{:02}".format(i) for i in range(1, 11)]) - ) + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + + @dataclass + class DerivedParams: + par_rezi_x10: float = None def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvp = RV(params=MOHYSE.params(*((None,) * 10))) - self.rvh = RV( - name=None, area=None, elevation=None, latitude=None, longitude=None - ) - self.rvt = RVT() - self.rvi = RVI(evaporation="PET_MOHYSE", rain_snow_fraction="RAINSNOW_DATA") - self.rvc = RVC( - hru_state=HRUState(), - basin_state=BasinIndexCommand(), + + self.config = Config( + hrus=(GR4JCN.LandHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=MOHYSE.Params(), + derived_params=MOHYSE.DerivedParams(), ) - self.rvd = RV(par_rezi_x10=None) + + self.config.rvp.tmpl = """ + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL + GWSOIL + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + LU_ALL, 0.0, 1.0 + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + VEG_ALL, 0.0, 0.0, 0.0 + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 + DEFAULT_P, 2, TOPSOIL, {params.par_x05}, GWSOIL, 10.0 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + #:GlobalParameter RAINSNOW_TEMP -2.0 + :GlobalParameter TOC_MULTIPLIER 1.0 + # :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 + :GlobalParameter MOHYSE_PET_COEFF {params.par_x01} + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, + :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) + # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, + # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, + TOPSOIL, 1.0 , 1.0, 1.0, {params.par_x07}, {params.par_x06}, + GWSOIL, 1.0 , 1.0, 1.0, {params.par_x08}, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, + :Units, mm/d/K, mm/d, -, degC, + # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, + [DEFAULT], {params.par_x03}, {params.par_x02}, 0.0, {params.par_x04}, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, -, + [DEFAULT], 0.0, 0.0, 0.0, + :EndVegetationParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :SoilModel SOIL_TWO_LAYER + :PotentialMeltMethod POTMELT_DEGREE_DAY + :Routing ROUTE_NONE + :CatchmentRoute ROUTE_GAMMA_CONVOLUTION + :Evaporation {evaporation} # PET_MOHYSE + :DirectEvaporation + :RainSnowFraction {rain_snow_fraction} + + :HydrologicProcesses + :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :Infiltration INF_HBV PONDED_WATER SOIL[0] + :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER + :Percolation PERC_LINEAR SOIL[0] SOIL[1] + :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER + :EndHydrologicProcesses + + #:CreateRVPTemplate + + # :Alias MOHYSE_PARA_1 1.5589 # :GlobalParameter MOHYSE_PET_COEFF + # :Alias MOHYSE_PARA_2 0.9991 # LandUseParameterList --> AET_COEFF + # :Alias MOHYSE_PARA_3 2.1511 # LandUseParameterList --> MELT_FACTOR + # :Alias MOHYSE_PARA_4 -1.6101 # LandUseParameterList --> DD_MELT_TEMP + # :Alias MOHYSE_PARA_5 0.5000 # SoilProfiles --> thickness of TOPSOIL (in mm????? must be m!!!) + # :Alias MOHYSE_PARA_6 0.1050 # SoilParameterList --> PERC_COEFF (TOPSOIL) + # :Alias MOHYSE_PARA_7 0.0533 # SoilParameterList --> BASEFLOW_COEFF (TOPSOIL) + # :Alias MOHYSE_PARA_8 0.0132 # SoilParameterList --> BASEFLOW_COEFF (GWSOIL) + # :Alias MOHYSE_PARA_9 1.0474 # :SubBasinProperties --> GAMMA_SHAPE + # :Alias MOHYSE_PARA_10 7.9628 # :SubBasinProperties --> TIME_CONC = MOHYSE_PARA_10 / 0.3 = 26.542666666 + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id mohyse + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + self.config.rvi.evaporation = "PET_MOHYSE" + + self.config.rvc.tmpl = """ + :UniformInitialConditions SOIL[0] 15 # Initial conditions for the groundwater storage, in mm. DEFAULT 15 mm. + + {hru_states} + + {basin_states} + """ + + self.config.rvc.hru_states[1] = HRUState() + self.config.rvc.basin_states[1] = BasinIndexCommand() def derived_parameters(self): - self.rvd["par_rezi_x10"] = 1.0 / self.rvp.params.par_x10 + self.config.rvp.derived_params.par_rezi_x10 = ( + 1.0 / self.config.rvp.params.par_x10 + ) class MOHYSE_OST(Ostrich, MOHYSE): diff --git a/tests/test_emulators.py b/tests/test_emulators.py index f5236d50..16326495 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -966,7 +966,7 @@ def test_simple(self): class TestMOHYSE: def test_simple(self): - model = MOHYSE() + model = MOHYSE("/tmp/ravenpy_debug/test_mohyse") params = ( 1.0, 0.0468, From d20d6771b935159afd3ed1d8ddae52f135bb5ad6 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sun, 4 Apr 2021 13:04:34 -0400 Subject: [PATCH 10/59] Fix MOHYSE --- ravenpy/config/rvs.py | 16 ++++ ravenpy/models/base.py | 3 +- ravenpy/models/emulators.py | 24 ++++-- ravenpy/models/raven-mohyse/raven-mohyse.rvc | 1 - ravenpy/models/raven-mohyse/raven-mohyse.rvh | 27 ------- ravenpy/models/raven-mohyse/raven-mohyse.rvi | 70 ---------------- ravenpy/models/raven-mohyse/raven-mohyse.rvp | 85 -------------------- ravenpy/models/raven-mohyse/raven-mohyse.rvt | 1 - 8 files changed, 35 insertions(+), 192 deletions(-) delete mode 120000 ravenpy/models/raven-mohyse/raven-mohyse.rvc delete mode 100644 ravenpy/models/raven-mohyse/raven-mohyse.rvh delete mode 100644 ravenpy/models/raven-mohyse/raven-mohyse.rvi delete mode 100644 ravenpy/models/raven-mohyse/raven-mohyse.rvp delete mode 120000 ravenpy/models/raven-mohyse/raven-mohyse.rvt diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 80fa6565..d68877b1 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -42,6 +42,19 @@ def update(self, key, value): return True return False + def get_extra_attributes(self, d): + """ + Not sure about this: for the moment I use it only for certain params that must + be injected in the RVH by the MOHYSE emulator. The idea is to complete the `d` + dict used in the `to_rv` method for the template with extra attributes that have + been added in the emulator. + """ + e = {} + for k, v in self.__dict__.items(): + if k not in d: + e[k] = v + return e + ######### # R V C # @@ -185,6 +198,9 @@ def to_rv(self): or "", "reservoirs": "\n\n".join(map(str, self.reservoirs)), } + + d.update(self.get_extra_attributes(d)) + return dedent(self.tmpl).format(**d) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index c941b511..8cdc1e2f 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -246,8 +246,9 @@ def _dump_rv(self): params = self.parameters - stem = "raven-gr4j-cemaneige" + # stem = "raven-gr4j-cemaneige" # stem = "raven-routing" + stem = "toto" self.name = stem diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 8c38e2cc..6932c0f8 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -490,17 +490,23 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_end {end_date} """ - self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" - self.config.rvi.evaporation = "PET_MOHYSE" + self.config.rvh.tmpl = """ + {subbasins} - self.config.rvc.tmpl = """ - :UniformInitialConditions SOIL[0] 15 # Initial conditions for the groundwater storage, in mm. DEFAULT 15 mm. + {hrus} - {hru_states} - - {basin_states} + :SubBasinProperties + # 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 + :Parameters, GAMMA_SCALE, GAMMA_SHAPE, + :Units, 1/d, - + 1, {par_rezi_x10}, {par_x09} + :EndSubBasinProperties """ + self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + self.config.rvi.evaporation = "PET_MOHYSE" + + # This is not stricly necessary it seems self.config.rvc.hru_states[1] = HRUState() self.config.rvc.basin_states[1] = BasinIndexCommand() @@ -509,6 +515,10 @@ def derived_parameters(self): 1.0 / self.config.rvp.params.par_x10 ) + # These need to be injected in the RVH + self.config.rvh.par_rezi_x10 = self.config.rvp.derived_params.par_rezi_x10 + self.config.rvh.par_x09 = self.config.rvp.params.par_x09 + class MOHYSE_OST(Ostrich, MOHYSE): _p = Path(__file__).parent / "ostrich-mohyse" diff --git a/ravenpy/models/raven-mohyse/raven-mohyse.rvc b/ravenpy/models/raven-mohyse/raven-mohyse.rvc deleted file mode 120000 index 19312172..00000000 --- a/ravenpy/models/raven-mohyse/raven-mohyse.rvc +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvc \ No newline at end of file diff --git a/ravenpy/models/raven-mohyse/raven-mohyse.rvh b/ravenpy/models/raven-mohyse/raven-mohyse.rvh deleted file mode 100644 index 5bde2f72..00000000 --- a/ravenpy/models/raven-mohyse/raven-mohyse.rvh +++ /dev/null @@ -1,27 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of MOHYSE simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, {name}, -1, NONE, _AUTO, 1 -:EndSubBasins - -:HRUs - :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT - :Units km2 m deg deg none none none none none none ratio deg - 1, {area}, {elevation}, {latitude}, {longitude}, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [NONE], [NONE] -:EndHRUs - -:SubBasinProperties -# 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 - :Parameters, GAMMA_SCALE, GAMMA_SHAPE, - :Units, 1/d, - - 1, {par_rezi_x10}, {params.par_x09} -:EndSubBasinProperties - diff --git a/ravenpy/models/raven-mohyse/raven-mohyse.rvi b/ravenpy/models/raven-mohyse/raven-mohyse.rvi deleted file mode 100644 index 70e53829..00000000 --- a/ravenpy/models/raven-mohyse/raven-mohyse.rvi +++ /dev/null @@ -1,70 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of MOHYSE simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -:SoilModel SOIL_TWO_LAYER -:PotentialMeltMethod POTMELT_DEGREE_DAY -:Routing ROUTE_NONE -:CatchmentRoute ROUTE_GAMMA_CONVOLUTION -:Evaporation {evaporation} # PET_MOHYSE -:DirectEvaporation -:RainSnowFraction {rain_snow_fraction} - -:HydrologicProcesses - :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :Infiltration INF_HBV PONDED_WATER SOIL[0] - :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER - :Percolation PERC_LINEAR SOIL[0] SOIL[1] - :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER -:EndHydrologicProcesses - -#:CreateRVPTemplate - -# :Alias MOHYSE_PARA_1 1.5589 # :GlobalParameter MOHYSE_PET_COEFF -# :Alias MOHYSE_PARA_2 0.9991 # LandUseParameterList --> AET_COEFF -# :Alias MOHYSE_PARA_3 2.1511 # LandUseParameterList --> MELT_FACTOR -# :Alias MOHYSE_PARA_4 -1.6101 # LandUseParameterList --> DD_MELT_TEMP -# :Alias MOHYSE_PARA_5 0.5000 # SoilProfiles --> thickness of TOPSOIL (in mm????? must be m!!!) -# :Alias MOHYSE_PARA_6 0.1050 # SoilParameterList --> PERC_COEFF (TOPSOIL) -# :Alias MOHYSE_PARA_7 0.0533 # SoilParameterList --> BASEFLOW_COEFF (TOPSOIL) -# :Alias MOHYSE_PARA_8 0.0132 # SoilParameterList --> BASEFLOW_COEFF (GWSOIL) -# :Alias MOHYSE_PARA_9 1.0474 # :SubBasinProperties --> GAMMA_SHAPE -# :Alias MOHYSE_PARA_10 7.9628 # :SubBasinProperties --> TIME_CONC = MOHYSE_PARA_10 / 0.3 = 26.542666666 - -#--------------------------------------------------------- -# Output Options -# -#:WriteForcingFunctions -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id mohyse - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} - - diff --git a/ravenpy/models/raven-mohyse/raven-mohyse.rvp b/ravenpy/models/raven-mohyse/raven-mohyse.rvp deleted file mode 100644 index 29d9ab39..00000000 --- a/ravenpy/models/raven-mohyse/raven-mohyse.rvp +++ /dev/null @@ -1,85 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of MOHYSE simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL - GWSOIL -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -:LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - LU_ALL, 0.0, 1.0 -:EndLandUseClasses - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - VEG_ALL, 0.0, 0.0, 0.0 -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 - DEFAULT_P, 2, TOPSOIL, {params.par_x05}, GWSOIL, 10.0 -:EndSoilProfiles - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -#:GlobalParameter RAINSNOW_TEMP -2.0 -:GlobalParameter TOC_MULTIPLIER 1.0 -# :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 -:GlobalParameter MOHYSE_PET_COEFF {params.par_x01} - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, - :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) - # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, - # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, - TOPSOIL, 1.0 , 1.0, 1.0, {params.par_x07}, {params.par_x06}, - GWSOIL, 1.0 , 1.0, 1.0, {params.par_x08}, 0.0, -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, - :Units, mm/d/K, mm/d, -, degC, - # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, - [DEFAULT], {params.par_x03}, {params.par_x02}, 0.0, {params.par_x04}, -:EndLandUseParameterList - -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, -, - [DEFAULT], 0.0, 0.0, 0.0, -:EndVegetationParameterList - diff --git a/ravenpy/models/raven-mohyse/raven-mohyse.rvt b/ravenpy/models/raven-mohyse/raven-mohyse.rvt deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/raven-mohyse/raven-mohyse.rvt +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file From a8dd3fa0f7d12062b61a72365e6e2d2c4629384f Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sun, 4 Apr 2021 17:05:55 -0400 Subject: [PATCH 11/59] Fix HBVEC --- ravenpy/config/rvs.py | 11 + ravenpy/models/emulators.py | 287 +++++++++++++++++-- ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvc | 1 - ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvh | 30 -- ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvi | 96 ------- ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvp | 93 ------ ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvt | 1 - 7 files changed, 267 insertions(+), 252 deletions(-) delete mode 120000 ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvc delete mode 100644 ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvh delete mode 100644 ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvi delete mode 100644 ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvp delete mode 120000 ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvt diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index d68877b1..03f9f421 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -21,8 +21,11 @@ HRUsCommand, HRUStateVariableTableCommand, LandUseClassesCommand, + MonthlyAverageCommand, ObservationDataCommand, + RainCorrectionCommand, RoutingCommand, + SnowCorrectionCommand, SoilClassesCommand, SoilProfilesCommand, StationForcingCommand, @@ -596,6 +599,10 @@ def __init__(self, rvh, tmpl=None): self.nc_index = 0 self.grid_weights = None + self.rain_correction = None + self.snow_correction = None + self.monthly_ave_evaporation = None + self.monthly_ave_temperature = None self._nc_latitude = [] self._nc_longitude = [] @@ -702,6 +709,10 @@ def to_rv(self): latitude=lat, longitude=lon, elevation=elev, + rain_correction=self.rain_correction, + snow_correction=self.snow_correction, + monthly_ave_evaporation=self.monthly_ave_evaporation, + monthly_ave_temperature=self.monthly_ave_temperature, data=data, ) else: diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 6932c0f8..47403bda 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -876,55 +876,280 @@ def ost2raven(self, ops): class HBVEC(Raven): identifier = "hbvec" - templates = tuple((Path(__file__).parent / "raven-hbv-ec").glob("*.rv?")) - params = namedtuple("HBVECParams", ("par_x{:02}".format(i) for i in range(1, 22))) + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + par_x11: float = None + par_x12: float = None + par_x13: float = None + par_x14: float = None + par_x15: float = None + par_x16: float = None + par_x17: float = None + par_x18: float = None + par_x19: float = None + par_x20: float = None + par_x21: float = None + + @dataclass + class DerivedParams: + one_plus_par_x15: float = None + par_x11_half: float = None def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvp = RV(params=HBVEC.params(*((None,) * len(HBVEC.params._fields)))) - self.rvd = RV( - one_plus_par_x15=None, - par_x11_half=None, + + self.config = Config( + hrus=(GR4JCN.LandHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=HBVEC.Params(), + derived_params=HBVEC.DerivedParams(), ) - self.rvt = RVT() - self.rvh = RV( - name=None, area=None, elevation=None, latitude=None, longitude=None + + self.config.rvp.tmpl = """ + #------------------------------------------------------------------------ + # Global parameters + # + # HBV_PARA_13=TCALT + :AdiabaticLapseRate {params.par_x13} + # HBV_PARA_01, CONSTANT, + :RainSnowTransition {params.par_x01}, 2.0 + # HBV_PARA_04, + :IrreducibleSnowSaturation {params.par_x04} + # HBV_PARA_12=PCALT + :GlobalParameter PRECIP_LAPSE {params.par_x12} + + #--------------------------------------------------------- + # Soil classes + :SoilClasses + :Attributes, + :Units, + TOPSOIL, 1.0, 0.0, 0 + SLOW_RES, 1.0, 0.0, 0 + FAST_RES, 1.0, 0.0, 0 + :EndSoilClasses + + :SoilParameterList + :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N + :Units , none, none, none, none, mm/d, mm/d, 1/d, none + # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, + [DEFAULT], {params.par_x05}, {params.par_x06}, {params.par_x14}, {params.par_x07}, {params.par_x16}, 0.0, 0.0, 0.0 + # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, + FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, {params.par_x08}, {params.par_x09}, {derived_params.one_plus_par_x15} + # CONSTANT, HBV_PARA_10, CONSTANT, + SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, {params.par_x10}, 1.0 + :EndSoilParameterList + + #--------------------------------------------------------- + # Soil profiles + # name, layers, (soilClass, thickness) x layers + # + :SoilProfiles + # HBV_PARA_17, CONSTANT, CONSTANT, + DEFAULT_P, 3, TOPSOIL, {params.par_x17}, FAST_RES, 100.0, SLOW_RES, 100.0 + :EndSoilProfiles + + #--------------------------------------------------------- + # Vegetation classes + # + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 25, 6.0, 5.3 + :EndVegetationClasses + + :VegetationParameterList + :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, + :Units, mm, mm, frac, frac, + VEG_ALL, 10000, 10000, 0.88, 0.88, + :EndVegetationParameterList + + #--------------------------------------------------------- + # LandUse classes + # + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units, frac, frac + LU_ALL, 0.0, 1 + :EndLandUseClasses + + :LandUseParameterList + :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR + :Units , mm/d/K, mm/d/K, none, mm/d/K, none + # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT + [DEFAULT], {params.par_x02}, 2.2, {params.par_x18}, {params.par_x03}, 0.48 + :EndLandUseParameterList + + :LandUseParameterList + :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG + :Units , none, 1/d, 1/d, 1/mm + # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, + [DEFAULT], 1.64, 0.05, {params.par_x19}, 0.05 + :EndLandUseParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + #------------------------------------------------------------------------ + # Model options + # + :Method ORDERED_SERIES + #:Interpolation INTERP_NEAREST_NEIGHBOR + + :Routing ROUTE_NONE + :CatchmentRoute TRIANGULAR_UH + + :Evaporation {evaporation} # PET_FROM_MONTHLY + :OW_Evaporation {ow_evaporation} # PET_FROM_MONTHLY + :SWRadiationMethod SW_RAD_DEFAULT + :SWCloudCorrect SW_CLOUD_CORR_NONE + :SWCanopyCorrect SW_CANOPY_CORR_NONE + :LWRadiationMethod LW_RAD_DEFAULT + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + :PotentialMeltMethod POTMELT_HBV + :OroTempCorrect OROCORR_HBV + :OroPrecipCorrect OROCORR_HBV + :OroPETCorrect OROCORR_HBV + :CloudCoverMethod CLOUDCOV_NONE + :PrecipIceptFract PRECIP_ICEPT_USER + :MonthlyInterpolationMethod MONTHINT_LINEAR_21 + + :SoilModel SOIL_MULTILAYER 3 + + #------------------------------------------------------------------------ + # Soil Layer Alias Definitions + # + :Alias FAST_RESERVOIR SOIL[1] + :Alias SLOW_RESERVOIR SOIL[2] + :LakeStorage SLOW_RESERVOIR + + #------------------------------------------------------------------------ + # Hydrologic process order for HBV-EC Emulation + # + :HydrologicProcesses + :SnowRefreeze FREEZE_DEGREE_DAY SNOW_LIQ SNOW + :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE + :CanopyEvaporation CANEVP_ALL CANOPY ATMOSPHERE + :CanopySnowEvap CANEVP_ALL CANOPY_SNOW ATMOSPHERE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW SNOW_LIQ + :-->Overflow RAVEN_DEFAULT SNOW_LIQ PONDED_WATER + :Flush RAVEN_DEFAULT PONDED_WATER GLACIER + :-->Conditional HRU_TYPE IS GLACIER + :GlacierMelt GMELT_HBV GLACIER_ICE GLACIER + :GlacierRelease GRELEASE_HBV_EC GLACIER SURFACE_WATER + :Infiltration INF_HBV PONDED_WATER MULTIPLE + :Flush RAVEN_DEFAULT SURFACE_WATER FAST_RESERVOIR + :-->Conditional HRU_TYPE IS_NOT GLACIER + :SoilEvaporation SOILEVAP_HBV SOIL[0] ATMOSPHERE + :CapillaryRise RISE_HBV FAST_RESERVOIR SOIL[0] + :LakeEvaporation LAKE_EVAP_BASIC SLOW_RESERVOIR ATMOSPHERE + :Percolation PERC_CONSTANT FAST_RESERVOIR SLOW_RESERVOIR + :Baseflow BASE_POWER_LAW FAST_RESERVOIR SURFACE_WATER + :Baseflow BASE_LINEAR SLOW_RESERVOIR SURFACE_WATER + :EndHydrologicProcesses + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hbvec + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvh.tmpl = """ + {subbasins} + + {hrus} + + :SubBasinProperties + # HBV_PARA_11, DERIVED FROM HBV_PARA_11, + # MAXBAS, MAXBAS/2, + :Parameters, TIME_CONC, TIME_TO_PEAK + :Units , d, d, + 1, {par_x11}, {par_x11_half}, + :EndSubBasinProperties + """ + + self.config.rvi.evaporation = "PET_FROMMONTHLY" + self.config.rvi.ow_evaporation = "PET_FROMMONTHLY" + self.config.rvi.rain_snow_fraction = "RAINSNOW_HBV" + + self.config.rvc.soil2 = 0.50657 + + def derived_parameters(self): + self.config.rvp.derived_params.one_plus_par_x15 = ( + self.config.rvp.params.par_x15 + 1.0 ) - self.rvi = RVI( - evaporation="PET_FROMMONTHLY", - ow_evaporation="PET_FROMMONTHLY", - rain_snow_fraction="RAINSNOW_HBV", + self.config.rvp.derived_params.par_x11_half = ( + self.config.rvp.params.par_x11 / 2.0 ) - self.rvc = RVC(soil2=0.50657, qout=1) - def derived_parameters(self): - self.rvd["one_plus_par_x15"] = self.rvp.params.par_x15 + 1.0 - self.rvd["par_x11_half"] = self.rvp.params.par_x11 / 2.0 + # These need to be injected in the RVH + self.config.rvh.par_x11 = self.config.rvp.params.par_x11 + self.config.rvh.par_x11_half = self.config.rvp.derived_params.par_x11_half - self.rvt["raincorrection"] = self.rvp.params.par_x20 - self.rvt["snowcorrection"] = self.rvp.params.par_x21 + self.config.rvt.rain_correction = self.config.rvp.params.par_x20 + self.config.rvt.snow_correction = self.config.rvp.params.par_x21 self._monthly_average() # Default initial conditions if none are given - if self.rvc.hru_state is None: - self.rvc.hru_state = HRUState(soil2=self.rvc.soil2) - if self.rvc.basin_state is None: - self.rvc.basin_state = BasinIndexCommand(qout=(self.rvc.qout,)) + if not self.config.rvc.hru_states: + self.config.rvc.hru_states[1] = HRUState(soil2=self.config.rvc.soil2) + if not self.config.rvc.basin_states: + self.config.rvc.basin_states[1] = BasinIndexCommand() # TODO: Support index specification and unit changes. def _monthly_average(self): if ( - self.rvi.evaporation == "PET_FROMMONTHLY" - or self.rvi.ow_evaporation == "PET_FROMMONTHLY" + self.config.rvi.evaporation == "PET_FROMMONTHLY" + or self.config.rvi.ow_evaporation == "PET_FROMMONTHLY" ): # If this fails, it's likely the input data is missing some necessary variables (e.g. evap). - tas_cmd = self.rvt.var_cmds.get("tas") - tasmin_cmd = self.rvt.var_cmds.get("tasmin") - tasmax_cmd = self.rvt.var_cmds.get("tasmax") - evspsbl_cmd = self.rvt.var_cmds.get("evspsbl") + tas_cmd = self.config.rvt._var_cmds["tas"] + tasmin_cmd = self.config.rvt._var_cmds["tasmin"] + tasmax_cmd = self.config.rvt._var_cmds["tasmax"] + evspsbl_cmd = self.config.rvt._var_cmds["evspsbl"] if tas_cmd: tas = xr.open_dataset(tas_cmd.file_name_nc)[tas_cmd.var_name_nc] @@ -945,8 +1170,8 @@ def _monthly_average(self): mat = tas.groupby("time.month").mean().values mae = evap.groupby("time.month").mean().values - self.rvt["monthly_ave_evaporation"] = tuple(mae) - self.rvt["monthly_ave_temperature"] = tuple(mat) + self.config.rvt.monthly_ave_evaporation = tuple(mae) + self.config.rvt.monthly_ave_temperature = tuple(mat) class HBVEC_OST(Ostrich, HBVEC): diff --git a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvc b/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvc deleted file mode 120000 index 19312172..00000000 --- a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvc +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvc \ No newline at end of file diff --git a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvh b/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvh deleted file mode 100644 index 2b5292ab..00000000 --- a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvh +++ /dev/null @@ -1,30 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Nov 2018 -# -# Emulation of HBV-EC simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, {name}, -1, NONE, _AUTO, 1 -:EndSubBasins - - -:HRUs - :Attributes, AREA, ELEVATION, LATITUDE, LONGITUDE, BASIN_ID,LAND_USE_CLASS, VEG_CLASS,SOIL_PROFILE, AQUIFER_PROFILE, TERRAIN_CLASS, SLOPE, ASPECT - :Units , km2, m, deg, deg, none, none, none, none, none, none, deg, deg - 1,{area}, {elevation}, {latitude}, {longitude}, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [None], [None] -:EndHRUs - - -:SubBasinProperties -# HBV_PARA_11, DERIVED FROM HBV_PARA_11, -# MAXBAS, MAXBAS/2, - :Parameters, TIME_CONC, TIME_TO_PEAK - :Units , d, d, - 1, {params.par_x11}, {par_x11_half}, -:EndSubBasinProperties diff --git a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvi b/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvi deleted file mode 100644 index 511c6378..00000000 --- a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvi +++ /dev/null @@ -1,96 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HBV-EC simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -#------------------------------------------------------------------------ -# Model options -# -:Method ORDERED_SERIES -#:Interpolation INTERP_NEAREST_NEIGHBOR - -:Routing ROUTE_NONE -:CatchmentRoute TRIANGULAR_UH - -:Evaporation {evaporation} # PET_FROM_MONTHLY -:OW_Evaporation {ow_evaporation} # PET_FROM_MONTHLY -:SWRadiationMethod SW_RAD_DEFAULT -:SWCloudCorrect SW_CLOUD_CORR_NONE -:SWCanopyCorrect SW_CANOPY_CORR_NONE -:LWRadiationMethod LW_RAD_DEFAULT -:RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV -:PotentialMeltMethod POTMELT_HBV -:OroTempCorrect OROCORR_HBV -:OroPrecipCorrect OROCORR_HBV -:OroPETCorrect OROCORR_HBV -:CloudCoverMethod CLOUDCOV_NONE -:PrecipIceptFract PRECIP_ICEPT_USER -:MonthlyInterpolationMethod MONTHINT_LINEAR_21 - -:SoilModel SOIL_MULTILAYER 3 - -#------------------------------------------------------------------------ -# Soil Layer Alias Definitions -# -:Alias FAST_RESERVOIR SOIL[1] -:Alias SLOW_RESERVOIR SOIL[2] -:LakeStorage SLOW_RESERVOIR - -#------------------------------------------------------------------------ -# Hydrologic process order for HBV-EC Emulation -# -:HydrologicProcesses - :SnowRefreeze FREEZE_DEGREE_DAY SNOW_LIQ SNOW - :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE - :CanopyEvaporation CANEVP_ALL CANOPY ATMOSPHERE - :CanopySnowEvap CANEVP_ALL CANOPY_SNOW ATMOSPHERE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW SNOW_LIQ - :-->Overflow RAVEN_DEFAULT SNOW_LIQ PONDED_WATER - :Flush RAVEN_DEFAULT PONDED_WATER GLACIER - :-->Conditional HRU_TYPE IS GLACIER - :GlacierMelt GMELT_HBV GLACIER_ICE GLACIER - :GlacierRelease GRELEASE_HBV_EC GLACIER SURFACE_WATER - :Infiltration INF_HBV PONDED_WATER MULTIPLE - :Flush RAVEN_DEFAULT SURFACE_WATER FAST_RESERVOIR - :-->Conditional HRU_TYPE IS_NOT GLACIER - :SoilEvaporation SOILEVAP_HBV SOIL[0] ATMOSPHERE - :CapillaryRise RISE_HBV FAST_RESERVOIR SOIL[0] - :LakeEvaporation LAKE_EVAP_BASIC SLOW_RESERVOIR ATMOSPHERE - :Percolation PERC_CONSTANT FAST_RESERVOIR SLOW_RESERVOIR - :Baseflow BASE_POWER_LAW FAST_RESERVOIR SURFACE_WATER - :Baseflow BASE_LINEAR SLOW_RESERVOIR SURFACE_WATER -:EndHydrologicProcesses - -#--------------------------------------------------------- -# Output Options -# -#:WriteForcingFunctions -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id hbvec - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} - diff --git a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvp b/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvp deleted file mode 100644 index b3926e32..00000000 --- a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvp +++ /dev/null @@ -1,93 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Nov 2018 -# -# Emulation of HBV-EC simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "para_x05" and "para_x15" wouldn't be detectable) -# para_1_+_x15 = 1.0 + 8.776071E-01 -# para_x11 = {params.par_x11} goes to RVH file as derived para_half_x11 - -#------------------------------------------------------------------------ -# Global parameters -# -# HBV_PARA_13=TCALT -:AdiabaticLapseRate {params.par_x13} -# HBV_PARA_01, CONSTANT, -:RainSnowTransition {params.par_x01}, 2.0 -# HBV_PARA_04, -:IrreducibleSnowSaturation {params.par_x04} -# HBV_PARA_12=PCALT -:GlobalParameter PRECIP_LAPSE {params.par_x12} - -#--------------------------------------------------------- -# Soil classes -:SoilClasses - :Attributes, - :Units, - TOPSOIL, 1.0, 0.0, 0 - SLOW_RES, 1.0, 0.0, 0 - FAST_RES, 1.0, 0.0, 0 -:EndSoilClasses - -:SoilParameterList - :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N - :Units , none, none, none, none, mm/d, mm/d, 1/d, none - # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, - [DEFAULT], {params.par_x05}, {params.par_x06}, {params.par_x14}, {params.par_x07}, {params.par_x16}, 0.0, 0.0, 0.0 - # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, - FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, {params.par_x08}, {params.par_x09}, {one_plus_par_x15} - # CONSTANT, HBV_PARA_10, CONSTANT, - SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, {params.par_x10}, 1.0 -:EndSoilParameterList - -#--------------------------------------------------------- -# Soil profiles -# name, layers, (soilClass, thickness) x layers -# -:SoilProfiles -# HBV_PARA_17, CONSTANT, CONSTANT, - DEFAULT_P, 3, TOPSOIL, {params.par_x17}, FAST_RES, 100.0, SLOW_RES, 100.0 -:EndSoilProfiles - -#--------------------------------------------------------- -# Vegetation classes -# -:VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 25, 6.0, 5.3 -:EndVegetationClasses - -:VegetationParameterList - :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, - :Units, mm, mm, frac, frac, - VEG_ALL, 10000, 10000, 0.88, 0.88, -:EndVegetationParameterList - -#--------------------------------------------------------- -# LandUse classes -# -:LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units, frac, frac - LU_ALL, 0.0, 1 -:EndLandUseClasses - -:LandUseParameterList - :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR - :Units , mm/d/K, mm/d/K, none, mm/d/K, none - # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT - [DEFAULT], {params.par_x02}, 2.2, {params.par_x18}, {params.par_x03}, 0.48 -:EndLandUseParameterList - -:LandUseParameterList - :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG - :Units , none, 1/d, 1/d, 1/mm - # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, - [DEFAULT], 1.64, 0.05, {params.par_x19}, 0.05 -:EndLandUseParameterList diff --git a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvt b/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvt deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/raven-hbv-ec/raven-hbv-ec.rvt +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file From 9559930690eac975af37bd476d259be89e5345c8 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sun, 4 Apr 2021 21:01:21 -0400 Subject: [PATCH 12/59] WIP --- ravenpy/config/rvs.py | 46 +-- ravenpy/models/emulators.py | 379 +++++++++++++++--- .../models/raven-blended/raven-blended.rvc | 21 - .../models/raven-blended/raven-blended.rvh | 16 - .../models/raven-blended/raven-blended.rvi | 88 ---- .../models/raven-blended/raven-blended.rvp | 133 ------ .../models/raven-blended/raven-blended.rvt | 1 - tests/test_ECCC_forecast.py | 2 +- tests/test_blended.py | 2 +- 9 files changed, 353 insertions(+), 335 deletions(-) delete mode 100644 ravenpy/models/raven-blended/raven-blended.rvc delete mode 100644 ravenpy/models/raven-blended/raven-blended.rvh delete mode 100644 ravenpy/models/raven-blended/raven-blended.rvi delete mode 100644 ravenpy/models/raven-blended/raven-blended.rvp delete mode 120000 ravenpy/models/raven-blended/raven-blended.rvt diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 03f9f421..e6e1f7e1 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -35,12 +35,16 @@ ) -class RVV: +class RV: def update(self, key, value): - """ - This is the general mechanism, see for more specialized ones in derived classes. - """ if hasattr(self, key): + # Special case: the user might be trying to update `params` or `derived_params`, + # (which are dataclasses) by supplying a list of values (either a list, tuple of + # numpy array); if that's the case, cast those values into a new instance of the + # corresponding dataclass. + attr = getattr(self, key) + if is_dataclass(attr) and isinstance(value, (list, tuple, np.ndarray)): + value = attr.__class__(*value) setattr(self, key, value) return True return False @@ -64,7 +68,7 @@ def get_extra_attributes(self, d): ######### -class RVC(RVV): +class RVC(RV): tmpl = """ {hru_states} @@ -151,6 +155,9 @@ def to_rv(self): "hru_states": HRUStateVariableTableCommand(self.hru_states), "basin_states": BasinStateVariablesCommand(self.basin_states), } + + d.update(self.get_extra_attributes(d)) + return dedent(self.tmpl).format(**d) @@ -159,7 +166,7 @@ def to_rv(self): ######### -class RVH(RVV): +class RVH(RV): tmpl = """ {subbasins} @@ -212,7 +219,7 @@ def to_rv(self): ######### -class RVI(RVV): +class RVI(RV): tmpl = """ """ @@ -494,7 +501,7 @@ def to_rv(self): ########## -class RVP(RVV): +class RVP(RV): tmpl = """ """ @@ -513,19 +520,6 @@ def __init__(self, tmpl=None): self.tmpl = tmpl or RVP.tmpl - def update(self, key, value): - if hasattr(self, key): - # Special case: the user might be trying to update `params` or `derived_params`, - # (which are dataclasses) by supplying a list of values (either a list, tuple of - # numpy array); if that's the case, cast those values into a new instance of the - # corresponding dataclass. - attr = getattr(self, key) - if is_dataclass(attr) and isinstance(value, (list, tuple, np.ndarray)): - value = attr.__class__(*value) - setattr(self, key, value) - return True - return False - def to_rv(self): d = { "params": self.params, @@ -545,7 +539,7 @@ def to_rv(self): ######### -class RVT(RVV): +class RVT(RV): tmpl = """ {gauge} @@ -765,7 +759,11 @@ def __init__(self, **kwargs): self.update(k, v) def update(self, key, value): + updated = False for rv in [self.rvc, self.rvi, self.rvh, self.rvp, self.rvt]: + # Note that in certain cases we might need to update a key + # for more than one rv object. if rv.update(key, value): - return True - raise AttributeError(f"No field named `{key}` found in any RV* conf class") + updated = True + if not updated: + raise AttributeError(f"No field named `{key}` found in any RV* conf class") diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py index 47403bda..1a128998 100644 --- a/ravenpy/models/emulators.py +++ b/ravenpy/models/emulators.py @@ -230,8 +230,6 @@ def __init__(self, *args, **kwds): self.config.rvc.soil0 = None self.config.rvc.soil1 = 15 - # self.rvd = RV(one_minus_CEMANEIGE_X2=None, GR4J_X1_hlf=None) - def derived_parameters(self): self.config.rvp.derived_params.GR4J_X1_hlf = ( self.config.rvp.params.GR4J_X1 * 1000.0 / 2.0 @@ -1243,18 +1241,67 @@ def derived_parameters(self): class BLENDED(Raven): identifier = "blended" - templates = tuple((Path(__file__).parent / "raven-blended").glob("*.rv?")) - params = namedtuple( - "BLENDEDParams", - ", ".join( - ["par_x{:02}".format(i) for i in range(1, 36)] - + ["par_r{:02}".format(i) for i in range(1, 9)] - ), - ) + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + par_x11: float = None + par_x12: float = None + par_x13: float = None + par_x14: float = None + par_x15: float = None + par_x16: float = None + par_x17: float = None + par_x18: float = None + par_x19: float = None + par_x20: float = None + par_x21: float = None + par_x22: float = None + par_x23: float = None + par_x24: float = None + par_x25: float = None + par_x26: float = None + par_x27: float = None + par_x28: float = None + par_x29: float = None + par_x30: float = None + par_x31: float = None + par_x32: float = None + par_x33: float = None + par_x34: float = None + par_x35: float = None + par_r01: float = None + par_r02: float = None + par_r03: float = None + par_r04: float = None + par_r05: float = None + par_r06: float = None + par_r07: float = None + par_r08: float = None + + @dataclass + class DerivedParams: + TOPSOIL_mm: float = None + PHREATIC_mm: float = None + TOPSOIL_hlf: float = None + PHREATIC_hlf: float = None + POW_X04: float = None + POW_X11: float = None + SUM_X09_X10: float = None + SUM_X13_X14: float = None + SUM_X24_X25: float = None @dataclass - class HRU(HRU): + class ForestHRU(HRU): land_use_class: str = "FOREST" veg_class: str = "FOREST" soil_profile: str = "DEFAULT_P" @@ -1263,53 +1310,285 @@ class HRU(HRU): def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvp = RVP( - params=BLENDED.params(*((None,) * len(BLENDED.params._fields))), + + self.config = Config( + hrus=(BLENDED.ForestHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=BLENDED.Params(), + derived_params=BLENDED.DerivedParams(), land_use_classes=( LU("FOREST", impermeable_frac=0.0, forest_coverage=0.02345), ), + evaporation="PET_OUDIN", + rain_snow_fraction="RAINSNOW_HBV", ) - self.rvh = RVH(hrus=(BLENDED.HRU(),)) - self.rvt = RVT() - self.rvi = RVI(evaporation="PET_OUDIN", rain_snow_fraction="RAINSNOW_HBV") - self.rvc = RVC(soil0=None, soil1=None, basin_state=BasinIndexCommand()) - self.rvd = RV( - TOPSOIL_mm=None, - PHREATIC_mm=None, - TOPSOIL_hlf=None, - PHREATIC_hlf=None, - POW_X04=None, - POW_X11=None, - SUM_X09_X10=None, - SUM_X13_X14=None, - SUM_X24_X25=None, - ) + + self.config.rvp.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "5.421821E-02" and "1.596675E-01" and "2.169724E-01" wouldn't be detectable) + # para_1.705806E+00 = 1.705806E+00 = para_x24 + para_x25 = 1.651588E+00 + 5.421821E-02 + # para_2.070342E-01 = 2.070342E-01 = para_x13 + para_x14 = 4.736668E-02 + 1.596675E-01 + # para_2.518350E-01 = 2.518350E-01 = para_x09 + para_x10 = 3.486263E-02 + 2.169724E-01 + # para_2.254976E-04 = 2.254976E-04 = 10^(para_x04) = 10^-3.646858E+00 + # para_2.279250E-04 = 2.279250E-04 = 10^(para_x11) = 10^-3.642208E+00 + + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + DEEP_GW + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + {land_use_classes} + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 3, TOPSOIL, {params.par_x29}, PHREATIC, {params.par_x30}, DEEP_GW, 1e6 + # DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Terrain Classes + #----------------------------------------------------------------- + :TerrainClasses + :Attributes, hillslope_len, drainage_dens, lambda, + :Units, ??, ??, ?? + DEFAULT_T, 1.0, 1.0, {params.par_x07} + # TOPMODEL_LAMBDA x(7) + :EndTerrainClasses + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN {params.par_x13} # x(13) + :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_X13_X14} # x(13)+x(14) + :GlobalParameter SWI_REDUCT_COEFF {params.par_x15} # x(15) + :GlobalParameter SNOW_SWI {params.par_x19} # x(19) + :GlobalParameter RAINSNOW_TEMP {params.par_x31} # x(31) + :GlobalParameter RAINSNOW_DELTA {params.par_x32} # x(32) + #:GlobalParameter TOC_MULTIPLIER 1.0 # + + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, {params.par_x28}, {params.par_x08}, {derived_params.POW_X04}, {params.par_x02}, {params.par_x03}, {params.par_x05}, {params.par_x06}, {derived_params.SUM_X09_X10}, {params.par_x09}, + PHREATIC, 1.0, {params.par_x35}, 0.0, {derived_params.POW_X11}, 0.0, 0.0, 0.0, {params.par_x12}, 0.0, 0.0, + DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), + # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, + # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT], {params.par_x24}, {derived_params.SUM_X24_X25}, {params.par_x26}, {params.par_x27}, {params.par_x18}, {params.par_x17}, {params.par_x16}, {params.par_x01}, + # x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, + :Units, -, -, -, -, -, + [DEFAULT], {params.par_x20}, {params.par_x21}, {params.par_x22}, {params.par_x23}, 0.0, + # x(20), x(21), x(22), x(23), 0.0, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO + :Units, -, -, - + [DEFAULT], 0.0, 0.0, 0.0 + :EndVegetationParameterList + + :SeasonalRelativeLAI + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeLAI + :SeasonalRelativeHeight + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeHeight + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :PotentialMeltMethod POTMELT_HMETS + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + :Evaporation {evaporation} # PET_OUDIN + :CatchmentRoute ROUTE_DUMP + :Routing ROUTE_NONE + :SoilModel SOIL_MULTILAYER 3 + + :Alias DELAYED_RUNOFF CONVOLUTION[1] + + :HydrologicProcesses + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :ProcessGroup #infiltration group + :Infiltration INF_HMETS PONDED_WATER MULTIPLE + :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE + :Infiltration INF_HBV PONDED_WATER MULTIPLE + :EndProcessGroup CALCULATE_WTS {params.par_r01} {params.par_r02} + # para_r01 para_r02 + :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really + :Baseflow BASE_VIC SOIL[0] SURFACE_WATER + :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS {params.par_r03} {params.par_r04} + # para_r03 para_r04 + :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge + :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF + :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) + :ProcessGroup #evaporation group + :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET + :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET + :EndProcessGroup CALCULATE_WTS {params.par_r05} + # para_r05 + :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' + :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER + :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS {params.par_r06} + # para_r06 + :ProcessGroup #snow balance group + :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER + :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE + #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE + :EndProcessGroup CALCULATE_WTS {params.par_r07} {params.par_r08} + # para_r07 para_r08 + :EndHydrologicProcesses + + #:CreateRVPTemplate + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hmets + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.params = self.config.rvp.params + + self.config.rvc.tmpl = """ + # initialize to 1/2 full + # x(29)*1000/2 + :UniformInitialConditions SOIL[0] {TOPSOIL_hlf} + # x(30)*1000/2 + :UniformInitialConditions SOIL[1] {PHREATIC_hlf} + + :HRUStateVariableTable (formerly :InitialConditionsTable) + :Attributes SOIL[0] SOIL[1] + :Units mm mm + 1 {TOPSOIL_hlf} {PHREATIC_hlf} + # x(29)*1000/2 x(30)*1000/2 + :EndHRUStateVariableTable + """ + + self.config.rvc.soil0 = None + self.config.rvc.soil1 = None + self.config.rvc.basin_states[1] = BasinIndexCommand() def derived_parameters(self): - self.rvd["TOPSOIL_hlf"] = self.rvp.params.par_x29 * 0.5 * 1000.0 - self.rvd["PHREATIC_hlf"] = self.rvp.params.par_x30 * 0.5 * 1000.0 - self.rvd["TOPSOIL_mm"] = self.rvp.params.par_x29 * 1000.0 - self.rvd["PHREATIC_mm"] = self.rvp.params.par_x30 * 1000.0 - self.rvd["SUM_X09_X10"] = self.rvp.params.par_x10 # + self.rvp.params.par_x09 - self.rvd["SUM_X13_X14"] = self.rvp.params.par_x14 # + self.rvp.params.par_x13 - self.rvd["SUM_X24_X25"] = self.rvp.params.par_x25 # + self.rvp.params.par_x24 - # 10.0**self.rvp.params.par_x04 # - self.rvd["POW_X04"] = self.rvp.params.par_x04 - # 10.0**self.rvp.params.par_x11 # - self.rvd["POW_X11"] = self.rvp.params.par_x11 + self.config.rvp.derived_params.TOPSOIL_hlf = ( + self.config.rvp.params.par_x29 * 0.5 * 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_hlf = ( + self.config.rvp.params.par_x30 * 0.5 * 1000.0 + ) + self.config.rvp.derived_params.TOPSOIL_mm = ( + self.config.rvp.params.par_x29 * 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_mm = ( + self.config.rvp.params.par_x30 * 1000.0 + ) + self.config.rvp.derived_params.SUM_X09_X10 = ( + self.config.rvp.params.par_x10 + ) # + self.config.rvp.params.par_x09 + self.config.rvp.derived_params.SUM_X13_X14 = ( + self.config.rvp.params.par_x14 + ) # + self.config.rvp.params.par_x13 + self.config.rvp.derived_params.SUM_X24_X25 = ( + self.config.rvp.params.par_x25 + ) # + self.config.rvp.params.par_x24 + # 10.0**self.config.rvp.params.par_x04 # + self.config.rvp.derived_params.POW_X04 = self.config.rvp.params.par_x04 + # 10.0**self.config.rvp.params.par_x11 # + self.config.rvp.derived_params.POW_X11 = self.config.rvp.params.par_x11 + + self.config.rvc.TOPSOIL_hlf = self.config.rvp.derived_params.TOPSOIL_hlf + self.config.rvc.PHREATIC_hlf = self.config.rvp.derived_params.PHREATIC_hlf # Default initial conditions if none are given - if self.rvc.hru_state is None: - soil0 = ( - self.rvd["TOPSOIL_hlf"] if self.rvc.soil0 is None else self.rvc.soil0 - ) - soil1 = ( - self.rvd["PHREATIC_hlf"] if self.rvc.soil1 is None else self.rvc.soil1 - ) - self.rvc.hru_state = HRUState(soil0=soil0, soil1=soil1) - - self.rvt.raincorrection = self.rvp.params.par_x33 - self.rvt.snowcorrection = self.rvp.params.par_x34 + # if not self.config.rvc.hru_states: + # soil0 = ( + # self.config.rvp.derived_params.TOPSOIL_hlf if self.config.rvc.soil0 is None else self.config.rvc.soil0 + # ) + # soil1 = ( + # self.config.rvp.derived_params.PHREATIC_hlf if self.config.rvc.soil1 is None else self.config.rvc.soil1 + # ) + # self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) + + self.config.rvt.rain_correction = self.config.rvp.params.par_x33 + self.config.rvt.snow_correction = self.config.rvp.params.par_x34 class BLENDED_OST(Ostrich, BLENDED): diff --git a/ravenpy/models/raven-blended/raven-blended.rvc b/ravenpy/models/raven-blended/raven-blended.rvc deleted file mode 100644 index eee4ab0d..00000000 --- a/ravenpy/models/raven-blended/raven-blended.rvc +++ /dev/null @@ -1,21 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Mar 2021 -# -# Emulation of BLENDED simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# initialize to 1/2 full -# x(29)*1000/2 -:UniformInitialConditions SOIL[0] {TOPSOIL_hlf} -# x(30)*1000/2 -:UniformInitialConditions SOIL[1] {PHREATIC_hlf} - -:HRUStateVariableTable (formerly :InitialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 {TOPSOIL_hlf} {PHREATIC_hlf} - # x(29)*1000/2 x(30)*1000/2 -:EndHRUStateVariableTable diff --git a/ravenpy/models/raven-blended/raven-blended.rvh b/ravenpy/models/raven-blended/raven-blended.rvh deleted file mode 100644 index 5380eaf4..00000000 --- a/ravenpy/models/raven-blended/raven-blended.rvh +++ /dev/null @@ -1,16 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Mar 2021 -# -# Emulation of BLENDED simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -# -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, {name}, -1, NONE, _AUTO, 1 -:EndSubBasins - -{hrus_cmd} diff --git a/ravenpy/models/raven-blended/raven-blended.rvi b/ravenpy/models/raven-blended/raven-blended.rvi deleted file mode 100644 index 0e506d71..00000000 --- a/ravenpy/models/raven-blended/raven-blended.rvi +++ /dev/null @@ -1,88 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 2.8.2 -:WrittenBy James Craig & Juliane Mai -:CreationDate Mar 2021 -# -# Emulation of BLENDED simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -# - -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -:PotentialMeltMethod POTMELT_HMETS -:RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV -:Evaporation {evaporation} # PET_OUDIN -:CatchmentRoute ROUTE_DUMP -:Routing ROUTE_NONE -:SoilModel SOIL_MULTILAYER 3 - -:Alias DELAYED_RUNOFF CONVOLUTION[1] - -:HydrologicProcesses - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :ProcessGroup #infiltration group - :Infiltration INF_HMETS PONDED_WATER MULTIPLE - :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE - :Infiltration INF_HBV PONDED_WATER MULTIPLE - :EndProcessGroup CALCULATE_WTS {params.par_r01} {params.par_r02} - # para_r01 para_r02 - :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really - :Baseflow BASE_VIC SOIL[0] SURFACE_WATER - :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS {params.par_r03} {params.par_r04} - # para_r03 para_r04 - :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge - :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF - :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) - :ProcessGroup #evaporation group - :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET - :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET - :EndProcessGroup CALCULATE_WTS {params.par_r05} - # para_r05 - :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' - :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER - :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS {params.par_r06} - # para_r06 - :ProcessGroup #snow balance group - :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER - :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE - #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE - :EndProcessGroup CALCULATE_WTS {params.par_r07} {params.par_r08} - # para_r07 para_r08 -:EndHydrologicProcesses - -#:CreateRVPTemplate - -#--------------------------------------------------------- -# Output Options -# -#:WriteForcingFunctions -:EvaluationMetrics {evaluation_metrics} -:WriteNetcdfFormat yes -#:NoisyMode -:SilentMode -:PavicsMode -{suppress_output} - -:NetCDFAttribute title Simulated river discharge -:NetCDFAttribute history Created on {now} by Raven -:NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). -:NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - -:NetCDFAttribute model_id hmets - -:NetCDFAttribute time_frequency day -:NetCDFAttribute time_coverage_start {start_date} -:NetCDFAttribute time_coverage_end {end_date} diff --git a/ravenpy/models/raven-blended/raven-blended.rvp b/ravenpy/models/raven-blended/raven-blended.rvp deleted file mode 100644 index 62a9baaf..00000000 --- a/ravenpy/models/raven-blended/raven-blended.rvp +++ /dev/null @@ -1,133 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Mar 2021 -# -# Emulation of BLENDED simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -#----------------------------------------------------------------- -# Raven Properties file Template. Created by Raven v2.8.2 -#----------------------------------------------------------------- - -######################################################################### -:FileType rvp ASCII Raven 3.0.4 -:WrittenBy Juliane Mai & James Craig -:CreationDate Feb 2021 -# -# Emulation of Blended model simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "5.421821E-02" and "1.596675E-01" and "2.169724E-01" wouldn't be detectable) -# para_1.705806E+00 = 1.705806E+00 = para_x24 + para_x25 = 1.651588E+00 + 5.421821E-02 -# para_2.070342E-01 = 2.070342E-01 = para_x13 + para_x14 = 4.736668E-02 + 1.596675E-01 -# para_2.518350E-01 = 2.518350E-01 = para_x09 + para_x10 = 3.486263E-02 + 2.169724E-01 -# para_2.254976E-04 = 2.254976E-04 = 10^(para_x04) = 10^-3.646858E+00 -# para_2.279250E-04 = 2.279250E-04 = 10^(para_x11) = 10^-3.642208E+00 - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, - DEEP_GW -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -{land_use_classes_cmd} - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 3, TOPSOIL, {params.par_x29}, PHREATIC, {params.par_x30}, DEEP_GW, 1e6 -# DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 -:EndSoilProfiles - -#----------------------------------------------------------------- -# Terrain Classes -#----------------------------------------------------------------- -:TerrainClasses - :Attributes, hillslope_len, drainage_dens, lambda, - :Units, ??, ??, ?? - DEFAULT_T, 1.0, 1.0, {params.par_x07} -# TOPMODEL_LAMBDA x(7) -:EndTerrainClasses - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -:GlobalParameter SNOW_SWI_MIN {params.par_x13} # x(13) -:GlobalParameter SNOW_SWI_MAX {SUM_X13_X14} # x(13)+x(14) -:GlobalParameter SWI_REDUCT_COEFF {params.par_x15} # x(15) -:GlobalParameter SNOW_SWI {params.par_x19} # x(19) -:GlobalParameter RAINSNOW_TEMP {params.par_x31} # x(31) -:GlobalParameter RAINSNOW_DELTA {params.par_x32} # x(32) -#:GlobalParameter TOC_MULTIPLIER 1.0 # - - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, {params.par_x28}, {params.par_x08}, {POW_X04}, {params.par_x02}, {params.par_x03}, {params.par_x05}, {params.par_x06}, {SUM_X09_X10}, {params.par_x09}, - PHREATIC, 1.0, {params.par_x35}, 0.0, {POW_X11}, 0.0, 0.0, 0.0, {params.par_x12}, 0.0, 0.0, - DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), - # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, - # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT], {params.par_x24}, {SUM_X24_X25}, {params.par_x26}, {params.par_x27}, {params.par_x18}, {params.par_x17}, {params.par_x16}, {params.par_x01}, -# x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), -:EndLandUseParameterList -:LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, - :Units, -, -, -, -, -, - [DEFAULT], {params.par_x20}, {params.par_x21}, {params.par_x22}, {params.par_x23}, 0.0, - # x(20), x(21), x(22), x(23), 0.0, -:EndLandUseParameterList - -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO - :Units, -, -, - - [DEFAULT], 0.0, 0.0, 0.0 -:EndVegetationParameterList - -:SeasonalRelativeLAI - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -:EndSeasonalRelativeLAI -:SeasonalRelativeHeight - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -:EndSeasonalRelativeHeight diff --git a/ravenpy/models/raven-blended/raven-blended.rvt b/ravenpy/models/raven-blended/raven-blended.rvt deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/raven-blended/raven-blended.rvt +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file diff --git a/tests/test_ECCC_forecast.py b/tests/test_ECCC_forecast.py index 8683a43e..ac2cc3a5 100644 --- a/tests/test_ECCC_forecast.py +++ b/tests/test_ECCC_forecast.py @@ -46,7 +46,7 @@ def test_forecasting_GEPS(self): model = GR4JCN("/tmp/ravenpy_debug/test_forecasting_GEPS") - model.rvc.parse(rvc.read_text()) + model.config.rvc.set_from_solution(rvc.read_text()) model( ts=(ts20,), diff --git a/tests/test_blended.py b/tests/test_blended.py index 66f7ea8f..bd3e7812 100644 --- a/tests/test_blended.py +++ b/tests/test_blended.py @@ -12,7 +12,7 @@ "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc" ) -hru = BLENDED.HRU( +hru = BLENDED.ForestHRU( area=4250.6, elevation=843.0, latitude=54.4848, longitude=-123.3659, slope=0.01234 ) From 953f5c3e57f31707613fa00c88a9833ee4cceda2 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 6 Apr 2021 16:54:29 -0400 Subject: [PATCH 13/59] WIP --- ravenpy/config/rvs.py | 135 +- ravenpy/models/__init__.py | 30 +- ravenpy/models/base.py | 199 +-- ravenpy/models/emulators.py | 1837 -------------------------- ravenpy/models/emulators/__init__.py | 5 + ravenpy/models/emulators/blended.py | 494 +++++++ ravenpy/models/emulators/gr4jcn.py | 458 +++++++ ravenpy/models/emulators/hbvec.py | 569 ++++++++ ravenpy/models/emulators/hmets.py | 518 ++++++++ ravenpy/models/emulators/mohyse.py | 426 ++++++ ravenpy/models/multimodel.py | 2 +- ravenpy/models/rv.py | 72 +- tests/test_emulators.py | 34 +- 13 files changed, 2706 insertions(+), 2073 deletions(-) delete mode 100644 ravenpy/models/emulators.py create mode 100644 ravenpy/models/emulators/__init__.py create mode 100644 ravenpy/models/emulators/blended.py create mode 100644 ravenpy/models/emulators/gr4jcn.py create mode 100644 ravenpy/models/emulators/hbvec.py create mode 100644 ravenpy/models/emulators/hmets.py create mode 100644 ravenpy/models/emulators/mohyse.py diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index e6e1f7e1..e6dd1cf4 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -36,6 +36,10 @@ class RV: + def __init__(self, **kwds): + # TODO: find something better than this! + self.is_ostrich_tmpl = False + def update(self, key, value): if hasattr(self, key): # Special case: the user might be trying to update `params` or `derived_params`, @@ -77,6 +81,7 @@ class RVC(RV): """ def __init__(self, tmpl=None): + super().__init__() self.hru_states = {} self.basin_states = {} @@ -185,6 +190,7 @@ class RVH(RV): """ def __init__(self, tmpl=None): + super().__init__() self.hrus = () self.subbasins = () self.land_subbasin_ids = () @@ -262,16 +268,18 @@ class RVI(RV): ) def __init__(self, tmpl=None): + super().__init__() self.name = None self.area = None self.elevation = None self.latitude = None self.longitude = None + self.run_name = "run" self.run_index = 0 self.raven_version = "3.0.1 rev#275" + self.time_step = 1.0 self._routing = "ROUTE_NONE" - self._run_name = "run" self._start_date = None self._end_date = None self._now = None @@ -279,24 +287,12 @@ def __init__(self, tmpl=None): self._evaporation = None self._ow_evaporation = None self._duration = 1 - self._time_step = 1.0 self._evaluation_metrics = "NASH_SUTCLIFFE RMSE" self._suppress_output = False self._calendar = "standard" self.tmpl = tmpl or RVI.tmpl - @property - def run_name(self): - return self._run_name - - @run_name.setter - def run_name(self, x): - if isinstance(x, str): - self._run_name = x - else: - raise ValueError("Must be string") - @property def start_date(self): return self._start_date @@ -345,14 +341,6 @@ def duration(self, x): if x > 0: self._update_end_date() - @property - def time_step(self): - return self._time_step - - @time_step.setter - def time_step(self, x): - self._time_step = x - @property def evaluation_metrics(self): return self._evaluation_metrics @@ -507,6 +495,8 @@ class RVP(RV): """ def __init__(self, tmpl=None): + super().__init__() + # Model specific params and derived params self.params = None self.derived_params = None @@ -578,6 +568,7 @@ class RVT(RV): } def __init__(self, rvh, tmpl=None): + super().__init__() self._rvh = rvh self._var_cmds = { @@ -747,23 +738,97 @@ def to_rv(self): return dedent(self.tmpl).format(**d) +######### +# O s t # +######### + + +class Ost(RV): + + tmpl = """ + """ + + def __init__(self, tmpl=None, identifier=None): + super().__init__() + + self._max_iterations = None + self._random_seed = None + self.lowerBounds = None + self.upperBounds = None + self.algorithm = None + + # TODO: find something better than this + self.identifier = identifier + + self.tmpl = tmpl or Ost.tmpl + + @property + def max_iterations(self): + return self._max_iterations + + @max_iterations.setter + def max_iterations(self, x): + if x < 1: + raise ValueError("Max iteration should be a positive integer: {}".format(x)) + else: + self._max_iterations = x + + @property + def random_seed(self): + if self._random_seed is not None: + return "RandomSeed {}".format(self._random_seed) + return "" + + @random_seed.setter + def random_seed(self, value): + if value >= 0: + self._random_seed = value + else: + self._random_seed = None + + def to_rv(self): + # Attributes + a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) + + # Properties + p = list( + filter( + lambda x: isinstance(getattr(self.__class__, x, None), property), + dir(self), + ) + ) + + d = {attr: getattr(self, attr) for attr in a + p} + + return dedent(self.tmpl).format(**d) + + class Config: - def __init__(self, **kwargs): + def __init__(self, identifier, **kwargs): self.rvc = RVC() self.rvh = RVH() self.rvi = RVI() self.rvp = RVP() self.rvt = RVT(self.rvh) - - for k, v in kwargs.items(): - self.update(k, v) - - def update(self, key, value): - updated = False - for rv in [self.rvc, self.rvi, self.rvh, self.rvp, self.rvt]: - # Note that in certain cases we might need to update a key - # for more than one rv object. - if rv.update(key, value): - updated = True - if not updated: - raise AttributeError(f"No field named `{key}` found in any RV* conf class") + self.ost = Ost(identifier=identifier) + self.identifier = identifier + self.update(**kwargs) + + def update(self, key=None, value=None, **kwargs): + def _update_single(key, value): + updated = False + for rv in [self.rvc, self.rvi, self.rvh, self.rvp, self.rvt, self.ost]: + # Note that in certain cases we might need to update a key + # for more than one rv object. + if rv.update(key, value): + updated = True + if not updated: + raise AttributeError( + f"No field named `{key}` found in any RV* conf class" + ) + + if key is None and value is None: + for k, v in kwargs.items(): + _update_single(k, v) + else: + _update_single(key, value) diff --git a/ravenpy/models/__init__.py b/ravenpy/models/__init__.py index 5b772108..8cde7918 100644 --- a/ravenpy/models/__init__.py +++ b/ravenpy/models/__init__.py @@ -5,20 +5,20 @@ from .multimodel import RavenMultiModel from .rv import HRU, LU, RV, HRUState, Sub -_dir = os.path.abspath(os.path.dirname(__file__)) +# _dir = os.path.abspath(os.path.dirname(__file__)) -raven_templates = { - "raven-gr4j-cemaneige": os.path.join(_dir, "raven-gr4j-cemaneige"), - "raven-mohyse": os.path.join(_dir, "raven-mohyse"), - "raven-hmets": os.path.join(_dir, "raven-hmets"), - "raven-hbv-ec": os.path.join(_dir, "raven-hbv-ec"), - "raven-blended": os.path.join(_dir, "raven-blended"), -} +# raven_templates = { +# "raven-gr4j-cemaneige": os.path.join(_dir, "raven-gr4j-cemaneige"), +# "raven-mohyse": os.path.join(_dir, "raven-mohyse"), +# "raven-hmets": os.path.join(_dir, "raven-hmets"), +# "raven-hbv-ec": os.path.join(_dir, "raven-hbv-ec"), +# "raven-blended": os.path.join(_dir, "raven-blended"), +# } -ostrich_templates = { - "ostrich-gr4j-cemaneige": os.path.join(_dir, "ostrich-gr4j-cemaneige"), - "ostrich-mohyse": os.path.join(_dir, "ostrich-mohyse"), - "ostrich-hmets": os.path.join(_dir, "ostrich-hmets"), - "ostrich-hbv-ec": os.path.join(_dir, "ostrich-hbv-ec"), - "ostrich-blended": os.path.join(_dir, "ostrich-blended"), -} +# ostrich_templates = { +# "ostrich-gr4j-cemaneige": os.path.join(_dir, "ostrich-gr4j-cemaneige"), +# "ostrich-mohyse": os.path.join(_dir, "ostrich-mohyse"), +# "ostrich-hmets": os.path.join(_dir, "ostrich-hmets"), +# "ostrich-hbv-ec": os.path.join(_dir, "ostrich-hbv-ec"), +# "ostrich-blended": os.path.join(_dir, "ostrich-blended"), +# } diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 8cdc1e2f..ef9d9cf8 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -15,7 +15,7 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to import subprocess import tempfile from collections import OrderedDict -from dataclasses import replace +from dataclasses import astuple, fields, replace from pathlib import Path from typing import Union @@ -30,9 +30,9 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to ObservationDataCommand, StationForcingCommand, ) -from ravenpy.config.rvs import RVC, RVI +from ravenpy.config.rvs import RVC, RVI, Config -from .rv import RV, Ost, RVFile, isinstance_namedtuple +from .rv import RV, RVFile RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -50,18 +50,12 @@ class Raven: r.configure() """ - identifier = "generic-raven" - templates = () - - # Allowed configuration file extensions - _rvext = [] - _parallel_parameters = [ "params", "hru_state", "basin_state", "nc_index", - "name", + # "name", "area", "elevation", "latitude", @@ -69,7 +63,7 @@ class Raven: "region_id", ] - def __init__(self, workdir: Union[str, Path] = None): + def __init__(self, workdir: Union[str, Path] = None, identifier: str = None): """Initialize the RAVEN model. Directory for the model configuration and outputs. If None, a temporary directory will be created. @@ -89,23 +83,15 @@ def __init__(self, workdir: Union[str, Path] = None): self.ostrich_exec = OSTRICH_EXEC_PATH workdir = workdir or tempfile.mkdtemp() - self._rvs = [] self.workdir = Path(workdir) self.ind_outputs = {} # Individual files for all simulations self.outputs = {} # Aggregated files self.singularity = False # Set to True to launch Raven with singularity. self.raven_simg = None # ravenpy.raven_simg - self._name = None + # self._name = None self._defaults = {} - self.rvfiles = {} - - # Configuration file extensions + rvd for derived parameters. - self._rvext = self._rvext # + ("rvd",) - - # For subclasses where the configuration file templates are known in advance. - if self.templates: - self.configure(self.templates) + # self.rvfiles = {} # Directory logic # Top directory inside workdir. This is where Ostrich and its config and templates are stored. @@ -118,6 +104,8 @@ def __init__(self, workdir: Union[str, Path] = None): self._psim = 0 self._pdim = None # Parallel dimension (either initparam, params or region) + self.config = Config(identifier=identifier or self.__class__.__name__.lower()) + @property def output_path(self): return self.model_path / self.output_dir @@ -167,7 +155,7 @@ def cmd(self): @property def bash_cmd(self): """Bash command arguments.""" - return [self.cmd, self.name, "-o", str(self.output_path)] + return [self.cmd, self.config.identifier, "-o", str(self.output_path)] @property def singularity_cmd(self): @@ -180,7 +168,7 @@ def singularity_cmd(self): "--bind", "{}:/data_out:rw".format(self.output_path), self.raven_simg, - self.name, + self.config.identifier, ] @property @@ -188,54 +176,14 @@ def cmd_path(self): """This is the main executable.""" return self.model_path - @property - def name(self): - """Name of the model configuration.""" - return self._name - - @name.setter - def name(self, x): - self._name = x + # @property + # def name(self): + # """Name of the model configuration.""" + # return self._name - @property - def configuration(self): - """Configuration dictionaries.""" - return {ext: OrderedDict(getattr(self, ext).items()) for ext in self._rvext} - - @property - def parameters(self): - """Dictionary storing all parameters.""" - params = {} - for key, val in self.configuration.items(): - params.update(val) - return params - - @property - def rvobjs(self): - """Generator for (ext, rv object).""" - return {ext: getattr(self, ext) for ext in self._rvext} - - def configure(self, fns): - """Read configuration files.""" - for fn in fns: - rvf = RVFile(fn) - if rvf.ext in ["rvt", "rvh", "rvp", "rvc", "rvi"]: - continue - - if rvf.ext not in ("txt",): - raise ValueError( - "rv contains unrecognized configuration file keys : {}.".format( - rvf.ext - ) - ) - else: - if rvf.ext.startswith("rv"): - setattr(self, "name", rvf.stem) - self.rvfiles[rvf.ext] = rvf - elif rvf.ext == "txt": - self.rvfiles[rvf.stem] = rvf - else: - raise ValueError + # @name.setter + # def name(self, x): + # self._name = x def derived_parameters(self): """Subclassed by emulators. Defines model parameters that are a function of other parameters.""" @@ -244,39 +192,28 @@ def derived_parameters(self): def _dump_rv(self): """Write configuration files to disk.""" - params = self.parameters - - # stem = "raven-gr4j-cemaneige" - # stem = "raven-routing" - stem = "toto" + identifier = self.config.identifier - self.name = stem - - with open(self.model_path / f"{stem}.rvt", "w") as f: - f.write(self.config.rvt.to_rv()) - - with open(self.model_path / f"{stem}.rvh", "w") as f: - f.write(self.config.rvh.to_rv()) - - with open(self.model_path / f"{stem}.rvp", "w") as f: - f.write(self.config.rvp.to_rv()) + # RVs + for rvs in ["rvt", "rvh", "rvp", "rvc", "rvi"]: + rvo = getattr(self.config, rvs) + if rvo.is_ostrich_tmpl: + fn = self.exec_path / f"{identifier}.{rvs}.tpl" + else: + fn = self.model_path / f"{identifier}.{rvs}" + with open(fn, "w") as f: + f.write(rvo.to_rv()) - with open(self.model_path / f"{stem}.rvc", "w") as f: - f.write(self.config.rvc.to_rv()) + # OST + with open(self.exec_path / f"ostIn.txt", "w") as f: + f.write(self.config.ost.to_rv()) - with open(self.model_path / f"{stem}.rvi", "w") as f: - f.write(self.config.rvi.to_rv()) + import shutil - for rvf in self.rvfiles.values(): - p = self.exec_path if rvf.is_tpl else self.model_path - if ( - rvf.stem == "OstRandomNumbers" - and isinstance(self.txt, Ost) - and self.txt.random_seed == "" - ): - continue - fn = rvf.write(p, **params) - self._rvs.append(fn) + shutil.copy( + "/home/christian/gh/RavenPy/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt", + self.exec_path / "OstRandomNumbers.txt", + ) def setup(self, overwrite=False): """Create directory structure to store model input files, executable and output results. @@ -386,7 +323,11 @@ def run(self, ts, overwrite=False, **kwds): for p in self._parallel_parameters: a = kwds.pop(p, None) - if a is not None and p in ["params"]: + if ( + a is not None + and p == "params" + and not isinstance(a, self.__class__.Params) + ): pdict[p] = np.atleast_2d(a) else: pdict[p] = np.atleast_1d(a) @@ -426,23 +367,8 @@ def run(self, ts, overwrite=False, **kwds): # Update non-parallel parameter objects for key, val in kwds.items(): - self.config.update(key, val) - # if key in self._rvext: - # obj = getattr(self, key) - # if isinstance(val, dict): - # obj.update(val) - # elif isinstance(val, RV): - # setattr(self, key, val) - # else: - # raise ValueError( - # "A dictionary or an RV instance is expected to update the values " - # "for {}.".format(key) - # ) - # else: - # self.assign(key, val) - if self.config.rvi: self.handle_date_defaults(ts) self.set_calendar(ts) @@ -454,7 +380,6 @@ def run(self, ts, overwrite=False, **kwds): for self.psim in range(nloops): for key, val in pdict.items(): if val[self.psim] is not None: - # self.assign(key, val[self.psim]) self.config.update(key, val[self.psim]) cmd = self.setup_model_run(tuple(map(Path, ts))) @@ -535,7 +460,8 @@ def parse_results(self, path=None, run_name=None): self.ind_outputs[key] = fns self.outputs[key] = self._merge_output(fns, pattern[1:]) - self.outputs["rv_config"] = self._merge_output(self.rvs, "rv.zip") + # TODO!!! + self.outputs["rv_config"] = self._merge_output([], "rv.zip") def _merge_output(self, files, name): """Merge multiple output files into one if possible, otherwise return a list of files.""" @@ -637,9 +563,9 @@ def handle_date_defaults(self, ts): if rvi.end_date in [None, dt.datetime(1, 1, 1)]: rvi.end_date = end - @property - def rvs(self): - return self._rvs + # @property + # def rvs(self): + # return self._rvs @property def q_sim(self): @@ -721,14 +647,14 @@ def diagnostics(self): return diag if len(diag) > 1 else diag[0] - @property - def tags(self): - """Return a list of tags within the templates.""" - out = [] - for rvf in self.rvfiles.values(): - out.extend(rvf.tags) + # @property + # def tags(self): + # """Return a list of tags within the templates.""" + # out = [] + # for rvf in self.rvfiles.values(): + # out.extend(rvf.tags) - return out + # return out @staticmethod def split_ext(fn): @@ -786,10 +712,6 @@ class Ostrich(Raven): >>> r.configure() """ - identifier = "generic-ostrich" - _rvext = ("rvi", "rvp", "rvc", "rvh", "rvt", "txt") - txt = RV() - @property def model_path(self): return self.exec_path / self.model_dir @@ -825,7 +747,7 @@ def write_save_best(self): def write_ostrich_runs_raven(self): fn = self.exec_path / "ostrich-runs-raven.sh" - fn.write_text(ostrich_runs_raven.format(name=self.name)) + fn.write_text(ostrich_runs_raven.format(identifier=self.config.identifier)) make_executable(fn) def setup(self, overwrite=False): @@ -863,7 +785,9 @@ def parse_results(self): self.outputs[key] = fns try: - self.outputs["calibparams"] = ", ".join(map(str, self.calibrated_params)) + self.outputs["calibparams"] = ", ".join( + map(str, astuple(self.calibrated_params)) + ) except (AttributeError, TypeError): err = self.parse_errors() raise UserWarning(err) @@ -912,11 +836,12 @@ def ost2raven(self, ops): This method should be subclassed by emulators for which Ostrich has different parameters than the original Raven model. """ - if hasattr(self, "params"): - n = len(self.params._fields) + + if hasattr(self.config.rvp, "params"): + n = len(fields(self.config.rvp.params)) pattern = "par_x{}" if n < 8 else "par_x{:02}" names = [pattern.format(i + 1) for i in range(n)] - return self.params(*(ops[n] for n in names)) + return self.__class__.Params(*[ops[n] for n in names]) else: return ops.values() @@ -987,7 +912,7 @@ def get_average_annual_runoff( cp ./*.rv? model/ -./model/raven ./model/{name} -o ./model/output/ +./model/raven ./model/{identifier} -o ./model/output/ exit 0 """ diff --git a/ravenpy/models/emulators.py b/ravenpy/models/emulators.py deleted file mode 100644 index 1a128998..00000000 --- a/ravenpy/models/emulators.py +++ /dev/null @@ -1,1837 +0,0 @@ -from collections import defaultdict, namedtuple -from dataclasses import dataclass -from pathlib import Path - -import xarray as xr - -from ravenpy.config.commands import BasinIndexCommand -from ravenpy.config.rvs import Config - -from .base import Ostrich, Raven -from .rv import HRU, LU, RV, HRUState, Ost, Sub - -__all__ = [ - "GR4JCN", - "MOHYSE", - "HMETS", - "HBVEC", - "BLENDED", - "GR4JCN_OST", - "MOHYSE_OST", - "HMETS_OST", - "HBVEC_OST", - "BLENDED_OST", - "get_model", - "Routing", -] - - -class GR4JCN(Raven): - """GR4J + Cemaneige global hydrological model - - References - ---------- - Perrin, C., C. Michel and V. Andréassian (2003). Improvement of a parsimonious model for streamflow simulation. - Journal of Hydrology, 279(1-4), 275-289. doi: 10.1016/S0022-1694(03)00225-7. - - Valéry, Audrey, Vazken Andréassian, and Charles Perrin. 2014. “’As Simple as Possible but Not Simpler’: What Is - Useful in a Temperature-Based Snow-Accounting Routine? Part 2 - Sensitivity Analysis of the Cemaneige Snow - Accounting Routine on 380 Catchments.” Journal of Hydrology, no. 517(0): 1176–87, - doi: 10.1016/j.jhydrol.2014.04.058. - """ - - identifier = "gr4jcn" - - @dataclass - class Params: - GR4J_X1: float = None - GR4J_X2: float = None - GR4J_X3: float = None - GR4J_X4: float = None - CEMANEIGE_X1: float = None - CEMANEIGE_X2: float = None - - @dataclass - class DerivedParams: - one_minus_CEMANEIGE_X2: float = None - GR4J_X1_hlf: float = None - - @dataclass - class LandHRU(HRU): - land_use_class: str = "LU_ALL" - veg_class: str = "VEG_ALL" - soil_profile: str = "DEFAULT_P" - aquifer_profile: str = "[NONE]" - terrain_class: str = "[NONE]" - _hru_type: str = "land" - - @dataclass - class LakeHRU(HRU): - land_use_class: str = "LU_WATER" - veg_class: str = "VEG_WATER" - soil_profile: str = "LAKE" - aquifer_profile: str = "[NONE]" - terrain_class: str = "[NONE]" - _hru_type: str = "lake" - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - self.config = Config( - hrus=(GR4JCN.LandHRU(),), - subbasins=( - Sub( - subbasin_id=1, - name="sub_001", - downstream_id=-1, - profile="None", - gauged=True, - ), - ), - params=GR4JCN.Params(), - derived_params=GR4JCN.DerivedParams(), - ) - - self.config.rvp.tmpl = """ - # -Global snow parameters------------------------------------- - :RainSnowTransition 0 1.0 - :AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 - :AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 - - # -Orographic Corrections------------------------------------- - :PrecipitationLapseRate 0.0004 - :AdiabaticLapseRate 0.0065 - - # - Soil classes --------------------------------------------- - :SoilClasses - :Attributes - :Units - SOIL_PROD - SOIL_ROUT - SOIL_TEMP - SOIL_GW - AQUIFER - :EndSoilClasses - :SoilParameterList - :Parameters, POROSITY , GR4J_X3, GR4J_X2 - :Units , none , mm, mm/d - [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} - :EndSoilParameterList - - # ----Soil Profiles-------------------------------------------- - # name,#horizons,(soiltype,thickness)x(#horizons) - # GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} - :SoilProfiles - DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, - LAKE, 0 - :EndSoilProfiles - - # ----Vegetation Classes--------------------------------------- - :VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 0.0, 0.0, 0.0 - VEG_WATER, 0.0, 0.0, 0.0 - :EndVegetationClasses - - # --Land Use Classes------------------------------------------ - :LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units , frac, frac - LU_ALL, 0.0, 0.0 - LU_WATER, 0.0, 0.0 - :EndLandUseClasses - :LandUseParameterList - :Parameters, GR4J_X4, MELT_FACTOR - :Units , d, mm/d/C - [DEFAULT], {params.GR4J_X4}, 7.73 - :EndLandUseParameterList - - {avg_annual_runoff} - - # List of channel profiles - {channel_profiles} - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - :SoilModel SOIL_MULTILAYER 4 - {routing} - :CatchmentRoute ROUTE_DUMP - :Evaporation {evaporation} # PET_OUDIN - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_DINGMAN - :PotentialMeltMethod POTMELT_DEGREE_DAY - :OroTempCorrect OROCORR_SIMPLELAPSE - :OroPrecipCorrect OROCORR_SIMPLELAPSE - - #------------------------------------------------------------------------ - # Soil Layer Alias Definitions - # - :Alias PRODUCT_STORE SOIL[0] - :Alias ROUTING_STORE SOIL[1] - :Alias TEMP_STORE SOIL[2] - :Alias GW_STORE SOIL[3] - - #------------------------------------------------------------------------ - # Hydrologic process order for GR4J Emulation - # - :HydrologicProcesses - :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE - :SnowTempEvolve SNOTEMP_NEWTONS SNOW_TEMP - :SnowBalance SNOBAL_CEMA_NIEGE SNOW PONDED_WATER - :OpenWaterEvaporation OPEN_WATER_EVAP PONDED_WATER ATMOSPHERE # Pn - :Infiltration INF_GR4J PONDED_WATER MULTIPLE # Ps- - :SoilEvaporation SOILEVAP_GR4J PRODUCT_STORE ATMOSPHERE # Es - :Percolation PERC_GR4J PRODUCT_STORE TEMP_STORE # Perc - :Flush RAVEN_DEFAULT SURFACE_WATER TEMP_STORE # Pn-Ps - :Split RAVEN_DEFAULT TEMP_STORE CONVOLUTION[0] CONVOLUTION[1] 0.9 # Split Pr - :Convolve CONVOL_GR4J_1 CONVOLUTION[0] ROUTING_STORE # Q9 - :Convolve CONVOL_GR4J_2 CONVOLUTION[1] TEMP_STORE # Q1 - :Percolation PERC_GR4JEXCH ROUTING_STORE GW_STORE # F(x1) - :Percolation PERC_GR4JEXCH2 TEMP_STORE GW_STORE # F(x1) - :Flush RAVEN_DEFAULT TEMP_STORE SURFACE_WATER # Qd - :Baseflow BASE_GR4J ROUTING_STORE SURFACE_WATER # Qr - :EndHydrologicProcesses - #------------------------------------------------------------------------ - - #--------------------------------------------------------- - # Output Options - # - :WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id gr4jcn - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - self.config.rvi.rain_snow_fraction = "RAINSNOW_DINGMAN" - self.config.rvi.evaporation = "PET_OUDIN" - - # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified - self.config.rvc.soil0 = None - self.config.rvc.soil1 = 15 - - def derived_parameters(self): - self.config.rvp.derived_params.GR4J_X1_hlf = ( - self.config.rvp.params.GR4J_X1 * 1000.0 / 2.0 - ) - self.config.rvp.derived_params.one_minus_CEMANEIGE_X2 = ( - 1.0 - self.config.rvp.params.CEMANEIGE_X2 - ) - - # Default initial conditions if none are given - if not self.config.rvc.hru_states: - soil0 = ( - self.config.rvp.derived_params.GR4J_X1_hlf - if self.config.rvc.soil0 is None - else self.config.rvc.soil0 - ) - soil1 = self.config.rvc.soil1 - - # subbassin_id -> has at least one LakeHRU - sb_contains_lake = defaultdict(lambda: False) - - if not self.config.rvc.hru_states: - # If self.rvc.hru_states is set, it means that we are using `resume()` and we don't - # want to interfere - for hru in self.config.rvh.hrus: - if isinstance(hru, GR4JCN.LandHRU) or hru._hru_type == "land": - self.config.rvc.hru_states[hru.hru_id] = HRUState( - index=hru.hru_id, soil0=soil0, soil1=soil1 - ) - elif isinstance(hru, GR4JCN.LakeHRU) or hru._hru_type == "lake": - self.config.rvc.hru_states[hru.hru_id] = HRUState(index=hru.hru_id) - sb_contains_lake[hru.subbasin_id] = True - else: - raise Exception( - "Type of HRU must be either `GR4JCN.LandHRU` or `GR4JCN.LakeHRU` (or its `_hru_type` must be either 'land' or 'lake')" - ) - - if not self.config.rvc.basin_states: - # If self.rvc.basin_states is set, it means that we are using `resume()` and we don't - # want to interfere - for sb in self.config.rvh.subbasins: - self.config.rvc.basin_states[sb.subbasin_id] = BasinIndexCommand( - index=sb.subbasin_id - ) - - self.config.rvh.lake_subbasins = tuple( - [ - sb.subbasin_id - for sb in self.config.rvh.subbasins - if sb_contains_lake[sb.subbasin_id] - ] - ) - self.config.rvh.land_subbasins = tuple( - [ - sb.subbasin_id - for sb in self.config.rvh.subbasins - if not sb_contains_lake[sb.subbasin_id] - ] - ) - - -class GR4JCN_OST(Ostrich, GR4JCN): - _p = Path(__file__).parent / "ostrich-gr4j-cemaneige" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.txt = Ost( - algorithm="DDS", - max_iterations=50, - lowerBounds=GR4JCN.params(None, None, None, None, None, None), - upperBounds=GR4JCN.params(None, None, None, None, None, None), - ) - - def derived_parameters(self): - """Derived parameters are computed by Ostrich.""" - pass - - -class MOHYSE(Raven): - identifier = "mohyse" - - @dataclass - class Params: - par_x01: float = None - par_x02: float = None - par_x03: float = None - par_x04: float = None - par_x05: float = None - par_x06: float = None - par_x07: float = None - par_x08: float = None - par_x09: float = None - par_x10: float = None - - @dataclass - class DerivedParams: - par_rezi_x10: float = None - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - self.config = Config( - hrus=(GR4JCN.LandHRU(),), - subbasins=( - Sub( - subbasin_id=1, - name="sub_001", - downstream_id=-1, - profile="None", - gauged=True, - ), - ), - params=MOHYSE.Params(), - derived_params=MOHYSE.DerivedParams(), - ) - - self.config.rvp.tmpl = """ - #----------------------------------------------------------------- - # Soil Classes - #----------------------------------------------------------------- - :SoilClasses - :Attributes, - :Units, - TOPSOIL - GWSOIL - :EndSoilClasses - - #----------------------------------------------------------------- - # Land Use Classes - #----------------------------------------------------------------- - :LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - LU_ALL, 0.0, 1.0 - :EndLandUseClasses - - #----------------------------------------------------------------- - # Vegetation Classes - #----------------------------------------------------------------- - :VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - VEG_ALL, 0.0, 0.0, 0.0 - :EndVegetationClasses - - #----------------------------------------------------------------- - # Soil Profiles - #----------------------------------------------------------------- - :SoilProfiles - LAKE, 0 - ROCK, 0 - # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 - DEFAULT_P, 2, TOPSOIL, {params.par_x05}, GWSOIL, 10.0 - :EndSoilProfiles - - #----------------------------------------------------------------- - # Global Parameters - #----------------------------------------------------------------- - #:GlobalParameter RAINSNOW_TEMP -2.0 - :GlobalParameter TOC_MULTIPLIER 1.0 - # :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 - :GlobalParameter MOHYSE_PET_COEFF {params.par_x01} - - #----------------------------------------------------------------- - # Soil Parameters - #----------------------------------------------------------------- - :SoilParameterList - :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, - :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) - # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, - # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, - TOPSOIL, 1.0 , 1.0, 1.0, {params.par_x07}, {params.par_x06}, - GWSOIL, 1.0 , 1.0, 1.0, {params.par_x08}, 0.0, - :EndSoilParameterList - - #----------------------------------------------------------------- - # Land Use Parameters - #----------------------------------------------------------------- - :LandUseParameterList - :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, - :Units, mm/d/K, mm/d, -, degC, - # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, - [DEFAULT], {params.par_x03}, {params.par_x02}, 0.0, {params.par_x04}, - :EndLandUseParameterList - - #----------------------------------------------------------------- - # Vegetation Parameters - #----------------------------------------------------------------- - :VegetationParameterList - :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, -, - [DEFAULT], 0.0, 0.0, 0.0, - :EndVegetationParameterList - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - :SoilModel SOIL_TWO_LAYER - :PotentialMeltMethod POTMELT_DEGREE_DAY - :Routing ROUTE_NONE - :CatchmentRoute ROUTE_GAMMA_CONVOLUTION - :Evaporation {evaporation} # PET_MOHYSE - :DirectEvaporation - :RainSnowFraction {rain_snow_fraction} - - :HydrologicProcesses - :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :Infiltration INF_HBV PONDED_WATER SOIL[0] - :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER - :Percolation PERC_LINEAR SOIL[0] SOIL[1] - :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER - :EndHydrologicProcesses - - #:CreateRVPTemplate - - # :Alias MOHYSE_PARA_1 1.5589 # :GlobalParameter MOHYSE_PET_COEFF - # :Alias MOHYSE_PARA_2 0.9991 # LandUseParameterList --> AET_COEFF - # :Alias MOHYSE_PARA_3 2.1511 # LandUseParameterList --> MELT_FACTOR - # :Alias MOHYSE_PARA_4 -1.6101 # LandUseParameterList --> DD_MELT_TEMP - # :Alias MOHYSE_PARA_5 0.5000 # SoilProfiles --> thickness of TOPSOIL (in mm????? must be m!!!) - # :Alias MOHYSE_PARA_6 0.1050 # SoilParameterList --> PERC_COEFF (TOPSOIL) - # :Alias MOHYSE_PARA_7 0.0533 # SoilParameterList --> BASEFLOW_COEFF (TOPSOIL) - # :Alias MOHYSE_PARA_8 0.0132 # SoilParameterList --> BASEFLOW_COEFF (GWSOIL) - # :Alias MOHYSE_PARA_9 1.0474 # :SubBasinProperties --> GAMMA_SHAPE - # :Alias MOHYSE_PARA_10 7.9628 # :SubBasinProperties --> TIME_CONC = MOHYSE_PARA_10 / 0.3 = 26.542666666 - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id mohyse - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - self.config.rvh.tmpl = """ - {subbasins} - - {hrus} - - :SubBasinProperties - # 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 - :Parameters, GAMMA_SCALE, GAMMA_SHAPE, - :Units, 1/d, - - 1, {par_rezi_x10}, {par_x09} - :EndSubBasinProperties - """ - - self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" - self.config.rvi.evaporation = "PET_MOHYSE" - - # This is not stricly necessary it seems - self.config.rvc.hru_states[1] = HRUState() - self.config.rvc.basin_states[1] = BasinIndexCommand() - - def derived_parameters(self): - self.config.rvp.derived_params.par_rezi_x10 = ( - 1.0 / self.config.rvp.params.par_x10 - ) - - # These need to be injected in the RVH - self.config.rvh.par_rezi_x10 = self.config.rvp.derived_params.par_rezi_x10 - self.config.rvh.par_x09 = self.config.rvp.params.par_x09 - - -class MOHYSE_OST(Ostrich, MOHYSE): - _p = Path(__file__).parent / "ostrich-mohyse" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.txt = Ost( - algorithm="DDS", - max_iterations=50, - lowerBounds=MOHYSE.params( - None, None, None, None, None, None, None, None, None, None - ), - upperBounds=MOHYSE.params( - None, None, None, None, None, None, None, None, None, None - ), - ) - - def derived_parameters(self): - """ Derived parameters are computed by Ostrich. """ - pass - - -class HMETS(Raven): - identifier = "hmets" - - @dataclass - class Params: - GAMMA_SHAPE: float = None - GAMMA_SCALE: float = None - GAMMA_SHAPE2: float = None - GAMMA_SCALE2: float = None - MIN_MELT_FACTOR: float = None - MAX_MELT_FACTOR: float = None - DD_MELT_TEMP: float = None - DD_AGGRADATION: float = None - SNOW_SWI_MIN: float = None - SNOW_SWI_MAX: float = None - SWI_REDUCT_COEFF: float = None - DD_REFREEZE_TEMP: float = None - REFREEZE_FACTOR: float = None - REFREEZE_EXP: float = None - PET_CORRECTION: float = None - HMETS_RUNOFF_COEFF: float = None - PERC_COEFF: float = None - BASEFLOW_COEFF_1: float = None - BASEFLOW_COEFF_2: float = None - TOPSOIL: float = None - PHREATIC: float = None - - @dataclass - class DerivedParams: - TOPSOIL_m: float = None - PHREATIC_m: float = None - SUM_MELT_FACTOR: float = None - SUM_SNOW_SWI: float = None - TOPSOIL_hlf: float = None - PHREATIC_hlf: float = None - - @dataclass - class ForestHRU(HRU): - land_use_class: str = "FOREST" - veg_class: str = "FOREST" - soil_profile: str = "DEFAULT_P" - aquifer_profile: str = "[NONE]" - terrain_class: str = "[NONE]" - # _hru_type: str = "land" - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - self.config = Config( - hrus=(HMETS.ForestHRU(),), - subbasins=( - Sub( - subbasin_id=1, - name="sub_001", - downstream_id=-1, - profile="None", - gauged=True, - ), - ), - params=HMETS.Params(), - derived_params=HMETS.DerivedParams(), - ) - - self.config.rvp.tmpl = """ - #----------------------------------------------------------------- - # Soil Classes - #----------------------------------------------------------------- - :SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, - :EndSoilClasses - - #----------------------------------------------------------------- - # Land Use Classes - #----------------------------------------------------------------- - :LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - FOREST, 0.0, 1.0, - :EndLandUseClasses - - #----------------------------------------------------------------- - # Vegetation Classes - #----------------------------------------------------------------- - :VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, - :EndVegetationClasses - - #----------------------------------------------------------------- - # Soil Profiles - #----------------------------------------------------------------- - :SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 2, TOPSOIL, {derived_params.TOPSOIL_m}, PHREATIC, {derived_params.PHREATIC_m}, - # DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, - :EndSoilProfiles - - #----------------------------------------------------------------- - # Global Parameters - #----------------------------------------------------------------- - :GlobalParameter SNOW_SWI_MIN {params.SNOW_SWI_MIN} # x(9) - :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_SNOW_SWI} # x(9)+x(10) - :GlobalParameter SWI_REDUCT_COEFF {params.SWI_REDUCT_COEFF} # x(11) - :GlobalParameter SNOW_SWI 0.05 # not sure why/if needed... - - #----------------------------------------------------------------- - # Soil Parameters - #----------------------------------------------------------------- - :SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, {params.PERC_COEFF},{params.PET_CORRECTION},{params.BASEFLOW_COEFF_1} - PHREATIC, 1.0, 0.0, 0.0, {params.BASEFLOW_COEFF_2} - # TOPSOIL, 1.0, x(17), x(15), x(18) - # PHREATIC, 1.0, 0.0, 0.0, x(19) - :EndSoilParameterList - - #----------------------------------------------------------------- - # Land Use Parameters - #----------------------------------------------------------------- - :LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT],{params.MIN_MELT_FACTOR},{derived_params.SUM_MELT_FACTOR}, {params.DD_MELT_TEMP},{params.DD_AGGRADATION},{params.REFREEZE_FACTOR}, {params.REFREEZE_EXP},{params.DD_REFREEZE_TEMP},{params.HMETS_RUNOFF_COEFF}, - # x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), - :EndLandUseParameterList - :LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, - :Units, -, 1/d, -, 1/d, - [DEFAULT], {params.GAMMA_SHAPE}, {params.GAMMA_SCALE}, {params.GAMMA_SHAPE2}, {params.GAMMA_SCALE2}, - # x(1), x(2), x(3), x(4), - :EndLandUseParameterList - #----------------------------------------------------------------- - # Vegetation Parameters - #----------------------------------------------------------------- - :VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, - [DEFAULT], 0.0, 0.0, - :EndVegetationParameterList - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - :PotentialMeltMethod POTMELT_HMETS - :RainSnowFraction {rain_snow_fraction} - :Evaporation {evaporation} # PET_OUDIN - :CatchmentRoute ROUTE_DUMP - :Routing ROUTE_NONE - - :SoilModel SOIL_TWO_LAYER - - :Alias DELAYED_RUNOFF CONVOLUTION[1] - - :HydrologicProcesses - :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :Infiltration INF_HMETS PONDED_WATER MULTIPLE - :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF - :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER # interflow, really - :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge - :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF - :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET - :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER #'surface runoff' - :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER #'delayed runoff' - :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER - :EndHydrologicProcesses - - #:CreateRVPTemplate - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hmets - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - self.config.rvi.evaporation = "PET_OUDIN" - self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" - - self.config.rvc.soil0 = None - self.config.rvc.soil1 = None - - def derived_parameters(self): - self.config.rvp.derived_params.TOPSOIL_hlf = ( - self.config.rvp.params.TOPSOIL * 0.5 - ) - self.config.rvp.derived_params.PHREATIC_hlf = ( - self.config.rvp.params.PHREATIC * 0.5 - ) - self.config.rvp.derived_params.TOPSOIL_m = ( - self.config.rvp.params.TOPSOIL / 1000.0 - ) - self.config.rvp.derived_params.PHREATIC_m = ( - self.config.rvp.params.PHREATIC / 1000.0 - ) - - self.config.rvp.derived_params.SUM_MELT_FACTOR = ( - self.config.rvp.params.MAX_MELT_FACTOR - ) - self.config.rvp.derived_params.SUM_SNOW_SWI = ( - self.config.rvp.params.SNOW_SWI_MAX - ) - - # Default initial conditions if none are given - if not self.config.rvc.hru_states: - soil0 = ( - self.config.rvp.derived_params.TOPSOIL_hlf - if self.config.rvc.soil0 is None - else self.config.rvc.soil0 - ) - soil1 = ( - self.config.rvp.derived_params.PHREATIC_hlf - if self.config.rvc.soil1 is None - else self.config.rvc.soil1 - ) - self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) - - -class HMETS_OST(Ostrich, HMETS): - _p = Path(__file__).parent / "ostrich-hmets" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.txt = Ost( - algorithm="DDS", - max_iterations=50, - lowerBounds=HMETS.params( - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - ), - upperBounds=HMETS.params( - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - ), - ) - - def derived_parameters(self): - """Derived parameters are computed by Ostrich.""" - pass - - def ost2raven(self, ops): - """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. - - Parameters - ---------- - ops: dict - Optimal parameter set returned by Ostrich. - - Returns - ------- - HMETSParams named tuple - Parameters expected by Raven. - """ - names = ["par_x{:02}".format(i) for i in range(1, 22)] - names[5] = "par_sum_x05_x06" - names[9] = "par_sum_x09_x10" - - out = [ops[n] for n in names] - out[19] *= 1000 - out[20] *= 1000 - return self.params(*out) - - -class HBVEC(Raven): - identifier = "hbvec" - - @dataclass - class Params: - par_x01: float = None - par_x02: float = None - par_x03: float = None - par_x04: float = None - par_x05: float = None - par_x06: float = None - par_x07: float = None - par_x08: float = None - par_x09: float = None - par_x10: float = None - par_x11: float = None - par_x12: float = None - par_x13: float = None - par_x14: float = None - par_x15: float = None - par_x16: float = None - par_x17: float = None - par_x18: float = None - par_x19: float = None - par_x20: float = None - par_x21: float = None - - @dataclass - class DerivedParams: - one_plus_par_x15: float = None - par_x11_half: float = None - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - self.config = Config( - hrus=(GR4JCN.LandHRU(),), - subbasins=( - Sub( - subbasin_id=1, - name="sub_001", - downstream_id=-1, - profile="None", - gauged=True, - ), - ), - params=HBVEC.Params(), - derived_params=HBVEC.DerivedParams(), - ) - - self.config.rvp.tmpl = """ - #------------------------------------------------------------------------ - # Global parameters - # - # HBV_PARA_13=TCALT - :AdiabaticLapseRate {params.par_x13} - # HBV_PARA_01, CONSTANT, - :RainSnowTransition {params.par_x01}, 2.0 - # HBV_PARA_04, - :IrreducibleSnowSaturation {params.par_x04} - # HBV_PARA_12=PCALT - :GlobalParameter PRECIP_LAPSE {params.par_x12} - - #--------------------------------------------------------- - # Soil classes - :SoilClasses - :Attributes, - :Units, - TOPSOIL, 1.0, 0.0, 0 - SLOW_RES, 1.0, 0.0, 0 - FAST_RES, 1.0, 0.0, 0 - :EndSoilClasses - - :SoilParameterList - :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N - :Units , none, none, none, none, mm/d, mm/d, 1/d, none - # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, - [DEFAULT], {params.par_x05}, {params.par_x06}, {params.par_x14}, {params.par_x07}, {params.par_x16}, 0.0, 0.0, 0.0 - # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, - FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, {params.par_x08}, {params.par_x09}, {derived_params.one_plus_par_x15} - # CONSTANT, HBV_PARA_10, CONSTANT, - SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, {params.par_x10}, 1.0 - :EndSoilParameterList - - #--------------------------------------------------------- - # Soil profiles - # name, layers, (soilClass, thickness) x layers - # - :SoilProfiles - # HBV_PARA_17, CONSTANT, CONSTANT, - DEFAULT_P, 3, TOPSOIL, {params.par_x17}, FAST_RES, 100.0, SLOW_RES, 100.0 - :EndSoilProfiles - - #--------------------------------------------------------- - # Vegetation classes - # - :VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 25, 6.0, 5.3 - :EndVegetationClasses - - :VegetationParameterList - :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, - :Units, mm, mm, frac, frac, - VEG_ALL, 10000, 10000, 0.88, 0.88, - :EndVegetationParameterList - - #--------------------------------------------------------- - # LandUse classes - # - :LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units, frac, frac - LU_ALL, 0.0, 1 - :EndLandUseClasses - - :LandUseParameterList - :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR - :Units , mm/d/K, mm/d/K, none, mm/d/K, none - # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT - [DEFAULT], {params.par_x02}, 2.2, {params.par_x18}, {params.par_x03}, 0.48 - :EndLandUseParameterList - - :LandUseParameterList - :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG - :Units , none, 1/d, 1/d, 1/mm - # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, - [DEFAULT], 1.64, 0.05, {params.par_x19}, 0.05 - :EndLandUseParameterList - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - #------------------------------------------------------------------------ - # Model options - # - :Method ORDERED_SERIES - #:Interpolation INTERP_NEAREST_NEIGHBOR - - :Routing ROUTE_NONE - :CatchmentRoute TRIANGULAR_UH - - :Evaporation {evaporation} # PET_FROM_MONTHLY - :OW_Evaporation {ow_evaporation} # PET_FROM_MONTHLY - :SWRadiationMethod SW_RAD_DEFAULT - :SWCloudCorrect SW_CLOUD_CORR_NONE - :SWCanopyCorrect SW_CANOPY_CORR_NONE - :LWRadiationMethod LW_RAD_DEFAULT - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV - :PotentialMeltMethod POTMELT_HBV - :OroTempCorrect OROCORR_HBV - :OroPrecipCorrect OROCORR_HBV - :OroPETCorrect OROCORR_HBV - :CloudCoverMethod CLOUDCOV_NONE - :PrecipIceptFract PRECIP_ICEPT_USER - :MonthlyInterpolationMethod MONTHINT_LINEAR_21 - - :SoilModel SOIL_MULTILAYER 3 - - #------------------------------------------------------------------------ - # Soil Layer Alias Definitions - # - :Alias FAST_RESERVOIR SOIL[1] - :Alias SLOW_RESERVOIR SOIL[2] - :LakeStorage SLOW_RESERVOIR - - #------------------------------------------------------------------------ - # Hydrologic process order for HBV-EC Emulation - # - :HydrologicProcesses - :SnowRefreeze FREEZE_DEGREE_DAY SNOW_LIQ SNOW - :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE - :CanopyEvaporation CANEVP_ALL CANOPY ATMOSPHERE - :CanopySnowEvap CANEVP_ALL CANOPY_SNOW ATMOSPHERE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW SNOW_LIQ - :-->Overflow RAVEN_DEFAULT SNOW_LIQ PONDED_WATER - :Flush RAVEN_DEFAULT PONDED_WATER GLACIER - :-->Conditional HRU_TYPE IS GLACIER - :GlacierMelt GMELT_HBV GLACIER_ICE GLACIER - :GlacierRelease GRELEASE_HBV_EC GLACIER SURFACE_WATER - :Infiltration INF_HBV PONDED_WATER MULTIPLE - :Flush RAVEN_DEFAULT SURFACE_WATER FAST_RESERVOIR - :-->Conditional HRU_TYPE IS_NOT GLACIER - :SoilEvaporation SOILEVAP_HBV SOIL[0] ATMOSPHERE - :CapillaryRise RISE_HBV FAST_RESERVOIR SOIL[0] - :LakeEvaporation LAKE_EVAP_BASIC SLOW_RESERVOIR ATMOSPHERE - :Percolation PERC_CONSTANT FAST_RESERVOIR SLOW_RESERVOIR - :Baseflow BASE_POWER_LAW FAST_RESERVOIR SURFACE_WATER - :Baseflow BASE_LINEAR SLOW_RESERVOIR SURFACE_WATER - :EndHydrologicProcesses - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hbvec - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - self.config.rvh.tmpl = """ - {subbasins} - - {hrus} - - :SubBasinProperties - # HBV_PARA_11, DERIVED FROM HBV_PARA_11, - # MAXBAS, MAXBAS/2, - :Parameters, TIME_CONC, TIME_TO_PEAK - :Units , d, d, - 1, {par_x11}, {par_x11_half}, - :EndSubBasinProperties - """ - - self.config.rvi.evaporation = "PET_FROMMONTHLY" - self.config.rvi.ow_evaporation = "PET_FROMMONTHLY" - self.config.rvi.rain_snow_fraction = "RAINSNOW_HBV" - - self.config.rvc.soil2 = 0.50657 - - def derived_parameters(self): - self.config.rvp.derived_params.one_plus_par_x15 = ( - self.config.rvp.params.par_x15 + 1.0 - ) - self.config.rvp.derived_params.par_x11_half = ( - self.config.rvp.params.par_x11 / 2.0 - ) - - # These need to be injected in the RVH - self.config.rvh.par_x11 = self.config.rvp.params.par_x11 - self.config.rvh.par_x11_half = self.config.rvp.derived_params.par_x11_half - - self.config.rvt.rain_correction = self.config.rvp.params.par_x20 - self.config.rvt.snow_correction = self.config.rvp.params.par_x21 - - self._monthly_average() - - # Default initial conditions if none are given - if not self.config.rvc.hru_states: - self.config.rvc.hru_states[1] = HRUState(soil2=self.config.rvc.soil2) - if not self.config.rvc.basin_states: - self.config.rvc.basin_states[1] = BasinIndexCommand() - - # TODO: Support index specification and unit changes. - def _monthly_average(self): - - if ( - self.config.rvi.evaporation == "PET_FROMMONTHLY" - or self.config.rvi.ow_evaporation == "PET_FROMMONTHLY" - ): - # If this fails, it's likely the input data is missing some necessary variables (e.g. evap). - tas_cmd = self.config.rvt._var_cmds["tas"] - tasmin_cmd = self.config.rvt._var_cmds["tasmin"] - tasmax_cmd = self.config.rvt._var_cmds["tasmax"] - evspsbl_cmd = self.config.rvt._var_cmds["evspsbl"] - - if tas_cmd: - tas = xr.open_dataset(tas_cmd.file_name_nc)[tas_cmd.var_name_nc] - else: - tasmax = xr.open_dataset(tasmax_cmd.file_name_nc)[ - tasmax_cmd.var_name_nc - ] - tasmin = xr.open_dataset(tasmin_cmd.file_name_nc)[ - tasmin_cmd.var_name_nc - ] - tas = (tasmax + tasmin) / 2.0 - - if evspsbl_cmd: - evap = xr.open_dataset(evspsbl_cmd.file_name_nc)[ - evspsbl_cmd.var_name_nc - ] - - mat = tas.groupby("time.month").mean().values - mae = evap.groupby("time.month").mean().values - - self.config.rvt.monthly_ave_evaporation = tuple(mae) - self.config.rvt.monthly_ave_temperature = tuple(mat) - - -class HBVEC_OST(Ostrich, HBVEC): - _p = Path(__file__).parent / "ostrich-hbv-ec" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.low = HBVEC.params - self.high = HBVEC.params - self.txt = Ost( - algorithm="DDS", - max_iterations=50, - lowerBounds=self.low( - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - ), - upperBounds=self.high( - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - None, - ), - ) - - # TODO: Support index specification and unit changes. - def derived_parameters(self): - self.rvt.raincorrection = "par_x20" - self.rvt.snowcorrection = "par_x21" - self._monthly_average() - - -class BLENDED(Raven): - identifier = "blended" - - @dataclass - class Params: - par_x01: float = None - par_x02: float = None - par_x03: float = None - par_x04: float = None - par_x05: float = None - par_x06: float = None - par_x07: float = None - par_x08: float = None - par_x09: float = None - par_x10: float = None - par_x11: float = None - par_x12: float = None - par_x13: float = None - par_x14: float = None - par_x15: float = None - par_x16: float = None - par_x17: float = None - par_x18: float = None - par_x19: float = None - par_x20: float = None - par_x21: float = None - par_x22: float = None - par_x23: float = None - par_x24: float = None - par_x25: float = None - par_x26: float = None - par_x27: float = None - par_x28: float = None - par_x29: float = None - par_x30: float = None - par_x31: float = None - par_x32: float = None - par_x33: float = None - par_x34: float = None - par_x35: float = None - par_r01: float = None - par_r02: float = None - par_r03: float = None - par_r04: float = None - par_r05: float = None - par_r06: float = None - par_r07: float = None - par_r08: float = None - - @dataclass - class DerivedParams: - TOPSOIL_mm: float = None - PHREATIC_mm: float = None - TOPSOIL_hlf: float = None - PHREATIC_hlf: float = None - POW_X04: float = None - POW_X11: float = None - SUM_X09_X10: float = None - SUM_X13_X14: float = None - SUM_X24_X25: float = None - - @dataclass - class ForestHRU(HRU): - land_use_class: str = "FOREST" - veg_class: str = "FOREST" - soil_profile: str = "DEFAULT_P" - aquifer_profile: str = "[NONE]" - terrain_class: str = "DEFAULT_T" - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - self.config = Config( - hrus=(BLENDED.ForestHRU(),), - subbasins=( - Sub( - subbasin_id=1, - name="sub_001", - downstream_id=-1, - profile="None", - gauged=True, - ), - ), - params=BLENDED.Params(), - derived_params=BLENDED.DerivedParams(), - land_use_classes=( - LU("FOREST", impermeable_frac=0.0, forest_coverage=0.02345), - ), - evaporation="PET_OUDIN", - rain_snow_fraction="RAINSNOW_HBV", - ) - - self.config.rvp.tmpl = """ - # tied parameters: - # (it is important for OSTRICH to find every parameter place holder somewhere in this file) - # (without this "5.421821E-02" and "1.596675E-01" and "2.169724E-01" wouldn't be detectable) - # para_1.705806E+00 = 1.705806E+00 = para_x24 + para_x25 = 1.651588E+00 + 5.421821E-02 - # para_2.070342E-01 = 2.070342E-01 = para_x13 + para_x14 = 4.736668E-02 + 1.596675E-01 - # para_2.518350E-01 = 2.518350E-01 = para_x09 + para_x10 = 3.486263E-02 + 2.169724E-01 - # para_2.254976E-04 = 2.254976E-04 = 10^(para_x04) = 10^-3.646858E+00 - # para_2.279250E-04 = 2.279250E-04 = 10^(para_x11) = 10^-3.642208E+00 - - #----------------------------------------------------------------- - # Soil Classes - #----------------------------------------------------------------- - :SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, - DEEP_GW - :EndSoilClasses - - #----------------------------------------------------------------- - # Land Use Classes - #----------------------------------------------------------------- - {land_use_classes} - - #----------------------------------------------------------------- - # Vegetation Classes - #----------------------------------------------------------------- - :VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, - :EndVegetationClasses - - #----------------------------------------------------------------- - # Soil Profiles - #----------------------------------------------------------------- - :SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 3, TOPSOIL, {params.par_x29}, PHREATIC, {params.par_x30}, DEEP_GW, 1e6 - # DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 - :EndSoilProfiles - - #----------------------------------------------------------------- - # Terrain Classes - #----------------------------------------------------------------- - :TerrainClasses - :Attributes, hillslope_len, drainage_dens, lambda, - :Units, ??, ??, ?? - DEFAULT_T, 1.0, 1.0, {params.par_x07} - # TOPMODEL_LAMBDA x(7) - :EndTerrainClasses - - #----------------------------------------------------------------- - # Global Parameters - #----------------------------------------------------------------- - :GlobalParameter SNOW_SWI_MIN {params.par_x13} # x(13) - :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_X13_X14} # x(13)+x(14) - :GlobalParameter SWI_REDUCT_COEFF {params.par_x15} # x(15) - :GlobalParameter SNOW_SWI {params.par_x19} # x(19) - :GlobalParameter RAINSNOW_TEMP {params.par_x31} # x(31) - :GlobalParameter RAINSNOW_DELTA {params.par_x32} # x(32) - #:GlobalParameter TOC_MULTIPLIER 1.0 # - - - #----------------------------------------------------------------- - # Soil Parameters - #----------------------------------------------------------------- - :SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, {params.par_x28}, {params.par_x08}, {derived_params.POW_X04}, {params.par_x02}, {params.par_x03}, {params.par_x05}, {params.par_x06}, {derived_params.SUM_X09_X10}, {params.par_x09}, - PHREATIC, 1.0, {params.par_x35}, 0.0, {derived_params.POW_X11}, 0.0, 0.0, 0.0, {params.par_x12}, 0.0, 0.0, - DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), - # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, - # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - :EndSoilParameterList - - #----------------------------------------------------------------- - # Land Use Parameters - #----------------------------------------------------------------- - :LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT], {params.par_x24}, {derived_params.SUM_X24_X25}, {params.par_x26}, {params.par_x27}, {params.par_x18}, {params.par_x17}, {params.par_x16}, {params.par_x01}, - # x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), - :EndLandUseParameterList - :LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, - :Units, -, -, -, -, -, - [DEFAULT], {params.par_x20}, {params.par_x21}, {params.par_x22}, {params.par_x23}, 0.0, - # x(20), x(21), x(22), x(23), 0.0, - :EndLandUseParameterList - - #----------------------------------------------------------------- - # Vegetation Parameters - #----------------------------------------------------------------- - :VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO - :Units, -, -, - - [DEFAULT], 0.0, 0.0, 0.0 - :EndVegetationParameterList - - :SeasonalRelativeLAI - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 - :EndSeasonalRelativeLAI - :SeasonalRelativeHeight - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 - :EndSeasonalRelativeHeight - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - :PotentialMeltMethod POTMELT_HMETS - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV - :Evaporation {evaporation} # PET_OUDIN - :CatchmentRoute ROUTE_DUMP - :Routing ROUTE_NONE - :SoilModel SOIL_MULTILAYER 3 - - :Alias DELAYED_RUNOFF CONVOLUTION[1] - - :HydrologicProcesses - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :ProcessGroup #infiltration group - :Infiltration INF_HMETS PONDED_WATER MULTIPLE - :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE - :Infiltration INF_HBV PONDED_WATER MULTIPLE - :EndProcessGroup CALCULATE_WTS {params.par_r01} {params.par_r02} - # para_r01 para_r02 - :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really - :Baseflow BASE_VIC SOIL[0] SURFACE_WATER - :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS {params.par_r03} {params.par_r04} - # para_r03 para_r04 - :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge - :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF - :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) - :ProcessGroup #evaporation group - :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET - :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET - :EndProcessGroup CALCULATE_WTS {params.par_r05} - # para_r05 - :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' - :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER - :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS {params.par_r06} - # para_r06 - :ProcessGroup #snow balance group - :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER - :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE - #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE - :EndProcessGroup CALCULATE_WTS {params.par_r07} {params.par_r08} - # para_r07 para_r08 - :EndHydrologicProcesses - - #:CreateRVPTemplate - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hmets - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - self.config.rvi.params = self.config.rvp.params - - self.config.rvc.tmpl = """ - # initialize to 1/2 full - # x(29)*1000/2 - :UniformInitialConditions SOIL[0] {TOPSOIL_hlf} - # x(30)*1000/2 - :UniformInitialConditions SOIL[1] {PHREATIC_hlf} - - :HRUStateVariableTable (formerly :InitialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 {TOPSOIL_hlf} {PHREATIC_hlf} - # x(29)*1000/2 x(30)*1000/2 - :EndHRUStateVariableTable - """ - - self.config.rvc.soil0 = None - self.config.rvc.soil1 = None - self.config.rvc.basin_states[1] = BasinIndexCommand() - - def derived_parameters(self): - self.config.rvp.derived_params.TOPSOIL_hlf = ( - self.config.rvp.params.par_x29 * 0.5 * 1000.0 - ) - self.config.rvp.derived_params.PHREATIC_hlf = ( - self.config.rvp.params.par_x30 * 0.5 * 1000.0 - ) - self.config.rvp.derived_params.TOPSOIL_mm = ( - self.config.rvp.params.par_x29 * 1000.0 - ) - self.config.rvp.derived_params.PHREATIC_mm = ( - self.config.rvp.params.par_x30 * 1000.0 - ) - self.config.rvp.derived_params.SUM_X09_X10 = ( - self.config.rvp.params.par_x10 - ) # + self.config.rvp.params.par_x09 - self.config.rvp.derived_params.SUM_X13_X14 = ( - self.config.rvp.params.par_x14 - ) # + self.config.rvp.params.par_x13 - self.config.rvp.derived_params.SUM_X24_X25 = ( - self.config.rvp.params.par_x25 - ) # + self.config.rvp.params.par_x24 - # 10.0**self.config.rvp.params.par_x04 # - self.config.rvp.derived_params.POW_X04 = self.config.rvp.params.par_x04 - # 10.0**self.config.rvp.params.par_x11 # - self.config.rvp.derived_params.POW_X11 = self.config.rvp.params.par_x11 - - self.config.rvc.TOPSOIL_hlf = self.config.rvp.derived_params.TOPSOIL_hlf - self.config.rvc.PHREATIC_hlf = self.config.rvp.derived_params.PHREATIC_hlf - - # Default initial conditions if none are given - # if not self.config.rvc.hru_states: - # soil0 = ( - # self.config.rvp.derived_params.TOPSOIL_hlf if self.config.rvc.soil0 is None else self.config.rvc.soil0 - # ) - # soil1 = ( - # self.config.rvp.derived_params.PHREATIC_hlf if self.config.rvc.soil1 is None else self.config.rvc.soil1 - # ) - # self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) - - self.config.rvt.rain_correction = self.config.rvp.params.par_x33 - self.config.rvt.snow_correction = self.config.rvp.params.par_x34 - - -class BLENDED_OST(Ostrich, BLENDED): - _p = Path(__file__).parent / "ostrich-blended" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.txt = Ost( - algorithm="DDS", - max_iterations=50, - lowerBounds=BLENDED.params( - None, # par_x01 - None, # par_x02 - None, # par_x03 - None, # 10**par_x04 - None, # par_x05 - None, # par_x06 - None, # par_x07 - None, # par_x08 - None, # par_x09 - None, # par_x09+par_x10 - None, # 10**par_x11 - None, # par_x12 - None, # par_x13 - None, # par_x13+par_x14 - None, # par_x15 - None, # par_x16 - None, # par_x17 - None, # par_x18 - None, # par_x19 - None, # par_x20 - None, # par_x21 - None, # par_x22 - None, # par_x23 - None, # par_x24 - None, # par_x24+par_x25 - None, # par_x26 - None, # par_x27 - None, # par_x28 - None, # par_x29 - None, # par_x30 - None, # par_x31 - None, # par_x32 - None, # par_x33 - None, # par_x34 - None, # par_x35 - None, # par_r01 - None, # par_r02 - None, # par_r03 - None, # par_r04 - None, # par_r05 - None, # par_r06 - None, # par_r07 - None, # par_r08 - ), - upperBounds=BLENDED.params( - None, # par_x01 - None, # par_x02 - None, # par_x03 - None, # 10**par_x04 - None, # par_x05 - None, # par_x06 - None, # par_x07 - None, # par_x08 - None, # par_x09 - None, # par_x09+par_x10 - None, # 10**par_x11 - None, # par_x12 - None, # par_x13 - None, # par_x13+par_x14 - None, # par_x15 - None, # par_x16 - None, # par_x17 - None, # par_x18 - None, # par_x19 - None, # par_x20 - None, # par_x21 - None, # par_x22 - None, # par_x23 - None, # par_x24 - None, # par_x24+par_x25 - None, # par_x26 - None, # par_x27 - None, # par_x28 - None, # par_x29 - None, # par_x30 - None, # par_x31 - None, # par_x32 - None, # par_x33 - None, # par_x34 - None, # par_x35 - None, # par_r01 - None, # par_r02 - None, # par_r03 - None, # par_r04 - None, # par_r05 - None, # par_r06 - None, # par_r07 - None, # par_r08 - ), - ) - - def derived_parameters(self): - """Derived parameters are computed by Ostrich.""" - self.rvt.raincorrection = "par_x33" - self.rvt.snowcorrection = "par_x34" - - def ost2raven(self, ops): - """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. - - Parameters - ---------- - ops: dict - Optimal parameter set returned by Ostrich. - - Returns - ------- - BLENDEDParams named tuple - Parameters expected by Raven. - """ - names = ["par_x{:02}".format(i) for i in range(1, 36)] + [ - "par_r{:02}".format(i) for i in range(1, 9) - ] - names[3] = "pow_x04" - names[9] = "sum_x09_x10" - names[10] = "pow_x11" - names[13] = "sum_x13_x14" - names[24] = "sum_x24_x25" - - out = [ops[n] for n in names] - return self.params(*out) - - -class Routing(Raven): - """Routing model - no hydrological modeling""" - - identifier = "routing" - - # params = namedtuple("RoutingParams", ()) - - def __init__(self, *args, **kwds): - super().__init__(*args, **kwds) - - # Declare the parameters that can be user-modified. - - self.config = Config() - self.config.rvp.tmpl = """ - {soil_classes} - - {soil_profiles} - - {vegetation_classes} - - {land_use_classes} - - {avg_annual_runoff} - - {channel_profiles} - """ - - self.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES # Numerical method used for simulation - - :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. - :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. - :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. - :PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. - :SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. - - :HydrologicProcesses - :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. - :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. - :EndHydrologicProcesses - - - # Output Options - # - #:WriteForcingFunctions - # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id routing - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - def derived_parameters(self): - pass - - -def get_model(name): - """Return the corresponding Raven emulated model instance. - - Parameters - ---------- - name : str - Model class name or model identifier. - - Returns - ------- - Raven model instance - """ - from ravenpy.models import emulators - - model_cls = getattr(emulators, name, None) - - if model_cls is None: - for m in [GR4JCN, MOHYSE, HMETS, HBVEC, BLENDED]: - if m.identifier == name: - model_cls = m - - if model_cls is None: - raise ValueError("Model {} is not recognized.".format(name)) - - return model_cls - - -def used_storage_variables(fn): - """Identify variables that are used by the model.""" - import xarray as xr - - ds = xr.open_dataset(fn) - return [ - (key, da.isel(time=-1).values.tolist(), da.units) - for key, da in ds.data_vars.items() - if any(ds[key] != 0) - ] diff --git a/ravenpy/models/emulators/__init__.py b/ravenpy/models/emulators/__init__.py new file mode 100644 index 00000000..d343407a --- /dev/null +++ b/ravenpy/models/emulators/__init__.py @@ -0,0 +1,5 @@ +from .blended import * +from .gr4jcn import * +from .hbvec import * +from .hmets import * +from .mohyse import * diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py new file mode 100644 index 00000000..840f6003 --- /dev/null +++ b/ravenpy/models/emulators/blended.py @@ -0,0 +1,494 @@ +from collections import defaultdict +from dataclasses import dataclass +from pathlib import Path + +from ravenpy.config.commands import BasinIndexCommand +from ravenpy.models.base import Ostrich, Raven +from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub + +from .gr4jcn import GR4JCN + + +class BLENDED(Raven): + identifier = "blended" + + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + par_x11: float = None + par_x12: float = None + par_x13: float = None + par_x14: float = None + par_x15: float = None + par_x16: float = None + par_x17: float = None + par_x18: float = None + par_x19: float = None + par_x20: float = None + par_x21: float = None + par_x22: float = None + par_x23: float = None + par_x24: float = None + par_x25: float = None + par_x26: float = None + par_x27: float = None + par_x28: float = None + par_x29: float = None + par_x30: float = None + par_x31: float = None + par_x32: float = None + par_x33: float = None + par_x34: float = None + par_x35: float = None + par_r01: float = None + par_r02: float = None + par_r03: float = None + par_r04: float = None + par_r05: float = None + par_r06: float = None + par_r07: float = None + par_r08: float = None + + @dataclass + class DerivedParams: + TOPSOIL_mm: float = None + PHREATIC_mm: float = None + TOPSOIL_hlf: float = None + PHREATIC_hlf: float = None + POW_X04: float = None + POW_X11: float = None + SUM_X09_X10: float = None + SUM_X13_X14: float = None + SUM_X24_X25: float = None + + @dataclass + class ForestHRU(HRU): + land_use_class: str = "FOREST" + veg_class: str = "FOREST" + soil_profile: str = "DEFAULT_P" + aquifer_profile: str = "[NONE]" + terrain_class: str = "DEFAULT_T" + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config = Config( + hrus=(BLENDED.ForestHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=BLENDED.Params(), + derived_params=BLENDED.DerivedParams(), + land_use_classes=( + LU("FOREST", impermeable_frac=0.0, forest_coverage=0.02345), + ), + evaporation="PET_OUDIN", + rain_snow_fraction="RAINSNOW_HBV", + ) + + self.config.rvp.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "5.421821E-02" and "1.596675E-01" and "2.169724E-01" wouldn't be detectable) + # para_1.705806E+00 = 1.705806E+00 = para_x24 + para_x25 = 1.651588E+00 + 5.421821E-02 + # para_2.070342E-01 = 2.070342E-01 = para_x13 + para_x14 = 4.736668E-02 + 1.596675E-01 + # para_2.518350E-01 = 2.518350E-01 = para_x09 + para_x10 = 3.486263E-02 + 2.169724E-01 + # para_2.254976E-04 = 2.254976E-04 = 10^(para_x04) = 10^-3.646858E+00 + # para_2.279250E-04 = 2.279250E-04 = 10^(para_x11) = 10^-3.642208E+00 + + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + DEEP_GW + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + {land_use_classes} + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 3, TOPSOIL, {params.par_x29}, PHREATIC, {params.par_x30}, DEEP_GW, 1e6 + # DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Terrain Classes + #----------------------------------------------------------------- + :TerrainClasses + :Attributes, hillslope_len, drainage_dens, lambda, + :Units, ??, ??, ?? + DEFAULT_T, 1.0, 1.0, {params.par_x07} + # TOPMODEL_LAMBDA x(7) + :EndTerrainClasses + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN {params.par_x13} # x(13) + :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_X13_X14} # x(13)+x(14) + :GlobalParameter SWI_REDUCT_COEFF {params.par_x15} # x(15) + :GlobalParameter SNOW_SWI {params.par_x19} # x(19) + :GlobalParameter RAINSNOW_TEMP {params.par_x31} # x(31) + :GlobalParameter RAINSNOW_DELTA {params.par_x32} # x(32) + #:GlobalParameter TOC_MULTIPLIER 1.0 # + + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, {params.par_x28}, {params.par_x08}, {derived_params.POW_X04}, {params.par_x02}, {params.par_x03}, {params.par_x05}, {params.par_x06}, {derived_params.SUM_X09_X10}, {params.par_x09}, + PHREATIC, 1.0, {params.par_x35}, 0.0, {derived_params.POW_X11}, 0.0, 0.0, 0.0, {params.par_x12}, 0.0, 0.0, + DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), + # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, + # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT], {params.par_x24}, {derived_params.SUM_X24_X25}, {params.par_x26}, {params.par_x27}, {params.par_x18}, {params.par_x17}, {params.par_x16}, {params.par_x01}, + # x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, + :Units, -, -, -, -, -, + [DEFAULT], {params.par_x20}, {params.par_x21}, {params.par_x22}, {params.par_x23}, 0.0, + # x(20), x(21), x(22), x(23), 0.0, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO + :Units, -, -, - + [DEFAULT], 0.0, 0.0, 0.0 + :EndVegetationParameterList + + :SeasonalRelativeLAI + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeLAI + :SeasonalRelativeHeight + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeHeight + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :PotentialMeltMethod POTMELT_HMETS + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + :Evaporation {evaporation} # PET_OUDIN + :CatchmentRoute ROUTE_DUMP + :Routing ROUTE_NONE + :SoilModel SOIL_MULTILAYER 3 + + :Alias DELAYED_RUNOFF CONVOLUTION[1] + + :HydrologicProcesses + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :ProcessGroup #infiltration group + :Infiltration INF_HMETS PONDED_WATER MULTIPLE + :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE + :Infiltration INF_HBV PONDED_WATER MULTIPLE + :EndProcessGroup CALCULATE_WTS {params.par_r01} {params.par_r02} + # para_r01 para_r02 + :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really + :Baseflow BASE_VIC SOIL[0] SURFACE_WATER + :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS {params.par_r03} {params.par_r04} + # para_r03 para_r04 + :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge + :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF + :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) + :ProcessGroup #evaporation group + :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET + :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET + :EndProcessGroup CALCULATE_WTS {params.par_r05} + # para_r05 + :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' + :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER + :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS {params.par_r06} + # para_r06 + :ProcessGroup #snow balance group + :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER + :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE + #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE + :EndProcessGroup CALCULATE_WTS {params.par_r07} {params.par_r08} + # para_r07 para_r08 + :EndHydrologicProcesses + + #:CreateRVPTemplate + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hmets + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.params = self.config.rvp.params + + self.config.rvc.tmpl = """ + # initialize to 1/2 full + # x(29)*1000/2 + :UniformInitialConditions SOIL[0] {TOPSOIL_hlf} + # x(30)*1000/2 + :UniformInitialConditions SOIL[1] {PHREATIC_hlf} + + :HRUStateVariableTable (formerly :InitialConditionsTable) + :Attributes SOIL[0] SOIL[1] + :Units mm mm + 1 {TOPSOIL_hlf} {PHREATIC_hlf} + # x(29)*1000/2 x(30)*1000/2 + :EndHRUStateVariableTable + """ + + self.config.rvc.soil0 = None + self.config.rvc.soil1 = None + self.config.rvc.basin_states[1] = BasinIndexCommand() + + def derived_parameters(self): + self.config.rvp.derived_params.TOPSOIL_hlf = ( + self.config.rvp.params.par_x29 * 0.5 * 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_hlf = ( + self.config.rvp.params.par_x30 * 0.5 * 1000.0 + ) + self.config.rvp.derived_params.TOPSOIL_mm = ( + self.config.rvp.params.par_x29 * 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_mm = ( + self.config.rvp.params.par_x30 * 1000.0 + ) + self.config.rvp.derived_params.SUM_X09_X10 = ( + self.config.rvp.params.par_x10 + ) # + self.config.rvp.params.par_x09 + self.config.rvp.derived_params.SUM_X13_X14 = ( + self.config.rvp.params.par_x14 + ) # + self.config.rvp.params.par_x13 + self.config.rvp.derived_params.SUM_X24_X25 = ( + self.config.rvp.params.par_x25 + ) # + self.config.rvp.params.par_x24 + # 10.0**self.config.rvp.params.par_x04 # + self.config.rvp.derived_params.POW_X04 = self.config.rvp.params.par_x04 + # 10.0**self.config.rvp.params.par_x11 # + self.config.rvp.derived_params.POW_X11 = self.config.rvp.params.par_x11 + + self.config.rvc.TOPSOIL_hlf = self.config.rvp.derived_params.TOPSOIL_hlf + self.config.rvc.PHREATIC_hlf = self.config.rvp.derived_params.PHREATIC_hlf + + # Default initial conditions if none are given + # if not self.config.rvc.hru_states: + # soil0 = ( + # self.config.rvp.derived_params.TOPSOIL_hlf if self.config.rvc.soil0 is None else self.config.rvc.soil0 + # ) + # soil1 = ( + # self.config.rvp.derived_params.PHREATIC_hlf if self.config.rvc.soil1 is None else self.config.rvc.soil1 + # ) + # self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) + + self.config.rvt.rain_correction = self.config.rvp.params.par_x33 + self.config.rvt.snow_correction = self.config.rvp.params.par_x34 + + +class BLENDED_OST(Ostrich, BLENDED): + _p = Path(__file__).parent / "ostrich-blended" + templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + self.rvi.suppress_output = True + self.txt = Ost( + algorithm="DDS", + max_iterations=50, + lowerBounds=BLENDED.params( + None, # par_x01 + None, # par_x02 + None, # par_x03 + None, # 10**par_x04 + None, # par_x05 + None, # par_x06 + None, # par_x07 + None, # par_x08 + None, # par_x09 + None, # par_x09+par_x10 + None, # 10**par_x11 + None, # par_x12 + None, # par_x13 + None, # par_x13+par_x14 + None, # par_x15 + None, # par_x16 + None, # par_x17 + None, # par_x18 + None, # par_x19 + None, # par_x20 + None, # par_x21 + None, # par_x22 + None, # par_x23 + None, # par_x24 + None, # par_x24+par_x25 + None, # par_x26 + None, # par_x27 + None, # par_x28 + None, # par_x29 + None, # par_x30 + None, # par_x31 + None, # par_x32 + None, # par_x33 + None, # par_x34 + None, # par_x35 + None, # par_r01 + None, # par_r02 + None, # par_r03 + None, # par_r04 + None, # par_r05 + None, # par_r06 + None, # par_r07 + None, # par_r08 + ), + upperBounds=BLENDED.params( + None, # par_x01 + None, # par_x02 + None, # par_x03 + None, # 10**par_x04 + None, # par_x05 + None, # par_x06 + None, # par_x07 + None, # par_x08 + None, # par_x09 + None, # par_x09+par_x10 + None, # 10**par_x11 + None, # par_x12 + None, # par_x13 + None, # par_x13+par_x14 + None, # par_x15 + None, # par_x16 + None, # par_x17 + None, # par_x18 + None, # par_x19 + None, # par_x20 + None, # par_x21 + None, # par_x22 + None, # par_x23 + None, # par_x24 + None, # par_x24+par_x25 + None, # par_x26 + None, # par_x27 + None, # par_x28 + None, # par_x29 + None, # par_x30 + None, # par_x31 + None, # par_x32 + None, # par_x33 + None, # par_x34 + None, # par_x35 + None, # par_r01 + None, # par_r02 + None, # par_r03 + None, # par_r04 + None, # par_r05 + None, # par_r06 + None, # par_r07 + None, # par_r08 + ), + ) + + def derived_parameters(self): + """Derived parameters are computed by Ostrich.""" + self.rvt.raincorrection = "par_x33" + self.rvt.snowcorrection = "par_x34" + + def ost2raven(self, ops): + """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. + + Parameters + ---------- + ops: dict + Optimal parameter set returned by Ostrich. + + Returns + ------- + BLENDEDParams named tuple + Parameters expected by Raven. + """ + names = ["par_x{:02}".format(i) for i in range(1, 36)] + [ + "par_r{:02}".format(i) for i in range(1, 9) + ] + names[3] = "pow_x04" + names[9] = "sum_x09_x10" + names[10] = "pow_x11" + names[13] = "sum_x13_x14" + names[24] = "sum_x24_x25" + + out = [ops[n] for n in names] + return self.params(*out) diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py new file mode 100644 index 00000000..94847de7 --- /dev/null +++ b/ravenpy/models/emulators/gr4jcn.py @@ -0,0 +1,458 @@ +from collections import defaultdict +from dataclasses import dataclass +from pathlib import Path + +from ravenpy.config.commands import BasinIndexCommand +from ravenpy.models.base import Ostrich, Raven +from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub + + +class GR4JCN(Raven): + """GR4J + Cemaneige global hydrological model + + References + ---------- + Perrin, C., C. Michel and V. Andréassian (2003). Improvement of a parsimonious model for streamflow simulation. + Journal of Hydrology, 279(1-4), 275-289. doi: 10.1016/S0022-1694(03)00225-7. + + Valéry, Audrey, Vazken Andréassian, and Charles Perrin. 2014. “’As Simple as Possible but Not Simpler’: What Is + Useful in a Temperature-Based Snow-Accounting Routine? Part 2 - Sensitivity Analysis of the Cemaneige Snow + Accounting Routine on 380 Catchments.” Journal of Hydrology, no. 517(0): 1176–87, + doi: 10.1016/j.jhydrol.2014.04.058. + """ + + @dataclass + class Params: + GR4J_X1: float = None + GR4J_X2: float = None + GR4J_X3: float = None + GR4J_X4: float = None + CEMANEIGE_X1: float = None + CEMANEIGE_X2: float = None + + @dataclass + class DerivedParams: + one_minus_CEMANEIGE_X2: float = None + GR4J_X1_hlf: float = None + + @dataclass + class LandHRU(HRU): + land_use_class: str = "LU_ALL" + veg_class: str = "VEG_ALL" + soil_profile: str = "DEFAULT_P" + aquifer_profile: str = "[NONE]" + terrain_class: str = "[NONE]" + _hru_type: str = "land" + + @dataclass + class LakeHRU(HRU): + land_use_class: str = "LU_WATER" + veg_class: str = "VEG_WATER" + soil_profile: str = "LAKE" + aquifer_profile: str = "[NONE]" + terrain_class: str = "[NONE]" + _hru_type: str = "lake" + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + hrus=(GR4JCN.LandHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=GR4JCN.Params(), + derived_params=GR4JCN.DerivedParams(), + ) + + self.config.rvp.tmpl = """ + # -Global snow parameters------------------------------------- + :RainSnowTransition 0 1.0 + :AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 + :AvgAnnualSnow {params.CEMANEIGE_X1} # [mm] = CEMANEIGE_X1 = x5 + + # -Orographic Corrections------------------------------------- + :PrecipitationLapseRate 0.0004 + :AdiabaticLapseRate 0.0065 + + # - Soil classes --------------------------------------------- + :SoilClasses + :Attributes + :Units + SOIL_PROD + SOIL_ROUT + SOIL_TEMP + SOIL_GW + AQUIFER + :EndSoilClasses + :SoilParameterList + :Parameters, POROSITY , GR4J_X3, GR4J_X2 + :Units , none , mm, mm/d + [DEFAULT], 1.0 , {params.GR4J_X3}, {params.GR4J_X2} + :EndSoilParameterList + + # ----Soil Profiles-------------------------------------------- + # name,#horizons,(soiltype,thickness)x(#horizons) + # GR4J_X1 is thickness of first layer (SOIL_PROD), here {params.GR4J_X1} + :SoilProfiles + DEFAULT_P, 4, SOIL_PROD , {params.GR4J_X1}, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, + LAKE, 0 + :EndSoilProfiles + + # ----Vegetation Classes--------------------------------------- + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 0.0, 0.0, 0.0 + VEG_WATER, 0.0, 0.0, 0.0 + :EndVegetationClasses + + # --Land Use Classes------------------------------------------ + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units , frac, frac + LU_ALL, 0.0, 0.0 + LU_WATER, 0.0, 0.0 + :EndLandUseClasses + :LandUseParameterList + :Parameters, GR4J_X4, MELT_FACTOR + :Units , d, mm/d/C + [DEFAULT], {params.GR4J_X4}, 7.73 + :EndLandUseParameterList + + {avg_annual_runoff} + + # List of channel profiles + {channel_profiles} + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :SoilModel SOIL_MULTILAYER 4 + {routing} + :CatchmentRoute ROUTE_DUMP + :Evaporation {evaporation} # PET_OUDIN + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_DINGMAN + :PotentialMeltMethod POTMELT_DEGREE_DAY + :OroTempCorrect OROCORR_SIMPLELAPSE + :OroPrecipCorrect OROCORR_SIMPLELAPSE + + #------------------------------------------------------------------------ + # Soil Layer Alias Definitions + # + :Alias PRODUCT_STORE SOIL[0] + :Alias ROUTING_STORE SOIL[1] + :Alias TEMP_STORE SOIL[2] + :Alias GW_STORE SOIL[3] + + #------------------------------------------------------------------------ + # Hydrologic process order for GR4J Emulation + # + :HydrologicProcesses + :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE + :SnowTempEvolve SNOTEMP_NEWTONS SNOW_TEMP + :SnowBalance SNOBAL_CEMA_NIEGE SNOW PONDED_WATER + :OpenWaterEvaporation OPEN_WATER_EVAP PONDED_WATER ATMOSPHERE # Pn + :Infiltration INF_GR4J PONDED_WATER MULTIPLE # Ps- + :SoilEvaporation SOILEVAP_GR4J PRODUCT_STORE ATMOSPHERE # Es + :Percolation PERC_GR4J PRODUCT_STORE TEMP_STORE # Perc + :Flush RAVEN_DEFAULT SURFACE_WATER TEMP_STORE # Pn-Ps + :Split RAVEN_DEFAULT TEMP_STORE CONVOLUTION[0] CONVOLUTION[1] 0.9 # Split Pr + :Convolve CONVOL_GR4J_1 CONVOLUTION[0] ROUTING_STORE # Q9 + :Convolve CONVOL_GR4J_2 CONVOLUTION[1] TEMP_STORE # Q1 + :Percolation PERC_GR4JEXCH ROUTING_STORE GW_STORE # F(x1) + :Percolation PERC_GR4JEXCH2 TEMP_STORE GW_STORE # F(x1) + :Flush RAVEN_DEFAULT TEMP_STORE SURFACE_WATER # Qd + :Baseflow BASE_GR4J ROUTING_STORE SURFACE_WATER # Qr + :EndHydrologicProcesses + #------------------------------------------------------------------------ + + #--------------------------------------------------------- + # Output Options + # + :WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id gr4jcn + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.rain_snow_fraction = "RAINSNOW_DINGMAN" + self.config.rvi.evaporation = "PET_OUDIN" + + # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified + self.config.rvc.soil0 = None + self.config.rvc.soil1 = 15 + + def derived_parameters(self): + + self.config.rvp.derived_params.GR4J_X1_hlf = ( + self.config.rvp.params.GR4J_X1 * 1000.0 / 2.0 + ) + self.config.rvp.derived_params.one_minus_CEMANEIGE_X2 = ( + 1.0 - self.config.rvp.params.CEMANEIGE_X2 + ) + + # Default initial conditions if none are given + if not self.config.rvc.hru_states: + soil0 = ( + self.config.rvp.derived_params.GR4J_X1_hlf + if self.config.rvc.soil0 is None + else self.config.rvc.soil0 + ) + soil1 = self.config.rvc.soil1 + + # subbassin_id -> has at least one LakeHRU + sb_contains_lake = defaultdict(lambda: False) + + if not self.config.rvc.hru_states: + # If self.rvc.hru_states is set, it means that we are using `resume()` and we don't + # want to interfere + for hru in self.config.rvh.hrus: + if isinstance(hru, GR4JCN.LandHRU) or hru._hru_type == "land": + self.config.rvc.hru_states[hru.hru_id] = HRUState( + index=hru.hru_id, soil0=soil0, soil1=soil1 + ) + elif isinstance(hru, GR4JCN.LakeHRU) or hru._hru_type == "lake": + self.config.rvc.hru_states[hru.hru_id] = HRUState(index=hru.hru_id) + sb_contains_lake[hru.subbasin_id] = True + else: + raise Exception( + "Type of HRU must be either `GR4JCN.LandHRU` or `GR4JCN.LakeHRU` (or its `_hru_type` must be either 'land' or 'lake')" + ) + + if not self.config.rvc.basin_states: + # If self.rvc.basin_states is set, it means that we are using `resume()` and we don't + # want to interfere + for sb in self.config.rvh.subbasins: + self.config.rvc.basin_states[sb.subbasin_id] = BasinIndexCommand( + index=sb.subbasin_id + ) + + self.config.rvh.lake_subbasins = tuple( + [ + sb.subbasin_id + for sb in self.config.rvh.subbasins + if sb_contains_lake[sb.subbasin_id] + ] + ) + self.config.rvh.land_subbasins = tuple( + [ + sb.subbasin_id + for sb in self.config.rvh.subbasins + if not sb_contains_lake[sb.subbasin_id] + ] + ) + + +class GR4JCN_OST(Ostrich, GR4JCN): + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + algorithm="DDS", + max_iterations=50, + lowerBounds=GR4JCN.Params(), + upperBounds=GR4JCN.Params(), + suppress_output=True, + ) + + self.config.rvc.tmpl = """ + # Tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "para_x1" wouldn't be detectable) + # para_half_x1 = para_x1 / 2. = par_x1 / 2. [m] = par_half_x1 [mm] + + # initialize to 1/2 full + # GR4J_X1 * 1000. / 2.0 + :UniformInitialConditions SOIL[0] par_half_x1 + + # Fixed because SOIL_ROUT layer thickness is fixed to be 0.3m + :UniformInitialConditions SOIL[1] 15.0 + + :HRUStateVariableTable (formerly :InitialConditionsTable) + :Attributes SOIL[0] SOIL[1] + :Units mm mm + 1 par_half_x1 15.0 + :EndHRUStateVariableTable + """ + self.config.rvc.is_ostrich_tmpl = True + + self.config.rvp.tmpl = """ + ######################################################################### + :FileType rvp ASCII Raven 2.8.2 + :WrittenBy Juliane Mai & James Craig + :CreationDate Sep 2018 + # + # Emulation of GR4J simulation of Salmon River near Prince George + #------------------------------------------------------------------------ + + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "para_x6" wouldn't be detectable) + # para_1_minus_x6 = par_x6 - 1.0 = par_1_minus_x6 + + # -Global snow parameters------------------------------------- + :RainSnowTransition 0 1.0 + :AirSnowCoeff par_1_minus_x6 # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 + :AvgAnnualSnow par_x5 # [mm] = CEMANEIGE_X1 = x5 + + # -Orographic Corrections------------------------------------- + :PrecipitationLapseRate 0.0004 + :AdiabaticLapseRate 0.0065 + + # - Soil classes --------------------------------------------- + :SoilClasses + :Attributes + :Units + SOIL_PROD + SOIL_ROUT + SOIL_TEMP + SOIL_GW + :EndSoilClasses + :SoilParameterList + :Parameters, POROSITY , GR4J_X3, GR4J_X2 + :Units , none , mm, mm/d + [DEFAULT], 1.0 , par_x3, par_x2 + :EndSoilParameterList + + # ----Soil Profiles-------------------------------------------- + # name, #horizons, (soiltype, thickness) x #horizons + # GR4J_X1 is thickness of first layer (SOIL_PROD), here 0.696 + :SoilProfiles + DEFAULT_P, 4, SOIL_PROD , par_x1, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, + :EndSoilProfiles + + # ----Vegetation Classes--------------------------------------- + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 0.0, 0.0, 0.0 + :EndVegetationClasses + + # --Land Use Classes------------------------------------------ + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units , frac, frac + LU_ALL, 0.0, 0.0 + :EndLandUseClasses + :LandUseParameterList + :Parameters, GR4J_X4, MELT_FACTOR + :Units , d, mm/d/C + [DEFAULT], par_x4, 7.73 + :EndLandUseParameterList + """ + self.config.rvp.is_ostrich_tmpl = True + + self.config.ost.tmpl = """ + ProgramType {algorithm} + ObjectiveFunction GCOP + ModelExecutable ./ostrich-runs-raven.sh + PreserveBestModel ./save_best.sh + #OstrichWarmStart yes + + ModelSubdir processor_ + + BeginExtraDirs + model + #best + EndExtraDirs + + BeginFilePairs + {identifier}.rvp.tpl; {identifier}.rvp + {identifier}.rvc.tpl; {identifier}.rvc + #can be multiple (.rvh, .rvi) + EndFilePairs + + #Parameter/DV Specification + BeginParams + #parameter init. low high tx_in tx_ost tx_out + par_x1 random {lowerBounds.GR4J_X1} {upperBounds.GR4J_X1} none none none + par_x2 random {lowerBounds.GR4J_X2} {upperBounds.GR4J_X2} none none none + par_x3 random {lowerBounds.GR4J_X3} {upperBounds.GR4J_X3} none none none + par_x4 random {lowerBounds.GR4J_X4} {upperBounds.GR4J_X4} none none none + par_x5 random {lowerBounds.CEMANEIGE_X1} {upperBounds.CEMANEIGE_X1} none none none + par_x6 random {lowerBounds.CEMANEIGE_X2} {upperBounds.CEMANEIGE_X2} none none none + EndParams + + BeginTiedParams + # par_half_x1 = par_x1 * 0.5 * 1000 --> half of it but in [mm] not [m] + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 500. + # + par_half_x1 1 par_x1 linear 500.0 0.0 free + # + # par_1_minus_x6 = - par_x6 + 1.0 + # Xtied = (c1 * X1) + c0 + # --> c0 = 1.0 + # --> c1 = -1.0 + # + par_1_minus_x6 1 par_x6 linear -1.00 1.00 free + EndTiedParams + + BeginResponseVars + #name filename keyword line col token + NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' + EndResponseVars + + BeginTiedRespVars + NegNS 1 NS wsum -1.00 + EndTiedRespVars + + BeginGCOP + CostFunction NegNS + PenaltyFunction APM + EndGCOP + + BeginConstraints + # not needed when no constraints, but PenaltyFunction statement above is required + # name type penalty lwr upr resp.var + EndConstraints + + # Randomsed control added + {random_seed} + + #Algorithm should be last in this file: + + BeginDDSAlg + PerturbationValue 0.20 + MaxIterations {max_iterations} + UseRandomParamValues + # UseInitialParamValues + # above intializes DDS to parameter values IN the initial model input files + EndDDSAlg + """ + + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.ost.run_name = self.config.rvi.run_name + self.config.ost.run_index = self.config.rvi.run_index + + def derived_parameters(self): + """Derived parameters are computed by Ostrich.""" + pass diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py new file mode 100644 index 00000000..f7ca79fc --- /dev/null +++ b/ravenpy/models/emulators/hbvec.py @@ -0,0 +1,569 @@ +from collections import defaultdict +from dataclasses import dataclass +from pathlib import Path + +import xarray as xr + +from ravenpy.config.commands import BasinIndexCommand +from ravenpy.models.base import Ostrich, Raven +from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub + +from .gr4jcn import GR4JCN + + +class HBVEC(Raven): + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + par_x11: float = None + par_x12: float = None + par_x13: float = None + par_x14: float = None + par_x15: float = None + par_x16: float = None + par_x17: float = None + par_x18: float = None + par_x19: float = None + par_x20: float = None + par_x21: float = None + + @dataclass + class DerivedParams: + one_plus_par_x15: float = None + par_x11_half: float = None + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + hrus=(GR4JCN.LandHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=HBVEC.Params(), + derived_params=HBVEC.DerivedParams(), + ) + + self.config.rvp.tmpl = """ + #------------------------------------------------------------------------ + # Global parameters + # + # HBV_PARA_13=TCALT + :AdiabaticLapseRate {params.par_x13} + # HBV_PARA_01, CONSTANT, + :RainSnowTransition {params.par_x01}, 2.0 + # HBV_PARA_04, + :IrreducibleSnowSaturation {params.par_x04} + # HBV_PARA_12=PCALT + :GlobalParameter PRECIP_LAPSE {params.par_x12} + + #--------------------------------------------------------- + # Soil classes + :SoilClasses + :Attributes, + :Units, + TOPSOIL, 1.0, 0.0, 0 + SLOW_RES, 1.0, 0.0, 0 + FAST_RES, 1.0, 0.0, 0 + :EndSoilClasses + + :SoilParameterList + :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N + :Units , none, none, none, none, mm/d, mm/d, 1/d, none + # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, + [DEFAULT], {params.par_x05}, {params.par_x06}, {params.par_x14}, {params.par_x07}, {params.par_x16}, 0.0, 0.0, 0.0 + # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, + FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, {params.par_x08}, {params.par_x09}, {derived_params.one_plus_par_x15} + # CONSTANT, HBV_PARA_10, CONSTANT, + SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, {params.par_x10}, 1.0 + :EndSoilParameterList + + #--------------------------------------------------------- + # Soil profiles + # name, layers, (soilClass, thickness) x layers + # + :SoilProfiles + # HBV_PARA_17, CONSTANT, CONSTANT, + DEFAULT_P, 3, TOPSOIL, {params.par_x17}, FAST_RES, 100.0, SLOW_RES, 100.0 + :EndSoilProfiles + + #--------------------------------------------------------- + # Vegetation classes + # + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 25, 6.0, 5.3 + :EndVegetationClasses + + :VegetationParameterList + :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, + :Units, mm, mm, frac, frac, + VEG_ALL, 10000, 10000, 0.88, 0.88, + :EndVegetationParameterList + + #--------------------------------------------------------- + # LandUse classes + # + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units, frac, frac + LU_ALL, 0.0, 1 + :EndLandUseClasses + + :LandUseParameterList + :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR + :Units , mm/d/K, mm/d/K, none, mm/d/K, none + # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT + [DEFAULT], {params.par_x02}, 2.2, {params.par_x18}, {params.par_x03}, 0.48 + :EndLandUseParameterList + + :LandUseParameterList + :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG + :Units , none, 1/d, 1/d, 1/mm + # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, + [DEFAULT], 1.64, 0.05, {params.par_x19}, 0.05 + :EndLandUseParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + #------------------------------------------------------------------------ + # Model options + # + :Method ORDERED_SERIES + #:Interpolation INTERP_NEAREST_NEIGHBOR + + :Routing ROUTE_NONE + :CatchmentRoute TRIANGULAR_UH + + :Evaporation {evaporation} # PET_FROM_MONTHLY + :OW_Evaporation {ow_evaporation} # PET_FROM_MONTHLY + :SWRadiationMethod SW_RAD_DEFAULT + :SWCloudCorrect SW_CLOUD_CORR_NONE + :SWCanopyCorrect SW_CANOPY_CORR_NONE + :LWRadiationMethod LW_RAD_DEFAULT + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + :PotentialMeltMethod POTMELT_HBV + :OroTempCorrect OROCORR_HBV + :OroPrecipCorrect OROCORR_HBV + :OroPETCorrect OROCORR_HBV + :CloudCoverMethod CLOUDCOV_NONE + :PrecipIceptFract PRECIP_ICEPT_USER + :MonthlyInterpolationMethod MONTHINT_LINEAR_21 + + :SoilModel SOIL_MULTILAYER 3 + + #------------------------------------------------------------------------ + # Soil Layer Alias Definitions + # + :Alias FAST_RESERVOIR SOIL[1] + :Alias SLOW_RESERVOIR SOIL[2] + :LakeStorage SLOW_RESERVOIR + + #------------------------------------------------------------------------ + # Hydrologic process order for HBV-EC Emulation + # + :HydrologicProcesses + :SnowRefreeze FREEZE_DEGREE_DAY SNOW_LIQ SNOW + :Precipitation PRECIP_RAVEN ATMOS_PRECIP MULTIPLE + :CanopyEvaporation CANEVP_ALL CANOPY ATMOSPHERE + :CanopySnowEvap CANEVP_ALL CANOPY_SNOW ATMOSPHERE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW SNOW_LIQ + :-->Overflow RAVEN_DEFAULT SNOW_LIQ PONDED_WATER + :Flush RAVEN_DEFAULT PONDED_WATER GLACIER + :-->Conditional HRU_TYPE IS GLACIER + :GlacierMelt GMELT_HBV GLACIER_ICE GLACIER + :GlacierRelease GRELEASE_HBV_EC GLACIER SURFACE_WATER + :Infiltration INF_HBV PONDED_WATER MULTIPLE + :Flush RAVEN_DEFAULT SURFACE_WATER FAST_RESERVOIR + :-->Conditional HRU_TYPE IS_NOT GLACIER + :SoilEvaporation SOILEVAP_HBV SOIL[0] ATMOSPHERE + :CapillaryRise RISE_HBV FAST_RESERVOIR SOIL[0] + :LakeEvaporation LAKE_EVAP_BASIC SLOW_RESERVOIR ATMOSPHERE + :Percolation PERC_CONSTANT FAST_RESERVOIR SLOW_RESERVOIR + :Baseflow BASE_POWER_LAW FAST_RESERVOIR SURFACE_WATER + :Baseflow BASE_LINEAR SLOW_RESERVOIR SURFACE_WATER + :EndHydrologicProcesses + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hbvec + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvh.tmpl = """ + {subbasins} + + {hrus} + + :SubBasinProperties + # HBV_PARA_11, DERIVED FROM HBV_PARA_11, + # MAXBAS, MAXBAS/2, + :Parameters, TIME_CONC, TIME_TO_PEAK + :Units , d, d, + 1, {par_x11}, {par_x11_half}, + :EndSubBasinProperties + """ + + self.config.rvi.evaporation = "PET_FROMMONTHLY" + self.config.rvi.ow_evaporation = "PET_FROMMONTHLY" + self.config.rvi.rain_snow_fraction = "RAINSNOW_HBV" + + self.config.rvc.soil2 = 0.50657 + + def derived_parameters(self): + self.config.rvp.derived_params.one_plus_par_x15 = ( + self.config.rvp.params.par_x15 + 1.0 + ) + self.config.rvp.derived_params.par_x11_half = ( + self.config.rvp.params.par_x11 / 2.0 + ) + + # These need to be injected in the RVH + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.rvh.par_x11 = self.config.rvp.params.par_x11 + self.config.rvh.par_x11_half = self.config.rvp.derived_params.par_x11_half + + self.config.rvt.rain_correction = self.config.rvp.params.par_x20 + self.config.rvt.snow_correction = self.config.rvp.params.par_x21 + + self._monthly_average() + + # Default initial conditions if none are given + if not self.config.rvc.hru_states: + self.config.rvc.hru_states[1] = HRUState(soil2=self.config.rvc.soil2) + if not self.config.rvc.basin_states: + self.config.rvc.basin_states[1] = BasinIndexCommand() + + # TODO: Support index specification and unit changes. + def _monthly_average(self): + + if ( + self.config.rvi.evaporation == "PET_FROMMONTHLY" + or self.config.rvi.ow_evaporation == "PET_FROMMONTHLY" + ): + # If this fails, it's likely the input data is missing some necessary variables (e.g. evap). + tas_cmd = self.config.rvt._var_cmds["tas"] + tasmin_cmd = self.config.rvt._var_cmds["tasmin"] + tasmax_cmd = self.config.rvt._var_cmds["tasmax"] + evspsbl_cmd = self.config.rvt._var_cmds["evspsbl"] + + if tas_cmd: + tas = xr.open_dataset(tas_cmd.file_name_nc)[tas_cmd.var_name_nc] + else: + tasmax = xr.open_dataset(tasmax_cmd.file_name_nc)[ + tasmax_cmd.var_name_nc + ] + tasmin = xr.open_dataset(tasmin_cmd.file_name_nc)[ + tasmin_cmd.var_name_nc + ] + tas = (tasmax + tasmin) / 2.0 + + if evspsbl_cmd: + evap = xr.open_dataset(evspsbl_cmd.file_name_nc)[ + evspsbl_cmd.var_name_nc + ] + + mat = tas.groupby("time.month").mean().values + mae = evap.groupby("time.month").mean().values + + self.config.rvt.monthly_ave_evaporation = tuple(mae) + self.config.rvt.monthly_ave_temperature = tuple(mat) + + +class HBVEC_OST(Ostrich, HBVEC): + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + algorithm="DDS", + max_iterations=50, + lowerBounds=HBVEC.Params(), + upperBounds=HBVEC.Params(), + run_name="run", + run_index=0, + suppress_output=True, + ) + + self.config.rvc.tmpl = """ + :BasinInitialConditions + :Attributes, ID, Q + :Units, none, m3/s + # HBV_PARA_??? + 1, 1.0 + :EndBasinInitialConditions + + #--------------------------------------------------------- + # Initial Lower groundwater storage - for each HRU + + :InitialConditions SOIL[2] + # HBV_PARA_??? + 0.50657 + :EndInitialConditions + """ + + self.config.rvh.tmpl = """ + :SubBasins + :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED + :Units none none none km none + 1, hbv, -1, NONE, _AUTO, 1 + :EndSubBasins + + :HRUs + :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT + :Units km2 m deg deg none none none none none none ratio deg + 1, 4250.6, 843.0, 54.4848, -123.3659, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [NONE], [NONE] + :EndHRUs + + :SubBasinProperties + # HBV_PARA_11, DERIVED FROM HBV_PARA_11, + # MAXBAS, MAXBAS/2, + :Parameters, TIME_CONC, TIME_TO_PEAK + :Units , d, d, + 1, par_x11, par_half_x11, + :EndSubBasinProperties + """ + self.config.rvh.is_ostrich_tmpl = True + + self.config.rvp.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "para_x05" and "para_x15" wouldn't be detectable) + # para_1_+_x15 = 1.0 + par_x15 + # para_half_x11 = 0.5 * par_x11 + + #------------------------------------------------------------------------ + # Global parameters + # + # HBV_PARA_13=TCALT + :AdiabaticLapseRate par_x13 + # HBV_PARA_01, CONSTANT, + :RainSnowTransition par_x01 2.0 + # HBV_PARA_04, + :IrreducibleSnowSaturation par_x04 + # HBV_PARA_12=PCALT + :GlobalParameter PRECIP_LAPSE par_x12 + + #--------------------------------------------------------- + # Soil classes + :SoilClasses + :Attributes, + :Units, + TOPSOIL, 1.0, 0.0, 0 + SLOW_RES, 1.0, 0.0, 0 + FAST_RES, 1.0, 0.0, 0 + :EndSoilClasses + + :SoilParameterList + :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N + :Units , none, none, none, none, mm/d, mm/d, 1/d, none + # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, + [DEFAULT], par_x05, par_x06, par_x14, par_x07, par_x16, 0.0, 0.0, 0.0 + # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, + FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, par_x08, par_x09, par_1_+_x15 + # CONSTANT, HBV_PARA_10, CONSTANT, + SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, par_x10, 1.0 + :EndSoilParameterList + + #--------------------------------------------------------- + # Soil profiles + # name, layers, (soilClass, thickness) x layers + # + :SoilProfiles + # HBV_PARA_17, CONSTANT, CONSTANT, + DEFAULT_P, 3, TOPSOIL, par_x17, FAST_RES, 100.0, SLOW_RES, 100.0 + :EndSoilProfiles + + #--------------------------------------------------------- + # Vegetation classes + # + :VegetationClasses + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND + :Units, m, none, mm_per_s + VEG_ALL, 25, 6.0, 5.3 + :EndVegetationClasses + + :VegetationParameterList + :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, + :Units, mm, mm, frac, frac, + VEG_ALL, 10000, 10000, 0.88, 0.88, + :EndVegetationParameterList + + #--------------------------------------------------------- + # LandUse classes + # + :LandUseClasses + :Attributes, IMPERM, FOREST_COV + :Units, frac, frac + LU_ALL, 0.0, 1 + :EndLandUseClasses + + :LandUseParameterList + :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR + :Units , mm/d/K, mm/d/K, none, mm/d/K, none + # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT + [DEFAULT], par_x02, 2.2, par_x18, par_x03, 0.48 + :EndLandUseParameterList + + :LandUseParameterList + :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG + :Units , none, 1/d, 1/d, 1/mm + # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, + [DEFAULT], 1.64, 0.05, par_x19, 0.05 + :EndLandUseParameterList + """ + self.config.rvp.is_ostrich_tmpl = True + + self.config.rvt.tmpl = """ + {gauge} + + {forcing_list} + + {observed_data} + """ + self.config.rvt.is_ostrich_tmpl = True + + self.config.ost.tmpl = """ + ProgramType {algorithm} + ObjectiveFunction GCOP + ModelExecutable ./ostrich-runs-raven.sh + PreserveBestModel ./save_best.sh + #OstrichWarmStart yes + + ModelSubdir processor_ + + BeginExtraDirs + model + #best + EndExtraDirs + + BeginFilePairs + {identifier}.rvp.tpl; {identifier}.rvp + {identifier}.rvh.tpl; {identifier}.rvh + {identifier}.rvt.tpl; {identifier}.rvt + #can be multiple (.rvh, .rvi) + EndFilePairs + + #Parameter/DV Specification + BeginParams + #parameter init. low high tx_in tx_ost tx_out # in HBV called + par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none TT + par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none CFMAX + par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none CFR + par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none CWH + par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none par_x5 = FC/par_x21 + par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none LP + par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none BETA + par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none PERC + par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none K1 + par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none K2 + par_x11 random {lowerBounds.par_x11} {upperBounds.par_x11} none none none MAXBAS + par_x12 random {lowerBounds.par_x12} {upperBounds.par_x12} none none none PCALT + par_x13 random {lowerBounds.par_x13} {upperBounds.par_x13} none none none TCALT + par_x14 random {lowerBounds.par_x14} {upperBounds.par_x14} none none none saturation at the wilting point + par_x15 random {lowerBounds.par_x15} {upperBounds.par_x15} none none none ALPHA + par_x16 random {lowerBounds.par_x16} {upperBounds.par_x16} none none none maximum interflow rate for capillary rise + par_x17 random {lowerBounds.par_x17} {upperBounds.par_x17} none none none thickness of top soil layer + par_x18 random {lowerBounds.par_x18} {upperBounds.par_x18} none none none melt correction factor (forest) + par_x19 random {lowerBounds.par_x19} {upperBounds.par_x19} none none none release from glacier as it melts + par_x20 random {lowerBounds.par_x20} {upperBounds.par_x20} none none none RFCF + par_x21 random {lowerBounds.par_x21} {upperBounds.par_x21} none none none SFCF + EndParams + + BeginTiedParams + # par_1_+_x15 = 1.0 + par_x15 + # Xtied = (c1 * X1) + c0 + # --> c0 = 1.0 + # --> c1 = 1.0 + # + par_1_+_x15 1 par_x15 linear 1.00 1.00 free + # + # par_half_x11 = par_x11 * 0.5 + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 0.5 + # + par_half_x11 1 par_x11 linear 0.5 0.0 free + EndTiedParams + + BeginResponseVars + #name filename keyword line col token + NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' + EndResponseVars + + BeginTiedRespVars + NegNS 1 NS wsum -1.00 + EndTiedRespVars + + BeginGCOP + CostFunction NegNS + PenaltyFunction APM + EndGCOP + + BeginConstraints + # not needed when no constraints, but PenaltyFunction statement above is required + # name type penalty lwr upr resp.var + EndConstraints + + # Randomsed control added + {random_seed} + + #Algorithm should be last in this file: + + BeginDDSAlg + PerturbationValue 0.20 + MaxIterations {max_iterations} + UseRandomParamValues + # UseInitialParamValues + # above intializes DDS to parameter values IN the initial model input files + EndDDSAlg + """ + + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.ost.run_name = self.config.rvi.run_name + self.config.ost.run_index = self.config.rvi.run_index + + # TODO: Support index specification and unit changes. + def derived_parameters(self): + self.config.rvt.rain_correction = "par_x20" + self.config.rvt.snow_correction = "par_x21" + self._monthly_average() diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py new file mode 100644 index 00000000..0cd05500 --- /dev/null +++ b/ravenpy/models/emulators/hmets.py @@ -0,0 +1,518 @@ +from dataclasses import dataclass +from pathlib import Path + +from ravenpy.models.base import Ostrich, Raven +from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub + + +class HMETS(Raven): + @dataclass + class Params: + GAMMA_SHAPE: float = None + GAMMA_SCALE: float = None + GAMMA_SHAPE2: float = None + GAMMA_SCALE2: float = None + MIN_MELT_FACTOR: float = None + MAX_MELT_FACTOR: float = None + DD_MELT_TEMP: float = None + DD_AGGRADATION: float = None + SNOW_SWI_MIN: float = None + SNOW_SWI_MAX: float = None + SWI_REDUCT_COEFF: float = None + DD_REFREEZE_TEMP: float = None + REFREEZE_FACTOR: float = None + REFREEZE_EXP: float = None + PET_CORRECTION: float = None + HMETS_RUNOFF_COEFF: float = None + PERC_COEFF: float = None + BASEFLOW_COEFF_1: float = None + BASEFLOW_COEFF_2: float = None + TOPSOIL: float = None + PHREATIC: float = None + + @dataclass + class DerivedParams: + TOPSOIL_m: float = None + PHREATIC_m: float = None + SUM_MELT_FACTOR: float = None + SUM_SNOW_SWI: float = None + TOPSOIL_hlf: float = None + PHREATIC_hlf: float = None + + @dataclass + class ForestHRU(HRU): + land_use_class: str = "FOREST" + veg_class: str = "FOREST" + soil_profile: str = "DEFAULT_P" + aquifer_profile: str = "[NONE]" + terrain_class: str = "[NONE]" + # _hru_type: str = "land" + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + hrus=(HMETS.ForestHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=HMETS.Params(), + derived_params=HMETS.DerivedParams(), + ) + + self.config.rvp.tmpl = """ + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + FOREST, 0.0, 1.0, + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 2, TOPSOIL, {derived_params.TOPSOIL_m}, PHREATIC, {derived_params.PHREATIC_m}, + # DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN {params.SNOW_SWI_MIN} # x(9) + :GlobalParameter SNOW_SWI_MAX {derived_params.SUM_SNOW_SWI} # x(9)+x(10) + :GlobalParameter SWI_REDUCT_COEFF {params.SWI_REDUCT_COEFF} # x(11) + :GlobalParameter SNOW_SWI 0.05 # not sure why/if needed... + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, {params.PERC_COEFF},{params.PET_CORRECTION},{params.BASEFLOW_COEFF_1} + PHREATIC, 1.0, 0.0, 0.0, {params.BASEFLOW_COEFF_2} + # TOPSOIL, 1.0, x(17), x(15), x(18) + # PHREATIC, 1.0, 0.0, 0.0, x(19) + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT],{params.MIN_MELT_FACTOR},{derived_params.SUM_MELT_FACTOR}, {params.DD_MELT_TEMP},{params.DD_AGGRADATION},{params.REFREEZE_FACTOR}, {params.REFREEZE_EXP},{params.DD_REFREEZE_TEMP},{params.HMETS_RUNOFF_COEFF}, + # x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, + :Units, -, 1/d, -, 1/d, + [DEFAULT], {params.GAMMA_SHAPE}, {params.GAMMA_SCALE}, {params.GAMMA_SHAPE2}, {params.GAMMA_SCALE2}, + # x(1), x(2), x(3), x(4), + :EndLandUseParameterList + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, + [DEFAULT], 0.0, 0.0, + :EndVegetationParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :PotentialMeltMethod POTMELT_HMETS + :RainSnowFraction {rain_snow_fraction} + :Evaporation {evaporation} # PET_OUDIN + :CatchmentRoute ROUTE_DUMP + :Routing ROUTE_NONE + + :SoilModel SOIL_TWO_LAYER + + :Alias DELAYED_RUNOFF CONVOLUTION[1] + + :HydrologicProcesses + :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :Infiltration INF_HMETS PONDED_WATER MULTIPLE + :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF + :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER # interflow, really + :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge + :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF + :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET + :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER #'surface runoff' + :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER #'delayed runoff' + :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER + :EndHydrologicProcesses + + #:CreateRVPTemplate + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id hmets + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvi.evaporation = "PET_OUDIN" + self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + + self.config.rvc.soil0 = None + self.config.rvc.soil1 = None + + def derived_parameters(self): + self.config.rvp.derived_params.TOPSOIL_hlf = ( + self.config.rvp.params.TOPSOIL * 0.5 + ) + self.config.rvp.derived_params.PHREATIC_hlf = ( + self.config.rvp.params.PHREATIC * 0.5 + ) + self.config.rvp.derived_params.TOPSOIL_m = ( + self.config.rvp.params.TOPSOIL / 1000.0 + ) + self.config.rvp.derived_params.PHREATIC_m = ( + self.config.rvp.params.PHREATIC / 1000.0 + ) + + self.config.rvp.derived_params.SUM_MELT_FACTOR = ( + self.config.rvp.params.MAX_MELT_FACTOR + ) + self.config.rvp.derived_params.SUM_SNOW_SWI = ( + self.config.rvp.params.SNOW_SWI_MAX + ) + + # Default initial conditions if none are given + if not self.config.rvc.hru_states: + soil0 = ( + self.config.rvp.derived_params.TOPSOIL_hlf + if self.config.rvc.soil0 is None + else self.config.rvc.soil0 + ) + soil1 = ( + self.config.rvp.derived_params.PHREATIC_hlf + if self.config.rvc.soil1 is None + else self.config.rvc.soil1 + ) + self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) + + +class HMETS_OST(Ostrich, HMETS): + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + algorithm="DDS", + max_iterations=50, + lowerBounds=HMETS.Params(), + upperBounds=HMETS.Params(), + run_name="run", + run_index=0, + suppress_output=True, + ) + + self.config.rvc.tmpl = """ + # Tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "par_x20" and "par_x21" wouldn't be detectable) + # para_half_x20 = para_x20 / 2. = par_x20 / 2. [m] = par_half_x20 [mm] + # para_half_x21 = para_x21 / 2. = par_x21 / 2. [m] = par_half_x21 [mm] + + + # initialize to 1/2 full + :UniformInitialConditions SOIL[0] par_half_x20 + :UniformInitialConditions SOIL[1] par_half_x21 + + :HRUStateVariableTable (formerly :IntialConditionsTable) + :Attributes SOIL[0] SOIL[1] + :Units mm mm + 1 par_half_x20 par_half_x21 + :EndHRUStateVariableTable + """ + self.config.rvc.is_ostrich_tmpl = True + + self.config.rvp.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "par_x06" and "par_x10" wouldn't be detectable) + # para_sum_x05_x06 = par_x05 + par_x06 + # para_sum_x09_x10 = par_x09 + par_x10 + + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + FOREST, 0.0, 1.0, + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 2, TOPSOIL, par_x20, PHREATIC, par_x21, + # DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN par_x09 # x(9) + :GlobalParameter SNOW_SWI_MAX par_sum_x09_x10 # x(9)+x(10) + :GlobalParameter SWI_REDUCT_COEFF par_x11 # x(11) + :GlobalParameter SNOW_SWI 0.05 #not sure why/if needed... + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, par_x17, par_x15, par_x18 + PHREATIC, 1.0, 0.0, 0.0, par_x19 + # TOPSOIL, 1.0, x(17), x(15), x(18) + # PHREATIC, 1.0, 0.0, 0.0, x(19) + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT], par_x05, par_sum_x05_x06, par_x07, par_x08, par_x13, par_x14, par_x12, par_x16, + # x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, + :Units, -, -, -, -, + [DEFAULT], par_x01, par_x02, par_x03, par_x04, + # x(1), x(2), x(3), x(4), + :EndLandUseParameterList + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, + [DEFAULT], 0.0, 0.0, + :EndVegetationParameterList + """ + self.config.rvp.is_ostrich_tmpl = True + + self.config.ost.tmpl = """ + ProgramType {algorithm} + ObjectiveFunction GCOP + ModelExecutable ./ostrich-runs-raven.sh + PreserveBestModel ./save_best.sh + #OstrichWarmStart yes + + ModelSubdir processor_ + + BeginExtraDirs + model + #best + EndExtraDirs + + BeginFilePairs + {identifier}.rvp.tpl; {identifier}.rvp + {identifier}.rvc.tpl; {identifier}.rvc + #can be multiple (.rvh, .rvi) + EndFilePairs + + #Parameter/DV Specification + BeginParams + #parameter init. low high tx_in tx_ost tx_out + par_x01 random {lowerBounds.GAMMA_SHAPE} {upperBounds.GAMMA_SHAPE} none none none + par_x02 random {lowerBounds.GAMMA_SCALE} {upperBounds.GAMMA_SCALE} none none none + par_x03 random {lowerBounds.GAMMA_SHAPE2} {upperBounds.GAMMA_SHAPE2} none none none + par_x04 random {lowerBounds.GAMMA_SCALE2} {upperBounds.GAMMA_SCALE2} none none none + par_x05 random {lowerBounds.MIN_MELT_FACTOR} {upperBounds.MIN_MELT_FACTOR} none none none + par_x06 random {lowerBounds.MAX_MELT_FACTOR} {upperBounds.MAX_MELT_FACTOR} none none none + par_x07 random {lowerBounds.DD_MELT_TEMP} {upperBounds.DD_MELT_TEMP} none none none + par_x08 random {lowerBounds.DD_AGGRADATION} {upperBounds.DD_AGGRADATION} none none none + par_x09 random {lowerBounds.SNOW_SWI_MIN} {upperBounds.SNOW_SWI_MIN} none none none + par_x10 random {lowerBounds.SNOW_SWI_MAX} {upperBounds.SNOW_SWI_MAX} none none none + par_x11 random {lowerBounds.SWI_REDUCT_COEFF} {upperBounds.SWI_REDUCT_COEFF} none none none + par_x12 random {lowerBounds.DD_REFREEZE_TEMP} {upperBounds.DD_REFREEZE_TEMP} none none none + par_x13 random {lowerBounds.REFREEZE_FACTOR} {upperBounds.REFREEZE_FACTOR} none none none + par_x14 random {lowerBounds.REFREEZE_EXP} {upperBounds.REFREEZE_EXP} none none none + par_x15 random {lowerBounds.PET_CORRECTION} {upperBounds.PET_CORRECTION} none none none + par_x16 random {lowerBounds.HMETS_RUNOFF_COEFF} {upperBounds.HMETS_RUNOFF_COEFF} none none none + par_x17 random {lowerBounds.PERC_COEFF} {upperBounds.PERC_COEFF} none none none + par_x18 random {lowerBounds.BASEFLOW_COEFF_1} {upperBounds.BASEFLOW_COEFF_1} none none none + par_x19 random {lowerBounds.BASEFLOW_COEFF_2} {upperBounds.BASEFLOW_COEFF_2} none none none + par_x20 random {lowerBounds.TOPSOIL} {upperBounds.TOPSOIL} none none none + par_x21 random {lowerBounds.PHREATIC} {upperBounds.PHREATIC} none none none + EndParams + + BeginTiedParams + # par_sum_x05_x06 = par_x05 + par_x06 + # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> c3 = 0.0 + # + par_sum_x05_x06 2 par_x05 par_x06 linear 0.00 1.00 1.00 0.00 free + # + # par_sum_x09_x10 = par_x09 + par_x10 + # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> c3 = 0.0 + # + par_sum_x09_x10 2 par_x09 par_x10 linear 0.00 1.00 1.00 0.00 free + # + # par_half_x20 = par_x20 * 0.5 * 1000 --> half of it but in [mm] not [m] + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 500. + # + par_half_x20 1 par_x20 linear 500.0 0.0 free + # + # par_half_x21 = par_x21 * 0.5 * 1000 --> half of it but in [mm] not [m] + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 500. + # + par_half_x21 1 par_x21 linear 500.0 0.0 free + EndTiedParams + + BeginResponseVars + #name filename keyword line col token + NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' + EndResponseVars + + BeginTiedRespVars + NegNS 1 NS wsum -1.00 + EndTiedRespVars + + BeginGCOP + CostFunction NegNS + PenaltyFunction APM + EndGCOP + + BeginConstraints + # not needed when no constraints, but PenaltyFunction statement above is required + # name type penalty lwr upr resp.var + EndConstraints + + # Randomsed control added + {random_seed} + + #Algorithm should be last in this file: + + BeginDDSAlg + PerturbationValue 0.20 + MaxIterations {max_iterations} + UseRandomParamValues + # UseInitialParamValues + # above intializes DDS to parameter values IN the initial model input files + EndDDSAlg + """ + + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.ost.run_name = self.config.rvi.run_name + self.config.ost.run_index = self.config.rvi.run_index + + def derived_parameters(self): + """Derived parameters are computed by Ostrich.""" + pass + + def ost2raven(self, ops): + """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. + + Parameters + ---------- + ops: dict + Optimal parameter set returned by Ostrich. + + Returns + ------- + HMETSParams named tuple + Parameters expected by Raven. + """ + names = ["par_x{:02}".format(i) for i in range(1, 22)] + names[5] = "par_sum_x05_x06" + names[9] = "par_sum_x09_x10" + + out = [ops[n] for n in names] + out[19] *= 1000 + out[20] *= 1000 + return HMETS.Params(*out) diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py new file mode 100644 index 00000000..f07d8eca --- /dev/null +++ b/ravenpy/models/emulators/mohyse.py @@ -0,0 +1,426 @@ +from collections import defaultdict +from dataclasses import dataclass +from pathlib import Path + +from ravenpy.config.commands import BasinIndexCommand +from ravenpy.models.base import Ostrich, Raven +from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub + +from .gr4jcn import GR4JCN + + +class MOHYSE(Raven): + @dataclass + class Params: + par_x01: float = None + par_x02: float = None + par_x03: float = None + par_x04: float = None + par_x05: float = None + par_x06: float = None + par_x07: float = None + par_x08: float = None + par_x09: float = None + par_x10: float = None + + @dataclass + class DerivedParams: + par_rezi_x10: float = None + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + hrus=(GR4JCN.LandHRU(),), + subbasins=( + Sub( + subbasin_id=1, + name="sub_001", + downstream_id=-1, + profile="None", + gauged=True, + ), + ), + params=MOHYSE.Params(), + derived_params=MOHYSE.DerivedParams(), + ) + + self.config.rvp.tmpl = """ + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL + GWSOIL + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + LU_ALL, 0.0, 1.0 + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + VEG_ALL, 0.0, 0.0, 0.0 + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 + DEFAULT_P, 2, TOPSOIL, {params.par_x05}, GWSOIL, 10.0 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + #:GlobalParameter RAINSNOW_TEMP -2.0 + :GlobalParameter TOC_MULTIPLIER 1.0 + # :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 + :GlobalParameter MOHYSE_PET_COEFF {params.par_x01} + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, + :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) + # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, + # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, + TOPSOIL, 1.0 , 1.0, 1.0, {params.par_x07}, {params.par_x06}, + GWSOIL, 1.0 , 1.0, 1.0, {params.par_x08}, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, + :Units, mm/d/K, mm/d, -, degC, + # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, + [DEFAULT], {params.par_x03}, {params.par_x02}, 0.0, {params.par_x04}, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, -, + [DEFAULT], 0.0, 0.0, 0.0, + :EndVegetationParameterList + """ + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :SoilModel SOIL_TWO_LAYER + :PotentialMeltMethod POTMELT_DEGREE_DAY + :Routing ROUTE_NONE + :CatchmentRoute ROUTE_GAMMA_CONVOLUTION + :Evaporation {evaporation} # PET_MOHYSE + :DirectEvaporation + :RainSnowFraction {rain_snow_fraction} + + :HydrologicProcesses + :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :Infiltration INF_HBV PONDED_WATER SOIL[0] + :Baseflow BASE_LINEAR SOIL[0] SURFACE_WATER + :Percolation PERC_LINEAR SOIL[0] SOIL[1] + :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER + :EndHydrologicProcesses + + #:CreateRVPTemplate + + # :Alias MOHYSE_PARA_1 1.5589 # :GlobalParameter MOHYSE_PET_COEFF + # :Alias MOHYSE_PARA_2 0.9991 # LandUseParameterList --> AET_COEFF + # :Alias MOHYSE_PARA_3 2.1511 # LandUseParameterList --> MELT_FACTOR + # :Alias MOHYSE_PARA_4 -1.6101 # LandUseParameterList --> DD_MELT_TEMP + # :Alias MOHYSE_PARA_5 0.5000 # SoilProfiles --> thickness of TOPSOIL (in mm????? must be m!!!) + # :Alias MOHYSE_PARA_6 0.1050 # SoilParameterList --> PERC_COEFF (TOPSOIL) + # :Alias MOHYSE_PARA_7 0.0533 # SoilParameterList --> BASEFLOW_COEFF (TOPSOIL) + # :Alias MOHYSE_PARA_8 0.0132 # SoilParameterList --> BASEFLOW_COEFF (GWSOIL) + # :Alias MOHYSE_PARA_9 1.0474 # :SubBasinProperties --> GAMMA_SHAPE + # :Alias MOHYSE_PARA_10 7.9628 # :SubBasinProperties --> TIME_CONC = MOHYSE_PARA_10 / 0.3 = 26.542666666 + + #--------------------------------------------------------- + # Output Options + # + #:WriteForcingFunctions + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id mohyse + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + self.config.rvh.tmpl = """ + {subbasins} + + {hrus} + + :SubBasinProperties + # 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 + :Parameters, GAMMA_SCALE, GAMMA_SHAPE, + :Units, 1/d, - + 1, {par_rezi_x10}, {par_x09} + :EndSubBasinProperties + """ + + self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + self.config.rvi.evaporation = "PET_MOHYSE" + + # This is not stricly necessary it seems + self.config.rvc.hru_states[1] = HRUState() + self.config.rvc.basin_states[1] = BasinIndexCommand() + + def derived_parameters(self): + self.config.rvp.derived_params.par_rezi_x10 = ( + 1.0 / self.config.rvp.params.par_x10 + ) + + # These need to be injected in the RVH + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.rvh.par_rezi_x10 = self.config.rvp.derived_params.par_rezi_x10 + self.config.rvh.par_x09 = self.config.rvp.params.par_x09 + + +class MOHYSE_OST(Ostrich, MOHYSE): + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + self.config.update( + algorithm="DDS", + max_iterations=50, + lowerBounds=MOHYSE.Params(), + upperBounds=MOHYSE.Params(), + run_name="run", + run_index=0, + suppress_output=True, + ) + + self.config.rvp.tmpl = """ + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL + GWSOIL + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + :LandUseClasses, + :Attributes, IMPERM, FOREST_COV, + :Units, frac, frac, + LU_ALL, 0.0, 1.0 + :EndLandUseClasses + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + VEG_ALL, 0.0, 0.0, 0.0 + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 + DEFAULT_P, 2, TOPSOIL, par_x05, GWSOIL, 10.0 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + #:GlobalParameter RAINSNOW_TEMP -2.0 + :GlobalParameter TOC_MULTIPLIER 1.0 + # :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 + :GlobalParameter MOHYSE_PET_COEFF par_x01 + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, + :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) + # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, + # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, + TOPSOIL, 1.0 , 1.0, 1.0, par_x07, par_x06, + GWSOIL, 1.0 , 1.0, 1.0, par_x08, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, + :Units, mm/d/K, mm/d, -, degC, + # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, + [DEFAULT], par_x03, par_x02, 0.0, par_x04, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, + :Units, -, -, -, + [DEFAULT], 0.0, 0.0, 0.0, + :EndVegetationParameterList + """ + self.config.rvp.is_ostrich_tmpl = True + + self.config.rvh.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "par_x11" wouldn't be detectable) + # para_rezi_x10 = 1.0 / par_x10 + # para_x11 = par_x11 + + :SubBasins + :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED + :Units none none none km none + 1, mohyse, -1, NONE, _AUTO, 1 + :EndSubBasins + + :HRUs + :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT + :Units km2 m deg deg none none none none none none ratio deg + 1, 4250.6, 843.0, 54.4848, -123.3659, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [NONE], [NONE] + :EndHRUs + + :SubBasinProperties + # 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 + :Parameters, GAMMA_SCALE, GAMMA_SHAPE, + :Units, 1/d, - + 1, par_rezi_x10, par_x09 + :EndSubBasinProperties + """ + self.config.rvh.is_ostrich_tmpl = True + + self.config.ost.tmpl = """ + ProgramType {algorithm} + ObjectiveFunction GCOP + ModelExecutable ./ostrich-runs-raven.sh + PreserveBestModel ./save_best.sh + #OstrichWarmStart yes + + ModelSubdir processor_ + + BeginExtraDirs + model + #best + EndExtraDirs + + BeginFilePairs + {identifier}.rvp.tpl; {identifier}.rvp + {identifier}.rvh.tpl; {identifier}.rvh + #can be multiple (.rvh, .rvi) + EndFilePairs + + #Parameter/DV Specification + BeginParams + #parameter init. low high tx_in tx_ost tx_out + par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none + par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none + par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none + par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none + par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none + par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none + par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none + par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none + par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none + par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none + EndParams + + BeginTiedParams + # 2-parameter ratio (par_rezi_x10 = 1.0 / par_x10 ) + # Xtied =(c3 * par_x10 + c2)/(c1 * par_x10 + c0) + # --> c3 = 0.0 + # --> c2 = 1.0 + # --> c1 = 1.0 + # --> c0 = 0.0 + par_rezi_x10 2 par_x10 par_x10 ratio 0.00 1.00 1.00 0.00 free + EndTiedParams + + BeginResponseVars + #name filename keyword line col token + NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' + EndResponseVars + + BeginTiedRespVars + NegNS 1 NS wsum -1.00 + EndTiedRespVars + + BeginGCOP + CostFunction NegNS + PenaltyFunction APM + EndGCOP + + BeginConstraints + # not needed when no constraints, but PenaltyFunction statement above is required + # name type penalty lwr upr resp.var + EndConstraints + + # Randomsed control added + {random_seed} + + #Algorithm should be last in this file: + + BeginDDSAlg + PerturbationValue 0.20 + MaxIterations {max_iterations} + UseRandomParamValues + # UseInitialParamValues + # above intializes DDS to parameter values IN the initial model input files + EndDDSAlg + """ + + # TODO: find a better way to implement inter-RV value sharing/injection + self.config.ost.run_name = self.config.rvi.run_name + self.config.ost.run_index = self.config.rvi.run_index + + def derived_parameters(self): + """ Derived parameters are computed by Ostrich. """ + pass diff --git a/ravenpy/models/multimodel.py b/ravenpy/models/multimodel.py index 36d83dd6..19f0a277 100644 --- a/ravenpy/models/multimodel.py +++ b/ravenpy/models/multimodel.py @@ -1,5 +1,5 @@ from .base import Raven -from .emulators import GR4JCN, HBVEC, HMETS, MOHYSE, get_model +from .emulators import GR4JCN # , HBVEC, HMETS, MOHYSE, get_model # from .rv import RV diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py index 31fdcfc6..4ba2b156 100644 --- a/ravenpy/models/rv.py +++ b/ravenpy/models/rv.py @@ -190,42 +190,42 @@ def update(self, items, force=False): self[key] = val -class Ost(RV): - def __init__(self, **kwargs): - self._max_iterations = None - self._random_seed = None - - super(Ost, self).__init__(**kwargs) - - @property - def max_iterations(self): - return self._max_iterations - - @max_iterations.setter - def max_iterations(self, x): - if x < 1: - raise ValueError("Max iteration should be a positive integer: {}".format(x)) - else: - self._max_iterations = x - - @property - def random_seed(self): - if self._random_seed is not None: - return "RandomSeed {}".format(self._random_seed) - return "" - - @random_seed.setter - def random_seed(self, value): - if value >= 0: - self._random_seed = value - else: - self._random_seed = None - - -def isinstance_namedtuple(x): - a = isinstance(x, tuple) - b = getattr(x, "_fields", None) is not None - return a and b +# class Ost(RV): +# def __init__(self, **kwargs): +# self._max_iterations = None +# self._random_seed = None + +# super(Ost, self).__init__(**kwargs) + +# @property +# def max_iterations(self): +# return self._max_iterations + +# @max_iterations.setter +# def max_iterations(self, x): +# if x < 1: +# raise ValueError("Max iteration should be a positive integer: {}".format(x)) +# else: +# self._max_iterations = x + +# @property +# def random_seed(self): +# if self._random_seed is not None: +# return "RandomSeed {}".format(self._random_seed) +# return "" + +# @random_seed.setter +# def random_seed(self, value): +# if value >= 0: +# self._random_seed = value +# else: +# self._random_seed = None + + +# def isinstance_namedtuple(x): +# a = isinstance(x, tuple) +# b = getattr(x, "_fields", None) is not None +# return a and b def guess_linear_transform(actual, expected): diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 16326495..37e3b1d6 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -2,7 +2,7 @@ import os import tempfile import zipfile -from dataclasses import replace +from dataclasses import astuple, replace from pathlib import Path import numpy as np @@ -31,7 +31,7 @@ MOHYSE, MOHYSE_OST, Raven, - Routing, + RavenMultiModel, Sub, get_average_annual_runoff, ) @@ -55,13 +55,13 @@ def input2d(tmpdir): def test_race(): model1 = GR4JCN() - model1.rvi.suppress_output = True + model1.config.rvi.suppress_output = True model2 = GR4JCN() ost = GR4JCN_OST() - assert model1.rvi.suppress_output.startswith(":SuppressOutput") - assert model2.rvi.suppress_output == "" - assert ost.rvi.suppress_output.startswith(":SuppressOutput") + assert model1.config.rvi.suppress_output.startswith(":SuppressOutput") + assert model2.config.rvi.suppress_output == "" + assert ost.config.rvi.suppress_output.startswith(":SuppressOutput") # Salmon catchment is now split into land- and lake-part. @@ -80,8 +80,14 @@ def test_race(): class TestGR4JCN: + def test_identifier(self): + assert GR4JCN().config.identifier == "gr4jcn" + assert GR4JCN(identifier="toto").config.identifier == "toto" + assert Raven().config.identifier == "raven" + assert Raven(identifier="toto").config.identifier == "toto" + def test_simple(self): - model = GR4JCN("/tmp/ravenpy_debug/test_simple") + model = GR4JCN() # "/tmp/ravenpy_debug/test_simple") model.config.rvi.start_date = dt.datetime(2000, 1, 1) model.config.rvi.end_date = dt.datetime(2002, 1, 1) @@ -675,7 +681,7 @@ def test_parallel_basins(self, input2d): class TestGR4JCN_OST: def test_simple(self): - model = GR4JCN_OST() + model = GR4JCN_OST() # "/tmp/ravenpy_debug/test_gr4j_ost") model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) params = (0.529, -3.396, 407.29, 1.072, 16.9, 0.053) low = (0.01, -15.0, 10.0, 0.0, 1.0, 0.0) @@ -702,7 +708,8 @@ def test_simple(self): # Algorithm: DDS # :StartDate 1954-01-01 00:00:00 # :Duration 208 - opt_para = model.calibrated_params + a = model.calibrated_params + opt_para = astuple(model.calibrated_params) opt_func = model.obj_func np.testing.assert_almost_equal( @@ -711,6 +718,7 @@ def test_simple(self): 4, err_msg="calibrated parameter set is not matching expected value", ) + np.testing.assert_almost_equal( opt_func, -0.50717, @@ -729,12 +737,14 @@ def test_simple(self): # err_msg='calibrated NSE is not matching expected value') gr4j = GR4JCN() gr4j.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) + gr4j( TS, start_date=dt.datetime(1954, 1, 1), duration=208, params=model.calibrated_params, ) + np.testing.assert_almost_equal( gr4j.diagnostics["DIAG_NASH_SUTCLIFFE"], d["DIAG_NASH_SUTCLIFFE"] ) @@ -786,7 +796,7 @@ def test_simple(self): class TestHMETS_OST: def test_simple(self): - model = HMETS_OST() + model = HMETS_OST() # "/tmp/ravenpy_debug/test_hmets_ost") params = ( 9.5019, 0.2774, @@ -1189,7 +1199,7 @@ def test_evap(self): class TestHBVEC_OST: def test_simple(self): - model = HBVEC_OST() + model = HBVEC_OST() # "/tmp/ravenpy_debug/test_hbvec_ost") params = ( 0.05984519, 4.072232, @@ -1280,7 +1290,7 @@ def test_simple(self): d = model.diagnostics np.testing.assert_almost_equal(d["DIAG_NASH_SUTCLIFFE"], -2.25991e-01, 4) - opt_para = model.calibrated_params + opt_para = astuple(model.calibrated_params) opt_func = model.obj_func # Random number seed: 123 # From fa559b4cf355ddf77038ee2ef5e891e3811c0dad Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 6 Apr 2021 20:43:36 -0400 Subject: [PATCH 14/59] WIP --- ravenpy/config/commands.py | 16 + ravenpy/config/importers.py | 118 ------- ravenpy/config/rvs.py | 10 +- ravenpy/models/__init__.py | 19 -- ravenpy/models/base.py | 30 +- ravenpy/models/emulators/blended.py | 508 ++++++++++++++++++++++------ ravenpy/models/emulators/gr4jcn.py | 7 +- ravenpy/models/emulators/hbvec.py | 7 +- ravenpy/models/emulators/hmets.py | 6 +- ravenpy/models/emulators/mohyse.py | 7 +- ravenpy/models/rv.py | 248 -------------- tests/test_blended.py | 3 +- tests/test_emulators.py | 72 +++- 13 files changed, 516 insertions(+), 535 deletions(-) delete mode 100644 ravenpy/models/rv.py diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index 953b95d9..1fd98054 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -109,6 +109,10 @@ def to_rv(self): return dedent(self.template).format(subbasin_records="\n".join(recs)) +# For convenience +Sub = SubBasinsCommand.Record + + @dataclass class HRUsCommand(RavenConfig): """HRUs command (RVH).""" @@ -152,6 +156,10 @@ def to_rv(self): return dedent(self.template).format(hru_records="\n".join(recs)) +# For convenience +HRU = HRUsCommand.Record + + @dataclass class ReservoirCommand(RavenConfig): """Reservoir command (RVH).""" @@ -630,6 +638,10 @@ def to_rv(self): ) +# For convenience +HRUState = HRUStateVariableTableCommand.Record + + @dataclass class BasinIndexCommand(RavenConfig): """Initial conditions for a flow segment.""" @@ -789,6 +801,10 @@ def to_rv(self): ) +# For convenience +LU = LandUseClassesCommand.Record + + @dataclass class RainCorrectionCommand(BaseValueCommand): tag: str = "RainCorrection" diff --git a/ravenpy/config/importers.py b/ravenpy/config/importers.py index e11b31ca..416684fb 100644 --- a/ravenpy/config/importers.py +++ b/ravenpy/config/importers.py @@ -30,7 +30,6 @@ StationForcingCommand, SubBasinsCommand, ) -from ravenpy.models import rv grid_weight_importer_params = dict( DIM_NAMES=("lon_dim", "lat_dim"), @@ -768,120 +767,3 @@ def _check_gridcell_in_proximity_of_shape( and min_lon_cell <= max_lon_shape and max_lon_cell >= min_lon_shape ) - - -# class NcDataImporter: -# def __init__(self, fns): -# self.fns = map(Path, fns) -# self.attrs = {} -# self._extract_nc_attrs(self.fns) - -# def _extract_nc_attrs(self, fns): -# for fn in fns: -# if ".nc" in fn.suffix: -# with xr.open_dataset(fn) as ds: -# # Check if any alternate variable name is in the file. -# for var, alt_names in rv.alternate_nc_names.items(): -# for name in alt_names: -# if name in ds.data_vars: -# v = ds[name] -# # Parse common attributes to all data models -# attrs = dict( -# name=var, -# file_name_nc=fn, -# data_type=rv.forcing_names[var], -# var_name_nc=name, -# dim_names_nc=v.dims, -# units=v.attrs.get("units"), -# number_grid_cells=v.size / len(ds["time"]), -# ) -# try: -# attrs["latitude"] = ds.cf["latitude"] -# attrs["longitude"] = ds.cf["longitude"] -# attrs["elevation"] = ds.cf["vertical"] -# except KeyError: -# pass - -# if "GRIB_stepType" in v.attrs: -# attrs["deaccumulate"] = ( -# v.attrs["GRIB_stepType"] == "accum" -# ) - -# self.attrs[var] = attrs - -# def _create_command(self, var, attrs, rvh, rvt=None, nc_index=0): -# coords = {"latitude", "longitude", "elevation"} -# dims = attrs["dim_names_nc"] - -# # Remove extra attributes -# number_grid_cells = attrs.pop("number_grid_cells") -# for k in coords: -# attrs.pop(k, None) - -# # Add options from rvt -# rvt_attrs = ["scale", "offset", "time_shift"] -# # for a in rvt_attrs: -# # if a in rvt[var]: -# # attrs[a] = rvt[var][a] - -# if len(dims) == 1: -# if var == "water_volume_transport_in_river_channel": -# return ObservationDataCommand(**attrs) - -# return DataCommand(**attrs) - -# if len(dims) == 2: -# if var == "water_volume_transport_in_river_channel": -# # Search for the gauged SB, not sure what should happen when there are -# # more than one (should it be even supported?) -# for sb in rvh.subbasins: -# if sb.gauged: -# attrs["subbasin_id"] = sb.subbasin_id -# break -# else: -# raise Exception( -# "Could not find an outlet subbasin for observation data" -# ) -# return ObservationDataCommand(**attrs) - -# # TODO: implement a RedirectToFile mechanism to avoid inlining the grid weights -# # multiple times as we do here -# # Construct default grid weights applying equally to all HRUs -# data = [(hru.hru_id, nc_index, 1.0) for hru in rvh.hrus] - -# gw = rvt["grid_weights"] or GridWeightsCommand( -# number_hrus=len(rvh.hrus), -# number_grid_cells=number_grid_cells, -# data=data, -# ) - -# return StationForcingCommand(**attrs, grid_weights=gw) - -# return GriddedForcingCommand(**attrs, grid_weights=rvt.grid_weights) - -# def extract(self, rvh, rvt=None, nc_index=0): -# out = {"var_cmds": {}} - -# for var, attrs in self.attrs.items(): -# out["var_cmds"][var] = self._create_command( -# var, attrs.copy(), rvh, rvt, nc_index -# ) -# if type(out["var_cmds"][var]) is DataCommand: -# # Try extracting the gauge location from the netCDF coordinates. -# try: -# out["gauge_latitude"] = attrs["latitude"][nc_index] -# out["gauge_longitude"] = attrs["longitude"][nc_index] -# out["gauge_elevation"] = attrs["elevation"][nc_index] - -# # Revert to RHU coordinates -# except Exception: -# if isinstance(rvh, rv.RVH): -# out["gauge_latitude"] = rvh.hrus[0].latitude -# out["gauge_longitude"] = rvh.hrus[0].longitude -# out["gauge_elevation"] = rvh.hrus[0].elevation -# else: -# out["gauge_latitude"] = getattr(rvh, "latitude", None) -# out["gauge_longitude"] = getattr(rvh, "longitude", None) -# out["gauge_elevation"] = getattr(rvh, "elevation", None) - -# return out diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index e6dd1cf4..1082029d 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -748,9 +748,11 @@ class Ost(RV): tmpl = """ """ - def __init__(self, tmpl=None, identifier=None): + def __init__(self, rvi, tmpl=None, identifier=None): super().__init__() + self._rvi = rvi + self._max_iterations = None self._random_seed = None self.lowerBounds = None @@ -787,6 +789,10 @@ def random_seed(self, value): self._random_seed = None def to_rv(self): + # Get those from RVI (there's probably a better way to do this!) + self.run_name = self._rvi.run_name + self.run_index = self._rvi.run_index + # Attributes a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) @@ -810,7 +816,7 @@ def __init__(self, identifier, **kwargs): self.rvi = RVI() self.rvp = RVP() self.rvt = RVT(self.rvh) - self.ost = Ost(identifier=identifier) + self.ost = Ost(self.rvi, identifier=identifier) self.identifier = identifier self.update(**kwargs) diff --git a/ravenpy/models/__init__.py b/ravenpy/models/__init__.py index 8cde7918..0eae132c 100644 --- a/ravenpy/models/__init__.py +++ b/ravenpy/models/__init__.py @@ -3,22 +3,3 @@ from .base import Ostrich, Raven, get_average_annual_runoff from .emulators import * from .multimodel import RavenMultiModel -from .rv import HRU, LU, RV, HRUState, Sub - -# _dir = os.path.abspath(os.path.dirname(__file__)) - -# raven_templates = { -# "raven-gr4j-cemaneige": os.path.join(_dir, "raven-gr4j-cemaneige"), -# "raven-mohyse": os.path.join(_dir, "raven-mohyse"), -# "raven-hmets": os.path.join(_dir, "raven-hmets"), -# "raven-hbv-ec": os.path.join(_dir, "raven-hbv-ec"), -# "raven-blended": os.path.join(_dir, "raven-blended"), -# } - -# ostrich_templates = { -# "ostrich-gr4j-cemaneige": os.path.join(_dir, "ostrich-gr4j-cemaneige"), -# "ostrich-mohyse": os.path.join(_dir, "ostrich-mohyse"), -# "ostrich-hmets": os.path.join(_dir, "ostrich-hmets"), -# "ostrich-hbv-ec": os.path.join(_dir, "ostrich-hbv-ec"), -# "ostrich-blended": os.path.join(_dir, "ostrich-blended"), -# } diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index ef9d9cf8..5c9cd4b0 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -32,8 +32,6 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to ) from ravenpy.config.rvs import RVC, RVI, Config -from .rv import RV, RVFile - RAVEN_EXEC_PATH = os.getenv("RAVENPY_RAVEN_BINARY_PATH") or shutil.which("raven") OSTRICH_EXEC_PATH = os.getenv("RAVENPY_OSTRICH_BINARY_PATH") or shutil.which("ostrich") @@ -194,7 +192,6 @@ def _dump_rv(self): identifier = self.config.identifier - # RVs for rvs in ["rvt", "rvh", "rvp", "rvc", "rvi"]: rvo = getattr(self.config, rvs) if rvo.is_ostrich_tmpl: @@ -204,17 +201,6 @@ def _dump_rv(self): with open(fn, "w") as f: f.write(rvo.to_rv()) - # OST - with open(self.exec_path / f"ostIn.txt", "w") as f: - f.write(self.config.ost.to_rv()) - - import shutil - - shutil.copy( - "/home/christian/gh/RavenPy/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt", - self.exec_path / "OstRandomNumbers.txt", - ) - def setup(self, overwrite=False): """Create directory structure to store model input files, executable and output results. @@ -766,6 +752,22 @@ def setup(self, overwrite=False): # Create symbolic link to executable os.symlink(self.ostrich_exec, str(self.cmd)) + def _dump_rv(self): + """Write configuration files to disk.""" + + super()._dump_rv() + + # OST + with open(self.exec_path / f"ostIn.txt", "w") as f: + f.write(self.config.ost.to_rv()) + + import shutil + + shutil.copy( + "/home/christian/gh/RavenPy/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt", + self.exec_path / "OstRandomNumbers.txt", + ) + def parse_results(self): """Store output files in the self.outputs dictionary.""" # Output files default names. The actual output file names will be composed of the run_name and the default diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 840f6003..3174ed0d 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -2,16 +2,13 @@ from dataclasses import dataclass from pathlib import Path -from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven -from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub from .gr4jcn import GR4JCN class BLENDED(Raven): - identifier = "blended" - @dataclass class Params: par_x01: float = None @@ -81,7 +78,7 @@ class ForestHRU(HRU): def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.config = Config( + self.config.update( hrus=(BLENDED.ForestHRU(),), subbasins=( Sub( @@ -362,111 +359,416 @@ def derived_parameters(self): class BLENDED_OST(Ostrich, BLENDED): - _p = Path(__file__).parent / "ostrich-blended" - templates = tuple(_p.glob("model/*.rv?")) + tuple(_p.glob("*.t??")) - def __init__(self, *args, **kwds): super().__init__(*args, **kwds) - self.rvi.suppress_output = True - self.txt = Ost( + + self.config.update( algorithm="DDS", max_iterations=50, - lowerBounds=BLENDED.params( - None, # par_x01 - None, # par_x02 - None, # par_x03 - None, # 10**par_x04 - None, # par_x05 - None, # par_x06 - None, # par_x07 - None, # par_x08 - None, # par_x09 - None, # par_x09+par_x10 - None, # 10**par_x11 - None, # par_x12 - None, # par_x13 - None, # par_x13+par_x14 - None, # par_x15 - None, # par_x16 - None, # par_x17 - None, # par_x18 - None, # par_x19 - None, # par_x20 - None, # par_x21 - None, # par_x22 - None, # par_x23 - None, # par_x24 - None, # par_x24+par_x25 - None, # par_x26 - None, # par_x27 - None, # par_x28 - None, # par_x29 - None, # par_x30 - None, # par_x31 - None, # par_x32 - None, # par_x33 - None, # par_x34 - None, # par_x35 - None, # par_r01 - None, # par_r02 - None, # par_r03 - None, # par_r04 - None, # par_r05 - None, # par_r06 - None, # par_r07 - None, # par_r08 - ), - upperBounds=BLENDED.params( - None, # par_x01 - None, # par_x02 - None, # par_x03 - None, # 10**par_x04 - None, # par_x05 - None, # par_x06 - None, # par_x07 - None, # par_x08 - None, # par_x09 - None, # par_x09+par_x10 - None, # 10**par_x11 - None, # par_x12 - None, # par_x13 - None, # par_x13+par_x14 - None, # par_x15 - None, # par_x16 - None, # par_x17 - None, # par_x18 - None, # par_x19 - None, # par_x20 - None, # par_x21 - None, # par_x22 - None, # par_x23 - None, # par_x24 - None, # par_x24+par_x25 - None, # par_x26 - None, # par_x27 - None, # par_x28 - None, # par_x29 - None, # par_x30 - None, # par_x31 - None, # par_x32 - None, # par_x33 - None, # par_x34 - None, # par_x35 - None, # par_r01 - None, # par_r02 - None, # par_r03 - None, # par_r04 - None, # par_r05 - None, # par_r06 - None, # par_r07 - None, # par_r08 - ), + lowerBounds=BLENDED.Params(), + upperBounds=BLENDED.Params(), + suppress_output=True, ) + self.config.rvc.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "par_x29" and "par_x30" wouldn't be detectable) + # para_half_x29 = para_x29 * 1000. / 2. = par_x29 / 2. [m] = half_x29 [mm] + # para_half_x30 = para_x30 * 1000. / 2. = par_x30 / 2. [m] = half_x30 [mm] + + # initialize to 1/2 full + #:UniformInitialConditions SOIL[0] half_x29 # x(29)*1000/2 [mm] + #:UniformInitialConditions SOIL[1] half_x30 # x(30)*1000/2 [mm] + + :HRUStateVariableTable (formerly :IntialConditionsTable) + :Attributes SOIL[0] SOIL[1] + :Units mm mm + 1 half_x29 half_x30 + :EndHRUStateVariableTable + """ + self.config.rvc.is_ostrich_tmpl = True + + self.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + + :PotentialMeltMethod POTMELT_HMETS + :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + :Evaporation {evaporation} # PET_OUDIN + :CatchmentRoute ROUTE_DUMP + :Routing ROUTE_NONE + :SoilModel SOIL_MULTILAYER 3 + + :Alias DELAYED_RUNOFF CONVOLUTION[1] + + :HydrologicProcesses + :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE + :ProcessGroup #infiltration group + :Infiltration INF_HMETS PONDED_WATER MULTIPLE + :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE + :Infiltration INF_HBV PONDED_WATER MULTIPLE + :EndProcessGroup CALCULATE_WTS par_r01 par_r02 + :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really + :Baseflow BASE_VIC SOIL[0] SURFACE_WATER + :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS par_r03 par_r04 + :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge + :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF + :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) + :ProcessGroup #evaporation group + :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET + :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET + :EndProcessGroup CALCULATE_WTS par_r05 + :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' + :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' + :ProcessGroup #quickflow group + :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER + :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER + :EndProcessGroup CALCULATE_WTS par_r06 + :ProcessGroup #snow balance group + :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE + :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER + :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE + #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE + :EndProcessGroup CALCULATE_WTS par_r07 par_r08 + :EndHydrologicProcesses + + #:CreateRVPTemplate + + #--------------------------------------------------------- + # Output Options + # + :EvaluationMetrics NASH_SUTCLIFFE RMSE KLING_GUPTA + :SuppressOutput + :SilentMode + :DontWriteWatershedStorage + """ + self.config.rvi.is_ostrich_tmpl = True + + self.config.rvp.tmpl = """ + # tied parameters: + # (it is important for OSTRICH to find every parameter place holder somewhere in this file) + # (without this "par_x25" and "par_x14" and "par_x10" wouldn't be detectable) + # para_sum_x24_x25 = sum_x24_x25 = para_x24 + para_x25 = par_x24 + par_x25 + # para_sum_x13_x14 = sum_x13_x14 = para_x13 + para_x14 = par_x13 + par_x14 + # para_sum_x09_x10 = sum_x09_x10 = para_x09 + para_x10 = par_x09 + par_x10 + # para_pow_x04 = pow_x04 = 10^(para_x04) = 10^par_x04 + # para_pow_x11 = pow_x11 = 10^(para_x11) = 10^par_x11 + + # RVT should contain + # :RainCorrection par_x33 + # :SnowCorrection par_x34 + + #----------------------------------------------------------------- + # Soil Classes + #----------------------------------------------------------------- + :SoilClasses + :Attributes, + :Units, + TOPSOIL, + PHREATIC, + DEEP_GW + :EndSoilClasses + + #----------------------------------------------------------------- + # Land Use Classes + #----------------------------------------------------------------- + {land_use_classes} + + #----------------------------------------------------------------- + # Vegetation Classes + #----------------------------------------------------------------- + :VegetationClasses, + :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, + :Units, m, none, mm_per_s, + FOREST, 4, 5, 5, + :EndVegetationClasses + + #----------------------------------------------------------------- + # Soil Profiles + #----------------------------------------------------------------- + :SoilProfiles + LAKE, 0 + ROCK, 0 + DEFAULT_P, 3, TOPSOIL, par_x29, PHREATIC, par_x30, DEEP_GW, 1e6 + # DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 + :EndSoilProfiles + + #----------------------------------------------------------------- + # Terrain Classes + #----------------------------------------------------------------- + :TerrainClasses + :Attributes, hillslope_len, drainage_dens, lambda, + :Units, ??, ??, ?? + DEFAULT_T, 1.0, 1.0, par_x07 + # TOPMODEL_LAMBDA x(7) + :EndTerrainClasses + + #----------------------------------------------------------------- + # Global Parameters + #----------------------------------------------------------------- + :GlobalParameter SNOW_SWI_MIN par_x13 # x(13) + :GlobalParameter SNOW_SWI_MAX sum_x13_x14 # x(13)+x(14) + :GlobalParameter SWI_REDUCT_COEFF par_x15 # x(15) + :GlobalParameter SNOW_SWI par_x19 # x(19) + :GlobalParameter RAINSNOW_TEMP par_x31 # x(31) + :GlobalParameter RAINSNOW_DELTA par_x32 # x(32) + #:GlobalParameter TOC_MULTIPLIER 1.0 # + + + #----------------------------------------------------------------- + # Soil Parameters + #----------------------------------------------------------------- + :SoilParameterList + :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, + :Units, -, 1/d, -, 1/d + TOPSOIL, 1.0, par_x28, par_x08, pow_x04, par_x02, par_x03, par_x05, par_x06, sum_x09_x10, par_x09, + PHREATIC, 1.0, par_x35, 0.0, pow_x11, 0.0, 0.0, 0.0, par_x12, 0.0, 0.0, + DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), + # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, + # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + :EndSoilParameterList + + #----------------------------------------------------------------- + # Land Use Parameters + #----------------------------------------------------------------- + :LandUseParameterList + :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, + :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, + [DEFAULT], par_x24, sum_x24_x25, par_x26, par_x27, par_x18, par_x17, par_x16, par_x01, + # x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), + :EndLandUseParameterList + :LandUseParameterList + :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, + :Units, -, -, -, -, -, + [DEFAULT], par_x20, par_x21, par_x22, par_x23, 0.0, + # x(20), x(21), x(22), x(23), 0.0, + :EndLandUseParameterList + + #----------------------------------------------------------------- + # Vegetation Parameters + #----------------------------------------------------------------- + :VegetationParameterList + :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO + :Units, -, -, - + [DEFAULT], 0.0, 0.0, 0.0 + :EndVegetationParameterList + + :SeasonalRelativeLAI + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeLAI + :SeasonalRelativeHeight + FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 + :EndSeasonalRelativeHeight + """ + self.config.rvp.is_ostrich_tmpl = True + + self.config.rvt.tmpl = """ + {gauge} + + {forcing_list} + + {observed_data} + """ + self.config.rvt.is_ostrich_tmpl = True + + self.config.ost.tmpl = """ + ProgramType {algorithm} + ObjectiveFunction GCOP + ModelExecutable ./ostrich-runs-raven.sh + PreserveBestModel ./save_best.sh + #OstrichWarmStart yes + + ModelSubdir processor_ + + BeginExtraDirs + model + #best + EndExtraDirs + + BeginFilePairs + {identifier}.rvi.tpl; {identifier}.rvi + {identifier}.rvp.tpl; {identifier}.rvp + {identifier}.rvc.tpl; {identifier}.rvc + {identifier}.rvt.tpl; {identifier}.rvt + #can be multiple (.rvh, .rvi) + EndFilePairs + + #Parameter/DV Specification + BeginParams + #parameter init. low high tx_in tx_ost tx_out + par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none + par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none + par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none + par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none + par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none + par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none + par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none + par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none + par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none + par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none + par_x11 random {lowerBounds.par_x11} {upperBounds.par_x11} none none none + par_x12 random {lowerBounds.par_x12} {upperBounds.par_x12} none none none + par_x13 random {lowerBounds.par_x13} {upperBounds.par_x13} none none none + par_x14 random {lowerBounds.par_x14} {upperBounds.par_x14} none none none + par_x15 random {lowerBounds.par_x15} {upperBounds.par_x15} none none none + par_x16 random {lowerBounds.par_x16} {upperBounds.par_x16} none none none + par_x17 random {lowerBounds.par_x17} {upperBounds.par_x17} none none none + par_x18 random {lowerBounds.par_x18} {upperBounds.par_x18} none none none + par_x19 random {lowerBounds.par_x19} {upperBounds.par_x19} none none none + par_x20 random {lowerBounds.par_x20} {upperBounds.par_x20} none none none + par_x21 random {lowerBounds.par_x21} {upperBounds.par_x21} none none none + par_x22 random {lowerBounds.par_x22} {upperBounds.par_x22} none none none + par_x23 random {lowerBounds.par_x23} {upperBounds.par_x23} none none none + par_x24 random {lowerBounds.par_x24} {upperBounds.par_x24} none none none + par_x25 random {lowerBounds.par_x25} {upperBounds.par_x25} none none none + par_x26 random {lowerBounds.par_x26} {upperBounds.par_x26} none none none + par_x27 random {lowerBounds.par_x27} {upperBounds.par_x27} none none none + par_x28 random {lowerBounds.par_x28} {upperBounds.par_x28} none none none + par_x29 random {lowerBounds.par_x29} {upperBounds.par_x29} none none none + par_x30 random {lowerBounds.par_x30} {upperBounds.par_x30} none none none + par_x31 random {lowerBounds.par_x31} {upperBounds.par_x31} none none none + par_x32 random {lowerBounds.par_x32} {upperBounds.par_x32} none none none + par_x33 random {lowerBounds.par_x33} {upperBounds.par_x33} none none none + par_x34 random {lowerBounds.par_x34} {upperBounds.par_x34} none none none + par_x35 random {lowerBounds.par_x35} {upperBounds.par_x35} none none none + par_r01 random {lowerBounds.par_r01} {upperBounds.par_r01} none none none + par_r02 random {lowerBounds.par_r02} {upperBounds.par_r02} none none none + par_r03 random {lowerBounds.par_r03} {upperBounds.par_r03} none none none + par_r04 random {lowerBounds.par_r04} {upperBounds.par_r04} none none none + par_r05 random {lowerBounds.par_r05} {upperBounds.par_r05} none none none + par_r06 random {lowerBounds.par_r06} {upperBounds.par_r06} none none none + par_r07 random {lowerBounds.par_r07} {upperBounds.par_r07} none none none + par_r08 random {lowerBounds.par_r08} {upperBounds.par_r08} none none none + EndParams + + BeginTiedParams + # --------------------------------------------------------------- + # MAX_MELT_FACTOR > MIN_MELT_FACTOR + # + # sum_x24_x25 = par_x24 + par_x25 + # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> c3 = 0.0 + # + sum_x24_x25 2 par_x24 par_x25 linear 0.00 1.00 1.00 0.00 free + # + # --------------------------------------------------------------- + # SNOW_SWI_MAX > SNOW_SWI_MIN + # + # sum_x13_x14 = par_x13 + par_x14 + # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> c3 = 0.0 + # + sum_x13_x14 2 par_x13 par_x14 linear 0.00 1.00 1.00 0.00 free + # + # --------------------------------------------------------------- + # FIELD_CAPACITY > SAT_WILT + # + # sum_x09_x10 = par_x09 + par_x10 + # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> c3 = 0.0 + # + sum_x09_x10 2 par_x09 par_x10 linear 0.00 1.00 1.00 0.00 free + # + # --------------------------------------------------------------- + # half the value but in [mm] not [m] + # + # half_x29 = par_x29 * 0.5 * 1000 --> half of it but in [mm] not [m] + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 500. + # + half_x29 1 par_x29 linear 500.0 0.0 free + # + # --------------------------------------------------------------- + # half the value but in [mm] not [m] + # + # half_x30 = par_x30 * 0.5 * 1000 --> half of it but in [mm] not [m] + # Xtied = (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 500. + # + half_x30 1 par_x30 linear 500.0 0.0 free + # + # --------------------------------------------------------------- + # BASEFLOW_COEFF TOPSOIL = 10.0^x4 + # + # pow_x04 = 10.0**(par_x4) + # Xtied = c2 * base ** (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> base = 10.0 + # + pow_x04 1 par_x04 exp 10.0 1.0 1.0 0.0 free + # + # --------------------------------------------------------------- + # BASEFLOW_COEFF PHREATIC = 10.0^x11 + # + # pow_x11 = 10.0**(par_x3) + # Xtied = c2 * base ** (c1 * X) + c0 + # --> c0 = 0.0 + # --> c1 = 1.0 + # --> c2 = 1.0 + # --> base = 10.0 + # + pow_x11 1 par_x11 exp 10.0 1.0 1.0 0.0 free + EndTiedParams + + BeginResponseVars + #name filename keyword line col token + NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' + EndResponseVars + + BeginTiedRespVars + NegNS 1 NS wsum -1.00 + EndTiedRespVars + + BeginGCOP + CostFunction NegNS + PenaltyFunction APM + EndGCOP + + BeginConstraints + # not needed when no constraints, but PenaltyFunction statement above is required + # name type penalty lwr upr resp.var + EndConstraints + + # Randomsed control added + {random_seed} + + #Algorithm should be last in this file: + + BeginDDSAlg + PerturbationValue 0.20 + MaxIterations {max_iterations} + UseRandomParamValues + # UseInitialParamValues + # above intializes DDS to parameter values IN the initial model input files + EndDDSAlg + """ + def derived_parameters(self): """Derived parameters are computed by Ostrich.""" - self.rvt.raincorrection = "par_x33" - self.rvt.snowcorrection = "par_x34" + self.config.rvt.rain_correction = "par_x33" + self.config.rvt.snow_correction = "par_x34" def ost2raven(self, ops): """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. @@ -491,4 +793,4 @@ def ost2raven(self, ops): names[24] = "sum_x24_x25" out = [ops[n] for n in names] - return self.params(*out) + return BLENDED.Params(*out) diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index 94847de7..296d402b 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -2,9 +2,8 @@ from dataclasses import dataclass from pathlib import Path -from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven -from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub class GR4JCN(Raven): @@ -449,10 +448,6 @@ def __init__(self, *args, **kwds): EndDDSAlg """ - # TODO: find a better way to implement inter-RV value sharing/injection - self.config.ost.run_name = self.config.rvi.run_name - self.config.ost.run_index = self.config.rvi.run_index - def derived_parameters(self): """Derived parameters are computed by Ostrich.""" pass diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index f7ca79fc..a11a7a7c 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -4,9 +4,8 @@ import xarray as xr -from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven -from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub from .gr4jcn import GR4JCN @@ -558,10 +557,6 @@ def __init__(self, *args, **kwds): EndDDSAlg """ - # TODO: find a better way to implement inter-RV value sharing/injection - self.config.ost.run_name = self.config.rvi.run_name - self.config.ost.run_index = self.config.rvi.run_index - # TODO: Support index specification and unit changes. def derived_parameters(self): self.config.rvt.rain_correction = "par_x20" diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 0cd05500..b9a7f1db 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -1,8 +1,8 @@ from dataclasses import dataclass from pathlib import Path +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven -from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub class HMETS(Raven): @@ -487,10 +487,6 @@ def __init__(self, *args, **kwds): EndDDSAlg """ - # TODO: find a better way to implement inter-RV value sharing/injection - self.config.ost.run_name = self.config.rvi.run_name - self.config.ost.run_index = self.config.rvi.run_index - def derived_parameters(self): """Derived parameters are computed by Ostrich.""" pass diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index f07d8eca..8996fdee 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -2,9 +2,8 @@ from dataclasses import dataclass from pathlib import Path -from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven -from ravenpy.models.rv import HRU, LU, RV, HRUState, Sub from .gr4jcn import GR4JCN @@ -417,10 +416,6 @@ def __init__(self, *args, **kwds): EndDDSAlg """ - # TODO: find a better way to implement inter-RV value sharing/injection - self.config.ost.run_name = self.config.rvi.run_name - self.config.ost.run_index = self.config.rvi.run_index - def derived_parameters(self): """ Derived parameters are computed by Ostrich. """ pass diff --git a/ravenpy/models/rv.py b/ravenpy/models/rv.py deleted file mode 100644 index 4ba2b156..00000000 --- a/ravenpy/models/rv.py +++ /dev/null @@ -1,248 +0,0 @@ -import collections -import datetime as dt -from collections import namedtuple -from dataclasses import dataclass -from pathlib import Path -from textwrap import dedent -from typing import Dict, Tuple - -import cftime -import six - -from ravenpy.config.commands import ( - BasinIndexCommand, - BasinStateVariablesCommand, - ChannelProfileCommand, - DataCommand, - GaugeCommand, - GriddedForcingCommand, - HRUsCommand, - HRUStateVariableTableCommand, - LandUseClassesCommand, - RavenConfig, - ReservoirCommand, - RoutingCommand, - SBGroupPropertyMultiplierCommand, - SoilClassesCommand, - SoilProfilesCommand, - StationForcingCommand, - SubBasinGroupCommand, - SubBasinsCommand, - VegetationClassesCommand, -) - -HRU = HRUsCommand.Record -HRUState = HRUStateVariableTableCommand.Record -LU = LandUseClassesCommand.Record -Sub = SubBasinsCommand.Record - -""" -Raven configuration -------------------- - -The RV class is used to store Raven parameters for emulated models. - -Each model should subclass RV to define the parameters it expects using a namedtuple class. For example:: - - class MyModel(RV): - params = namedtuple('ModelParams', 'x1, x2, x3') - init = namedtuple('ModelInit', 'i1, i2') - hru = namedtuple('ModelHRU', 'hru1', hru2') - -It can then be instantiated by passing values that will set as default values for each parameter:: - - rv = MyModel(params=MyModel.params(1,2,3), init=MyModel.init(0,0), hru=MyModel.hru(4,5), name='basin') - -values can then be modified either using attributes or properties:: - - rv.name = 'LacVert' - rv['evaluation_metrics'] = 'LOG_NASH' - - -Simulation end date and duration are updated automatically when duration, start date or end date are changed. - -""" - - -class RVFile: - def __init__(self, fn): - """Read the content.""" - fn = Path(fn) - - self.stem = fn.with_suffix("").with_suffix("").stem - self.suffixes = "".join(fn.suffixes) - - self.ext = "" - self._store_ext(fn) - - # Whether extension indicates an Ostrich template file. - self.is_tpl = fn.suffix in [".tpl", ".txt"] - - self.content = "" - self.content = fn.read_text() - - def _store_ext(self, fn): - try: - self.ext = fn.suffixes[0][1:] - except IndexError as e: - msg = "\nFile {} does not look like a valid Raven/Ostrich config file.".format( - fn - ) - raise ValueError(msg) from e - - def rename(self, name): - self.stem = name - - def write(self, path, **kwds): - fn = (path / self.stem).with_suffix(self.suffixes) - - content = self.content - if kwds: - content = content.format(**kwds) - - fn.write_text(content) - return fn - - @property - def tags(self): - """Return a list of tags within the templates.""" - import re - - pattern = re.compile(r"{([\.\w]+)}") - - return pattern.findall(self.content) - - -class RV(collections.abc.Mapping, RavenConfig): - """Generic configuration class. - - RV provides two mechanisms to set values, a dictionary-like interface and an object-like interface:: - - rv = RV(a=None) - rv['a'] = 1 - rv.a = 2 - - The dictionary like interface only allows the modification of values for existing items, while the object interface - allows the creation of new attributes:: - - rv['c'] = 1 - - will raise an AttributeError, while:: - - rv.c = 1 - - will create a new `c` attribute and assign it the value 1. - - """ - - def __init__(self, **kwargs): - # Set initial default values - for key, val in kwargs.items(): - setattr(self, key, val) - - def __getitem__(self, key): - return getattr(self, key) - - def __setitem__(self, key, value): - if not hasattr(self, key): - raise AttributeError("Trying to assign unrecognized object: {}".format(key)) - - setattr(self, key, value) - - def __len__(self): - return len(self.__dict__) - - def __iter__(self): - return iter(self.keys()) - - def keys(self): - # Attributes - a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) - - # Properties - p = list( - filter( - lambda x: isinstance(getattr(self.__class__, x, None), property), - dir(self), - ) - ) - return a + p - - def items(self): - for attribute in self.keys(): - yield attribute, getattr(self, attribute) - - def update(self, items, force=False): - """Update values from dictionary items. - - Parameters - ---------- - items : dict - Dictionary of values. - force : bool - If True, un-initialized keys can be set. - """ - if force: - for key, val in items.items(): - setattr(self, key, val) - else: - for key, val in items.items(): - self[key] = val - - -# class Ost(RV): -# def __init__(self, **kwargs): -# self._max_iterations = None -# self._random_seed = None - -# super(Ost, self).__init__(**kwargs) - -# @property -# def max_iterations(self): -# return self._max_iterations - -# @max_iterations.setter -# def max_iterations(self, x): -# if x < 1: -# raise ValueError("Max iteration should be a positive integer: {}".format(x)) -# else: -# self._max_iterations = x - -# @property -# def random_seed(self): -# if self._random_seed is not None: -# return "RandomSeed {}".format(self._random_seed) -# return "" - -# @random_seed.setter -# def random_seed(self, value): -# if value >= 0: -# self._random_seed = value -# else: -# self._random_seed = None - - -# def isinstance_namedtuple(x): -# a = isinstance(x, tuple) -# b = getattr(x, "_fields", None) is not None -# return a and b - - -def guess_linear_transform(actual, expected): - """Return RVT compatible dictionary for variable unit transformations. - - Parameters - ---------- - actual : dict - The units of each variable. - expected : dict - The units expected by Raven. - - Returns - ------- - dict - Dictionary keyed by _linear_transform, storing " " - strings used by Raven to transform units. - - """ - # TODO : For precip we also need the frequency to sum over one day. diff --git a/tests/test_blended.py b/tests/test_blended.py index bd3e7812..d9402905 100644 --- a/tests/test_blended.py +++ b/tests/test_blended.py @@ -3,7 +3,8 @@ import numpy as np -from ravenpy.models import BLENDED, BLENDED_OST, HRU, LU +from ravenpy.config.commands import LU +from ravenpy.models import BLENDED, BLENDED_OST from ravenpy.utilities.testdata import get_local_testdata from .common import _convert_2d diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 37e3b1d6..472be28a 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -19,9 +19,11 @@ SBGroupPropertyMultiplierCommand, SoilClassesCommand, SoilProfilesCommand, + Sub, VegetationClassesCommand, ) -from ravenpy.models import ( +from ravenpy.config.importers import * +from ravenpy.models import ( # Sub, GR4JCN, GR4JCN_OST, HBVEC, @@ -32,7 +34,6 @@ MOHYSE_OST, Raven, RavenMultiModel, - Sub, get_average_annual_runoff, ) from ravenpy.utilities.testdata import get_local_testdata @@ -1365,7 +1366,7 @@ def test_simple(self): class TestRouting: - importers = pytest.importorskip("ravenpy.config.importers") + # importers = pytest.importorskip("ravenpy.config.importers") def test_lievre_tutorial(self): """ @@ -1398,12 +1399,55 @@ def test_lievre_tutorial(self): # Model # ######### - model = Routing("/tmp/ravenpy_debug/test_lievre") + model = Raven(identifier="raven-lievre-routing") ####### # RVI # ####### + model.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES # Numerical method used for simulation + + :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. + :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. + :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. + :PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. + :SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. + + :HydrologicProcesses + :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. + :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. + :EndHydrologicProcesses + + + # Output Options + # + #:WriteForcingFunctions + # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id routing + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + streaminputs = xr.open_dataset(vic_streaminputs_nc_path) start = streaminputs.indexes["time"][0] @@ -1421,7 +1465,7 @@ def test_lievre_tutorial(self): # RVH # ####### - rvh_importer = self.importers.RoutingProductShapefileImporter( + rvh_importer = RoutingProductShapefileImporter( routing_product_shp_path, hru_aspect_convention="ArcGIS" ) rvh_config = rvh_importer.extract() @@ -1453,6 +1497,20 @@ def test_lievre_tutorial(self): # must correspond to the values of certain fields of the Routing Product: # LAND_USE_C, VEG_C, SOIL_PROF + model.config.rvp.tmpl = """ + {soil_classes} + + {soil_profiles} + + {vegetation_classes} + + {land_use_classes} + + {avg_annual_runoff} + + {channel_profiles} + """ + model.config.rvp.avg_annual_runoff = 594 model.config.rvp.soil_classes = [SoilClassesCommand.Record("AQUIFER")] model.config.rvp.soil_profiles = [ @@ -1473,11 +1531,11 @@ def test_lievre_tutorial(self): # RVT # ####### - streaminputs_importer = self.importers.RoutingProductGridWeightImporter( + streaminputs_importer = RoutingProductGridWeightImporter( vic_streaminputs_nc_path, routing_product_shp_path ) - temperatures_importer = self.importers.RoutingProductGridWeightImporter( + temperatures_importer = RoutingProductGridWeightImporter( vic_temperatures_nc_path, routing_product_shp_path ) From 5cbfad6967eaf0dcd5e2dd00fded244d396180ef Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 6 Apr 2021 20:49:37 -0400 Subject: [PATCH 15/59] WIP --- .../OstRandomNumbers.txt | 0 ravenpy/models/base.py | 5 +- ravenpy/models/global/global.rvc | 9 - ravenpy/models/global/global.rvt | 5 - .../ostrich-blended/model/raven-blended.rvh | 1 - ravenpy/models/ostrich-blended/ostIn.txt | 182 - .../ostrich-blended/raven-blended.rvc.tpl | 24 - .../ostrich-blended/raven-blended.rvi.tpl | 68 - .../ostrich-blended/raven-blended.rvp.tpl | 124 - .../ostrich-blended/raven-blended.rvt.tpl | 1 - .../OstRandomNumbers.txt | 16833 ---------------- .../model/raven-gr4j-cemaneige.rvh | 1 - .../model/raven-gr4j-cemaneige.rvi | 1 - .../model/raven-gr4j-cemaneige.rvt | 1 - .../models/ostrich-gr4j-cemaneige/ostIn.txt | 77 - .../raven-gr4j-cemaneige.rvc.tpl | 25 - .../raven-gr4j-cemaneige.rvp.tpl | 62 - .../ostrich-hbv-ec/OstRandomNumbers.txt | 16833 ---------------- .../ostrich-hbv-ec/model/raven-hbv-ec.rvc | 23 - .../ostrich-hbv-ec/model/raven-hbv-ec.rvi | 1 - ravenpy/models/ostrich-hbv-ec/ostIn.txt | 93 - .../ostrich-hbv-ec/raven-hbv-ec.rvh.tpl | 28 - .../ostrich-hbv-ec/raven-hbv-ec.rvp.tpl | 93 - .../ostrich-hbv-ec/raven-hbv-ec.rvt.tpl | 1 - .../models/ostrich-hmets/OstRandomNumbers.txt | 16833 ---------------- .../ostrich-hmets/model/raven-hmets.rvh | 1 - .../ostrich-hmets/model/raven-hmets.rvi | 1 - .../ostrich-hmets/model/raven-hmets.rvt | 1 - ravenpy/models/ostrich-hmets/ostIn.txt | 110 - .../models/ostrich-hmets/raven-hmets.rvc.tpl | 25 - .../models/ostrich-hmets/raven-hmets.rvp.tpl | 100 - .../ostrich-mohyse/OstRandomNumbers.txt | 16833 ---------------- .../ostrich-mohyse/model/raven-mohyse.rvc | 1 - .../ostrich-mohyse/model/raven-mohyse.rvi | 1 - .../ostrich-mohyse/model/raven-mohyse.rvt | 1 - ravenpy/models/ostrich-mohyse/ostIn.txt | 75 - .../ostrich-mohyse/raven-mohyse.rvh.tpl | 33 - .../ostrich-mohyse/raven-mohyse.rvp.tpl | 93 - 38 files changed, 2 insertions(+), 68597 deletions(-) rename ravenpy/{models/ostrich-blended => data}/OstRandomNumbers.txt (100%) delete mode 100644 ravenpy/models/global/global.rvc delete mode 100644 ravenpy/models/global/global.rvt delete mode 120000 ravenpy/models/ostrich-blended/model/raven-blended.rvh delete mode 100644 ravenpy/models/ostrich-blended/ostIn.txt delete mode 100644 ravenpy/models/ostrich-blended/raven-blended.rvc.tpl delete mode 100644 ravenpy/models/ostrich-blended/raven-blended.rvi.tpl delete mode 100644 ravenpy/models/ostrich-blended/raven-blended.rvp.tpl delete mode 120000 ravenpy/models/ostrich-blended/raven-blended.rvt.tpl delete mode 100644 ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt delete mode 120000 ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvh delete mode 120000 ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvi delete mode 120000 ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvt delete mode 100644 ravenpy/models/ostrich-gr4j-cemaneige/ostIn.txt delete mode 100644 ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvc.tpl delete mode 100644 ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvp.tpl delete mode 100644 ravenpy/models/ostrich-hbv-ec/OstRandomNumbers.txt delete mode 100644 ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvc delete mode 120000 ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvi delete mode 100644 ravenpy/models/ostrich-hbv-ec/ostIn.txt delete mode 100644 ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvh.tpl delete mode 100644 ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvp.tpl delete mode 120000 ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvt.tpl delete mode 100644 ravenpy/models/ostrich-hmets/OstRandomNumbers.txt delete mode 120000 ravenpy/models/ostrich-hmets/model/raven-hmets.rvh delete mode 120000 ravenpy/models/ostrich-hmets/model/raven-hmets.rvi delete mode 120000 ravenpy/models/ostrich-hmets/model/raven-hmets.rvt delete mode 100644 ravenpy/models/ostrich-hmets/ostIn.txt delete mode 100644 ravenpy/models/ostrich-hmets/raven-hmets.rvc.tpl delete mode 100644 ravenpy/models/ostrich-hmets/raven-hmets.rvp.tpl delete mode 100644 ravenpy/models/ostrich-mohyse/OstRandomNumbers.txt delete mode 120000 ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvc delete mode 120000 ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvi delete mode 120000 ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvt delete mode 100644 ravenpy/models/ostrich-mohyse/ostIn.txt delete mode 100644 ravenpy/models/ostrich-mohyse/raven-mohyse.rvh.tpl delete mode 100644 ravenpy/models/ostrich-mohyse/raven-mohyse.rvp.tpl diff --git a/ravenpy/models/ostrich-blended/OstRandomNumbers.txt b/ravenpy/data/OstRandomNumbers.txt similarity index 100% rename from ravenpy/models/ostrich-blended/OstRandomNumbers.txt rename to ravenpy/data/OstRandomNumbers.txt diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 5c9cd4b0..ddd2d182 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -761,10 +761,9 @@ def _dump_rv(self): with open(self.exec_path / f"ostIn.txt", "w") as f: f.write(self.config.ost.to_rv()) - import shutil - + # Not sure about this shutil.copy( - "/home/christian/gh/RavenPy/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt", + Path(__file__).parent.parent / "data" / "OstRandomNumbers.txt", self.exec_path / "OstRandomNumbers.txt", ) diff --git a/ravenpy/models/global/global.rvc b/ravenpy/models/global/global.rvc deleted file mode 100644 index 4ee66584..00000000 --- a/ravenpy/models/global/global.rvc +++ /dev/null @@ -1,9 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 3.0 -# -# Initial conditions -#------------------- - -{hru_states_cmd} - -{basin_states_cmd} diff --git a/ravenpy/models/global/global.rvt b/ravenpy/models/global/global.rvt deleted file mode 100644 index e03c9f6e..00000000 --- a/ravenpy/models/global/global.rvt +++ /dev/null @@ -1,5 +0,0 @@ -{gauge} - -{forcing_list} - -{observed_data} diff --git a/ravenpy/models/ostrich-blended/model/raven-blended.rvh b/ravenpy/models/ostrich-blended/model/raven-blended.rvh deleted file mode 120000 index 1d0d58f8..00000000 --- a/ravenpy/models/ostrich-blended/model/raven-blended.rvh +++ /dev/null @@ -1 +0,0 @@ -../../raven-blended/raven-blended.rvh \ No newline at end of file diff --git a/ravenpy/models/ostrich-blended/ostIn.txt b/ravenpy/models/ostrich-blended/ostIn.txt deleted file mode 100644 index 2b91caf8..00000000 --- a/ravenpy/models/ostrich-blended/ostIn.txt +++ /dev/null @@ -1,182 +0,0 @@ -ProgramType {algorithm} -ObjectiveFunction GCOP -ModelExecutable ./ostrich-runs-raven.sh -PreserveBestModel ./save_best.sh -#OstrichWarmStart yes - -ModelSubdir processor_ - -BeginExtraDirs -model -#best -EndExtraDirs - -BeginFilePairs - raven-blended.rvi.tpl; raven-blended.rvi - raven-blended.rvp.tpl; raven-blended.rvp - raven-blended.rvc.tpl; raven-blended.rvc - raven-blended.rvt.tpl; raven-blended.rvt - #can be multiple (.rvh, .rvi) -EndFilePairs - -#Parameter/DV Specification -BeginParams - #parameter init. low high tx_in tx_ost tx_out - par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none - par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none - par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none - par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none - par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none - par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none - par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none - par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none - par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none - par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none - par_x11 random {lowerBounds.par_x11} {upperBounds.par_x11} none none none - par_x12 random {lowerBounds.par_x12} {upperBounds.par_x12} none none none - par_x13 random {lowerBounds.par_x13} {upperBounds.par_x13} none none none - par_x14 random {lowerBounds.par_x14} {upperBounds.par_x14} none none none - par_x15 random {lowerBounds.par_x15} {upperBounds.par_x15} none none none - par_x16 random {lowerBounds.par_x16} {upperBounds.par_x16} none none none - par_x17 random {lowerBounds.par_x17} {upperBounds.par_x17} none none none - par_x18 random {lowerBounds.par_x18} {upperBounds.par_x18} none none none - par_x19 random {lowerBounds.par_x19} {upperBounds.par_x19} none none none - par_x20 random {lowerBounds.par_x20} {upperBounds.par_x20} none none none - par_x21 random {lowerBounds.par_x21} {upperBounds.par_x21} none none none - par_x22 random {lowerBounds.par_x22} {upperBounds.par_x22} none none none - par_x23 random {lowerBounds.par_x23} {upperBounds.par_x23} none none none - par_x24 random {lowerBounds.par_x24} {upperBounds.par_x24} none none none - par_x25 random {lowerBounds.par_x25} {upperBounds.par_x25} none none none - par_x26 random {lowerBounds.par_x26} {upperBounds.par_x26} none none none - par_x27 random {lowerBounds.par_x27} {upperBounds.par_x27} none none none - par_x28 random {lowerBounds.par_x28} {upperBounds.par_x28} none none none - par_x29 random {lowerBounds.par_x29} {upperBounds.par_x29} none none none - par_x30 random {lowerBounds.par_x30} {upperBounds.par_x30} none none none - par_x31 random {lowerBounds.par_x31} {upperBounds.par_x31} none none none - par_x32 random {lowerBounds.par_x32} {upperBounds.par_x32} none none none - par_x33 random {lowerBounds.par_x33} {upperBounds.par_x33} none none none - par_x34 random {lowerBounds.par_x34} {upperBounds.par_x34} none none none - par_x35 random {lowerBounds.par_x35} {upperBounds.par_x35} none none none - par_r01 random {lowerBounds.par_r01} {upperBounds.par_r01} none none none - par_r02 random {lowerBounds.par_r02} {upperBounds.par_r02} none none none - par_r03 random {lowerBounds.par_r03} {upperBounds.par_r03} none none none - par_r04 random {lowerBounds.par_r04} {upperBounds.par_r04} none none none - par_r05 random {lowerBounds.par_r05} {upperBounds.par_r05} none none none - par_r06 random {lowerBounds.par_r06} {upperBounds.par_r06} none none none - par_r07 random {lowerBounds.par_r07} {upperBounds.par_r07} none none none - par_r08 random {lowerBounds.par_r08} {upperBounds.par_r08} none none none -EndParams - -BeginTiedParams - # --------------------------------------------------------------- - # MAX_MELT_FACTOR > MIN_MELT_FACTOR - # - # sum_x24_x25 = par_x24 + par_x25 - # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> c3 = 0.0 - # - sum_x24_x25 2 par_x24 par_x25 linear 0.00 1.00 1.00 0.00 free - # - # --------------------------------------------------------------- - # SNOW_SWI_MAX > SNOW_SWI_MIN - # - # sum_x13_x14 = par_x13 + par_x14 - # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> c3 = 0.0 - # - sum_x13_x14 2 par_x13 par_x14 linear 0.00 1.00 1.00 0.00 free - # - # --------------------------------------------------------------- - # FIELD_CAPACITY > SAT_WILT - # - # sum_x09_x10 = par_x09 + par_x10 - # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> c3 = 0.0 - # - sum_x09_x10 2 par_x09 par_x10 linear 0.00 1.00 1.00 0.00 free - # - # --------------------------------------------------------------- - # half the value but in [mm] not [m] - # - # half_x29 = par_x29 * 0.5 * 1000 --> half of it but in [mm] not [m] - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 500. - # - half_x29 1 par_x29 linear 500.0 0.0 free - # - # --------------------------------------------------------------- - # half the value but in [mm] not [m] - # - # half_x30 = par_x30 * 0.5 * 1000 --> half of it but in [mm] not [m] - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 500. - # - half_x30 1 par_x30 linear 500.0 0.0 free - # - # --------------------------------------------------------------- - # BASEFLOW_COEFF TOPSOIL = 10.0^x4 - # - # pow_x04 = 10.0**(par_x4) - # Xtied = c2 * base ** (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> base = 10.0 - # - pow_x04 1 par_x04 exp 10.0 1.0 1.0 0.0 free - # - # --------------------------------------------------------------- - # BASEFLOW_COEFF PHREATIC = 10.0^x11 - # - # pow_x11 = 10.0**(par_x3) - # Xtied = c2 * base ** (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> base = 10.0 - # - pow_x11 1 par_x11 exp 10.0 1.0 1.0 0.0 free -EndTiedParams - -BeginResponseVars - #name filename keyword line col token - NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' -EndResponseVars - -BeginTiedRespVars - NegNS 1 NS wsum -1.00 -EndTiedRespVars - -BeginGCOP - CostFunction NegNS - PenaltyFunction APM -EndGCOP - -BeginConstraints - # not needed when no constraints, but PenaltyFunction statement above is required - # name type penalty lwr upr resp.var -EndConstraints - -# Randomsed control added -{random_seed} - -#Algorithm should be last in this file: - -BeginDDSAlg - PerturbationValue 0.20 - MaxIterations {max_iterations} - UseRandomParamValues - # UseInitialParamValues - # above intializes DDS to parameter values IN the initial model input files -EndDDSAlg diff --git a/ravenpy/models/ostrich-blended/raven-blended.rvc.tpl b/ravenpy/models/ostrich-blended/raven-blended.rvc.tpl deleted file mode 100644 index 8b78c9e6..00000000 --- a/ravenpy/models/ostrich-blended/raven-blended.rvc.tpl +++ /dev/null @@ -1,24 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 3.0.4 -:WrittenBy Juliane Mai & James Craig -:CreationDate Feb 2021 -# -# Emulation of Blended model simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "par_x29" and "par_x30" wouldn't be detectable) -# para_half_x29 = para_x29 * 1000. / 2. = par_x29 / 2. [m] = half_x29 [mm] -# para_half_x30 = para_x30 * 1000. / 2. = par_x30 / 2. [m] = half_x30 [mm] - -# initialize to 1/2 full -#:UniformInitialConditions SOIL[0] half_x29 # x(29)*1000/2 [mm] -#:UniformInitialConditions SOIL[1] half_x30 # x(30)*1000/2 [mm] - -:HRUStateVariableTable (formerly :IntialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 half_x29 half_x30 -:EndHRUStateVariableTable diff --git a/ravenpy/models/ostrich-blended/raven-blended.rvi.tpl b/ravenpy/models/ostrich-blended/raven-blended.rvi.tpl deleted file mode 100644 index 04372bc4..00000000 --- a/ravenpy/models/ostrich-blended/raven-blended.rvi.tpl +++ /dev/null @@ -1,68 +0,0 @@ -######################################################################### -:FileType rvi ASCII Raven 3.0.4 -:WrittenBy Juliane Mai & James Craig -:CreationDate Feb 2021 -# -# Emulation of Blended model simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -:Calendar {calendar} -:RunName {run_name}-{run_index} -:StartDate {start_date} -:EndDate {end_date} -:TimeStep {time_step} -:Method ORDERED_SERIES - -:PotentialMeltMethod POTMELT_HMETS -:RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV -:Evaporation {evaporation} # PET_OUDIN -:CatchmentRoute ROUTE_DUMP -:Routing ROUTE_NONE -:SoilModel SOIL_MULTILAYER 3 - -:Alias DELAYED_RUNOFF CONVOLUTION[1] - -:HydrologicProcesses - :Precipitation RAVEN_DEFAULT ATMOS_PRECIP MULTIPLE - :ProcessGroup #infiltration group - :Infiltration INF_HMETS PONDED_WATER MULTIPLE - :Infiltration INF_VIC_ARNO PONDED_WATER MULTIPLE - :Infiltration INF_HBV PONDED_WATER MULTIPLE - :EndProcessGroup CALCULATE_WTS par_r01 par_r02 - :Overflow OVERFLOW_RAVEN SOIL[0] DELAYED_RUNOFF - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[0] SURFACE_WATER # interflow, really - :Baseflow BASE_VIC SOIL[0] SURFACE_WATER - :Baseflow BASE_TOPMODEL SOIL[0] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS par_r03 par_r04 - :Percolation PERC_LINEAR SOIL[0] SOIL[1] # recharge - :Overflow OVERFLOW_RAVEN SOIL[1] DELAYED_RUNOFF - :Percolation PERC_LINEAR SOIL[1] SOIL[2] # loss to deep groundwater (simplifies to HMETS when PERC_COEFF DEEP_GW=0) - :ProcessGroup #evaporation group - :SoilEvaporation SOILEVAP_ALL SOIL[0] ATMOSPHERE # AET - :SoilEvaporation SOILEVAP_TOPMODEL SOIL[0] ATMOSPHERE # AET - :EndProcessGroup CALCULATE_WTS par_r05 - :Convolve CONVOL_GAMMA CONVOLUTION[0] SURFACE_WATER # 'surface runoff' - :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER # 'delayed runoff' - :ProcessGroup #quickflow group - :Baseflow BASE_LINEAR_ANALYTIC SOIL[1] SURFACE_WATER - :Baseflow BASE_POWER_LAW SOIL[1] SURFACE_WATER - :EndProcessGroup CALCULATE_WTS par_r06 - :ProcessGroup #snow balance group - :SnowBalance SNOBAL_HMETS MULTIPLE MULTIPLE - :SnowBalance SNOBAL_SIMPLE_MELT SNOW PONDED_WATER - :SnowBalance SNOBAL_HBV MULTIPLE MULTIPLE - #:SnowBalance SNOBAL_GAWSER MULTIPLE MULTIPLE - :EndProcessGroup CALCULATE_WTS par_r07 par_r08 -:EndHydrologicProcesses - -#:CreateRVPTemplate - -#--------------------------------------------------------- -# Output Options -# -:EvaluationMetrics NASH_SUTCLIFFE RMSE KLING_GUPTA -:SuppressOutput -:SilentMode -:DontWriteWatershedStorage -# diff --git a/ravenpy/models/ostrich-blended/raven-blended.rvp.tpl b/ravenpy/models/ostrich-blended/raven-blended.rvp.tpl deleted file mode 100644 index 01fdd4b4..00000000 --- a/ravenpy/models/ostrich-blended/raven-blended.rvp.tpl +++ /dev/null @@ -1,124 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 3.0.4 -:WrittenBy Juliane Mai & James Craig -:CreationDate Feb 2021 -# -# Emulation of Blended model simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "par_x25" and "par_x14" and "par_x10" wouldn't be detectable) -# para_sum_x24_x25 = sum_x24_x25 = para_x24 + para_x25 = par_x24 + par_x25 -# para_sum_x13_x14 = sum_x13_x14 = para_x13 + para_x14 = par_x13 + par_x14 -# para_sum_x09_x10 = sum_x09_x10 = para_x09 + para_x10 = par_x09 + par_x10 -# para_pow_x04 = pow_x04 = 10^(para_x04) = 10^par_x04 -# para_pow_x11 = pow_x11 = 10^(para_x11) = 10^par_x11 - -# RVT should contain -# :RainCorrection par_x33 -# :SnowCorrection par_x34 - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, - DEEP_GW -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -{land_use_classes_cmd} - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 3, TOPSOIL, par_x29, PHREATIC, par_x30, DEEP_GW, 1e6 -# DEFAULT_P, 3, TOPSOIL, x(29), PHREATIC, x(30), DEEP_GW, 1e6 -:EndSoilProfiles - -#----------------------------------------------------------------- -# Terrain Classes -#----------------------------------------------------------------- -:TerrainClasses - :Attributes, hillslope_len, drainage_dens, lambda, - :Units, ??, ??, ?? - DEFAULT_T, 1.0, 1.0, par_x07 -# TOPMODEL_LAMBDA x(7) -:EndTerrainClasses - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -:GlobalParameter SNOW_SWI_MIN par_x13 # x(13) -:GlobalParameter SNOW_SWI_MAX sum_x13_x14 # x(13)+x(14) -:GlobalParameter SWI_REDUCT_COEFF par_x15 # x(15) -:GlobalParameter SNOW_SWI par_x19 # x(19) -:GlobalParameter RAINSNOW_TEMP par_x31 # x(31) -:GlobalParameter RAINSNOW_DELTA par_x32 # x(32) -#:GlobalParameter TOC_MULTIPLIER 1.0 # - - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF, B_EXP, HBV_BETA, MAX_BASEFLOW_RATE, BASEFLOW_N, FIELD_CAPACITY, SAT_WILT, - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, par_x28, par_x08, pow_x04, par_x02, par_x03, par_x05, par_x06, sum_x09_x10, par_x09, - PHREATIC, 1.0, par_x35, 0.0, pow_x11, 0.0, 0.0, 0.0, par_x12, 0.0, 0.0, - DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - # TOPSOIL, 1.0, x(28), x(08), x(04), x(02), x(03), x(05), x(06), x(09)+x(10), x(09), - # PHREATIC, 1.0, x(35), 0.0, x(11), 0.0, 0.0, 0.0, x(12), 0.0, 0.0, - # DEEP_GW, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT], par_x24, sum_x24_x25, par_x26, par_x27, par_x18, par_x17, par_x16, par_x01, -# x(24), x(24)+x(25), x(26), x(27), x(18), x(17), x(16), x(01), -:EndLandUseParameterList -:LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, FOREST_SPARSENESS, - :Units, -, -, -, -, -, - [DEFAULT], par_x20, par_x21, par_x22, par_x23, 0.0, - # x(20), x(21), x(22), x(23), 0.0, -:EndLandUseParameterList - -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, SAI_HT_RATIO - :Units, -, -, - - [DEFAULT], 0.0, 0.0, 0.0 -:EndVegetationParameterList - -:SeasonalRelativeLAI - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -:EndSeasonalRelativeLAI -:SeasonalRelativeHeight - FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -:EndSeasonalRelativeHeight diff --git a/ravenpy/models/ostrich-blended/raven-blended.rvt.tpl b/ravenpy/models/ostrich-blended/raven-blended.rvt.tpl deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/ostrich-blended/raven-blended.rvt.tpl +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt b/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt deleted file mode 100644 index e9e16423..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/OstRandomNumbers.txt +++ /dev/null @@ -1,16833 +0,0 @@ -16832 -2067261 -384717275 -2017463455 -888985702 -1138961335 -2001411634 -1688969677 -1074515293 -1188541828 -2077102449 -366694711 -1907424534 -448260522 -541959578 -1236480519 -328830814 -1184067167 -2033402667 -343865911 -475872100 -753283272 -1015853439 -953755623 -952814553 -168636592 -1744271351 -669331060 -927782434 -360607371 -529232563 -2081904114 -1611383427 -604985272 -1799881606 -1155500400 -800602979 -1749219598 -82656156 -1927577930 -2011454515 -828462531 -1833275016 -1905310403 -1423282804 -293742895 -2019415459 -1484062225 -1758739317 -1166783511 -1457288620 -598842305 -1634250293 -528829321 -1747066761 -407146696 -1031620330 -1807404079 -884168938 -1787987373 -965105540 -584824989 -120937804 -1082141766 -517654719 -766608236 -1630224099 -1580063467 -343911067 -1234808992 -152763936 -1260514187 -535763254 -174078107 -858017135 -341298340 -272379243 -1590285344 -344306046 -1430770104 -1578742469 -1764217798 -901816857 -2043818720 -1460293275 -1705955009 -931665166 -1193174685 -484635109 -2004287539 -632181131 -1466667008 -1455103190 -375542294 -284896725 -1518207912 -119683330 -1473033718 -1086215810 -270635523 -200870715 -189813921 -1189354452 -702488488 -2006410257 -1948964205 -673325744 -1494443365 -140900243 -1583405107 -672279725 -1093871208 -85890889 -459160639 -1204116002 -1839239933 -1225939013 -1398882173 -361714255 -1952762775 -91382324 -411911863 -1662887160 -792316062 -2057442634 -656665644 -661016775 -776031494 -1093131427 -537293504 -123186093 -214429343 -436408135 -1054870440 -1729979095 -977552932 -1482228574 -1005338018 -314733930 -480938949 -12468535 -1252753986 -1106567514 -871824778 -478120365 -2032651128 -597651820 -953121721 -1036241874 -24799148 -187452918 -162682677 -461069708 -1077583980 -1224356709 -574902609 -859221610 -1257556842 -223789720 -989958143 -1670696092 -1040533719 -1290877712 -1901903590 -2147035182 -1052583333 -1945277392 -986085416 -1006282813 -1161517966 -1006103332 -292464446 -2007359586 -724467532 -2041015481 -1590895636 -2011549102 -270702593 -1328116205 -704030517 -6004249 -2129165181 -1359187106 -1074137403 -1279795539 -327415621 -1021238533 -1266717307 -1712386038 -1643787219 -1902154725 -2072893833 -499445950 -1821989174 -1202724845 -2080384351 -1838530450 -39076467 -1775668534 -80808579 -940122349 -1599128664 -797613643 -899573327 -844032009 -1516486828 -1258195600 -221977191 -591554298 -1551284523 -1987503481 -2010359729 -1755747052 -267909537 -1629864247 -1974481844 -51555017 -1049260978 -1941031729 -496187726 -748109581 -2108458329 -1231476356 -2123209153 -40472272 -1612643052 -300666177 -267415448 -1915645012 -1170880860 -1601956559 -1081404674 -1014251357 -1944850860 -259813033 -843391280 -1485172760 -1096148239 -1848728907 -1793335153 -650930826 -912694764 -185208027 -1087505286 -468022185 -1963747981 -36145924 -1914156214 -1918456638 -1181238808 -1741813188 -157174812 -232179474 -262632919 -992575048 -555861840 -816080430 -2033217268 -1522832212 -530882138 -1889023728 -423559248 -1999474978 -1351846990 -115375670 -2088636096 -939171610 -652443820 -571781158 -2084085828 -1772228626 -248333292 -1176912523 -2044385191 -243553137 -293742377 -2010709433 -1190771239 -892107480 -2067076653 -1514349452 -1842539167 -841590029 -1276318261 -2014346391 -40098582 -1774486163 -1683535652 -2086653939 -1984797263 -1624110390 -1906171360 -861001574 -1108640732 -1356661352 -1573462865 -1076742897 -2120660257 -150850140 -1307599520 -1624972889 -1369806524 -1313553028 -753850436 -1958244199 -2023362318 -1246928381 -1979872041 -450282822 -171017326 -955078396 -1709823894 -1531505951 -281525515 -692856264 -1178895014 -1004373076 -1276822912 -1906081160 -1492493821 -1734652587 -68038037 -1053987655 -1925397129 -1865954107 -1386979208 -24560671 -474337273 -727249647 -1555382052 -2135196680 -1798859390 -1154985264 -732646815 -2071271454 -1149409508 -1510196191 -758158244 -1345129257 -1027070430 -499162424 -1351734986 -380408089 -459934704 -1328924575 -1405403225 -439369222 -1429735768 -1374526493 -1185177072 -1360223179 -1307547138 -744588615 -913641236 -1060177402 -729776255 -1070409768 -906459857 -621824781 -1353667965 -655731437 -2139668902 -1801566899 -1562932440 -185548976 -375384188 -1922576477 -1703896177 -688614094 -747704175 -1737250628 -783640184 -123365437 -1081180304 -1538232061 -1658106641 -2050511815 -134507649 -1517260099 -1369659415 -988575712 -2058498392 -1220921174 -815924333 -1557178636 -118129263 -1123633413 -2083064220 -1781932146 -126636760 -227731143 -661461447 -1807182857 -1461058078 -1675097148 -1994637913 -1659674121 -477860764 -1964504415 -2012113927 -1173781780 -965595118 -223227847 -136493220 -529013544 -548335428 -1021209119 -772356209 -1599642195 -838594572 -323796343 -321575303 -1647261669 -167693759 -930462649 -309824289 -1716464895 -1477660114 -1532642090 -49260865 -1146153960 -481292130 -1653414308 -495882376 -2058543072 -1971857934 -1048656234 -367033909 -1165874379 -1209892625 -142694932 -1681972072 -1577368643 -149160686 -830233553 -1534070712 -437790702 -669353892 -1311519858 -942100598 -487821255 -1866752186 -1915391079 -1197996223 -2063329336 -810218396 -146775945 -1552080859 -339137104 -455707790 -1154141328 -1580999992 -1051701213 -4388434 -741966240 -1936541198 -185760854 -1788934087 -1844142209 -2014113159 -415135652 -10534061 -952304173 -180614520 -1193844429 -1003604282 -1240604036 -913304329 -1840232394 -726361864 -1666798700 -2109059432 -596796242 -1605807804 -1384769979 -1548754514 -267831511 -318481265 -1185372531 -350335298 -1832677059 -445381692 -1549587649 -1385429574 -1897149444 -1700998299 -1376102429 -1902129660 -1651626378 -510913924 -1290699962 -1061942987 -339192292 -1383252506 -1814389567 -177665169 -1016226053 -773828180 -569255028 -429608211 -585181063 -1810506228 -1482379653 -1397039124 -1597844417 -688110784 -878507593 -1127042426 -1396287242 -1845865525 -913114113 -790755729 -1602729667 -1190128948 -834540878 -912837989 -444906955 -13133831 -1696965623 -170909954 -1297960839 -688934847 -1843632552 -2038242548 -83367292 -994738800 -414819705 -1142863773 -1017694043 -1824015993 -907733426 -551862494 -171065265 -1760789169 -1258907723 -1453210217 -772599788 -1398507154 -501220863 -1588180907 -1482255386 -1455967302 -2013770796 -1103491652 -715419672 -297487751 -534700841 -1645455639 -2026002254 -519176146 -567428061 -1936028547 -159570085 -1834827139 -74554253 -1050363970 -1151665450 -771107739 -2091443375 -876469529 -1233039130 -471464360 -1834324737 -220618427 -1377127867 -1956796950 -1321768492 -1392200476 -1879066067 -568875287 -489752165 -2107301851 -1121903433 -924577771 -186927505 -2069484621 -1182878335 -1380056066 -1778913662 -934583700 -852851742 -1573367716 -1625057301 -641035361 -2103338975 -1089839558 -1045426043 -1911788594 -780572944 -111870285 -1155688870 -1820734622 -1592305851 -2090712490 -1477387216 -1241012698 -1339235622 -756994747 -1117588001 -1409556145 -1518018958 -1238900746 -203396710 -1842022593 -749465399 -1273371338 -1877535411 -612943659 -265022154 -346258400 -2031729077 -133126192 -1921432417 -1803032580 -426829243 -1123706121 -1157583929 -1458736530 -1311545558 -1374040498 -1606993695 -1988687193 -430170843 -1451402499 -455054420 -910369973 -1914634983 -1375192633 -1643573817 -462990958 -1155778025 -1171679060 -2132402077 -2074607003 -1375406729 -946917995 -1996917695 -1321264549 -1512365063 -703167949 -541209402 -1513174369 -1420272009 -1230918858 -1343274855 -2072390721 -633577154 -1307305452 -977539307 -1253233199 -570765817 -51635170 -248908802 -112090858 -567891987 -1143298241 -1877346778 -1737556122 -1623110548 -134212395 -849893415 -1244889708 -2075633282 -1444208706 -1955543348 -1727316148 -1318559290 -1142233637 -1164416526 -330077371 -660114196 -638771770 -566387037 -1619407355 -171673407 -1244413528 -514926963 -18369731 -1649907396 -1684754508 -1097130261 -1173703485 -1797174700 -757687845 -2029067852 -503074204 -525028389 -141828400 -3070630 -68470882 -1886362629 -795624942 -1835213972 -133605543 -1387950086 -1309721688 -785028466 -1981384541 -101066558 -2113559176 -1062066005 -259272171 -343058234 -1933630290 -654253979 -930352413 -604571484 -1287797631 -1674589751 -2056751122 -1919325342 -749161407 -459145088 -942750345 -670700849 -327506040 -393427019 -225759220 -1879089938 -970075184 -357769464 -77169848 -2060996195 -251823255 -1850662195 -2073851864 -1568687438 -273036247 -1895133337 -28542655 -827549304 -1517054356 -59220461 -1033359466 -972291773 -1104758788 -537337954 -870257243 -2049847031 -1846384843 -1051357151 -664189341 -410257081 -1768253497 -10333246 -1872173762 -694022090 -1445579773 -1376746300 -1986251322 -292676239 -1271997243 -257957216 -1864929666 -1349068497 -661884053 -319987311 -727683889 -263752758 -486356298 -867540004 -1478367745 -540894425 -514323224 -608746593 -591894243 -822289197 -1157265534 -402439059 -1367260210 -1467326570 -1802943489 -1076960453 -1482156655 -1944079032 -172601719 -1814167783 -745108775 -1066035768 -407085855 -9065643 -2042406611 -1349297429 -214576883 -768629268 -1237970571 -1749814661 -1493945409 -361688339 -1517192563 -234581863 -1984879196 -853674674 -372000311 -884330560 -209401033 -1824947845 -1536984461 -17046264 -881233997 -1852557867 -1722156463 -499079375 -2103414090 -204813716 -2035322318 -395185563 -1864320817 -1853561589 -1411842941 -1297493684 -1427395350 -693826813 -311042881 -722504169 -1255028245 -675332881 -868656572 -917173298 -294001320 -2067797140 -738672579 -267071946 -437374192 -111521263 -1732127057 -571128267 -1848365026 -2120038127 -432129465 -10224101 -37773747 -1355689964 -279730278 -585079063 -96192228 -1795073452 -1949234708 -924702371 -133596058 -1228535691 -2091576379 -964384110 -1344652861 -1610217446 -335695428 -593517727 -190897374 -71596200 -726491080 -1691048365 -1651286157 -1235270518 -1467180477 -1495042085 -1613652695 -89866902 -712018073 -1108871827 -945707723 -983229014 -243374633 -1588592943 -1964893497 -2108964160 -1143043385 -1888949280 -1319795359 -442008850 -696806977 -1006535348 -1110906417 -781323501 -1989063549 -313135194 -1528270408 -1736329136 -328509669 -81550446 -523779136 -620469699 -53641261 -1753025534 -1771996745 -646076619 -932416301 -932598748 -1851501830 -1153211780 -990472285 -1721946098 -1258442114 -70170695 -390348662 -27420649 -1297347285 -1114351004 -692438741 -604036894 -892878089 -2133800234 -1951111585 -257119405 -668742071 -1766062546 -1841725435 -50098187 -186639285 -1520338375 -1566636619 -164659666 -1476069126 -562710538 -2105514425 -1145405709 -790339455 -1048863490 -1702901854 -1156896609 -644367525 -124960854 -2125550059 -729373768 -748261700 -370155068 -2083586164 -1964310366 -898216031 -1654278254 -2131320916 -1083403252 -244613451 -934570599 -632663235 -979454348 -1227072581 -1123406726 -420619458 -1982548329 -333498651 -179508687 -1935462021 -1375385838 -595802958 -2091552792 -567957401 -95227692 -616502429 -2095211075 -1923177666 -1070661465 -841764042 -2053471105 -479170798 -359925736 -1957895000 -449342019 -1538810481 -642193346 -90756400 -629425430 -248756888 -1853839554 -1788633402 -1085496708 -1069590091 -15050400 -1696486101 -701518288 -732644386 -2030447251 -64313080 -725661119 -626795720 -1148377505 -1345190946 -2063877453 -1432486227 -356850672 -1814901880 -198175172 -2130462954 -1696021447 -1482013098 -1678800180 -1954470974 -883795506 -1954166690 -64661612 -140987502 -902483473 -362731950 -1877293464 -841507724 -2040501773 -1546939868 -1981330894 -1346905076 -808489305 -1150714566 -1969469527 -1708889078 -852438968 -1078326039 -811240440 -144400277 -278934429 -94146802 -1777337022 -205798984 -1414852418 -338166095 -1315828703 -346414515 -360586588 -179932682 -471611398 -10625109 -335064262 -722929000 -1952711921 -1384162793 -2081197647 -475210793 -376114758 -1316364585 -763048701 -1934661470 -805427063 -1223220800 -811032869 -950721774 -1502521938 -626006893 -775463998 -145160743 -175184609 -127643426 -2114381076 -1990837423 -61864454 -373793230 -953149135 -1496988972 -2122727799 -540290182 -1096229358 -1064612293 -105061647 -539543295 -1428201431 -1356728298 -551140640 -923766969 -1592163820 -1851081120 -524789751 -426006828 -186279098 -1909126407 -1134352622 -1852183535 -1873209480 -921465340 -1563390863 -1447813396 -262542415 -1618957967 -1208743879 -163073733 -591096959 -307238891 -1213353649 -330066831 -482968416 -1909465699 -394382325 -1249201633 -1531712759 -1609863924 -836502115 -1663093543 -2113511496 -260708245 -856833835 -1928411710 -992409446 -2067556320 -986178133 -417093785 -708620687 -1991063794 -1718998204 -1105311537 -1237455809 -1688144315 -87558041 -561696892 -101551632 -1676263306 -119418949 -1324549545 -888718013 -934879606 -1531176590 -1188406129 -1943893003 -1340979610 -3430005 -1813519213 -582011020 -71201055 -527740006 -618818732 -223126303 -577326859 -801402067 -147106085 -658292898 -92987342 -1617645625 -627048355 -1099446656 -1450648604 -669243037 -1595863520 -1754913257 -1286702501 -448609017 -2104147749 -1798002294 -1782158321 -1780476338 -1428675468 -733933569 -75425815 -666320975 -1876891367 -525914386 -394450 -187070209 -172943455 -1115273794 -1169384742 -79021450 -968616304 -1608177068 -402800734 -1003480994 -1315986267 -847109016 -1692135949 -602957622 -2080906408 -2022807861 -518104170 -1878080252 -1180151758 -651633014 -1976950245 -735781331 -1065990691 -1796960363 -1450293180 -1138082810 -120943841 -1183605625 -718717214 -2032184970 -1352868902 -110781478 -35978797 -1252736372 -810529016 -1072398991 -2127076113 -607959582 -249502248 -1496203192 -1801025221 -1048884882 -2062437198 -848440559 -449059033 -1077632073 -2032655760 -675501844 -1560934066 -958615510 -1028556776 -1857859529 -632876523 -269218470 -6781061 -152658936 -1643262834 -1678750618 -1121482440 -291399361 -1286345167 -885347420 -119897877 -783957853 -1167461026 -2106864990 -222031547 -1505115590 -1267843117 -1306521885 -693030620 -1961812659 -1868927422 -1967360532 -622748465 -1845639424 -1408001900 -1165627007 -1347278715 -645789037 -393992921 -1146939546 -799734150 -31712477 -415656483 -174206090 -861543769 -1631377509 -1638072514 -344388258 -665023541 -1545754599 -1387867634 -2071434571 -1743433280 -1616257292 -915655741 -558224585 -1872029999 -425280996 -872122556 -1187907917 -12894860 -1975547320 -779140973 -1814537452 -515684717 -2016522974 -114707064 -1588793289 -1037141425 -111167276 -77634842 -1286215765 -857971653 -1724366013 -1127764226 -642677960 -1793212957 -744666301 -71826191 -296982523 -633268433 -413598899 -2099613801 -757865903 -726721364 -1266464259 -1754375596 -840168662 -1009723209 -1002195069 -1178281262 -1426461447 -30104621 -1309708102 -556688564 -1825928816 -844294882 -1639626045 -684780011 -732780604 -24895883 -1813278063 -823970264 -1493671192 -47890514 -1736984820 -611172422 -560612953 -1211141682 -1808243108 -2100827459 -1828463086 -488097832 -72730884 -469772245 -1312235343 -82355111 -1162881909 -307573216 -389902983 -1126828284 -2092169942 -202979216 -1267651876 -239818045 -1942560543 -421160860 -344473508 -2097820291 -679114391 -2147469379 -1907681371 -469952687 -49956743 -2104357271 -1024471254 -1911967979 -1648012992 -2057761185 -1715585007 -1721768027 -413086464 -2077053344 -1688870623 -1557198362 -449664145 -510331222 -87162036 -348491798 -913743617 -633411222 -665969975 -272601661 -1033497376 -1142661496 -1912991798 -1675469749 -1814491979 -1898903653 -1119217904 -886048455 -1164774887 -2058083404 -688668799 -1667131110 -1253423361 -1619334904 -1101473097 -1149304139 -1886743055 -746993783 -535110519 -2088462844 -174808893 -255435555 -285562532 -1971007926 -1794957307 -2144669340 -2092066132 -605728193 -1401252971 -1553010595 -932824527 -1351202189 -15623498 -591125952 -794524242 -515618248 -899378491 -1864390651 -879777980 -1003600265 -1173090317 -81594712 -1267757798 -2020049099 -1396231470 -908505521 -643561277 -1606736247 -1956725951 -128488299 -1281776058 -1401743749 -1211581853 -616262517 -210493738 -862687957 -1534392402 -1549467238 -1509165544 -615943291 -1287713297 -257188213 -1825198127 -1448506741 -1178173595 -1764385825 -1578362999 -1828916449 -1665318832 -859238073 -1534250483 -1311718252 -2129024909 -1149119249 -926780472 -700501213 -818534037 -321317177 -1603905281 -1621320623 -115713978 -1332127711 -1553418802 -1351108635 -590745067 -835440988 -1008601230 -1472446839 -1959958692 -774075111 -424457051 -2056464470 -1396532472 -1672478841 -938425104 -990819360 -1112784682 -137068651 -1610347773 -378617670 -433133629 -1854822920 -1136196588 -631465392 -174659870 -2045773288 -2098462946 -742798741 -895999976 -916263868 -41596839 -1185887798 -420493179 -2007660823 -1492390497 -2145569766 -45656738 -701133587 -709425620 -487187196 -1947540808 -372612482 -435670322 -1539349231 -1107030008 -55026848 -1418266126 -1877781629 -456162291 -203005047 -1701793493 -1856026105 -2030774060 -1262024649 -152294324 -1957679891 -1128972350 -1620265205 -1704656475 -582040698 -569999201 -52021940 -306901251 -1981089110 -1578208682 -1382794277 -555385705 -1403614073 -433862616 -1222005547 -1861112168 -1612889021 -139699866 -736021691 -810753917 -557342804 -2084322261 -1450990763 -2124942056 -1248085582 -2101596425 -1867572766 -674493610 -1795414404 -1237164031 -1079198763 -446727179 -540867541 -62483836 -46328269 -1250136869 -70355035 -1341067395 -1478832500 -1909580769 -180880168 -1363623071 -467473513 -1332152265 -1966097880 -876192771 -876534718 -181187006 -78198396 -20449608 -99178136 -439621680 -1377830080 -873988959 -344288433 -1134748413 -2061791931 -740856325 -462068969 -692294431 -326102371 -424282253 -1266118131 -231969594 -1030147053 -668357657 -1747667389 -1911966904 -1629945467 -1192062737 -1123477896 -1616773648 -1004116445 -1258592989 -458443173 -2030566822 -2073942877 -950859282 -1666135247 -1695823096 -295811488 -279036011 -1801435476 -1501589726 -2138188985 -550921997 -1544001362 -1985984433 -102040110 -1296178464 -797329280 -415251680 -1960616657 -1095074631 -984468427 -1746836101 -825411370 -2092019617 -1971434235 -369998082 -1592606109 -694697755 -2064063193 -259251113 -2136620075 -2099539038 -1648807809 -383864975 -577759237 -1625928172 -245378729 -911696063 -579909496 -1258109186 -917100740 -1222002661 -1812607166 -285622620 -833423295 -1456973331 -1742231023 -737276716 -429122622 -1013821328 -1159804398 -123453367 -411536167 -1791015429 -318035204 -130876245 -613795187 -1691751368 -581755696 -74937881 -1055548825 -246693908 -1541073046 -14417655 -1799359121 -964029593 -1828736583 -789794617 -481705812 -16233094 -99187689 -600178951 -476939498 -1513172282 -1385195800 -115593473 -1454283823 -1636826654 -880055708 -1376407467 -586452385 -1702778612 -1233051962 -687131784 -1604323769 -64913851 -85401081 -816892171 -643762726 -697522296 -143999899 -2139715971 -445171935 -171685397 -1445929458 -811451154 -1538386828 -2111791963 -1425288172 -1785708166 -1313179137 -912315340 -250679800 -1959966833 -910900898 -100473223 -731312419 -1118914352 -79217285 -2112531502 -969818263 -334665511 -463571884 -181983072 -572777776 -1654375378 -1616200337 -2105896703 -1127901114 -795870929 -1674550187 -1391798974 -1573472894 -1245300300 -386518438 -77355291 -882769402 -1888305938 -1244564600 -906510420 -1471637122 -1235946955 -2098638901 -1552590779 -319427956 -2064022639 -1725143682 -1313145227 -342389970 -1439535477 -721994837 -1284619909 -1953707272 -933157874 -511314277 -1576981892 -91487570 -33297738 -1289334346 -1732354992 -107064518 -1989541487 -1903388219 -1329391021 -655026559 -1030202591 -1601784823 -342521369 -1500474823 -579883440 -820185994 -168471065 -1109742709 -550235968 -751330194 -402726198 -1898238089 -670501991 -1280266928 -1807599603 -2022857159 -1346655656 -911454659 -817599762 -1798826428 -600992930 -1272582669 -1507277410 -1094329858 -1351970498 -43690979 -2022360426 -1587998713 -567604475 -606051351 -390118536 -454660261 -728190601 -190126754 -4687742 -1477468502 -459702853 -1727172112 -1045229885 -762444735 -373739496 -50041797 -1386376202 -627257064 -312251525 -1708831054 -2024713247 -329671967 -288940109 -755886096 -1811843467 -335035409 -237996629 -1394792889 -352594771 -1152934124 -618875187 -1171965488 -503946532 -153859556 -347246704 -1462285229 -824987535 -1411075713 -1287594570 -409227171 -1638425303 -1978745687 -847003967 -2074061053 -789559667 -827868456 -438591079 -1236388249 -925532571 -1201865576 -523552150 -1100483291 -1693503873 -2118819820 -1430880186 -1281406996 -1641369656 -2072362677 -162241646 -1638596279 -557372025 -427955961 -733102724 -1143799429 -1710878906 -2083223459 -163294725 -10342209 -2022814903 -636459064 -351442941 -1121480137 -252692840 -1433391761 -543775081 -1684868382 -863526932 -602659698 -1368665034 -1455883421 -603982829 -2131691281 -865676866 -229378437 -430244294 -538409809 -1705055052 -838473396 -434674958 -1990135659 -1152218788 -1481124917 -1783527642 -1172334268 -259581051 -1239437100 -627963800 -1452945242 -614132257 -914435917 -1531479087 -1977505914 -1484975626 -2077884395 -623959251 -720483256 -1649281806 -1907881613 -1687936334 -886988668 -1934549249 -1066812363 -574416138 -1273038101 -571788446 -59091597 -1015025865 -2077104934 -408460106 -1631265730 -1906886508 -2143075775 -1078822941 -572737766 -981927308 -1987922008 -454608430 -2004550631 -759001081 -478305187 -843987188 -763180281 -1998642883 -251728207 -253190459 -1206939706 -2052592827 -750337981 -906471483 -817222963 -1908416576 -2089124887 -564347359 -1698277561 -745815450 -58220611 -1408749692 -848865269 -1144709062 -1966695208 -178066232 -1314440953 -644820382 -1293677512 -1713501956 -1071668222 -582459765 -1170807329 -366121042 -855704239 -123160914 -1938729537 -457952428 -225066548 -974769869 -1951928967 -1109956797 -2000929337 -25454939 -471914020 -801825769 -825814658 -280146445 -1137146891 -1570822384 -1795335317 -2055432469 -1231560841 -1395664901 -2123598573 -143003271 -421774704 -2071415028 -1414974079 -235438875 -1356294351 -1847727999 -3459926 -168917813 -28301757 -1073743912 -1108843243 -465296435 -1249224318 -1912979554 -1469684841 -636214893 -542628238 -1737230904 -452138916 -1301618126 -2027415340 -646592431 -1011733997 -437770633 -332054209 -1672575757 -419808669 -1240519488 -1639789740 -1288518229 -900778455 -1771265482 -1240641260 -1538928097 -471481811 -2127623694 -1221218861 -1524182448 -1749462120 -2011239763 -1514092961 -1826662224 -285781256 -1352134900 -659311746 -36896502 -1644218778 -565432250 -604687775 -1094816821 -946423051 -120844828 -1666977781 -823906505 -422073679 -653836912 -363158285 -452771221 -1191350026 -2029846001 -696522565 -521390158 -1271105746 -306952666 -697737368 -1611231356 -196611622 -1621681868 -1892191399 -2122998217 -790238214 -1494789650 -1665944944 -644884222 -219152745 -365730610 -736164556 -1064402325 -871096765 -1127307756 -1560721258 -1676918748 -398014408 -16594851 -1884270294 -2136972596 -1581908544 -1289349148 -1981132206 -155039507 -851330338 -1772934452 -1373732639 -727774776 -1791290567 -647312276 -225267030 -49303549 -1863543948 -1681626188 -59063549 -543623129 -1278494765 -2087627120 -1161181154 -1787754989 -1354394946 -2136682869 -1007434149 -1184669295 -1415949728 -1600786089 -736668207 -939330094 -1168600761 -1935038312 -696559616 -1144106315 -426260967 -162625977 -1655596455 -664005006 -1607106030 -1729217891 -1068899186 -1287911947 -1448415116 -1785715867 -1442609844 -853273478 -71550080 -2098835887 -568367187 -540050053 -1355348549 -984019314 -641044851 -115353758 -1720361112 -389386176 -1030787623 -696999412 -2093306746 -2129374868 -588429221 -567722912 -449138363 -263447736 -1802302485 -1041024460 -948827111 -1871175602 -1097816146 -1963954445 -1358702725 -1523080524 -409294628 -624691455 -141734002 -564007091 -274360579 -530861144 -1536177570 -1488014756 -1616934777 -1564727901 -297090945 -308033340 -1680756110 -468048132 -252355563 -59744516 -1251217263 -1048667817 -561709390 -311605518 -1588809640 -1311952682 -1774122625 -2016003427 -2120098870 -1453037066 -9934578 -1614211627 -893902438 -22681054 -1095869059 -1451517941 -247804467 -878885336 -1033318086 -276818113 -1032445789 -648507963 -993825616 -99321746 -705791303 -1682247140 -1905469225 -1945120511 -496870096 -1479283936 -906931033 -2098428872 -170117023 -856071404 -1999135775 -2093313110 -88850969 -817101318 -2011412708 -125812282 -1403114926 -634633575 -1882704023 -1582459663 -1962071593 -1925863866 -1120468278 -426247803 -2088862276 -445611576 -1118280743 -167569057 -982079782 -255585232 -653700224 -213326716 -1231908969 -804201256 -2095919021 -936724206 -321114085 -338021684 -1036196673 -1412589588 -961487931 -2060696289 -1653754054 -1911026104 -850305396 -1726603434 -77393327 -1522040454 -108707314 -1682726448 -1371264193 -42792147 -1948076531 -786574355 -45853553 -1861519645 -2018904019 -1478224733 -284775388 -1626380600 -1406885184 -1724334018 -590024261 -1605756428 -521293547 -1794848316 -312857603 -1157765765 -219886888 -1967053776 -1909551314 -1833313630 -406812254 -1853104577 -173293198 -550953454 -2072699161 -1522560940 -266580928 -774769254 -1353500217 -2131358095 -1708270705 -1196862192 -183539495 -961775373 -449283042 -547584042 -1277566499 -1518645987 -1039958914 -220064665 -659984521 -606807692 -217039841 -1361375081 -1340211229 -2121636067 -1518903281 -1069331878 -2117715450 -49602772 -450133968 -1964195442 -1114172010 -1979053877 -1731786003 -1281484630 -798680647 -1652840379 -1587275908 -1304322722 -238920078 -1882814703 -1295174776 -1108214240 -631061249 -1972163057 -1881891201 -806262191 -226831567 -574673144 -1297570649 -573462458 -276923870 -662420041 -738403039 -31880460 -1091463117 -415294745 -536926465 -396812561 -1291988792 -1248472327 -11685052 -969657087 -1920747773 -1033639107 -1377250766 -1874876796 -1026757941 -1689610742 -1111476513 -1772992385 -199928923 -1540984953 -681322251 -600266753 -1952627712 -2116345777 -651828778 -972188499 -1516516317 -1753817223 -45528239 -688934541 -1838489610 -1500162234 -1768651058 -249690032 -357321586 -1139618890 -168036637 -250762254 -1198287564 -517446582 -1563416971 -1886610552 -667499509 -209675835 -1094118 -1208972050 -1850460083 -824439127 -783917045 -481600970 -401637247 -776107808 -228257178 -912597104 -691320054 -1129617308 -1722656076 -306140478 -2079679181 -724156495 -1108383916 -1335322134 -1554994988 -2072262973 -634000165 -1974400388 -830007672 -2032656039 -680190997 -914633598 -558936360 -949930542 -1089187596 -825318944 -538615835 -872766740 -1277290170 -1169351778 -1672479149 -943601660 -2093850172 -525317415 -704521088 -1808580105 -1322285097 -1484846123 -2048811121 -1615714649 -385389428 -429437044 -2003344588 -1963872850 -2134819207 -1897121620 -1233360331 -1574922273 -1982693036 -618105553 -1121628732 -602645358 -1127652654 -914971003 -1934734901 -2039581880 -1118683746 -498389537 -1246725059 -710122834 -1467844659 -1920530724 -1680663858 -1065052415 -1059741160 -1987791549 -409467664 -1385423860 -1801114246 -397644410 -240489406 -341222988 -1153421826 -225748113 -1692414589 -991092808 -1413657924 -1737141907 -1103849984 -295454655 -724194721 -1750848298 -1686413292 -1059025538 -697750830 -1837487190 -1832358470 -1533307310 -492195170 -217213946 -2140074169 -22954780 -1401414647 -2122815480 -2013944749 -1879636076 -1559081962 -2042558287 -1751032314 -484202910 -1182769887 -1704854177 -1757334565 -1179436764 -1519630738 -410799795 -152229460 -867510643 -984897418 -366953250 -1957722213 -1840278204 -1496290534 -1121498568 -562462657 -86862105 -1750002422 -354677242 -1793285869 -1970098285 -1539006549 -1790024575 -844621202 -681635344 -1567453510 -1009244821 -1551862541 -964833772 -312187507 -632880528 -336530505 -1743754984 -580685479 -1415153585 -1104912570 -974468381 -1179787445 -971075364 -2135409195 -1075631701 -624658261 -1731326091 -2141678234 -1212671471 -1749603067 -85168698 -1206198384 -330612208 -1059185067 -1231471086 -2034636263 -1749561060 -1526640696 -115563316 -947435124 -2098370210 -1331668436 -276834818 -1313206724 -1375970049 -1824702647 -1710908969 -441008653 -1066365174 -1648445203 -731996874 -1885131302 -1575548523 -1770658551 -1777370178 -763051876 -1988023695 -16178192 -1323933422 -1270956987 -2101727447 -1922175873 -1413395690 -1624742363 -1790323336 -1570930035 -1457142027 -282537401 -519755090 -1707805281 -1964415612 -519601906 -1280725440 -923876199 -1280508783 -1577489294 -29458396 -1186022762 -541349480 -1719981668 -454521809 -548711484 -899131370 -2005995298 -1417199233 -1126380154 -1002899973 -140700908 -380665409 -489744650 -1980997246 -34250434 -121426842 -711468844 -467914612 -155768570 -219790297 -343648839 -1122510290 -386605135 -1534471770 -735921567 -1275453496 -365142918 -1596243347 -1696214705 -435133010 -1098681035 -1467758339 -469750484 -946498216 -1384142983 -1748250977 -982912185 -1360880571 -1618916247 -507555839 -685940189 -904539427 -557412476 -1107815918 -378914336 -1124231797 -1402685873 -2013474392 -416796918 -14144312 -1500250614 -1106570071 -914800277 -1212826666 -62998138 -100267395 -1566928517 -775622058 -654191516 -2028020419 -78736949 -481975291 -250399353 -1541461398 -98998778 -1720119068 -616319962 -1175971853 -1266930030 -992654205 -1886253539 -1109632959 -853151365 -166680536 -1081092864 -68627981 -231758228 -1772685985 -1492715064 -1158116394 -1817941197 -1887852110 -59528345 -1912998560 -1789118683 -651679887 -617261109 -1961443953 -2114536621 -310114944 -159052539 -1726366105 -383572118 -2098162579 -2136981513 -1731776563 -1122826550 -1407019661 -1837005310 -175852251 -611284285 -293210747 -1665538611 -258096432 -2057249331 -1702789417 -1414651597 -1257934842 -134384779 -1599667656 -1266517599 -503377329 -1324682970 -983708341 -1856972581 -758327016 -2034196614 -802831258 -545199105 -1996119633 -793138397 -846041450 -929423363 -22413663 -896795816 -1407044866 -113142098 -1056213491 -680317135 -887151317 -373223698 -2118443046 -1540890509 -1241485590 -697196878 -1117150514 -499163077 -1362709957 -153152044 -1340994402 -252039149 -1184225359 -397168317 -828728943 -2015894206 -284421523 -2121422486 -76731061 -1128754027 -98394191 -148759947 -537464121 -843262365 -1465982002 -679625583 -1655088 -2047260252 -1320063130 -647468753 -707692322 -1420418768 -1550013724 -2104021158 -1817871004 -708118359 -2138371686 -1474094057 -1727464207 -1659503256 -1901100003 -1526050355 -931120364 -626622059 -377140725 -1379922778 -1686225893 -56894192 -590462029 -373388616 -595252578 -1431250720 -1066520993 -2119811489 -917991893 -1167225603 -297594276 -177582869 -1780493600 -1718797902 -2033803117 -631778120 -1135712072 -1078139568 -1972189637 -181137614 -1395550699 -204205559 -403962207 -1197004882 -434246678 -1234484640 -1143830813 -90866147 -326459612 -2133464446 -602489963 -663412536 -239397328 -1314020865 -26852307 -335157879 -148866272 -176984749 -317825348 -898793747 -626532831 -1024969376 -1693969845 -1360476636 -1272431643 -1116467075 -1897505686 -1245906652 -1987541914 -508819513 -449672637 -653056266 -127742845 -1637832562 -606482288 -1190425754 -1527992026 -1352530156 -859928397 -251624069 -650426740 -1030455950 -1565022242 -949112838 -230938350 -877898321 -1624426157 -770816388 -1489674412 -1593485758 -446572969 -96543718 -1260114941 -268086673 -312021705 -2141213608 -1993636877 -2015131245 -346237878 -1686815823 -1381913114 -778064693 -905368668 -1609564081 -92008108 -192045316 -37704571 -193048932 -1873093154 -1113857905 -994858436 -278058310 -401600298 -155105965 -1968289944 -1210990420 -1413466321 -664353933 -1029071178 -1913479355 -1279905660 -30735621 -1177506867 -1296106564 -1736389627 -1345181906 -1911942173 -1214291550 -1060983409 -1391434022 -1882175571 -1290701487 -1087573662 -1617217617 -2023452487 -614915117 -1187062055 -828877755 -222010196 -1146269333 -272882494 -1458490313 -1468343733 -1718532854 -1874108675 -1001850176 -1824115552 -433537892 -59336573 -837370203 -1220663030 -772265419 -73734665 -160450336 -1596820167 -653410210 -1781512359 -1661211239 -542399226 -35709867 -1027797156 -1975828071 -1202755736 -452085741 -407905901 -906676883 -2121897116 -1611386530 -657137393 -2147251277 -389524704 -1211544072 -2128760897 -1006836859 -1883434500 -974684720 -520829724 -441826096 -1920227793 -884269835 -1336279605 -467340909 -1250960484 -1027950458 -257407491 -1215636179 -37842895 -370376753 -1514478665 -1866738411 -1683874654 -1341809612 -1068371737 -1013011192 -428750528 -1202488411 -254121760 -1826930084 -492736982 -733513642 -1607647314 -89159844 -1713396149 -1440853620 -1401187768 -457143774 -1666404299 -1922812766 -1380238106 -543492648 -1232984245 -1696495812 -864731065 -1513170206 -1350304468 -2107495827 -87090771 -1298224590 -826830610 -175382533 -1306668447 -1008814507 -762026084 -1927406727 -1281529341 -1550138424 -2052370411 -1307159563 -673066531 -1432817768 -1634092965 -32101272 -507683107 -677449818 -2088278379 -1369472932 -1839578 -853016388 -45605744 -1991561076 -1486882190 -1909250838 -1078180792 -517557758 -1284468356 -1554039648 -1048249122 -2114637113 -1999083988 -1222929001 -201734370 -1820361624 -1765779406 -1377958749 -889045195 -2138860186 -1094378969 -29895428 -2088768645 -1019439006 -1086838076 -2139125597 -1260174352 -1266607350 -2011822386 -568819487 -1699405212 -370892984 -1600838494 -1617439042 -1449975168 -88222420 -990496510 -2129095673 -190966150 -1227514432 -2107145542 -642301717 -1912147797 -375246824 -1761383376 -508326537 -754159593 -711794957 -1653928509 -548123995 -1762621982 -1998224756 -1814202306 -1325336836 -1235815968 -2044624039 -2110387826 -1448277730 -1624153012 -475035667 -1727739370 -1989200503 -467437425 -725621249 -2104184277 -264444743 -1379129958 -1246202035 -509593054 -565674342 -378560725 -1623542661 -954284645 -1254152719 -992752928 -1398007353 -691000044 -46176532 -847376757 -1897091642 -729520085 -1059927872 -830892839 -1877272279 -485451429 -691792250 -475880892 -901050416 -2047146715 -1559330418 -1923390985 -360946604 -1935754300 -1992751697 -22812867 -1163766503 -142559045 -1545602910 -985914258 -277113954 -1709678182 -1230008014 -1067105276 -1202437635 -1548213175 -1906965173 -1317714783 -1980990017 -2060236278 -364800118 -129771041 -1365984382 -1499321844 -529118210 -159973243 -20769057 -1173190185 -1760076188 -13254291 -1574053196 -261017779 -1764204479 -677964424 -2147326833 -1659394396 -71489983 -1088785608 -511557569 -1371023242 -288095984 -1601062750 -1091542340 -1746795706 -146492605 -1084952773 -517609134 -461141 -1307945846 -1003223030 -1275352613 -817085984 -1753694170 -124860115 -432429686 -761071154 -910283746 -465417794 -1141421384 -397782237 -409464148 -1326330448 -755583676 -1024037821 -1069710489 -2038579586 -1452997664 -1495188811 -1932192930 -118864576 -597137122 -892527023 -528401266 -995197317 -1678663983 -1812891642 -771843458 -1571770726 -554250135 -1645441906 -1795191723 -1789531758 -1151780471 -556782039 -1249479494 -1906755292 -2085212110 -1374297377 -1629391754 -475742934 -729873957 -565003635 -1990890058 -946500899 -1429236164 -1567616653 -1603705575 -412345528 -361560227 -1511497826 -1159901219 -1750723914 -1743375051 -637602489 -241634093 -252624574 -286045099 -1491576907 -1356464518 -412757474 -842685708 -364042391 -279555234 -1938081849 -309678447 -1412782048 -2048679504 -1551111377 -1224922306 -1490956800 -1671744404 -1479644327 -521571629 -26121549 -938210055 -1671458111 -962885170 -1921772045 -1068709435 -246250537 -531787590 -2074569963 -752875449 -604023219 -663042364 -460367465 -12404114 -170030239 -1544976363 -1192957064 -1122046256 -1177520285 -1521622890 -1680643754 -727164487 -124097932 -507321887 -1048876219 -1916838157 -1896716052 -859429896 -463252350 -1254026075 -1011730867 -385164723 -947787403 -1576672422 -1332676221 -34808137 -904806575 -752401618 -1230280190 -1346600014 -2123763212 -762607297 -958435383 -148645934 -768731277 -804952187 -1831914456 -513214953 -1309388719 -1631269424 -1968971566 -1929593139 -1521333826 -1117312400 -1072497432 -1634090353 -2135685035 -1416707287 -1448178320 -2100852789 -106700749 -170643198 -1109560041 -1775102186 -1299615978 -589568609 -390064205 -1689002791 -1631062291 -635170882 -175804537 -1956838734 -2024032180 -1767880780 -188529568 -1078070051 -803817418 -2087204696 -503951927 -244533321 -1735309336 -368600245 -1721479767 -2010751585 -1899219903 -2139464360 -511313152 -1558074017 -134412201 -2060549210 -1329280948 -952513295 -1547844327 -2704131 -351173130 -881733954 -1665400578 -85659448 -864299046 -694677814 -1728914806 -269916885 -1007623731 -76006675 -1838900407 -1961976472 -327165219 -1107699413 -568298448 -1532237327 -1836343712 -1941276547 -315876558 -357734922 -1644106101 -819153558 -2143672036 -362763333 -257263898 -949752275 -240537774 -1154143964 -1625303244 -479632068 -1670039685 -745719505 -593156643 -564609527 -1809567843 -743328487 -1209506410 -94030368 -1967914431 -1342194370 -1092548502 -1477491264 -842263787 -1862750732 -1234946758 -320713451 -47016987 -2088002060 -1020346793 -1311628656 -623184937 -591489740 -466258217 -234025216 -1219247655 -606377911 -1583645162 -411916816 -1746132231 -1880370162 -1011963482 -2147241381 -223202632 -1860188362 -1118867108 -1432671024 -1315250204 -1361000057 -1479633802 -344677954 -1238976919 -1483636321 -1043021730 -157205649 -750456933 -758214100 -136417402 -1402224065 -694318277 -2128627388 -910434743 -855740726 -736397923 -691634200 -2114501836 -1872967096 -1142684746 -156270901 -72532826 -1435978733 -1073340545 -771905015 -458875578 -708063069 -1209112656 -2066141478 -829248756 -14973062 -396666335 -981852057 -723178451 -1850267584 -1884075728 -1014385481 -2051589281 -1063609535 -431577117 -1464329500 -823311880 -1165629539 -1389834039 -761065054 -807761046 -1795767435 -728105107 -900712743 -666843898 -2075723640 -815371965 -863464248 -1696613357 -692826233 -674163997 -550576007 -23914726 -355357893 -348085344 -524922180 -504257384 -1083381826 -2031990316 -228802771 -1492444067 -898437109 -1074968906 -222480931 -467977890 -1219281916 -1182202538 -759354122 -2116897980 -1342770011 -29928554 -498033680 -1708287401 -1477471864 -516207987 -73703629 -1786311931 -723239257 -724750379 -352374069 -1738562904 -1364226446 -2018462550 -500906191 -594455897 -926335035 -1803976142 -1252890248 -1249239301 -17315188 -1106072371 -1139890965 -445833868 -559375093 -1881265132 -1021338743 -803463130 -427653574 -2093335356 -462739491 -1224339450 -284830596 -406777809 -1274187462 -561745950 -926069438 -1635054657 -1162873187 -160982562 -1952007961 -290125308 -1348172866 -641399365 -1778703262 -1693358194 -1817876514 -800724929 -1651349601 -154090179 -2075843818 -687719964 -752446794 -1989553222 -2100618364 -461687068 -716135265 -1587041067 -1652317329 -1386309146 -1647730519 -1605204768 -1986962162 -1502345884 -1962034609 -1304273778 -1563801917 -1913947033 -550235218 -738724944 -1147170501 -386427541 -697133059 -44544581 -1336463711 -1414126804 -1027673479 -2044672379 -775354559 -453303117 -1540991510 -791525750 -1659570732 -887685488 -761101107 -1413703817 -360981911 -381675402 -284827825 -360205612 -219319991 -1029150485 -1098908457 -995072599 -1730012204 -1534015895 -1663965030 -1728207976 -1275126957 -1319452886 -1128516080 -394186256 -101353597 -495372708 -2082487584 -680345482 -1363579346 -1880071085 -280343637 -156385541 -1999287306 -345127333 -201755184 -22698875 -1395386606 -1741261802 -1627448545 -28483976 -1988814998 -430705831 -1853011227 -751843395 -438160817 -447425756 -1544432945 -649665326 -1118272734 -32961794 -2085574479 -1022182219 -2094862380 -357628095 -1996148359 -1275936279 -2036825858 -2042862226 -416884146 -1480185308 -1023904708 -979963945 -1201934772 -1686529322 -861658101 -1405471786 -1591673949 -60270164 -1495848611 -136549648 -1477398940 -1438057966 -1659271224 -148821826 -1577464474 -1759792303 -1684450037 -274853458 -224743909 -1994627137 -1478561889 -1656388986 -1099171641 -1123438793 -959569527 -2030334966 -324622732 -1325793344 -318411336 -10075828 -1840716730 -276662428 -563331641 -1806974311 -103509103 -215740051 -990641021 -262924756 -1602512213 -1830346864 -2083983620 -54418770 -1935717415 -1372825502 -513908746 -85065788 -1624073661 -1288867057 -321079710 -1907764706 -1870564032 -1556577391 -750422783 -184255050 -103206376 -1570258303 -904760538 -2126141406 -2078208209 -1771333855 -242302624 -751206856 -477268079 -593182208 -994280482 -1301803667 -850835633 -2048362105 -511553678 -1305627205 -688529389 -1471550887 -1934078957 -1752549307 -210500497 -976286470 -1671638210 -1842325416 -1544044266 -559588314 -1169903185 -202558363 -636826446 -83581274 -296166980 -1958822761 -1009835617 -743952678 -962866312 -1604825639 -2057392000 -1953143653 -50347929 -89085785 -468686536 -244593356 -596833934 -91813601 -1217933461 -2141039470 -1214383158 -453155418 -1206098064 -792017615 -1336411199 -531557620 -356947820 -1300184669 -1557623658 -1155163076 -1573649452 -2065226959 -491313452 -430565049 -1634371800 -423513823 -1236017003 -1128451990 -1464509273 -1697273044 -1042767407 -177766282 -568148597 -1161175217 -1687971830 -1483569940 -2074839910 -994907384 -1100727346 -1500368964 -948194874 -1982586578 -976349594 -585079631 -105738604 -1179741359 -196507962 -2026951895 -1447406904 -2020565959 -1493162902 -94995072 -1001825383 -1407419601 -2116345949 -654719582 -165807446 -1439454763 -1512918286 -1411252322 -2108378386 -2035358002 -994926551 -1422867115 -1897192460 -276484564 -1868938687 -9207740 -135663596 -1617908505 -750305221 -355874163 -435100646 -554739287 -1276684982 -1735375297 -1477206772 -355774037 -899766611 -1945072550 -1838273216 -10711923 -1794147160 -1413430593 -63873437 -1926515806 -1340205623 -2027416025 -658105226 -1233751332 -1704025139 -708594781 -1555661652 -391982939 -1724910424 -1687745315 -1971499629 -1469075040 -1124707721 -811605953 -1992609974 -1935841700 -1314199850 -887569555 -960098823 -188794603 -1237546002 -1056534419 -1779186737 -1229187931 -168872177 -1408781152 -1377613489 -1528711316 -556735304 -464004349 -1007971386 -1624076966 -1344414192 -1893874857 -352105765 -1524144870 -1117888674 -20516315 -1220322685 -1494537945 -1730506303 -1248403200 -997351210 -1371921635 -355001606 -802420676 -86998372 -1892758244 -912543897 -1944553652 -1707089118 -665282306 -1599850660 -47298533 -377494741 -887418749 -572986028 -859499448 -1632212814 -644658120 -714023725 -458126639 -1005547178 -1682602403 -1433923525 -891198041 -1814520909 -237646516 -1952894639 -160136925 -624288784 -1963977093 -1739347661 -1668735463 -300496821 -1716016450 -383095940 -537489874 -1276093036 -376473463 -902668579 -1326324845 -661414055 -1010665513 -1807112868 -284752955 -1249349169 -1863866664 -663063059 -808188330 -387195035 -711502835 -1039201349 -372571592 -1895915739 -293471187 -1747786397 -1764650713 -1735368321 -1359961140 -1198424959 -679160700 -778301095 -583609788 -1171891067 -1400636432 -1928257857 -554085722 -1029636262 -673427908 -1064030066 -1056990693 -857849267 -1814908158 -303689518 -1688583754 -1030758373 -205394662 -1061863505 -1150821965 -1627040873 -1766675260 -1402191398 -145284008 -99415817 -139358953 -1448747841 -935374001 -1250538767 -382603780 -855691342 -2053884682 -987708496 -368100962 -1919964974 -762038196 -2130973111 -1680295558 -1317485256 -270813375 -1042545632 -745361151 -1012751906 -365898020 -1402340779 -508446828 -628406783 -308225935 -622732981 -1585399836 -1985435323 -1610566575 -1908539237 -2003204667 -1759704250 -204543266 -1784836462 -1694835538 -877793358 -2007796663 -1627969730 -198105683 -962561331 -773977266 -927459783 -1380262955 -961129791 -336404603 -1775203717 -858563848 -939969143 -1171679069 -2132553340 -321916950 -946871857 -1221476329 -1556479830 -1258198703 -274129312 -938923969 -785308827 -250960927 -242417381 -532444108 -223766107 -593094452 -1666849037 -807589744 -1064178368 -1402018760 -1538724436 -1343518678 -1875356588 -500687497 -1213833133 -1946303478 -1051643642 -1184276284 -1253064792 -2035316662 -300125171 -1912145841 -342372332 -1143093611 -585614015 -497195904 -512688051 -1043681393 -506743455 -2064587830 -486890584 -1257350218 -1046027446 -1282150580 -1253884062 -772402023 -222154446 -1423195436 -972832566 -1603932151 -2072924713 -1018446110 -1579104180 -1401043634 -182167283 -1521328406 -1026218460 -1212488163 -816229158 -237921470 -131595576 -1966173069 -2139894294 -1294762949 -629088792 -1033332963 -526855852 -791227983 -949968057 -1719702201 -52487234 -1684646568 -1430466328 -768146531 -1714544400 -1412155354 -105768034 -1674371369 -533888495 -877258299 -1604994638 -602790899 -1426276594 -1218247544 -977381510 -748622667 -2141960143 -1655748740 -1075975354 -2105466938 -347291700 -71049354 -125584946 -1877246068 -44923152 -1256655567 -108446324 -1591234812 -1269629193 -1260330159 -1737771952 -955598064 -1853949382 -1487028951 -80895671 -256393946 -1360854540 -1181413230 -378356448 -337742769 -643439562 -1708555889 -1694982386 -1198384047 -2139036363 -1907902161 -2033286570 -540107279 -169662284 -1803207619 -1221226069 -1645327304 -2016559556 -729540738 -1407042843 -79141537 -839434866 -1561715719 -1210955599 -828229774 -68811764 -1173115462 -504206727 -231989627 -1366841684 -875611029 -1836615159 -61035335 -1471175726 -2071198971 -2078671374 -965813422 -1744779528 -620327311 -1955493439 -888495585 -1491499504 -55552297 -1659552881 -587663731 -587034364 -746681430 -1727844589 -1610132589 -1056987476 -803781148 -1477614806 -771150534 -663215293 -1219301521 -1511703773 -326285154 -1348832487 -990231277 -1966291936 -1990208316 -225881340 -1784077131 -1817661303 -1478640946 -837616338 -1062486681 -887122762 -2040783460 -1986285983 -875223666 -1768656159 -335422539 -302039598 -1875665725 -1401385762 -1637345285 -1006752337 -462873246 -1324876088 -2081958920 -385024222 -733870743 -1166992880 -681186109 -459611806 -196945183 -785390654 -1626227316 -978124643 -353557116 -147197363 -44918597 -1180099682 -1923875329 -2058865271 -944605586 -1786965278 -966624051 -336635602 -1362636616 -1067993504 -1098500102 -574301055 -1486321767 -1080156065 -1503716364 -1373371852 -1106478608 -1525065283 -1554884436 -214215509 -1137467391 -515014943 -1497049591 -994067685 -2020291782 -1180037357 -876379054 -1859909452 -726194032 -993529923 -1572060436 -1128438811 -1243009820 -545126724 -779612166 -1143943615 -1986729361 -1884626771 -1685830594 -2003038487 -1114200637 -312704219 -727324524 -666356144 -320493103 -638595445 -1897860056 -759352301 -2086292433 -203933215 -121643893 -64477707 -1345063461 -2068720705 -1228644005 -1764526130 -1788985487 -560538362 -2104974392 -659005666 -1335060883 -1459116725 -1259031982 -1394147583 -244355064 -886827584 -1374694108 -1854798730 -729635258 -848156836 -2122977513 -442266086 -725205135 -1553007220 -876100902 -1479976082 -1802410620 -710965758 -602482798 -542990381 -1381317364 -1502712678 -1684290426 -1887238675 -486944535 -16621028 -176743486 -557885401 -466331805 -1470818732 -366168107 -1646725694 -1896980169 -1003477021 -1249212056 -1706892120 -1649304214 -137009222 -611524570 -36713448 -715113847 -1599937917 -1513826932 -1650480115 -573024506 -1506199194 -152622722 -1034614136 -584693993 -66771679 -1245145219 -2075039365 -52180275 -820553949 -2057723456 -1081473704 -26954920 -2059774570 -1194808350 -24355353 -1318524941 -564929994 -753205771 -1860777779 -287780392 -591875300 -503914196 -1757872051 -1623029378 -917471852 -1016831104 -205502102 -720123938 -2052675121 -2133453239 -414133914 -354192671 -91552013 -1116391239 -622930034 -602302313 -1804546280 -97781379 -586646898 -676991309 -824568557 -811763408 -343988865 -394876331 -962025887 -364704546 -670976084 -658413391 -2118113193 -292018432 -953653229 -1379362242 -855231929 -774981332 -622927869 -565915158 -130987943 -343619826 -634888799 -1877286497 -724413355 -1130462642 -897799085 -1089117773 -1799287430 -1906602603 -1666451734 -572569164 -295717141 -840829629 -1381177343 -1296863378 -1571260643 -571219742 -1238301704 -872716051 -425360147 -54929766 -1934092599 -1981830401 -1152184637 -907149060 -1467841367 -1865202080 -1632563301 -92842188 -1325525994 -120027180 -809669727 -1662714297 -34491268 -2021640233 -221133197 -1438932669 -1328019016 -1218058641 -2097456083 -1000321476 -1901058416 -827097646 -368489291 -2004159536 -628318357 -969533800 -1996146811 -1249919043 -704320747 -588932565 -437490932 -2073570443 -1133811985 -1355632064 -1454088625 -503617515 -1066521778 -2133004984 -1470246717 -1489730237 -384252886 -654928473 -1529154836 -1568525003 -1837958496 -1163663824 -564316739 -1183647221 -1417821186 -842125990 -1694280200 -134162180 -5929910 -879749608 -526752061 -1194296293 -8147942 -1650991433 -576811544 -730437450 -1445695898 -1180975528 -1611833522 -1727280996 -727759626 -1536664517 -1082198397 -1469451936 -1016747852 -953769385 -1184112487 -647612260 -972130824 -547172592 -804777290 -1039904224 -1448373482 -1085973229 -488543950 -1128185169 -1275016020 -1602418374 -253194791 -1279747630 -1669692705 -1356477586 -632391350 -704850447 -901665877 -1653781507 -224945028 -1079866876 -938284135 -769037024 -1648674722 -294555413 -643019956 -1098688788 -1598063010 -67036041 -1393310059 -1200474725 -769839510 -103671395 -795898048 -2130339220 -1763907756 -2133391904 -1530760216 -632859252 -2126428420 -459601566 -24841503 -899313403 -770456635 -1885756682 -1348891948 -1989592304 -609985891 -2093422906 -1934192341 -1510710548 -813021755 -18190424 -783778294 -297096560 -402404645 -788864112 -2022577453 -940604208 -1107798289 -82623733 -1382644569 -186726996 -847013505 -86882572 -2093991291 -749620801 -1737729105 -235468535 -1854789971 -582422745 -548612189 -1377763952 -1910059310 -1781267814 -1846110718 -739105570 -1101900742 -1894282713 -764490616 -399123111 -1470696996 -467634802 -1895452841 -1103479089 -504273331 -1351403055 -1244094713 -1599054199 -1693564035 -982478907 -521228166 -695989849 -157966934 -660472046 -210705779 -131493750 -254783487 -63673891 -720229831 -1684935125 -1985276533 -1089266692 -7201769 -781047351 -1642777793 -2116601119 -648394478 -1233966868 -1031571397 -984987148 -1875045360 -1712329442 -692578247 -801230589 -1560042633 -1008686608 -759911238 -742928357 -926972441 -1779440549 -1200038921 -2035216270 -760320474 -1178506868 -923254195 -1563905790 -1512256897 -1032705634 -720755584 -1931331208 -668288451 -584522147 -1473523251 -723862353 -459706616 -1790416853 -995186607 -1498661013 -159949828 -1774716799 -1264867610 -689299617 -1531871001 -2121953571 -412742068 -583757066 -1499708766 -589665323 -2015536403 -713277443 -800266947 -396497068 -284465235 -708606423 -1751328746 -1171368240 -1203417631 -839136771 -846600348 -1732887461 -466336413 -1548265388 -637025417 -1280203224 -736926475 -985073076 -1171753609 -1237863473 -2097302222 -561863296 -750820013 -418048719 -1725810896 -1789592690 -28380948 -257223402 -269136003 -768241839 -1168902309 -560704607 -604086813 -1731866722 -490645216 -2084424479 -1021485042 -1114826776 -98804157 -596607568 -582247533 -1898791399 -1380048573 -1652978811 -1766418885 -1388264067 -144349414 -1571563635 -1368638992 -1018195527 -1662522993 -1114212234 -507614998 -1680225502 -140054064 -246576536 -1715885489 -329518060 -1997192454 -1644171768 -1922818827 -1482105333 -1081510178 -639973438 -1435468290 -1084259632 -1752890229 -1645409257 -1246459980 -549907375 -1671118584 -1698905822 -567579842 -192044520 -24326199 -828533663 -881306893 -930237292 -817216484 -1799524023 -1588053860 -1494460104 -422232616 -1177607424 -838684416 -1833804451 -66106213 -798076392 -87061182 -800922267 -673042073 -1021752162 -1309345322 -901896045 -1227247789 -1920643935 -1435917488 -43995830 -703540242 -355886912 -649373089 -501612769 -1732494108 -297703483 -2013024918 -1452421988 -409736867 -1614951387 -442146876 -869126312 -222158890 -1497885744 -14905627 -1410769937 -443384632 -197254934 -1696408417 -1543366947 -2060789763 -1077287925 -543527618 -1820725035 -1431177142 -1977379194 -1502676233 -1071759311 -2113392588 -409705136 -1081648470 -816763435 -627580421 -1451945330 -988480449 -457413151 -1898856244 -322414841 -724991306 -106666864 -1748621650 -770362355 -301192722 -527122675 -980754850 -1609773225 -1459607669 -920393202 -723836673 -28102856 -2025782099 -1113998355 -1207917939 -1313885682 -2049798920 -1037783266 -161170728 -819546629 -160081745 -1844362171 -1416047199 -1091497539 -993825299 -93993927 -1355450544 -550765632 -1063458454 -39842397 -1763752162 -1665807193 -477186812 -1374811386 -1678406429 -1779148858 -592555578 -1199928307 -176126772 -930191438 -46548306 -653331434 -457524127 -1616546229 -1476852606 -845757016 -443908419 -410608455 -1231345374 -2069278326 -2010645564 -117324956 -490547546 -442884789 -386328221 -1175345466 -1476661956 -1936469760 -1132586035 -78443237 -1988008648 -1910766910 -788999132 -2144374946 -1439153468 -744020515 -2103002771 -1881709871 -2053616175 -769878641 -761346112 -1236535558 -1253871287 -557692598 -1520859078 -1728157352 -424289389 -1386052883 -1635685572 -1029243357 -512324514 -1376165975 -822663635 -1007994059 -2005142077 -2109499415 -1549139582 -297218446 -303459000 -2109235022 -1400453725 -1004984955 -823255030 -210151589 -1554640655 -411955536 -249415624 -40313624 -1093729763 -2003592068 -1828301916 -2074280936 -190165954 -663522142 -2081545370 -2024423960 -1910076299 -2066801937 -1192164934 -693619228 -1117129080 -138921839 -544623784 -916634174 -1970362487 -1684482269 -816576682 -1783790044 -1287557388 -1931792944 -1986234462 -9310219 -1858028149 -1319389216 -58414390 -370626051 -1409462857 -2097611189 -1459704371 -398180069 -653375631 -1200343106 -705202624 -378253775 -759601305 -1976335367 -1138945020 -1727205429 -1605188704 -1716974514 -1452892059 -1867769223 -1828862762 -763001423 -1140060124 -1141405534 -131391287 -680171493 -586829870 -1604718066 -249412589 -2136788026 -627324201 -1440623084 -1821536510 -37251938 -1175580689 -1135087623 -1320443460 -597224122 -207252376 -72207998 -271561831 -736943742 -1275279545 -1736515755 -1317531555 -1048960668 -1188688853 -253184330 -1103929603 -1633611188 -524809821 -763323318 -107698448 -1906584762 -1366598047 -1075771264 -822809955 -1319710652 -1165821948 -328684808 -877627972 -1375637808 -535695454 -1182047154 -295298881 -253584750 -1391337602 -261644631 -1562287808 -88637187 -1519034538 -1127884630 -518824341 -1097092367 -536819027 -738585742 -955086134 -1839876460 -1186630067 -10906380 -767418665 -218718773 -1661897794 -1343910876 -2024577433 -194529716 -990826078 -1225694108 -1577731132 -1946546015 -832995707 -712952756 -1785703479 -1234404728 -1948233476 -1276865323 -471399190 -739012547 -1685946828 -1809099678 -1464813920 -375024232 -167763279 -2098885289 -1398666601 -1033562945 -97196032 -1486138104 -140815671 -162003503 -1931094172 -979391693 -174029996 -49415558 -1598595564 -427736531 -1340110008 -420414720 -689000410 -798066246 -2064021007 -1697714658 -2022522964 -24807585 -329253577 -1846993967 -551485984 -285512636 -1132405854 -1345108464 -677602479 -359084512 -704345114 -998468734 -826794680 -1718990670 -978687599 -1225224020 -119413057 -1225522701 -844377330 -877845934 -743957848 -1049758502 -1712983009 -939660581 -280644829 -923552191 -129873621 -942562795 -1813515293 -516127580 -869786827 -586016260 -815276678 -1409459286 -2037593392 -2057904282 -1973132639 -997786699 -101250670 -912962266 -386146847 -274476295 -328216309 -1593499867 -683702932 -1957666674 -906834231 -471477658 -2057824223 -627581026 -1462113565 -87314334 -760680637 -789315468 -1018583157 -1734969462 -1098788868 -1132623923 -715226853 -1351746112 -567402771 -1510979517 -1038616444 -1279491492 -1659748633 -1730183948 -125550009 -1290059909 -1041990451 -4368672 -409826306 -970669013 -1748318879 -2124141099 -671303165 -1860696464 -1068602834 -602091177 -403467175 -1466936646 -1691941762 -1634224007 -87040519 -453639226 -747524532 -865474374 -1121062687 -1826545278 -467753481 -1742607147 -616341843 -1543725820 -1649917333 -1851765667 -1292552945 -2140257210 -951841220 -989698037 -1594061844 -1538915783 -264520413 -503432001 -96071627 -1915616092 -684822420 -1445548667 -853947758 -666755805 -595144589 -1763763244 -1852062367 -1984222551 -554860394 -1164646684 -2050859230 -1678544260 -1948190828 -560080387 -850239508 -619223818 -588955764 -827396525 -1096781350 -1752007249 -1837549926 -739278775 -1865473530 -1899856157 -2095567103 -1464489321 -1361939780 -93689087 -526971958 -595137878 -1650971467 -241242982 -121672938 -552637022 -303655479 -1116490281 -140045281 -98960655 -1079385807 -1442892040 -1301174356 -1011423891 -1668270032 -1067932592 -74752118 -80913731 -559928366 -442706208 -1679884648 -853771827 -2004850782 -1508671644 -904900579 -184843199 -1398292031 -1180615896 -2009949439 -1302453963 -1042942270 -969205076 -766249837 -2049063047 -1554867637 -2079358363 -1774619310 -1773853634 -1790038984 -1086793265 -1385987120 -530406831 -342989920 -785476892 -928145735 -24156337 -121146676 -297686176 -1722146169 -326068117 -1996058922 -1920252267 -1295604353 -1885663938 -1937627187 -1258108801 -910630045 -1990697793 -2010070338 -1186919809 -585632880 -814259959 -1501332229 -2105404200 -1440337781 -1321416283 -1915074754 -176489242 -579773787 -1124731670 -1214116796 -271376578 -1918363865 -1769486644 -1408482052 -645607083 -1630859337 -1519090298 -2065042950 -1693641483 -136663796 -1248400729 -955821113 -1307766631 -138640172 -105613809 -1229795441 -1789358159 -381585725 -925110133 -544401051 -1468127937 -239133129 -1168595566 -1847725947 -2116455609 -350291555 -1097488458 -751469523 -596945054 -1959407441 -99134142 -1847698169 -1649590763 -658070971 -658027547 -2075684026 -149579467 -1426234879 -517143539 -765140564 -585380912 -874401077 -828304718 -1328395572 -1104384392 -687315323 -394096448 -739434188 -182532527 -1217533373 -1859211395 -1878851915 -1264589917 -317080660 -1267724413 -1458947404 -560737582 -1158297638 -569141811 -674253739 -2058869801 -1020741296 -1499589636 -734931060 -1807871523 -150565658 -821277840 -1339257611 -1126563870 -1943131138 -1421216437 -2071534725 -1279237911 -1692780060 -691112964 -1944022972 -1377884946 -1796121821 -241819668 -1224099952 -554555004 -326924248 -1352667110 -1014230628 -1596458557 -1018281881 -966391024 -715118107 -1671535737 -120061705 -1389931402 -249961348 -622362304 -1797882438 -1915222176 -506727149 -1790532888 -797903205 -1471274567 -1584936011 -632379489 -505502620 -537226808 -1149710068 -119257170 -753013539 -777418202 -777212666 -1617736408 -5354589 -1947747796 -1703976151 -2032737112 -2042784908 -1264884167 -967573116 -1255185528 -1171304615 -134072256 -642060889 -12035248 -412950318 -1936331169 -950770745 -178093888 -1779255345 -234798940 -1338325041 -485245409 -1524181404 -1731915612 -1312339446 -1832014232 -42666538 -1984449715 -77838448 -413254513 -606485593 -1245972889 -953303526 -1944354862 -513509235 -1960418999 -2068003919 -2066523585 -808870164 -1109360838 -574581012 -1896591772 -918139583 -1501967786 -2049792464 -929277274 -1862063134 -415905407 -62904464 -673372124 -126468378 -1692702163 -1529381732 -1086998781 -545127238 -788250964 -307333605 -657728200 -1339526291 -1347301336 -1025980184 -1502750725 -176262708 -1067384143 -1594388010 -578336804 -595678506 -2147371675 -265570243 -968055635 -774947773 -58901756 -2119335472 -1507508762 -687695628 -343431642 -1767047605 -1217742872 -1085293794 -1954181787 -318396891 -1914782360 -1704674225 -880364948 -131353206 -40144126 -392460524 -1161746931 -559350793 -1472855032 -230523855 -353931797 -2009989 -1569630418 -1089315578 -828828771 -1546219755 -615809938 -1193933073 -345960343 -1317252372 -651699281 -943216067 -2055639562 -417205598 -440378131 -1206600155 -640726464 -1206674390 -1888394109 -578970950 -516352093 -348209524 -464531793 -1282788106 -1231365309 -256842224 -305128298 -100355450 -899385255 -1978073199 -281916386 -819774220 -1837720035 -1450817091 -1353520399 -323073322 -1054663238 -395018728 -1207808619 -1624028089 -522938453 -1523496047 -950538748 -573887603 -979884944 -2021648612 -361959050 -1772065046 -1794011526 -1281313602 -71696698 -268077319 -154809027 -1272620272 -2139271031 -1556999943 -1409803306 -1377086591 -1263071218 -562110331 -607769964 -1357559816 -1641561784 -1006490679 -360154534 -1508335692 -1701006256 -1509835728 -1142307544 -259087828 -1539772727 -1782276339 -1616521217 -1056475922 -796027658 -13727196 -932232943 -2145868136 -765394034 -550483908 -623490480 -1431783647 -1433490494 -55696965 -1943504310 -1250667300 -395374264 -740851230 -376437304 -294944266 -736021386 -805627782 -301737739 -1097288806 -1690885653 -1064069220 -1715051971 -1352966563 -1752169905 -276342024 -1620752554 -1305596530 -172974664 -1639803457 -1519059848 -1553269800 -994315668 -1893174769 -1470628631 -1466107894 -648008780 -1193991523 -1328329493 -2141278286 -933196376 -1158417391 -434346835 -770339692 -2067779328 -439306295 -372121679 -776678889 -1236480957 -336192280 -354174703 -1937047484 -104975068 -1231893689 -547390296 -168761124 -1689797028 -2094901668 -1017941511 -1688243375 -1752459461 -847942422 -666805062 -1423006988 -2100554324 -1532850435 -1403431633 -1662560830 -1750138693 -497500292 -1333569873 -22031772 -920804720 -1197768758 -387808728 -288422851 -652265478 -1869354458 -554619996 -1419244792 -1146351915 -1660838168 -714645870 -177099419 -97600391 -1839748876 -1189809426 -1906785565 -446526774 -1467628000 -426626558 -2012146620 -1723253031 -1749228575 -233532595 -1529701096 -12098588 -1477505698 -1084856025 -1039049145 -2109446258 -655729883 -2113550824 -921693941 -1110520576 -738944755 -546566684 -1358699769 -1473399032 -783597267 -1549543065 -636106286 -864754036 -1899243803 -393668013 -2128661731 -1487637544 -1719583634 -207215312 -1596756997 -1739195667 -1261655952 -398054786 -695227897 -236741552 -1775550220 -239788828 -1451510424 -121466248 -1373765486 -1279834305 -978955783 -1437625214 -828459301 -1778988406 -43322461 -123645694 -1496492409 -219444399 -972592094 -1857286541 -1740085442 -1183718848 -474172528 -105864079 -1141116037 -1708266149 -1120289500 -1716493251 -1954239406 -1286799424 -2077593878 -36207326 -798655981 -1238278917 -489734942 -1817834890 -101150361 -1374552550 -1623117071 -243844456 -894973516 -844419824 -1592042592 -1961085771 -389539041 -1452506031 -1822247568 -1250585509 -1168196574 -1584318344 -988668455 -1469746346 -1669929428 -1040113753 -674960091 -1045625983 -977212880 -61941904 -1675495380 -97788549 -707153088 -947447518 -159192521 -1931559932 -217485425 -260370781 -1627527328 -1352589857 -1863323104 -117384727 -1495118743 -754560054 -999892043 -1126028926 -1542261918 -668436536 -925903095 -986811503 -324725140 -899480953 -1438985838 -74146752 -643945604 -1623669195 -933457936 -1259489017 -485600240 -1045375080 -1055253453 -1724827645 -296478662 -754811194 -925834729 -1985267788 -942289477 -1514826961 -1278098342 -1867396700 -2010319642 -1082004843 -363873505 -1736055526 -24913693 -2112610733 -153970033 -56549996 -1248010798 -844701737 -2035187089 -269875407 -310502985 -238406685 -1844153140 -50346829 -70598085 -1131041451 -2035907360 -1638051869 -2144891390 -1529093188 -532407067 -1748701667 -2115208074 -857807280 -1109232649 -567592136 -398669778 -293980206 -1712934142 -118352912 -587534862 -568616728 -439118346 -1508230130 -2074309369 -668039385 -693437179 -204915184 -1593211347 -129514586 -1350712491 -375203800 -1038279008 -2050655581 -403299164 -790659416 -2131480723 -1621795854 -1660470454 -976927613 -1709910376 -837525278 -1679524908 -1250072588 -1137467915 -523821811 -1337708424 -859181725 -587209647 -1545179164 -306466177 -1111251333 -135875772 -888983243 -1097632922 -1031992324 -1617056296 -1459614087 -1028260528 -1173786687 -1048067067 -1202322375 -1758522002 -1809337600 -1168601680 -1950483945 -445792160 -2005872384 -1498867282 -1479229264 -2135542376 -1166521121 -1342267184 -168849753 -1031900984 -81904916 -38905485 -1049457707 -952488738 -1135114828 -1777677895 -1639884201 -728640609 -1310960269 -127022863 -274513323 -950545905 -694175302 -1873130210 -1736658097 -1562389902 -1804531045 -1989210381 -633456971 -1434873418 -1823664163 -1436977557 -680706337 -986018390 -2027260478 -191310444 -571612749 -1401119412 -1455768129 -813753832 -1584790328 -331368955 -892930014 -859020062 -17623253 -1988753532 -1545130416 -1634642188 -672957645 -1750254413 -294922685 -373309519 -1413352946 -906343955 -821343514 -295556882 -294840263 -1135526612 -108596995 -1976078662 -1119471379 -851235486 -178756888 -37394463 -1423514717 -2044021039 -565701414 -833559829 -1604216622 -411577869 -344417296 -1153065207 -674503521 -1961988581 -530681182 -659039883 -1910146002 -1090816611 -286886638 -602937351 -1740211711 -1158438284 -785495486 -1240655093 -1771419328 -1678847335 -599521412 -163099760 -1028532748 -1454020933 -1513401718 -946359358 -1197840224 -1588937790 -1318286085 -845444496 -1633835720 -3551851 -1713901288 -1340790205 -1115067464 -1996563726 -1814558507 -869556102 -1003188479 -694653956 -1327933400 -1926594176 -509886566 -1203763232 -205201837 -2116021024 -1636156048 -346598901 -1312078443 -1740304105 -563820595 -1434889601 -2095651844 -741247661 -596802180 -1705607770 -1538070234 -1085763899 -1265301934 -1546532144 -1571164567 -1103954057 -2044609566 -1867140115 -1992862841 -1890810075 -381922219 -138113850 -1997138190 -732156720 -276695730 -1123038355 -671859002 -465230688 -144214489 -1451362807 -1935434623 -914907652 -869994644 -1931312932 -361123719 -617558811 -522470526 -101497899 -773172775 -291281428 -1451728883 -1645623014 -544106585 -814005169 -1514043993 -1003657048 -2127442198 -318299236 -273494775 -1011678845 -1658314616 -1250980346 -1361771092 -1553517165 -856811929 -1560237568 -2137475506 -1444382326 -578607394 -848517342 -1739550914 -789841340 -1266979273 -1820281306 -415874780 -1695640122 -1515534764 -289241481 -1526078006 -1395850721 -951708019 -898472477 -1669398882 -713161719 -1002777326 -226856426 -992478357 -1078259850 -1846285564 -1530258645 -792890043 -966923066 -1067213413 -872412547 -1766819360 -1676596451 -1423619670 -1660482463 -1178762876 -931013357 -975639057 -1527986154 -1253839452 -22641753 -435337152 -234728335 -151666806 -919453 -420861042 -1747883323 -1246202348 -514853645 -933597752 -1461892882 -673262447 -430610686 -253909212 -402119495 -291315356 -2021956779 -1246354525 -925008837 -989402826 -927417861 -675679901 -258570771 -1439530316 -635253910 -1571256133 -495420172 -732731385 -1345155797 -1473128210 -526859207 -847615468 -1614140125 -1839651971 -1708610738 -469345882 -588803343 -413140425 -836492224 -1496855506 -2027048384 -921613880 -1912418996 -638321123 -1582297496 -1384014471 -1735833440 -587281585 -606757483 -1520660825 -543602828 -937295858 -1338934661 -2141194161 -1666791148 -1982132968 -1942460912 -894146290 -1973617971 -564827035 -1170257505 -1862647309 -1644200044 -250569912 -113079217 -2146856171 -191429103 -418430915 -1706928127 -106990216 -740747773 -785119152 -1358060496 -1466555956 -1736135873 -1375305722 -1396776993 -1487175994 -404763725 -1783216026 -229971450 -1807079197 -1866328105 -1230312653 -1892205655 -215115162 -1225549833 -1300384854 -627165659 -923491337 -1254584090 -1800354384 -511545658 -1170835065 -832279994 -1568866247 -1130795463 -49070691 -97383189 -336718509 -608570918 -1934291812 -1035035998 -1232477686 -1772693287 -1615439778 -60599825 -594010097 -2023709023 -631548375 -1569355151 -757870403 -802352864 -1094765735 -87820649 -680382254 -1981606350 -1681526774 -535696098 -1192870862 -1820732889 -1563179320 -39893842 -480904630 -1583152749 -725866113 -1924646231 -2130513303 -394753443 -1044130918 -1619459189 -1042847445 -1522964948 -614292443 -1459198372 -483789464 -676433906 -46230924 -1761543101 -1045340965 -481882648 -840832099 -1422690633 -1078543133 -164972004 -283082951 -1098879352 -505904864 -855290775 -1764006054 -1638002743 -1319230708 -1689337728 -817897509 -360609316 -561922178 -1740449787 -864814322 -764986958 -151208517 -888390818 -1878164182 -443279621 -579818704 -1879651689 -1821489653 -1397209986 -174554757 -279139097 -1386518231 -866854820 -699898492 -1426020425 -1207782455 -1184289741 -1479236591 -111203618 -688434836 -2029882263 -1305977999 -141873206 -756125072 -1533345805 -1139180635 -1392219440 -50310368 -1605281705 -1132558674 -1766070557 -1976366312 -1659037635 -517858797 -2049063535 -1563069453 -340842820 -1206389191 -1390021810 -1769448604 -769143772 -1295304711 -1144548138 -1409529187 -1064935852 -1248150466 -1044618166 -1218701737 -21068673 -1913869003 -1386268655 -967198282 -1397801431 -1525036284 -1067498243 -1364583063 -1569673528 -1813865348 -2104534671 -1858549407 -1490237834 -325501077 -1055752230 -1517838096 -346636759 -1948357849 -1219718687 -2080561794 -525847657 -1026363794 -1507633054 -629187625 -546935547 -1115729269 -234618479 -452800661 -1686148106 -897011730 -740944170 -1938479884 -557001751 -647211784 -683781633 -1132910734 -1240692036 -244836682 -391446722 -1302645893 -2121226133 -1071593484 -1473821846 -1447381224 -1588962199 -1728528148 -213806820 -711082309 -413871808 -243944423 -427635238 -1785162204 -727130391 -1698530107 -695388778 -793184872 -1627146775 -1399086527 -1648808286 -391881914 -26983249 -388416426 -1912068549 -1190809335 -1532386952 -56123793 -527267918 -1274370304 -1487287797 -136353099 -321483544 -105068156 -648940058 -1813595340 -1861477509 -1310724267 -455504543 -2033136293 -161885387 -2093402207 -1586304248 -6018631 -223399808 -879158100 -1322695340 -1937349283 -882343567 -1173748034 -398426096 -493384126 -872644615 -1372218942 -1056873061 -1028291890 -1700887821 -1666782330 -1833928842 -9262103 -1049342537 -1164310195 -690455901 -1638183366 -59994175 -1152268782 -173890428 -1998663476 -597834758 -1880277040 -1594345675 -2014296106 -1342442234 -963431456 -365782612 -1610162170 -1554155343 -845251340 -534946475 -1478858983 -207196903 -1287356934 -710246213 -1393991865 -1922169932 -1313545303 -624016361 -1680331026 -1913595932 -1091731652 -633595196 -1610537346 -1417287434 -461290714 -497064528 -452135266 -1240272576 -1784907050 -733724407 -855007375 -1295869548 -2047829009 -141743794 -728581235 -313061451 -288871807 -1755418029 -1180470917 -1720771033 -836477482 -1249086712 -1747719159 -634581647 -1009950127 -521038601 -1804938188 -242128194 -2114529140 -184381777 -85623418 -258742836 -36459477 -741590544 -2064669467 -1858963643 -2009851345 -1801271752 -897364105 -220859854 -1139824162 -1470559494 -304122335 -373004485 -581613802 -1985092717 -147354827 -543932398 -33927907 -1143166494 -1810558596 -215044982 -46034573 -608955491 -1955359282 -781202533 -2103438020 -607005226 -1389510132 -1759611046 -785547285 -2111240886 -753271621 -820035082 -1927060375 -1902842218 -742686802 -1162124850 -468584485 -676905846 -1535675563 -1640717695 -1852272385 -1219027783 -1205956501 -560251921 -1585727799 -1055058523 -596122782 -1024383819 -442447934 -1634040824 -1303251132 -1556059771 -640718031 -1064940959 -1333983815 -536704025 -953230775 -721628805 -1575171026 -1868517413 -1518790210 -1316431228 -1883117602 -2091030975 -387713670 -838266692 -1255568124 -1159144646 -1919903385 -1874395520 -1527886797 -1731430000 -1740593150 -1126832616 -17494219 -1967562741 -1873791481 -2113221559 -1830188027 -1561893808 -2056613775 -1758417960 -60703706 -192454417 -471014137 -709877717 -1643130534 -1602668165 -156464834 -1184481110 -400608080 -658767215 -1622382220 -778105581 -1592573284 -143007980 -500918867 -807501429 -1727351810 -1917930524 -928775398 -2016967790 -1148278635 -1830966503 -1760838058 -2080585146 -918324721 -318614858 -1283186435 -1483629871 -934616580 -1405465902 -1492781561 -128247826 -1535113641 -786429229 -1901688165 -673870854 -2066172547 -1351425439 -1620302601 -185687400 -554392709 -1894199477 -1513026811 -1087748350 -258231539 -33025386 -1006881576 -487509472 -921582599 -1386679229 -1425264559 -1388844475 -1309332082 -679371365 -23980456 -1460082003 -302590152 -391408568 -661391615 -633516433 -286767605 -749833367 -1015358573 -1226477349 -1856760737 -1492832202 -979371113 -1975625583 -2094507214 -830804074 -385398924 -589036316 -33750342 -306315186 -721029243 -88267080 -1741097130 -1007289888 -907558315 -1903739211 -786062624 -35125224 -1939120490 -586248558 -424541870 -1334533756 -1189627824 -1002084398 -1465717412 -527628747 -896372366 -732571657 -808090948 -897979408 -1972322787 -271506017 -1946361491 -2026668133 -973186264 -1106083496 -1326868840 -1214403432 -793900536 -770409741 -1097609224 -633700038 -1225133193 -740367315 -833212487 -61406922 -1273987494 -1495851068 -177844447 -1881867752 -412154848 -1451768761 -168368913 -1540357692 -876364859 -1621334087 -342003426 -1385341410 -415377096 -1920999722 -973178656 -978215840 -1886305095 -1976134651 -2060478502 -140891592 -1438007750 -815290912 -1648690124 -553416827 -524936232 -740429348 -1875801118 -1529452266 -124980072 -301063338 -500049434 -1227326527 -1096509854 -1483941271 -1873349086 -1120339735 -413309249 -1526433545 -928943753 -551542981 -1243461215 -1689271548 -1853093896 -2141261278 -647342920 -740300738 -1861736495 -1368534675 -1412423355 -315093547 -82570927 -495134127 -220140364 -1932257614 -1206008564 -1435274762 -2126601830 -1226619789 -2103266170 -2013689570 -1885809917 -96128946 -731492878 -2004405118 -460847737 -1641884677 -2138386036 -1715274507 -798161821 -1522866385 -1105227749 -1976714540 -1069254690 -820416734 -1899034598 -1172526872 -1349192832 -604098751 -1932508688 -1130841988 -831016366 -1805906921 -1491238196 -2106199682 -1925101873 -1198553809 -697259003 -13801742 -37643918 -1321137608 -1526351323 -1694522246 -2054745655 -425696178 -1407635489 -1449808271 -1578151835 -427366748 -1567618068 -1627487480 -682864521 -751394879 -1489886993 -871367331 -1379743224 -815945462 -1912293739 -680610371 -1520601475 -1693591025 -1436099837 -961251826 -239963201 -87230141 -1493132533 -1732066936 -1708158267 -1454600373 -514631563 -1496032872 -1085940628 -2088102590 -562470856 -224662698 -629713860 -801432604 -660341444 -163161612 -2068079312 -1186170089 -869990722 -1865395878 -594758993 -1725502213 -896524803 -1147096669 -1293016764 -1345728555 -362053681 -1215044616 -832861789 -609676577 -1189749802 -904684997 -856523819 -1012940092 -1381256475 -479351255 -1245382888 -1774574954 -1028362342 -737490938 -1882068129 -1632407440 -1768253655 -12988752 -1406106517 -1522179631 -300371506 -1757330892 -1117704653 -1222642662 -1831685738 -964118821 -1180907932 -475747550 -807455069 -948179290 -1720666290 -1223545528 -1973769071 -956881088 -1942897280 -1785732325 -1719219450 -528825765 -1687301069 -947508048 -1176520231 -1893584488 -1914324923 -458981507 -340928125 -492626679 -1027134768 -1580491190 -1090200587 -670789505 -1817547432 -1712294696 -108602225 -2063979272 -996274513 -455744332 -1768302722 -837657821 -1759691462 -2137098997 -1558846504 -232699328 -409884509 -1948886834 -1520434994 -1043028505 -271073074 -1112339431 -1243669682 -898009123 -324259145 -1657437576 -1542954595 -1572840640 -1356425557 -1905423594 -1178200294 -65632271 -1422467786 -1628120898 -591302612 -1616165215 -1515601249 -1406654876 -1031109 -149979787 -1711962178 -962423140 -598884776 -200576743 -1691477458 -273117620 -1115285701 -1369505691 -552420091 -952663456 -1924116607 -1819057323 -1319228969 -1660110355 -1367194661 -365644527 -1436851222 -704877639 -1358681821 -1171746996 -1126718782 -251769828 -952714606 -636311010 -10583010 -1774990016 -1561858435 -1462099764 -2002844574 -2588493 -555128911 -1382644609 -187399276 -1408605230 -568376082 -689548318 -1416821414 -1218827162 -2129086648 -39282975 -951481196 -1381225610 -2108086847 -1430429323 -146203496 -520865104 -1036457756 -1505644275 -1563517324 -1425759776 -1122022006 -769950535 -1969668570 -759237485 -156579921 -971264672 -1022141457 -1409775446 -908843571 -2030200333 -209329548 -623499450 -1582542437 -1205770564 -1730176056 -2140392812 -1083420387 -532601396 -719821876 -1270886381 -915052405 -1155374668 -834908902 -655766416 -580077308 -1931041823 -99562050 -449613337 -1803884813 -1865407392 -788274791 -707793994 -981736425 -927235074 -1898546086 -1552040276 -1804542270 -30385309 -1732264024 -725648989 -422926810 -2107507747 -287430211 -1148834174 -430492241 -410687744 -416471950 -994858077 -272024597 -2072200963 -1739281742 -560834830 -645261127 -111344139 -902687636 -1646615844 -50731219 -88589874 -723844947 -167163974 -616300742 -852941313 -931303866 -1563256526 -1337495084 -1568543639 -3690101 -1889985391 -1553843760 -2050926800 -666709603 -1966111222 -1100431765 -827506391 -795815565 -744047439 -408030792 -858236273 -1876867059 -117369830 -1244744864 -1788723821 -457685194 -28632004 -181754300 -1022774066 -1304616674 -884404048 -1444513849 -641630808 -1373598469 -620263233 -878534493 -1579150726 -35858609 -1380220303 -244277627 -1732827572 -1607265637 -116765446 -1824281211 -1070285058 -957942534 -455267379 -194604592 -101783363 -1275998929 -942300761 -1704477149 -1863075910 -257762463 -739199642 -535485199 -1943258663 -1417045465 -689485025 -353055963 -314253480 -995950387 -1450609591 -13551546 -127567040 -830561574 -604668718 -774525822 -1557105887 -1042920467 -602762055 -941495486 -1055122106 -1664762263 -94917478 -1845186672 -241049977 -1172805197 -1732033813 -1151460006 -1613177725 -696980700 -1778814162 -1409770847 -831548178 -6652970 -147317146 -2058111478 -1160508517 -1220163165 -960968952 -1928150824 -902665738 -1278576158 -1308115624 -1709198229 -1753372531 -1161524383 -1113953851 -459939211 -1404673724 -1063547797 -1541430198 -1722104025 -1765237556 -861020387 -1424830823 -541494464 -2009244109 -185390888 -2013366466 -750368283 -1415757197 -512401219 -517863263 -2124123597 -377147051 -1486243860 -1918256763 -2116906977 -1493982590 -986589406 -886908155 -581367258 -2136395003 -464237581 -632934316 -1240545421 -2075645671 -1652430629 -1143058599 -2144650978 -1783455998 -2115697207 -488731023 -2124837433 -1637170468 -216086665 -373731578 -2064447618 -277831147 -878639051 -1188973385 -740346360 -481021802 -1404978906 -1897774377 -1466828995 -2030135052 -1259635428 -798846270 -141498846 -906707493 -488875739 -262111951 -826600460 -602218777 -400556728 -1943177798 -57947410 -1112027779 -300701812 -866332893 -517805991 -1161553093 -1596482821 -1426086929 -178031536 -731305281 -998945986 -258034456 -1015618699 -1303447737 -565432712 -612452609 -601879392 -1138963974 -2045765307 -1964326279 -1165665822 -1999642420 -2018561037 -8693553 -83657275 -1573515787 -1966202951 -494637421 -461937210 -625304565 -1856339184 -850241872 -658955566 -493030183 -1366375555 -1631315514 -596122549 -1020467788 -1197707974 -1513695687 -1592129047 -1266651309 -603157652 -1147843324 -957145467 -2091347839 -1418279624 -2104642515 -1523599868 -547974648 -1400030600 -335974021 -980862984 -1279697716 -830788107 -117041555 -22394233 -570235806 -1881158528 -1377128962 -1975200615 -1394520979 -77570695 -208097136 -1385187436 -2122503372 -1063312887 -1888265122 -558570088 -1236447979 -1929414681 -669473867 -1180456036 -1470666066 -2095277939 -899477267 -1377035236 -399947733 -297733421 -368709237 -1405824664 -1080043554 -1760227634 -411123566 -1298881363 -1127796186 -1179829680 -1680919009 -1058407978 -1055838145 -814327854 -494959847 -1585983698 -1060985722 -1430308613 -264914173 -678905380 -782105149 -93835956 -847915594 -215906866 -1646817079 -1285404217 -103186299 -1232824164 -1153498092 -1507550775 -1393808119 -981434557 -148706892 -1793252383 -1407299083 -90799923 -1360916491 -75140040 -158267844 -1422899122 -287650462 -555625437 -1137822503 -40931386 -739037462 -2104693233 -228533647 -1264244293 -950629033 -2091307598 -741949137 -1649091077 -849782957 -1535905749 -1214486503 -42591186 -718008651 -860784864 -1761363056 -166808297 -1080888344 -926227635 -2146387989 -912628817 -1224320445 -2112897208 -673788064 -674721017 -1322476559 -407780663 -949285464 -984779885 -539059766 -1891464116 -636971071 -366810002 -1697636724 -712686226 -1601101063 -1735468931 -903429763 -1234642451 -1648676643 -326841660 -2112094241 -63223577 -1741737021 -1024519690 -578548184 -2000858519 -982700460 -2097385790 -1966390672 -1502180621 -1331943015 -596716777 -270239549 -2135670285 -1168804037 -1056530750 -1717521854 -2062100851 -1637907471 -1865477851 -1972479204 -752922889 -1401347299 -990897644 -281020223 -790348208 -1195975161 -307595007 -756144320 -1856846941 -794179183 -1158662576 -260203836 -969166360 -115550025 -724053287 -1521250707 -1867815014 -450988452 -1293122501 -975366667 -1244894718 -12352705 -1453482823 -1059321536 -1377621922 -1670444747 -1111145598 -506271274 -571092704 -1250657685 -233774959 -1308145550 -64680864 -464555866 -1687383017 -177324437 -1731994270 -486860805 -756854565 -909032774 -915167860 -948343206 -180635208 -1541547645 -1548552107 -1160944356 -2102858297 -1601019000 -356236090 -75556794 -720201381 -1206775975 -1448249557 -1150649401 -874241372 -291626430 -807726556 -1216094005 -1290073536 -1271019440 -1003891371 -1770741565 -1025102829 -1789430769 -1601941995 -836627526 -1623392573 -579239276 -731139881 -366551833 -1653557635 -757295618 -1879359604 -1207384352 -935823561 -216359099 -657562522 -702459792 -1524116585 -642502679 -994748837 -583511564 -1668523946 -1040497896 -688800551 -1734003327 -2040827099 -572243009 -1256480997 -1469415628 -406519296 -1224326765 -71633801 -1358451087 -1588767952 -611302466 -598778814 -567157056 -1676214806 -1451763096 -73157258 -1193389122 -1941194121 -1078026423 -70561622 -518207810 -1472474085 -270398567 -513318517 -902505220 -728233779 -915819400 -1161357751 -460853474 -1738306436 -1348736064 -1517133563 -1390452510 -418288916 -1467834581 -1751149778 -310936711 -1085588626 -466972270 -1497695752 -1116677377 -1137084106 -515594889 -506783778 -594812844 -483092323 -1844487001 -1366581362 -795346469 -1449885555 -729580376 -2073238709 -2000809588 -160317143 -1505729063 -841065593 -1052056997 -1689082828 -828760503 -398839479 -998661266 -1915196357 -72787216 -1416544169 -854137741 -1712316439 -474036826 -2120087859 -1267975189 -1378772342 -1678200864 -471701550 -1525809773 -1182625984 -1433760103 -292048134 -1452854743 -1240599211 -832210554 -401788167 -1165136601 -1694959661 -816444972 -1717623721 -1626695873 -263227554 -249187258 -497133556 -1612288862 -790245788 -1622085868 -92284811 -547625343 -1971712406 -750250785 -1588451958 -1742842249 -272733863 -1107932743 -194908464 -913992773 -526008820 -1587546688 -1560354888 -1961789099 -1472954502 -1902316145 -490912479 -133862779 -1416348244 -1856193560 -550222951 -532553475 -2061897276 -363906093 -136278395 -1213417063 -1395865929 -1207308875 -1814765269 -49637742 -1037874758 -1698876772 -79336492 -1968559904 -1453240846 -1287381391 -1121295012 -1436264259 -1577208733 -1756520610 -384196961 -1862480645 -990561843 -1079663757 -1819430396 -1147015939 -2083671301 -1247724278 -324127391 -1590531745 -190600359 -1522116036 -1379013988 -1444577892 -1718001509 -1533727848 -1117726395 -1588060456 -1605319076 -1760653071 -1118992284 -1389020409 -2118771173 -613270057 -1455826046 -1787164851 -25880168 -1176286882 -119171492 -1460507040 -1003736070 -1308081305 -1132398796 -1226484658 -1979603100 -225158729 -376572289 -416153514 -2085355166 -1631155922 -61343452 -207247204 -2132765841 -1745937610 -756858662 -977891053 -722577280 -336321175 -373029321 -999032454 -1711302132 -606448253 -618399509 -1767179930 -1294245500 -522258037 -825162570 -57921664 -679314757 -1220053447 -1264422173 -1792774546 -1966227212 -902392048 -973635622 -68508814 -376402106 -1850855127 -1021492694 -1243433940 -1230860623 -364519210 -1851001226 -1329494940 -254109545 -1621632579 -1063791176 -1336933757 -724255338 -622154570 -453980747 -45017038 -687113922 -1304117135 -1078586663 -896580714 -2086792846 -24439918 -592325249 -1623756098 -246553010 -1320484007 -1278697551 -1200884128 -1208224790 -28679498 -979985958 -1571907263 -701543847 -1162214499 -1975315228 -1173338023 -2097305807 -622116391 -1959789941 -85360701 -138225511 -1726340970 -2108611820 -1663715946 -1836820482 -1364415349 -898387977 -249207382 -835357624 -1754986129 -363978558 -1354197650 -968212644 -1266314389 -1382994153 -1767217990 -1933919920 -1227098095 -1552220524 -539003112 -939280338 -332351669 -229535036 -914720040 -2011767054 -1786338210 -1164910410 -40851171 -1538347604 -1452554195 -484256269 -2079574600 -1113947275 -349416379 -1420790955 -1362909692 -1362614542 -696995786 -2032364564 -76337966 -964457303 -427323965 -848564187 -379391182 -548647931 -1978479746 -672300874 -1449322451 -2002909683 -1096875456 -1186163144 -753266107 -727361284 -1284181464 -1027213098 -749499853 -1852439716 -1883876253 -1956776450 -977224992 -265508288 -2074261597 -2012619028 -1073079699 -682833587 -231487141 -1511494070 -1096774127 -1630610288 -1628291049 -1303546822 -83270660 -1518128423 -931195354 -1886978989 -417369227 -1043007087 -2058584395 -518889948 -52265569 -106606560 -735092322 -223234663 -251049732 -1734963016 -990450946 -1363301525 -1505700832 -366587176 -100083789 -628546122 -502612861 -1361171176 -60663541 -1664884909 -8745153 -950898475 -177368351 -322573221 -1239400319 -9785533 -1256695959 -787314668 -1750875909 -2987722 -822519773 -737589072 -1383922620 -192093683 -850608740 -382455101 -504327036 -106539343 -1752859850 -1134829404 -1275524021 -1550456593 -957385853 -1836548047 -1080567598 -1977900554 -1675239165 -86550338 -805101747 -50602082 -65667962 -2022326423 -1016510292 -1256065759 -932961503 -1505874174 -1132462523 -150060700 -924383322 -1213790456 -1229031139 -1828636327 -1252275672 -1657478704 -86709244 -1328351242 -359330082 -536672810 -428600270 -824585852 -1102440473 -228123395 -811589870 -1722302993 -814325438 -454354135 -2025581860 -2043548776 -1218311761 -2056676629 -667321491 -1512694603 -1946779435 -461118353 -1895160495 -484987161 -1478774562 -935816803 -102777393 -802791963 -2032251687 -326697874 -1842966586 -1582770221 -739168958 -19779211 -1716717639 -1430561228 -215647184 -1577308999 -1294207625 -2033176559 -838636049 -1020900282 -2024183691 -19358863 -1094379744 -42920853 -1963754626 -147828439 -2061478341 -1912800136 -601690162 -106059011 -122370867 -1545311490 -382985612 -830690825 -629506628 -1613451674 -1006274249 -1017582818 -2102141065 -283919011 -118154243 -1543472273 -1683520198 -1826918561 -299069921 -1356428267 -1950970564 -34463105 -1548304692 -1297607745 -1196934930 -1406047061 -522902639 -921570149 -1177432079 -39144648 -774102954 -892414352 -782223416 -2081549425 -2092576345 -590943496 -2022953544 -819114704 -1490652858 -858358504 -1783719829 -107453883 -2091148101 -208766705 -1901215384 -1317775175 -848514714 -1695382118 -1474228830 -1845110371 -1106142717 -174712540 -783514331 -155637713 -167960345 -1116006257 -594988501 -1287875875 -842153012 -955307 -1023459220 -2082581717 -114955166 -1463676309 -582548978 -522726573 -109912534 -464022518 -1313337769 -1430959717 -470600866 -206482961 -25551975 -2102798072 -588817425 -649816599 -1513234398 -281695765 -1406764367 -1841246346 -587983952 -1674021417 -1094696172 -1066158955 -330006117 -1610031865 -1511602855 -777639975 -209584183 -608182601 -1850298934 -263491531 -390881403 -391264048 -379927622 -974660423 -112470045 -498436955 -2043679385 -1265973577 -2097417810 -357067165 -1158532437 -220441310 -547806095 -714643976 -145266961 -1960390535 -1589609471 -1869810417 -1775471968 -1072091111 -1247504247 -921033668 -750730500 -1061087375 -991306937 -717556733 -1855333626 -1129697742 -927026667 -543333284 -702037144 -863122590 -249334645 -826783218 -1526348836 -1652723237 -1765953961 -16737340 -2131599270 -1466731636 -393822339 -427451519 -844880618 -746672762 -1582161513 -1246031837 -1944042562 -1707134076 -1420891412 -903806844 -1129791877 -361669965 -1208380745 -502331536 -927909195 -343595851 -231940974 -549130713 -1502662232 -836444504 -694825466 -2063018323 -2025473846 -228157478 -1384422851 -9541512 -1450402306 -824679845 -534697177 -1583874791 -2123807772 -1511527217 -1653875756 -1808987971 -1734838018 -1037093207 -1448250997 -1174851481 -1764190649 -445523614 -1787387056 -1612995956 -1936956411 -721794804 -70148925 -24460272 -934414927 -163767578 -1515131639 -2103854194 -1159190703 -546499737 -233521540 -1343899711 -1836927278 -1011852074 -274807125 -1593508825 -834260038 -487727403 -289381622 -1733944146 -1046172032 -1564723835 -228753683 -667422051 -1055322876 -744136359 -1902509232 -1588642041 -642599936 -481863589 -520507486 -1468422971 -902802273 -1425836256 -259937719 -791505235 -1314775127 -1966315506 -238865659 -968194570 -962544671 -493972646 -26482020 -554195211 -722334238 -546481575 -2075756453 -1366860056 -1184389233 -1003914988 -20188837 -11367233 -2070524095 -1473448677 -1617980782 -1965064760 -692414107 -190013256 -244610503 -885023563 -1119284219 -2000604660 -1011059541 -1987090523 -1512225564 -506091903 -1851371601 -1111936624 -916143374 -163937828 -81556095 -618721879 -742801579 -943698242 -1569620199 -917564845 -432280808 -406362255 -732422325 -445751671 -1325373761 -1856414443 -2115119885 -1523098404 -709803788 -400605831 -620968272 -1990706731 -12807657 -509926499 -1874917163 -1705206110 -1229821555 -80772510 -333910666 -661793851 -951445944 -788745246 -24796591 -144477419 -1575460023 -283239051 -1574968405 -610549913 -835522425 -229829242 -1564472988 -307735448 -969052560 -350397072 -723429030 -1766781543 -1041006132 -640788415 -100401200 -1668305505 -1664127303 -160562993 -1342762719 -2054855557 -125335445 -1978850055 -453633296 -647859022 -824492464 -1680352004 -118689531 -1950123101 -823537993 -670943436 -109698455 -1160964059 -286522971 -933237023 -1841571520 -1758216076 -962606612 -1535015033 -1276608220 -445236363 -1254526793 -837363705 -1111451144 -1346615602 -238267081 -1645312359 -1765378941 -1089794435 -287043782 -1096572912 -396273430 -820748663 -1035314360 -1615940526 -2034220520 -1204619400 -1709915531 -924165363 -1845520837 -1562393838 -1870683397 -1415261299 -767778121 -1965128471 -1763204884 -1057640435 -1040644826 -1010769414 -1405893328 -86595755 -1568425266 -161678737 -767719304 -976591152 -349977643 -116536768 -128373712 -1503395996 -283914170 -36791556 -2027875003 -1929697531 -1128366523 -28065404 -1396326335 -355417929 -1357110396 -530610785 -1623361151 -51129722 -343778854 -1160188748 -140772876 -1590231585 -1588262180 -700727050 -319209202 -534907808 -828982714 -1986056109 -1306698642 -1516301872 -297123755 -859471010 -1154255348 -1349850485 -919854487 -259588256 -1360531535 -47635489 -1745746939 -1847218459 -29555734 -674498881 -1884004101 -1958034139 -640367545 -1616773698 -1004956795 -349969910 -2134051884 -1885625841 -1297330908 -839102765 -275061506 -1573922998 -220263640 -1856673699 -29984536 -1438923154 -1168100411 -2115590450 -841949771 -880051114 -1299196109 -2122764914 -1164081987 -1149931339 -1690675220 -1822289083 -1948328114 -719962542 -1487576196 -688507798 -1108670950 -1864535278 -1163040322 -822536860 -1024770281 -495263827 -252524617 -753551447 -1228103370 -1268008273 -1934815130 -1240507036 -1430508976 -1484931467 -1335704082 -1531944083 -1202759098 -508590875 -901921065 -1647758929 -2082691638 -1962397413 -959469665 -351954332 -1126494086 -770271450 -920836034 -1724063156 -332613921 -342237106 -1017833876 -2026705577 -1602507572 -1752345577 -1081377681 -560580006 -657401453 -142856756 -106780746 -1515152777 -311636913 -2116465405 -514932927 -118606679 -557629537 -460992851 -1933332028 -2083815486 -1523557926 -1990539101 -1490417541 -1198352979 -1616876487 -585047871 -1719431931 -1952510285 -142750188 -463176017 -2118580991 -1711848477 -1198934080 -646022759 -27191281 -1737326603 -2060552009 -1376323741 -1326753150 -1417485249 -1638483772 -813950523 -595608671 -973654830 -391337670 -1617292576 -1135804753 -488345488 -2087601629 -732753917 -1723851121 -1063908970 -1169213868 -1502109426 -135368650 -955718377 -1728566326 -855464466 -388263397 -1487593793 -984260577 -400984798 -547815700 -876075211 -1048187445 -1078031774 -160495879 -214777721 -1996629887 -779042787 -164325350 -152187408 -160742679 -67778027 -978966879 -1624115686 -1995181232 -53818319 -433872046 -1380495557 -575504311 -234608889 -291621531 -725389063 -349317822 -1911827103 -1427793707 -946561971 -308189621 -12403583 -161105722 -1874474434 -706710748 -2102973726 -1393550556 -947540510 -1722109065 -1849944836 -754617386 -1963470967 -1822822567 -177175467 -1375739127 -91080240 -1777237016 -672481789 -194993562 -196751212 -1820287351 -517473095 -2009020962 -729926553 -1448984607 -619732869 -554641333 -1777855751 -334142699 -266605188 -1182507074 -1582723380 -2099395918 -1390873616 -1053366517 -75865351 -1611151586 -1003400879 -2116977109 -525207467 -1004108699 -1128405967 -691000712 -57403608 -562282153 -1348098671 -1541887647 -820514780 -1399410073 -644194967 -1519745842 -197869076 -1280874776 -1286282704 -1983015426 -1741546989 -2125619160 -1890754275 -1591575266 -549188630 -328589604 -1425017991 -1539743393 -1289259801 -479477177 -1214270295 -703750624 -1744293539 -1042244776 -2131325300 -1157085140 -1665524395 -19168120 -36045790 -231204076 -1048987909 -1646528340 -727535138 -2058661995 -1823113148 -766003040 -48629515 -1272472745 -1807268389 -751110755 -1009582219 -780059786 -77158367 -1868035028 -2001280103 -1625811807 -437115821 -64047160 -551310973 -1639070053 -2077640702 -823178294 -1067933284 -86382562 -132774162 -299831501 -1271401445 -981798465 -1969941354 -1048950879 -1024165130 -1061909205 -1918901865 -74234409 -2117196803 -2070120878 -1139031499 -1033174335 -8278703 -1701207913 -604117633 -102374815 -479114458 -1560503003 -156190610 -870565636 -790557241 -414225498 -1893444959 -1716744667 -1884820824 -652312071 -504959362 -2144107837 -1244819799 -900672719 -2141644177 -640275472 -69302787 -835804435 -674604018 -1503558013 -859450242 -805207572 -1829202857 -36527147 -1878920234 -265343703 -1455565149 -1697236266 -424639561 -828942746 -1314313933 -657478889 -1444323608 -1739217615 -1630535988 -379530949 -750228253 -1209756634 -4577842 -1777862849 -453438785 -1673679939 -1797926367 -506053232 -1201428104 -1760894834 -887335731 -1325186149 -850703206 -1970145163 -179401448 -133096148 -1416482909 -1972024568 -1701790225 -1801100829 -172144891 -578710528 -434406833 -1778726078 -2076826706 -27249404 -566716217 -709484674 -1479707774 -1587925358 -1482210637 -703870859 -1617599537 -1999930986 -426038858 -724607308 -95263419 -1216966118 -915291198 -873801325 -1485691089 -1217769154 -1527015368 -2117708326 -2077353351 -288637331 -2109547191 -204627167 -1047476922 -2021173595 -968282919 -299942667 -992284760 -2119442365 -1156575766 -1694410165 -171000288 -668720730 -1407384359 -1524033655 -1396181816 -73970743 -1980729635 -1978963298 -209424750 -76075817 -853486354 -1501873365 -462858717 -1080687185 -1840315616 -2125074018 -1318487269 -2079260337 -127096328 -1509239578 -1860232729 -1864543277 -1297479515 -1189256967 -1211541740 -2089566973 -1552035820 -1729650278 -1893576554 -1780978185 -1273283409 -399712708 -642635540 -1080260017 -1103353981 -549066822 -428846195 -662880033 -2027037642 -741073086 -1957687449 -1255999656 -1969452029 -1414800192 -1607887360 -1976129319 -1970863578 -1516384118 -1679432277 -1840707018 -113432844 -1647814219 -864467021 -1370349992 -1857685116 -1996484526 -483444107 -1314469748 -1128777947 -500417631 -973162565 -707774403 -652470488 -1019990234 -1761392484 -661404693 -853318379 -826201187 -334088407 -1501603191 -217011593 -886610945 -2028609729 -1393335531 -1628582629 -1909164588 -1776060689 -229306723 -1372430743 -321645174 -674099919 -1621100708 -714569867 -1047200645 -1672753350 -1257130573 -1649421225 -2103613099 -1402074332 -325239393 -952596536 -799392167 -726455137 -1086954364 -1946094366 -1832065552 -905201778 -952127498 -1506205089 -251699987 -1926380566 -1214710590 -1661337748 -521152342 -1569099528 -756581936 -621924465 -881573306 -1112873289 -1626286500 -1972830131 -208502037 -1747907602 -1654259501 -1816139245 -1667215904 -531072472 -792999972 -667016122 -675325114 -738116603 -1660201549 -752408572 -1347156068 -731944555 -1005805869 -1735454746 -665022468 -1527720688 -1087119684 -429660312 -1460842570 -200537839 -1037617930 -1677335870 -966132921 -672148280 -1032158740 -119042714 -1443618841 -631616881 -573251846 -1032135280 -1872234141 -1708811943 -1703514670 -719076886 -1634741333 -191804013 -277092344 -1346478912 -88401898 -1859499609 -280413672 -1333463786 -386511210 -2103357942 -1408617927 -781774561 -980094381 -1246688977 -103692660 -1153298903 -307264899 -1650470105 -404786436 -17436156 -991697900 -846020933 -584594144 -536093183 -1424227516 -1139131950 -573970645 -228088191 -219916242 -312922807 -106165746 -1916266012 -870609625 -1529880364 -877572217 -438563523 -773254557 -1665791502 -213468175 -1461926735 -1242229818 -320534992 -1342623868 -1868670447 -1943349001 -787872584 -390351886 -81606417 -1464483733 -1268022264 -22478220 -1981805315 -730564235 -1429087746 -1220638974 -367956227 -1634887476 -500545767 -979260670 -119410082 -1175521876 -146617532 -1037117215 -1851753453 -1087272247 -846303006 -1030427761 -1091249719 -1123681853 -749711653 -1117195022 -1247209033 -254339264 -1187552518 -482154808 -1120057925 -2119379520 -100339851 -637212862 -135624045 -953174848 -1929147363 -471627535 -281839668 -1677858441 -1159049130 -314565973 -1953052944 -673285413 -816600248 -32380159 -899969622 -1062111133 -1017738467 -423166514 -1841245581 -575126597 -328820632 -1012938293 -1351020682 -1260002643 -528177834 -1534942987 -65731098 -935969528 -522142821 -1036210905 -1651786812 -1059844515 -1577395387 -598647094 -500822663 -1338084448 -736566152 -1371575356 -977541394 -1288309408 -1686091202 -2088109849 -684472869 -2013095951 -498789972 -1534385163 -1427801365 -1075269977 -987613934 -926281075 -897070422 -1727380614 -254555705 -530309111 -848093527 -1058943150 -1460539361 -1546955117 -90137190 -959781195 -1292871748 -1055928290 -181911222 -1512678473 -1675682525 -1095650917 -2080172641 -427804127 -328712333 -1340240647 -468580746 -614064473 -1922673876 -1193397523 -2082389728 -1183163337 -1875117386 -775386777 -994791043 -1292867806 -989675096 -1208492457 -232391473 -1678216465 -733907557 -1785725778 -1609184021 -146790629 -1798874847 -1414771063 -1118316257 -764452855 -1911957631 -1474094156 -1729128100 -1707265496 -1482183705 -251224735 -381271143 -2080381400 -1788932993 -1825755351 -76352274 -1204931859 -518963003 -1280100954 -1165558232 -191377290 -1695093471 -917905995 -1871021564 -656383127 -207720850 -1503399575 -344066423 -1698393637 -549221135 -874901139 -642912164 -1434512291 -49169968 -1765931728 -1790550956 -1101572081 -665444580 -32222484 -397409544 -588063838 -869181772 -1154275110 -1681990419 -1885726672 -844513878 -1025324523 -1220474533 -1899163634 -1193751277 -1585482265 -1223335879 -597681975 -1459936806 -9747820 -622853568 -1464621898 -1442677772 -1994939374 -283878207 -1579845062 -968145526 -138262163 -194867487 -225292334 -474587877 -644183781 -1331742740 -1525662146 -848942642 -297633426 -835576919 -1145709900 -1607910298 -214164638 -282478494 -1677188788 -641609394 -1013693371 -1156714746 -1882763378 -432555501 -728160212 -1826862478 -1503966587 -1283902519 -633951777 -1161143272 -1151072215 -1538025329 -331045564 -1900148418 -565146789 -101912042 -1291223235 -1266657710 -710739259 -1090681399 -161862201 -1703715105 -1940304284 -1154921493 -1808331265 -1434998511 -1778618567 -269889329 -544490039 -816265606 -850503006 -752867410 -468911746 -1882214179 -1939586143 -1970027588 -350802070 -1087779475 -781349414 -277099693 -1469993555 -1529803797 -1738194295 -1611465924 -1991512351 -667961115 -1525436936 -1358805466 -1102364864 -1104846579 -2012841291 -513686646 -647198382 -458534219 -1413293297 -2051306859 -611910275 -76806442 -248198847 -1064779055 -760346934 -1623220088 -1975251175 -96799252 -1259907585 -1078021675 -2138245633 -1503004933 -153769270 -977293549 -1417745787 -1722378644 -2085791795 -379644937 -518540922 -628636528 -2022066503 -943002146 -607752962 -1071807202 -770812978 -1432362542 -425560524 -1275182358 -103093846 -1826450240 -1017933462 -1552963832 -146878786 -1133045899 -1364926544 -900107754 -1236212010 -110967345 -1012361819 -252156752 -1013295333 -909341021 -1800907895 -1224470447 -339013528 -526249605 -1339452889 -113633922 -732364871 -1627605940 -526338094 -679203865 -1503775250 -215585207 -535661560 -612390696 -1708791248 -1355693805 -344285965 -1093268737 -697579027 -1097477816 -572609429 -972450996 -1633336102 -196406713 -325259952 -1298131649 -1412254870 -1778333446 -1920311623 -145716998 -934227806 -1313792225 -479067121 -764910044 -1005998566 -679145931 -530078512 -1267383428 -22979803 -1821976208 -984805283 -965923952 -1454973591 -344855548 -2076315630 -27529660 -982011515 -1255705410 -1319026801 -409756426 -1943679500 -2047601983 -621085106 -1806852122 -197362227 -1352198221 -1723547793 -260842568 -966916849 -962724294 -1365412760 -482005478 -757752262 -964240724 -1082248006 -155746752 -2000578818 -576733047 -1558622018 -754730420 -1715749758 -195770790 -374720326 -1502466078 -1834651520 -1417893014 -2049339186 -1900968516 -1463631993 -1985213613 -31770252 -1386680908 -1453483512 -1070901559 -582056606 -837364957 -1132493508 -670825595 -276628415 -2139158797 -1818166752 -1383787701 -71993697 -964772218 -1425133076 -1326493341 -1345842680 -132668909 -678327977 -1815111163 -1568110906 -1320681158 -297247114 -785282076 -1948840517 -741985175 -107298096 -1620319639 -472045066 -856832244 -1901671773 -398370510 -1706633871 -1603880565 -1205918811 -2074279738 -170031168 -1560590066 -1619458451 -1030443879 -1362144945 -1394413595 -420251454 -92472395 -1552865984 -649831097 -1756902284 -356540938 -904169836 -788147480 -715561664 -536463648 -1208181830 -1454134425 -1273378115 -1991436450 -1539776655 -1848294235 -930253790 -1094498370 -2036668035 -1537814712 -1086172939 -1697586273 -2012239916 -1143795256 -1640743295 -135047938 -2007962734 -124157733 -1512397294 -1244874366 -1817780288 -1330938194 -888559406 -416655404 -1930685808 -558468886 -1683029612 -24090600 -1163788564 -513338272 -1234527505 -1864262868 -879612746 -373996074 -67380949 -747727874 -2135559721 -1458038536 -317778635 -113688356 -1647237109 -1902397486 -1858010666 -1025552435 -756024223 -1985860309 -163371689 -1303876157 -1323436711 -1512669798 -1529881800 -901707069 -198611804 -879002390 -853161017 -328901700 -227964522 -288895006 -2145323622 -203681824 -191482650 -1318395344 -534276862 -962091527 -1467916026 -972512246 -515281205 -1677147731 -2099048042 -1986572625 -1397848466 -168069882 -809510969 -1141952238 -729910827 -1184677725 -1557632738 -1307770636 -205952207 -1842587732 -1657821984 -1561248910 -1955231324 -778096074 -1432789135 -1152858134 -1489194904 -2124329390 -1688426355 -532837027 -385104799 -2088128382 -995957000 -1561754282 -1859083940 -1884199377 -945070577 -1012134427 -725346702 -1784840142 -1756685298 -1004624530 -1208042996 -1268235034 -1451019963 -468222809 -1040668255 -1404540617 -973902095 -252153231 -954117886 -598917853 -756501882 -1423940534 -610792770 -622252730 -2103755867 -1654092461 -1156181612 -1512314828 -2006351951 -969015263 -1871030040 -798839259 -23664969 -452659288 -1457575742 -1129534465 -330313775 -338388930 -766049254 -825348213 -1030539918 -828788771 -873939755 -1664800452 -736760001 -334628205 -1984053589 -2010083354 -1405679721 -791470200 -725941882 -1050612167 -1028145135 -1381860183 -2035937023 -2136597910 -1727011883 -499744729 -401116886 -620335069 -2085882145 -1898157387 -1461627124 -501635035 -2106718770 -2059479301 -527189561 -2104907852 -1688151533 -208870967 -1506063171 -13967808 -681231533 -1223052974 -137864934 -2108574272 -1032646710 -1877903563 -358023382 -49802380 -1657461977 -1953062202 -828884619 -337373444 -878645228 -1292790224 -1833238069 -1284342174 -1580782421 -1689952710 -416481748 -1159533063 -2005576963 -828693829 -1425733208 -675493630 -1422881368 -2136742631 -2011854083 -1101550966 -310564775 -1276911215 -1242706034 -1881846363 -52669925 -460166911 -936660330 -1395033800 -106618654 -938356180 -1979897339 -875466308 -1551772959 -1606712745 -1561727837 -1414622825 -774363838 -982124446 -1006253080 -661795435 -978068232 -1552941086 -1912070411 -1222103969 -1367807075 -2068552037 -541324576 -1301420140 -847348285 -1418562738 -420488572 -1930230974 -1504008436 -1987258662 -43170443 -1863646462 -1257095339 -1057243387 -809910031 -1406536331 -156128941 -1981578400 -1211771124 -1649856567 -830471505 -1238362682 -1897573297 -234761082 -702045635 -1005830827 -7440205 -493473909 -234143849 -1065628839 -10281093 -995638291 -500179413 -1264399933 -1418986866 -1106356927 -1627456363 -159881102 -619638917 -1123073716 -1266171329 -1126068380 -57881649 -6782652 -179398873 -89818123 -2039673067 -503780008 -1650057982 -2068169763 -558896399 -278306015 -269810939 -1374472956 -285380713 -1062659640 -1646561028 -1276922354 -1429919207 -162618472 -1529459920 -253620850 -1998070302 -1365777575 -171000242 -667947608 -1298424787 -2044057942 -1185930135 -1132051138 -1825847593 -1626663568 -1867761066 -1691768063 -862348561 -125131124 -692310655 -598779139 -572619331 -1138873910 -532059659 -204782705 -1514120441 -141034937 -1699723518 -1425694632 -27146798 -989700822 -1640869339 -105985799 -1039380430 -1234902312 -1721193176 -1488983942 -726174703 -668667420 -511403189 -923842229 -709574993 -850215560 -216729782 -445180762 -320040786 -1626438214 -227720035 -474769291 -1545725232 -894296465 -202641902 -2040866419 -1233094249 -1397849393 -183649971 -671061858 -2100017009 -1092131818 -916734217 -1504301541 -471023456 -866502150 -1215024743 -498856278 -501306458 -879292425 -1432811968 -1536612365 -205679733 -1558084508 -310734438 -1980953609 -1448327022 -305120009 -2108525874 -219221524 -1521699263 -816761118 -588638602 -1939305732 -1552127205 -1118074326 -993285832 -1764590293 -719889381 -257959269 -1899434437 -1450170004 -1215347425 -1627205358 -236207361 -1387336671 -1737474018 -243188620 -609756099 -378792409 -1222488355 -1385731636 -531454537 -771915486 -634861675 -1421413429 -1087411975 -1047227855 -2130071820 -1564683250 -1694125235 -1824632719 -535629073 -66381687 -1133000616 -603855163 -2133492466 -1073422103 -2142650321 -370668504 -2122970428 -323188491 -842824974 -557202406 -1872136722 -71490810 -1102684997 -42870969 -1125354238 -940198937 -738859533 -1261724177 -1544712361 -1050842744 -608485480 -498335346 -335936922 -357340091 -1450632425 -397322584 -1274010765 -1886966765 -211920459 -1219267687 -943055735 -1508423285 -1025698160 -1057740651 -577491491 -1420888444 -853923668 -261875175 -1142073522 -620847368 -2106156850 -1205224449 -1141555839 -510083775 -223287601 -1140778698 -333576870 -1494135420 -1407719569 -715457184 -927951935 -1061927031 -71019800 -1776354515 -872673011 -1849470514 -1372622120 -1390634766 -1333981861 -503863147 -899891508 -1896732782 -1140611006 -1810144720 -1848965638 -1477105776 -805817912 -1349769002 -1697853353 -58602535 -1385295419 -1789890006 -730403666 -877888210 -1454490580 -816824259 -1649849389 -709830859 -855588128 -319166984 -1972833529 -265612223 -1673613495 -681202059 -727683456 -256475327 -581141360 -487210964 -199525937 -1210450192 -923788913 -1960976628 -702656287 -531640756 -1754214572 -281321941 -1566355340 -1879654454 -1867961008 -757225963 -708668019 -639089071 -1604297650 -1773415465 -868183542 -1556892676 -1754450484 -2098811278 -154763724 -511212751 -2018118057 -1153463281 -922482298 -1475534793 -172110395 -2146419903 -1449007415 -1003066925 -799179525 -1447548337 -102663096 -1029285931 -1227865732 -1568993701 -1125431194 -86114782 -2074646643 -2041636209 -1286052897 -268132824 -1087681562 -1283209270 -1867417716 -216051907 -1937037519 -2084976960 -1717098621 -1391274761 -1352959591 -1634991501 -101410295 -1448295994 -1931116060 -1347263309 -386860395 -1529659296 -1457049635 -877188704 -435311473 -1950625029 -669507301 -1742381274 -1115061626 -1898444460 -1991495741 -388796845 -1863319741 -60862786 -718628330 -538311582 -54153863 -1778392760 -769718374 -215222290 -878566482 -2116789849 -1672895941 -1506173863 -1874368252 -1069593521 -72698410 -2071465374 -113655654 -1097614595 -723970435 -128757143 -1505269872 -1713377044 -1119755885 -1337960534 -801427201 -569533223 -810264282 -917981947 -1000063181 -1854861645 -1787047663 -203785099 -1927225575 -384391324 -834172292 -1160464028 -472436542 -993918435 -1659330679 -1148082011 -673790582 -717041043 -1778066384 -1726767883 -693804023 -2075494998 -1267553165 -728265915 -1455929152 -1372583746 -745682948 -2126226791 -1365790257 -384146616 -1016332230 -410861372 -1187154099 -228377616 -789314923 -1009423342 -257297694 -1517761647 -1209242063 -2093601280 -637156865 -1341966113 -1551200397 -573597799 -404116410 -1641211056 -1554256124 -391593960 -1629791312 -748663299 -677378520 -889972893 -550811296 -1830933302 -1202828851 -1680929546 -1235503337 -1085202116 -413349641 -57818242 -1088584850 -1432385157 -805650829 -689088668 -133934805 -479405579 -10922709 -1041860168 -2109669585 -114219478 -1983869975 -1071566503 -1020352179 -1402151158 -1616453975 -2073823275 -1088192115 -1274138953 -1893938834 -1427367204 -220776991 -1894629368 -148270260 -897229300 -102675866 -1243911321 -664268502 -1740716008 -1044223375 -1025900341 -160829424 -1525701242 -1506029114 -1589055456 -1148414900 -1973688711 -1753754215 -1134036430 -832911885 -1451640049 -152589976 -484252114 -2009741515 -2102842589 -1337014644 -2083723147 -2119100000 -1844898152 -1834345278 -565851014 -1200403382 -1718261356 -1606009083 -472698838 -1107360013 -1306453589 -1692663395 -877807956 -105661602 -2033052392 -899244927 -1767064150 -1495814687 -1713872627 -859084778 -1105305065 -1128680905 -1016916384 -1638803062 -1885290259 -2099655175 -1453238721 -1251666516 -9328400 -16112569 -221007661 -1476532764 -1912623463 -1927314345 -1876348714 -2142963650 -1341821713 -1271753244 -452033317 -1674299380 -1471453019 -289211481 -1021868006 -1108851783 -608828215 -1963715197 -1632628883 -1195078862 -275883243 -352471228 -1224030570 -1535935377 -1712444299 -475496199 -877966106 -616205005 -1391373201 -859957024 -732758058 -1793448908 -415327464 -1086834698 -2082351551 -541522498 -332927900 -1324314865 -1239418547 -316143529 -549749225 -1160575181 -193101366 -606867745 -1226350612 -1874175625 -2127078826 -653556973 -2100674453 -1404374891 -336028860 -1902542057 -2140331816 -58260615 -2081096920 -929775751 -1650031485 -1622834684 -1940217088 -1836901968 -586466904 -1946799445 -797426423 -2047934081 -1907688898 -596458976 -232345436 -904472606 -1581835576 -62975972 -1875207080 -135390188 -1317707543 -1859307337 -1343865462 -1261304335 -930878808 -861757661 -931293059 -1381623277 -201741528 -1940666130 -794016274 -568134660 -926936058 -1167951468 -1759789096 -1630549988 -614828949 -1886320126 -81277021 -223292455 -1222359876 -1373868730 -867572566 -2025637279 -827492262 -558349462 -1823354091 -520564747 -283324951 -871206058 -816711560 -1903200943 -329326936 -932455033 -1583567472 -1253664633 -1379426114 -1928728633 -2023967013 -672619011 -353800069 -2083024787 -1119181715 -277819932 -690148546 -767435175 -496202343 -993777500 -1438119781 -550712282 -166805004 -1025542893 -595651829 -1699011336 -193469993 -359930793 -2042887999 -850050957 -1745214455 -1487694459 -528670392 -1223430705 -43938910 -1894369449 -74778921 -531391752 -1864171638 -1493793783 -2108277451 -338943457 -1496049955 -1373054609 -69542801 -574752439 -482798067 -1193893703 -1831752400 -2084507055 -261856227 -823614486 -1956561287 -1655947745 -125685095 -1412966664 -856553322 -1508797013 -864493715 -1818996050 -289413658 -124889551 -927160538 -645819534 -906556000 -90216535 -145848963 -1004679914 -2138881884 -1459057255 -259519692 -208176387 -569675346 -1051441896 -2088498556 -775020477 -1280837884 -666238860 -496784562 -41713998 -1007495464 -67706853 -1930229108 -1472646574 -1021937543 -130076495 -57298819 -948577077 -1963821458 -1271073863 -1918578732 -1085789019 -1687493774 -2038817336 -1153894620 -1729545930 -139799718 -266750608 -1479097367 -2066233144 -222395571 -1180816017 -1078415792 -172235464 -2100970939 -2092447799 -577954521 -613099066 -729463956 -116567769 -649407519 -1080277779 -1401879915 -1352640168 -561416434 -1830344967 -2052100741 -1069783167 -1112595085 -1245479166 -1245235653 -1447479956 -1100867276 -1704688827 -1125780762 -1666336864 -789432721 -841770681 -17569131 -1079125078 -1355787031 -1911135347 -538868850 -830222551 -1349160098 -53938413 -304808257 -1163877304 -2004791452 -511512334 -610758597 -47907119 -2016065055 -1008397019 -187756209 -965127220 -949200749 -1708458527 -58619252 -1666258038 -1612087786 -1705728750 -1423897447 -2034113208 -1548510263 -457672248 -1958532229 -421831587 -879963962 -1981916092 -444909627 -58042135 -556587207 -122421717 -252463793 -1878766126 -1970217841 -1400900594 -2073061297 -1166529751 -1487311594 -536309278 -761168887 -405398630 -1716646126 -228642237 -941832776 -281504195 -334531024 -350732522 -2066369886 -373134718 -622956186 -1041838977 -1753512448 -1365625755 -1914328796 -524075018 -1298391179 -1479208286 -1782965130 -308129672 -1152324387 -1108443663 -192006316 -1529715218 -249447042 -568355950 -351189794 -1161805802 -1548795690 -959876543 -747901937 -766069268 -1161723511 -165730853 -152156212 -1783915154 -1242797511 -1271816655 -1517781994 -1551214092 -803769664 -1284603218 -1673181635 -2012865627 -922701798 -869703999 -1341409711 -789686571 -813260337 -1880554451 -1961825058 -2077317415 -1832144626 -86714849 -1422554477 -937652888 -897086930 -2004830570 -1168968560 -1674185164 -1699308354 -890484225 -554833632 -714857750 -1590682932 -584116621 -1100298710 -738734653 -1310349664 -602002863 -1066657424 -117840012 -557159150 -1145133130 -504071496 -106645857 -1395557001 -310123273 -299038042 -820637914 -1321439564 -158874874 -887834097 -1111288923 -767650902 -1974442385 -1535851251 -298538617 -1016736527 -763430110 -1902551592 -153102914 -515266492 -1429866340 -1421566450 -1511752275 -1141458268 -1017691625 -1783376667 -782381090 -436609049 -136664744 -1264333765 -306901290 -1981744583 -1857325158 -241637714 -313482721 -926705756 -1592233048 -867112469 -735237941 -523169549 -1112559225 -642780146 -1363169412 -1432761288 -684833605 -1633534962 -1391163086 -1623521513 -598850209 -1767092821 -1977688184 -253420222 -773599153 -1014965533 -1063105010 -541960030 -1244077283 -1306108189 -182492889 -551337507 -2085026991 -410485991 -1320576573 -686970666 -1043897190 -1986159987 -905092541 -1263664886 -1949953819 -125899066 -714209967 -1440812286 -706487230 -493790347 -1257550021 -109149173 -519116073 -1705264797 -68690317 -1279439380 -783902249 -232924598 -2048513752 -912801160 -1973405599 -1290458125 -1292355822 -974694596 -686815656 -586127767 -541891180 -86915333 -497121771 -1414218367 -419089173 -2032852098 -1827870963 -1273704806 -1039681146 -1994068830 -685030728 -651613929 -1656188650 -2027091783 -1651020873 -1071609624 -1745086826 -1490117503 -450581607 -897729527 -2067540114 -713803891 -1058343895 -2126278811 -92606750 -1663486822 -133417061 -367616759 -224416094 -780007726 -1349669594 -27103097 -255218115 -926015746 -732653213 -31318993 -244821836 -141930000 -1710661830 -582310774 -814199239 -480811189 -12689862 -677629581 -814587826 -569341957 -1890623914 -1548081586 -1842832497 -1476620045 -1232071583 -1389771107 -1850850577 -945020844 -176271896 -1221806859 -669246599 -1655730054 -761919752 -140284803 -1977123262 -1496194403 -1653308498 -865017353 -2029845328 -685211454 -1541592164 -149299293 -1012317755 -1659056751 -839141409 -924551214 -1888067653 -1534675899 -2019234023 -582151020 -276697408 -1151240501 -71440837 -262788786 -1464748070 -1415766929 -675966943 -787918371 -1159893995 -1629310146 -1251640925 -1726704110 -1769454859 -874271557 -798945725 -1813039031 -1101526734 -2050781198 -367060436 -1611713668 -1860378465 -18960935 -848854789 -968571702 -858551254 -728301785 -2058796242 -1931918830 -1954516817 -1654278807 -2140615187 -525909718 -2069423021 -147567135 -1964709307 -1160766477 -1260729591 -2008574635 -1818443252 -1735955907 -498100807 -689007243 -912908477 -1629598771 -1807594006 -1928788380 -880651195 -647339241 -678467785 -2017380572 -1643454768 -609618062 -206288197 -1047120721 -329470682 -1200910408 -1649912750 -1774739186 -1641125919 -123358565 -965682600 -1693537821 -541900209 -238665736 -1903056003 -40804003 -745595028 -648555351 -1790275732 -770849607 -2047986145 -635244899 -1419808256 -2026556775 -1249076005 -1567766610 -1976549227 -438322746 -1021482812 -1077347166 -1539191105 -596889973 -1033661074 -1746450135 -780931749 -1847338626 -2049202503 -1751220982 -1507662339 -1121380620 -727594268 -904976258 -1456780152 -642955217 -10620415 -256172204 -1929004040 -210281521 -1590924132 -342997727 -916689141 -746709209 -47242595 -1584828422 -971614813 -464510303 -921605676 -1774534368 -346233440 -1612226357 -1887207900 -2117192757 -2002119756 -705474249 -648487856 -655887267 -463736418 -799822363 -1514308368 -1152040379 -630088501 -655572950 -1623461540 -1738367645 -229992080 -6323960 -1060097017 -1526229207 -1789602281 -189576885 -1500457694 -291996337 -582302564 -676213769 -641355659 -1044136520 -1713612003 -773744504 -1310396143 -1383175416 -518737937 -1792383986 -1844536233 -46539939 -512707265 -1366611091 -1295001772 -348019659 -1568438032 -376236899 -1221704725 -1100164108 -623962486 -774853901 -628678699 -583350853 -1114937816 -1965053437 -502108446 -1473402859 -847917656 -250562900 -2142712180 -1410332717 -1684962680 -300909771 -66532512 -1520432744 -1005212755 -356922336 -871875081 -1323562886 -1485809376 -1058335116 -1978730158 -586008064 -677526506 -1229689948 -16337308 -1850712387 -769945161 -1879347752 -1008187788 -966178086 -1431236435 -826432998 -2082652237 -1300184806 -1559926217 -1199566543 -538410165 -1711038344 -467930631 -424999903 -442759799 -433104938 -1372613283 -1242111307 -476204262 -2040962712 -704007053 -1759128448 -1264457287 -235451897 -1575155105 -1600933166 -1061107699 -1332892405 -1520728978 -1689050299 -282045600 -843990271 -814996262 -991474868 -1392489403 -292611215 -179138875 -14999031 -833127318 -777455186 -1398802754 -1174402769 -665139006 -1338891207 -1410862783 -2003847354 -1823926424 -1549830890 -1178613767 -572422041 -2117988174 -338307746 -1549073413 -1332599710 -896371407 -716453744 -497266679 -1702203476 -156675798 -435185764 -1985317513 -1778017552 -906048459 -149909536 -531253621 -1690087568 -535556507 -994248572 -765492297 -54506502 -1262745492 -1530084390 -11669905 -715081458 -1055575994 -703323291 -1004558749 -102461729 -1939878056 -433758438 -1618569548 -1123036687 -643824926 -1742917696 -1540771592 -1390331218 -527217919 -434037111 -2007259365 -1187536832 -218520206 -472065872 -1206518686 -1418960628 -665374861 -1007938898 -1078051150 -486148311 -1666869789 -1156368608 -360189306 -2092748696 -1340163106 -1312832806 -1533981164 -1080241113 -785634453 -1428789815 -508279951 -2118672338 -1099633859 -302002131 -1245957856 -700643895 -1069106764 -481708099 -54670703 -1874988052 -749153886 -332739641 -307729499 -869067717 -1384836372 -517138018 -672349117 -112658905 -1525123328 -382963104 -452398869 -1375680903 -1259993119 -368107966 -2037681202 -1386243305 -541140832 -360718379 -247460372 -1538131612 -2117343945 -248169178 -566132172 -1630858594 -1506602697 -491846702 -802963211 -615449529 -1578989951 -1628680478 -1406229084 -1434679553 -712858755 -205828672 -1913818634 -539716872 -50542776 -1216395667 -2065139476 -1168470318 -1890166458 -302069535 -231333237 -1072313189 -685001899 -167084926 -1435224653 -1284419867 -739085025 -756600927 -941106202 -954876859 -470075182 -2108730208 -1505979415 -753764363 -511615288 -193622828 -781144991 -1136329626 -719951411 -1300497479 -372570387 -1875663304 -1360696015 -664567202 -318515967 -1768609045 -1691061188 -1866802318 -610475956 -1740010773 -2076240612 -914185781 -1622410629 -1255575644 -1285533286 -124965335 -53378579 -1633096454 -463610071 -823791981 -644752458 -152078844 -483591178 -1638808398 -1974972411 -1854063645 -1259963545 -2018541395 -1826054106 -802560265 -285587048 -235564691 -1323400216 -899298333 -517175145 -1296342606 -1408580227 -148150661 -1034612554 -558105319 -2015009984 -455687898 -819816484 -400567436 -2123147154 -1145938726 -1158821586 -785201259 -590549198 -1838437999 -632736157 -57570755 -1224038135 -1663080332 -1891474219 -806772192 -208483786 -1441163045 -159242802 -629149052 -2046122783 -1529974470 -311728112 -1501763351 -761337066 -1084499436 -1488308763 -115859485 -1630180213 -842471465 -1058227584 -171439834 -1613719411 -1211162714 -14244285 -1033013178 -1594680298 -1195853926 -417482009 -791050514 -114730221 -1977992988 -1081293756 -1297536178 -2141592008 -1910954736 -1798307067 -462027191 -2137615232 -1645273561 -1113300955 -224134374 -340106980 -1724028193 -1892474427 -437398872 -526318023 -341870568 -1299880651 -742960426 -1465956124 -244694037 -141495854 -856420949 -1431487649 -753619402 -222739408 -517233535 -130219689 -316476730 -1854891138 -135252867 -1157237143 -2072755169 -316403749 -628299471 -652116798 -1517973345 -472283055 -561746073 -928136699 -2019771932 -1032852995 -1049968264 -943485649 -144053295 -889658896 -1715914658 -819761443 -1622976996 -37087578 -560665816 -2099610123 -696049757 -1164840690 -1016550778 -1936513961 -1875472242 -297000628 -937559168 -1469418537 -455410859 -458589305 -191640052 -1816367111 -1201992472 -508809575 -282644671 -175158333 -1833506341 -1498222384 -1377846813 -1155220490 -391122903 -155187254 -1187030520 -298869010 -127200737 -1116557994 -1278097672 -1856136010 -1730463748 -533181315 -1876585921 -1834734405 -663457562 -996149310 -498941158 -1927884618 -723508790 -959824216 -2015925695 -813657146 -2107272373 -626466687 -2060770815 -758828889 -1879241537 -1370515930 -351637788 -101306372 -1849145780 -209785076 -1837107605 -1895124316 -2024410355 -1681417064 -839283775 -1169812929 -833109418 -476609886 -268350692 -454421744 -1014402676 -193101999 -617506576 -1792040528 -367004921 -678673063 -1172520624 -1244182696 -930300833 -1885150071 -1890999106 -1411482589 -1683508561 -1631335502 -932060865 -1401236837 -1281846457 -437456095 -1488064984 -313633126 -1307078944 -1465586645 -477311425 -1321698430 -214668442 -159977734 -96249294 -606698067 -522056113 -1726393196 -838890555 -1003415330 -212371419 -208617819 -1546372029 -1027595409 -732549889 -442236172 -222440537 -1936559579 -494690321 -1351027510 -1374760839 -828863000 -2121506558 -1489729165 -366235782 -636655772 -1510030650 -123394304 -1566347973 -1755837285 -1784455568 -1735601021 -975982746 -861916236 -1448979437 -532840679 -446483963 -748103523 -2006641523 -1540884573 -1141719238 -1108847121 -530473981 -1471579970 -275393291 -707782552 -789430731 -808324751 -532539135 -1820884896 -1970477322 -1467030467 -1121307662 -1648872809 -1476319975 -483762387 -221350767 -800664365 -633450453 -1325325392 -1043476660 -1360763218 -1794048023 -1894718681 -1649353851 -971258281 -914727920 -2144206214 -750758391 -1529851412 -390975953 -1980365898 -160602833 -2012353599 -906981790 -804018124 -1165503144 -1412996921 -1365082721 -1377490946 -1616614762 -481203090 -156919028 -228185080 -1848329665 -1525725800 -1918775420 -96556941 -1482353902 -964242067 -1104819807 -1562884287 -1523725152 -506139189 -498623756 -888276498 -2104271589 -1731897527 -1008384851 -2130732280 -1927616235 -507763003 -2020261890 -677642513 -1031935950 -669578478 -791169466 -2113956485 -1297187427 -575101245 -2050213215 -1558388390 -1123111918 -1908232343 -1140204503 -1420499740 -763426481 -1841558989 -1547607559 -318311649 -482120066 -536149131 -217061905 -1732204729 -1876561571 -1425483955 -781265753 -1018492913 -218238554 -33308002 -1461841394 -1955387278 -1251731305 -1098237123 -449380296 -34648373 -367136674 -745562087 -94915964 -1819740874 -2070252391 -1201886843 -880986619 -1989843115 -530399074 -212618021 -58290339 -433184541 -563017257 -818089717 -1443565525 -1883018516 -425692573 -1347046254 -1033784304 -1670093098 -1643431796 -223527658 -880449403 -1550788391 -91463898 -1782926081 -1799316776 -252337178 -1898231468 -559222844 -1469899836 -2102152211 -471249833 -376253095 -1493910897 -1929128802 -159672808 -1413808953 -2128002663 -1148099903 -974501426 -1735174760 -254265060 -2087889537 -1276656379 -1254644676 -671139639 -1259798629 -1394281830 -353160746 -2075341361 -832859753 -575457525 -1595760234 -18985455 -1260962429 -1626915607 -1808813245 -945701783 -883395434 -1672607527 -953767059 -1145019405 -740179068 -1964312452 -933275433 -339644743 -397661875 -534023661 -1001509614 -395257312 -922722613 -1219541704 -1253492160 -628156050 -389123698 -914287171 -1178988712 -431671715 -906754439 -1277897161 -633631280 -69517487 -149300041 -1024889391 -349661950 -1253135458 -1075516477 -835572140 -1065389247 -278425643 -132915088 -520891136 -1473977580 -1917318915 -1386881170 -524319652 -1114987523 -652995339 -1251226403 -1202283797 -1110141556 -811206556 -1722395536 -222211992 -242887411 -1989787377 -1741094155 -957289063 -209798517 -2063010492 -1893858229 -72638969 -1072440487 -677015738 -1235146760 -1534663418 -1809465856 -1176716625 -899411152 -265840431 -1214138057 -628710205 -1112872195 -1607899642 -35069246 -998298244 -108852897 -1982056282 -653599310 -664748765 -1222561661 -470301931 -1624733357 -1638959494 -219475589 -1496802424 -1134899210 -301269816 -1822841533 -495937029 -829612396 -1831703248 -1258409391 -1667678881 -1869875970 -729737592 -420600727 -1667736412 -689315840 -1804530962 -1987815400 -810331421 -2046387120 -1677719135 -965216835 -307876407 -1190666826 -1284721836 -1519310714 -1474607368 -1764747596 -1216197255 -877912639 -1865068783 -1539724269 -967842733 -1491671153 -792973393 -220302869 -368511855 -235909037 -668372497 -1997083269 -1956583120 -2022894976 -1982245975 -1694285914 -230197378 -1309283799 -2015362631 -2087658733 -1692500845 -293313753 -1249276806 -647661723 -1803455465 -1091806497 -1891515111 -1494044036 -2019312328 -1898223155 -419506253 -452781070 -1356882169 -989766890 -603790568 -1047844301 -1753261507 -1443027662 -1433089663 -1908864936 -1034776819 -1171423527 -2132626240 -1547147250 -1171832874 -422586681 -685926938 -681829870 -541884698 -2125456006 -1296108644 -1771348187 -483180548 -1179800929 -1197700952 -1395676933 -178336750 -1566069685 -1373618163 -951260291 -1963442569 -1345537381 -1443959557 -2063063399 -635582531 -651938339 -666096579 -252951442 -1484748281 -404380627 -1786938881 -522969672 -2048193780 -1977482697 -1094767507 -117602653 -862833731 -1836932373 -1097483739 -672157290 -1183589810 -452914509 -1452107795 -1571546057 -1073205546 -650460469 -1597339253 -787754024 -545197613 -1971043589 -246861701 -66202703 -272300175 -261389468 -1568730561 -997804508 -400566533 -2107970433 -1621342872 -489652921 -439307943 -399819615 -291937842 -1746660746 -25703532 -355049277 -1603627173 -1242126761 -735939640 -1579206407 -971689176 -1714329244 -2090995756 -1943271584 -1634208712 -1977461101 -731803535 -783166376 -750008969 -1819217740 -1867873841 -1439693841 -1236134938 -963101888 -1269184177 -223397188 -835123760 -2119401175 -464295436 -1605303301 -1495522646 -1100506834 -2089191074 -1676752268 -1894952342 -1281526984 -1510524325 -1978139088 -1389312809 -590687032 -2007530390 -1447686713 -280864881 -326998861 -459204154 -1935472607 -1553304740 -1581552248 -1743533217 -1148414804 -1972075239 -405934075 -2125935653 -767601185 -1138848766 -109464451 -1523026125 -1642494282 -1646599036 -1915722810 -330948199 -263734863 -185595033 -1149464187 -281702497 -1519909091 -794111372 -18963099 -885225137 -212171143 -1137546381 -1842599873 -1861875771 -1561862760 -1534790039 -1790101356 -2135079469 -1976377760 -1851444171 -184136967 -266069042 -761435840 -597110407 -443528018 -459659789 -1003395464 -2025967204 -2077574443 -1857046928 -2007877045 -831466357 -778971070 -1106461378 -1235480673 -704288268 -43058012 -2121502292 -1418030503 -65149515 -1898722282 -218399154 -585028555 -1394787919 -269063981 -1705251732 -1996590509 -117216741 -819261688 -1813529299 -751526422 -1553246547 -603502497 -501202298 -1276158952 -1484323675 -1857962173 -210530584 -1481958679 -764180047 -1621840869 -269553912 -1349587461 -794177413 -1128914186 -642702857 -64173189 -521996729 -728326308 -323470656 -1290204835 -1330278086 -531542485 -102573875 -1677232231 -1371755895 -1864376720 -645639663 -30947750 -447791676 -1251999444 -1309882002 -1331942217 -583304791 -340773782 -46067525 -1162779755 -738154585 -151081376 -899015678 -61559854 -1696831971 -72104437 -678495751 -339921487 -753930989 -1164614823 -1515371403 -1838600448 -1215532853 -448726460 -1930528603 -63808098 -828363233 -164373530 -961948668 -1214368460 -206126132 -470777913 -1034628243 -821790342 -1362944137 -1941531657 -308543034 -1657248580 -513982470 -1324145056 -532922331 -1818809127 -1442766091 -1331833160 -897867439 -90459804 -2086987399 -1146808542 -745433569 -82397585 -1876742427 -170163453 -1636420414 -494830969 -1567414799 -358629044 -1639229026 -454532619 -730395154 -734827026 -59372085 -1434220387 -1585590381 -892957844 -1326758872 -1513654903 -906672359 -2045862248 -1446130019 -2034796234 -143226363 -2023798301 -2132043721 -346685005 -611744724 -1589358079 -1939632367 -599430709 -786138086 -1303415058 -16196759 -1635988991 -1833839196 -650065428 -1400336107 -1175662876 -368920885 -668025306 -456811426 -375598757 -1233870366 -1557145930 -1715923168 -962789013 -305661346 -469358598 -802521155 -1775748925 -1431940116 -1915781330 -1314493839 -1533675384 -235963947 -1591244867 -1438623578 -428093873 -903506061 -369499290 -1799343553 -702378217 -153085560 -223597814 -2059561295 -1905262719 -621857816 -1908887210 -1409135937 -898034043 -743089585 -1489247790 -865700745 -630712790 -410579938 -752060155 -1933762490 -728655732 -1565132530 -655239607 -315933033 -1306910247 -777779813 -412357802 -567849345 -426614147 -1803554943 -616249596 -2140814138 -1722195528 -1155644830 -1080554342 -1755106962 -247335142 -1580874649 -1092545059 -1419624763 -1090073571 -683515240 -950610877 -1786159706 -312277329 -2142518882 -309056878 -1703490100 -306128896 -1885020507 -1860900605 -204633327 -1151008042 -459469718 -2103839461 -911573172 -661964106 -1665438082 -715989176 -1279206891 -1171426920 -42168744 -60476898 -675459655 -851863543 -2144576299 -528326045 -1878441617 -811162372 -979795048 -510766540 -961100721 -1995308760 -49697768 -2046731740 -1027296534 -4325058 -1824289455 -1208841966 -1811621942 -906832028 -434451837 -387624659 -1489742462 -589718461 -761143122 -2119849922 -1563935324 -2008634835 -682741005 -822945114 -1443844318 -126241526 -27484246 -218738417 -1992054502 -1189958384 -115355377 -1747571645 -302797496 -1728755529 -1887915640 -1127277055 -1044729551 -943265785 -743766341 -2126067647 -838540696 -1565786058 -901666468 -1663714444 -1811576368 -140869810 -1071917676 -480065849 -370662364 -2019775448 -1091946407 -2095498834 -317092238 -1462315859 -1339785945 -1416338820 -1697804392 -1383198655 -909315810 -1377186618 -796741360 -1271498475 -465098028 -62081516 -1874470617 -642558429 -1931739087 -1081059863 -1661463821 -492577606 -202364857 -1679538398 -1476799018 -2092587147 -772492710 -1746330855 -923676436 -70575689 -754631879 -59571171 -485291495 -151265159 -1840372912 -940564243 -436106534 -280829727 -1883649230 -288684536 -755437979 -722791989 -1797451691 -1118108288 -1564085166 -232062035 -436319293 -1709186593 -1557806279 -2076990576 -633928847 -775758762 -804291997 -1473519361 -658483123 -1142615270 -1136071416 -675183235 -501039897 -694168992 -1767078040 -1729263917 -1842458168 -1627723483 -354399648 -1422730805 -1753713937 -457084084 -663194469 -869312553 -1204827730 -916350547 -1498410792 -249452775 -664710481 -579122473 -915515507 -348795394 -1721314295 -1377147328 -136394330 -1014452961 -1038241994 -1428561283 -962309921 -843496690 -1109314983 -1951379674 -467923934 -312443424 -639110253 -1960303524 -127215594 -1366259593 -1829825827 -1916849349 -2084819996 -1226488320 -2041150334 -1709886360 -433888366 -1654785797 -2071661529 -1262949092 -657022296 -212815998 -1238206131 -1413904287 -1582797554 -1198554689 -712049163 -1631401457 -2040566550 -488163260 -1172379280 -1016097735 -764671201 -1286731559 -936986823 -439950710 -465386349 -612925269 -2103425071 -389371383 -782161672 -1043818017 -655499376 -386903322 -103649738 -431908849 -597298283 -1453676303 -16172602 -1229982292 -634795622 -311260658 -87714914 -1050777756 -1663715811 -1834551537 -1884962380 -883960116 -425799666 -999474658 -553490172 -1757645647 -2112824644 -1601688563 -872163196 -1870944397 -1506921005 -1546681964 -1941705660 -1085527808 -1592287791 -1787178070 -248051901 -742541280 -863820243 -1237370381 -252355919 -65727808 -880674498 -1038992762 -1161817177 -1739975315 -1480298006 -770536347 -1077992619 -1649901441 -1584668823 -436718067 -1968930270 -1235531267 -1554621626 -92135133 -179470844 -1299434720 -1838132697 -1943976384 -594880430 -1619010225 -2087044085 -2099530144 -1499326351 -604867359 -1965601462 -1122830033 -1465558442 -3303604 -1836581253 -1638660840 -1642448752 -881376326 -2097197723 -953032250 -1679986424 -416837412 -694726970 -407596051 -2141478874 -9511598 -947637708 -1208232204 -153286596 -1454926219 -1696157991 -1629424459 -1025415869 -608243108 -719756436 -171036301 -1273991221 -1558490757 -696110440 -37256224 -1247615491 -643227929 -299123705 -112892308 -1152960255 -1058058904 -1631402368 -2055877727 -125077459 -1937846647 -651605727 -1518337636 -152470951 -631282586 -1397206722 -119696709 -1697894571 -751353461 -793774667 -802413105 -2107236222 -18876830 -1582785701 -999341318 -459928439 -1223628720 -1224493368 -724246775 -478236229 -1832493729 -1659121676 -1930335884 -1119747159 -1191302652 -1233631183 -1832164543 -421459868 -1074933670 -1777753126 -756807971 -125927416 -1190688417 -1647601773 -1588854393 -2064116353 -1152711233 -1167713444 -2054287022 -1307385935 -182733441 -299327677 -1393566065 -1208200273 -1764105926 -1169067800 -1194628197 -1291491176 -1474974803 -1497776700 -329686766 -537666902 -2103918985 -100649393 -1544717962 -1144978751 -56907290 -810600115 -119876237 -420254373 -141532028 -1464397367 -1963952549 -1326836653 -673436523 -1208822371 -1482288777 -2017169839 -249148884 -1999665385 -257050145 -1652172898 -1106340976 -1359367906 -1965359356 -1348721785 -1277146410 -900661105 -1946447679 -1327746202 -927841037 -1345547992 -1622298634 -1520759326 -51625488 -86183428 -1080896318 -1060246653 -1893677812 -1335337744 -1817352258 -579488925 -632023330 -961989248 -1896396520 -1931506513 -1467155939 -1082631919 -165721602 -2144158302 -2092985054 -1017664718 -1331150718 -165482980 -281121995 -353346565 -903434000 -1305853710 -200431630 -1400046914 -610163419 -782168708 -1162072069 -1728977865 -1329749498 -237498557 -1613631373 -1878991695 -1466388730 -1073052138 -219615860 -1706853474 -999780892 -1405397716 -346779459 -51749455 -22213150 -1821741119 -1328631754 -778927972 -382113292 -1201994114 -536406669 -250535777 -1686855919 -2055806586 -1076894319 -370642517 -1686206919 -1885481821 -1024270415 -683950553 -1824465527 -2020600423 -2072399350 -778604757 -1392289728 -1231640784 -591783255 -1104397528 -908092075 -137225296 -2095596641 -1960934487 -2141876147 -244027968 -1831776053 -334559379 -827295007 -1538051971 -778817658 -675549541 -215093898 -868165785 -1258450777 -215769736 -1489556816 -1764533433 -1911727008 -1892980689 -356209718 -1779806237 -903706196 -1585684588 -328811246 -855187791 -33153966 -1020441989 -764104181 -346761007 -1889110338 -1879213518 -899600597 -1302358899 -1592685269 -2025139875 -1057557822 -1799651782 -1587815726 -1787109260 -1239045878 -495146587 -429555584 -1848162721 -867381639 -964210837 -579937197 -1723679893 -333563621 -1271459477 -1957142289 -683430124 -1667549912 -1849777634 -91937019 -1144736140 -274311507 -1853591687 -1917700027 -1349779613 -1876192430 -1663782109 -801338376 -1224135095 -1145203405 -1685183421 -1863420111 -1747781376 -1680262766 -766350112 -1586901325 -1451157182 -626978895 -2079516083 -130452056 -2074385252 -1943404966 -1728476339 -1490536604 -1051961173 -78568860 -1951870762 -131705362 -1663862724 -8751034 -1049740442 -1409448589 -1857808913 -1929657058 -448136812 -610249255 -77330713 -469686956 -2026266767 -669878843 -1544436727 -713229400 -2140291893 -1534758401 -1258361490 -862606774 -169949721 -191710337 -850163459 -1488551922 -2055149151 -764802509 -1346141468 -859431531 -490731795 -1392074085 -1902296177 -155310303 -1107631416 -1572956516 -1156469842 -2061629144 -152378863 -1231043217 -1285892921 -1874383486 -1325631359 -1890896735 -1838416839 -277100037 -1475775163 -2064525338 -1584071187 -1129668050 -427993223 -1359365158 -1919173720 -348334100 -410796978 -104884141 -1851167247 -1972326240 -329540588 -228336903 -105051532 -369540490 -344308306 -1468753924 -22678403 -1051313702 -2081425645 -12205885 -1133362730 -247454220 -1434734948 -1643882520 -1356394985 -1391599990 -376632453 -1427329862 -1740653644 -2143555274 -547828046 -1083574433 -974168871 -440890169 -1222488233 -1383681182 -429212511 -377102104 -730819631 -1426561024 -1703695260 -1606769369 -365923758 -1834919345 -1624260495 -134018801 -1891126351 -1402605657 -665284080 -1629666278 -794700508 -1330637263 -125779383 -850181433 -1790640940 -466449522 -1301804704 -868264492 -769935679 -1719983778 -489984579 -1718516655 -1601852082 -1472943382 -1715422305 -1134719160 -1570136760 -1009470984 -1058016788 -923558756 -240211576 -2114185119 -844871771 -597981233 -47115071 -1589016201 -488656115 -865858677 -1137592267 -466322228 -1309858093 -930103654 -718646265 -839745127 -333821405 -1309067871 -533744382 -602634755 -949448033 -1569593421 -467506999 -1894951467 -1266820859 -1305300855 -1646015880 -704554506 -222752784 -742043967 -1095415240 -266632949 -1649086201 -767832025 -723609352 -502486103 -1378233117 -1205380877 -1623157588 -924813675 -2004282386 -545574660 -1865621577 -93114792 -1612214128 -1681675097 -881077112 -1363275319 -1065256590 -196343091 -1403448645 -1948481514 -1150672695 -1265743630 -380182228 -958856171 -778378909 -1891429686 -58306061 -697424195 -642700039 -16811063 -1223178084 -93105057 -1448597983 -564194242 -1272323789 -1451248544 -15016382 -1124745575 -1447818131 -342123560 -1256949901 -760350568 -1684296726 -1993122775 -1964553519 -689921208 -1241532703 -1489025069 -1417396192 -141702773 -39141288 -717631434 -963349686 -1138957869 -1943158572 -1882299675 -1229033768 -1872821930 -850363431 -554514032 -1785791491 -566138765 -1741667145 -1997597405 -2007732284 -545951877 -1763056755 -715519979 -1983347500 -880263766 -578270979 -1636841378 -1127521976 -866149504 -1730554362 -2056130813 -83726567 -590622784 -927714254 -1362189758 -102039 -1714969473 -2113906324 -454131500 -431239062 -77606409 -808342334 -828056616 -1453512552 -1558976839 -275756026 -361818756 -1561627435 -1874650058 -1510939669 -368891108 -167563267 -884767252 -1106432536 -750733179 -1106113328 -1828255264 -1290200772 -1261991245 -1738356943 -50123566 -613184138 -11785413 -508940767 -340104968 -1690212509 -487956247 -1988079083 -947084308 -497172992 -127606067 -1486488363 -1732651390 -793658410 -995965353 -1702143153 -1290310784 -963479282 -1169594194 -1451797567 -652511355 -1706841903 -805307095 -1354402271 -112310497 -2111881013 -774467875 -583190658 -570024098 -470465819 -84231679 -490105580 -1604696815 -2039730679 -1472064892 -1983026404 -1926054235 -25032767 -1966403804 -1722890145 -2092654514 -1904729879 -256350524 -631060986 -1967742816 -605344712 -1398538745 -1032170800 -321735134 -38573992 -1920505797 -1261715769 -1403399105 -1115862734 -330281087 -1936485361 -1394792042 -338359242 -267083038 -623797436 -148342198 -2106291266 -1316870514 -676262816 -1465688588 -43183779 -2087784614 -1660699165 -525906096 -2008548067 -1371914876 -241403093 -665174868 -1941623841 -1857879522 -968898874 -2062363764 -1761718968 -1853653987 -817292480 -929305148 -183057805 -1455946131 -1657949799 -1561951968 -886625248 -121516603 -72598324 -389319972 -2065580642 -2140696339 -1889831382 -1112898144 -2044024485 -623618336 -1433175792 -1208951392 -1503261077 -163814184 -150955034 -923069331 -604380189 -220186213 -555358110 -939824908 -895005071 -1374764709 -893906090 -84060218 -1903327847 -314718817 -226934758 -161520634 -257965830 -2009705164 -1491891332 -198554552 -2064251673 -1279550826 -509491524 -1006743279 -310635440 -317094223 -1495677754 -1559923343 -1151263225 -453363105 -401726179 -123304285 -53398640 -1970261681 -2137719474 -1249785208 -602439549 -1963588085 -1643741146 -1127805814 -1341647476 -490835632 -989778897 -805592217 -1851480431 -793558787 -1469085239 -1296122314 -2001099877 -744237072 -1447708976 -655039122 -1241348932 -547869519 -1780611144 -1546876263 -912321659 -356883233 -214670960 -202297760 -551839119 -1925685287 -266574672 -669624662 -1567383954 -1987700776 -1031329500 -1214391563 -594418253 -293652327 -497239083 -1238397504 -335343004 -1112778500 -33167777 -1252563466 -51981521 -1775062765 -637067231 -1982971122 -996929661 -729398533 -1164487055 -1515458274 -1151157698 -827254463 -856628963 -632611653 -112515674 -1265323558 -1909966712 -224973228 -1553824276 -1723459212 -919545348 -1506340024 -372068885 -2036853778 -364630019 -1565884442 -407722709 -2122736233 -682040420 -1933114901 -582045644 -653126623 -1310232944 -787773470 -872026535 -1721566617 -1322955888 -2021412225 -683970035 -4415854 -1202814180 -1434354049 -1684563968 -42208128 -722403786 -1715374811 -336487502 -1021003563 -1612543811 -780206337 -392757377 -1855988008 -1390477781 -843018613 -1664209432 -1540905096 -1486649299 -142535448 -1149008131 -1206703893 -236767383 -62208190 -1855996888 -1539723941 -962330037 -1181586302 -1139693905 -1428813742 -910421040 -625434405 -1891076417 -563364919 -218794010 -778922406 -288565530 -902787784 -1182319633 -579886140 -865564894 -494948680 -1398299929 -1313357582 -1763956808 -810325221 -1942183720 -530347640 -1495650430 -1100688875 -853786867 -110144415 -66279191 -1557833991 -395262513 -1010135820 -1494497205 -1045789123 -1571623213 -222482791 -499238910 -489751541 -2096814283 -951007111 -2003213603 -1909891602 -1110083105 -1976304246 -615894373 -465548471 -1190226076 -319487527 -917748789 -1376343969 -1666725146 -872837354 -316616021 -2048471328 -199780992 -1202192283 -1719549405 -1779412156 -722837770 -419409311 -970960523 -205276508 -1223532874 -1761093293 -2075352497 -1020022505 -156287534 -352083657 -1152575714 -1037529258 -187025566 -1570112201 -596707871 -120556407 -1114453328 -264714562 -1619010597 -2093296289 -1953624069 -1682248700 -1931688145 -224877669 -2095247810 -393099164 -1157951176 -1188605918 -1006779432 -918258911 -1360029835 -205498177 -654156463 -1438884648 -520930069 -2128324511 -114948298 -1348245833 -1867755734 -1602153139 -90357440 -366555651 -1717726761 -1211005506 -1667016723 -1478404699 -1161980303 -186666703 -1981152701 -499498972 -565646281 -2054423145 -1447721549 -866353533 -864702471 -1032590848 -939030929 -435501900 -856164324 -1413358568 -1000832909 -1906778259 -323734832 -1435243573 -1602408307 -83998722 -869764575 -212026896 -860670699 -1990075548 -141933211 -1764629107 -1372236279 -1348256020 -2038968643 -1549427722 -845020132 -944000913 -214160755 -217216913 -42456891 -608396233 -1145844664 -1725405199 -1413494152 -1132109550 -660094430 -306564608 -618097503 -986332382 -862073081 -1937589705 -628148827 -267726737 -705028294 -1743256759 -796952492 -525026705 -113525412 -1056120948 -1272430581 -1098618041 -409018181 -273414020 -1801913207 -940880055 -1448991524 -735986888 -225819896 -751387823 -1371296801 -590834803 -196150293 -310576306 -1470712732 -732109754 -1634821815 -1544464987 -1188195220 -546629087 -260023343 -83104156 -867179342 -1859172452 -1224336914 -242208044 -1309084443 -812269986 -268110723 -716230055 -1032692950 -507575596 -1017996088 -458035367 -1619022321 -142857910 -126176024 -1074075779 -244080971 -575113827 -114195242 -1576535523 -1179298375 -1341210462 -1735875922 -1301276559 -581666065 -715993311 -1348703836 -975477567 -961307371 -1173508016 -659410864 -1702772728 -1134159574 -755109446 -1643588799 -714793432 -509690306 -52705059 -1050664049 -1900125909 -186838026 -565611068 -1462598254 -1791031416 -586728713 -2052056014 -318056478 -488428363 -1332998107 -1149778845 -1275192209 -268659603 -1351321627 -2023017964 -1901821644 -769768760 -1062059792 -154850280 -1965959443 -696965759 -1527700775 -752441893 -1907182115 -668891683 -2133107783 -1050505863 -1388977454 -1396826488 -171554812 -1398671010 -1107665008 -2137537260 -334798157 -545469559 -99189070 -623389418 -1880718260 -419995627 -87755300 -1729545258 -128505414 -1569427863 -1979940987 -1609058244 -180340237 -878937342 -1907382928 -1896472127 -1054749715 -1848437667 -1193431767 -510444989 -1999244005 -1764851073 -807851547 -1169334095 -1375280968 -980736515 -1301616880 -2006473818 -869750285 -2119338513 -1558618849 -701469037 -2052366476 -1241024018 -1529490862 -773663044 -2088781570 -1236669481 -1357231501 -418538873 -1373894586 -1302134358 -2113791976 -679768311 -253000937 -169127099 -1398287912 -1111387863 -283051835 -575912740 -656624151 -2111127571 -996270063 -380953182 -1031378167 -2032337832 -1774536889 -388603887 -767758282 -1631694398 -521574996 -82710718 -697117817 -1935855934 -1553430688 -1550876637 -1574614420 -1103574959 -2115560421 -337252368 -991204543 -1144104422 -394445316 -160407723 -880623476 -181466008 -472417716 -677509853 -949802977 -1092686288 -1645776919 -983304273 -1508252646 -305252134 -34183455 -1143194436 -132696143 -1136049815 -312135228 -1901711022 -1058028453 -1119612411 -1074076663 -258938359 -1175130891 -17783578 -388368513 -1106794758 -396147392 -849911644 -1551264511 -1651161797 -1292635645 -1382712463 -1327821454 -45117754 -232364087 -1217939963 -102834937 -1769933971 -336772353 -1513527026 -904927267 -633388415 -282652726 -310538718 -838971216 -211601110 -146936338 -2100322363 -1929249202 -35751961 -1735271014 -1872006038 -22568469 -1351136611 -1060937699 -623186052 -610229545 -1893548390 -1307625837 -2067282708 -682548543 -1883203574 -1388478732 -1604740422 -625149881 -1404048843 -1298591065 -543724994 -843056173 -147996705 -594557709 -490005672 -2073026706 -585158814 -1436567285 -227715774 -403154664 -509531563 -1679678752 -1688245049 -1780594379 -1265106908 -416213809 -951249584 -1783490020 -540021314 -872332176 -416023963 -2055475156 -1949001250 -1295941059 -1102230739 -998091351 -926569540 -1450334383 -1830581631 -1734745295 -1626181393 -206296782 -1191408816 -870445884 -925369024 -600614794 -1359701858 -1135639679 -2008914064 -1080775514 -1177377472 -1268848446 -1023217212 -162636908 -1839313772 -319467439 -580129773 -665337431 -378852888 -91475261 -1973904022 -1077518898 -130523535 -1128249158 -202995496 -1541269836 -1174383538 -341923589 -43520951 -1312183477 -1358126896 -435057109 -1970496575 -1790615638 -41198808 -938631722 -168480792 -1273224398 -1555398478 -263784815 -1025138297 -238057798 -275376625 -427677090 -341085121 -983774804 -826532575 -1608759229 -1597246073 -1369161411 -1208557072 -1318375778 -205431100 -1674276971 -1094824956 -1083147996 -249493153 -1343343527 -1079077378 -554093131 -1154159325 -1883475571 -1664965017 -1355120309 -1442956928 -244263325 -1492453858 -1062994446 -831194529 -505325168 -1849758338 -1915112794 -815827522 -2077559806 -1611042869 -1323677907 -1271483676 -216371235 -861532274 -1438181044 -1580359523 -1024756965 -271461815 -1203458477 -1525635493 -400985671 -562488211 -516348183 -282494154 -1940386408 -387695914 -539841600 -2146846272 -25056610 -219649458 -124051413 -1872960701 -1035203981 -1908284320 -2013781942 -1290822474 -973518524 -247926375 -780309445 -2125693533 -993257639 -1290750542 -1912041047 -728583221 -346440153 -791484454 -965508860 -920973288 -1883407487 -520677229 -26326278 -84123064 -812096922 -1654391369 -1884961074 -862010174 -880311756 -1384838909 -559777377 -52517732 -49742807 -656218566 -1736911417 -1524971848 -2132006038 -1860830471 -1173374836 -568538251 -1267639054 -24318691 -702346707 -1770980637 -748218639 -1793912488 -1764265583 -1704939352 -1041387143 -601989351 -839561240 -1538199890 -1117408644 -542586693 -1038984089 -1016050066 -2110981965 -696553668 -1044138279 -1743175516 -1578985038 -1546107687 -879766709 -814168568 -2112807339 -1310843428 -310759823 -260115657 -1634625554 -393390007 -1751182183 -855567546 -2120728957 -1305491040 -547487881 -1808872219 -1936877801 -1548080181 -1819218662 -1883369895 -2036352132 -523400285 -695571883 -1723146960 -2113976925 -1640722507 -1933147669 -1132777420 -1147567285 -612725288 -889828051 -263935449 -1409360288 -373734006 -2105255014 -1080452326 -40524050 -335392251 -1940472829 -1840173661 -1886719980 -359172258 -31608489 -815413814 -1566820391 -1105832023 -1395329423 -780187121 -69794065 -502779193 -2009229453 -2086551143 -257104891 -424805273 -1466580683 -4238915 -376484054 -1080671516 -1576966733 -1984193904 -73390265 -814570477 -277757314 -1785211467 -1555093632 -1582689034 -1522142696 -1827088608 -1009566203 -510878874 -701614612 -204078207 -411040790 -2055148778 -758533498 -1209572294 -1201342756 -326450998 -1988688948 -459667128 -1126742037 -642616613 -762153928 -1928597188 -1962254545 -705770836 -1338258271 -1510525666 -2000677275 -84016199 -1163500514 -2114532863 -246954238 -1621472062 -513465604 -1227112782 -1799064933 -314579171 -27388083 -750010523 -1845335818 -600263152 -1892105705 -682739159 -791919392 -1833060885 -453894333 -740140587 -1317562285 -1565439778 -1524189449 -1867127927 -1788019125 -1498761404 -1847221365 -78396876 -1208819321 -1431027427 -1608602836 -1116232569 -103646991 -385740020 -2026869494 -62493297 -205339296 -131327143 -1749586932 -1961471400 -428354703 -992308577 -372251037 -803315148 -88003747 -1610226693 -491109757 -1302030478 -367880816 -367454799 -1797321668 -1080295374 -1697599080 -80003518 -294364004 -1720976187 -2137017113 -182622116 -575772049 -439514161 -1718241894 -1278911249 -497539120 -1986152069 -772014715 -155119831 -53852159 -1002620926 -1893208920 -2044604488 -1781794169 -2102624615 -1968492920 -327440758 -1443716092 -118630791 -962879921 -1833552102 -119843864 -2023645009 -1703148724 -1011073405 -72619124 -738905572 -2035501650 -1261734840 -1723925402 -164866090 -650470000 -1757526770 -114858905 -1993301329 -670543303 -1974597712 -1998948493 -1093148183 -818911596 -224500349 -48597864 -740514388 -1157584751 -1472551884 -1577966360 -1605055717 -1629345652 -1848390267 -396779967 -744181434 -512601110 -1729947653 -449107238 -1887813508 -1558228178 -577912481 -2054016433 -1054563906 -873029451 -1397706653 -2079586085 -1306975670 -1877344174 -1693790694 -496969426 -1001239599 -152082501 -545054377 -1711159784 -361489064 -315461285 -1968176199 -1446761852 -1916595230 -2108809257 -687072311 -604761058 -179000555 -1985222085 -174159156 -72724031 -354593874 -392119893 -1879212655 -885096156 -191871123 -1405010114 -274803586 -1534028852 -1881733329 -300391134 -2087218688 -739115471 -1268306849 -510531021 -1297700182 -603039942 -1316975001 -284892178 -1441786483 -2047430680 -2036962879 -50806879 -1360207494 -1043929343 -379071811 -1623430475 -1216258190 -1902047184 -265452246 -1132363703 -636676607 -1860204495 -1390014439 -1645564207 -1703220983 -78046771 -1767055527 -1350887926 -1176256198 -1750949151 -1233966016 -1017251833 -834243464 -209168185 -58955156 -869345625 -1760668834 -1383921025 -165286518 -1274152455 -2120866948 -1477222130 -613895943 -1237673813 -1057170249 -1728163312 -524459109 -1311357675 -363774564 -73154139 -1140968089 -1369187760 -1651404715 -1080391177 -1160276454 -1614847618 -845584940 -1846794381 -1492011376 -68650413 -608772852 -1033229256 -931335950 -2102492314 -1892393660 -1227431550 -714147768 -395433693 -1739674433 -718341526 -12964048 -990906389 -427997438 -1430206663 -698924170 -82976100 -862425797 -1423236576 -1664272546 -454178447 -1220277291 -731600987 -1673909434 -1360081538 -1074470498 -435672263 -1571971618 -1783158332 -1407792039 -1933460474 -2095123761 -455691268 -876456074 -1006900945 -813044255 -396347924 -2072769321 -554256413 -1750956252 -1353312523 -1124268684 -2022645682 -2087329011 -445830485 -502517012 -1897720680 -564343516 -1633688260 -1820158925 -506500960 -136458012 -2084756335 -156537893 -264900076 -441977101 -163201534 -591564719 -1726430270 -1461993273 -213050337 -881774410 -197860923 -1143847305 -368047191 -1016235777 -937259448 -726991791 -1516563554 -400245835 -1012966441 -1824104118 -241366654 -52744595 -1715145601 -779122326 -1501137323 -977102705 -357714326 -1297949129 -492124877 -1183283142 -1741196374 -527800149 -1629642133 -388895493 -1373813030 -2078906313 -619465901 -362677451 -961328771 -1533177816 -463273159 -1603762938 -1376445469 -1225151999 -1056439757 -188202503 -2023539537 -2077964467 -1969729355 -1780850980 -1282832621 -1979528914 -1125798274 -1960661048 -1841154168 -1186231953 -1909738970 -692280728 -95796050 -1578960747 -1137848850 -483745415 -2083586010 -1961722088 -346700625 -874270064 -773852874 -984287086 -846521561 -408714352 -1609410958 -1813437141 -1350110563 -996018139 -441833808 -2049843377 -1784972065 -1826431512 -703171966 -608723121 -197400339 -1992746605 -2084715270 -1613842085 -1125460985 -586812119 -1306377009 -405583335 -526015767 -1704304917 -1115856333 -222699480 -1993647286 -42591661 -725991976 -1892542025 -1573518458 -2011094448 -1219267403 -938282547 -742347508 -1902061533 -506615889 -2068069715 -1024873310 -79388583 -696569694 -1313487261 -1795988114 -142089766 -100881698 -1154100803 -899896317 -1977557645 -206934896 -1178772579 -1094091678 -1643846532 -751544669 -1859923876 -968618200 -1640043140 -1252444735 -203953251 -458388945 -1119156826 -2006994156 -1025136463 -207233760 -1906812533 -899777950 -2135647123 -779520303 -1747485821 -1007837175 -1515876336 -1735074791 -721569724 -582196659 -1043752081 -1694796671 -224555689 -978697244 -1387327535 -1583925266 -824657450 -158304412 -2037497498 -446213824 -502844644 -961780763 -539872772 -523270429 -660565738 -1785387223 -214057430 -628117285 -1885083990 -780375739 -1092413144 -1350013005 -1503844480 -1379133817 -1311060248 -1807369916 -309991397 -230081757 -1513525299 -875901578 -277421261 -432135990 -119889776 -647804346 -2053036579 -1766026904 -1242690341 -1618094112 -1722318423 -1073657448 -1803126442 -2004367877 -1982421897 -356039674 -1069360376 -449197689 -1260539818 -966543471 -1129811189 -686246749 -1761926053 -1039164288 -1897171012 -2063491675 -1391166322 -1677908965 -2008205998 -2065212134 -242149677 -328110274 -1958853269 -1522583573 -646973759 -978262752 -527271432 -1333430102 -1967867869 -559626836 -1817342439 -414460992 -1556425323 -342099554 -853481059 -1412880300 -1552517221 -1230622297 -653941422 -2119657855 -483348902 -1861842960 -1010408283 -1778815552 -1433132577 -482636887 -632425090 -1271918627 -1084141751 -1919147909 -2062012270 -149126604 -257417379 -1381823795 -1424363907 -1283971840 -1799029824 -1871985855 -1830836435 -1722268829 -240131090 -761456917 -951351546 -1349681707 -230686288 -936459581 -168529004 -2083523482 -910813992 -787327728 -1970375329 -1900317763 -1263844557 -674717022 -1255332594 -1495559230 -1715374122 -324907479 -1816568879 -298139954 -758858427 -228203056 -2968650 -501976669 -1406110467 -1588567281 -1533592263 -986432947 -404785389 -2147322874 -1592855483 -590959279 -140734778 -949918499 -886780895 -589992085 -1064974396 -1895959474 -1028525332 -1329380221 -473510959 -1871775778 -447555943 -1585002207 -1744935661 -1096970995 -644403470 -729088469 -248208701 -1230395233 -1132644068 -1053803868 -983972667 -2004532369 -452071647 -171028043 -1135199015 -1045125157 -1149764886 -1040583296 -2124118351 -288977529 -1384804036 -2121150513 -1948131791 -1715329175 -1716966897 -1324873140 -2032411884 -871645206 -1755021055 -950979840 -1544869906 -1551217912 -867972404 -155779957 -411171606 -2106289643 -1289592753 -1780434147 -719571331 -1354943860 -624862232 -864499394 -1914443003 -296068420 -302324841 -227293885 -1902400829 -1914196467 -447505162 -731525940 -412594505 -251149372 -1262128849 -1903583724 -320276262 -1289116052 -210971381 -300499270 -1757176793 -675246407 -1562771701 -1778975897 -1980567345 -1398838915 -1782160696 -1820392963 -145010332 -1942194226 -706921982 -1358216270 -1937165927 -2095646569 -652590736 -893514723 -2096289637 -723216377 -340206219 -1244454419 -1202182000 -1546723024 -484317433 -960074301 -1924136996 -14251599 -1155939576 -1739383070 -116370879 -1635244583 -59992175 -1118654782 -11591589 -1546308093 -2100506704 -732501095 -1769639061 -1822670924 -1923478860 -1837861729 -1684784502 -1601239419 -1913334576 -994088654 -225234118 -1643635212 -1494856723 -645757208 -2006526565 -1756269114 -452270983 -1373784548 -1600209339 -1780649192 -38865352 -374942376 -939493134 -1761330394 -1765341710 -464053018 -1825951269 -1221662453 -389698604 -1986797725 -886136872 -503315759 -289875980 -1452684464 -526203705 -568011589 -1005965408 -121859425 -1539440384 -491554832 -192471415 -756699523 -450725527 -1169109320 -1892454837 -108149742 -901548432 -1827367039 -1394188726 -935845465 -584499627 -1095029611 -227817287 -2109283655 -70344909 -1170879713 -1582678930 -1352324768 -1702939575 -1790873456 -79378640 -529457693 -1570696730 -1830952186 -1520212239 -1594152514 -915322826 -1405373121 -2080894941 -1830081992 -1927247210 -748010769 -447725045 -132132227 -248248191 -1894103663 -2050164560 -740643805 -1185212623 -1957728836 -1951590965 -1871608124 -1924762459 -1936473652 -1197998879 -2107968728 -1592686937 -2053173951 -1927354461 -403094679 -1648847315 -1047842317 -1719916419 -1505365513 -1173331684 -1990766234 -1012874578 -280162677 -1409958115 -1831477807 -1764389798 -1645137210 -969133345 -1708150567 -1325186473 -856148674 -1150329018 -1932015232 -1427261584 -593105298 -1849137759 -74976129 -1698382961 -369789603 -236183203 -981313165 -255955195 -429217424 -459674895 -1257282006 -2047072009 -303746676 -501754613 -1968982569 -2114520560 -40177717 -957024461 -57599997 -1715508429 -434721581 -626244773 -478545864 -594078233 -1021387128 -1616669825 -1406646931 -2014983141 -4537597 -1101465134 -1015469998 -951713677 -993566483 -39040709 -1174683828 -1093930325 -1079470308 -715616700 -1461453700 -1881865161 -368607911 -1850322229 -655010596 -761912450 -17560089 -927156184 -572641856 -1517451585 -292997323 -226005090 -1716459734 -1390919187 -1819278314 -738457412 -945727471 -1315133650 -1549560626 -931254013 -725377155 -149180066 -1155953213 -1968580129 -1793162421 -2042791396 -1373927983 -1863437737 -2044021558 -574424247 -1409326064 -1946014885 -496228385 -1431465394 -379579617 -1568191329 -524866872 -1722179475 -885842059 -1990844609 -182639556 -868886129 -480370503 -1196014848 -974614416 -1486714043 -1230687856 -1755791535 -1015535318 -2049546917 -1097336139 -338927737 -1231843915 -1858322325 -1968637954 -617543549 -265962092 -1111410837 -669175853 -466702032 -1250772980 -24054377 -554988603 -1171971700 -608351616 -395966745 -2108744809 -1751378422 -2006272772 -1785737457 -1805472974 -640341908 -1185892639 -501855866 -1523258093 -1246213164 -696638157 -316661255 -661235519 -157494608 -1312023552 -817751068 -46859076 -1581475530 -454133791 -469743899 -835824121 -1005466620 -328664097 -529538195 -776210197 -1949109101 -961109169 -2137294296 -546269503 -658945996 -332187193 -1760154198 -1324368361 -2138525819 -1917123741 -254075399 -1047740757 -12997499 -1553117346 -579504937 -901137014 -1355115654 -1364720343 -1729454841 -756350542 -1027852801 -763569939 -2105173948 -1865459711 -1667600224 -547887771 -2087372508 -1176884564 -1574478278 -962920012 -359877892 -1153780892 -1965603081 -1150040566 -1378969762 -701271510 -880013834 -672631149 -557803435 -1236212890 -125757505 -482477887 -107595737 -180320985 -555368978 -1122483384 -2081879640 -1200048909 -55600939 -329595328 -1148352083 -917923392 -15929296 -1435705644 -778501016 -1796198388 -1528681237 -51197551 -1483780857 -1324754635 -40698349 -1117351897 -1736323511 -233970294 -296173601 -2070101908 -820202709 -449400070 -366989991 -427744553 -1474935762 -841614613 -1689501549 -1423753409 -1760750189 -603770863 -716662366 -1856092986 -1007359380 -2075510359 -1525725492 -1913598864 -1141009776 -2069821169 -396789630 -906587475 -619216860 -472012658 -312150988 -19105695 -1134352462 -1849494415 -1774326227 -1142974947 -738711814 -926494591 -190666540 -486936456 -2028320922 -834323576 -1555610569 -1680914605 -984389950 -427873162 -1488983578 -720056955 -926891840 -424779542 -1034119766 -865751991 -1492004312 -2097409412 -215921979 -1900821270 -1136352118 -1097974455 -329686514 -533431538 -1787116588 -1362207574 -299535551 -592337089 -1822750978 -1121462791 -2108642265 -27921414 -1123770052 -84588599 -46409079 -460826892 -1291542762 -194497058 -441943072 -1738759778 -378120470 -666627817 -591533920 -1208791477 -963053319 -452884994 -956049190 -846089476 -1736596345 -524524038 -255135731 -1688871505 -1572022136 -484730711 -1463586706 -1224075004 -135253968 -1175741650 -1692875503 -147739818 -572025194 -1890631586 -1677024890 -34459355 -1485278442 -724861966 -80333131 -1539202401 -786741845 -713374336 -281263951 -591717410 -2145224260 -681188337 -497057802 -339091384 -1834775397 -1352410106 -989731694 -12251396 -1898266107 -1141400517 -47070568 -841054280 -861919406 -1502257627 -478699210 -1023880808 -578276645 -1732069840 -1756965795 -1423970315 -1111322037 -1324197900 -1421071439 -1782036986 -1888682640 -1133344173 -2083050368 -1549121582 -2142176093 -990253096 -185520222 -2039599357 -1412419685 -253411857 -633008598 -341519348 -1839377052 -1383014399 -2107492512 -31375566 -1195644247 -1188374350 -1409783350 -1041686099 -1331575549 -863166656 -989951907 -1565887640 -461471495 -1387967148 -1596482722 -1424423036 -130269296 -1150221579 -126287959 -807883677 -1709343005 -2039139116 -119600139 -74842581 -1601325372 -1210463000 -1139052969 -1394020625 -258055605 -1371069942 -1072982884 -1203147529 -594499751 -1663389213 -640386245 -1931064598 -482341475 -2109886547 -1613216165 -1343041780 -302582843 -268566205 -1929065088 -1236315257 -1846239674 -758985415 -215006725 -1550532821 -91066202 -1541300350 -1687232336 -1939796164 -1204883241 -1849323924 -1056367637 -1123565310 -938457099 -1528559325 -149706214 -1408988061 -560165758 -137586258 -1719834034 -120720818 -1730225358 -821527879 -1246695790 -218198751 -1511822628 -176397492 -1185215184 -2000771563 -1668714615 -2097588132 -1072185372 -684265227 -670740504 -993987625 -674723362 -1361888974 -1387276292 -722684165 -2132737370 -1267425513 -730302398 -1323360581 -233152888 -1590416488 -400959607 -124430563 -1802883810 -73935500 -1388400534 -290466636 -642421621 -1779890678 -175422436 -1977318168 -477012251 -588448306 -888484507 -1305311558 -1825901201 -380169577 -746230814 -596792418 -1541537836 -1383692244 -615131545 -529600157 -1817605531 -541280942 -568063502 -1878467199 -1241119046 -979142811 -286037516 -1364129426 -387847410 -938551225 -963051360 -419960081 -1637817325 -350394029 -672285329 -1188057636 -381738446 -1344408333 -1795402644 -1039513711 -1327472432 -621555941 -1130241379 -1473999138 -132160574 -724676220 -1253467403 -212065151 -1503622484 -1943014339 -1605659291 -1036195635 -1395143922 -1957439108 -1377099763 -1484453022 -1884413555 -249792929 -2086711465 -804153098 -1286527515 -1802586609 -1521329234 -1040134656 -1026276812 -45726580 -1874968081 -413501289 -459082531 -2038838493 -1509480319 -1611399422 -873813237 -1685896073 -956060393 -1034378297 -915915214 -624220002 -807958019 -811325352 -1571516261 -572424174 -6353858 -1562592703 -918040158 -1978415458 -1739296105 -802233771 -1240653331 -1741805394 -26181054 -1938310590 -2006644787 -1595742621 -1870447411 -1744011891 -603554134 -1369065357 -1741661141 -1896688177 -390934771 -1288220024 -183814314 -1285691012 -628382570 -2048761691 -784944639 -572504152 -1350544104 -1840090785 -493823048 -1807155728 -1005100975 -625719523 -240603702 -114712213 -1675332532 -1655769507 -1425006323 -1343639317 -1755452614 -1761741012 -76663848 -2146588783 -2139889928 -1221383587 -2145248683 -1091665698 -1672589965 -658602525 -1001921037 -867592732 -217083594 -2096731752 -1711392241 -2120910216 -56943759 -1423534598 -230677359 -786389878 -1240315908 -365704327 -294426175 -618400537 -1784457526 -1768509127 -11739362 -1882445257 -1528346795 -872681798 -1997153623 -991539151 -325410137 -1674807297 -1418079450 -887801744 -567532052 -1536321637 -1761865178 -16038163 -1117949666 -1045608859 -689409812 -1236434719 -1706553861 -259152495 -479147349 -2113302040 -1035348547 -43037788 -1781597524 -945095747 -1435166617 -309008815 -895695259 -89852543 -470686360 -1643380619 -1510879466 -1504542934 -233148313 -1513524463 -861850926 -351314267 -1106339866 -1340712136 -1950445428 -1945920588 -1058862353 -102584182 -1850461980 -856322006 -1916036295 -1304723300 -528983583 -44780901 -1013326657 -1435803489 -275498284 -324916256 -1964083918 -1387271789 -647002244 -1457010147 -213513888 -82741479 -1214117944 -290671014 -1929919020 -555964852 -399919467 -1970150406 -267520549 -1534593872 -640606234 -1333452427 -195600497 -1807573169 -1578580921 -1196564209 -1617790155 -908680418 -1435571509 -671577718 -32657794 -1271213773 -2122562455 -2056320868 -1130497305 -1480380126 -3243540 -827085605 -166116204 -186299528 -105009770 -1815130203 -1888116186 -202886383 -1854891292 -137841145 -1708752549 -705279712 -1673871791 -727415637 -50208688 -2043829592 -1643018979 -1875246927 -805098717 -2147160519 -1011638645 -982673216 -1639495882 -644614117 -2121948951 -335093728 -1218164062 -1721783183 -667813356 -1189535070 -1590651567 -56965066 -1781641347 -1681628908 -104778589 -77154783 -1807798740 -1074785424 -1433666251 -862161217 -1271407810 -1088775020 -333605053 -1967807101 -1685782707 -1198201678 -1221444227 -1016941516 -2061196586 -1472311145 -1826833281 -1013252608 -191261946 -1903990510 -714677623 -710772090 -1642472016 -1272374374 -153946992 -1816783556 -1758732646 -1054664014 -408060960 -1365269849 -227583948 -335038729 -293795869 -762265830 -1661850455 -548284303 -161951244 -1052777159 -907943680 -1938117825 -914327079 -1849722468 -1312245704 -256492438 -868725937 -2082990853 -548852977 -1129720574 -1310764091 -1124826511 -660625836 -647970662 -553342297 -1419794169 -1789796566 -1307441233 -1112126927 -1967082248 -240596571 -2142345143 -1683992799 -1179988980 -63306815 -993234440 -900844949 -741346493 -110387957 -2012005938 -1506294304 -1751136492 -87638909 -1920845368 -526434625 -154116735 -374686863 -940053437 -440924680 -1802514610 -311242041 -1922302642 -1396518626 -1439769119 -353848637 -751823516 -104054464 -791687790 -88009718 -1710581290 -1376158641 -699401097 -1656237248 -696394722 -520216504 -872855791 -626486680 -249309519 -404490536 -1486695797 -924027334 -1673151081 -1499344549 -910721145 -1374331846 -61228590 -424245217 -643654079 -1018975814 -1891904720 -1599751558 -529174866 -1112190635 -890338957 -260798003 -217912894 -1002391323 -181754946 -1033631388 -1247517533 -1144331470 -2062957405 -1001625020 -187402307 -1459547247 -2052364295 -1204367951 -1778779482 -826904087 -1410310472 -1311090965 -176146888 -1268281050 -76927228 -130765502 -900021233 -1929537210 -581335123 -1596302058 -535486835 -1970754915 -1837568724 -1055216761 -1108145201 -1618206423 -1462445753 -1375430756 -1350739784 -833917251 -1168957235 -1483845889 -270263812 -395974879 -97969300 -1597551498 -59988445 -1055964672 -793383496 -670453049 -457698734 -256198784 -228250453 -799570029 -1568298124 -172286790 -816123374 -607493429 -1004803365 -2066239194 -324077921 -759089455 -1963607005 -1961729586 -472719511 -1454811124 -1909239973 -895572737 -178108936 -2032167081 -1052208479 -2087557155 -2132763046 -1698962045 -1512519803 -1156399482 -879088624 -155012208 -392516045 -2094888378 -794576481 -1393599121 -1763772465 -2007039714 -1790829769 -1492614878 -1621773939 -1292145049 -1727200079 -1515271254 -155396205 -403902683 -196585014 -1174481212 -1983530507 -1808578768 -1299814138 -1772560082 -1524146990 -1153519514 -1867590329 -969674951 -73504374 -584916793 -1663887632 -427379790 -1786814962 -587746686 -1981259049 -139406161 -94689050 -153480923 -426012814 -286885800 -588853085 -1249154219 -734825661 -36430530 -255078315 -723880793 -769627696 -838680791 -1772879076 -443028207 -649270900 -931605893 -196973374 -1259196791 -2016608799 -1557167839 -2084147731 -665148700 -1501818265 -1684276664 -1655940741 -7968867 -788761555 -298901954 -680890545 -1934518599 -551677813 -1362098992 -622081524 -1373780272 -1528342607 -802294082 -106816661 -2118776182 -697456320 -1182624914 -1415776613 -838725931 -384063409 -1765355828 -701334244 -1934384172 -439846871 -867647923 -1144678731 -1456922091 -881040343 -745298736 -2111226648 -513973555 -1174310651 -1264395427 -1343254524 -1730687604 -561813 -852456503 -1373036784 -1917441673 -1302591229 -1202488285 -252004078 -594787062 -49774249 -1184664260 -1331326483 -972081688 -1868827487 -287752987 -131279465 -948262786 -976499915 -964041031 -2020975049 -1926287591 -1799563412 -102581136 -1799267858 -1577655999 -683785684 -1200995891 -939141884 -152838938 -373589154 -1818211097 -2129094116 -164797651 -1647699374 -1081750753 -388350169 -798487150 -548219947 -1227803599 -524724370 -1474632008 -31388429 -1411832688 -1125171513 -16623509 -218441653 -1299309248 -1876808440 -1279643944 -2074525750 -9787558 -1290730134 -1569043791 -1967293824 -1649070756 -508247910 -1580159251 -1953752755 -1697590655 -2085888190 -1999755702 -1775007964 -1863510471 -1118978249 -1153134164 -1833463820 -783571937 -1123821755 -953560920 -1975408526 -593913862 -406287378 -1621448233 -112971601 -338154059 -1113539651 -2088414399 -1508077425 -1655280081 -1789158129 -1314648809 -1990772527 -1118641029 -1927928565 -1462126019 -296628712 -1129217897 -1452206340 -1080308225 -1913585837 -922064987 -904239757 -1963309727 -1260345534 -1996179577 -1800617205 -633810911 -941092057 -717141844 -1324745144 -2028666759 -204355094 -769713305 -130027607 -1383121850 -1765937822 -1892972814 -223854593 -2080278654 -62080971 -1865310802 -1312370308 -203228219 -1157678003 -892354601 -1925472006 -976928199 -1719759278 -1011780373 -1217212065 -753955133 -1570403031 -1189720387 -410307092 -461304727 -732581019 -965438082 -1878891089 -1922987335 -19251995 -1445732915 -1803120247 -1900248512 -99943000 -409789046 -344440193 -1537895086 -289535110 -18649668 -2059841261 -168200340 -854634928 -1478603760 -212631236 -280394844 -1017021590 -1259516657 -950145720 -410716948 -907303578 -1917341746 -1770601787 -823337630 -1598409789 -1600383400 -411125125 -1325083476 -1272561742 -1155557321 -1757274226 -165319191 -1823287566 -1549962719 -1246780123 -1635583482 -1460900374 -1172049667 -1918742985 -1698905543 -562890689 -838344988 -424005349 -907159897 -1649978826 -737794871 -547819119 -933538344 -463422626 -1968371160 -428504085 -1355488204 -1183717252 -447348556 -246932545 -1256877811 -1696217585 -483537170 -731095942 -1775552707 -281587837 -1740302118 -530425086 -649801705 -1262910940 -15801632 -1437540443 -1551196751 -512319477 -1291509116 -1776492383 -1042336840 -1531161301 -931443906 -1769425159 -375103657 -1502659254 -786393258 -1297123568 -1649306679 -178438477 -1128311727 -1254592679 -1944709707 -34938209 -943443032 -1575273023 -1435297345 -358670664 -191252719 -1748912321 -1360702558 -774535403 -1718133754 -1608885916 -1578990835 -1643537866 -2006246148 -1338267889 -1672175392 -133325055 -968755564 -1801236241 -300530728 -138407752 -494298163 -1202478945 -95026698 -1533363565 -1437672955 -1630842288 -1232547755 -802859323 -1016887560 -1154358094 -929218860 -880299036 -1171053869 -214751528 -1556404136 -2133493292 -1087304685 -1391488472 -649833074 -1790129723 -464359991 -542795539 -254091517 -1318635983 -283729241 -1223657147 -1702265957 -1206793965 -1750607487 -1934070109 -1603840971 -540462453 -1844104408 -1378791752 -2004424734 -790533849 -21076154 -2039602170 -1459697776 -287337904 -1744914072 -734124672 -1139810289 -1237395983 -682648733 -1419613257 -896692229 -1813541804 -961697957 -1295635977 -269684859 -1402930043 -1822272288 -1666054549 -339531810 -647080591 -626304529 -1482864956 -963592057 -917519972 -1825583944 -1490482119 -136231778 -429925144 -1616906700 -1092837762 -2044116790 -27504824 -564592863 -1529495995 -859933375 -335289315 -210427477 -1896522977 -1909385665 -1196734534 -185475136 -1281838955 -311369981 -1925106575 -1277580323 -1750985955 -1852530844 -1267980902 -1474790733 -551595857 -2132148147 -2101772787 -536721606 -1248714642 -1936789610 -65854044 -854839303 -618567091 -288763310 -2079392597 -202506501 -1912665459 -485657470 -2007239690 -856859107 -205674567 -1471259546 -1332478064 -999350732 -618149537 -1860867820 -1801099479 -149455441 -1489213544 -290128223 -1397165271 -1570513399 -897191716 -1618485225 -1853303673 -1372016023 -1941380722 -2066745783 -248384656 -2040187271 -556072048 -54078992 -520035863 -2131789798 -373968438 -1750386344 -364803355 -184175300 -910331773 -1272607583 -1926007008 -1378772225 -1676234445 -1781835769 -654312168 -1908334936 -717001407 -1111904132 -370050330 -323254598 -1953885323 -1778177384 -1444861236 -37713176 -337673167 -1621122395 -1079063276 -317080817 -1270363112 -710404910 -1913728697 -1175629360 -1953101120 -1482979445 -740325033 -122578913 -746973318 -191155264 -110986136 -1328182156 -1812468974 -110513323 -1971548653 -145537761 -69275194 -372048884 -1700696971 -606650027 -1862131480 -1564596629 -238286088 -1964763008 -2063319184 -639593732 -1496200489 -1755595900 -2022465167 -1200897053 -1425455265 -299072923 -1406882881 -1685627497 -737070855 -1264184089 -2086264052 -1874417395 -1895539922 -419565809 -1453738762 -1065921015 -625915831 -1392468611 -2090643718 -321536212 -990259232 -288647974 -140940445 -111596474 -848714687 -761361035 -1487346419 -1121613053 -339128405 -309503697 -623242445 -1558026696 -1486571801 -987510209 -1330458647 -1418747565 -1379392314 -1360652033 -2072845375 -1832495991 -1697139110 -939222316 -1504659562 -45831462 -1490236208 -298172895 -1312497814 -198737914 -851049513 -1348075971 -1160368747 -1018532422 -882266317 -2022890931 -1914261660 -1543203913 -1468160972 -794352374 -1922000066 -606091088 -1057978295 -276606905 -1777640227 -1006798125 -1232432162 -1007571419 -1344282538 -1828649726 -1477472665 -529670394 -850595143 -153930322 -1536610866 -180486040 -1181964716 -1057247062 -871675756 -120991258 -1980543144 -992092708 -1039108048 -951945332 -592024774 -868640067 -639773763 -227014212 -1496904012 -694805079 -1720374014 -606230090 -1246701262 -310166655 -1028159316 -1620200250 -612957790 -502521871 -1979385893 -869527974 -530441183 -920343984 -2044113394 -2117911899 -1203837468 -1452886289 -1770792833 -1886764105 -1100781133 -256883426 -997610312 -1431681655 -1866794597 -480709109 -444514949 -2014623577 -403796390 -557602210 -1707962 -788429923 -1167613871 -380763611 -2140225664 -421647598 -2082628133 -895068878 -299685311 -961869762 -2035678965 -2094384398 -914119209 -503535025 -1827595995 -947284924 -1721442457 -1383682415 -449935542 -776733307 -3600636 -386347136 -1493249871 -1556683055 -378833984 -1921239380 -706143368 -1156952654 -1586315840 -200845375 -1911408188 -829540243 -619027777 -1589061971 -1257912505 -1906450467 -1256985629 -1360831064 -786852098 -418912860 -1217043154 -62551603 -1185288238 -1081106494 -297707391 -2078706674 -1559100522 -207012560 -336587780 -558892262 -208775456 -2048293441 -1505001477 -1497429573 -937974218 -2002712946 -2085283991 -434917697 -1774882738 -1906320736 -1224080359 -225255453 -2002212557 -117697009 -301191376 -504500453 -873675215 -1513643966 -722854200 -695548321 -1327140426 -1483982040 -411070022 -398967355 -1000389551 -897711294 -1761098083 -8374380 -1161767605 -906818711 -210633018 -1056083270 -639176435 -925140751 -1058997777 -231171703 -504894898 -1060661389 -274211176 -167328570 -1235182067 -2128068167 -101541984 -1514109370 -2102448287 -1152431871 -767443604 -637868546 -418286798 -1432237355 -469026262 -1659400944 -181542219 -1753295993 -2022633864 -1888703885 -1490408888 -1052922008 -1194937176 -42050288 -217070553 -1877551665 -886124637 -297682114 -1653876135 -1815357824 -1418775039 -1841147832 -1079742801 -1000439257 -1733120036 -80257144 -262088892 -439047847 -323353437 -1467588749 -1914418648 -2034217582 -1155240434 -726321711 -991947229 -741526142 -982265053 -1221951282 -949080313 -1831774322 -305466462 -1488910504 -1639385884 -943361378 -202914245 -175684279 -2083146175 -1011866184 -511953895 -1589623383 -2103629401 -1676062046 -1031809423 -690522836 -615676264 -1094757802 -2101974365 -1777159405 -1515557359 -668995646 -1732930277 -1185944925 -1380626668 -631603241 -344004366 -655401638 -891704403 -1735012455 -1821372219 -1570980395 -156058900 -804399313 -1129695726 -893143755 -156397755 -57084357 -1639081537 -123168643 -2068630840 -1865766597 -382982285 -774773936 -1432190591 -1830547361 -1158769405 -2055678839 -1077334137 -1320212702 -1013841710 -1502364672 -130320878 -2017160253 -88036982 -21323691 -1904989235 -320379522 -877123225 -1482289567 -2030447369 -66296306 -1845485796 -973459751 -1407612211 -1058574925 -1714232727 -468834537 -584562516 -4521387 -829023664 -526819112 -173738803 -1597785748 -1849544548 -469427911 -1967464746 -226789516 -2015405634 -662926507 -660642513 -928261001 -1961431999 -1913625743 -1592765129 -1219863248 -215231227 -1028770641 -1157321290 -1339530151 -1412176356 -458748648 -722234206 -1012727398 -2101475711 -1986216215 -1850116537 -1492912446 -180548374 -82128607 -1650996475 -661552438 -1188984947 -934668894 -137223653 -2067982740 -1710568132 -1155012135 -1184267712 -1108995188 -871552403 -195281034 -733325822 -598440221 -1318875446 -13416588 -6811581 -665608576 -641019609 -1838595111 -1125833894 -411842741 -501153706 -459473208 -15012244 -1055198209 -796341737 -997485655 -1484055103 -1639039863 -1570237372 -552973221 -1659184778 -843407551 -1758639457 -1635920138 -676626825 -1141136910 -2059078660 -236067215 -1179386496 -674776462 -106857027 -649723897 -2102675531 -676754485 -1139234883 -156481929 -1471796775 -1771751279 -815496851 -814939603 -39207055 -1822977403 -632020472 -913954842 -2035986150 -814791752 -1849242592 -1836904360 -626669248 -1170246248 -1673450910 -96119611 -574599533 -60390572 -1372062220 -570330054 -1317701017 -1749624855 -451359614 -1088791294 -607122171 -1207521100 -1086663550 -1353350762 -1766951557 -1750947783 -1210974040 -1138167661 -1547034598 -1425974357 -433517579 -1865419629 -993942050 -2056227984 -1716879564 -2004551056 -766144056 -271201780 -1128017526 -604923766 -766150264 -375539636 -240223719 -170788873 -1410436119 -1275356447 -881524022 -284557101 -105114638 -1430163032 -2113101600 -1961520761 -1257965030 -641754495 -1304922231 -1724933253 -2071432318 -1705567109 -854680807 -102208466 -1978254109 -1174987109 -1896206798 -890332506 -152376046 -1183697898 -122065878 -714328661 -1288218697 -161511425 -103190167 -1297833640 -698584901 -823332958 -1519887485 -430979330 -7257979 -1725768821 -1082438165 -1204265418 -55507351 -904145459 -378443241 -1796472720 -1844411867 -103804224 -880871404 -53424610 -259255824 -68314205 -1400575937 -911518392 -1888760293 -290974497 -588106860 -1592252526 -1194479215 -935034349 -1984458544 -226227451 -1158713767 -1120570973 -4759021 -527971008 -206302052 -1279981706 -1308840743 -1011371380 -785717655 -679682182 -952914481 -1848126488 -258413608 -945575422 -907129754 -1143365425 -859024619 -94212752 -738275025 -27832809 -1782069464 -287056739 -1314341211 -1115940235 -1632840394 -454976945 -1755731295 -3081638 -253482338 -1817582765 -158652780 -1450067533 -1640600975 -2038042992 -1024396894 -662199459 -1326048659 -314523247 -1234957062 -493892779 -831640998 -1566678710 -872083103 -524821346 -957023993 -49734321 -513594364 -1243698455 -1381596934 -1906478374 -1726018578 -985136770 -94775020 -1598378713 -1078089068 -1123436137 -914930135 -1247866425 -565708373 -950519742 -254453761 -964419950 -1947015741 -137746001 -109667341 -638031061 -1002192756 -1139406671 -896239198 -641900728 -1615176615 -2080070225 -853982062 -1243303133 -1179871021 -228253549 -851604501 -2085824699 -932662465 -774909802 -1568206806 -784988811 -1314902956 -1967253862 -977429422 -1553879651 -506663190 -715573975 -743374625 -1984947776 -2006298734 -74597144 -1771233007 -694833935 -57873159 -2011574869 -703768562 -2045777505 -21854418 -87499689 -1728458475 -1190296356 -1500683487 -1939415641 -1251884121 -1519131988 -618243133 -1286452145 -535843019 -1514688462 -1097829296 -37482848 -761517765 -1974023882 -944522271 -386690073 -814541089 -1931316845 -426889510 -2136613590 -1990545643 -1600368935 -168011870 -1981986932 -1635517507 -352058549 -730585558 -1787463407 -748743566 -2026425989 -1198439350 -921030237 -693065683 -403632853 -2104003145 -1515126513 -2017701512 -595042407 -46390370 -146384729 -1419364488 -1010598940 -688220457 -574298057 -1435934381 -327916481 -849257965 -1302299793 -599290727 -580944259 -1469501751 -1853988557 -2145443176 -65542255 -2057052521 -542487394 -1517549443 -1937696729 -279417548 -1771476894 -498875450 -823530262 -541008519 -284417435 -2052715470 -664115235 -1312241186 -180558412 -250837273 -311648250 -159522717 -1038713163 -757564078 -2096399530 -422704381 -516627191 -676814316 -2144814500 -236802958 -660117215 -689512103 -808155909 -1989778935 -1599209461 -8085175 -596066464 -77847193 -560231728 -1246344048 -748921898 -728684619 -2050636339 -79898870 -683028715 -1363519790 -879113393 -571304791 -520236600 -1210609263 -1449811563 -1633480479 -475467305 -392344648 -1361702646 -403145243 -351192816 -1212596556 -490506662 -1903231048 -835301671 -814584058 -506013181 -528290947 -1288549531 -1426871169 -473851334 -1150007462 -822590834 -1931911299 -1827943300 -341989118 -1144866854 -323738058 -1489462955 -187011606 -1335486481 -22207723 -1730529530 -1638779389 -1487418148 -179678709 -498054481 -2057889808 -1729868121 -1259896561 -892741307 -1982388807 -1947379691 -1959686357 -491908060 -1834207117 -391262734 -357843224 -1316854168 -401535594 -1215109484 -1923098265 -1883652505 -343727461 -296426597 -2027238386 -1967493847 -715890023 -1760226067 -384786997 -1041797462 -1055769843 -1813859787 -2011070944 -824235675 -1659466575 -1284602436 -1660038561 -160552903 -1173180089 -1590392716 -1423603 -304175504 -1266615868 -7500765 -1511305829 -80491287 -2049846646 -1839914148 -1820052283 -861652513 -1311554270 -1520463082 -1515103521 -1631274968 -2062149574 -309311285 -1684341255 -594038031 -345712114 -1440234863 -1739157104 -613527611 -1489568830 -1966452731 -397722587 -1554410245 -834421960 -1061666810 -2139936394 -2002337649 -72634606 -999111546 -893117729 -1866462420 -1340261211 -814199894 -491819774 -350384315 -509022131 -1707589716 -488898304 -641361906 -1149129849 -1104934672 -1345936695 -1712779014 -1806083910 -170925025 -1551259136 -1560824172 -1259110699 -569660555 -802849559 -852784012 -435029606 -1508253654 -322193590 -1301393043 -391929006 -818458493 -1199132816 -1838695064 -658260318 -1692898929 -541460600 -1440091861 -1483206137 -255370183 -1334338975 -63427204 -869128716 -262562918 -1963551888 -1035378167 -540861128 -2102184192 -1008754500 -1900972082 -1523565755 -2122121104 -1080985552 -412518844 -1126998592 -659569204 -69025814 -475686518 -1929173892 -917500438 -1497276006 -504457296 -148335516 -1993986892 -1455382409 -773408733 -2109543887 -149096839 -1904640671 -904515315 -152162092 -1882740314 -44918853 -1184402274 -1223095075 -845456441 -1834595335 -473591719 -1081625451 -429883102 -910306806 -852987214 -1702761973 -953400289 -1423166956 -494169206 -1182582293 -699445466 -254463384 -1126153711 -1492039766 -545801143 -1377154064 -249606282 -1097218983 -517370492 -284572341 -361253318 -648245557 -878535268 -1592176151 -2058328237 -508609736 -1218917892 -1506502111 -948781447 -1103700754 -2082313339 -2046777061 -1789006581 -915065220 -1370756373 -97795995 -832298010 -1871661159 -668638057 -17899248 -184950556 -1055157483 -111859855 -980391860 -1951451236 -1670666468 -542643151 -1987873695 -1790095486 -2036422379 -1704041614 -985490106 -1738325878 -1675497758 -137755595 -270913699 -581207453 -1598036015 -1760814723 -1688393801 -2133185596 -210825307 -2140400846 -1218447825 -48536983 -1864771068 -830995558 -1456186865 -1408998843 -741378832 -653909530 -1583649011 -476606959 -219156603 -430572016 -1751466169 -1333552954 -1885157786 -2020665111 -1012126919 -599159746 -527030239 -1574666645 -1981320534 -1172784556 -1385120526 -997947002 -647979544 -702622071 -2104056091 -257506288 -728633711 -1195025583 -1527906737 -2066561580 -1447452129 -633178887 -1056082924 -633361213 -1972952359 -115304386 -890565908 -1927679813 -1576318449 -1825902951 -409581827 -1156677754 -1261038834 -763570795 -2119560740 -998620744 -1234143103 -1846069395 -44589909 -2098291407 -7226415 -1195272673 -1385781073 -1362342196 -414643858 -334886891 -2036821897 -1976289699 -371402944 -1581801626 -1639861969 -354987385 -563408329 -948385880 -897857126 -2064612860 -907569794 -2096666764 -619138925 -1309642760 -1605969217 -1950154623 -1353328247 -1388541952 -519795315 -236383209 -47846713 -1000821413 -1713564987 -2131030239 -492962207 -223902923 -745077317 -537321162 -588034099 -369358399 -1578872163 -1796501209 -175742843 -919947676 -1825815779 -1091965670 -271768428 -2061735874 -1946189973 -1291448754 -761988249 -1291513882 -1856594545 -847126905 -1992796372 -773665592 -2131605806 -1576582188 -1963597030 -1794079761 -280655600 -1104580388 -1833936448 -137096145 -2072439431 -1452246124 -1748957913 -2126967302 -926656752 -768622820 -1129599035 -1415541765 -1186602889 -1701609381 -909139368 -559209571 -1246820525 -167136249 -150326667 -1099523397 -592950944 -1402393728 -1398360671 -186764729 -1481192036 -764113028 -495452536 -1276673133 -1536229154 -207503397 -2143634298 -1875984414 -315140844 -877491606 -1231218093 -2077550206 -1449695669 -1833133668 -1677158214 -127752176 -1794658679 -1420595838 -231061920 -807255664 -1891746749 -1092216608 -194316100 -1695549260 -2135900777 -747715787 -1932413512 -1678702603 -314494335 -749033078 -449803232 -700482784 -508797834 -85313684 -1495494439 -626431785 -1474172901 -905111668 -1585132375 -1785185590 -1120178893 -2005005049 -1953953466 -775973138 -112342135 -496137232 -2046940570 -242135050 -82274285 -1951922974 -1009232446 -1343875916 -1437004713 -1137117229 -1072293150 -348206426 -412463707 -200311033 -1520656782 -475652127 -1351164355 -1527231107 -1448666405 -1714162796 -1440987867 -1509993450 -1645657551 -1124569944 -643471561 -98879435 -1861804914 -370969161 -733661686 -1948339175 -905864769 -1357599000 -152643625 -1385930857 -1732278237 -964526880 -1596704604 -858626516 -1993230219 -1622881180 -574191713 -1796094420 -1928774708 -650865891 -1968815866 -1460226886 -590155086 -1657048556 -1447146396 -1937175297 -105644512 -1745820762 -940477973 -1133650291 -785524653 -1730864862 -832253372 -1121430293 -1562448379 -639870337 -1850133430 -1776833097 -326266097 -1028541488 -1600914113 -740883928 -925992590 -343470321 -269641911 -681103007 -1210400139 -82548142 -112186632 -30081958 -928811061 -468872184 -1217295645 -11200546 -1416499333 -100579089 -363118634 -1933840511 -2039954679 -941865598 -833143549 -1050249603 -1376982928 -1668290824 -1417383736 -2079838428 -1253137177 -1104407710 -1079220949 -819607281 -1179459909 -1908628753 -1360216432 -1194150309 -1849562148 -765231111 -2107204341 -1630536510 -388304203 -25936588 -2124537822 -896575685 -2002270443 -1090587011 -722966732 -439389998 -1778918000 -1007492466 -17319467 -1177989524 -818188175 -950865484 -1770372261 -1260661442 -863194392 -1456110859 -131566001 -1469106044 -1645791949 -1235913483 -1536074997 -1911553992 -1132584424 -51367160 -39432026 -1309097706 -1035181227 -1525857842 -1990521667 -1197404303 -704864484 -1137585736 -356555711 -1152459647 -1234274836 -1912622279 -1907414857 -285619183 -775657636 -1252150962 -1708961381 -2067635489 -169287869 -1952865655 -1820486484 -1716817779 -966130561 -632483760 -110501670 -1775696682 -553892015 -2068970007 -1123695425 -977816257 -1612964555 -1409199804 -1971446712 -579699021 -2015623155 -23834660 -1157172278 -982569114 -2037337215 -2047304737 -2067722525 -1632101921 -928363116 -1530195157 -1873330874 -814250651 -1344892673 -1345770436 -1065947648 -1073536662 -1920559787 -21642052 -813231621 -1397924639 -1448309493 -10510106 -549692488 -206996422 -65356414 -1081106481 -297488900 -554012084 -1939486043 -287646888 -495557219 -888596667 -1042901031 -276101203 -1868241301 -1173143120 -969054733 -386918683 -361822065 -1617241798 -282378907 -3430079 -1814762931 -10342976 -2035705872 -399126700 -1531017319 -659022079 -1610914174 -1308184689 -722490037 -1017511721 -907213786 -408207602 -1682398296 -150980823 -1356505054 -1094046026 -876573368 -830777556 -2087194545 -333344070 -1876433114 -1413990803 -889388319 -1463294313 -604793147 -718320378 -1805013259 -1503846491 -1412932694 -285619532 -781523279 -1051765101 -1078154050 -68104964 -31346097 -700358764 -571877341 -1553149862 -1126001349 -1078775279 -1919166179 -221592513 -568722093 -62504254 -389493595 -688695109 -2109323280 -736322284 -1567853174 -1283946728 -1376972440 -1492019008 -196921437 -386291632 -560394143 -1828569306 -125853725 -2099647427 -1323018085 -919273557 -1233315981 -829531823 -477512837 -411862620 -835260059 -115211174 -1471435471 -2141765892 -538455830 -331046352 -1913392334 -1964827360 -997399601 -37745525 -881362810 -1870034311 -1243491132 -44602920 -169483637 -948171137 -1583638819 -305310015 -1006989422 -152593547 -544269911 -1411541604 -527890019 -992603576 -1035331936 -1911340358 -1837005080 -171986641 -66486425 -745848535 -614280206 -1253531113 -1282839121 -2088774414 -1116398589 -746461484 -178695814 -1158407392 -266293642 -241320746 -1428652486 -347675095 -72318178 -2123357091 -379382591 -404258994 -1890136697 -1949360055 -883925753 -1995744372 -928577711 -841926028 -481002513 -1080788683 -1398708855 -1743725923 -92257252 -84441230 -1864545590 -1336354106 -1719479216 -599745633 -1784098460 -28654159 -554113385 -1494568303 -93249562 -1729809871 -280888811 -729190371 -1960875615 -1152414443 -474531208 -1839231545 -1084961897 -670956202 -324256617 -1614949480 -410095927 -1207221866 -352405006 -111037416 -42561469 -218555032 -1057386454 -1066953453 -798232121 -556914838 -1333948640 -2093001447 -1293181869 -1973164643 -1535677927 -1680449443 -1756346804 -1758006813 -1740490665 -1551850868 -768645661 -1513487722 -244344939 -716656709 -1761015787 -772709155 -1089154676 -272032504 -57610265 -1888082705 -1787654863 -1819060911 -1379532485 -1569022383 -1607489568 -1732890116 -510958998 -2048258680 -920773350 -670533168 -1804258767 -1708001329 -964427054 -2066412669 -1092188599 -1871052484 -1176055567 -526427581 -35728227 -1336373676 -2048392206 -1017461185 -57855234 -1710309394 -1101369863 -1561733948 -1517330402 -403758289 -2064722350 -600284577 -104712033 -1106031738 -456972134 -929134466 -1609372725 -1170855110 -1169176309 -870855313 -1364191286 -1427528430 -783018726 -415939066 -628611277 -1597672946 -2101164981 -1058744399 -267614951 -973724639 -1564617533 -589619616 -1247338854 -288757164 -1976096775 -1423896570 -2019373469 -778336295 -1175216188 -1451370257 -2060646773 -821538642 -1427589531 -1809943233 -610057276 -1145706954 -1558396876 -1265736120 -253961658 -1283579417 -1646027404 -898238374 -2029797055 -2021370790 -2135055637 -1575833336 -115059701 -1073112407 -1232556943 -957282039 -91746149 -84267697 -1095460106 -1020695811 -735123241 -742890296 -287281214 -792125242 -997814541 -569191164 -1503729610 -1595997374 -1857113788 -984109418 -7939132 -289005410 -1853400003 -843550686 -2016825755 -908580037 -1895951689 -897682837 -1282821284 -1788987955 -602018038 -1321703649 -302384175 -1224520423 -1178960160 -2099281898 -1622023123 -1185213243 -1968149176 -992586291 -744822941 -556991024 -466923095 -671211527 -320536598 -1369615910 -257387177 -874218781 -2059423140 -1730775281 -1474149152 -505962225 -1819357102 -2062647328 -85128175 -525128323 -1821419138 -212064381 -1490681094 -1332920956 -2000585635 -691306366 -899563092 -672012364 -895302175 -2073224343 -1759360226 -864982839 -1449768530 -910224848 -1623002755 -470019091 -1166008771 -1321135322 -1487930521 -201197132 -1380937146 -1554839693 -1609703555 -288663979 -409936480 -674879784 -1843389881 -107154698 -1357713100 -2070322325 -229783934 -802981432 -921689876 -1042200121 -1380808715 -1543783523 -472248007 -2120177984 -635222417 -1041953282 -1527152936 -134846408 -768331671 -531225086 -1210499823 -1757937130 -569328484 -1664183203 -1100074293 -1261925428 -632170624 -1290075859 -1310062101 -63898816 -205577012 -1979136308 -969720173 -833550528 -1447894715 -1629270848 -591159439 -1357340251 -98816476 -803653001 -1471331824 -399770763 -1618365925 -1995712220 -388199047 -406063343 -3575635 -2113638976 -255780958 -1795783459 -997420475 -388574843 -279615774 -808093982 -948971846 -8769453 -1359308575 -968183239 -772104554 -1665043904 -533490471 -630119872 -1182825347 -489486750 -1941439240 -902774162 -953374679 -992739686 -1175449059 -1070265860 -635281748 -2039129399 -2103770167 -1894432561 -1135502305 -1847552893 -1355420678 -48807770 -2120920883 -236224028 -1667458940 -320811230 -1690388640 -1300706317 -1735027006 -2065930876 -1584628236 -1902056005 -413706793 -1765504612 -1054463285 -1329375951 -401745069 -440788515 -1661473102 -648563373 -1925101486 -1192049500 -901003637 -1260932062 -1116537438 -932612980 -2090699054 diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvh b/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvh deleted file mode 120000 index 024718a3..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvh +++ /dev/null @@ -1 +0,0 @@ -../../raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvh \ No newline at end of file diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvi b/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvi deleted file mode 120000 index bfa835d2..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvi +++ /dev/null @@ -1 +0,0 @@ -../../raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvi \ No newline at end of file diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvt b/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvt deleted file mode 120000 index 7242959f..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/model/raven-gr4j-cemaneige.rvt +++ /dev/null @@ -1 +0,0 @@ -../../raven-gr4j-cemaneige/raven-gr4j-cemaneige.rvt \ No newline at end of file diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/ostIn.txt b/ravenpy/models/ostrich-gr4j-cemaneige/ostIn.txt deleted file mode 100644 index d2a68d80..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/ostIn.txt +++ /dev/null @@ -1,77 +0,0 @@ -ProgramType {algorithm} -ObjectiveFunction GCOP -ModelExecutable ./ostrich-runs-raven.sh -PreserveBestModel ./save_best.sh -#OstrichWarmStart yes - -ModelSubdir processor_ - -BeginExtraDirs -model -#best -EndExtraDirs - -BeginFilePairs - raven-gr4j-cemaneige.rvp.tpl; raven-gr4j-cemaneige.rvp - raven-gr4j-cemaneige.rvc.tpl; raven-gr4j-cemaneige.rvc - #can be multiple (.rvh, .rvi) -EndFilePairs - -#Parameter/DV Specification -BeginParams - #parameter init. low high tx_in tx_ost tx_out - par_x1 random {lowerBounds.GR4J_X1} {upperBounds.GR4J_X1} none none none - par_x2 random {lowerBounds.GR4J_X2} {upperBounds.GR4J_X2} none none none - par_x3 random {lowerBounds.GR4J_X3} {upperBounds.GR4J_X3} none none none - par_x4 random {lowerBounds.GR4J_X4} {upperBounds.GR4J_X4} none none none - par_x5 random {lowerBounds.CEMANEIGE_X1} {upperBounds.CEMANEIGE_X1} none none none - par_x6 random {lowerBounds.CEMANEIGE_X2} {upperBounds.CEMANEIGE_X2} none none none -EndParams - -BeginTiedParams - # par_half_x1 = par_x1 * 0.5 * 1000 --> half of it but in [mm] not [m] - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 500. - # - par_half_x1 1 par_x1 linear 500.0 0.0 free - # - # par_1_minus_x6 = - par_x6 + 1.0 - # Xtied = (c1 * X1) + c0 - # --> c0 = 1.0 - # --> c1 = -1.0 - # - par_1_minus_x6 1 par_x6 linear -1.00 1.00 free -EndTiedParams - -BeginResponseVars - #name filename keyword line col token - NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' -EndResponseVars - -BeginTiedRespVars - NegNS 1 NS wsum -1.00 -EndTiedRespVars - -BeginGCOP - CostFunction NegNS - PenaltyFunction APM -EndGCOP - -BeginConstraints - # not needed when no constraints, but PenaltyFunction statement above is required - # name type penalty lwr upr resp.var -EndConstraints - -# Randomsed control added -{random_seed} - -#Algorithm should be last in this file: - -BeginDDSAlg - PerturbationValue 0.20 - MaxIterations {max_iterations} - UseRandomParamValues - # UseInitialParamValues - # above intializes DDS to parameter values IN the initial model input files -EndDDSAlg diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvc.tpl b/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvc.tpl deleted file mode 100644 index 459e99e3..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvc.tpl +++ /dev/null @@ -1,25 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of GR4J simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "para_x1" wouldn't be detectable) -# para_half_x1 = para_x1 / 2. = par_x1 / 2. [m] = par_half_x1 [mm] - -# initialize to 1/2 full -# GR4J_X1 * 1000. / 2.0 -:UniformInitialConditions SOIL[0] par_half_x1 - -# Fixed because SOIL_ROUT layer thickness is fixed to be 0.3m -:UniformInitialConditions SOIL[1] 15.0 - -:HRUStateVariableTable (formerly :InitialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 par_half_x1 15.0 -:EndHRUStateVariableTable \ No newline at end of file diff --git a/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvp.tpl b/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvp.tpl deleted file mode 100644 index 2a10f917..00000000 --- a/ravenpy/models/ostrich-gr4j-cemaneige/raven-gr4j-cemaneige.rvp.tpl +++ /dev/null @@ -1,62 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of GR4J simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "para_x6" wouldn't be detectable) -# para_1_minus_x6 = par_x6 - 1.0 = par_1_minus_x6 - -# -Global snow parameters------------------------------------- -:RainSnowTransition 0 1.0 -:AirSnowCoeff par_1_minus_x6 # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 -:AvgAnnualSnow par_x5 # [mm] = CEMANEIGE_X1 = x5 - -# -Orographic Corrections------------------------------------- -:PrecipitationLapseRate 0.0004 -:AdiabaticLapseRate 0.0065 - -# - Soil classes --------------------------------------------- -:SoilClasses - :Attributes - :Units - SOIL_PROD - SOIL_ROUT - SOIL_TEMP - SOIL_GW -:EndSoilClasses -:SoilParameterList - :Parameters, POROSITY , GR4J_X3, GR4J_X2 - :Units , none , mm, mm/d - [DEFAULT], 1.0 , par_x3, par_x2 -:EndSoilParameterList - -# ----Soil Profiles-------------------------------------------- -# name, #horizons, (soiltype, thickness) x #horizons -# GR4J_X1 is thickness of first layer (SOIL_PROD), here 0.696 -:SoilProfiles - DEFAULT_P, 4, SOIL_PROD , par_x1, SOIL_ROUT , 0.300, SOIL_TEMP , 1.000, SOIL_GW , 1.000, -:EndSoilProfiles - -# ----Vegetation Classes--------------------------------------- -:VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 0.0, 0.0, 0.0 -:EndVegetationClasses - -# --Land Use Classes------------------------------------------ -:LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units , frac, frac - LU_ALL, 0.0, 0.0 -:EndLandUseClasses -:LandUseParameterList - :Parameters, GR4J_X4, MELT_FACTOR - :Units , d, mm/d/C - [DEFAULT], par_x4, 7.73 -:EndLandUseParameterList diff --git a/ravenpy/models/ostrich-hbv-ec/OstRandomNumbers.txt b/ravenpy/models/ostrich-hbv-ec/OstRandomNumbers.txt deleted file mode 100644 index e9e16423..00000000 --- a/ravenpy/models/ostrich-hbv-ec/OstRandomNumbers.txt +++ /dev/null @@ -1,16833 +0,0 @@ -16832 -2067261 -384717275 -2017463455 -888985702 -1138961335 -2001411634 -1688969677 -1074515293 -1188541828 -2077102449 -366694711 -1907424534 -448260522 -541959578 -1236480519 -328830814 -1184067167 -2033402667 -343865911 -475872100 -753283272 -1015853439 -953755623 -952814553 -168636592 -1744271351 -669331060 -927782434 -360607371 -529232563 -2081904114 -1611383427 -604985272 -1799881606 -1155500400 -800602979 -1749219598 -82656156 -1927577930 -2011454515 -828462531 -1833275016 -1905310403 -1423282804 -293742895 -2019415459 -1484062225 -1758739317 -1166783511 -1457288620 -598842305 -1634250293 -528829321 -1747066761 -407146696 -1031620330 -1807404079 -884168938 -1787987373 -965105540 -584824989 -120937804 -1082141766 -517654719 -766608236 -1630224099 -1580063467 -343911067 -1234808992 -152763936 -1260514187 -535763254 -174078107 -858017135 -341298340 -272379243 -1590285344 -344306046 -1430770104 -1578742469 -1764217798 -901816857 -2043818720 -1460293275 -1705955009 -931665166 -1193174685 -484635109 -2004287539 -632181131 -1466667008 -1455103190 -375542294 -284896725 -1518207912 -119683330 -1473033718 -1086215810 -270635523 -200870715 -189813921 -1189354452 -702488488 -2006410257 -1948964205 -673325744 -1494443365 -140900243 -1583405107 -672279725 -1093871208 -85890889 -459160639 -1204116002 -1839239933 -1225939013 -1398882173 -361714255 -1952762775 -91382324 -411911863 -1662887160 -792316062 -2057442634 -656665644 -661016775 -776031494 -1093131427 -537293504 -123186093 -214429343 -436408135 -1054870440 -1729979095 -977552932 -1482228574 -1005338018 -314733930 -480938949 -12468535 -1252753986 -1106567514 -871824778 -478120365 -2032651128 -597651820 -953121721 -1036241874 -24799148 -187452918 -162682677 -461069708 -1077583980 -1224356709 -574902609 -859221610 -1257556842 -223789720 -989958143 -1670696092 -1040533719 -1290877712 -1901903590 -2147035182 -1052583333 -1945277392 -986085416 -1006282813 -1161517966 -1006103332 -292464446 -2007359586 -724467532 -2041015481 -1590895636 -2011549102 -270702593 -1328116205 -704030517 -6004249 -2129165181 -1359187106 -1074137403 -1279795539 -327415621 -1021238533 -1266717307 -1712386038 -1643787219 -1902154725 -2072893833 -499445950 -1821989174 -1202724845 -2080384351 -1838530450 -39076467 -1775668534 -80808579 -940122349 -1599128664 -797613643 -899573327 -844032009 -1516486828 -1258195600 -221977191 -591554298 -1551284523 -1987503481 -2010359729 -1755747052 -267909537 -1629864247 -1974481844 -51555017 -1049260978 -1941031729 -496187726 -748109581 -2108458329 -1231476356 -2123209153 -40472272 -1612643052 -300666177 -267415448 -1915645012 -1170880860 -1601956559 -1081404674 -1014251357 -1944850860 -259813033 -843391280 -1485172760 -1096148239 -1848728907 -1793335153 -650930826 -912694764 -185208027 -1087505286 -468022185 -1963747981 -36145924 -1914156214 -1918456638 -1181238808 -1741813188 -157174812 -232179474 -262632919 -992575048 -555861840 -816080430 -2033217268 -1522832212 -530882138 -1889023728 -423559248 -1999474978 -1351846990 -115375670 -2088636096 -939171610 -652443820 -571781158 -2084085828 -1772228626 -248333292 -1176912523 -2044385191 -243553137 -293742377 -2010709433 -1190771239 -892107480 -2067076653 -1514349452 -1842539167 -841590029 -1276318261 -2014346391 -40098582 -1774486163 -1683535652 -2086653939 -1984797263 -1624110390 -1906171360 -861001574 -1108640732 -1356661352 -1573462865 -1076742897 -2120660257 -150850140 -1307599520 -1624972889 -1369806524 -1313553028 -753850436 -1958244199 -2023362318 -1246928381 -1979872041 -450282822 -171017326 -955078396 -1709823894 -1531505951 -281525515 -692856264 -1178895014 -1004373076 -1276822912 -1906081160 -1492493821 -1734652587 -68038037 -1053987655 -1925397129 -1865954107 -1386979208 -24560671 -474337273 -727249647 -1555382052 -2135196680 -1798859390 -1154985264 -732646815 -2071271454 -1149409508 -1510196191 -758158244 -1345129257 -1027070430 -499162424 -1351734986 -380408089 -459934704 -1328924575 -1405403225 -439369222 -1429735768 -1374526493 -1185177072 -1360223179 -1307547138 -744588615 -913641236 -1060177402 -729776255 -1070409768 -906459857 -621824781 -1353667965 -655731437 -2139668902 -1801566899 -1562932440 -185548976 -375384188 -1922576477 -1703896177 -688614094 -747704175 -1737250628 -783640184 -123365437 -1081180304 -1538232061 -1658106641 -2050511815 -134507649 -1517260099 -1369659415 -988575712 -2058498392 -1220921174 -815924333 -1557178636 -118129263 -1123633413 -2083064220 -1781932146 -126636760 -227731143 -661461447 -1807182857 -1461058078 -1675097148 -1994637913 -1659674121 -477860764 -1964504415 -2012113927 -1173781780 -965595118 -223227847 -136493220 -529013544 -548335428 -1021209119 -772356209 -1599642195 -838594572 -323796343 -321575303 -1647261669 -167693759 -930462649 -309824289 -1716464895 -1477660114 -1532642090 -49260865 -1146153960 -481292130 -1653414308 -495882376 -2058543072 -1971857934 -1048656234 -367033909 -1165874379 -1209892625 -142694932 -1681972072 -1577368643 -149160686 -830233553 -1534070712 -437790702 -669353892 -1311519858 -942100598 -487821255 -1866752186 -1915391079 -1197996223 -2063329336 -810218396 -146775945 -1552080859 -339137104 -455707790 -1154141328 -1580999992 -1051701213 -4388434 -741966240 -1936541198 -185760854 -1788934087 -1844142209 -2014113159 -415135652 -10534061 -952304173 -180614520 -1193844429 -1003604282 -1240604036 -913304329 -1840232394 -726361864 -1666798700 -2109059432 -596796242 -1605807804 -1384769979 -1548754514 -267831511 -318481265 -1185372531 -350335298 -1832677059 -445381692 -1549587649 -1385429574 -1897149444 -1700998299 -1376102429 -1902129660 -1651626378 -510913924 -1290699962 -1061942987 -339192292 -1383252506 -1814389567 -177665169 -1016226053 -773828180 -569255028 -429608211 -585181063 -1810506228 -1482379653 -1397039124 -1597844417 -688110784 -878507593 -1127042426 -1396287242 -1845865525 -913114113 -790755729 -1602729667 -1190128948 -834540878 -912837989 -444906955 -13133831 -1696965623 -170909954 -1297960839 -688934847 -1843632552 -2038242548 -83367292 -994738800 -414819705 -1142863773 -1017694043 -1824015993 -907733426 -551862494 -171065265 -1760789169 -1258907723 -1453210217 -772599788 -1398507154 -501220863 -1588180907 -1482255386 -1455967302 -2013770796 -1103491652 -715419672 -297487751 -534700841 -1645455639 -2026002254 -519176146 -567428061 -1936028547 -159570085 -1834827139 -74554253 -1050363970 -1151665450 -771107739 -2091443375 -876469529 -1233039130 -471464360 -1834324737 -220618427 -1377127867 -1956796950 -1321768492 -1392200476 -1879066067 -568875287 -489752165 -2107301851 -1121903433 -924577771 -186927505 -2069484621 -1182878335 -1380056066 -1778913662 -934583700 -852851742 -1573367716 -1625057301 -641035361 -2103338975 -1089839558 -1045426043 -1911788594 -780572944 -111870285 -1155688870 -1820734622 -1592305851 -2090712490 -1477387216 -1241012698 -1339235622 -756994747 -1117588001 -1409556145 -1518018958 -1238900746 -203396710 -1842022593 -749465399 -1273371338 -1877535411 -612943659 -265022154 -346258400 -2031729077 -133126192 -1921432417 -1803032580 -426829243 -1123706121 -1157583929 -1458736530 -1311545558 -1374040498 -1606993695 -1988687193 -430170843 -1451402499 -455054420 -910369973 -1914634983 -1375192633 -1643573817 -462990958 -1155778025 -1171679060 -2132402077 -2074607003 -1375406729 -946917995 -1996917695 -1321264549 -1512365063 -703167949 -541209402 -1513174369 -1420272009 -1230918858 -1343274855 -2072390721 -633577154 -1307305452 -977539307 -1253233199 -570765817 -51635170 -248908802 -112090858 -567891987 -1143298241 -1877346778 -1737556122 -1623110548 -134212395 -849893415 -1244889708 -2075633282 -1444208706 -1955543348 -1727316148 -1318559290 -1142233637 -1164416526 -330077371 -660114196 -638771770 -566387037 -1619407355 -171673407 -1244413528 -514926963 -18369731 -1649907396 -1684754508 -1097130261 -1173703485 -1797174700 -757687845 -2029067852 -503074204 -525028389 -141828400 -3070630 -68470882 -1886362629 -795624942 -1835213972 -133605543 -1387950086 -1309721688 -785028466 -1981384541 -101066558 -2113559176 -1062066005 -259272171 -343058234 -1933630290 -654253979 -930352413 -604571484 -1287797631 -1674589751 -2056751122 -1919325342 -749161407 -459145088 -942750345 -670700849 -327506040 -393427019 -225759220 -1879089938 -970075184 -357769464 -77169848 -2060996195 -251823255 -1850662195 -2073851864 -1568687438 -273036247 -1895133337 -28542655 -827549304 -1517054356 -59220461 -1033359466 -972291773 -1104758788 -537337954 -870257243 -2049847031 -1846384843 -1051357151 -664189341 -410257081 -1768253497 -10333246 -1872173762 -694022090 -1445579773 -1376746300 -1986251322 -292676239 -1271997243 -257957216 -1864929666 -1349068497 -661884053 -319987311 -727683889 -263752758 -486356298 -867540004 -1478367745 -540894425 -514323224 -608746593 -591894243 -822289197 -1157265534 -402439059 -1367260210 -1467326570 -1802943489 -1076960453 -1482156655 -1944079032 -172601719 -1814167783 -745108775 -1066035768 -407085855 -9065643 -2042406611 -1349297429 -214576883 -768629268 -1237970571 -1749814661 -1493945409 -361688339 -1517192563 -234581863 -1984879196 -853674674 -372000311 -884330560 -209401033 -1824947845 -1536984461 -17046264 -881233997 -1852557867 -1722156463 -499079375 -2103414090 -204813716 -2035322318 -395185563 -1864320817 -1853561589 -1411842941 -1297493684 -1427395350 -693826813 -311042881 -722504169 -1255028245 -675332881 -868656572 -917173298 -294001320 -2067797140 -738672579 -267071946 -437374192 -111521263 -1732127057 -571128267 -1848365026 -2120038127 -432129465 -10224101 -37773747 -1355689964 -279730278 -585079063 -96192228 -1795073452 -1949234708 -924702371 -133596058 -1228535691 -2091576379 -964384110 -1344652861 -1610217446 -335695428 -593517727 -190897374 -71596200 -726491080 -1691048365 -1651286157 -1235270518 -1467180477 -1495042085 -1613652695 -89866902 -712018073 -1108871827 -945707723 -983229014 -243374633 -1588592943 -1964893497 -2108964160 -1143043385 -1888949280 -1319795359 -442008850 -696806977 -1006535348 -1110906417 -781323501 -1989063549 -313135194 -1528270408 -1736329136 -328509669 -81550446 -523779136 -620469699 -53641261 -1753025534 -1771996745 -646076619 -932416301 -932598748 -1851501830 -1153211780 -990472285 -1721946098 -1258442114 -70170695 -390348662 -27420649 -1297347285 -1114351004 -692438741 -604036894 -892878089 -2133800234 -1951111585 -257119405 -668742071 -1766062546 -1841725435 -50098187 -186639285 -1520338375 -1566636619 -164659666 -1476069126 -562710538 -2105514425 -1145405709 -790339455 -1048863490 -1702901854 -1156896609 -644367525 -124960854 -2125550059 -729373768 -748261700 -370155068 -2083586164 -1964310366 -898216031 -1654278254 -2131320916 -1083403252 -244613451 -934570599 -632663235 -979454348 -1227072581 -1123406726 -420619458 -1982548329 -333498651 -179508687 -1935462021 -1375385838 -595802958 -2091552792 -567957401 -95227692 -616502429 -2095211075 -1923177666 -1070661465 -841764042 -2053471105 -479170798 -359925736 -1957895000 -449342019 -1538810481 -642193346 -90756400 -629425430 -248756888 -1853839554 -1788633402 -1085496708 -1069590091 -15050400 -1696486101 -701518288 -732644386 -2030447251 -64313080 -725661119 -626795720 -1148377505 -1345190946 -2063877453 -1432486227 -356850672 -1814901880 -198175172 -2130462954 -1696021447 -1482013098 -1678800180 -1954470974 -883795506 -1954166690 -64661612 -140987502 -902483473 -362731950 -1877293464 -841507724 -2040501773 -1546939868 -1981330894 -1346905076 -808489305 -1150714566 -1969469527 -1708889078 -852438968 -1078326039 -811240440 -144400277 -278934429 -94146802 -1777337022 -205798984 -1414852418 -338166095 -1315828703 -346414515 -360586588 -179932682 -471611398 -10625109 -335064262 -722929000 -1952711921 -1384162793 -2081197647 -475210793 -376114758 -1316364585 -763048701 -1934661470 -805427063 -1223220800 -811032869 -950721774 -1502521938 -626006893 -775463998 -145160743 -175184609 -127643426 -2114381076 -1990837423 -61864454 -373793230 -953149135 -1496988972 -2122727799 -540290182 -1096229358 -1064612293 -105061647 -539543295 -1428201431 -1356728298 -551140640 -923766969 -1592163820 -1851081120 -524789751 -426006828 -186279098 -1909126407 -1134352622 -1852183535 -1873209480 -921465340 -1563390863 -1447813396 -262542415 -1618957967 -1208743879 -163073733 -591096959 -307238891 -1213353649 -330066831 -482968416 -1909465699 -394382325 -1249201633 -1531712759 -1609863924 -836502115 -1663093543 -2113511496 -260708245 -856833835 -1928411710 -992409446 -2067556320 -986178133 -417093785 -708620687 -1991063794 -1718998204 -1105311537 -1237455809 -1688144315 -87558041 -561696892 -101551632 -1676263306 -119418949 -1324549545 -888718013 -934879606 -1531176590 -1188406129 -1943893003 -1340979610 -3430005 -1813519213 -582011020 -71201055 -527740006 -618818732 -223126303 -577326859 -801402067 -147106085 -658292898 -92987342 -1617645625 -627048355 -1099446656 -1450648604 -669243037 -1595863520 -1754913257 -1286702501 -448609017 -2104147749 -1798002294 -1782158321 -1780476338 -1428675468 -733933569 -75425815 -666320975 -1876891367 -525914386 -394450 -187070209 -172943455 -1115273794 -1169384742 -79021450 -968616304 -1608177068 -402800734 -1003480994 -1315986267 -847109016 -1692135949 -602957622 -2080906408 -2022807861 -518104170 -1878080252 -1180151758 -651633014 -1976950245 -735781331 -1065990691 -1796960363 -1450293180 -1138082810 -120943841 -1183605625 -718717214 -2032184970 -1352868902 -110781478 -35978797 -1252736372 -810529016 -1072398991 -2127076113 -607959582 -249502248 -1496203192 -1801025221 -1048884882 -2062437198 -848440559 -449059033 -1077632073 -2032655760 -675501844 -1560934066 -958615510 -1028556776 -1857859529 -632876523 -269218470 -6781061 -152658936 -1643262834 -1678750618 -1121482440 -291399361 -1286345167 -885347420 -119897877 -783957853 -1167461026 -2106864990 -222031547 -1505115590 -1267843117 -1306521885 -693030620 -1961812659 -1868927422 -1967360532 -622748465 -1845639424 -1408001900 -1165627007 -1347278715 -645789037 -393992921 -1146939546 -799734150 -31712477 -415656483 -174206090 -861543769 -1631377509 -1638072514 -344388258 -665023541 -1545754599 -1387867634 -2071434571 -1743433280 -1616257292 -915655741 -558224585 -1872029999 -425280996 -872122556 -1187907917 -12894860 -1975547320 -779140973 -1814537452 -515684717 -2016522974 -114707064 -1588793289 -1037141425 -111167276 -77634842 -1286215765 -857971653 -1724366013 -1127764226 -642677960 -1793212957 -744666301 -71826191 -296982523 -633268433 -413598899 -2099613801 -757865903 -726721364 -1266464259 -1754375596 -840168662 -1009723209 -1002195069 -1178281262 -1426461447 -30104621 -1309708102 -556688564 -1825928816 -844294882 -1639626045 -684780011 -732780604 -24895883 -1813278063 -823970264 -1493671192 -47890514 -1736984820 -611172422 -560612953 -1211141682 -1808243108 -2100827459 -1828463086 -488097832 -72730884 -469772245 -1312235343 -82355111 -1162881909 -307573216 -389902983 -1126828284 -2092169942 -202979216 -1267651876 -239818045 -1942560543 -421160860 -344473508 -2097820291 -679114391 -2147469379 -1907681371 -469952687 -49956743 -2104357271 -1024471254 -1911967979 -1648012992 -2057761185 -1715585007 -1721768027 -413086464 -2077053344 -1688870623 -1557198362 -449664145 -510331222 -87162036 -348491798 -913743617 -633411222 -665969975 -272601661 -1033497376 -1142661496 -1912991798 -1675469749 -1814491979 -1898903653 -1119217904 -886048455 -1164774887 -2058083404 -688668799 -1667131110 -1253423361 -1619334904 -1101473097 -1149304139 -1886743055 -746993783 -535110519 -2088462844 -174808893 -255435555 -285562532 -1971007926 -1794957307 -2144669340 -2092066132 -605728193 -1401252971 -1553010595 -932824527 -1351202189 -15623498 -591125952 -794524242 -515618248 -899378491 -1864390651 -879777980 -1003600265 -1173090317 -81594712 -1267757798 -2020049099 -1396231470 -908505521 -643561277 -1606736247 -1956725951 -128488299 -1281776058 -1401743749 -1211581853 -616262517 -210493738 -862687957 -1534392402 -1549467238 -1509165544 -615943291 -1287713297 -257188213 -1825198127 -1448506741 -1178173595 -1764385825 -1578362999 -1828916449 -1665318832 -859238073 -1534250483 -1311718252 -2129024909 -1149119249 -926780472 -700501213 -818534037 -321317177 -1603905281 -1621320623 -115713978 -1332127711 -1553418802 -1351108635 -590745067 -835440988 -1008601230 -1472446839 -1959958692 -774075111 -424457051 -2056464470 -1396532472 -1672478841 -938425104 -990819360 -1112784682 -137068651 -1610347773 -378617670 -433133629 -1854822920 -1136196588 -631465392 -174659870 -2045773288 -2098462946 -742798741 -895999976 -916263868 -41596839 -1185887798 -420493179 -2007660823 -1492390497 -2145569766 -45656738 -701133587 -709425620 -487187196 -1947540808 -372612482 -435670322 -1539349231 -1107030008 -55026848 -1418266126 -1877781629 -456162291 -203005047 -1701793493 -1856026105 -2030774060 -1262024649 -152294324 -1957679891 -1128972350 -1620265205 -1704656475 -582040698 -569999201 -52021940 -306901251 -1981089110 -1578208682 -1382794277 -555385705 -1403614073 -433862616 -1222005547 -1861112168 -1612889021 -139699866 -736021691 -810753917 -557342804 -2084322261 -1450990763 -2124942056 -1248085582 -2101596425 -1867572766 -674493610 -1795414404 -1237164031 -1079198763 -446727179 -540867541 -62483836 -46328269 -1250136869 -70355035 -1341067395 -1478832500 -1909580769 -180880168 -1363623071 -467473513 -1332152265 -1966097880 -876192771 -876534718 -181187006 -78198396 -20449608 -99178136 -439621680 -1377830080 -873988959 -344288433 -1134748413 -2061791931 -740856325 -462068969 -692294431 -326102371 -424282253 -1266118131 -231969594 -1030147053 -668357657 -1747667389 -1911966904 -1629945467 -1192062737 -1123477896 -1616773648 -1004116445 -1258592989 -458443173 -2030566822 -2073942877 -950859282 -1666135247 -1695823096 -295811488 -279036011 -1801435476 -1501589726 -2138188985 -550921997 -1544001362 -1985984433 -102040110 -1296178464 -797329280 -415251680 -1960616657 -1095074631 -984468427 -1746836101 -825411370 -2092019617 -1971434235 -369998082 -1592606109 -694697755 -2064063193 -259251113 -2136620075 -2099539038 -1648807809 -383864975 -577759237 -1625928172 -245378729 -911696063 -579909496 -1258109186 -917100740 -1222002661 -1812607166 -285622620 -833423295 -1456973331 -1742231023 -737276716 -429122622 -1013821328 -1159804398 -123453367 -411536167 -1791015429 -318035204 -130876245 -613795187 -1691751368 -581755696 -74937881 -1055548825 -246693908 -1541073046 -14417655 -1799359121 -964029593 -1828736583 -789794617 -481705812 -16233094 -99187689 -600178951 -476939498 -1513172282 -1385195800 -115593473 -1454283823 -1636826654 -880055708 -1376407467 -586452385 -1702778612 -1233051962 -687131784 -1604323769 -64913851 -85401081 -816892171 -643762726 -697522296 -143999899 -2139715971 -445171935 -171685397 -1445929458 -811451154 -1538386828 -2111791963 -1425288172 -1785708166 -1313179137 -912315340 -250679800 -1959966833 -910900898 -100473223 -731312419 -1118914352 -79217285 -2112531502 -969818263 -334665511 -463571884 -181983072 -572777776 -1654375378 -1616200337 -2105896703 -1127901114 -795870929 -1674550187 -1391798974 -1573472894 -1245300300 -386518438 -77355291 -882769402 -1888305938 -1244564600 -906510420 -1471637122 -1235946955 -2098638901 -1552590779 -319427956 -2064022639 -1725143682 -1313145227 -342389970 -1439535477 -721994837 -1284619909 -1953707272 -933157874 -511314277 -1576981892 -91487570 -33297738 -1289334346 -1732354992 -107064518 -1989541487 -1903388219 -1329391021 -655026559 -1030202591 -1601784823 -342521369 -1500474823 -579883440 -820185994 -168471065 -1109742709 -550235968 -751330194 -402726198 -1898238089 -670501991 -1280266928 -1807599603 -2022857159 -1346655656 -911454659 -817599762 -1798826428 -600992930 -1272582669 -1507277410 -1094329858 -1351970498 -43690979 -2022360426 -1587998713 -567604475 -606051351 -390118536 -454660261 -728190601 -190126754 -4687742 -1477468502 -459702853 -1727172112 -1045229885 -762444735 -373739496 -50041797 -1386376202 -627257064 -312251525 -1708831054 -2024713247 -329671967 -288940109 -755886096 -1811843467 -335035409 -237996629 -1394792889 -352594771 -1152934124 -618875187 -1171965488 -503946532 -153859556 -347246704 -1462285229 -824987535 -1411075713 -1287594570 -409227171 -1638425303 -1978745687 -847003967 -2074061053 -789559667 -827868456 -438591079 -1236388249 -925532571 -1201865576 -523552150 -1100483291 -1693503873 -2118819820 -1430880186 -1281406996 -1641369656 -2072362677 -162241646 -1638596279 -557372025 -427955961 -733102724 -1143799429 -1710878906 -2083223459 -163294725 -10342209 -2022814903 -636459064 -351442941 -1121480137 -252692840 -1433391761 -543775081 -1684868382 -863526932 -602659698 -1368665034 -1455883421 -603982829 -2131691281 -865676866 -229378437 -430244294 -538409809 -1705055052 -838473396 -434674958 -1990135659 -1152218788 -1481124917 -1783527642 -1172334268 -259581051 -1239437100 -627963800 -1452945242 -614132257 -914435917 -1531479087 -1977505914 -1484975626 -2077884395 -623959251 -720483256 -1649281806 -1907881613 -1687936334 -886988668 -1934549249 -1066812363 -574416138 -1273038101 -571788446 -59091597 -1015025865 -2077104934 -408460106 -1631265730 -1906886508 -2143075775 -1078822941 -572737766 -981927308 -1987922008 -454608430 -2004550631 -759001081 -478305187 -843987188 -763180281 -1998642883 -251728207 -253190459 -1206939706 -2052592827 -750337981 -906471483 -817222963 -1908416576 -2089124887 -564347359 -1698277561 -745815450 -58220611 -1408749692 -848865269 -1144709062 -1966695208 -178066232 -1314440953 -644820382 -1293677512 -1713501956 -1071668222 -582459765 -1170807329 -366121042 -855704239 -123160914 -1938729537 -457952428 -225066548 -974769869 -1951928967 -1109956797 -2000929337 -25454939 -471914020 -801825769 -825814658 -280146445 -1137146891 -1570822384 -1795335317 -2055432469 -1231560841 -1395664901 -2123598573 -143003271 -421774704 -2071415028 -1414974079 -235438875 -1356294351 -1847727999 -3459926 -168917813 -28301757 -1073743912 -1108843243 -465296435 -1249224318 -1912979554 -1469684841 -636214893 -542628238 -1737230904 -452138916 -1301618126 -2027415340 -646592431 -1011733997 -437770633 -332054209 -1672575757 -419808669 -1240519488 -1639789740 -1288518229 -900778455 -1771265482 -1240641260 -1538928097 -471481811 -2127623694 -1221218861 -1524182448 -1749462120 -2011239763 -1514092961 -1826662224 -285781256 -1352134900 -659311746 -36896502 -1644218778 -565432250 -604687775 -1094816821 -946423051 -120844828 -1666977781 -823906505 -422073679 -653836912 -363158285 -452771221 -1191350026 -2029846001 -696522565 -521390158 -1271105746 -306952666 -697737368 -1611231356 -196611622 -1621681868 -1892191399 -2122998217 -790238214 -1494789650 -1665944944 -644884222 -219152745 -365730610 -736164556 -1064402325 -871096765 -1127307756 -1560721258 -1676918748 -398014408 -16594851 -1884270294 -2136972596 -1581908544 -1289349148 -1981132206 -155039507 -851330338 -1772934452 -1373732639 -727774776 -1791290567 -647312276 -225267030 -49303549 -1863543948 -1681626188 -59063549 -543623129 -1278494765 -2087627120 -1161181154 -1787754989 -1354394946 -2136682869 -1007434149 -1184669295 -1415949728 -1600786089 -736668207 -939330094 -1168600761 -1935038312 -696559616 -1144106315 -426260967 -162625977 -1655596455 -664005006 -1607106030 -1729217891 -1068899186 -1287911947 -1448415116 -1785715867 -1442609844 -853273478 -71550080 -2098835887 -568367187 -540050053 -1355348549 -984019314 -641044851 -115353758 -1720361112 -389386176 -1030787623 -696999412 -2093306746 -2129374868 -588429221 -567722912 -449138363 -263447736 -1802302485 -1041024460 -948827111 -1871175602 -1097816146 -1963954445 -1358702725 -1523080524 -409294628 -624691455 -141734002 -564007091 -274360579 -530861144 -1536177570 -1488014756 -1616934777 -1564727901 -297090945 -308033340 -1680756110 -468048132 -252355563 -59744516 -1251217263 -1048667817 -561709390 -311605518 -1588809640 -1311952682 -1774122625 -2016003427 -2120098870 -1453037066 -9934578 -1614211627 -893902438 -22681054 -1095869059 -1451517941 -247804467 -878885336 -1033318086 -276818113 -1032445789 -648507963 -993825616 -99321746 -705791303 -1682247140 -1905469225 -1945120511 -496870096 -1479283936 -906931033 -2098428872 -170117023 -856071404 -1999135775 -2093313110 -88850969 -817101318 -2011412708 -125812282 -1403114926 -634633575 -1882704023 -1582459663 -1962071593 -1925863866 -1120468278 -426247803 -2088862276 -445611576 -1118280743 -167569057 -982079782 -255585232 -653700224 -213326716 -1231908969 -804201256 -2095919021 -936724206 -321114085 -338021684 -1036196673 -1412589588 -961487931 -2060696289 -1653754054 -1911026104 -850305396 -1726603434 -77393327 -1522040454 -108707314 -1682726448 -1371264193 -42792147 -1948076531 -786574355 -45853553 -1861519645 -2018904019 -1478224733 -284775388 -1626380600 -1406885184 -1724334018 -590024261 -1605756428 -521293547 -1794848316 -312857603 -1157765765 -219886888 -1967053776 -1909551314 -1833313630 -406812254 -1853104577 -173293198 -550953454 -2072699161 -1522560940 -266580928 -774769254 -1353500217 -2131358095 -1708270705 -1196862192 -183539495 -961775373 -449283042 -547584042 -1277566499 -1518645987 -1039958914 -220064665 -659984521 -606807692 -217039841 -1361375081 -1340211229 -2121636067 -1518903281 -1069331878 -2117715450 -49602772 -450133968 -1964195442 -1114172010 -1979053877 -1731786003 -1281484630 -798680647 -1652840379 -1587275908 -1304322722 -238920078 -1882814703 -1295174776 -1108214240 -631061249 -1972163057 -1881891201 -806262191 -226831567 -574673144 -1297570649 -573462458 -276923870 -662420041 -738403039 -31880460 -1091463117 -415294745 -536926465 -396812561 -1291988792 -1248472327 -11685052 -969657087 -1920747773 -1033639107 -1377250766 -1874876796 -1026757941 -1689610742 -1111476513 -1772992385 -199928923 -1540984953 -681322251 -600266753 -1952627712 -2116345777 -651828778 -972188499 -1516516317 -1753817223 -45528239 -688934541 -1838489610 -1500162234 -1768651058 -249690032 -357321586 -1139618890 -168036637 -250762254 -1198287564 -517446582 -1563416971 -1886610552 -667499509 -209675835 -1094118 -1208972050 -1850460083 -824439127 -783917045 -481600970 -401637247 -776107808 -228257178 -912597104 -691320054 -1129617308 -1722656076 -306140478 -2079679181 -724156495 -1108383916 -1335322134 -1554994988 -2072262973 -634000165 -1974400388 -830007672 -2032656039 -680190997 -914633598 -558936360 -949930542 -1089187596 -825318944 -538615835 -872766740 -1277290170 -1169351778 -1672479149 -943601660 -2093850172 -525317415 -704521088 -1808580105 -1322285097 -1484846123 -2048811121 -1615714649 -385389428 -429437044 -2003344588 -1963872850 -2134819207 -1897121620 -1233360331 -1574922273 -1982693036 -618105553 -1121628732 -602645358 -1127652654 -914971003 -1934734901 -2039581880 -1118683746 -498389537 -1246725059 -710122834 -1467844659 -1920530724 -1680663858 -1065052415 -1059741160 -1987791549 -409467664 -1385423860 -1801114246 -397644410 -240489406 -341222988 -1153421826 -225748113 -1692414589 -991092808 -1413657924 -1737141907 -1103849984 -295454655 -724194721 -1750848298 -1686413292 -1059025538 -697750830 -1837487190 -1832358470 -1533307310 -492195170 -217213946 -2140074169 -22954780 -1401414647 -2122815480 -2013944749 -1879636076 -1559081962 -2042558287 -1751032314 -484202910 -1182769887 -1704854177 -1757334565 -1179436764 -1519630738 -410799795 -152229460 -867510643 -984897418 -366953250 -1957722213 -1840278204 -1496290534 -1121498568 -562462657 -86862105 -1750002422 -354677242 -1793285869 -1970098285 -1539006549 -1790024575 -844621202 -681635344 -1567453510 -1009244821 -1551862541 -964833772 -312187507 -632880528 -336530505 -1743754984 -580685479 -1415153585 -1104912570 -974468381 -1179787445 -971075364 -2135409195 -1075631701 -624658261 -1731326091 -2141678234 -1212671471 -1749603067 -85168698 -1206198384 -330612208 -1059185067 -1231471086 -2034636263 -1749561060 -1526640696 -115563316 -947435124 -2098370210 -1331668436 -276834818 -1313206724 -1375970049 -1824702647 -1710908969 -441008653 -1066365174 -1648445203 -731996874 -1885131302 -1575548523 -1770658551 -1777370178 -763051876 -1988023695 -16178192 -1323933422 -1270956987 -2101727447 -1922175873 -1413395690 -1624742363 -1790323336 -1570930035 -1457142027 -282537401 -519755090 -1707805281 -1964415612 -519601906 -1280725440 -923876199 -1280508783 -1577489294 -29458396 -1186022762 -541349480 -1719981668 -454521809 -548711484 -899131370 -2005995298 -1417199233 -1126380154 -1002899973 -140700908 -380665409 -489744650 -1980997246 -34250434 -121426842 -711468844 -467914612 -155768570 -219790297 -343648839 -1122510290 -386605135 -1534471770 -735921567 -1275453496 -365142918 -1596243347 -1696214705 -435133010 -1098681035 -1467758339 -469750484 -946498216 -1384142983 -1748250977 -982912185 -1360880571 -1618916247 -507555839 -685940189 -904539427 -557412476 -1107815918 -378914336 -1124231797 -1402685873 -2013474392 -416796918 -14144312 -1500250614 -1106570071 -914800277 -1212826666 -62998138 -100267395 -1566928517 -775622058 -654191516 -2028020419 -78736949 -481975291 -250399353 -1541461398 -98998778 -1720119068 -616319962 -1175971853 -1266930030 -992654205 -1886253539 -1109632959 -853151365 -166680536 -1081092864 -68627981 -231758228 -1772685985 -1492715064 -1158116394 -1817941197 -1887852110 -59528345 -1912998560 -1789118683 -651679887 -617261109 -1961443953 -2114536621 -310114944 -159052539 -1726366105 -383572118 -2098162579 -2136981513 -1731776563 -1122826550 -1407019661 -1837005310 -175852251 -611284285 -293210747 -1665538611 -258096432 -2057249331 -1702789417 -1414651597 -1257934842 -134384779 -1599667656 -1266517599 -503377329 -1324682970 -983708341 -1856972581 -758327016 -2034196614 -802831258 -545199105 -1996119633 -793138397 -846041450 -929423363 -22413663 -896795816 -1407044866 -113142098 -1056213491 -680317135 -887151317 -373223698 -2118443046 -1540890509 -1241485590 -697196878 -1117150514 -499163077 -1362709957 -153152044 -1340994402 -252039149 -1184225359 -397168317 -828728943 -2015894206 -284421523 -2121422486 -76731061 -1128754027 -98394191 -148759947 -537464121 -843262365 -1465982002 -679625583 -1655088 -2047260252 -1320063130 -647468753 -707692322 -1420418768 -1550013724 -2104021158 -1817871004 -708118359 -2138371686 -1474094057 -1727464207 -1659503256 -1901100003 -1526050355 -931120364 -626622059 -377140725 -1379922778 -1686225893 -56894192 -590462029 -373388616 -595252578 -1431250720 -1066520993 -2119811489 -917991893 -1167225603 -297594276 -177582869 -1780493600 -1718797902 -2033803117 -631778120 -1135712072 -1078139568 -1972189637 -181137614 -1395550699 -204205559 -403962207 -1197004882 -434246678 -1234484640 -1143830813 -90866147 -326459612 -2133464446 -602489963 -663412536 -239397328 -1314020865 -26852307 -335157879 -148866272 -176984749 -317825348 -898793747 -626532831 -1024969376 -1693969845 -1360476636 -1272431643 -1116467075 -1897505686 -1245906652 -1987541914 -508819513 -449672637 -653056266 -127742845 -1637832562 -606482288 -1190425754 -1527992026 -1352530156 -859928397 -251624069 -650426740 -1030455950 -1565022242 -949112838 -230938350 -877898321 -1624426157 -770816388 -1489674412 -1593485758 -446572969 -96543718 -1260114941 -268086673 -312021705 -2141213608 -1993636877 -2015131245 -346237878 -1686815823 -1381913114 -778064693 -905368668 -1609564081 -92008108 -192045316 -37704571 -193048932 -1873093154 -1113857905 -994858436 -278058310 -401600298 -155105965 -1968289944 -1210990420 -1413466321 -664353933 -1029071178 -1913479355 -1279905660 -30735621 -1177506867 -1296106564 -1736389627 -1345181906 -1911942173 -1214291550 -1060983409 -1391434022 -1882175571 -1290701487 -1087573662 -1617217617 -2023452487 -614915117 -1187062055 -828877755 -222010196 -1146269333 -272882494 -1458490313 -1468343733 -1718532854 -1874108675 -1001850176 -1824115552 -433537892 -59336573 -837370203 -1220663030 -772265419 -73734665 -160450336 -1596820167 -653410210 -1781512359 -1661211239 -542399226 -35709867 -1027797156 -1975828071 -1202755736 -452085741 -407905901 -906676883 -2121897116 -1611386530 -657137393 -2147251277 -389524704 -1211544072 -2128760897 -1006836859 -1883434500 -974684720 -520829724 -441826096 -1920227793 -884269835 -1336279605 -467340909 -1250960484 -1027950458 -257407491 -1215636179 -37842895 -370376753 -1514478665 -1866738411 -1683874654 -1341809612 -1068371737 -1013011192 -428750528 -1202488411 -254121760 -1826930084 -492736982 -733513642 -1607647314 -89159844 -1713396149 -1440853620 -1401187768 -457143774 -1666404299 -1922812766 -1380238106 -543492648 -1232984245 -1696495812 -864731065 -1513170206 -1350304468 -2107495827 -87090771 -1298224590 -826830610 -175382533 -1306668447 -1008814507 -762026084 -1927406727 -1281529341 -1550138424 -2052370411 -1307159563 -673066531 -1432817768 -1634092965 -32101272 -507683107 -677449818 -2088278379 -1369472932 -1839578 -853016388 -45605744 -1991561076 -1486882190 -1909250838 -1078180792 -517557758 -1284468356 -1554039648 -1048249122 -2114637113 -1999083988 -1222929001 -201734370 -1820361624 -1765779406 -1377958749 -889045195 -2138860186 -1094378969 -29895428 -2088768645 -1019439006 -1086838076 -2139125597 -1260174352 -1266607350 -2011822386 -568819487 -1699405212 -370892984 -1600838494 -1617439042 -1449975168 -88222420 -990496510 -2129095673 -190966150 -1227514432 -2107145542 -642301717 -1912147797 -375246824 -1761383376 -508326537 -754159593 -711794957 -1653928509 -548123995 -1762621982 -1998224756 -1814202306 -1325336836 -1235815968 -2044624039 -2110387826 -1448277730 -1624153012 -475035667 -1727739370 -1989200503 -467437425 -725621249 -2104184277 -264444743 -1379129958 -1246202035 -509593054 -565674342 -378560725 -1623542661 -954284645 -1254152719 -992752928 -1398007353 -691000044 -46176532 -847376757 -1897091642 -729520085 -1059927872 -830892839 -1877272279 -485451429 -691792250 -475880892 -901050416 -2047146715 -1559330418 -1923390985 -360946604 -1935754300 -1992751697 -22812867 -1163766503 -142559045 -1545602910 -985914258 -277113954 -1709678182 -1230008014 -1067105276 -1202437635 -1548213175 -1906965173 -1317714783 -1980990017 -2060236278 -364800118 -129771041 -1365984382 -1499321844 -529118210 -159973243 -20769057 -1173190185 -1760076188 -13254291 -1574053196 -261017779 -1764204479 -677964424 -2147326833 -1659394396 -71489983 -1088785608 -511557569 -1371023242 -288095984 -1601062750 -1091542340 -1746795706 -146492605 -1084952773 -517609134 -461141 -1307945846 -1003223030 -1275352613 -817085984 -1753694170 -124860115 -432429686 -761071154 -910283746 -465417794 -1141421384 -397782237 -409464148 -1326330448 -755583676 -1024037821 -1069710489 -2038579586 -1452997664 -1495188811 -1932192930 -118864576 -597137122 -892527023 -528401266 -995197317 -1678663983 -1812891642 -771843458 -1571770726 -554250135 -1645441906 -1795191723 -1789531758 -1151780471 -556782039 -1249479494 -1906755292 -2085212110 -1374297377 -1629391754 -475742934 -729873957 -565003635 -1990890058 -946500899 -1429236164 -1567616653 -1603705575 -412345528 -361560227 -1511497826 -1159901219 -1750723914 -1743375051 -637602489 -241634093 -252624574 -286045099 -1491576907 -1356464518 -412757474 -842685708 -364042391 -279555234 -1938081849 -309678447 -1412782048 -2048679504 -1551111377 -1224922306 -1490956800 -1671744404 -1479644327 -521571629 -26121549 -938210055 -1671458111 -962885170 -1921772045 -1068709435 -246250537 -531787590 -2074569963 -752875449 -604023219 -663042364 -460367465 -12404114 -170030239 -1544976363 -1192957064 -1122046256 -1177520285 -1521622890 -1680643754 -727164487 -124097932 -507321887 -1048876219 -1916838157 -1896716052 -859429896 -463252350 -1254026075 -1011730867 -385164723 -947787403 -1576672422 -1332676221 -34808137 -904806575 -752401618 -1230280190 -1346600014 -2123763212 -762607297 -958435383 -148645934 -768731277 -804952187 -1831914456 -513214953 -1309388719 -1631269424 -1968971566 -1929593139 -1521333826 -1117312400 -1072497432 -1634090353 -2135685035 -1416707287 -1448178320 -2100852789 -106700749 -170643198 -1109560041 -1775102186 -1299615978 -589568609 -390064205 -1689002791 -1631062291 -635170882 -175804537 -1956838734 -2024032180 -1767880780 -188529568 -1078070051 -803817418 -2087204696 -503951927 -244533321 -1735309336 -368600245 -1721479767 -2010751585 -1899219903 -2139464360 -511313152 -1558074017 -134412201 -2060549210 -1329280948 -952513295 -1547844327 -2704131 -351173130 -881733954 -1665400578 -85659448 -864299046 -694677814 -1728914806 -269916885 -1007623731 -76006675 -1838900407 -1961976472 -327165219 -1107699413 -568298448 -1532237327 -1836343712 -1941276547 -315876558 -357734922 -1644106101 -819153558 -2143672036 -362763333 -257263898 -949752275 -240537774 -1154143964 -1625303244 -479632068 -1670039685 -745719505 -593156643 -564609527 -1809567843 -743328487 -1209506410 -94030368 -1967914431 -1342194370 -1092548502 -1477491264 -842263787 -1862750732 -1234946758 -320713451 -47016987 -2088002060 -1020346793 -1311628656 -623184937 -591489740 -466258217 -234025216 -1219247655 -606377911 -1583645162 -411916816 -1746132231 -1880370162 -1011963482 -2147241381 -223202632 -1860188362 -1118867108 -1432671024 -1315250204 -1361000057 -1479633802 -344677954 -1238976919 -1483636321 -1043021730 -157205649 -750456933 -758214100 -136417402 -1402224065 -694318277 -2128627388 -910434743 -855740726 -736397923 -691634200 -2114501836 -1872967096 -1142684746 -156270901 -72532826 -1435978733 -1073340545 -771905015 -458875578 -708063069 -1209112656 -2066141478 -829248756 -14973062 -396666335 -981852057 -723178451 -1850267584 -1884075728 -1014385481 -2051589281 -1063609535 -431577117 -1464329500 -823311880 -1165629539 -1389834039 -761065054 -807761046 -1795767435 -728105107 -900712743 -666843898 -2075723640 -815371965 -863464248 -1696613357 -692826233 -674163997 -550576007 -23914726 -355357893 -348085344 -524922180 -504257384 -1083381826 -2031990316 -228802771 -1492444067 -898437109 -1074968906 -222480931 -467977890 -1219281916 -1182202538 -759354122 -2116897980 -1342770011 -29928554 -498033680 -1708287401 -1477471864 -516207987 -73703629 -1786311931 -723239257 -724750379 -352374069 -1738562904 -1364226446 -2018462550 -500906191 -594455897 -926335035 -1803976142 -1252890248 -1249239301 -17315188 -1106072371 -1139890965 -445833868 -559375093 -1881265132 -1021338743 -803463130 -427653574 -2093335356 -462739491 -1224339450 -284830596 -406777809 -1274187462 -561745950 -926069438 -1635054657 -1162873187 -160982562 -1952007961 -290125308 -1348172866 -641399365 -1778703262 -1693358194 -1817876514 -800724929 -1651349601 -154090179 -2075843818 -687719964 -752446794 -1989553222 -2100618364 -461687068 -716135265 -1587041067 -1652317329 -1386309146 -1647730519 -1605204768 -1986962162 -1502345884 -1962034609 -1304273778 -1563801917 -1913947033 -550235218 -738724944 -1147170501 -386427541 -697133059 -44544581 -1336463711 -1414126804 -1027673479 -2044672379 -775354559 -453303117 -1540991510 -791525750 -1659570732 -887685488 -761101107 -1413703817 -360981911 -381675402 -284827825 -360205612 -219319991 -1029150485 -1098908457 -995072599 -1730012204 -1534015895 -1663965030 -1728207976 -1275126957 -1319452886 -1128516080 -394186256 -101353597 -495372708 -2082487584 -680345482 -1363579346 -1880071085 -280343637 -156385541 -1999287306 -345127333 -201755184 -22698875 -1395386606 -1741261802 -1627448545 -28483976 -1988814998 -430705831 -1853011227 -751843395 -438160817 -447425756 -1544432945 -649665326 -1118272734 -32961794 -2085574479 -1022182219 -2094862380 -357628095 -1996148359 -1275936279 -2036825858 -2042862226 -416884146 -1480185308 -1023904708 -979963945 -1201934772 -1686529322 -861658101 -1405471786 -1591673949 -60270164 -1495848611 -136549648 -1477398940 -1438057966 -1659271224 -148821826 -1577464474 -1759792303 -1684450037 -274853458 -224743909 -1994627137 -1478561889 -1656388986 -1099171641 -1123438793 -959569527 -2030334966 -324622732 -1325793344 -318411336 -10075828 -1840716730 -276662428 -563331641 -1806974311 -103509103 -215740051 -990641021 -262924756 -1602512213 -1830346864 -2083983620 -54418770 -1935717415 -1372825502 -513908746 -85065788 -1624073661 -1288867057 -321079710 -1907764706 -1870564032 -1556577391 -750422783 -184255050 -103206376 -1570258303 -904760538 -2126141406 -2078208209 -1771333855 -242302624 -751206856 -477268079 -593182208 -994280482 -1301803667 -850835633 -2048362105 -511553678 -1305627205 -688529389 -1471550887 -1934078957 -1752549307 -210500497 -976286470 -1671638210 -1842325416 -1544044266 -559588314 -1169903185 -202558363 -636826446 -83581274 -296166980 -1958822761 -1009835617 -743952678 -962866312 -1604825639 -2057392000 -1953143653 -50347929 -89085785 -468686536 -244593356 -596833934 -91813601 -1217933461 -2141039470 -1214383158 -453155418 -1206098064 -792017615 -1336411199 -531557620 -356947820 -1300184669 -1557623658 -1155163076 -1573649452 -2065226959 -491313452 -430565049 -1634371800 -423513823 -1236017003 -1128451990 -1464509273 -1697273044 -1042767407 -177766282 -568148597 -1161175217 -1687971830 -1483569940 -2074839910 -994907384 -1100727346 -1500368964 -948194874 -1982586578 -976349594 -585079631 -105738604 -1179741359 -196507962 -2026951895 -1447406904 -2020565959 -1493162902 -94995072 -1001825383 -1407419601 -2116345949 -654719582 -165807446 -1439454763 -1512918286 -1411252322 -2108378386 -2035358002 -994926551 -1422867115 -1897192460 -276484564 -1868938687 -9207740 -135663596 -1617908505 -750305221 -355874163 -435100646 -554739287 -1276684982 -1735375297 -1477206772 -355774037 -899766611 -1945072550 -1838273216 -10711923 -1794147160 -1413430593 -63873437 -1926515806 -1340205623 -2027416025 -658105226 -1233751332 -1704025139 -708594781 -1555661652 -391982939 -1724910424 -1687745315 -1971499629 -1469075040 -1124707721 -811605953 -1992609974 -1935841700 -1314199850 -887569555 -960098823 -188794603 -1237546002 -1056534419 -1779186737 -1229187931 -168872177 -1408781152 -1377613489 -1528711316 -556735304 -464004349 -1007971386 -1624076966 -1344414192 -1893874857 -352105765 -1524144870 -1117888674 -20516315 -1220322685 -1494537945 -1730506303 -1248403200 -997351210 -1371921635 -355001606 -802420676 -86998372 -1892758244 -912543897 -1944553652 -1707089118 -665282306 -1599850660 -47298533 -377494741 -887418749 -572986028 -859499448 -1632212814 -644658120 -714023725 -458126639 -1005547178 -1682602403 -1433923525 -891198041 -1814520909 -237646516 -1952894639 -160136925 -624288784 -1963977093 -1739347661 -1668735463 -300496821 -1716016450 -383095940 -537489874 -1276093036 -376473463 -902668579 -1326324845 -661414055 -1010665513 -1807112868 -284752955 -1249349169 -1863866664 -663063059 -808188330 -387195035 -711502835 -1039201349 -372571592 -1895915739 -293471187 -1747786397 -1764650713 -1735368321 -1359961140 -1198424959 -679160700 -778301095 -583609788 -1171891067 -1400636432 -1928257857 -554085722 -1029636262 -673427908 -1064030066 -1056990693 -857849267 -1814908158 -303689518 -1688583754 -1030758373 -205394662 -1061863505 -1150821965 -1627040873 -1766675260 -1402191398 -145284008 -99415817 -139358953 -1448747841 -935374001 -1250538767 -382603780 -855691342 -2053884682 -987708496 -368100962 -1919964974 -762038196 -2130973111 -1680295558 -1317485256 -270813375 -1042545632 -745361151 -1012751906 -365898020 -1402340779 -508446828 -628406783 -308225935 -622732981 -1585399836 -1985435323 -1610566575 -1908539237 -2003204667 -1759704250 -204543266 -1784836462 -1694835538 -877793358 -2007796663 -1627969730 -198105683 -962561331 -773977266 -927459783 -1380262955 -961129791 -336404603 -1775203717 -858563848 -939969143 -1171679069 -2132553340 -321916950 -946871857 -1221476329 -1556479830 -1258198703 -274129312 -938923969 -785308827 -250960927 -242417381 -532444108 -223766107 -593094452 -1666849037 -807589744 -1064178368 -1402018760 -1538724436 -1343518678 -1875356588 -500687497 -1213833133 -1946303478 -1051643642 -1184276284 -1253064792 -2035316662 -300125171 -1912145841 -342372332 -1143093611 -585614015 -497195904 -512688051 -1043681393 -506743455 -2064587830 -486890584 -1257350218 -1046027446 -1282150580 -1253884062 -772402023 -222154446 -1423195436 -972832566 -1603932151 -2072924713 -1018446110 -1579104180 -1401043634 -182167283 -1521328406 -1026218460 -1212488163 -816229158 -237921470 -131595576 -1966173069 -2139894294 -1294762949 -629088792 -1033332963 -526855852 -791227983 -949968057 -1719702201 -52487234 -1684646568 -1430466328 -768146531 -1714544400 -1412155354 -105768034 -1674371369 -533888495 -877258299 -1604994638 -602790899 -1426276594 -1218247544 -977381510 -748622667 -2141960143 -1655748740 -1075975354 -2105466938 -347291700 -71049354 -125584946 -1877246068 -44923152 -1256655567 -108446324 -1591234812 -1269629193 -1260330159 -1737771952 -955598064 -1853949382 -1487028951 -80895671 -256393946 -1360854540 -1181413230 -378356448 -337742769 -643439562 -1708555889 -1694982386 -1198384047 -2139036363 -1907902161 -2033286570 -540107279 -169662284 -1803207619 -1221226069 -1645327304 -2016559556 -729540738 -1407042843 -79141537 -839434866 -1561715719 -1210955599 -828229774 -68811764 -1173115462 -504206727 -231989627 -1366841684 -875611029 -1836615159 -61035335 -1471175726 -2071198971 -2078671374 -965813422 -1744779528 -620327311 -1955493439 -888495585 -1491499504 -55552297 -1659552881 -587663731 -587034364 -746681430 -1727844589 -1610132589 -1056987476 -803781148 -1477614806 -771150534 -663215293 -1219301521 -1511703773 -326285154 -1348832487 -990231277 -1966291936 -1990208316 -225881340 -1784077131 -1817661303 -1478640946 -837616338 -1062486681 -887122762 -2040783460 -1986285983 -875223666 -1768656159 -335422539 -302039598 -1875665725 -1401385762 -1637345285 -1006752337 -462873246 -1324876088 -2081958920 -385024222 -733870743 -1166992880 -681186109 -459611806 -196945183 -785390654 -1626227316 -978124643 -353557116 -147197363 -44918597 -1180099682 -1923875329 -2058865271 -944605586 -1786965278 -966624051 -336635602 -1362636616 -1067993504 -1098500102 -574301055 -1486321767 -1080156065 -1503716364 -1373371852 -1106478608 -1525065283 -1554884436 -214215509 -1137467391 -515014943 -1497049591 -994067685 -2020291782 -1180037357 -876379054 -1859909452 -726194032 -993529923 -1572060436 -1128438811 -1243009820 -545126724 -779612166 -1143943615 -1986729361 -1884626771 -1685830594 -2003038487 -1114200637 -312704219 -727324524 -666356144 -320493103 -638595445 -1897860056 -759352301 -2086292433 -203933215 -121643893 -64477707 -1345063461 -2068720705 -1228644005 -1764526130 -1788985487 -560538362 -2104974392 -659005666 -1335060883 -1459116725 -1259031982 -1394147583 -244355064 -886827584 -1374694108 -1854798730 -729635258 -848156836 -2122977513 -442266086 -725205135 -1553007220 -876100902 -1479976082 -1802410620 -710965758 -602482798 -542990381 -1381317364 -1502712678 -1684290426 -1887238675 -486944535 -16621028 -176743486 -557885401 -466331805 -1470818732 -366168107 -1646725694 -1896980169 -1003477021 -1249212056 -1706892120 -1649304214 -137009222 -611524570 -36713448 -715113847 -1599937917 -1513826932 -1650480115 -573024506 -1506199194 -152622722 -1034614136 -584693993 -66771679 -1245145219 -2075039365 -52180275 -820553949 -2057723456 -1081473704 -26954920 -2059774570 -1194808350 -24355353 -1318524941 -564929994 -753205771 -1860777779 -287780392 -591875300 -503914196 -1757872051 -1623029378 -917471852 -1016831104 -205502102 -720123938 -2052675121 -2133453239 -414133914 -354192671 -91552013 -1116391239 -622930034 -602302313 -1804546280 -97781379 -586646898 -676991309 -824568557 -811763408 -343988865 -394876331 -962025887 -364704546 -670976084 -658413391 -2118113193 -292018432 -953653229 -1379362242 -855231929 -774981332 -622927869 -565915158 -130987943 -343619826 -634888799 -1877286497 -724413355 -1130462642 -897799085 -1089117773 -1799287430 -1906602603 -1666451734 -572569164 -295717141 -840829629 -1381177343 -1296863378 -1571260643 -571219742 -1238301704 -872716051 -425360147 -54929766 -1934092599 -1981830401 -1152184637 -907149060 -1467841367 -1865202080 -1632563301 -92842188 -1325525994 -120027180 -809669727 -1662714297 -34491268 -2021640233 -221133197 -1438932669 -1328019016 -1218058641 -2097456083 -1000321476 -1901058416 -827097646 -368489291 -2004159536 -628318357 -969533800 -1996146811 -1249919043 -704320747 -588932565 -437490932 -2073570443 -1133811985 -1355632064 -1454088625 -503617515 -1066521778 -2133004984 -1470246717 -1489730237 -384252886 -654928473 -1529154836 -1568525003 -1837958496 -1163663824 -564316739 -1183647221 -1417821186 -842125990 -1694280200 -134162180 -5929910 -879749608 -526752061 -1194296293 -8147942 -1650991433 -576811544 -730437450 -1445695898 -1180975528 -1611833522 -1727280996 -727759626 -1536664517 -1082198397 -1469451936 -1016747852 -953769385 -1184112487 -647612260 -972130824 -547172592 -804777290 -1039904224 -1448373482 -1085973229 -488543950 -1128185169 -1275016020 -1602418374 -253194791 -1279747630 -1669692705 -1356477586 -632391350 -704850447 -901665877 -1653781507 -224945028 -1079866876 -938284135 -769037024 -1648674722 -294555413 -643019956 -1098688788 -1598063010 -67036041 -1393310059 -1200474725 -769839510 -103671395 -795898048 -2130339220 -1763907756 -2133391904 -1530760216 -632859252 -2126428420 -459601566 -24841503 -899313403 -770456635 -1885756682 -1348891948 -1989592304 -609985891 -2093422906 -1934192341 -1510710548 -813021755 -18190424 -783778294 -297096560 -402404645 -788864112 -2022577453 -940604208 -1107798289 -82623733 -1382644569 -186726996 -847013505 -86882572 -2093991291 -749620801 -1737729105 -235468535 -1854789971 -582422745 -548612189 -1377763952 -1910059310 -1781267814 -1846110718 -739105570 -1101900742 -1894282713 -764490616 -399123111 -1470696996 -467634802 -1895452841 -1103479089 -504273331 -1351403055 -1244094713 -1599054199 -1693564035 -982478907 -521228166 -695989849 -157966934 -660472046 -210705779 -131493750 -254783487 -63673891 -720229831 -1684935125 -1985276533 -1089266692 -7201769 -781047351 -1642777793 -2116601119 -648394478 -1233966868 -1031571397 -984987148 -1875045360 -1712329442 -692578247 -801230589 -1560042633 -1008686608 -759911238 -742928357 -926972441 -1779440549 -1200038921 -2035216270 -760320474 -1178506868 -923254195 -1563905790 -1512256897 -1032705634 -720755584 -1931331208 -668288451 -584522147 -1473523251 -723862353 -459706616 -1790416853 -995186607 -1498661013 -159949828 -1774716799 -1264867610 -689299617 -1531871001 -2121953571 -412742068 -583757066 -1499708766 -589665323 -2015536403 -713277443 -800266947 -396497068 -284465235 -708606423 -1751328746 -1171368240 -1203417631 -839136771 -846600348 -1732887461 -466336413 -1548265388 -637025417 -1280203224 -736926475 -985073076 -1171753609 -1237863473 -2097302222 -561863296 -750820013 -418048719 -1725810896 -1789592690 -28380948 -257223402 -269136003 -768241839 -1168902309 -560704607 -604086813 -1731866722 -490645216 -2084424479 -1021485042 -1114826776 -98804157 -596607568 -582247533 -1898791399 -1380048573 -1652978811 -1766418885 -1388264067 -144349414 -1571563635 -1368638992 -1018195527 -1662522993 -1114212234 -507614998 -1680225502 -140054064 -246576536 -1715885489 -329518060 -1997192454 -1644171768 -1922818827 -1482105333 -1081510178 -639973438 -1435468290 -1084259632 -1752890229 -1645409257 -1246459980 -549907375 -1671118584 -1698905822 -567579842 -192044520 -24326199 -828533663 -881306893 -930237292 -817216484 -1799524023 -1588053860 -1494460104 -422232616 -1177607424 -838684416 -1833804451 -66106213 -798076392 -87061182 -800922267 -673042073 -1021752162 -1309345322 -901896045 -1227247789 -1920643935 -1435917488 -43995830 -703540242 -355886912 -649373089 -501612769 -1732494108 -297703483 -2013024918 -1452421988 -409736867 -1614951387 -442146876 -869126312 -222158890 -1497885744 -14905627 -1410769937 -443384632 -197254934 -1696408417 -1543366947 -2060789763 -1077287925 -543527618 -1820725035 -1431177142 -1977379194 -1502676233 -1071759311 -2113392588 -409705136 -1081648470 -816763435 -627580421 -1451945330 -988480449 -457413151 -1898856244 -322414841 -724991306 -106666864 -1748621650 -770362355 -301192722 -527122675 -980754850 -1609773225 -1459607669 -920393202 -723836673 -28102856 -2025782099 -1113998355 -1207917939 -1313885682 -2049798920 -1037783266 -161170728 -819546629 -160081745 -1844362171 -1416047199 -1091497539 -993825299 -93993927 -1355450544 -550765632 -1063458454 -39842397 -1763752162 -1665807193 -477186812 -1374811386 -1678406429 -1779148858 -592555578 -1199928307 -176126772 -930191438 -46548306 -653331434 -457524127 -1616546229 -1476852606 -845757016 -443908419 -410608455 -1231345374 -2069278326 -2010645564 -117324956 -490547546 -442884789 -386328221 -1175345466 -1476661956 -1936469760 -1132586035 -78443237 -1988008648 -1910766910 -788999132 -2144374946 -1439153468 -744020515 -2103002771 -1881709871 -2053616175 -769878641 -761346112 -1236535558 -1253871287 -557692598 -1520859078 -1728157352 -424289389 -1386052883 -1635685572 -1029243357 -512324514 -1376165975 -822663635 -1007994059 -2005142077 -2109499415 -1549139582 -297218446 -303459000 -2109235022 -1400453725 -1004984955 -823255030 -210151589 -1554640655 -411955536 -249415624 -40313624 -1093729763 -2003592068 -1828301916 -2074280936 -190165954 -663522142 -2081545370 -2024423960 -1910076299 -2066801937 -1192164934 -693619228 -1117129080 -138921839 -544623784 -916634174 -1970362487 -1684482269 -816576682 -1783790044 -1287557388 -1931792944 -1986234462 -9310219 -1858028149 -1319389216 -58414390 -370626051 -1409462857 -2097611189 -1459704371 -398180069 -653375631 -1200343106 -705202624 -378253775 -759601305 -1976335367 -1138945020 -1727205429 -1605188704 -1716974514 -1452892059 -1867769223 -1828862762 -763001423 -1140060124 -1141405534 -131391287 -680171493 -586829870 -1604718066 -249412589 -2136788026 -627324201 -1440623084 -1821536510 -37251938 -1175580689 -1135087623 -1320443460 -597224122 -207252376 -72207998 -271561831 -736943742 -1275279545 -1736515755 -1317531555 -1048960668 -1188688853 -253184330 -1103929603 -1633611188 -524809821 -763323318 -107698448 -1906584762 -1366598047 -1075771264 -822809955 -1319710652 -1165821948 -328684808 -877627972 -1375637808 -535695454 -1182047154 -295298881 -253584750 -1391337602 -261644631 -1562287808 -88637187 -1519034538 -1127884630 -518824341 -1097092367 -536819027 -738585742 -955086134 -1839876460 -1186630067 -10906380 -767418665 -218718773 -1661897794 -1343910876 -2024577433 -194529716 -990826078 -1225694108 -1577731132 -1946546015 -832995707 -712952756 -1785703479 -1234404728 -1948233476 -1276865323 -471399190 -739012547 -1685946828 -1809099678 -1464813920 -375024232 -167763279 -2098885289 -1398666601 -1033562945 -97196032 -1486138104 -140815671 -162003503 -1931094172 -979391693 -174029996 -49415558 -1598595564 -427736531 -1340110008 -420414720 -689000410 -798066246 -2064021007 -1697714658 -2022522964 -24807585 -329253577 -1846993967 -551485984 -285512636 -1132405854 -1345108464 -677602479 -359084512 -704345114 -998468734 -826794680 -1718990670 -978687599 -1225224020 -119413057 -1225522701 -844377330 -877845934 -743957848 -1049758502 -1712983009 -939660581 -280644829 -923552191 -129873621 -942562795 -1813515293 -516127580 -869786827 -586016260 -815276678 -1409459286 -2037593392 -2057904282 -1973132639 -997786699 -101250670 -912962266 -386146847 -274476295 -328216309 -1593499867 -683702932 -1957666674 -906834231 -471477658 -2057824223 -627581026 -1462113565 -87314334 -760680637 -789315468 -1018583157 -1734969462 -1098788868 -1132623923 -715226853 -1351746112 -567402771 -1510979517 -1038616444 -1279491492 -1659748633 -1730183948 -125550009 -1290059909 -1041990451 -4368672 -409826306 -970669013 -1748318879 -2124141099 -671303165 -1860696464 -1068602834 -602091177 -403467175 -1466936646 -1691941762 -1634224007 -87040519 -453639226 -747524532 -865474374 -1121062687 -1826545278 -467753481 -1742607147 -616341843 -1543725820 -1649917333 -1851765667 -1292552945 -2140257210 -951841220 -989698037 -1594061844 -1538915783 -264520413 -503432001 -96071627 -1915616092 -684822420 -1445548667 -853947758 -666755805 -595144589 -1763763244 -1852062367 -1984222551 -554860394 -1164646684 -2050859230 -1678544260 -1948190828 -560080387 -850239508 -619223818 -588955764 -827396525 -1096781350 -1752007249 -1837549926 -739278775 -1865473530 -1899856157 -2095567103 -1464489321 -1361939780 -93689087 -526971958 -595137878 -1650971467 -241242982 -121672938 -552637022 -303655479 -1116490281 -140045281 -98960655 -1079385807 -1442892040 -1301174356 -1011423891 -1668270032 -1067932592 -74752118 -80913731 -559928366 -442706208 -1679884648 -853771827 -2004850782 -1508671644 -904900579 -184843199 -1398292031 -1180615896 -2009949439 -1302453963 -1042942270 -969205076 -766249837 -2049063047 -1554867637 -2079358363 -1774619310 -1773853634 -1790038984 -1086793265 -1385987120 -530406831 -342989920 -785476892 -928145735 -24156337 -121146676 -297686176 -1722146169 -326068117 -1996058922 -1920252267 -1295604353 -1885663938 -1937627187 -1258108801 -910630045 -1990697793 -2010070338 -1186919809 -585632880 -814259959 -1501332229 -2105404200 -1440337781 -1321416283 -1915074754 -176489242 -579773787 -1124731670 -1214116796 -271376578 -1918363865 -1769486644 -1408482052 -645607083 -1630859337 -1519090298 -2065042950 -1693641483 -136663796 -1248400729 -955821113 -1307766631 -138640172 -105613809 -1229795441 -1789358159 -381585725 -925110133 -544401051 -1468127937 -239133129 -1168595566 -1847725947 -2116455609 -350291555 -1097488458 -751469523 -596945054 -1959407441 -99134142 -1847698169 -1649590763 -658070971 -658027547 -2075684026 -149579467 -1426234879 -517143539 -765140564 -585380912 -874401077 -828304718 -1328395572 -1104384392 -687315323 -394096448 -739434188 -182532527 -1217533373 -1859211395 -1878851915 -1264589917 -317080660 -1267724413 -1458947404 -560737582 -1158297638 -569141811 -674253739 -2058869801 -1020741296 -1499589636 -734931060 -1807871523 -150565658 -821277840 -1339257611 -1126563870 -1943131138 -1421216437 -2071534725 -1279237911 -1692780060 -691112964 -1944022972 -1377884946 -1796121821 -241819668 -1224099952 -554555004 -326924248 -1352667110 -1014230628 -1596458557 -1018281881 -966391024 -715118107 -1671535737 -120061705 -1389931402 -249961348 -622362304 -1797882438 -1915222176 -506727149 -1790532888 -797903205 -1471274567 -1584936011 -632379489 -505502620 -537226808 -1149710068 -119257170 -753013539 -777418202 -777212666 -1617736408 -5354589 -1947747796 -1703976151 -2032737112 -2042784908 -1264884167 -967573116 -1255185528 -1171304615 -134072256 -642060889 -12035248 -412950318 -1936331169 -950770745 -178093888 -1779255345 -234798940 -1338325041 -485245409 -1524181404 -1731915612 -1312339446 -1832014232 -42666538 -1984449715 -77838448 -413254513 -606485593 -1245972889 -953303526 -1944354862 -513509235 -1960418999 -2068003919 -2066523585 -808870164 -1109360838 -574581012 -1896591772 -918139583 -1501967786 -2049792464 -929277274 -1862063134 -415905407 -62904464 -673372124 -126468378 -1692702163 -1529381732 -1086998781 -545127238 -788250964 -307333605 -657728200 -1339526291 -1347301336 -1025980184 -1502750725 -176262708 -1067384143 -1594388010 -578336804 -595678506 -2147371675 -265570243 -968055635 -774947773 -58901756 -2119335472 -1507508762 -687695628 -343431642 -1767047605 -1217742872 -1085293794 -1954181787 -318396891 -1914782360 -1704674225 -880364948 -131353206 -40144126 -392460524 -1161746931 -559350793 -1472855032 -230523855 -353931797 -2009989 -1569630418 -1089315578 -828828771 -1546219755 -615809938 -1193933073 -345960343 -1317252372 -651699281 -943216067 -2055639562 -417205598 -440378131 -1206600155 -640726464 -1206674390 -1888394109 -578970950 -516352093 -348209524 -464531793 -1282788106 -1231365309 -256842224 -305128298 -100355450 -899385255 -1978073199 -281916386 -819774220 -1837720035 -1450817091 -1353520399 -323073322 -1054663238 -395018728 -1207808619 -1624028089 -522938453 -1523496047 -950538748 -573887603 -979884944 -2021648612 -361959050 -1772065046 -1794011526 -1281313602 -71696698 -268077319 -154809027 -1272620272 -2139271031 -1556999943 -1409803306 -1377086591 -1263071218 -562110331 -607769964 -1357559816 -1641561784 -1006490679 -360154534 -1508335692 -1701006256 -1509835728 -1142307544 -259087828 -1539772727 -1782276339 -1616521217 -1056475922 -796027658 -13727196 -932232943 -2145868136 -765394034 -550483908 -623490480 -1431783647 -1433490494 -55696965 -1943504310 -1250667300 -395374264 -740851230 -376437304 -294944266 -736021386 -805627782 -301737739 -1097288806 -1690885653 -1064069220 -1715051971 -1352966563 -1752169905 -276342024 -1620752554 -1305596530 -172974664 -1639803457 -1519059848 -1553269800 -994315668 -1893174769 -1470628631 -1466107894 -648008780 -1193991523 -1328329493 -2141278286 -933196376 -1158417391 -434346835 -770339692 -2067779328 -439306295 -372121679 -776678889 -1236480957 -336192280 -354174703 -1937047484 -104975068 -1231893689 -547390296 -168761124 -1689797028 -2094901668 -1017941511 -1688243375 -1752459461 -847942422 -666805062 -1423006988 -2100554324 -1532850435 -1403431633 -1662560830 -1750138693 -497500292 -1333569873 -22031772 -920804720 -1197768758 -387808728 -288422851 -652265478 -1869354458 -554619996 -1419244792 -1146351915 -1660838168 -714645870 -177099419 -97600391 -1839748876 -1189809426 -1906785565 -446526774 -1467628000 -426626558 -2012146620 -1723253031 -1749228575 -233532595 -1529701096 -12098588 -1477505698 -1084856025 -1039049145 -2109446258 -655729883 -2113550824 -921693941 -1110520576 -738944755 -546566684 -1358699769 -1473399032 -783597267 -1549543065 -636106286 -864754036 -1899243803 -393668013 -2128661731 -1487637544 -1719583634 -207215312 -1596756997 -1739195667 -1261655952 -398054786 -695227897 -236741552 -1775550220 -239788828 -1451510424 -121466248 -1373765486 -1279834305 -978955783 -1437625214 -828459301 -1778988406 -43322461 -123645694 -1496492409 -219444399 -972592094 -1857286541 -1740085442 -1183718848 -474172528 -105864079 -1141116037 -1708266149 -1120289500 -1716493251 -1954239406 -1286799424 -2077593878 -36207326 -798655981 -1238278917 -489734942 -1817834890 -101150361 -1374552550 -1623117071 -243844456 -894973516 -844419824 -1592042592 -1961085771 -389539041 -1452506031 -1822247568 -1250585509 -1168196574 -1584318344 -988668455 -1469746346 -1669929428 -1040113753 -674960091 -1045625983 -977212880 -61941904 -1675495380 -97788549 -707153088 -947447518 -159192521 -1931559932 -217485425 -260370781 -1627527328 -1352589857 -1863323104 -117384727 -1495118743 -754560054 -999892043 -1126028926 -1542261918 -668436536 -925903095 -986811503 -324725140 -899480953 -1438985838 -74146752 -643945604 -1623669195 -933457936 -1259489017 -485600240 -1045375080 -1055253453 -1724827645 -296478662 -754811194 -925834729 -1985267788 -942289477 -1514826961 -1278098342 -1867396700 -2010319642 -1082004843 -363873505 -1736055526 -24913693 -2112610733 -153970033 -56549996 -1248010798 -844701737 -2035187089 -269875407 -310502985 -238406685 -1844153140 -50346829 -70598085 -1131041451 -2035907360 -1638051869 -2144891390 -1529093188 -532407067 -1748701667 -2115208074 -857807280 -1109232649 -567592136 -398669778 -293980206 -1712934142 -118352912 -587534862 -568616728 -439118346 -1508230130 -2074309369 -668039385 -693437179 -204915184 -1593211347 -129514586 -1350712491 -375203800 -1038279008 -2050655581 -403299164 -790659416 -2131480723 -1621795854 -1660470454 -976927613 -1709910376 -837525278 -1679524908 -1250072588 -1137467915 -523821811 -1337708424 -859181725 -587209647 -1545179164 -306466177 -1111251333 -135875772 -888983243 -1097632922 -1031992324 -1617056296 -1459614087 -1028260528 -1173786687 -1048067067 -1202322375 -1758522002 -1809337600 -1168601680 -1950483945 -445792160 -2005872384 -1498867282 -1479229264 -2135542376 -1166521121 -1342267184 -168849753 -1031900984 -81904916 -38905485 -1049457707 -952488738 -1135114828 -1777677895 -1639884201 -728640609 -1310960269 -127022863 -274513323 -950545905 -694175302 -1873130210 -1736658097 -1562389902 -1804531045 -1989210381 -633456971 -1434873418 -1823664163 -1436977557 -680706337 -986018390 -2027260478 -191310444 -571612749 -1401119412 -1455768129 -813753832 -1584790328 -331368955 -892930014 -859020062 -17623253 -1988753532 -1545130416 -1634642188 -672957645 -1750254413 -294922685 -373309519 -1413352946 -906343955 -821343514 -295556882 -294840263 -1135526612 -108596995 -1976078662 -1119471379 -851235486 -178756888 -37394463 -1423514717 -2044021039 -565701414 -833559829 -1604216622 -411577869 -344417296 -1153065207 -674503521 -1961988581 -530681182 -659039883 -1910146002 -1090816611 -286886638 -602937351 -1740211711 -1158438284 -785495486 -1240655093 -1771419328 -1678847335 -599521412 -163099760 -1028532748 -1454020933 -1513401718 -946359358 -1197840224 -1588937790 -1318286085 -845444496 -1633835720 -3551851 -1713901288 -1340790205 -1115067464 -1996563726 -1814558507 -869556102 -1003188479 -694653956 -1327933400 -1926594176 -509886566 -1203763232 -205201837 -2116021024 -1636156048 -346598901 -1312078443 -1740304105 -563820595 -1434889601 -2095651844 -741247661 -596802180 -1705607770 -1538070234 -1085763899 -1265301934 -1546532144 -1571164567 -1103954057 -2044609566 -1867140115 -1992862841 -1890810075 -381922219 -138113850 -1997138190 -732156720 -276695730 -1123038355 -671859002 -465230688 -144214489 -1451362807 -1935434623 -914907652 -869994644 -1931312932 -361123719 -617558811 -522470526 -101497899 -773172775 -291281428 -1451728883 -1645623014 -544106585 -814005169 -1514043993 -1003657048 -2127442198 -318299236 -273494775 -1011678845 -1658314616 -1250980346 -1361771092 -1553517165 -856811929 -1560237568 -2137475506 -1444382326 -578607394 -848517342 -1739550914 -789841340 -1266979273 -1820281306 -415874780 -1695640122 -1515534764 -289241481 -1526078006 -1395850721 -951708019 -898472477 -1669398882 -713161719 -1002777326 -226856426 -992478357 -1078259850 -1846285564 -1530258645 -792890043 -966923066 -1067213413 -872412547 -1766819360 -1676596451 -1423619670 -1660482463 -1178762876 -931013357 -975639057 -1527986154 -1253839452 -22641753 -435337152 -234728335 -151666806 -919453 -420861042 -1747883323 -1246202348 -514853645 -933597752 -1461892882 -673262447 -430610686 -253909212 -402119495 -291315356 -2021956779 -1246354525 -925008837 -989402826 -927417861 -675679901 -258570771 -1439530316 -635253910 -1571256133 -495420172 -732731385 -1345155797 -1473128210 -526859207 -847615468 -1614140125 -1839651971 -1708610738 -469345882 -588803343 -413140425 -836492224 -1496855506 -2027048384 -921613880 -1912418996 -638321123 -1582297496 -1384014471 -1735833440 -587281585 -606757483 -1520660825 -543602828 -937295858 -1338934661 -2141194161 -1666791148 -1982132968 -1942460912 -894146290 -1973617971 -564827035 -1170257505 -1862647309 -1644200044 -250569912 -113079217 -2146856171 -191429103 -418430915 -1706928127 -106990216 -740747773 -785119152 -1358060496 -1466555956 -1736135873 -1375305722 -1396776993 -1487175994 -404763725 -1783216026 -229971450 -1807079197 -1866328105 -1230312653 -1892205655 -215115162 -1225549833 -1300384854 -627165659 -923491337 -1254584090 -1800354384 -511545658 -1170835065 -832279994 -1568866247 -1130795463 -49070691 -97383189 -336718509 -608570918 -1934291812 -1035035998 -1232477686 -1772693287 -1615439778 -60599825 -594010097 -2023709023 -631548375 -1569355151 -757870403 -802352864 -1094765735 -87820649 -680382254 -1981606350 -1681526774 -535696098 -1192870862 -1820732889 -1563179320 -39893842 -480904630 -1583152749 -725866113 -1924646231 -2130513303 -394753443 -1044130918 -1619459189 -1042847445 -1522964948 -614292443 -1459198372 -483789464 -676433906 -46230924 -1761543101 -1045340965 -481882648 -840832099 -1422690633 -1078543133 -164972004 -283082951 -1098879352 -505904864 -855290775 -1764006054 -1638002743 -1319230708 -1689337728 -817897509 -360609316 -561922178 -1740449787 -864814322 -764986958 -151208517 -888390818 -1878164182 -443279621 -579818704 -1879651689 -1821489653 -1397209986 -174554757 -279139097 -1386518231 -866854820 -699898492 -1426020425 -1207782455 -1184289741 -1479236591 -111203618 -688434836 -2029882263 -1305977999 -141873206 -756125072 -1533345805 -1139180635 -1392219440 -50310368 -1605281705 -1132558674 -1766070557 -1976366312 -1659037635 -517858797 -2049063535 -1563069453 -340842820 -1206389191 -1390021810 -1769448604 -769143772 -1295304711 -1144548138 -1409529187 -1064935852 -1248150466 -1044618166 -1218701737 -21068673 -1913869003 -1386268655 -967198282 -1397801431 -1525036284 -1067498243 -1364583063 -1569673528 -1813865348 -2104534671 -1858549407 -1490237834 -325501077 -1055752230 -1517838096 -346636759 -1948357849 -1219718687 -2080561794 -525847657 -1026363794 -1507633054 -629187625 -546935547 -1115729269 -234618479 -452800661 -1686148106 -897011730 -740944170 -1938479884 -557001751 -647211784 -683781633 -1132910734 -1240692036 -244836682 -391446722 -1302645893 -2121226133 -1071593484 -1473821846 -1447381224 -1588962199 -1728528148 -213806820 -711082309 -413871808 -243944423 -427635238 -1785162204 -727130391 -1698530107 -695388778 -793184872 -1627146775 -1399086527 -1648808286 -391881914 -26983249 -388416426 -1912068549 -1190809335 -1532386952 -56123793 -527267918 -1274370304 -1487287797 -136353099 -321483544 -105068156 -648940058 -1813595340 -1861477509 -1310724267 -455504543 -2033136293 -161885387 -2093402207 -1586304248 -6018631 -223399808 -879158100 -1322695340 -1937349283 -882343567 -1173748034 -398426096 -493384126 -872644615 -1372218942 -1056873061 -1028291890 -1700887821 -1666782330 -1833928842 -9262103 -1049342537 -1164310195 -690455901 -1638183366 -59994175 -1152268782 -173890428 -1998663476 -597834758 -1880277040 -1594345675 -2014296106 -1342442234 -963431456 -365782612 -1610162170 -1554155343 -845251340 -534946475 -1478858983 -207196903 -1287356934 -710246213 -1393991865 -1922169932 -1313545303 -624016361 -1680331026 -1913595932 -1091731652 -633595196 -1610537346 -1417287434 -461290714 -497064528 -452135266 -1240272576 -1784907050 -733724407 -855007375 -1295869548 -2047829009 -141743794 -728581235 -313061451 -288871807 -1755418029 -1180470917 -1720771033 -836477482 -1249086712 -1747719159 -634581647 -1009950127 -521038601 -1804938188 -242128194 -2114529140 -184381777 -85623418 -258742836 -36459477 -741590544 -2064669467 -1858963643 -2009851345 -1801271752 -897364105 -220859854 -1139824162 -1470559494 -304122335 -373004485 -581613802 -1985092717 -147354827 -543932398 -33927907 -1143166494 -1810558596 -215044982 -46034573 -608955491 -1955359282 -781202533 -2103438020 -607005226 -1389510132 -1759611046 -785547285 -2111240886 -753271621 -820035082 -1927060375 -1902842218 -742686802 -1162124850 -468584485 -676905846 -1535675563 -1640717695 -1852272385 -1219027783 -1205956501 -560251921 -1585727799 -1055058523 -596122782 -1024383819 -442447934 -1634040824 -1303251132 -1556059771 -640718031 -1064940959 -1333983815 -536704025 -953230775 -721628805 -1575171026 -1868517413 -1518790210 -1316431228 -1883117602 -2091030975 -387713670 -838266692 -1255568124 -1159144646 -1919903385 -1874395520 -1527886797 -1731430000 -1740593150 -1126832616 -17494219 -1967562741 -1873791481 -2113221559 -1830188027 -1561893808 -2056613775 -1758417960 -60703706 -192454417 -471014137 -709877717 -1643130534 -1602668165 -156464834 -1184481110 -400608080 -658767215 -1622382220 -778105581 -1592573284 -143007980 -500918867 -807501429 -1727351810 -1917930524 -928775398 -2016967790 -1148278635 -1830966503 -1760838058 -2080585146 -918324721 -318614858 -1283186435 -1483629871 -934616580 -1405465902 -1492781561 -128247826 -1535113641 -786429229 -1901688165 -673870854 -2066172547 -1351425439 -1620302601 -185687400 -554392709 -1894199477 -1513026811 -1087748350 -258231539 -33025386 -1006881576 -487509472 -921582599 -1386679229 -1425264559 -1388844475 -1309332082 -679371365 -23980456 -1460082003 -302590152 -391408568 -661391615 -633516433 -286767605 -749833367 -1015358573 -1226477349 -1856760737 -1492832202 -979371113 -1975625583 -2094507214 -830804074 -385398924 -589036316 -33750342 -306315186 -721029243 -88267080 -1741097130 -1007289888 -907558315 -1903739211 -786062624 -35125224 -1939120490 -586248558 -424541870 -1334533756 -1189627824 -1002084398 -1465717412 -527628747 -896372366 -732571657 -808090948 -897979408 -1972322787 -271506017 -1946361491 -2026668133 -973186264 -1106083496 -1326868840 -1214403432 -793900536 -770409741 -1097609224 -633700038 -1225133193 -740367315 -833212487 -61406922 -1273987494 -1495851068 -177844447 -1881867752 -412154848 -1451768761 -168368913 -1540357692 -876364859 -1621334087 -342003426 -1385341410 -415377096 -1920999722 -973178656 -978215840 -1886305095 -1976134651 -2060478502 -140891592 -1438007750 -815290912 -1648690124 -553416827 -524936232 -740429348 -1875801118 -1529452266 -124980072 -301063338 -500049434 -1227326527 -1096509854 -1483941271 -1873349086 -1120339735 -413309249 -1526433545 -928943753 -551542981 -1243461215 -1689271548 -1853093896 -2141261278 -647342920 -740300738 -1861736495 -1368534675 -1412423355 -315093547 -82570927 -495134127 -220140364 -1932257614 -1206008564 -1435274762 -2126601830 -1226619789 -2103266170 -2013689570 -1885809917 -96128946 -731492878 -2004405118 -460847737 -1641884677 -2138386036 -1715274507 -798161821 -1522866385 -1105227749 -1976714540 -1069254690 -820416734 -1899034598 -1172526872 -1349192832 -604098751 -1932508688 -1130841988 -831016366 -1805906921 -1491238196 -2106199682 -1925101873 -1198553809 -697259003 -13801742 -37643918 -1321137608 -1526351323 -1694522246 -2054745655 -425696178 -1407635489 -1449808271 -1578151835 -427366748 -1567618068 -1627487480 -682864521 -751394879 -1489886993 -871367331 -1379743224 -815945462 -1912293739 -680610371 -1520601475 -1693591025 -1436099837 -961251826 -239963201 -87230141 -1493132533 -1732066936 -1708158267 -1454600373 -514631563 -1496032872 -1085940628 -2088102590 -562470856 -224662698 -629713860 -801432604 -660341444 -163161612 -2068079312 -1186170089 -869990722 -1865395878 -594758993 -1725502213 -896524803 -1147096669 -1293016764 -1345728555 -362053681 -1215044616 -832861789 -609676577 -1189749802 -904684997 -856523819 -1012940092 -1381256475 -479351255 -1245382888 -1774574954 -1028362342 -737490938 -1882068129 -1632407440 -1768253655 -12988752 -1406106517 -1522179631 -300371506 -1757330892 -1117704653 -1222642662 -1831685738 -964118821 -1180907932 -475747550 -807455069 -948179290 -1720666290 -1223545528 -1973769071 -956881088 -1942897280 -1785732325 -1719219450 -528825765 -1687301069 -947508048 -1176520231 -1893584488 -1914324923 -458981507 -340928125 -492626679 -1027134768 -1580491190 -1090200587 -670789505 -1817547432 -1712294696 -108602225 -2063979272 -996274513 -455744332 -1768302722 -837657821 -1759691462 -2137098997 -1558846504 -232699328 -409884509 -1948886834 -1520434994 -1043028505 -271073074 -1112339431 -1243669682 -898009123 -324259145 -1657437576 -1542954595 -1572840640 -1356425557 -1905423594 -1178200294 -65632271 -1422467786 -1628120898 -591302612 -1616165215 -1515601249 -1406654876 -1031109 -149979787 -1711962178 -962423140 -598884776 -200576743 -1691477458 -273117620 -1115285701 -1369505691 -552420091 -952663456 -1924116607 -1819057323 -1319228969 -1660110355 -1367194661 -365644527 -1436851222 -704877639 -1358681821 -1171746996 -1126718782 -251769828 -952714606 -636311010 -10583010 -1774990016 -1561858435 -1462099764 -2002844574 -2588493 -555128911 -1382644609 -187399276 -1408605230 -568376082 -689548318 -1416821414 -1218827162 -2129086648 -39282975 -951481196 -1381225610 -2108086847 -1430429323 -146203496 -520865104 -1036457756 -1505644275 -1563517324 -1425759776 -1122022006 -769950535 -1969668570 -759237485 -156579921 -971264672 -1022141457 -1409775446 -908843571 -2030200333 -209329548 -623499450 -1582542437 -1205770564 -1730176056 -2140392812 -1083420387 -532601396 -719821876 -1270886381 -915052405 -1155374668 -834908902 -655766416 -580077308 -1931041823 -99562050 -449613337 -1803884813 -1865407392 -788274791 -707793994 -981736425 -927235074 -1898546086 -1552040276 -1804542270 -30385309 -1732264024 -725648989 -422926810 -2107507747 -287430211 -1148834174 -430492241 -410687744 -416471950 -994858077 -272024597 -2072200963 -1739281742 -560834830 -645261127 -111344139 -902687636 -1646615844 -50731219 -88589874 -723844947 -167163974 -616300742 -852941313 -931303866 -1563256526 -1337495084 -1568543639 -3690101 -1889985391 -1553843760 -2050926800 -666709603 -1966111222 -1100431765 -827506391 -795815565 -744047439 -408030792 -858236273 -1876867059 -117369830 -1244744864 -1788723821 -457685194 -28632004 -181754300 -1022774066 -1304616674 -884404048 -1444513849 -641630808 -1373598469 -620263233 -878534493 -1579150726 -35858609 -1380220303 -244277627 -1732827572 -1607265637 -116765446 -1824281211 -1070285058 -957942534 -455267379 -194604592 -101783363 -1275998929 -942300761 -1704477149 -1863075910 -257762463 -739199642 -535485199 -1943258663 -1417045465 -689485025 -353055963 -314253480 -995950387 -1450609591 -13551546 -127567040 -830561574 -604668718 -774525822 -1557105887 -1042920467 -602762055 -941495486 -1055122106 -1664762263 -94917478 -1845186672 -241049977 -1172805197 -1732033813 -1151460006 -1613177725 -696980700 -1778814162 -1409770847 -831548178 -6652970 -147317146 -2058111478 -1160508517 -1220163165 -960968952 -1928150824 -902665738 -1278576158 -1308115624 -1709198229 -1753372531 -1161524383 -1113953851 -459939211 -1404673724 -1063547797 -1541430198 -1722104025 -1765237556 -861020387 -1424830823 -541494464 -2009244109 -185390888 -2013366466 -750368283 -1415757197 -512401219 -517863263 -2124123597 -377147051 -1486243860 -1918256763 -2116906977 -1493982590 -986589406 -886908155 -581367258 -2136395003 -464237581 -632934316 -1240545421 -2075645671 -1652430629 -1143058599 -2144650978 -1783455998 -2115697207 -488731023 -2124837433 -1637170468 -216086665 -373731578 -2064447618 -277831147 -878639051 -1188973385 -740346360 -481021802 -1404978906 -1897774377 -1466828995 -2030135052 -1259635428 -798846270 -141498846 -906707493 -488875739 -262111951 -826600460 -602218777 -400556728 -1943177798 -57947410 -1112027779 -300701812 -866332893 -517805991 -1161553093 -1596482821 -1426086929 -178031536 -731305281 -998945986 -258034456 -1015618699 -1303447737 -565432712 -612452609 -601879392 -1138963974 -2045765307 -1964326279 -1165665822 -1999642420 -2018561037 -8693553 -83657275 -1573515787 -1966202951 -494637421 -461937210 -625304565 -1856339184 -850241872 -658955566 -493030183 -1366375555 -1631315514 -596122549 -1020467788 -1197707974 -1513695687 -1592129047 -1266651309 -603157652 -1147843324 -957145467 -2091347839 -1418279624 -2104642515 -1523599868 -547974648 -1400030600 -335974021 -980862984 -1279697716 -830788107 -117041555 -22394233 -570235806 -1881158528 -1377128962 -1975200615 -1394520979 -77570695 -208097136 -1385187436 -2122503372 -1063312887 -1888265122 -558570088 -1236447979 -1929414681 -669473867 -1180456036 -1470666066 -2095277939 -899477267 -1377035236 -399947733 -297733421 -368709237 -1405824664 -1080043554 -1760227634 -411123566 -1298881363 -1127796186 -1179829680 -1680919009 -1058407978 -1055838145 -814327854 -494959847 -1585983698 -1060985722 -1430308613 -264914173 -678905380 -782105149 -93835956 -847915594 -215906866 -1646817079 -1285404217 -103186299 -1232824164 -1153498092 -1507550775 -1393808119 -981434557 -148706892 -1793252383 -1407299083 -90799923 -1360916491 -75140040 -158267844 -1422899122 -287650462 -555625437 -1137822503 -40931386 -739037462 -2104693233 -228533647 -1264244293 -950629033 -2091307598 -741949137 -1649091077 -849782957 -1535905749 -1214486503 -42591186 -718008651 -860784864 -1761363056 -166808297 -1080888344 -926227635 -2146387989 -912628817 -1224320445 -2112897208 -673788064 -674721017 -1322476559 -407780663 -949285464 -984779885 -539059766 -1891464116 -636971071 -366810002 -1697636724 -712686226 -1601101063 -1735468931 -903429763 -1234642451 -1648676643 -326841660 -2112094241 -63223577 -1741737021 -1024519690 -578548184 -2000858519 -982700460 -2097385790 -1966390672 -1502180621 -1331943015 -596716777 -270239549 -2135670285 -1168804037 -1056530750 -1717521854 -2062100851 -1637907471 -1865477851 -1972479204 -752922889 -1401347299 -990897644 -281020223 -790348208 -1195975161 -307595007 -756144320 -1856846941 -794179183 -1158662576 -260203836 -969166360 -115550025 -724053287 -1521250707 -1867815014 -450988452 -1293122501 -975366667 -1244894718 -12352705 -1453482823 -1059321536 -1377621922 -1670444747 -1111145598 -506271274 -571092704 -1250657685 -233774959 -1308145550 -64680864 -464555866 -1687383017 -177324437 -1731994270 -486860805 -756854565 -909032774 -915167860 -948343206 -180635208 -1541547645 -1548552107 -1160944356 -2102858297 -1601019000 -356236090 -75556794 -720201381 -1206775975 -1448249557 -1150649401 -874241372 -291626430 -807726556 -1216094005 -1290073536 -1271019440 -1003891371 -1770741565 -1025102829 -1789430769 -1601941995 -836627526 -1623392573 -579239276 -731139881 -366551833 -1653557635 -757295618 -1879359604 -1207384352 -935823561 -216359099 -657562522 -702459792 -1524116585 -642502679 -994748837 -583511564 -1668523946 -1040497896 -688800551 -1734003327 -2040827099 -572243009 -1256480997 -1469415628 -406519296 -1224326765 -71633801 -1358451087 -1588767952 -611302466 -598778814 -567157056 -1676214806 -1451763096 -73157258 -1193389122 -1941194121 -1078026423 -70561622 -518207810 -1472474085 -270398567 -513318517 -902505220 -728233779 -915819400 -1161357751 -460853474 -1738306436 -1348736064 -1517133563 -1390452510 -418288916 -1467834581 -1751149778 -310936711 -1085588626 -466972270 -1497695752 -1116677377 -1137084106 -515594889 -506783778 -594812844 -483092323 -1844487001 -1366581362 -795346469 -1449885555 -729580376 -2073238709 -2000809588 -160317143 -1505729063 -841065593 -1052056997 -1689082828 -828760503 -398839479 -998661266 -1915196357 -72787216 -1416544169 -854137741 -1712316439 -474036826 -2120087859 -1267975189 -1378772342 -1678200864 -471701550 -1525809773 -1182625984 -1433760103 -292048134 -1452854743 -1240599211 -832210554 -401788167 -1165136601 -1694959661 -816444972 -1717623721 -1626695873 -263227554 -249187258 -497133556 -1612288862 -790245788 -1622085868 -92284811 -547625343 -1971712406 -750250785 -1588451958 -1742842249 -272733863 -1107932743 -194908464 -913992773 -526008820 -1587546688 -1560354888 -1961789099 -1472954502 -1902316145 -490912479 -133862779 -1416348244 -1856193560 -550222951 -532553475 -2061897276 -363906093 -136278395 -1213417063 -1395865929 -1207308875 -1814765269 -49637742 -1037874758 -1698876772 -79336492 -1968559904 -1453240846 -1287381391 -1121295012 -1436264259 -1577208733 -1756520610 -384196961 -1862480645 -990561843 -1079663757 -1819430396 -1147015939 -2083671301 -1247724278 -324127391 -1590531745 -190600359 -1522116036 -1379013988 -1444577892 -1718001509 -1533727848 -1117726395 -1588060456 -1605319076 -1760653071 -1118992284 -1389020409 -2118771173 -613270057 -1455826046 -1787164851 -25880168 -1176286882 -119171492 -1460507040 -1003736070 -1308081305 -1132398796 -1226484658 -1979603100 -225158729 -376572289 -416153514 -2085355166 -1631155922 -61343452 -207247204 -2132765841 -1745937610 -756858662 -977891053 -722577280 -336321175 -373029321 -999032454 -1711302132 -606448253 -618399509 -1767179930 -1294245500 -522258037 -825162570 -57921664 -679314757 -1220053447 -1264422173 -1792774546 -1966227212 -902392048 -973635622 -68508814 -376402106 -1850855127 -1021492694 -1243433940 -1230860623 -364519210 -1851001226 -1329494940 -254109545 -1621632579 -1063791176 -1336933757 -724255338 -622154570 -453980747 -45017038 -687113922 -1304117135 -1078586663 -896580714 -2086792846 -24439918 -592325249 -1623756098 -246553010 -1320484007 -1278697551 -1200884128 -1208224790 -28679498 -979985958 -1571907263 -701543847 -1162214499 -1975315228 -1173338023 -2097305807 -622116391 -1959789941 -85360701 -138225511 -1726340970 -2108611820 -1663715946 -1836820482 -1364415349 -898387977 -249207382 -835357624 -1754986129 -363978558 -1354197650 -968212644 -1266314389 -1382994153 -1767217990 -1933919920 -1227098095 -1552220524 -539003112 -939280338 -332351669 -229535036 -914720040 -2011767054 -1786338210 -1164910410 -40851171 -1538347604 -1452554195 -484256269 -2079574600 -1113947275 -349416379 -1420790955 -1362909692 -1362614542 -696995786 -2032364564 -76337966 -964457303 -427323965 -848564187 -379391182 -548647931 -1978479746 -672300874 -1449322451 -2002909683 -1096875456 -1186163144 -753266107 -727361284 -1284181464 -1027213098 -749499853 -1852439716 -1883876253 -1956776450 -977224992 -265508288 -2074261597 -2012619028 -1073079699 -682833587 -231487141 -1511494070 -1096774127 -1630610288 -1628291049 -1303546822 -83270660 -1518128423 -931195354 -1886978989 -417369227 -1043007087 -2058584395 -518889948 -52265569 -106606560 -735092322 -223234663 -251049732 -1734963016 -990450946 -1363301525 -1505700832 -366587176 -100083789 -628546122 -502612861 -1361171176 -60663541 -1664884909 -8745153 -950898475 -177368351 -322573221 -1239400319 -9785533 -1256695959 -787314668 -1750875909 -2987722 -822519773 -737589072 -1383922620 -192093683 -850608740 -382455101 -504327036 -106539343 -1752859850 -1134829404 -1275524021 -1550456593 -957385853 -1836548047 -1080567598 -1977900554 -1675239165 -86550338 -805101747 -50602082 -65667962 -2022326423 -1016510292 -1256065759 -932961503 -1505874174 -1132462523 -150060700 -924383322 -1213790456 -1229031139 -1828636327 -1252275672 -1657478704 -86709244 -1328351242 -359330082 -536672810 -428600270 -824585852 -1102440473 -228123395 -811589870 -1722302993 -814325438 -454354135 -2025581860 -2043548776 -1218311761 -2056676629 -667321491 -1512694603 -1946779435 -461118353 -1895160495 -484987161 -1478774562 -935816803 -102777393 -802791963 -2032251687 -326697874 -1842966586 -1582770221 -739168958 -19779211 -1716717639 -1430561228 -215647184 -1577308999 -1294207625 -2033176559 -838636049 -1020900282 -2024183691 -19358863 -1094379744 -42920853 -1963754626 -147828439 -2061478341 -1912800136 -601690162 -106059011 -122370867 -1545311490 -382985612 -830690825 -629506628 -1613451674 -1006274249 -1017582818 -2102141065 -283919011 -118154243 -1543472273 -1683520198 -1826918561 -299069921 -1356428267 -1950970564 -34463105 -1548304692 -1297607745 -1196934930 -1406047061 -522902639 -921570149 -1177432079 -39144648 -774102954 -892414352 -782223416 -2081549425 -2092576345 -590943496 -2022953544 -819114704 -1490652858 -858358504 -1783719829 -107453883 -2091148101 -208766705 -1901215384 -1317775175 -848514714 -1695382118 -1474228830 -1845110371 -1106142717 -174712540 -783514331 -155637713 -167960345 -1116006257 -594988501 -1287875875 -842153012 -955307 -1023459220 -2082581717 -114955166 -1463676309 -582548978 -522726573 -109912534 -464022518 -1313337769 -1430959717 -470600866 -206482961 -25551975 -2102798072 -588817425 -649816599 -1513234398 -281695765 -1406764367 -1841246346 -587983952 -1674021417 -1094696172 -1066158955 -330006117 -1610031865 -1511602855 -777639975 -209584183 -608182601 -1850298934 -263491531 -390881403 -391264048 -379927622 -974660423 -112470045 -498436955 -2043679385 -1265973577 -2097417810 -357067165 -1158532437 -220441310 -547806095 -714643976 -145266961 -1960390535 -1589609471 -1869810417 -1775471968 -1072091111 -1247504247 -921033668 -750730500 -1061087375 -991306937 -717556733 -1855333626 -1129697742 -927026667 -543333284 -702037144 -863122590 -249334645 -826783218 -1526348836 -1652723237 -1765953961 -16737340 -2131599270 -1466731636 -393822339 -427451519 -844880618 -746672762 -1582161513 -1246031837 -1944042562 -1707134076 -1420891412 -903806844 -1129791877 -361669965 -1208380745 -502331536 -927909195 -343595851 -231940974 -549130713 -1502662232 -836444504 -694825466 -2063018323 -2025473846 -228157478 -1384422851 -9541512 -1450402306 -824679845 -534697177 -1583874791 -2123807772 -1511527217 -1653875756 -1808987971 -1734838018 -1037093207 -1448250997 -1174851481 -1764190649 -445523614 -1787387056 -1612995956 -1936956411 -721794804 -70148925 -24460272 -934414927 -163767578 -1515131639 -2103854194 -1159190703 -546499737 -233521540 -1343899711 -1836927278 -1011852074 -274807125 -1593508825 -834260038 -487727403 -289381622 -1733944146 -1046172032 -1564723835 -228753683 -667422051 -1055322876 -744136359 -1902509232 -1588642041 -642599936 -481863589 -520507486 -1468422971 -902802273 -1425836256 -259937719 -791505235 -1314775127 -1966315506 -238865659 -968194570 -962544671 -493972646 -26482020 -554195211 -722334238 -546481575 -2075756453 -1366860056 -1184389233 -1003914988 -20188837 -11367233 -2070524095 -1473448677 -1617980782 -1965064760 -692414107 -190013256 -244610503 -885023563 -1119284219 -2000604660 -1011059541 -1987090523 -1512225564 -506091903 -1851371601 -1111936624 -916143374 -163937828 -81556095 -618721879 -742801579 -943698242 -1569620199 -917564845 -432280808 -406362255 -732422325 -445751671 -1325373761 -1856414443 -2115119885 -1523098404 -709803788 -400605831 -620968272 -1990706731 -12807657 -509926499 -1874917163 -1705206110 -1229821555 -80772510 -333910666 -661793851 -951445944 -788745246 -24796591 -144477419 -1575460023 -283239051 -1574968405 -610549913 -835522425 -229829242 -1564472988 -307735448 -969052560 -350397072 -723429030 -1766781543 -1041006132 -640788415 -100401200 -1668305505 -1664127303 -160562993 -1342762719 -2054855557 -125335445 -1978850055 -453633296 -647859022 -824492464 -1680352004 -118689531 -1950123101 -823537993 -670943436 -109698455 -1160964059 -286522971 -933237023 -1841571520 -1758216076 -962606612 -1535015033 -1276608220 -445236363 -1254526793 -837363705 -1111451144 -1346615602 -238267081 -1645312359 -1765378941 -1089794435 -287043782 -1096572912 -396273430 -820748663 -1035314360 -1615940526 -2034220520 -1204619400 -1709915531 -924165363 -1845520837 -1562393838 -1870683397 -1415261299 -767778121 -1965128471 -1763204884 -1057640435 -1040644826 -1010769414 -1405893328 -86595755 -1568425266 -161678737 -767719304 -976591152 -349977643 -116536768 -128373712 -1503395996 -283914170 -36791556 -2027875003 -1929697531 -1128366523 -28065404 -1396326335 -355417929 -1357110396 -530610785 -1623361151 -51129722 -343778854 -1160188748 -140772876 -1590231585 -1588262180 -700727050 -319209202 -534907808 -828982714 -1986056109 -1306698642 -1516301872 -297123755 -859471010 -1154255348 -1349850485 -919854487 -259588256 -1360531535 -47635489 -1745746939 -1847218459 -29555734 -674498881 -1884004101 -1958034139 -640367545 -1616773698 -1004956795 -349969910 -2134051884 -1885625841 -1297330908 -839102765 -275061506 -1573922998 -220263640 -1856673699 -29984536 -1438923154 -1168100411 -2115590450 -841949771 -880051114 -1299196109 -2122764914 -1164081987 -1149931339 -1690675220 -1822289083 -1948328114 -719962542 -1487576196 -688507798 -1108670950 -1864535278 -1163040322 -822536860 -1024770281 -495263827 -252524617 -753551447 -1228103370 -1268008273 -1934815130 -1240507036 -1430508976 -1484931467 -1335704082 -1531944083 -1202759098 -508590875 -901921065 -1647758929 -2082691638 -1962397413 -959469665 -351954332 -1126494086 -770271450 -920836034 -1724063156 -332613921 -342237106 -1017833876 -2026705577 -1602507572 -1752345577 -1081377681 -560580006 -657401453 -142856756 -106780746 -1515152777 -311636913 -2116465405 -514932927 -118606679 -557629537 -460992851 -1933332028 -2083815486 -1523557926 -1990539101 -1490417541 -1198352979 -1616876487 -585047871 -1719431931 -1952510285 -142750188 -463176017 -2118580991 -1711848477 -1198934080 -646022759 -27191281 -1737326603 -2060552009 -1376323741 -1326753150 -1417485249 -1638483772 -813950523 -595608671 -973654830 -391337670 -1617292576 -1135804753 -488345488 -2087601629 -732753917 -1723851121 -1063908970 -1169213868 -1502109426 -135368650 -955718377 -1728566326 -855464466 -388263397 -1487593793 -984260577 -400984798 -547815700 -876075211 -1048187445 -1078031774 -160495879 -214777721 -1996629887 -779042787 -164325350 -152187408 -160742679 -67778027 -978966879 -1624115686 -1995181232 -53818319 -433872046 -1380495557 -575504311 -234608889 -291621531 -725389063 -349317822 -1911827103 -1427793707 -946561971 -308189621 -12403583 -161105722 -1874474434 -706710748 -2102973726 -1393550556 -947540510 -1722109065 -1849944836 -754617386 -1963470967 -1822822567 -177175467 -1375739127 -91080240 -1777237016 -672481789 -194993562 -196751212 -1820287351 -517473095 -2009020962 -729926553 -1448984607 -619732869 -554641333 -1777855751 -334142699 -266605188 -1182507074 -1582723380 -2099395918 -1390873616 -1053366517 -75865351 -1611151586 -1003400879 -2116977109 -525207467 -1004108699 -1128405967 -691000712 -57403608 -562282153 -1348098671 -1541887647 -820514780 -1399410073 -644194967 -1519745842 -197869076 -1280874776 -1286282704 -1983015426 -1741546989 -2125619160 -1890754275 -1591575266 -549188630 -328589604 -1425017991 -1539743393 -1289259801 -479477177 -1214270295 -703750624 -1744293539 -1042244776 -2131325300 -1157085140 -1665524395 -19168120 -36045790 -231204076 -1048987909 -1646528340 -727535138 -2058661995 -1823113148 -766003040 -48629515 -1272472745 -1807268389 -751110755 -1009582219 -780059786 -77158367 -1868035028 -2001280103 -1625811807 -437115821 -64047160 -551310973 -1639070053 -2077640702 -823178294 -1067933284 -86382562 -132774162 -299831501 -1271401445 -981798465 -1969941354 -1048950879 -1024165130 -1061909205 -1918901865 -74234409 -2117196803 -2070120878 -1139031499 -1033174335 -8278703 -1701207913 -604117633 -102374815 -479114458 -1560503003 -156190610 -870565636 -790557241 -414225498 -1893444959 -1716744667 -1884820824 -652312071 -504959362 -2144107837 -1244819799 -900672719 -2141644177 -640275472 -69302787 -835804435 -674604018 -1503558013 -859450242 -805207572 -1829202857 -36527147 -1878920234 -265343703 -1455565149 -1697236266 -424639561 -828942746 -1314313933 -657478889 -1444323608 -1739217615 -1630535988 -379530949 -750228253 -1209756634 -4577842 -1777862849 -453438785 -1673679939 -1797926367 -506053232 -1201428104 -1760894834 -887335731 -1325186149 -850703206 -1970145163 -179401448 -133096148 -1416482909 -1972024568 -1701790225 -1801100829 -172144891 -578710528 -434406833 -1778726078 -2076826706 -27249404 -566716217 -709484674 -1479707774 -1587925358 -1482210637 -703870859 -1617599537 -1999930986 -426038858 -724607308 -95263419 -1216966118 -915291198 -873801325 -1485691089 -1217769154 -1527015368 -2117708326 -2077353351 -288637331 -2109547191 -204627167 -1047476922 -2021173595 -968282919 -299942667 -992284760 -2119442365 -1156575766 -1694410165 -171000288 -668720730 -1407384359 -1524033655 -1396181816 -73970743 -1980729635 -1978963298 -209424750 -76075817 -853486354 -1501873365 -462858717 -1080687185 -1840315616 -2125074018 -1318487269 -2079260337 -127096328 -1509239578 -1860232729 -1864543277 -1297479515 -1189256967 -1211541740 -2089566973 -1552035820 -1729650278 -1893576554 -1780978185 -1273283409 -399712708 -642635540 -1080260017 -1103353981 -549066822 -428846195 -662880033 -2027037642 -741073086 -1957687449 -1255999656 -1969452029 -1414800192 -1607887360 -1976129319 -1970863578 -1516384118 -1679432277 -1840707018 -113432844 -1647814219 -864467021 -1370349992 -1857685116 -1996484526 -483444107 -1314469748 -1128777947 -500417631 -973162565 -707774403 -652470488 -1019990234 -1761392484 -661404693 -853318379 -826201187 -334088407 -1501603191 -217011593 -886610945 -2028609729 -1393335531 -1628582629 -1909164588 -1776060689 -229306723 -1372430743 -321645174 -674099919 -1621100708 -714569867 -1047200645 -1672753350 -1257130573 -1649421225 -2103613099 -1402074332 -325239393 -952596536 -799392167 -726455137 -1086954364 -1946094366 -1832065552 -905201778 -952127498 -1506205089 -251699987 -1926380566 -1214710590 -1661337748 -521152342 -1569099528 -756581936 -621924465 -881573306 -1112873289 -1626286500 -1972830131 -208502037 -1747907602 -1654259501 -1816139245 -1667215904 -531072472 -792999972 -667016122 -675325114 -738116603 -1660201549 -752408572 -1347156068 -731944555 -1005805869 -1735454746 -665022468 -1527720688 -1087119684 -429660312 -1460842570 -200537839 -1037617930 -1677335870 -966132921 -672148280 -1032158740 -119042714 -1443618841 -631616881 -573251846 -1032135280 -1872234141 -1708811943 -1703514670 -719076886 -1634741333 -191804013 -277092344 -1346478912 -88401898 -1859499609 -280413672 -1333463786 -386511210 -2103357942 -1408617927 -781774561 -980094381 -1246688977 -103692660 -1153298903 -307264899 -1650470105 -404786436 -17436156 -991697900 -846020933 -584594144 -536093183 -1424227516 -1139131950 -573970645 -228088191 -219916242 -312922807 -106165746 -1916266012 -870609625 -1529880364 -877572217 -438563523 -773254557 -1665791502 -213468175 -1461926735 -1242229818 -320534992 -1342623868 -1868670447 -1943349001 -787872584 -390351886 -81606417 -1464483733 -1268022264 -22478220 -1981805315 -730564235 -1429087746 -1220638974 -367956227 -1634887476 -500545767 -979260670 -119410082 -1175521876 -146617532 -1037117215 -1851753453 -1087272247 -846303006 -1030427761 -1091249719 -1123681853 -749711653 -1117195022 -1247209033 -254339264 -1187552518 -482154808 -1120057925 -2119379520 -100339851 -637212862 -135624045 -953174848 -1929147363 -471627535 -281839668 -1677858441 -1159049130 -314565973 -1953052944 -673285413 -816600248 -32380159 -899969622 -1062111133 -1017738467 -423166514 -1841245581 -575126597 -328820632 -1012938293 -1351020682 -1260002643 -528177834 -1534942987 -65731098 -935969528 -522142821 -1036210905 -1651786812 -1059844515 -1577395387 -598647094 -500822663 -1338084448 -736566152 -1371575356 -977541394 -1288309408 -1686091202 -2088109849 -684472869 -2013095951 -498789972 -1534385163 -1427801365 -1075269977 -987613934 -926281075 -897070422 -1727380614 -254555705 -530309111 -848093527 -1058943150 -1460539361 -1546955117 -90137190 -959781195 -1292871748 -1055928290 -181911222 -1512678473 -1675682525 -1095650917 -2080172641 -427804127 -328712333 -1340240647 -468580746 -614064473 -1922673876 -1193397523 -2082389728 -1183163337 -1875117386 -775386777 -994791043 -1292867806 -989675096 -1208492457 -232391473 -1678216465 -733907557 -1785725778 -1609184021 -146790629 -1798874847 -1414771063 -1118316257 -764452855 -1911957631 -1474094156 -1729128100 -1707265496 -1482183705 -251224735 -381271143 -2080381400 -1788932993 -1825755351 -76352274 -1204931859 -518963003 -1280100954 -1165558232 -191377290 -1695093471 -917905995 -1871021564 -656383127 -207720850 -1503399575 -344066423 -1698393637 -549221135 -874901139 -642912164 -1434512291 -49169968 -1765931728 -1790550956 -1101572081 -665444580 -32222484 -397409544 -588063838 -869181772 -1154275110 -1681990419 -1885726672 -844513878 -1025324523 -1220474533 -1899163634 -1193751277 -1585482265 -1223335879 -597681975 -1459936806 -9747820 -622853568 -1464621898 -1442677772 -1994939374 -283878207 -1579845062 -968145526 -138262163 -194867487 -225292334 -474587877 -644183781 -1331742740 -1525662146 -848942642 -297633426 -835576919 -1145709900 -1607910298 -214164638 -282478494 -1677188788 -641609394 -1013693371 -1156714746 -1882763378 -432555501 -728160212 -1826862478 -1503966587 -1283902519 -633951777 -1161143272 -1151072215 -1538025329 -331045564 -1900148418 -565146789 -101912042 -1291223235 -1266657710 -710739259 -1090681399 -161862201 -1703715105 -1940304284 -1154921493 -1808331265 -1434998511 -1778618567 -269889329 -544490039 -816265606 -850503006 -752867410 -468911746 -1882214179 -1939586143 -1970027588 -350802070 -1087779475 -781349414 -277099693 -1469993555 -1529803797 -1738194295 -1611465924 -1991512351 -667961115 -1525436936 -1358805466 -1102364864 -1104846579 -2012841291 -513686646 -647198382 -458534219 -1413293297 -2051306859 -611910275 -76806442 -248198847 -1064779055 -760346934 -1623220088 -1975251175 -96799252 -1259907585 -1078021675 -2138245633 -1503004933 -153769270 -977293549 -1417745787 -1722378644 -2085791795 -379644937 -518540922 -628636528 -2022066503 -943002146 -607752962 -1071807202 -770812978 -1432362542 -425560524 -1275182358 -103093846 -1826450240 -1017933462 -1552963832 -146878786 -1133045899 -1364926544 -900107754 -1236212010 -110967345 -1012361819 -252156752 -1013295333 -909341021 -1800907895 -1224470447 -339013528 -526249605 -1339452889 -113633922 -732364871 -1627605940 -526338094 -679203865 -1503775250 -215585207 -535661560 -612390696 -1708791248 -1355693805 -344285965 -1093268737 -697579027 -1097477816 -572609429 -972450996 -1633336102 -196406713 -325259952 -1298131649 -1412254870 -1778333446 -1920311623 -145716998 -934227806 -1313792225 -479067121 -764910044 -1005998566 -679145931 -530078512 -1267383428 -22979803 -1821976208 -984805283 -965923952 -1454973591 -344855548 -2076315630 -27529660 -982011515 -1255705410 -1319026801 -409756426 -1943679500 -2047601983 -621085106 -1806852122 -197362227 -1352198221 -1723547793 -260842568 -966916849 -962724294 -1365412760 -482005478 -757752262 -964240724 -1082248006 -155746752 -2000578818 -576733047 -1558622018 -754730420 -1715749758 -195770790 -374720326 -1502466078 -1834651520 -1417893014 -2049339186 -1900968516 -1463631993 -1985213613 -31770252 -1386680908 -1453483512 -1070901559 -582056606 -837364957 -1132493508 -670825595 -276628415 -2139158797 -1818166752 -1383787701 -71993697 -964772218 -1425133076 -1326493341 -1345842680 -132668909 -678327977 -1815111163 -1568110906 -1320681158 -297247114 -785282076 -1948840517 -741985175 -107298096 -1620319639 -472045066 -856832244 -1901671773 -398370510 -1706633871 -1603880565 -1205918811 -2074279738 -170031168 -1560590066 -1619458451 -1030443879 -1362144945 -1394413595 -420251454 -92472395 -1552865984 -649831097 -1756902284 -356540938 -904169836 -788147480 -715561664 -536463648 -1208181830 -1454134425 -1273378115 -1991436450 -1539776655 -1848294235 -930253790 -1094498370 -2036668035 -1537814712 -1086172939 -1697586273 -2012239916 -1143795256 -1640743295 -135047938 -2007962734 -124157733 -1512397294 -1244874366 -1817780288 -1330938194 -888559406 -416655404 -1930685808 -558468886 -1683029612 -24090600 -1163788564 -513338272 -1234527505 -1864262868 -879612746 -373996074 -67380949 -747727874 -2135559721 -1458038536 -317778635 -113688356 -1647237109 -1902397486 -1858010666 -1025552435 -756024223 -1985860309 -163371689 -1303876157 -1323436711 -1512669798 -1529881800 -901707069 -198611804 -879002390 -853161017 -328901700 -227964522 -288895006 -2145323622 -203681824 -191482650 -1318395344 -534276862 -962091527 -1467916026 -972512246 -515281205 -1677147731 -2099048042 -1986572625 -1397848466 -168069882 -809510969 -1141952238 -729910827 -1184677725 -1557632738 -1307770636 -205952207 -1842587732 -1657821984 -1561248910 -1955231324 -778096074 -1432789135 -1152858134 -1489194904 -2124329390 -1688426355 -532837027 -385104799 -2088128382 -995957000 -1561754282 -1859083940 -1884199377 -945070577 -1012134427 -725346702 -1784840142 -1756685298 -1004624530 -1208042996 -1268235034 -1451019963 -468222809 -1040668255 -1404540617 -973902095 -252153231 -954117886 -598917853 -756501882 -1423940534 -610792770 -622252730 -2103755867 -1654092461 -1156181612 -1512314828 -2006351951 -969015263 -1871030040 -798839259 -23664969 -452659288 -1457575742 -1129534465 -330313775 -338388930 -766049254 -825348213 -1030539918 -828788771 -873939755 -1664800452 -736760001 -334628205 -1984053589 -2010083354 -1405679721 -791470200 -725941882 -1050612167 -1028145135 -1381860183 -2035937023 -2136597910 -1727011883 -499744729 -401116886 -620335069 -2085882145 -1898157387 -1461627124 -501635035 -2106718770 -2059479301 -527189561 -2104907852 -1688151533 -208870967 -1506063171 -13967808 -681231533 -1223052974 -137864934 -2108574272 -1032646710 -1877903563 -358023382 -49802380 -1657461977 -1953062202 -828884619 -337373444 -878645228 -1292790224 -1833238069 -1284342174 -1580782421 -1689952710 -416481748 -1159533063 -2005576963 -828693829 -1425733208 -675493630 -1422881368 -2136742631 -2011854083 -1101550966 -310564775 -1276911215 -1242706034 -1881846363 -52669925 -460166911 -936660330 -1395033800 -106618654 -938356180 -1979897339 -875466308 -1551772959 -1606712745 -1561727837 -1414622825 -774363838 -982124446 -1006253080 -661795435 -978068232 -1552941086 -1912070411 -1222103969 -1367807075 -2068552037 -541324576 -1301420140 -847348285 -1418562738 -420488572 -1930230974 -1504008436 -1987258662 -43170443 -1863646462 -1257095339 -1057243387 -809910031 -1406536331 -156128941 -1981578400 -1211771124 -1649856567 -830471505 -1238362682 -1897573297 -234761082 -702045635 -1005830827 -7440205 -493473909 -234143849 -1065628839 -10281093 -995638291 -500179413 -1264399933 -1418986866 -1106356927 -1627456363 -159881102 -619638917 -1123073716 -1266171329 -1126068380 -57881649 -6782652 -179398873 -89818123 -2039673067 -503780008 -1650057982 -2068169763 -558896399 -278306015 -269810939 -1374472956 -285380713 -1062659640 -1646561028 -1276922354 -1429919207 -162618472 -1529459920 -253620850 -1998070302 -1365777575 -171000242 -667947608 -1298424787 -2044057942 -1185930135 -1132051138 -1825847593 -1626663568 -1867761066 -1691768063 -862348561 -125131124 -692310655 -598779139 -572619331 -1138873910 -532059659 -204782705 -1514120441 -141034937 -1699723518 -1425694632 -27146798 -989700822 -1640869339 -105985799 -1039380430 -1234902312 -1721193176 -1488983942 -726174703 -668667420 -511403189 -923842229 -709574993 -850215560 -216729782 -445180762 -320040786 -1626438214 -227720035 -474769291 -1545725232 -894296465 -202641902 -2040866419 -1233094249 -1397849393 -183649971 -671061858 -2100017009 -1092131818 -916734217 -1504301541 -471023456 -866502150 -1215024743 -498856278 -501306458 -879292425 -1432811968 -1536612365 -205679733 -1558084508 -310734438 -1980953609 -1448327022 -305120009 -2108525874 -219221524 -1521699263 -816761118 -588638602 -1939305732 -1552127205 -1118074326 -993285832 -1764590293 -719889381 -257959269 -1899434437 -1450170004 -1215347425 -1627205358 -236207361 -1387336671 -1737474018 -243188620 -609756099 -378792409 -1222488355 -1385731636 -531454537 -771915486 -634861675 -1421413429 -1087411975 -1047227855 -2130071820 -1564683250 -1694125235 -1824632719 -535629073 -66381687 -1133000616 -603855163 -2133492466 -1073422103 -2142650321 -370668504 -2122970428 -323188491 -842824974 -557202406 -1872136722 -71490810 -1102684997 -42870969 -1125354238 -940198937 -738859533 -1261724177 -1544712361 -1050842744 -608485480 -498335346 -335936922 -357340091 -1450632425 -397322584 -1274010765 -1886966765 -211920459 -1219267687 -943055735 -1508423285 -1025698160 -1057740651 -577491491 -1420888444 -853923668 -261875175 -1142073522 -620847368 -2106156850 -1205224449 -1141555839 -510083775 -223287601 -1140778698 -333576870 -1494135420 -1407719569 -715457184 -927951935 -1061927031 -71019800 -1776354515 -872673011 -1849470514 -1372622120 -1390634766 -1333981861 -503863147 -899891508 -1896732782 -1140611006 -1810144720 -1848965638 -1477105776 -805817912 -1349769002 -1697853353 -58602535 -1385295419 -1789890006 -730403666 -877888210 -1454490580 -816824259 -1649849389 -709830859 -855588128 -319166984 -1972833529 -265612223 -1673613495 -681202059 -727683456 -256475327 -581141360 -487210964 -199525937 -1210450192 -923788913 -1960976628 -702656287 -531640756 -1754214572 -281321941 -1566355340 -1879654454 -1867961008 -757225963 -708668019 -639089071 -1604297650 -1773415465 -868183542 -1556892676 -1754450484 -2098811278 -154763724 -511212751 -2018118057 -1153463281 -922482298 -1475534793 -172110395 -2146419903 -1449007415 -1003066925 -799179525 -1447548337 -102663096 -1029285931 -1227865732 -1568993701 -1125431194 -86114782 -2074646643 -2041636209 -1286052897 -268132824 -1087681562 -1283209270 -1867417716 -216051907 -1937037519 -2084976960 -1717098621 -1391274761 -1352959591 -1634991501 -101410295 -1448295994 -1931116060 -1347263309 -386860395 -1529659296 -1457049635 -877188704 -435311473 -1950625029 -669507301 -1742381274 -1115061626 -1898444460 -1991495741 -388796845 -1863319741 -60862786 -718628330 -538311582 -54153863 -1778392760 -769718374 -215222290 -878566482 -2116789849 -1672895941 -1506173863 -1874368252 -1069593521 -72698410 -2071465374 -113655654 -1097614595 -723970435 -128757143 -1505269872 -1713377044 -1119755885 -1337960534 -801427201 -569533223 -810264282 -917981947 -1000063181 -1854861645 -1787047663 -203785099 -1927225575 -384391324 -834172292 -1160464028 -472436542 -993918435 -1659330679 -1148082011 -673790582 -717041043 -1778066384 -1726767883 -693804023 -2075494998 -1267553165 -728265915 -1455929152 -1372583746 -745682948 -2126226791 -1365790257 -384146616 -1016332230 -410861372 -1187154099 -228377616 -789314923 -1009423342 -257297694 -1517761647 -1209242063 -2093601280 -637156865 -1341966113 -1551200397 -573597799 -404116410 -1641211056 -1554256124 -391593960 -1629791312 -748663299 -677378520 -889972893 -550811296 -1830933302 -1202828851 -1680929546 -1235503337 -1085202116 -413349641 -57818242 -1088584850 -1432385157 -805650829 -689088668 -133934805 -479405579 -10922709 -1041860168 -2109669585 -114219478 -1983869975 -1071566503 -1020352179 -1402151158 -1616453975 -2073823275 -1088192115 -1274138953 -1893938834 -1427367204 -220776991 -1894629368 -148270260 -897229300 -102675866 -1243911321 -664268502 -1740716008 -1044223375 -1025900341 -160829424 -1525701242 -1506029114 -1589055456 -1148414900 -1973688711 -1753754215 -1134036430 -832911885 -1451640049 -152589976 -484252114 -2009741515 -2102842589 -1337014644 -2083723147 -2119100000 -1844898152 -1834345278 -565851014 -1200403382 -1718261356 -1606009083 -472698838 -1107360013 -1306453589 -1692663395 -877807956 -105661602 -2033052392 -899244927 -1767064150 -1495814687 -1713872627 -859084778 -1105305065 -1128680905 -1016916384 -1638803062 -1885290259 -2099655175 -1453238721 -1251666516 -9328400 -16112569 -221007661 -1476532764 -1912623463 -1927314345 -1876348714 -2142963650 -1341821713 -1271753244 -452033317 -1674299380 -1471453019 -289211481 -1021868006 -1108851783 -608828215 -1963715197 -1632628883 -1195078862 -275883243 -352471228 -1224030570 -1535935377 -1712444299 -475496199 -877966106 -616205005 -1391373201 -859957024 -732758058 -1793448908 -415327464 -1086834698 -2082351551 -541522498 -332927900 -1324314865 -1239418547 -316143529 -549749225 -1160575181 -193101366 -606867745 -1226350612 -1874175625 -2127078826 -653556973 -2100674453 -1404374891 -336028860 -1902542057 -2140331816 -58260615 -2081096920 -929775751 -1650031485 -1622834684 -1940217088 -1836901968 -586466904 -1946799445 -797426423 -2047934081 -1907688898 -596458976 -232345436 -904472606 -1581835576 -62975972 -1875207080 -135390188 -1317707543 -1859307337 -1343865462 -1261304335 -930878808 -861757661 -931293059 -1381623277 -201741528 -1940666130 -794016274 -568134660 -926936058 -1167951468 -1759789096 -1630549988 -614828949 -1886320126 -81277021 -223292455 -1222359876 -1373868730 -867572566 -2025637279 -827492262 -558349462 -1823354091 -520564747 -283324951 -871206058 -816711560 -1903200943 -329326936 -932455033 -1583567472 -1253664633 -1379426114 -1928728633 -2023967013 -672619011 -353800069 -2083024787 -1119181715 -277819932 -690148546 -767435175 -496202343 -993777500 -1438119781 -550712282 -166805004 -1025542893 -595651829 -1699011336 -193469993 -359930793 -2042887999 -850050957 -1745214455 -1487694459 -528670392 -1223430705 -43938910 -1894369449 -74778921 -531391752 -1864171638 -1493793783 -2108277451 -338943457 -1496049955 -1373054609 -69542801 -574752439 -482798067 -1193893703 -1831752400 -2084507055 -261856227 -823614486 -1956561287 -1655947745 -125685095 -1412966664 -856553322 -1508797013 -864493715 -1818996050 -289413658 -124889551 -927160538 -645819534 -906556000 -90216535 -145848963 -1004679914 -2138881884 -1459057255 -259519692 -208176387 -569675346 -1051441896 -2088498556 -775020477 -1280837884 -666238860 -496784562 -41713998 -1007495464 -67706853 -1930229108 -1472646574 -1021937543 -130076495 -57298819 -948577077 -1963821458 -1271073863 -1918578732 -1085789019 -1687493774 -2038817336 -1153894620 -1729545930 -139799718 -266750608 -1479097367 -2066233144 -222395571 -1180816017 -1078415792 -172235464 -2100970939 -2092447799 -577954521 -613099066 -729463956 -116567769 -649407519 -1080277779 -1401879915 -1352640168 -561416434 -1830344967 -2052100741 -1069783167 -1112595085 -1245479166 -1245235653 -1447479956 -1100867276 -1704688827 -1125780762 -1666336864 -789432721 -841770681 -17569131 -1079125078 -1355787031 -1911135347 -538868850 -830222551 -1349160098 -53938413 -304808257 -1163877304 -2004791452 -511512334 -610758597 -47907119 -2016065055 -1008397019 -187756209 -965127220 -949200749 -1708458527 -58619252 -1666258038 -1612087786 -1705728750 -1423897447 -2034113208 -1548510263 -457672248 -1958532229 -421831587 -879963962 -1981916092 -444909627 -58042135 -556587207 -122421717 -252463793 -1878766126 -1970217841 -1400900594 -2073061297 -1166529751 -1487311594 -536309278 -761168887 -405398630 -1716646126 -228642237 -941832776 -281504195 -334531024 -350732522 -2066369886 -373134718 -622956186 -1041838977 -1753512448 -1365625755 -1914328796 -524075018 -1298391179 -1479208286 -1782965130 -308129672 -1152324387 -1108443663 -192006316 -1529715218 -249447042 -568355950 -351189794 -1161805802 -1548795690 -959876543 -747901937 -766069268 -1161723511 -165730853 -152156212 -1783915154 -1242797511 -1271816655 -1517781994 -1551214092 -803769664 -1284603218 -1673181635 -2012865627 -922701798 -869703999 -1341409711 -789686571 -813260337 -1880554451 -1961825058 -2077317415 -1832144626 -86714849 -1422554477 -937652888 -897086930 -2004830570 -1168968560 -1674185164 -1699308354 -890484225 -554833632 -714857750 -1590682932 -584116621 -1100298710 -738734653 -1310349664 -602002863 -1066657424 -117840012 -557159150 -1145133130 -504071496 -106645857 -1395557001 -310123273 -299038042 -820637914 -1321439564 -158874874 -887834097 -1111288923 -767650902 -1974442385 -1535851251 -298538617 -1016736527 -763430110 -1902551592 -153102914 -515266492 -1429866340 -1421566450 -1511752275 -1141458268 -1017691625 -1783376667 -782381090 -436609049 -136664744 -1264333765 -306901290 -1981744583 -1857325158 -241637714 -313482721 -926705756 -1592233048 -867112469 -735237941 -523169549 -1112559225 -642780146 -1363169412 -1432761288 -684833605 -1633534962 -1391163086 -1623521513 -598850209 -1767092821 -1977688184 -253420222 -773599153 -1014965533 -1063105010 -541960030 -1244077283 -1306108189 -182492889 -551337507 -2085026991 -410485991 -1320576573 -686970666 -1043897190 -1986159987 -905092541 -1263664886 -1949953819 -125899066 -714209967 -1440812286 -706487230 -493790347 -1257550021 -109149173 -519116073 -1705264797 -68690317 -1279439380 -783902249 -232924598 -2048513752 -912801160 -1973405599 -1290458125 -1292355822 -974694596 -686815656 -586127767 -541891180 -86915333 -497121771 -1414218367 -419089173 -2032852098 -1827870963 -1273704806 -1039681146 -1994068830 -685030728 -651613929 -1656188650 -2027091783 -1651020873 -1071609624 -1745086826 -1490117503 -450581607 -897729527 -2067540114 -713803891 -1058343895 -2126278811 -92606750 -1663486822 -133417061 -367616759 -224416094 -780007726 -1349669594 -27103097 -255218115 -926015746 -732653213 -31318993 -244821836 -141930000 -1710661830 -582310774 -814199239 -480811189 -12689862 -677629581 -814587826 -569341957 -1890623914 -1548081586 -1842832497 -1476620045 -1232071583 -1389771107 -1850850577 -945020844 -176271896 -1221806859 -669246599 -1655730054 -761919752 -140284803 -1977123262 -1496194403 -1653308498 -865017353 -2029845328 -685211454 -1541592164 -149299293 -1012317755 -1659056751 -839141409 -924551214 -1888067653 -1534675899 -2019234023 -582151020 -276697408 -1151240501 -71440837 -262788786 -1464748070 -1415766929 -675966943 -787918371 -1159893995 -1629310146 -1251640925 -1726704110 -1769454859 -874271557 -798945725 -1813039031 -1101526734 -2050781198 -367060436 -1611713668 -1860378465 -18960935 -848854789 -968571702 -858551254 -728301785 -2058796242 -1931918830 -1954516817 -1654278807 -2140615187 -525909718 -2069423021 -147567135 -1964709307 -1160766477 -1260729591 -2008574635 -1818443252 -1735955907 -498100807 -689007243 -912908477 -1629598771 -1807594006 -1928788380 -880651195 -647339241 -678467785 -2017380572 -1643454768 -609618062 -206288197 -1047120721 -329470682 -1200910408 -1649912750 -1774739186 -1641125919 -123358565 -965682600 -1693537821 -541900209 -238665736 -1903056003 -40804003 -745595028 -648555351 -1790275732 -770849607 -2047986145 -635244899 -1419808256 -2026556775 -1249076005 -1567766610 -1976549227 -438322746 -1021482812 -1077347166 -1539191105 -596889973 -1033661074 -1746450135 -780931749 -1847338626 -2049202503 -1751220982 -1507662339 -1121380620 -727594268 -904976258 -1456780152 -642955217 -10620415 -256172204 -1929004040 -210281521 -1590924132 -342997727 -916689141 -746709209 -47242595 -1584828422 -971614813 -464510303 -921605676 -1774534368 -346233440 -1612226357 -1887207900 -2117192757 -2002119756 -705474249 -648487856 -655887267 -463736418 -799822363 -1514308368 -1152040379 -630088501 -655572950 -1623461540 -1738367645 -229992080 -6323960 -1060097017 -1526229207 -1789602281 -189576885 -1500457694 -291996337 -582302564 -676213769 -641355659 -1044136520 -1713612003 -773744504 -1310396143 -1383175416 -518737937 -1792383986 -1844536233 -46539939 -512707265 -1366611091 -1295001772 -348019659 -1568438032 -376236899 -1221704725 -1100164108 -623962486 -774853901 -628678699 -583350853 -1114937816 -1965053437 -502108446 -1473402859 -847917656 -250562900 -2142712180 -1410332717 -1684962680 -300909771 -66532512 -1520432744 -1005212755 -356922336 -871875081 -1323562886 -1485809376 -1058335116 -1978730158 -586008064 -677526506 -1229689948 -16337308 -1850712387 -769945161 -1879347752 -1008187788 -966178086 -1431236435 -826432998 -2082652237 -1300184806 -1559926217 -1199566543 -538410165 -1711038344 -467930631 -424999903 -442759799 -433104938 -1372613283 -1242111307 -476204262 -2040962712 -704007053 -1759128448 -1264457287 -235451897 -1575155105 -1600933166 -1061107699 -1332892405 -1520728978 -1689050299 -282045600 -843990271 -814996262 -991474868 -1392489403 -292611215 -179138875 -14999031 -833127318 -777455186 -1398802754 -1174402769 -665139006 -1338891207 -1410862783 -2003847354 -1823926424 -1549830890 -1178613767 -572422041 -2117988174 -338307746 -1549073413 -1332599710 -896371407 -716453744 -497266679 -1702203476 -156675798 -435185764 -1985317513 -1778017552 -906048459 -149909536 -531253621 -1690087568 -535556507 -994248572 -765492297 -54506502 -1262745492 -1530084390 -11669905 -715081458 -1055575994 -703323291 -1004558749 -102461729 -1939878056 -433758438 -1618569548 -1123036687 -643824926 -1742917696 -1540771592 -1390331218 -527217919 -434037111 -2007259365 -1187536832 -218520206 -472065872 -1206518686 -1418960628 -665374861 -1007938898 -1078051150 -486148311 -1666869789 -1156368608 -360189306 -2092748696 -1340163106 -1312832806 -1533981164 -1080241113 -785634453 -1428789815 -508279951 -2118672338 -1099633859 -302002131 -1245957856 -700643895 -1069106764 -481708099 -54670703 -1874988052 -749153886 -332739641 -307729499 -869067717 -1384836372 -517138018 -672349117 -112658905 -1525123328 -382963104 -452398869 -1375680903 -1259993119 -368107966 -2037681202 -1386243305 -541140832 -360718379 -247460372 -1538131612 -2117343945 -248169178 -566132172 -1630858594 -1506602697 -491846702 -802963211 -615449529 -1578989951 -1628680478 -1406229084 -1434679553 -712858755 -205828672 -1913818634 -539716872 -50542776 -1216395667 -2065139476 -1168470318 -1890166458 -302069535 -231333237 -1072313189 -685001899 -167084926 -1435224653 -1284419867 -739085025 -756600927 -941106202 -954876859 -470075182 -2108730208 -1505979415 -753764363 -511615288 -193622828 -781144991 -1136329626 -719951411 -1300497479 -372570387 -1875663304 -1360696015 -664567202 -318515967 -1768609045 -1691061188 -1866802318 -610475956 -1740010773 -2076240612 -914185781 -1622410629 -1255575644 -1285533286 -124965335 -53378579 -1633096454 -463610071 -823791981 -644752458 -152078844 -483591178 -1638808398 -1974972411 -1854063645 -1259963545 -2018541395 -1826054106 -802560265 -285587048 -235564691 -1323400216 -899298333 -517175145 -1296342606 -1408580227 -148150661 -1034612554 -558105319 -2015009984 -455687898 -819816484 -400567436 -2123147154 -1145938726 -1158821586 -785201259 -590549198 -1838437999 -632736157 -57570755 -1224038135 -1663080332 -1891474219 -806772192 -208483786 -1441163045 -159242802 -629149052 -2046122783 -1529974470 -311728112 -1501763351 -761337066 -1084499436 -1488308763 -115859485 -1630180213 -842471465 -1058227584 -171439834 -1613719411 -1211162714 -14244285 -1033013178 -1594680298 -1195853926 -417482009 -791050514 -114730221 -1977992988 -1081293756 -1297536178 -2141592008 -1910954736 -1798307067 -462027191 -2137615232 -1645273561 -1113300955 -224134374 -340106980 -1724028193 -1892474427 -437398872 -526318023 -341870568 -1299880651 -742960426 -1465956124 -244694037 -141495854 -856420949 -1431487649 -753619402 -222739408 -517233535 -130219689 -316476730 -1854891138 -135252867 -1157237143 -2072755169 -316403749 -628299471 -652116798 -1517973345 -472283055 -561746073 -928136699 -2019771932 -1032852995 -1049968264 -943485649 -144053295 -889658896 -1715914658 -819761443 -1622976996 -37087578 -560665816 -2099610123 -696049757 -1164840690 -1016550778 -1936513961 -1875472242 -297000628 -937559168 -1469418537 -455410859 -458589305 -191640052 -1816367111 -1201992472 -508809575 -282644671 -175158333 -1833506341 -1498222384 -1377846813 -1155220490 -391122903 -155187254 -1187030520 -298869010 -127200737 -1116557994 -1278097672 -1856136010 -1730463748 -533181315 -1876585921 -1834734405 -663457562 -996149310 -498941158 -1927884618 -723508790 -959824216 -2015925695 -813657146 -2107272373 -626466687 -2060770815 -758828889 -1879241537 -1370515930 -351637788 -101306372 -1849145780 -209785076 -1837107605 -1895124316 -2024410355 -1681417064 -839283775 -1169812929 -833109418 -476609886 -268350692 -454421744 -1014402676 -193101999 -617506576 -1792040528 -367004921 -678673063 -1172520624 -1244182696 -930300833 -1885150071 -1890999106 -1411482589 -1683508561 -1631335502 -932060865 -1401236837 -1281846457 -437456095 -1488064984 -313633126 -1307078944 -1465586645 -477311425 -1321698430 -214668442 -159977734 -96249294 -606698067 -522056113 -1726393196 -838890555 -1003415330 -212371419 -208617819 -1546372029 -1027595409 -732549889 -442236172 -222440537 -1936559579 -494690321 -1351027510 -1374760839 -828863000 -2121506558 -1489729165 -366235782 -636655772 -1510030650 -123394304 -1566347973 -1755837285 -1784455568 -1735601021 -975982746 -861916236 -1448979437 -532840679 -446483963 -748103523 -2006641523 -1540884573 -1141719238 -1108847121 -530473981 -1471579970 -275393291 -707782552 -789430731 -808324751 -532539135 -1820884896 -1970477322 -1467030467 -1121307662 -1648872809 -1476319975 -483762387 -221350767 -800664365 -633450453 -1325325392 -1043476660 -1360763218 -1794048023 -1894718681 -1649353851 -971258281 -914727920 -2144206214 -750758391 -1529851412 -390975953 -1980365898 -160602833 -2012353599 -906981790 -804018124 -1165503144 -1412996921 -1365082721 -1377490946 -1616614762 -481203090 -156919028 -228185080 -1848329665 -1525725800 -1918775420 -96556941 -1482353902 -964242067 -1104819807 -1562884287 -1523725152 -506139189 -498623756 -888276498 -2104271589 -1731897527 -1008384851 -2130732280 -1927616235 -507763003 -2020261890 -677642513 -1031935950 -669578478 -791169466 -2113956485 -1297187427 -575101245 -2050213215 -1558388390 -1123111918 -1908232343 -1140204503 -1420499740 -763426481 -1841558989 -1547607559 -318311649 -482120066 -536149131 -217061905 -1732204729 -1876561571 -1425483955 -781265753 -1018492913 -218238554 -33308002 -1461841394 -1955387278 -1251731305 -1098237123 -449380296 -34648373 -367136674 -745562087 -94915964 -1819740874 -2070252391 -1201886843 -880986619 -1989843115 -530399074 -212618021 -58290339 -433184541 -563017257 -818089717 -1443565525 -1883018516 -425692573 -1347046254 -1033784304 -1670093098 -1643431796 -223527658 -880449403 -1550788391 -91463898 -1782926081 -1799316776 -252337178 -1898231468 -559222844 -1469899836 -2102152211 -471249833 -376253095 -1493910897 -1929128802 -159672808 -1413808953 -2128002663 -1148099903 -974501426 -1735174760 -254265060 -2087889537 -1276656379 -1254644676 -671139639 -1259798629 -1394281830 -353160746 -2075341361 -832859753 -575457525 -1595760234 -18985455 -1260962429 -1626915607 -1808813245 -945701783 -883395434 -1672607527 -953767059 -1145019405 -740179068 -1964312452 -933275433 -339644743 -397661875 -534023661 -1001509614 -395257312 -922722613 -1219541704 -1253492160 -628156050 -389123698 -914287171 -1178988712 -431671715 -906754439 -1277897161 -633631280 -69517487 -149300041 -1024889391 -349661950 -1253135458 -1075516477 -835572140 -1065389247 -278425643 -132915088 -520891136 -1473977580 -1917318915 -1386881170 -524319652 -1114987523 -652995339 -1251226403 -1202283797 -1110141556 -811206556 -1722395536 -222211992 -242887411 -1989787377 -1741094155 -957289063 -209798517 -2063010492 -1893858229 -72638969 -1072440487 -677015738 -1235146760 -1534663418 -1809465856 -1176716625 -899411152 -265840431 -1214138057 -628710205 -1112872195 -1607899642 -35069246 -998298244 -108852897 -1982056282 -653599310 -664748765 -1222561661 -470301931 -1624733357 -1638959494 -219475589 -1496802424 -1134899210 -301269816 -1822841533 -495937029 -829612396 -1831703248 -1258409391 -1667678881 -1869875970 -729737592 -420600727 -1667736412 -689315840 -1804530962 -1987815400 -810331421 -2046387120 -1677719135 -965216835 -307876407 -1190666826 -1284721836 -1519310714 -1474607368 -1764747596 -1216197255 -877912639 -1865068783 -1539724269 -967842733 -1491671153 -792973393 -220302869 -368511855 -235909037 -668372497 -1997083269 -1956583120 -2022894976 -1982245975 -1694285914 -230197378 -1309283799 -2015362631 -2087658733 -1692500845 -293313753 -1249276806 -647661723 -1803455465 -1091806497 -1891515111 -1494044036 -2019312328 -1898223155 -419506253 -452781070 -1356882169 -989766890 -603790568 -1047844301 -1753261507 -1443027662 -1433089663 -1908864936 -1034776819 -1171423527 -2132626240 -1547147250 -1171832874 -422586681 -685926938 -681829870 -541884698 -2125456006 -1296108644 -1771348187 -483180548 -1179800929 -1197700952 -1395676933 -178336750 -1566069685 -1373618163 -951260291 -1963442569 -1345537381 -1443959557 -2063063399 -635582531 -651938339 -666096579 -252951442 -1484748281 -404380627 -1786938881 -522969672 -2048193780 -1977482697 -1094767507 -117602653 -862833731 -1836932373 -1097483739 -672157290 -1183589810 -452914509 -1452107795 -1571546057 -1073205546 -650460469 -1597339253 -787754024 -545197613 -1971043589 -246861701 -66202703 -272300175 -261389468 -1568730561 -997804508 -400566533 -2107970433 -1621342872 -489652921 -439307943 -399819615 -291937842 -1746660746 -25703532 -355049277 -1603627173 -1242126761 -735939640 -1579206407 -971689176 -1714329244 -2090995756 -1943271584 -1634208712 -1977461101 -731803535 -783166376 -750008969 -1819217740 -1867873841 -1439693841 -1236134938 -963101888 -1269184177 -223397188 -835123760 -2119401175 -464295436 -1605303301 -1495522646 -1100506834 -2089191074 -1676752268 -1894952342 -1281526984 -1510524325 -1978139088 -1389312809 -590687032 -2007530390 -1447686713 -280864881 -326998861 -459204154 -1935472607 -1553304740 -1581552248 -1743533217 -1148414804 -1972075239 -405934075 -2125935653 -767601185 -1138848766 -109464451 -1523026125 -1642494282 -1646599036 -1915722810 -330948199 -263734863 -185595033 -1149464187 -281702497 -1519909091 -794111372 -18963099 -885225137 -212171143 -1137546381 -1842599873 -1861875771 -1561862760 -1534790039 -1790101356 -2135079469 -1976377760 -1851444171 -184136967 -266069042 -761435840 -597110407 -443528018 -459659789 -1003395464 -2025967204 -2077574443 -1857046928 -2007877045 -831466357 -778971070 -1106461378 -1235480673 -704288268 -43058012 -2121502292 -1418030503 -65149515 -1898722282 -218399154 -585028555 -1394787919 -269063981 -1705251732 -1996590509 -117216741 -819261688 -1813529299 -751526422 -1553246547 -603502497 -501202298 -1276158952 -1484323675 -1857962173 -210530584 -1481958679 -764180047 -1621840869 -269553912 -1349587461 -794177413 -1128914186 -642702857 -64173189 -521996729 -728326308 -323470656 -1290204835 -1330278086 -531542485 -102573875 -1677232231 -1371755895 -1864376720 -645639663 -30947750 -447791676 -1251999444 -1309882002 -1331942217 -583304791 -340773782 -46067525 -1162779755 -738154585 -151081376 -899015678 -61559854 -1696831971 -72104437 -678495751 -339921487 -753930989 -1164614823 -1515371403 -1838600448 -1215532853 -448726460 -1930528603 -63808098 -828363233 -164373530 -961948668 -1214368460 -206126132 -470777913 -1034628243 -821790342 -1362944137 -1941531657 -308543034 -1657248580 -513982470 -1324145056 -532922331 -1818809127 -1442766091 -1331833160 -897867439 -90459804 -2086987399 -1146808542 -745433569 -82397585 -1876742427 -170163453 -1636420414 -494830969 -1567414799 -358629044 -1639229026 -454532619 -730395154 -734827026 -59372085 -1434220387 -1585590381 -892957844 -1326758872 -1513654903 -906672359 -2045862248 -1446130019 -2034796234 -143226363 -2023798301 -2132043721 -346685005 -611744724 -1589358079 -1939632367 -599430709 -786138086 -1303415058 -16196759 -1635988991 -1833839196 -650065428 -1400336107 -1175662876 -368920885 -668025306 -456811426 -375598757 -1233870366 -1557145930 -1715923168 -962789013 -305661346 -469358598 -802521155 -1775748925 -1431940116 -1915781330 -1314493839 -1533675384 -235963947 -1591244867 -1438623578 -428093873 -903506061 -369499290 -1799343553 -702378217 -153085560 -223597814 -2059561295 -1905262719 -621857816 -1908887210 -1409135937 -898034043 -743089585 -1489247790 -865700745 -630712790 -410579938 -752060155 -1933762490 -728655732 -1565132530 -655239607 -315933033 -1306910247 -777779813 -412357802 -567849345 -426614147 -1803554943 -616249596 -2140814138 -1722195528 -1155644830 -1080554342 -1755106962 -247335142 -1580874649 -1092545059 -1419624763 -1090073571 -683515240 -950610877 -1786159706 -312277329 -2142518882 -309056878 -1703490100 -306128896 -1885020507 -1860900605 -204633327 -1151008042 -459469718 -2103839461 -911573172 -661964106 -1665438082 -715989176 -1279206891 -1171426920 -42168744 -60476898 -675459655 -851863543 -2144576299 -528326045 -1878441617 -811162372 -979795048 -510766540 -961100721 -1995308760 -49697768 -2046731740 -1027296534 -4325058 -1824289455 -1208841966 -1811621942 -906832028 -434451837 -387624659 -1489742462 -589718461 -761143122 -2119849922 -1563935324 -2008634835 -682741005 -822945114 -1443844318 -126241526 -27484246 -218738417 -1992054502 -1189958384 -115355377 -1747571645 -302797496 -1728755529 -1887915640 -1127277055 -1044729551 -943265785 -743766341 -2126067647 -838540696 -1565786058 -901666468 -1663714444 -1811576368 -140869810 -1071917676 -480065849 -370662364 -2019775448 -1091946407 -2095498834 -317092238 -1462315859 -1339785945 -1416338820 -1697804392 -1383198655 -909315810 -1377186618 -796741360 -1271498475 -465098028 -62081516 -1874470617 -642558429 -1931739087 -1081059863 -1661463821 -492577606 -202364857 -1679538398 -1476799018 -2092587147 -772492710 -1746330855 -923676436 -70575689 -754631879 -59571171 -485291495 -151265159 -1840372912 -940564243 -436106534 -280829727 -1883649230 -288684536 -755437979 -722791989 -1797451691 -1118108288 -1564085166 -232062035 -436319293 -1709186593 -1557806279 -2076990576 -633928847 -775758762 -804291997 -1473519361 -658483123 -1142615270 -1136071416 -675183235 -501039897 -694168992 -1767078040 -1729263917 -1842458168 -1627723483 -354399648 -1422730805 -1753713937 -457084084 -663194469 -869312553 -1204827730 -916350547 -1498410792 -249452775 -664710481 -579122473 -915515507 -348795394 -1721314295 -1377147328 -136394330 -1014452961 -1038241994 -1428561283 -962309921 -843496690 -1109314983 -1951379674 -467923934 -312443424 -639110253 -1960303524 -127215594 -1366259593 -1829825827 -1916849349 -2084819996 -1226488320 -2041150334 -1709886360 -433888366 -1654785797 -2071661529 -1262949092 -657022296 -212815998 -1238206131 -1413904287 -1582797554 -1198554689 -712049163 -1631401457 -2040566550 -488163260 -1172379280 -1016097735 -764671201 -1286731559 -936986823 -439950710 -465386349 -612925269 -2103425071 -389371383 -782161672 -1043818017 -655499376 -386903322 -103649738 -431908849 -597298283 -1453676303 -16172602 -1229982292 -634795622 -311260658 -87714914 -1050777756 -1663715811 -1834551537 -1884962380 -883960116 -425799666 -999474658 -553490172 -1757645647 -2112824644 -1601688563 -872163196 -1870944397 -1506921005 -1546681964 -1941705660 -1085527808 -1592287791 -1787178070 -248051901 -742541280 -863820243 -1237370381 -252355919 -65727808 -880674498 -1038992762 -1161817177 -1739975315 -1480298006 -770536347 -1077992619 -1649901441 -1584668823 -436718067 -1968930270 -1235531267 -1554621626 -92135133 -179470844 -1299434720 -1838132697 -1943976384 -594880430 -1619010225 -2087044085 -2099530144 -1499326351 -604867359 -1965601462 -1122830033 -1465558442 -3303604 -1836581253 -1638660840 -1642448752 -881376326 -2097197723 -953032250 -1679986424 -416837412 -694726970 -407596051 -2141478874 -9511598 -947637708 -1208232204 -153286596 -1454926219 -1696157991 -1629424459 -1025415869 -608243108 -719756436 -171036301 -1273991221 -1558490757 -696110440 -37256224 -1247615491 -643227929 -299123705 -112892308 -1152960255 -1058058904 -1631402368 -2055877727 -125077459 -1937846647 -651605727 -1518337636 -152470951 -631282586 -1397206722 -119696709 -1697894571 -751353461 -793774667 -802413105 -2107236222 -18876830 -1582785701 -999341318 -459928439 -1223628720 -1224493368 -724246775 -478236229 -1832493729 -1659121676 -1930335884 -1119747159 -1191302652 -1233631183 -1832164543 -421459868 -1074933670 -1777753126 -756807971 -125927416 -1190688417 -1647601773 -1588854393 -2064116353 -1152711233 -1167713444 -2054287022 -1307385935 -182733441 -299327677 -1393566065 -1208200273 -1764105926 -1169067800 -1194628197 -1291491176 -1474974803 -1497776700 -329686766 -537666902 -2103918985 -100649393 -1544717962 -1144978751 -56907290 -810600115 -119876237 -420254373 -141532028 -1464397367 -1963952549 -1326836653 -673436523 -1208822371 -1482288777 -2017169839 -249148884 -1999665385 -257050145 -1652172898 -1106340976 -1359367906 -1965359356 -1348721785 -1277146410 -900661105 -1946447679 -1327746202 -927841037 -1345547992 -1622298634 -1520759326 -51625488 -86183428 -1080896318 -1060246653 -1893677812 -1335337744 -1817352258 -579488925 -632023330 -961989248 -1896396520 -1931506513 -1467155939 -1082631919 -165721602 -2144158302 -2092985054 -1017664718 -1331150718 -165482980 -281121995 -353346565 -903434000 -1305853710 -200431630 -1400046914 -610163419 -782168708 -1162072069 -1728977865 -1329749498 -237498557 -1613631373 -1878991695 -1466388730 -1073052138 -219615860 -1706853474 -999780892 -1405397716 -346779459 -51749455 -22213150 -1821741119 -1328631754 -778927972 -382113292 -1201994114 -536406669 -250535777 -1686855919 -2055806586 -1076894319 -370642517 -1686206919 -1885481821 -1024270415 -683950553 -1824465527 -2020600423 -2072399350 -778604757 -1392289728 -1231640784 -591783255 -1104397528 -908092075 -137225296 -2095596641 -1960934487 -2141876147 -244027968 -1831776053 -334559379 -827295007 -1538051971 -778817658 -675549541 -215093898 -868165785 -1258450777 -215769736 -1489556816 -1764533433 -1911727008 -1892980689 -356209718 -1779806237 -903706196 -1585684588 -328811246 -855187791 -33153966 -1020441989 -764104181 -346761007 -1889110338 -1879213518 -899600597 -1302358899 -1592685269 -2025139875 -1057557822 -1799651782 -1587815726 -1787109260 -1239045878 -495146587 -429555584 -1848162721 -867381639 -964210837 -579937197 -1723679893 -333563621 -1271459477 -1957142289 -683430124 -1667549912 -1849777634 -91937019 -1144736140 -274311507 -1853591687 -1917700027 -1349779613 -1876192430 -1663782109 -801338376 -1224135095 -1145203405 -1685183421 -1863420111 -1747781376 -1680262766 -766350112 -1586901325 -1451157182 -626978895 -2079516083 -130452056 -2074385252 -1943404966 -1728476339 -1490536604 -1051961173 -78568860 -1951870762 -131705362 -1663862724 -8751034 -1049740442 -1409448589 -1857808913 -1929657058 -448136812 -610249255 -77330713 -469686956 -2026266767 -669878843 -1544436727 -713229400 -2140291893 -1534758401 -1258361490 -862606774 -169949721 -191710337 -850163459 -1488551922 -2055149151 -764802509 -1346141468 -859431531 -490731795 -1392074085 -1902296177 -155310303 -1107631416 -1572956516 -1156469842 -2061629144 -152378863 -1231043217 -1285892921 -1874383486 -1325631359 -1890896735 -1838416839 -277100037 -1475775163 -2064525338 -1584071187 -1129668050 -427993223 -1359365158 -1919173720 -348334100 -410796978 -104884141 -1851167247 -1972326240 -329540588 -228336903 -105051532 -369540490 -344308306 -1468753924 -22678403 -1051313702 -2081425645 -12205885 -1133362730 -247454220 -1434734948 -1643882520 -1356394985 -1391599990 -376632453 -1427329862 -1740653644 -2143555274 -547828046 -1083574433 -974168871 -440890169 -1222488233 -1383681182 -429212511 -377102104 -730819631 -1426561024 -1703695260 -1606769369 -365923758 -1834919345 -1624260495 -134018801 -1891126351 -1402605657 -665284080 -1629666278 -794700508 -1330637263 -125779383 -850181433 -1790640940 -466449522 -1301804704 -868264492 -769935679 -1719983778 -489984579 -1718516655 -1601852082 -1472943382 -1715422305 -1134719160 -1570136760 -1009470984 -1058016788 -923558756 -240211576 -2114185119 -844871771 -597981233 -47115071 -1589016201 -488656115 -865858677 -1137592267 -466322228 -1309858093 -930103654 -718646265 -839745127 -333821405 -1309067871 -533744382 -602634755 -949448033 -1569593421 -467506999 -1894951467 -1266820859 -1305300855 -1646015880 -704554506 -222752784 -742043967 -1095415240 -266632949 -1649086201 -767832025 -723609352 -502486103 -1378233117 -1205380877 -1623157588 -924813675 -2004282386 -545574660 -1865621577 -93114792 -1612214128 -1681675097 -881077112 -1363275319 -1065256590 -196343091 -1403448645 -1948481514 -1150672695 -1265743630 -380182228 -958856171 -778378909 -1891429686 -58306061 -697424195 -642700039 -16811063 -1223178084 -93105057 -1448597983 -564194242 -1272323789 -1451248544 -15016382 -1124745575 -1447818131 -342123560 -1256949901 -760350568 -1684296726 -1993122775 -1964553519 -689921208 -1241532703 -1489025069 -1417396192 -141702773 -39141288 -717631434 -963349686 -1138957869 -1943158572 -1882299675 -1229033768 -1872821930 -850363431 -554514032 -1785791491 -566138765 -1741667145 -1997597405 -2007732284 -545951877 -1763056755 -715519979 -1983347500 -880263766 -578270979 -1636841378 -1127521976 -866149504 -1730554362 -2056130813 -83726567 -590622784 -927714254 -1362189758 -102039 -1714969473 -2113906324 -454131500 -431239062 -77606409 -808342334 -828056616 -1453512552 -1558976839 -275756026 -361818756 -1561627435 -1874650058 -1510939669 -368891108 -167563267 -884767252 -1106432536 -750733179 -1106113328 -1828255264 -1290200772 -1261991245 -1738356943 -50123566 -613184138 -11785413 -508940767 -340104968 -1690212509 -487956247 -1988079083 -947084308 -497172992 -127606067 -1486488363 -1732651390 -793658410 -995965353 -1702143153 -1290310784 -963479282 -1169594194 -1451797567 -652511355 -1706841903 -805307095 -1354402271 -112310497 -2111881013 -774467875 -583190658 -570024098 -470465819 -84231679 -490105580 -1604696815 -2039730679 -1472064892 -1983026404 -1926054235 -25032767 -1966403804 -1722890145 -2092654514 -1904729879 -256350524 -631060986 -1967742816 -605344712 -1398538745 -1032170800 -321735134 -38573992 -1920505797 -1261715769 -1403399105 -1115862734 -330281087 -1936485361 -1394792042 -338359242 -267083038 -623797436 -148342198 -2106291266 -1316870514 -676262816 -1465688588 -43183779 -2087784614 -1660699165 -525906096 -2008548067 -1371914876 -241403093 -665174868 -1941623841 -1857879522 -968898874 -2062363764 -1761718968 -1853653987 -817292480 -929305148 -183057805 -1455946131 -1657949799 -1561951968 -886625248 -121516603 -72598324 -389319972 -2065580642 -2140696339 -1889831382 -1112898144 -2044024485 -623618336 -1433175792 -1208951392 -1503261077 -163814184 -150955034 -923069331 -604380189 -220186213 -555358110 -939824908 -895005071 -1374764709 -893906090 -84060218 -1903327847 -314718817 -226934758 -161520634 -257965830 -2009705164 -1491891332 -198554552 -2064251673 -1279550826 -509491524 -1006743279 -310635440 -317094223 -1495677754 -1559923343 -1151263225 -453363105 -401726179 -123304285 -53398640 -1970261681 -2137719474 -1249785208 -602439549 -1963588085 -1643741146 -1127805814 -1341647476 -490835632 -989778897 -805592217 -1851480431 -793558787 -1469085239 -1296122314 -2001099877 -744237072 -1447708976 -655039122 -1241348932 -547869519 -1780611144 -1546876263 -912321659 -356883233 -214670960 -202297760 -551839119 -1925685287 -266574672 -669624662 -1567383954 -1987700776 -1031329500 -1214391563 -594418253 -293652327 -497239083 -1238397504 -335343004 -1112778500 -33167777 -1252563466 -51981521 -1775062765 -637067231 -1982971122 -996929661 -729398533 -1164487055 -1515458274 -1151157698 -827254463 -856628963 -632611653 -112515674 -1265323558 -1909966712 -224973228 -1553824276 -1723459212 -919545348 -1506340024 -372068885 -2036853778 -364630019 -1565884442 -407722709 -2122736233 -682040420 -1933114901 -582045644 -653126623 -1310232944 -787773470 -872026535 -1721566617 -1322955888 -2021412225 -683970035 -4415854 -1202814180 -1434354049 -1684563968 -42208128 -722403786 -1715374811 -336487502 -1021003563 -1612543811 -780206337 -392757377 -1855988008 -1390477781 -843018613 -1664209432 -1540905096 -1486649299 -142535448 -1149008131 -1206703893 -236767383 -62208190 -1855996888 -1539723941 -962330037 -1181586302 -1139693905 -1428813742 -910421040 -625434405 -1891076417 -563364919 -218794010 -778922406 -288565530 -902787784 -1182319633 -579886140 -865564894 -494948680 -1398299929 -1313357582 -1763956808 -810325221 -1942183720 -530347640 -1495650430 -1100688875 -853786867 -110144415 -66279191 -1557833991 -395262513 -1010135820 -1494497205 -1045789123 -1571623213 -222482791 -499238910 -489751541 -2096814283 -951007111 -2003213603 -1909891602 -1110083105 -1976304246 -615894373 -465548471 -1190226076 -319487527 -917748789 -1376343969 -1666725146 -872837354 -316616021 -2048471328 -199780992 -1202192283 -1719549405 -1779412156 -722837770 -419409311 -970960523 -205276508 -1223532874 -1761093293 -2075352497 -1020022505 -156287534 -352083657 -1152575714 -1037529258 -187025566 -1570112201 -596707871 -120556407 -1114453328 -264714562 -1619010597 -2093296289 -1953624069 -1682248700 -1931688145 -224877669 -2095247810 -393099164 -1157951176 -1188605918 -1006779432 -918258911 -1360029835 -205498177 -654156463 -1438884648 -520930069 -2128324511 -114948298 -1348245833 -1867755734 -1602153139 -90357440 -366555651 -1717726761 -1211005506 -1667016723 -1478404699 -1161980303 -186666703 -1981152701 -499498972 -565646281 -2054423145 -1447721549 -866353533 -864702471 -1032590848 -939030929 -435501900 -856164324 -1413358568 -1000832909 -1906778259 -323734832 -1435243573 -1602408307 -83998722 -869764575 -212026896 -860670699 -1990075548 -141933211 -1764629107 -1372236279 -1348256020 -2038968643 -1549427722 -845020132 -944000913 -214160755 -217216913 -42456891 -608396233 -1145844664 -1725405199 -1413494152 -1132109550 -660094430 -306564608 -618097503 -986332382 -862073081 -1937589705 -628148827 -267726737 -705028294 -1743256759 -796952492 -525026705 -113525412 -1056120948 -1272430581 -1098618041 -409018181 -273414020 -1801913207 -940880055 -1448991524 -735986888 -225819896 -751387823 -1371296801 -590834803 -196150293 -310576306 -1470712732 -732109754 -1634821815 -1544464987 -1188195220 -546629087 -260023343 -83104156 -867179342 -1859172452 -1224336914 -242208044 -1309084443 -812269986 -268110723 -716230055 -1032692950 -507575596 -1017996088 -458035367 -1619022321 -142857910 -126176024 -1074075779 -244080971 -575113827 -114195242 -1576535523 -1179298375 -1341210462 -1735875922 -1301276559 -581666065 -715993311 -1348703836 -975477567 -961307371 -1173508016 -659410864 -1702772728 -1134159574 -755109446 -1643588799 -714793432 -509690306 -52705059 -1050664049 -1900125909 -186838026 -565611068 -1462598254 -1791031416 -586728713 -2052056014 -318056478 -488428363 -1332998107 -1149778845 -1275192209 -268659603 -1351321627 -2023017964 -1901821644 -769768760 -1062059792 -154850280 -1965959443 -696965759 -1527700775 -752441893 -1907182115 -668891683 -2133107783 -1050505863 -1388977454 -1396826488 -171554812 -1398671010 -1107665008 -2137537260 -334798157 -545469559 -99189070 -623389418 -1880718260 -419995627 -87755300 -1729545258 -128505414 -1569427863 -1979940987 -1609058244 -180340237 -878937342 -1907382928 -1896472127 -1054749715 -1848437667 -1193431767 -510444989 -1999244005 -1764851073 -807851547 -1169334095 -1375280968 -980736515 -1301616880 -2006473818 -869750285 -2119338513 -1558618849 -701469037 -2052366476 -1241024018 -1529490862 -773663044 -2088781570 -1236669481 -1357231501 -418538873 -1373894586 -1302134358 -2113791976 -679768311 -253000937 -169127099 -1398287912 -1111387863 -283051835 -575912740 -656624151 -2111127571 -996270063 -380953182 -1031378167 -2032337832 -1774536889 -388603887 -767758282 -1631694398 -521574996 -82710718 -697117817 -1935855934 -1553430688 -1550876637 -1574614420 -1103574959 -2115560421 -337252368 -991204543 -1144104422 -394445316 -160407723 -880623476 -181466008 -472417716 -677509853 -949802977 -1092686288 -1645776919 -983304273 -1508252646 -305252134 -34183455 -1143194436 -132696143 -1136049815 -312135228 -1901711022 -1058028453 -1119612411 -1074076663 -258938359 -1175130891 -17783578 -388368513 -1106794758 -396147392 -849911644 -1551264511 -1651161797 -1292635645 -1382712463 -1327821454 -45117754 -232364087 -1217939963 -102834937 -1769933971 -336772353 -1513527026 -904927267 -633388415 -282652726 -310538718 -838971216 -211601110 -146936338 -2100322363 -1929249202 -35751961 -1735271014 -1872006038 -22568469 -1351136611 -1060937699 -623186052 -610229545 -1893548390 -1307625837 -2067282708 -682548543 -1883203574 -1388478732 -1604740422 -625149881 -1404048843 -1298591065 -543724994 -843056173 -147996705 -594557709 -490005672 -2073026706 -585158814 -1436567285 -227715774 -403154664 -509531563 -1679678752 -1688245049 -1780594379 -1265106908 -416213809 -951249584 -1783490020 -540021314 -872332176 -416023963 -2055475156 -1949001250 -1295941059 -1102230739 -998091351 -926569540 -1450334383 -1830581631 -1734745295 -1626181393 -206296782 -1191408816 -870445884 -925369024 -600614794 -1359701858 -1135639679 -2008914064 -1080775514 -1177377472 -1268848446 -1023217212 -162636908 -1839313772 -319467439 -580129773 -665337431 -378852888 -91475261 -1973904022 -1077518898 -130523535 -1128249158 -202995496 -1541269836 -1174383538 -341923589 -43520951 -1312183477 -1358126896 -435057109 -1970496575 -1790615638 -41198808 -938631722 -168480792 -1273224398 -1555398478 -263784815 -1025138297 -238057798 -275376625 -427677090 -341085121 -983774804 -826532575 -1608759229 -1597246073 -1369161411 -1208557072 -1318375778 -205431100 -1674276971 -1094824956 -1083147996 -249493153 -1343343527 -1079077378 -554093131 -1154159325 -1883475571 -1664965017 -1355120309 -1442956928 -244263325 -1492453858 -1062994446 -831194529 -505325168 -1849758338 -1915112794 -815827522 -2077559806 -1611042869 -1323677907 -1271483676 -216371235 -861532274 -1438181044 -1580359523 -1024756965 -271461815 -1203458477 -1525635493 -400985671 -562488211 -516348183 -282494154 -1940386408 -387695914 -539841600 -2146846272 -25056610 -219649458 -124051413 -1872960701 -1035203981 -1908284320 -2013781942 -1290822474 -973518524 -247926375 -780309445 -2125693533 -993257639 -1290750542 -1912041047 -728583221 -346440153 -791484454 -965508860 -920973288 -1883407487 -520677229 -26326278 -84123064 -812096922 -1654391369 -1884961074 -862010174 -880311756 -1384838909 -559777377 -52517732 -49742807 -656218566 -1736911417 -1524971848 -2132006038 -1860830471 -1173374836 -568538251 -1267639054 -24318691 -702346707 -1770980637 -748218639 -1793912488 -1764265583 -1704939352 -1041387143 -601989351 -839561240 -1538199890 -1117408644 -542586693 -1038984089 -1016050066 -2110981965 -696553668 -1044138279 -1743175516 -1578985038 -1546107687 -879766709 -814168568 -2112807339 -1310843428 -310759823 -260115657 -1634625554 -393390007 -1751182183 -855567546 -2120728957 -1305491040 -547487881 -1808872219 -1936877801 -1548080181 -1819218662 -1883369895 -2036352132 -523400285 -695571883 -1723146960 -2113976925 -1640722507 -1933147669 -1132777420 -1147567285 -612725288 -889828051 -263935449 -1409360288 -373734006 -2105255014 -1080452326 -40524050 -335392251 -1940472829 -1840173661 -1886719980 -359172258 -31608489 -815413814 -1566820391 -1105832023 -1395329423 -780187121 -69794065 -502779193 -2009229453 -2086551143 -257104891 -424805273 -1466580683 -4238915 -376484054 -1080671516 -1576966733 -1984193904 -73390265 -814570477 -277757314 -1785211467 -1555093632 -1582689034 -1522142696 -1827088608 -1009566203 -510878874 -701614612 -204078207 -411040790 -2055148778 -758533498 -1209572294 -1201342756 -326450998 -1988688948 -459667128 -1126742037 -642616613 -762153928 -1928597188 -1962254545 -705770836 -1338258271 -1510525666 -2000677275 -84016199 -1163500514 -2114532863 -246954238 -1621472062 -513465604 -1227112782 -1799064933 -314579171 -27388083 -750010523 -1845335818 -600263152 -1892105705 -682739159 -791919392 -1833060885 -453894333 -740140587 -1317562285 -1565439778 -1524189449 -1867127927 -1788019125 -1498761404 -1847221365 -78396876 -1208819321 -1431027427 -1608602836 -1116232569 -103646991 -385740020 -2026869494 -62493297 -205339296 -131327143 -1749586932 -1961471400 -428354703 -992308577 -372251037 -803315148 -88003747 -1610226693 -491109757 -1302030478 -367880816 -367454799 -1797321668 -1080295374 -1697599080 -80003518 -294364004 -1720976187 -2137017113 -182622116 -575772049 -439514161 -1718241894 -1278911249 -497539120 -1986152069 -772014715 -155119831 -53852159 -1002620926 -1893208920 -2044604488 -1781794169 -2102624615 -1968492920 -327440758 -1443716092 -118630791 -962879921 -1833552102 -119843864 -2023645009 -1703148724 -1011073405 -72619124 -738905572 -2035501650 -1261734840 -1723925402 -164866090 -650470000 -1757526770 -114858905 -1993301329 -670543303 -1974597712 -1998948493 -1093148183 -818911596 -224500349 -48597864 -740514388 -1157584751 -1472551884 -1577966360 -1605055717 -1629345652 -1848390267 -396779967 -744181434 -512601110 -1729947653 -449107238 -1887813508 -1558228178 -577912481 -2054016433 -1054563906 -873029451 -1397706653 -2079586085 -1306975670 -1877344174 -1693790694 -496969426 -1001239599 -152082501 -545054377 -1711159784 -361489064 -315461285 -1968176199 -1446761852 -1916595230 -2108809257 -687072311 -604761058 -179000555 -1985222085 -174159156 -72724031 -354593874 -392119893 -1879212655 -885096156 -191871123 -1405010114 -274803586 -1534028852 -1881733329 -300391134 -2087218688 -739115471 -1268306849 -510531021 -1297700182 -603039942 -1316975001 -284892178 -1441786483 -2047430680 -2036962879 -50806879 -1360207494 -1043929343 -379071811 -1623430475 -1216258190 -1902047184 -265452246 -1132363703 -636676607 -1860204495 -1390014439 -1645564207 -1703220983 -78046771 -1767055527 -1350887926 -1176256198 -1750949151 -1233966016 -1017251833 -834243464 -209168185 -58955156 -869345625 -1760668834 -1383921025 -165286518 -1274152455 -2120866948 -1477222130 -613895943 -1237673813 -1057170249 -1728163312 -524459109 -1311357675 -363774564 -73154139 -1140968089 -1369187760 -1651404715 -1080391177 -1160276454 -1614847618 -845584940 -1846794381 -1492011376 -68650413 -608772852 -1033229256 -931335950 -2102492314 -1892393660 -1227431550 -714147768 -395433693 -1739674433 -718341526 -12964048 -990906389 -427997438 -1430206663 -698924170 -82976100 -862425797 -1423236576 -1664272546 -454178447 -1220277291 -731600987 -1673909434 -1360081538 -1074470498 -435672263 -1571971618 -1783158332 -1407792039 -1933460474 -2095123761 -455691268 -876456074 -1006900945 -813044255 -396347924 -2072769321 -554256413 -1750956252 -1353312523 -1124268684 -2022645682 -2087329011 -445830485 -502517012 -1897720680 -564343516 -1633688260 -1820158925 -506500960 -136458012 -2084756335 -156537893 -264900076 -441977101 -163201534 -591564719 -1726430270 -1461993273 -213050337 -881774410 -197860923 -1143847305 -368047191 -1016235777 -937259448 -726991791 -1516563554 -400245835 -1012966441 -1824104118 -241366654 -52744595 -1715145601 -779122326 -1501137323 -977102705 -357714326 -1297949129 -492124877 -1183283142 -1741196374 -527800149 -1629642133 -388895493 -1373813030 -2078906313 -619465901 -362677451 -961328771 -1533177816 -463273159 -1603762938 -1376445469 -1225151999 -1056439757 -188202503 -2023539537 -2077964467 -1969729355 -1780850980 -1282832621 -1979528914 -1125798274 -1960661048 -1841154168 -1186231953 -1909738970 -692280728 -95796050 -1578960747 -1137848850 -483745415 -2083586010 -1961722088 -346700625 -874270064 -773852874 -984287086 -846521561 -408714352 -1609410958 -1813437141 -1350110563 -996018139 -441833808 -2049843377 -1784972065 -1826431512 -703171966 -608723121 -197400339 -1992746605 -2084715270 -1613842085 -1125460985 -586812119 -1306377009 -405583335 -526015767 -1704304917 -1115856333 -222699480 -1993647286 -42591661 -725991976 -1892542025 -1573518458 -2011094448 -1219267403 -938282547 -742347508 -1902061533 -506615889 -2068069715 -1024873310 -79388583 -696569694 -1313487261 -1795988114 -142089766 -100881698 -1154100803 -899896317 -1977557645 -206934896 -1178772579 -1094091678 -1643846532 -751544669 -1859923876 -968618200 -1640043140 -1252444735 -203953251 -458388945 -1119156826 -2006994156 -1025136463 -207233760 -1906812533 -899777950 -2135647123 -779520303 -1747485821 -1007837175 -1515876336 -1735074791 -721569724 -582196659 -1043752081 -1694796671 -224555689 -978697244 -1387327535 -1583925266 -824657450 -158304412 -2037497498 -446213824 -502844644 -961780763 -539872772 -523270429 -660565738 -1785387223 -214057430 -628117285 -1885083990 -780375739 -1092413144 -1350013005 -1503844480 -1379133817 -1311060248 -1807369916 -309991397 -230081757 -1513525299 -875901578 -277421261 -432135990 -119889776 -647804346 -2053036579 -1766026904 -1242690341 -1618094112 -1722318423 -1073657448 -1803126442 -2004367877 -1982421897 -356039674 -1069360376 -449197689 -1260539818 -966543471 -1129811189 -686246749 -1761926053 -1039164288 -1897171012 -2063491675 -1391166322 -1677908965 -2008205998 -2065212134 -242149677 -328110274 -1958853269 -1522583573 -646973759 -978262752 -527271432 -1333430102 -1967867869 -559626836 -1817342439 -414460992 -1556425323 -342099554 -853481059 -1412880300 -1552517221 -1230622297 -653941422 -2119657855 -483348902 -1861842960 -1010408283 -1778815552 -1433132577 -482636887 -632425090 -1271918627 -1084141751 -1919147909 -2062012270 -149126604 -257417379 -1381823795 -1424363907 -1283971840 -1799029824 -1871985855 -1830836435 -1722268829 -240131090 -761456917 -951351546 -1349681707 -230686288 -936459581 -168529004 -2083523482 -910813992 -787327728 -1970375329 -1900317763 -1263844557 -674717022 -1255332594 -1495559230 -1715374122 -324907479 -1816568879 -298139954 -758858427 -228203056 -2968650 -501976669 -1406110467 -1588567281 -1533592263 -986432947 -404785389 -2147322874 -1592855483 -590959279 -140734778 -949918499 -886780895 -589992085 -1064974396 -1895959474 -1028525332 -1329380221 -473510959 -1871775778 -447555943 -1585002207 -1744935661 -1096970995 -644403470 -729088469 -248208701 -1230395233 -1132644068 -1053803868 -983972667 -2004532369 -452071647 -171028043 -1135199015 -1045125157 -1149764886 -1040583296 -2124118351 -288977529 -1384804036 -2121150513 -1948131791 -1715329175 -1716966897 -1324873140 -2032411884 -871645206 -1755021055 -950979840 -1544869906 -1551217912 -867972404 -155779957 -411171606 -2106289643 -1289592753 -1780434147 -719571331 -1354943860 -624862232 -864499394 -1914443003 -296068420 -302324841 -227293885 -1902400829 -1914196467 -447505162 -731525940 -412594505 -251149372 -1262128849 -1903583724 -320276262 -1289116052 -210971381 -300499270 -1757176793 -675246407 -1562771701 -1778975897 -1980567345 -1398838915 -1782160696 -1820392963 -145010332 -1942194226 -706921982 -1358216270 -1937165927 -2095646569 -652590736 -893514723 -2096289637 -723216377 -340206219 -1244454419 -1202182000 -1546723024 -484317433 -960074301 -1924136996 -14251599 -1155939576 -1739383070 -116370879 -1635244583 -59992175 -1118654782 -11591589 -1546308093 -2100506704 -732501095 -1769639061 -1822670924 -1923478860 -1837861729 -1684784502 -1601239419 -1913334576 -994088654 -225234118 -1643635212 -1494856723 -645757208 -2006526565 -1756269114 -452270983 -1373784548 -1600209339 -1780649192 -38865352 -374942376 -939493134 -1761330394 -1765341710 -464053018 -1825951269 -1221662453 -389698604 -1986797725 -886136872 -503315759 -289875980 -1452684464 -526203705 -568011589 -1005965408 -121859425 -1539440384 -491554832 -192471415 -756699523 -450725527 -1169109320 -1892454837 -108149742 -901548432 -1827367039 -1394188726 -935845465 -584499627 -1095029611 -227817287 -2109283655 -70344909 -1170879713 -1582678930 -1352324768 -1702939575 -1790873456 -79378640 -529457693 -1570696730 -1830952186 -1520212239 -1594152514 -915322826 -1405373121 -2080894941 -1830081992 -1927247210 -748010769 -447725045 -132132227 -248248191 -1894103663 -2050164560 -740643805 -1185212623 -1957728836 -1951590965 -1871608124 -1924762459 -1936473652 -1197998879 -2107968728 -1592686937 -2053173951 -1927354461 -403094679 -1648847315 -1047842317 -1719916419 -1505365513 -1173331684 -1990766234 -1012874578 -280162677 -1409958115 -1831477807 -1764389798 -1645137210 -969133345 -1708150567 -1325186473 -856148674 -1150329018 -1932015232 -1427261584 -593105298 -1849137759 -74976129 -1698382961 -369789603 -236183203 -981313165 -255955195 -429217424 -459674895 -1257282006 -2047072009 -303746676 -501754613 -1968982569 -2114520560 -40177717 -957024461 -57599997 -1715508429 -434721581 -626244773 -478545864 -594078233 -1021387128 -1616669825 -1406646931 -2014983141 -4537597 -1101465134 -1015469998 -951713677 -993566483 -39040709 -1174683828 -1093930325 -1079470308 -715616700 -1461453700 -1881865161 -368607911 -1850322229 -655010596 -761912450 -17560089 -927156184 -572641856 -1517451585 -292997323 -226005090 -1716459734 -1390919187 -1819278314 -738457412 -945727471 -1315133650 -1549560626 -931254013 -725377155 -149180066 -1155953213 -1968580129 -1793162421 -2042791396 -1373927983 -1863437737 -2044021558 -574424247 -1409326064 -1946014885 -496228385 -1431465394 -379579617 -1568191329 -524866872 -1722179475 -885842059 -1990844609 -182639556 -868886129 -480370503 -1196014848 -974614416 -1486714043 -1230687856 -1755791535 -1015535318 -2049546917 -1097336139 -338927737 -1231843915 -1858322325 -1968637954 -617543549 -265962092 -1111410837 -669175853 -466702032 -1250772980 -24054377 -554988603 -1171971700 -608351616 -395966745 -2108744809 -1751378422 -2006272772 -1785737457 -1805472974 -640341908 -1185892639 -501855866 -1523258093 -1246213164 -696638157 -316661255 -661235519 -157494608 -1312023552 -817751068 -46859076 -1581475530 -454133791 -469743899 -835824121 -1005466620 -328664097 -529538195 -776210197 -1949109101 -961109169 -2137294296 -546269503 -658945996 -332187193 -1760154198 -1324368361 -2138525819 -1917123741 -254075399 -1047740757 -12997499 -1553117346 -579504937 -901137014 -1355115654 -1364720343 -1729454841 -756350542 -1027852801 -763569939 -2105173948 -1865459711 -1667600224 -547887771 -2087372508 -1176884564 -1574478278 -962920012 -359877892 -1153780892 -1965603081 -1150040566 -1378969762 -701271510 -880013834 -672631149 -557803435 -1236212890 -125757505 -482477887 -107595737 -180320985 -555368978 -1122483384 -2081879640 -1200048909 -55600939 -329595328 -1148352083 -917923392 -15929296 -1435705644 -778501016 -1796198388 -1528681237 -51197551 -1483780857 -1324754635 -40698349 -1117351897 -1736323511 -233970294 -296173601 -2070101908 -820202709 -449400070 -366989991 -427744553 -1474935762 -841614613 -1689501549 -1423753409 -1760750189 -603770863 -716662366 -1856092986 -1007359380 -2075510359 -1525725492 -1913598864 -1141009776 -2069821169 -396789630 -906587475 -619216860 -472012658 -312150988 -19105695 -1134352462 -1849494415 -1774326227 -1142974947 -738711814 -926494591 -190666540 -486936456 -2028320922 -834323576 -1555610569 -1680914605 -984389950 -427873162 -1488983578 -720056955 -926891840 -424779542 -1034119766 -865751991 -1492004312 -2097409412 -215921979 -1900821270 -1136352118 -1097974455 -329686514 -533431538 -1787116588 -1362207574 -299535551 -592337089 -1822750978 -1121462791 -2108642265 -27921414 -1123770052 -84588599 -46409079 -460826892 -1291542762 -194497058 -441943072 -1738759778 -378120470 -666627817 -591533920 -1208791477 -963053319 -452884994 -956049190 -846089476 -1736596345 -524524038 -255135731 -1688871505 -1572022136 -484730711 -1463586706 -1224075004 -135253968 -1175741650 -1692875503 -147739818 -572025194 -1890631586 -1677024890 -34459355 -1485278442 -724861966 -80333131 -1539202401 -786741845 -713374336 -281263951 -591717410 -2145224260 -681188337 -497057802 -339091384 -1834775397 -1352410106 -989731694 -12251396 -1898266107 -1141400517 -47070568 -841054280 -861919406 -1502257627 -478699210 -1023880808 -578276645 -1732069840 -1756965795 -1423970315 -1111322037 -1324197900 -1421071439 -1782036986 -1888682640 -1133344173 -2083050368 -1549121582 -2142176093 -990253096 -185520222 -2039599357 -1412419685 -253411857 -633008598 -341519348 -1839377052 -1383014399 -2107492512 -31375566 -1195644247 -1188374350 -1409783350 -1041686099 -1331575549 -863166656 -989951907 -1565887640 -461471495 -1387967148 -1596482722 -1424423036 -130269296 -1150221579 -126287959 -807883677 -1709343005 -2039139116 -119600139 -74842581 -1601325372 -1210463000 -1139052969 -1394020625 -258055605 -1371069942 -1072982884 -1203147529 -594499751 -1663389213 -640386245 -1931064598 -482341475 -2109886547 -1613216165 -1343041780 -302582843 -268566205 -1929065088 -1236315257 -1846239674 -758985415 -215006725 -1550532821 -91066202 -1541300350 -1687232336 -1939796164 -1204883241 -1849323924 -1056367637 -1123565310 -938457099 -1528559325 -149706214 -1408988061 -560165758 -137586258 -1719834034 -120720818 -1730225358 -821527879 -1246695790 -218198751 -1511822628 -176397492 -1185215184 -2000771563 -1668714615 -2097588132 -1072185372 -684265227 -670740504 -993987625 -674723362 -1361888974 -1387276292 -722684165 -2132737370 -1267425513 -730302398 -1323360581 -233152888 -1590416488 -400959607 -124430563 -1802883810 -73935500 -1388400534 -290466636 -642421621 -1779890678 -175422436 -1977318168 -477012251 -588448306 -888484507 -1305311558 -1825901201 -380169577 -746230814 -596792418 -1541537836 -1383692244 -615131545 -529600157 -1817605531 -541280942 -568063502 -1878467199 -1241119046 -979142811 -286037516 -1364129426 -387847410 -938551225 -963051360 -419960081 -1637817325 -350394029 -672285329 -1188057636 -381738446 -1344408333 -1795402644 -1039513711 -1327472432 -621555941 -1130241379 -1473999138 -132160574 -724676220 -1253467403 -212065151 -1503622484 -1943014339 -1605659291 -1036195635 -1395143922 -1957439108 -1377099763 -1484453022 -1884413555 -249792929 -2086711465 -804153098 -1286527515 -1802586609 -1521329234 -1040134656 -1026276812 -45726580 -1874968081 -413501289 -459082531 -2038838493 -1509480319 -1611399422 -873813237 -1685896073 -956060393 -1034378297 -915915214 -624220002 -807958019 -811325352 -1571516261 -572424174 -6353858 -1562592703 -918040158 -1978415458 -1739296105 -802233771 -1240653331 -1741805394 -26181054 -1938310590 -2006644787 -1595742621 -1870447411 -1744011891 -603554134 -1369065357 -1741661141 -1896688177 -390934771 -1288220024 -183814314 -1285691012 -628382570 -2048761691 -784944639 -572504152 -1350544104 -1840090785 -493823048 -1807155728 -1005100975 -625719523 -240603702 -114712213 -1675332532 -1655769507 -1425006323 -1343639317 -1755452614 -1761741012 -76663848 -2146588783 -2139889928 -1221383587 -2145248683 -1091665698 -1672589965 -658602525 -1001921037 -867592732 -217083594 -2096731752 -1711392241 -2120910216 -56943759 -1423534598 -230677359 -786389878 -1240315908 -365704327 -294426175 -618400537 -1784457526 -1768509127 -11739362 -1882445257 -1528346795 -872681798 -1997153623 -991539151 -325410137 -1674807297 -1418079450 -887801744 -567532052 -1536321637 -1761865178 -16038163 -1117949666 -1045608859 -689409812 -1236434719 -1706553861 -259152495 -479147349 -2113302040 -1035348547 -43037788 -1781597524 -945095747 -1435166617 -309008815 -895695259 -89852543 -470686360 -1643380619 -1510879466 -1504542934 -233148313 -1513524463 -861850926 -351314267 -1106339866 -1340712136 -1950445428 -1945920588 -1058862353 -102584182 -1850461980 -856322006 -1916036295 -1304723300 -528983583 -44780901 -1013326657 -1435803489 -275498284 -324916256 -1964083918 -1387271789 -647002244 -1457010147 -213513888 -82741479 -1214117944 -290671014 -1929919020 -555964852 -399919467 -1970150406 -267520549 -1534593872 -640606234 -1333452427 -195600497 -1807573169 -1578580921 -1196564209 -1617790155 -908680418 -1435571509 -671577718 -32657794 -1271213773 -2122562455 -2056320868 -1130497305 -1480380126 -3243540 -827085605 -166116204 -186299528 -105009770 -1815130203 -1888116186 -202886383 -1854891292 -137841145 -1708752549 -705279712 -1673871791 -727415637 -50208688 -2043829592 -1643018979 -1875246927 -805098717 -2147160519 -1011638645 -982673216 -1639495882 -644614117 -2121948951 -335093728 -1218164062 -1721783183 -667813356 -1189535070 -1590651567 -56965066 -1781641347 -1681628908 -104778589 -77154783 -1807798740 -1074785424 -1433666251 -862161217 -1271407810 -1088775020 -333605053 -1967807101 -1685782707 -1198201678 -1221444227 -1016941516 -2061196586 -1472311145 -1826833281 -1013252608 -191261946 -1903990510 -714677623 -710772090 -1642472016 -1272374374 -153946992 -1816783556 -1758732646 -1054664014 -408060960 -1365269849 -227583948 -335038729 -293795869 -762265830 -1661850455 -548284303 -161951244 -1052777159 -907943680 -1938117825 -914327079 -1849722468 -1312245704 -256492438 -868725937 -2082990853 -548852977 -1129720574 -1310764091 -1124826511 -660625836 -647970662 -553342297 -1419794169 -1789796566 -1307441233 -1112126927 -1967082248 -240596571 -2142345143 -1683992799 -1179988980 -63306815 -993234440 -900844949 -741346493 -110387957 -2012005938 -1506294304 -1751136492 -87638909 -1920845368 -526434625 -154116735 -374686863 -940053437 -440924680 -1802514610 -311242041 -1922302642 -1396518626 -1439769119 -353848637 -751823516 -104054464 -791687790 -88009718 -1710581290 -1376158641 -699401097 -1656237248 -696394722 -520216504 -872855791 -626486680 -249309519 -404490536 -1486695797 -924027334 -1673151081 -1499344549 -910721145 -1374331846 -61228590 -424245217 -643654079 -1018975814 -1891904720 -1599751558 -529174866 -1112190635 -890338957 -260798003 -217912894 -1002391323 -181754946 -1033631388 -1247517533 -1144331470 -2062957405 -1001625020 -187402307 -1459547247 -2052364295 -1204367951 -1778779482 -826904087 -1410310472 -1311090965 -176146888 -1268281050 -76927228 -130765502 -900021233 -1929537210 -581335123 -1596302058 -535486835 -1970754915 -1837568724 -1055216761 -1108145201 -1618206423 -1462445753 -1375430756 -1350739784 -833917251 -1168957235 -1483845889 -270263812 -395974879 -97969300 -1597551498 -59988445 -1055964672 -793383496 -670453049 -457698734 -256198784 -228250453 -799570029 -1568298124 -172286790 -816123374 -607493429 -1004803365 -2066239194 -324077921 -759089455 -1963607005 -1961729586 -472719511 -1454811124 -1909239973 -895572737 -178108936 -2032167081 -1052208479 -2087557155 -2132763046 -1698962045 -1512519803 -1156399482 -879088624 -155012208 -392516045 -2094888378 -794576481 -1393599121 -1763772465 -2007039714 -1790829769 -1492614878 -1621773939 -1292145049 -1727200079 -1515271254 -155396205 -403902683 -196585014 -1174481212 -1983530507 -1808578768 -1299814138 -1772560082 -1524146990 -1153519514 -1867590329 -969674951 -73504374 -584916793 -1663887632 -427379790 -1786814962 -587746686 -1981259049 -139406161 -94689050 -153480923 -426012814 -286885800 -588853085 -1249154219 -734825661 -36430530 -255078315 -723880793 -769627696 -838680791 -1772879076 -443028207 -649270900 -931605893 -196973374 -1259196791 -2016608799 -1557167839 -2084147731 -665148700 -1501818265 -1684276664 -1655940741 -7968867 -788761555 -298901954 -680890545 -1934518599 -551677813 -1362098992 -622081524 -1373780272 -1528342607 -802294082 -106816661 -2118776182 -697456320 -1182624914 -1415776613 -838725931 -384063409 -1765355828 -701334244 -1934384172 -439846871 -867647923 -1144678731 -1456922091 -881040343 -745298736 -2111226648 -513973555 -1174310651 -1264395427 -1343254524 -1730687604 -561813 -852456503 -1373036784 -1917441673 -1302591229 -1202488285 -252004078 -594787062 -49774249 -1184664260 -1331326483 -972081688 -1868827487 -287752987 -131279465 -948262786 -976499915 -964041031 -2020975049 -1926287591 -1799563412 -102581136 -1799267858 -1577655999 -683785684 -1200995891 -939141884 -152838938 -373589154 -1818211097 -2129094116 -164797651 -1647699374 -1081750753 -388350169 -798487150 -548219947 -1227803599 -524724370 -1474632008 -31388429 -1411832688 -1125171513 -16623509 -218441653 -1299309248 -1876808440 -1279643944 -2074525750 -9787558 -1290730134 -1569043791 -1967293824 -1649070756 -508247910 -1580159251 -1953752755 -1697590655 -2085888190 -1999755702 -1775007964 -1863510471 -1118978249 -1153134164 -1833463820 -783571937 -1123821755 -953560920 -1975408526 -593913862 -406287378 -1621448233 -112971601 -338154059 -1113539651 -2088414399 -1508077425 -1655280081 -1789158129 -1314648809 -1990772527 -1118641029 -1927928565 -1462126019 -296628712 -1129217897 -1452206340 -1080308225 -1913585837 -922064987 -904239757 -1963309727 -1260345534 -1996179577 -1800617205 -633810911 -941092057 -717141844 -1324745144 -2028666759 -204355094 -769713305 -130027607 -1383121850 -1765937822 -1892972814 -223854593 -2080278654 -62080971 -1865310802 -1312370308 -203228219 -1157678003 -892354601 -1925472006 -976928199 -1719759278 -1011780373 -1217212065 -753955133 -1570403031 -1189720387 -410307092 -461304727 -732581019 -965438082 -1878891089 -1922987335 -19251995 -1445732915 -1803120247 -1900248512 -99943000 -409789046 -344440193 -1537895086 -289535110 -18649668 -2059841261 -168200340 -854634928 -1478603760 -212631236 -280394844 -1017021590 -1259516657 -950145720 -410716948 -907303578 -1917341746 -1770601787 -823337630 -1598409789 -1600383400 -411125125 -1325083476 -1272561742 -1155557321 -1757274226 -165319191 -1823287566 -1549962719 -1246780123 -1635583482 -1460900374 -1172049667 -1918742985 -1698905543 -562890689 -838344988 -424005349 -907159897 -1649978826 -737794871 -547819119 -933538344 -463422626 -1968371160 -428504085 -1355488204 -1183717252 -447348556 -246932545 -1256877811 -1696217585 -483537170 -731095942 -1775552707 -281587837 -1740302118 -530425086 -649801705 -1262910940 -15801632 -1437540443 -1551196751 -512319477 -1291509116 -1776492383 -1042336840 -1531161301 -931443906 -1769425159 -375103657 -1502659254 -786393258 -1297123568 -1649306679 -178438477 -1128311727 -1254592679 -1944709707 -34938209 -943443032 -1575273023 -1435297345 -358670664 -191252719 -1748912321 -1360702558 -774535403 -1718133754 -1608885916 -1578990835 -1643537866 -2006246148 -1338267889 -1672175392 -133325055 -968755564 -1801236241 -300530728 -138407752 -494298163 -1202478945 -95026698 -1533363565 -1437672955 -1630842288 -1232547755 -802859323 -1016887560 -1154358094 -929218860 -880299036 -1171053869 -214751528 -1556404136 -2133493292 -1087304685 -1391488472 -649833074 -1790129723 -464359991 -542795539 -254091517 -1318635983 -283729241 -1223657147 -1702265957 -1206793965 -1750607487 -1934070109 -1603840971 -540462453 -1844104408 -1378791752 -2004424734 -790533849 -21076154 -2039602170 -1459697776 -287337904 -1744914072 -734124672 -1139810289 -1237395983 -682648733 -1419613257 -896692229 -1813541804 -961697957 -1295635977 -269684859 -1402930043 -1822272288 -1666054549 -339531810 -647080591 -626304529 -1482864956 -963592057 -917519972 -1825583944 -1490482119 -136231778 -429925144 -1616906700 -1092837762 -2044116790 -27504824 -564592863 -1529495995 -859933375 -335289315 -210427477 -1896522977 -1909385665 -1196734534 -185475136 -1281838955 -311369981 -1925106575 -1277580323 -1750985955 -1852530844 -1267980902 -1474790733 -551595857 -2132148147 -2101772787 -536721606 -1248714642 -1936789610 -65854044 -854839303 -618567091 -288763310 -2079392597 -202506501 -1912665459 -485657470 -2007239690 -856859107 -205674567 -1471259546 -1332478064 -999350732 -618149537 -1860867820 -1801099479 -149455441 -1489213544 -290128223 -1397165271 -1570513399 -897191716 -1618485225 -1853303673 -1372016023 -1941380722 -2066745783 -248384656 -2040187271 -556072048 -54078992 -520035863 -2131789798 -373968438 -1750386344 -364803355 -184175300 -910331773 -1272607583 -1926007008 -1378772225 -1676234445 -1781835769 -654312168 -1908334936 -717001407 -1111904132 -370050330 -323254598 -1953885323 -1778177384 -1444861236 -37713176 -337673167 -1621122395 -1079063276 -317080817 -1270363112 -710404910 -1913728697 -1175629360 -1953101120 -1482979445 -740325033 -122578913 -746973318 -191155264 -110986136 -1328182156 -1812468974 -110513323 -1971548653 -145537761 -69275194 -372048884 -1700696971 -606650027 -1862131480 -1564596629 -238286088 -1964763008 -2063319184 -639593732 -1496200489 -1755595900 -2022465167 -1200897053 -1425455265 -299072923 -1406882881 -1685627497 -737070855 -1264184089 -2086264052 -1874417395 -1895539922 -419565809 -1453738762 -1065921015 -625915831 -1392468611 -2090643718 -321536212 -990259232 -288647974 -140940445 -111596474 -848714687 -761361035 -1487346419 -1121613053 -339128405 -309503697 -623242445 -1558026696 -1486571801 -987510209 -1330458647 -1418747565 -1379392314 -1360652033 -2072845375 -1832495991 -1697139110 -939222316 -1504659562 -45831462 -1490236208 -298172895 -1312497814 -198737914 -851049513 -1348075971 -1160368747 -1018532422 -882266317 -2022890931 -1914261660 -1543203913 -1468160972 -794352374 -1922000066 -606091088 -1057978295 -276606905 -1777640227 -1006798125 -1232432162 -1007571419 -1344282538 -1828649726 -1477472665 -529670394 -850595143 -153930322 -1536610866 -180486040 -1181964716 -1057247062 -871675756 -120991258 -1980543144 -992092708 -1039108048 -951945332 -592024774 -868640067 -639773763 -227014212 -1496904012 -694805079 -1720374014 -606230090 -1246701262 -310166655 -1028159316 -1620200250 -612957790 -502521871 -1979385893 -869527974 -530441183 -920343984 -2044113394 -2117911899 -1203837468 -1452886289 -1770792833 -1886764105 -1100781133 -256883426 -997610312 -1431681655 -1866794597 -480709109 -444514949 -2014623577 -403796390 -557602210 -1707962 -788429923 -1167613871 -380763611 -2140225664 -421647598 -2082628133 -895068878 -299685311 -961869762 -2035678965 -2094384398 -914119209 -503535025 -1827595995 -947284924 -1721442457 -1383682415 -449935542 -776733307 -3600636 -386347136 -1493249871 -1556683055 -378833984 -1921239380 -706143368 -1156952654 -1586315840 -200845375 -1911408188 -829540243 -619027777 -1589061971 -1257912505 -1906450467 -1256985629 -1360831064 -786852098 -418912860 -1217043154 -62551603 -1185288238 -1081106494 -297707391 -2078706674 -1559100522 -207012560 -336587780 -558892262 -208775456 -2048293441 -1505001477 -1497429573 -937974218 -2002712946 -2085283991 -434917697 -1774882738 -1906320736 -1224080359 -225255453 -2002212557 -117697009 -301191376 -504500453 -873675215 -1513643966 -722854200 -695548321 -1327140426 -1483982040 -411070022 -398967355 -1000389551 -897711294 -1761098083 -8374380 -1161767605 -906818711 -210633018 -1056083270 -639176435 -925140751 -1058997777 -231171703 -504894898 -1060661389 -274211176 -167328570 -1235182067 -2128068167 -101541984 -1514109370 -2102448287 -1152431871 -767443604 -637868546 -418286798 -1432237355 -469026262 -1659400944 -181542219 -1753295993 -2022633864 -1888703885 -1490408888 -1052922008 -1194937176 -42050288 -217070553 -1877551665 -886124637 -297682114 -1653876135 -1815357824 -1418775039 -1841147832 -1079742801 -1000439257 -1733120036 -80257144 -262088892 -439047847 -323353437 -1467588749 -1914418648 -2034217582 -1155240434 -726321711 -991947229 -741526142 -982265053 -1221951282 -949080313 -1831774322 -305466462 -1488910504 -1639385884 -943361378 -202914245 -175684279 -2083146175 -1011866184 -511953895 -1589623383 -2103629401 -1676062046 -1031809423 -690522836 -615676264 -1094757802 -2101974365 -1777159405 -1515557359 -668995646 -1732930277 -1185944925 -1380626668 -631603241 -344004366 -655401638 -891704403 -1735012455 -1821372219 -1570980395 -156058900 -804399313 -1129695726 -893143755 -156397755 -57084357 -1639081537 -123168643 -2068630840 -1865766597 -382982285 -774773936 -1432190591 -1830547361 -1158769405 -2055678839 -1077334137 -1320212702 -1013841710 -1502364672 -130320878 -2017160253 -88036982 -21323691 -1904989235 -320379522 -877123225 -1482289567 -2030447369 -66296306 -1845485796 -973459751 -1407612211 -1058574925 -1714232727 -468834537 -584562516 -4521387 -829023664 -526819112 -173738803 -1597785748 -1849544548 -469427911 -1967464746 -226789516 -2015405634 -662926507 -660642513 -928261001 -1961431999 -1913625743 -1592765129 -1219863248 -215231227 -1028770641 -1157321290 -1339530151 -1412176356 -458748648 -722234206 -1012727398 -2101475711 -1986216215 -1850116537 -1492912446 -180548374 -82128607 -1650996475 -661552438 -1188984947 -934668894 -137223653 -2067982740 -1710568132 -1155012135 -1184267712 -1108995188 -871552403 -195281034 -733325822 -598440221 -1318875446 -13416588 -6811581 -665608576 -641019609 -1838595111 -1125833894 -411842741 -501153706 -459473208 -15012244 -1055198209 -796341737 -997485655 -1484055103 -1639039863 -1570237372 -552973221 -1659184778 -843407551 -1758639457 -1635920138 -676626825 -1141136910 -2059078660 -236067215 -1179386496 -674776462 -106857027 -649723897 -2102675531 -676754485 -1139234883 -156481929 -1471796775 -1771751279 -815496851 -814939603 -39207055 -1822977403 -632020472 -913954842 -2035986150 -814791752 -1849242592 -1836904360 -626669248 -1170246248 -1673450910 -96119611 -574599533 -60390572 -1372062220 -570330054 -1317701017 -1749624855 -451359614 -1088791294 -607122171 -1207521100 -1086663550 -1353350762 -1766951557 -1750947783 -1210974040 -1138167661 -1547034598 -1425974357 -433517579 -1865419629 -993942050 -2056227984 -1716879564 -2004551056 -766144056 -271201780 -1128017526 -604923766 -766150264 -375539636 -240223719 -170788873 -1410436119 -1275356447 -881524022 -284557101 -105114638 -1430163032 -2113101600 -1961520761 -1257965030 -641754495 -1304922231 -1724933253 -2071432318 -1705567109 -854680807 -102208466 -1978254109 -1174987109 -1896206798 -890332506 -152376046 -1183697898 -122065878 -714328661 -1288218697 -161511425 -103190167 -1297833640 -698584901 -823332958 -1519887485 -430979330 -7257979 -1725768821 -1082438165 -1204265418 -55507351 -904145459 -378443241 -1796472720 -1844411867 -103804224 -880871404 -53424610 -259255824 -68314205 -1400575937 -911518392 -1888760293 -290974497 -588106860 -1592252526 -1194479215 -935034349 -1984458544 -226227451 -1158713767 -1120570973 -4759021 -527971008 -206302052 -1279981706 -1308840743 -1011371380 -785717655 -679682182 -952914481 -1848126488 -258413608 -945575422 -907129754 -1143365425 -859024619 -94212752 -738275025 -27832809 -1782069464 -287056739 -1314341211 -1115940235 -1632840394 -454976945 -1755731295 -3081638 -253482338 -1817582765 -158652780 -1450067533 -1640600975 -2038042992 -1024396894 -662199459 -1326048659 -314523247 -1234957062 -493892779 -831640998 -1566678710 -872083103 -524821346 -957023993 -49734321 -513594364 -1243698455 -1381596934 -1906478374 -1726018578 -985136770 -94775020 -1598378713 -1078089068 -1123436137 -914930135 -1247866425 -565708373 -950519742 -254453761 -964419950 -1947015741 -137746001 -109667341 -638031061 -1002192756 -1139406671 -896239198 -641900728 -1615176615 -2080070225 -853982062 -1243303133 -1179871021 -228253549 -851604501 -2085824699 -932662465 -774909802 -1568206806 -784988811 -1314902956 -1967253862 -977429422 -1553879651 -506663190 -715573975 -743374625 -1984947776 -2006298734 -74597144 -1771233007 -694833935 -57873159 -2011574869 -703768562 -2045777505 -21854418 -87499689 -1728458475 -1190296356 -1500683487 -1939415641 -1251884121 -1519131988 -618243133 -1286452145 -535843019 -1514688462 -1097829296 -37482848 -761517765 -1974023882 -944522271 -386690073 -814541089 -1931316845 -426889510 -2136613590 -1990545643 -1600368935 -168011870 -1981986932 -1635517507 -352058549 -730585558 -1787463407 -748743566 -2026425989 -1198439350 -921030237 -693065683 -403632853 -2104003145 -1515126513 -2017701512 -595042407 -46390370 -146384729 -1419364488 -1010598940 -688220457 -574298057 -1435934381 -327916481 -849257965 -1302299793 -599290727 -580944259 -1469501751 -1853988557 -2145443176 -65542255 -2057052521 -542487394 -1517549443 -1937696729 -279417548 -1771476894 -498875450 -823530262 -541008519 -284417435 -2052715470 -664115235 -1312241186 -180558412 -250837273 -311648250 -159522717 -1038713163 -757564078 -2096399530 -422704381 -516627191 -676814316 -2144814500 -236802958 -660117215 -689512103 -808155909 -1989778935 -1599209461 -8085175 -596066464 -77847193 -560231728 -1246344048 -748921898 -728684619 -2050636339 -79898870 -683028715 -1363519790 -879113393 -571304791 -520236600 -1210609263 -1449811563 -1633480479 -475467305 -392344648 -1361702646 -403145243 -351192816 -1212596556 -490506662 -1903231048 -835301671 -814584058 -506013181 -528290947 -1288549531 -1426871169 -473851334 -1150007462 -822590834 -1931911299 -1827943300 -341989118 -1144866854 -323738058 -1489462955 -187011606 -1335486481 -22207723 -1730529530 -1638779389 -1487418148 -179678709 -498054481 -2057889808 -1729868121 -1259896561 -892741307 -1982388807 -1947379691 -1959686357 -491908060 -1834207117 -391262734 -357843224 -1316854168 -401535594 -1215109484 -1923098265 -1883652505 -343727461 -296426597 -2027238386 -1967493847 -715890023 -1760226067 -384786997 -1041797462 -1055769843 -1813859787 -2011070944 -824235675 -1659466575 -1284602436 -1660038561 -160552903 -1173180089 -1590392716 -1423603 -304175504 -1266615868 -7500765 -1511305829 -80491287 -2049846646 -1839914148 -1820052283 -861652513 -1311554270 -1520463082 -1515103521 -1631274968 -2062149574 -309311285 -1684341255 -594038031 -345712114 -1440234863 -1739157104 -613527611 -1489568830 -1966452731 -397722587 -1554410245 -834421960 -1061666810 -2139936394 -2002337649 -72634606 -999111546 -893117729 -1866462420 -1340261211 -814199894 -491819774 -350384315 -509022131 -1707589716 -488898304 -641361906 -1149129849 -1104934672 -1345936695 -1712779014 -1806083910 -170925025 -1551259136 -1560824172 -1259110699 -569660555 -802849559 -852784012 -435029606 -1508253654 -322193590 -1301393043 -391929006 -818458493 -1199132816 -1838695064 -658260318 -1692898929 -541460600 -1440091861 -1483206137 -255370183 -1334338975 -63427204 -869128716 -262562918 -1963551888 -1035378167 -540861128 -2102184192 -1008754500 -1900972082 -1523565755 -2122121104 -1080985552 -412518844 -1126998592 -659569204 -69025814 -475686518 -1929173892 -917500438 -1497276006 -504457296 -148335516 -1993986892 -1455382409 -773408733 -2109543887 -149096839 -1904640671 -904515315 -152162092 -1882740314 -44918853 -1184402274 -1223095075 -845456441 -1834595335 -473591719 -1081625451 -429883102 -910306806 -852987214 -1702761973 -953400289 -1423166956 -494169206 -1182582293 -699445466 -254463384 -1126153711 -1492039766 -545801143 -1377154064 -249606282 -1097218983 -517370492 -284572341 -361253318 -648245557 -878535268 -1592176151 -2058328237 -508609736 -1218917892 -1506502111 -948781447 -1103700754 -2082313339 -2046777061 -1789006581 -915065220 -1370756373 -97795995 -832298010 -1871661159 -668638057 -17899248 -184950556 -1055157483 -111859855 -980391860 -1951451236 -1670666468 -542643151 -1987873695 -1790095486 -2036422379 -1704041614 -985490106 -1738325878 -1675497758 -137755595 -270913699 -581207453 -1598036015 -1760814723 -1688393801 -2133185596 -210825307 -2140400846 -1218447825 -48536983 -1864771068 -830995558 -1456186865 -1408998843 -741378832 -653909530 -1583649011 -476606959 -219156603 -430572016 -1751466169 -1333552954 -1885157786 -2020665111 -1012126919 -599159746 -527030239 -1574666645 -1981320534 -1172784556 -1385120526 -997947002 -647979544 -702622071 -2104056091 -257506288 -728633711 -1195025583 -1527906737 -2066561580 -1447452129 -633178887 -1056082924 -633361213 -1972952359 -115304386 -890565908 -1927679813 -1576318449 -1825902951 -409581827 -1156677754 -1261038834 -763570795 -2119560740 -998620744 -1234143103 -1846069395 -44589909 -2098291407 -7226415 -1195272673 -1385781073 -1362342196 -414643858 -334886891 -2036821897 -1976289699 -371402944 -1581801626 -1639861969 -354987385 -563408329 -948385880 -897857126 -2064612860 -907569794 -2096666764 -619138925 -1309642760 -1605969217 -1950154623 -1353328247 -1388541952 -519795315 -236383209 -47846713 -1000821413 -1713564987 -2131030239 -492962207 -223902923 -745077317 -537321162 -588034099 -369358399 -1578872163 -1796501209 -175742843 -919947676 -1825815779 -1091965670 -271768428 -2061735874 -1946189973 -1291448754 -761988249 -1291513882 -1856594545 -847126905 -1992796372 -773665592 -2131605806 -1576582188 -1963597030 -1794079761 -280655600 -1104580388 -1833936448 -137096145 -2072439431 -1452246124 -1748957913 -2126967302 -926656752 -768622820 -1129599035 -1415541765 -1186602889 -1701609381 -909139368 -559209571 -1246820525 -167136249 -150326667 -1099523397 -592950944 -1402393728 -1398360671 -186764729 -1481192036 -764113028 -495452536 -1276673133 -1536229154 -207503397 -2143634298 -1875984414 -315140844 -877491606 -1231218093 -2077550206 -1449695669 -1833133668 -1677158214 -127752176 -1794658679 -1420595838 -231061920 -807255664 -1891746749 -1092216608 -194316100 -1695549260 -2135900777 -747715787 -1932413512 -1678702603 -314494335 -749033078 -449803232 -700482784 -508797834 -85313684 -1495494439 -626431785 -1474172901 -905111668 -1585132375 -1785185590 -1120178893 -2005005049 -1953953466 -775973138 -112342135 -496137232 -2046940570 -242135050 -82274285 -1951922974 -1009232446 -1343875916 -1437004713 -1137117229 -1072293150 -348206426 -412463707 -200311033 -1520656782 -475652127 -1351164355 -1527231107 -1448666405 -1714162796 -1440987867 -1509993450 -1645657551 -1124569944 -643471561 -98879435 -1861804914 -370969161 -733661686 -1948339175 -905864769 -1357599000 -152643625 -1385930857 -1732278237 -964526880 -1596704604 -858626516 -1993230219 -1622881180 -574191713 -1796094420 -1928774708 -650865891 -1968815866 -1460226886 -590155086 -1657048556 -1447146396 -1937175297 -105644512 -1745820762 -940477973 -1133650291 -785524653 -1730864862 -832253372 -1121430293 -1562448379 -639870337 -1850133430 -1776833097 -326266097 -1028541488 -1600914113 -740883928 -925992590 -343470321 -269641911 -681103007 -1210400139 -82548142 -112186632 -30081958 -928811061 -468872184 -1217295645 -11200546 -1416499333 -100579089 -363118634 -1933840511 -2039954679 -941865598 -833143549 -1050249603 -1376982928 -1668290824 -1417383736 -2079838428 -1253137177 -1104407710 -1079220949 -819607281 -1179459909 -1908628753 -1360216432 -1194150309 -1849562148 -765231111 -2107204341 -1630536510 -388304203 -25936588 -2124537822 -896575685 -2002270443 -1090587011 -722966732 -439389998 -1778918000 -1007492466 -17319467 -1177989524 -818188175 -950865484 -1770372261 -1260661442 -863194392 -1456110859 -131566001 -1469106044 -1645791949 -1235913483 -1536074997 -1911553992 -1132584424 -51367160 -39432026 -1309097706 -1035181227 -1525857842 -1990521667 -1197404303 -704864484 -1137585736 -356555711 -1152459647 -1234274836 -1912622279 -1907414857 -285619183 -775657636 -1252150962 -1708961381 -2067635489 -169287869 -1952865655 -1820486484 -1716817779 -966130561 -632483760 -110501670 -1775696682 -553892015 -2068970007 -1123695425 -977816257 -1612964555 -1409199804 -1971446712 -579699021 -2015623155 -23834660 -1157172278 -982569114 -2037337215 -2047304737 -2067722525 -1632101921 -928363116 -1530195157 -1873330874 -814250651 -1344892673 -1345770436 -1065947648 -1073536662 -1920559787 -21642052 -813231621 -1397924639 -1448309493 -10510106 -549692488 -206996422 -65356414 -1081106481 -297488900 -554012084 -1939486043 -287646888 -495557219 -888596667 -1042901031 -276101203 -1868241301 -1173143120 -969054733 -386918683 -361822065 -1617241798 -282378907 -3430079 -1814762931 -10342976 -2035705872 -399126700 -1531017319 -659022079 -1610914174 -1308184689 -722490037 -1017511721 -907213786 -408207602 -1682398296 -150980823 -1356505054 -1094046026 -876573368 -830777556 -2087194545 -333344070 -1876433114 -1413990803 -889388319 -1463294313 -604793147 -718320378 -1805013259 -1503846491 -1412932694 -285619532 -781523279 -1051765101 -1078154050 -68104964 -31346097 -700358764 -571877341 -1553149862 -1126001349 -1078775279 -1919166179 -221592513 -568722093 -62504254 -389493595 -688695109 -2109323280 -736322284 -1567853174 -1283946728 -1376972440 -1492019008 -196921437 -386291632 -560394143 -1828569306 -125853725 -2099647427 -1323018085 -919273557 -1233315981 -829531823 -477512837 -411862620 -835260059 -115211174 -1471435471 -2141765892 -538455830 -331046352 -1913392334 -1964827360 -997399601 -37745525 -881362810 -1870034311 -1243491132 -44602920 -169483637 -948171137 -1583638819 -305310015 -1006989422 -152593547 -544269911 -1411541604 -527890019 -992603576 -1035331936 -1911340358 -1837005080 -171986641 -66486425 -745848535 -614280206 -1253531113 -1282839121 -2088774414 -1116398589 -746461484 -178695814 -1158407392 -266293642 -241320746 -1428652486 -347675095 -72318178 -2123357091 -379382591 -404258994 -1890136697 -1949360055 -883925753 -1995744372 -928577711 -841926028 -481002513 -1080788683 -1398708855 -1743725923 -92257252 -84441230 -1864545590 -1336354106 -1719479216 -599745633 -1784098460 -28654159 -554113385 -1494568303 -93249562 -1729809871 -280888811 -729190371 -1960875615 -1152414443 -474531208 -1839231545 -1084961897 -670956202 -324256617 -1614949480 -410095927 -1207221866 -352405006 -111037416 -42561469 -218555032 -1057386454 -1066953453 -798232121 -556914838 -1333948640 -2093001447 -1293181869 -1973164643 -1535677927 -1680449443 -1756346804 -1758006813 -1740490665 -1551850868 -768645661 -1513487722 -244344939 -716656709 -1761015787 -772709155 -1089154676 -272032504 -57610265 -1888082705 -1787654863 -1819060911 -1379532485 -1569022383 -1607489568 -1732890116 -510958998 -2048258680 -920773350 -670533168 -1804258767 -1708001329 -964427054 -2066412669 -1092188599 -1871052484 -1176055567 -526427581 -35728227 -1336373676 -2048392206 -1017461185 -57855234 -1710309394 -1101369863 -1561733948 -1517330402 -403758289 -2064722350 -600284577 -104712033 -1106031738 -456972134 -929134466 -1609372725 -1170855110 -1169176309 -870855313 -1364191286 -1427528430 -783018726 -415939066 -628611277 -1597672946 -2101164981 -1058744399 -267614951 -973724639 -1564617533 -589619616 -1247338854 -288757164 -1976096775 -1423896570 -2019373469 -778336295 -1175216188 -1451370257 -2060646773 -821538642 -1427589531 -1809943233 -610057276 -1145706954 -1558396876 -1265736120 -253961658 -1283579417 -1646027404 -898238374 -2029797055 -2021370790 -2135055637 -1575833336 -115059701 -1073112407 -1232556943 -957282039 -91746149 -84267697 -1095460106 -1020695811 -735123241 -742890296 -287281214 -792125242 -997814541 -569191164 -1503729610 -1595997374 -1857113788 -984109418 -7939132 -289005410 -1853400003 -843550686 -2016825755 -908580037 -1895951689 -897682837 -1282821284 -1788987955 -602018038 -1321703649 -302384175 -1224520423 -1178960160 -2099281898 -1622023123 -1185213243 -1968149176 -992586291 -744822941 -556991024 -466923095 -671211527 -320536598 -1369615910 -257387177 -874218781 -2059423140 -1730775281 -1474149152 -505962225 -1819357102 -2062647328 -85128175 -525128323 -1821419138 -212064381 -1490681094 -1332920956 -2000585635 -691306366 -899563092 -672012364 -895302175 -2073224343 -1759360226 -864982839 -1449768530 -910224848 -1623002755 -470019091 -1166008771 -1321135322 -1487930521 -201197132 -1380937146 -1554839693 -1609703555 -288663979 -409936480 -674879784 -1843389881 -107154698 -1357713100 -2070322325 -229783934 -802981432 -921689876 -1042200121 -1380808715 -1543783523 -472248007 -2120177984 -635222417 -1041953282 -1527152936 -134846408 -768331671 -531225086 -1210499823 -1757937130 -569328484 -1664183203 -1100074293 -1261925428 -632170624 -1290075859 -1310062101 -63898816 -205577012 -1979136308 -969720173 -833550528 -1447894715 -1629270848 -591159439 -1357340251 -98816476 -803653001 -1471331824 -399770763 -1618365925 -1995712220 -388199047 -406063343 -3575635 -2113638976 -255780958 -1795783459 -997420475 -388574843 -279615774 -808093982 -948971846 -8769453 -1359308575 -968183239 -772104554 -1665043904 -533490471 -630119872 -1182825347 -489486750 -1941439240 -902774162 -953374679 -992739686 -1175449059 -1070265860 -635281748 -2039129399 -2103770167 -1894432561 -1135502305 -1847552893 -1355420678 -48807770 -2120920883 -236224028 -1667458940 -320811230 -1690388640 -1300706317 -1735027006 -2065930876 -1584628236 -1902056005 -413706793 -1765504612 -1054463285 -1329375951 -401745069 -440788515 -1661473102 -648563373 -1925101486 -1192049500 -901003637 -1260932062 -1116537438 -932612980 -2090699054 diff --git a/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvc b/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvc deleted file mode 100644 index b4341cf3..00000000 --- a/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvc +++ /dev/null @@ -1,23 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Nov 2018 -# -# Emulation of HBV simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -:BasinInitialConditions - :Attributes, ID, Q - :Units, none, m3/s - # HBV_PARA_??? - 1, 1.0 -:EndBasinInitialConditions - -#--------------------------------------------------------- -# Initial Lower groundwater storage - for each HRU - -:InitialConditions SOIL[2] - # HBV_PARA_??? - 0.50657 -:EndInitialConditions diff --git a/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvi b/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvi deleted file mode 120000 index 13174814..00000000 --- a/ravenpy/models/ostrich-hbv-ec/model/raven-hbv-ec.rvi +++ /dev/null @@ -1 +0,0 @@ -../../raven-hbv-ec/raven-hbv-ec.rvi \ No newline at end of file diff --git a/ravenpy/models/ostrich-hbv-ec/ostIn.txt b/ravenpy/models/ostrich-hbv-ec/ostIn.txt deleted file mode 100644 index bbdcf3c5..00000000 --- a/ravenpy/models/ostrich-hbv-ec/ostIn.txt +++ /dev/null @@ -1,93 +0,0 @@ -ProgramType {algorithm} -ObjectiveFunction GCOP -ModelExecutable ./ostrich-runs-raven.sh -PreserveBestModel ./save_best.sh -#OstrichWarmStart yes - -ModelSubdir processor_ - -BeginExtraDirs -model -#best -EndExtraDirs - -BeginFilePairs - raven-hbv-ec.rvp.tpl; raven-hbv-ec.rvp - raven-hbv-ec.rvh.tpl; raven-hbv-ec.rvh - raven-hbv-ec.rvt.tpl; raven-hbv-ec.rvt - #can be multiple (.rvh, .rvi) -EndFilePairs - -#Parameter/DV Specification -BeginParams - #parameter init. low high tx_in tx_ost tx_out # in HBV called - par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none TT - par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none CFMAX - par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none CFR - par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none CWH - par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none par_x5 = FC/par_x21 - par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none LP - par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none BETA - par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none PERC - par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none K1 - par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none K2 - par_x11 random {lowerBounds.par_x11} {upperBounds.par_x11} none none none MAXBAS - par_x12 random {lowerBounds.par_x12} {upperBounds.par_x12} none none none PCALT - par_x13 random {lowerBounds.par_x13} {upperBounds.par_x13} none none none TCALT - par_x14 random {lowerBounds.par_x14} {upperBounds.par_x14} none none none saturation at the wilting point - par_x15 random {lowerBounds.par_x15} {upperBounds.par_x15} none none none ALPHA - par_x16 random {lowerBounds.par_x16} {upperBounds.par_x16} none none none maximum interflow rate for capillary rise - par_x17 random {lowerBounds.par_x17} {upperBounds.par_x17} none none none thickness of top soil layer - par_x18 random {lowerBounds.par_x18} {upperBounds.par_x18} none none none melt correction factor (forest) - par_x19 random {lowerBounds.par_x19} {upperBounds.par_x19} none none none release from glacier as it melts - par_x20 random {lowerBounds.par_x20} {upperBounds.par_x20} none none none RFCF - par_x21 random {lowerBounds.par_x21} {upperBounds.par_x21} none none none SFCF -EndParams - -BeginTiedParams - # par_1_+_x15 = 1.0 + par_x15 - # Xtied = (c1 * X1) + c0 - # --> c0 = 1.0 - # --> c1 = 1.0 - # - par_1_+_x15 1 par_x15 linear 1.00 1.00 free - # - # par_half_x11 = par_x11 * 0.5 - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 0.5 - # - par_half_x11 1 par_x11 linear 0.5 0.0 free -EndTiedParams - -BeginResponseVars - #name filename keyword line col token - NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' -EndResponseVars - -BeginTiedRespVars - NegNS 1 NS wsum -1.00 -EndTiedRespVars - -BeginGCOP - CostFunction NegNS - PenaltyFunction APM -EndGCOP - -BeginConstraints - # not needed when no constraints, but PenaltyFunction statement above is required - # name type penalty lwr upr resp.var -EndConstraints - -# Randomsed control added -{random_seed} - -#Algorithm should be last in this file: - -BeginDDSAlg - PerturbationValue 0.20 - MaxIterations {max_iterations} - UseRandomParamValues - # UseInitialParamValues - # above intializes DDS to parameter values IN the initial model input files -EndDDSAlg diff --git a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvh.tpl b/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvh.tpl deleted file mode 100644 index acf66436..00000000 --- a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvh.tpl +++ /dev/null @@ -1,28 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Nov 2018 -# -# Emulation of HBV-EC simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, hbv, -1, NONE, _AUTO, 1 -:EndSubBasins - -:HRUs - :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT - :Units km2 m deg deg none none none none none none ratio deg - 1, 4250.6, 843.0, 54.4848, -123.3659, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [NONE], [NONE] -:EndHRUs - -:SubBasinProperties -# HBV_PARA_11, DERIVED FROM HBV_PARA_11, -# MAXBAS, MAXBAS/2, - :Parameters, TIME_CONC, TIME_TO_PEAK - :Units , d, d, - 1, par_x11, par_half_x11, -:EndSubBasinProperties \ No newline at end of file diff --git a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvp.tpl b/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvp.tpl deleted file mode 100644 index c8a64516..00000000 --- a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvp.tpl +++ /dev/null @@ -1,93 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Nov 2018 -# -# Emulation of HBV simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "para_x05" and "para_x15" wouldn't be detectable) -# para_1_+_x15 = 1.0 + par_x15 -# para_half_x11 = 0.5 * par_x11 - -#------------------------------------------------------------------------ -# Global parameters -# -# HBV_PARA_13=TCALT -:AdiabaticLapseRate par_x13 -# HBV_PARA_01, CONSTANT, -:RainSnowTransition par_x01 2.0 -# HBV_PARA_04, -:IrreducibleSnowSaturation par_x04 -# HBV_PARA_12=PCALT -:GlobalParameter PRECIP_LAPSE par_x12 - -#--------------------------------------------------------- -# Soil classes -:SoilClasses - :Attributes, - :Units, - TOPSOIL, 1.0, 0.0, 0 - SLOW_RES, 1.0, 0.0, 0 - FAST_RES, 1.0, 0.0, 0 -:EndSoilClasses - -:SoilParameterList - :Parameters, POROSITY,FIELD_CAPACITY, SAT_WILT, HBV_BETA, MAX_CAP_RISE_RATE,MAX_PERC_RATE,BASEFLOW_COEFF, BASEFLOW_N - :Units , none, none, none, none, mm/d, mm/d, 1/d, none - # HBV_PARA_05, HBV_PARA_06, HBV_PARA_14, HBV_PARA_07, HBV_PARA_16, CONSTANT, CONSTANT, CONSTANT, - [DEFAULT], par_x05, par_x06, par_x14, par_x07, par_x16, 0.0, 0.0, 0.0 - # CONSTANT, HBV_PARA_08, HBV_PARA_09, 1+HBV_PARA_15=1+ALPHA, - FAST_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, par_x08, par_x09, par_1_+_x15 - # CONSTANT, HBV_PARA_10, CONSTANT, - SLOW_RES, _DEFAULT, _DEFAULT, 0.0, _DEFAULT, _DEFAULT, _DEFAULT, par_x10, 1.0 -:EndSoilParameterList - -#--------------------------------------------------------- -# Soil profiles -# name, layers, (soilClass, thickness) x layers -# -:SoilProfiles -# HBV_PARA_17, CONSTANT, CONSTANT, - DEFAULT_P, 3, TOPSOIL, par_x17, FAST_RES, 100.0, SLOW_RES, 100.0 -:EndSoilProfiles - -#--------------------------------------------------------- -# Vegetation classes -# -:VegetationClasses - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND - :Units, m, none, mm_per_s - VEG_ALL, 25, 6.0, 5.3 -:EndVegetationClasses - -:VegetationParameterList - :Parameters, MAX_CAPACITY, MAX_SNOW_CAPACITY, TFRAIN, TFSNOW, - :Units, mm, mm, frac, frac, - VEG_ALL, 10000, 10000, 0.88, 0.88, -:EndVegetationParameterList - -#--------------------------------------------------------- -# LandUse classes -# -:LandUseClasses - :Attributes, IMPERM, FOREST_COV - :Units, frac, frac - LU_ALL, 0.0, 1 -:EndLandUseClasses - -:LandUseParameterList - :Parameters, MELT_FACTOR, MIN_MELT_FACTOR, HBV_MELT_FOR_CORR, REFREEZE_FACTOR, HBV_MELT_ASP_CORR - :Units , mm/d/K, mm/d/K, none, mm/d/K, none - # HBV_PARA_02, CONSTANT, HBV_PARA_18, HBV_PARA_03, CONSTANT - [DEFAULT], par_x02, 2.2, par_x18, par_x03, 0.48 -:EndLandUseParameterList - -:LandUseParameterList - :Parameters, HBV_MELT_GLACIER_CORR, HBV_GLACIER_KMIN, GLAC_STORAGE_COEFF, HBV_GLACIER_AG - :Units , none, 1/d, 1/d, 1/mm - # CONSTANT, CONSTANT, HBV_PARA_19, CONSTANT, - [DEFAULT], 1.64, 0.05, par_x19, 0.05 -:EndLandUseParameterList \ No newline at end of file diff --git a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvt.tpl b/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvt.tpl deleted file mode 120000 index d620d676..00000000 --- a/ravenpy/models/ostrich-hbv-ec/raven-hbv-ec.rvt.tpl +++ /dev/null @@ -1 +0,0 @@ -../global/global.rvt \ No newline at end of file diff --git a/ravenpy/models/ostrich-hmets/OstRandomNumbers.txt b/ravenpy/models/ostrich-hmets/OstRandomNumbers.txt deleted file mode 100644 index e9e16423..00000000 --- a/ravenpy/models/ostrich-hmets/OstRandomNumbers.txt +++ /dev/null @@ -1,16833 +0,0 @@ -16832 -2067261 -384717275 -2017463455 -888985702 -1138961335 -2001411634 -1688969677 -1074515293 -1188541828 -2077102449 -366694711 -1907424534 -448260522 -541959578 -1236480519 -328830814 -1184067167 -2033402667 -343865911 -475872100 -753283272 -1015853439 -953755623 -952814553 -168636592 -1744271351 -669331060 -927782434 -360607371 -529232563 -2081904114 -1611383427 -604985272 -1799881606 -1155500400 -800602979 -1749219598 -82656156 -1927577930 -2011454515 -828462531 -1833275016 -1905310403 -1423282804 -293742895 -2019415459 -1484062225 -1758739317 -1166783511 -1457288620 -598842305 -1634250293 -528829321 -1747066761 -407146696 -1031620330 -1807404079 -884168938 -1787987373 -965105540 -584824989 -120937804 -1082141766 -517654719 -766608236 -1630224099 -1580063467 -343911067 -1234808992 -152763936 -1260514187 -535763254 -174078107 -858017135 -341298340 -272379243 -1590285344 -344306046 -1430770104 -1578742469 -1764217798 -901816857 -2043818720 -1460293275 -1705955009 -931665166 -1193174685 -484635109 -2004287539 -632181131 -1466667008 -1455103190 -375542294 -284896725 -1518207912 -119683330 -1473033718 -1086215810 -270635523 -200870715 -189813921 -1189354452 -702488488 -2006410257 -1948964205 -673325744 -1494443365 -140900243 -1583405107 -672279725 -1093871208 -85890889 -459160639 -1204116002 -1839239933 -1225939013 -1398882173 -361714255 -1952762775 -91382324 -411911863 -1662887160 -792316062 -2057442634 -656665644 -661016775 -776031494 -1093131427 -537293504 -123186093 -214429343 -436408135 -1054870440 -1729979095 -977552932 -1482228574 -1005338018 -314733930 -480938949 -12468535 -1252753986 -1106567514 -871824778 -478120365 -2032651128 -597651820 -953121721 -1036241874 -24799148 -187452918 -162682677 -461069708 -1077583980 -1224356709 -574902609 -859221610 -1257556842 -223789720 -989958143 -1670696092 -1040533719 -1290877712 -1901903590 -2147035182 -1052583333 -1945277392 -986085416 -1006282813 -1161517966 -1006103332 -292464446 -2007359586 -724467532 -2041015481 -1590895636 -2011549102 -270702593 -1328116205 -704030517 -6004249 -2129165181 -1359187106 -1074137403 -1279795539 -327415621 -1021238533 -1266717307 -1712386038 -1643787219 -1902154725 -2072893833 -499445950 -1821989174 -1202724845 -2080384351 -1838530450 -39076467 -1775668534 -80808579 -940122349 -1599128664 -797613643 -899573327 -844032009 -1516486828 -1258195600 -221977191 -591554298 -1551284523 -1987503481 -2010359729 -1755747052 -267909537 -1629864247 -1974481844 -51555017 -1049260978 -1941031729 -496187726 -748109581 -2108458329 -1231476356 -2123209153 -40472272 -1612643052 -300666177 -267415448 -1915645012 -1170880860 -1601956559 -1081404674 -1014251357 -1944850860 -259813033 -843391280 -1485172760 -1096148239 -1848728907 -1793335153 -650930826 -912694764 -185208027 -1087505286 -468022185 -1963747981 -36145924 -1914156214 -1918456638 -1181238808 -1741813188 -157174812 -232179474 -262632919 -992575048 -555861840 -816080430 -2033217268 -1522832212 -530882138 -1889023728 -423559248 -1999474978 -1351846990 -115375670 -2088636096 -939171610 -652443820 -571781158 -2084085828 -1772228626 -248333292 -1176912523 -2044385191 -243553137 -293742377 -2010709433 -1190771239 -892107480 -2067076653 -1514349452 -1842539167 -841590029 -1276318261 -2014346391 -40098582 -1774486163 -1683535652 -2086653939 -1984797263 -1624110390 -1906171360 -861001574 -1108640732 -1356661352 -1573462865 -1076742897 -2120660257 -150850140 -1307599520 -1624972889 -1369806524 -1313553028 -753850436 -1958244199 -2023362318 -1246928381 -1979872041 -450282822 -171017326 -955078396 -1709823894 -1531505951 -281525515 -692856264 -1178895014 -1004373076 -1276822912 -1906081160 -1492493821 -1734652587 -68038037 -1053987655 -1925397129 -1865954107 -1386979208 -24560671 -474337273 -727249647 -1555382052 -2135196680 -1798859390 -1154985264 -732646815 -2071271454 -1149409508 -1510196191 -758158244 -1345129257 -1027070430 -499162424 -1351734986 -380408089 -459934704 -1328924575 -1405403225 -439369222 -1429735768 -1374526493 -1185177072 -1360223179 -1307547138 -744588615 -913641236 -1060177402 -729776255 -1070409768 -906459857 -621824781 -1353667965 -655731437 -2139668902 -1801566899 -1562932440 -185548976 -375384188 -1922576477 -1703896177 -688614094 -747704175 -1737250628 -783640184 -123365437 -1081180304 -1538232061 -1658106641 -2050511815 -134507649 -1517260099 -1369659415 -988575712 -2058498392 -1220921174 -815924333 -1557178636 -118129263 -1123633413 -2083064220 -1781932146 -126636760 -227731143 -661461447 -1807182857 -1461058078 -1675097148 -1994637913 -1659674121 -477860764 -1964504415 -2012113927 -1173781780 -965595118 -223227847 -136493220 -529013544 -548335428 -1021209119 -772356209 -1599642195 -838594572 -323796343 -321575303 -1647261669 -167693759 -930462649 -309824289 -1716464895 -1477660114 -1532642090 -49260865 -1146153960 -481292130 -1653414308 -495882376 -2058543072 -1971857934 -1048656234 -367033909 -1165874379 -1209892625 -142694932 -1681972072 -1577368643 -149160686 -830233553 -1534070712 -437790702 -669353892 -1311519858 -942100598 -487821255 -1866752186 -1915391079 -1197996223 -2063329336 -810218396 -146775945 -1552080859 -339137104 -455707790 -1154141328 -1580999992 -1051701213 -4388434 -741966240 -1936541198 -185760854 -1788934087 -1844142209 -2014113159 -415135652 -10534061 -952304173 -180614520 -1193844429 -1003604282 -1240604036 -913304329 -1840232394 -726361864 -1666798700 -2109059432 -596796242 -1605807804 -1384769979 -1548754514 -267831511 -318481265 -1185372531 -350335298 -1832677059 -445381692 -1549587649 -1385429574 -1897149444 -1700998299 -1376102429 -1902129660 -1651626378 -510913924 -1290699962 -1061942987 -339192292 -1383252506 -1814389567 -177665169 -1016226053 -773828180 -569255028 -429608211 -585181063 -1810506228 -1482379653 -1397039124 -1597844417 -688110784 -878507593 -1127042426 -1396287242 -1845865525 -913114113 -790755729 -1602729667 -1190128948 -834540878 -912837989 -444906955 -13133831 -1696965623 -170909954 -1297960839 -688934847 -1843632552 -2038242548 -83367292 -994738800 -414819705 -1142863773 -1017694043 -1824015993 -907733426 -551862494 -171065265 -1760789169 -1258907723 -1453210217 -772599788 -1398507154 -501220863 -1588180907 -1482255386 -1455967302 -2013770796 -1103491652 -715419672 -297487751 -534700841 -1645455639 -2026002254 -519176146 -567428061 -1936028547 -159570085 -1834827139 -74554253 -1050363970 -1151665450 -771107739 -2091443375 -876469529 -1233039130 -471464360 -1834324737 -220618427 -1377127867 -1956796950 -1321768492 -1392200476 -1879066067 -568875287 -489752165 -2107301851 -1121903433 -924577771 -186927505 -2069484621 -1182878335 -1380056066 -1778913662 -934583700 -852851742 -1573367716 -1625057301 -641035361 -2103338975 -1089839558 -1045426043 -1911788594 -780572944 -111870285 -1155688870 -1820734622 -1592305851 -2090712490 -1477387216 -1241012698 -1339235622 -756994747 -1117588001 -1409556145 -1518018958 -1238900746 -203396710 -1842022593 -749465399 -1273371338 -1877535411 -612943659 -265022154 -346258400 -2031729077 -133126192 -1921432417 -1803032580 -426829243 -1123706121 -1157583929 -1458736530 -1311545558 -1374040498 -1606993695 -1988687193 -430170843 -1451402499 -455054420 -910369973 -1914634983 -1375192633 -1643573817 -462990958 -1155778025 -1171679060 -2132402077 -2074607003 -1375406729 -946917995 -1996917695 -1321264549 -1512365063 -703167949 -541209402 -1513174369 -1420272009 -1230918858 -1343274855 -2072390721 -633577154 -1307305452 -977539307 -1253233199 -570765817 -51635170 -248908802 -112090858 -567891987 -1143298241 -1877346778 -1737556122 -1623110548 -134212395 -849893415 -1244889708 -2075633282 -1444208706 -1955543348 -1727316148 -1318559290 -1142233637 -1164416526 -330077371 -660114196 -638771770 -566387037 -1619407355 -171673407 -1244413528 -514926963 -18369731 -1649907396 -1684754508 -1097130261 -1173703485 -1797174700 -757687845 -2029067852 -503074204 -525028389 -141828400 -3070630 -68470882 -1886362629 -795624942 -1835213972 -133605543 -1387950086 -1309721688 -785028466 -1981384541 -101066558 -2113559176 -1062066005 -259272171 -343058234 -1933630290 -654253979 -930352413 -604571484 -1287797631 -1674589751 -2056751122 -1919325342 -749161407 -459145088 -942750345 -670700849 -327506040 -393427019 -225759220 -1879089938 -970075184 -357769464 -77169848 -2060996195 -251823255 -1850662195 -2073851864 -1568687438 -273036247 -1895133337 -28542655 -827549304 -1517054356 -59220461 -1033359466 -972291773 -1104758788 -537337954 -870257243 -2049847031 -1846384843 -1051357151 -664189341 -410257081 -1768253497 -10333246 -1872173762 -694022090 -1445579773 -1376746300 -1986251322 -292676239 -1271997243 -257957216 -1864929666 -1349068497 -661884053 -319987311 -727683889 -263752758 -486356298 -867540004 -1478367745 -540894425 -514323224 -608746593 -591894243 -822289197 -1157265534 -402439059 -1367260210 -1467326570 -1802943489 -1076960453 -1482156655 -1944079032 -172601719 -1814167783 -745108775 -1066035768 -407085855 -9065643 -2042406611 -1349297429 -214576883 -768629268 -1237970571 -1749814661 -1493945409 -361688339 -1517192563 -234581863 -1984879196 -853674674 -372000311 -884330560 -209401033 -1824947845 -1536984461 -17046264 -881233997 -1852557867 -1722156463 -499079375 -2103414090 -204813716 -2035322318 -395185563 -1864320817 -1853561589 -1411842941 -1297493684 -1427395350 -693826813 -311042881 -722504169 -1255028245 -675332881 -868656572 -917173298 -294001320 -2067797140 -738672579 -267071946 -437374192 -111521263 -1732127057 -571128267 -1848365026 -2120038127 -432129465 -10224101 -37773747 -1355689964 -279730278 -585079063 -96192228 -1795073452 -1949234708 -924702371 -133596058 -1228535691 -2091576379 -964384110 -1344652861 -1610217446 -335695428 -593517727 -190897374 -71596200 -726491080 -1691048365 -1651286157 -1235270518 -1467180477 -1495042085 -1613652695 -89866902 -712018073 -1108871827 -945707723 -983229014 -243374633 -1588592943 -1964893497 -2108964160 -1143043385 -1888949280 -1319795359 -442008850 -696806977 -1006535348 -1110906417 -781323501 -1989063549 -313135194 -1528270408 -1736329136 -328509669 -81550446 -523779136 -620469699 -53641261 -1753025534 -1771996745 -646076619 -932416301 -932598748 -1851501830 -1153211780 -990472285 -1721946098 -1258442114 -70170695 -390348662 -27420649 -1297347285 -1114351004 -692438741 -604036894 -892878089 -2133800234 -1951111585 -257119405 -668742071 -1766062546 -1841725435 -50098187 -186639285 -1520338375 -1566636619 -164659666 -1476069126 -562710538 -2105514425 -1145405709 -790339455 -1048863490 -1702901854 -1156896609 -644367525 -124960854 -2125550059 -729373768 -748261700 -370155068 -2083586164 -1964310366 -898216031 -1654278254 -2131320916 -1083403252 -244613451 -934570599 -632663235 -979454348 -1227072581 -1123406726 -420619458 -1982548329 -333498651 -179508687 -1935462021 -1375385838 -595802958 -2091552792 -567957401 -95227692 -616502429 -2095211075 -1923177666 -1070661465 -841764042 -2053471105 -479170798 -359925736 -1957895000 -449342019 -1538810481 -642193346 -90756400 -629425430 -248756888 -1853839554 -1788633402 -1085496708 -1069590091 -15050400 -1696486101 -701518288 -732644386 -2030447251 -64313080 -725661119 -626795720 -1148377505 -1345190946 -2063877453 -1432486227 -356850672 -1814901880 -198175172 -2130462954 -1696021447 -1482013098 -1678800180 -1954470974 -883795506 -1954166690 -64661612 -140987502 -902483473 -362731950 -1877293464 -841507724 -2040501773 -1546939868 -1981330894 -1346905076 -808489305 -1150714566 -1969469527 -1708889078 -852438968 -1078326039 -811240440 -144400277 -278934429 -94146802 -1777337022 -205798984 -1414852418 -338166095 -1315828703 -346414515 -360586588 -179932682 -471611398 -10625109 -335064262 -722929000 -1952711921 -1384162793 -2081197647 -475210793 -376114758 -1316364585 -763048701 -1934661470 -805427063 -1223220800 -811032869 -950721774 -1502521938 -626006893 -775463998 -145160743 -175184609 -127643426 -2114381076 -1990837423 -61864454 -373793230 -953149135 -1496988972 -2122727799 -540290182 -1096229358 -1064612293 -105061647 -539543295 -1428201431 -1356728298 -551140640 -923766969 -1592163820 -1851081120 -524789751 -426006828 -186279098 -1909126407 -1134352622 -1852183535 -1873209480 -921465340 -1563390863 -1447813396 -262542415 -1618957967 -1208743879 -163073733 -591096959 -307238891 -1213353649 -330066831 -482968416 -1909465699 -394382325 -1249201633 -1531712759 -1609863924 -836502115 -1663093543 -2113511496 -260708245 -856833835 -1928411710 -992409446 -2067556320 -986178133 -417093785 -708620687 -1991063794 -1718998204 -1105311537 -1237455809 -1688144315 -87558041 -561696892 -101551632 -1676263306 -119418949 -1324549545 -888718013 -934879606 -1531176590 -1188406129 -1943893003 -1340979610 -3430005 -1813519213 -582011020 -71201055 -527740006 -618818732 -223126303 -577326859 -801402067 -147106085 -658292898 -92987342 -1617645625 -627048355 -1099446656 -1450648604 -669243037 -1595863520 -1754913257 -1286702501 -448609017 -2104147749 -1798002294 -1782158321 -1780476338 -1428675468 -733933569 -75425815 -666320975 -1876891367 -525914386 -394450 -187070209 -172943455 -1115273794 -1169384742 -79021450 -968616304 -1608177068 -402800734 -1003480994 -1315986267 -847109016 -1692135949 -602957622 -2080906408 -2022807861 -518104170 -1878080252 -1180151758 -651633014 -1976950245 -735781331 -1065990691 -1796960363 -1450293180 -1138082810 -120943841 -1183605625 -718717214 -2032184970 -1352868902 -110781478 -35978797 -1252736372 -810529016 -1072398991 -2127076113 -607959582 -249502248 -1496203192 -1801025221 -1048884882 -2062437198 -848440559 -449059033 -1077632073 -2032655760 -675501844 -1560934066 -958615510 -1028556776 -1857859529 -632876523 -269218470 -6781061 -152658936 -1643262834 -1678750618 -1121482440 -291399361 -1286345167 -885347420 -119897877 -783957853 -1167461026 -2106864990 -222031547 -1505115590 -1267843117 -1306521885 -693030620 -1961812659 -1868927422 -1967360532 -622748465 -1845639424 -1408001900 -1165627007 -1347278715 -645789037 -393992921 -1146939546 -799734150 -31712477 -415656483 -174206090 -861543769 -1631377509 -1638072514 -344388258 -665023541 -1545754599 -1387867634 -2071434571 -1743433280 -1616257292 -915655741 -558224585 -1872029999 -425280996 -872122556 -1187907917 -12894860 -1975547320 -779140973 -1814537452 -515684717 -2016522974 -114707064 -1588793289 -1037141425 -111167276 -77634842 -1286215765 -857971653 -1724366013 -1127764226 -642677960 -1793212957 -744666301 -71826191 -296982523 -633268433 -413598899 -2099613801 -757865903 -726721364 -1266464259 -1754375596 -840168662 -1009723209 -1002195069 -1178281262 -1426461447 -30104621 -1309708102 -556688564 -1825928816 -844294882 -1639626045 -684780011 -732780604 -24895883 -1813278063 -823970264 -1493671192 -47890514 -1736984820 -611172422 -560612953 -1211141682 -1808243108 -2100827459 -1828463086 -488097832 -72730884 -469772245 -1312235343 -82355111 -1162881909 -307573216 -389902983 -1126828284 -2092169942 -202979216 -1267651876 -239818045 -1942560543 -421160860 -344473508 -2097820291 -679114391 -2147469379 -1907681371 -469952687 -49956743 -2104357271 -1024471254 -1911967979 -1648012992 -2057761185 -1715585007 -1721768027 -413086464 -2077053344 -1688870623 -1557198362 -449664145 -510331222 -87162036 -348491798 -913743617 -633411222 -665969975 -272601661 -1033497376 -1142661496 -1912991798 -1675469749 -1814491979 -1898903653 -1119217904 -886048455 -1164774887 -2058083404 -688668799 -1667131110 -1253423361 -1619334904 -1101473097 -1149304139 -1886743055 -746993783 -535110519 -2088462844 -174808893 -255435555 -285562532 -1971007926 -1794957307 -2144669340 -2092066132 -605728193 -1401252971 -1553010595 -932824527 -1351202189 -15623498 -591125952 -794524242 -515618248 -899378491 -1864390651 -879777980 -1003600265 -1173090317 -81594712 -1267757798 -2020049099 -1396231470 -908505521 -643561277 -1606736247 -1956725951 -128488299 -1281776058 -1401743749 -1211581853 -616262517 -210493738 -862687957 -1534392402 -1549467238 -1509165544 -615943291 -1287713297 -257188213 -1825198127 -1448506741 -1178173595 -1764385825 -1578362999 -1828916449 -1665318832 -859238073 -1534250483 -1311718252 -2129024909 -1149119249 -926780472 -700501213 -818534037 -321317177 -1603905281 -1621320623 -115713978 -1332127711 -1553418802 -1351108635 -590745067 -835440988 -1008601230 -1472446839 -1959958692 -774075111 -424457051 -2056464470 -1396532472 -1672478841 -938425104 -990819360 -1112784682 -137068651 -1610347773 -378617670 -433133629 -1854822920 -1136196588 -631465392 -174659870 -2045773288 -2098462946 -742798741 -895999976 -916263868 -41596839 -1185887798 -420493179 -2007660823 -1492390497 -2145569766 -45656738 -701133587 -709425620 -487187196 -1947540808 -372612482 -435670322 -1539349231 -1107030008 -55026848 -1418266126 -1877781629 -456162291 -203005047 -1701793493 -1856026105 -2030774060 -1262024649 -152294324 -1957679891 -1128972350 -1620265205 -1704656475 -582040698 -569999201 -52021940 -306901251 -1981089110 -1578208682 -1382794277 -555385705 -1403614073 -433862616 -1222005547 -1861112168 -1612889021 -139699866 -736021691 -810753917 -557342804 -2084322261 -1450990763 -2124942056 -1248085582 -2101596425 -1867572766 -674493610 -1795414404 -1237164031 -1079198763 -446727179 -540867541 -62483836 -46328269 -1250136869 -70355035 -1341067395 -1478832500 -1909580769 -180880168 -1363623071 -467473513 -1332152265 -1966097880 -876192771 -876534718 -181187006 -78198396 -20449608 -99178136 -439621680 -1377830080 -873988959 -344288433 -1134748413 -2061791931 -740856325 -462068969 -692294431 -326102371 -424282253 -1266118131 -231969594 -1030147053 -668357657 -1747667389 -1911966904 -1629945467 -1192062737 -1123477896 -1616773648 -1004116445 -1258592989 -458443173 -2030566822 -2073942877 -950859282 -1666135247 -1695823096 -295811488 -279036011 -1801435476 -1501589726 -2138188985 -550921997 -1544001362 -1985984433 -102040110 -1296178464 -797329280 -415251680 -1960616657 -1095074631 -984468427 -1746836101 -825411370 -2092019617 -1971434235 -369998082 -1592606109 -694697755 -2064063193 -259251113 -2136620075 -2099539038 -1648807809 -383864975 -577759237 -1625928172 -245378729 -911696063 -579909496 -1258109186 -917100740 -1222002661 -1812607166 -285622620 -833423295 -1456973331 -1742231023 -737276716 -429122622 -1013821328 -1159804398 -123453367 -411536167 -1791015429 -318035204 -130876245 -613795187 -1691751368 -581755696 -74937881 -1055548825 -246693908 -1541073046 -14417655 -1799359121 -964029593 -1828736583 -789794617 -481705812 -16233094 -99187689 -600178951 -476939498 -1513172282 -1385195800 -115593473 -1454283823 -1636826654 -880055708 -1376407467 -586452385 -1702778612 -1233051962 -687131784 -1604323769 -64913851 -85401081 -816892171 -643762726 -697522296 -143999899 -2139715971 -445171935 -171685397 -1445929458 -811451154 -1538386828 -2111791963 -1425288172 -1785708166 -1313179137 -912315340 -250679800 -1959966833 -910900898 -100473223 -731312419 -1118914352 -79217285 -2112531502 -969818263 -334665511 -463571884 -181983072 -572777776 -1654375378 -1616200337 -2105896703 -1127901114 -795870929 -1674550187 -1391798974 -1573472894 -1245300300 -386518438 -77355291 -882769402 -1888305938 -1244564600 -906510420 -1471637122 -1235946955 -2098638901 -1552590779 -319427956 -2064022639 -1725143682 -1313145227 -342389970 -1439535477 -721994837 -1284619909 -1953707272 -933157874 -511314277 -1576981892 -91487570 -33297738 -1289334346 -1732354992 -107064518 -1989541487 -1903388219 -1329391021 -655026559 -1030202591 -1601784823 -342521369 -1500474823 -579883440 -820185994 -168471065 -1109742709 -550235968 -751330194 -402726198 -1898238089 -670501991 -1280266928 -1807599603 -2022857159 -1346655656 -911454659 -817599762 -1798826428 -600992930 -1272582669 -1507277410 -1094329858 -1351970498 -43690979 -2022360426 -1587998713 -567604475 -606051351 -390118536 -454660261 -728190601 -190126754 -4687742 -1477468502 -459702853 -1727172112 -1045229885 -762444735 -373739496 -50041797 -1386376202 -627257064 -312251525 -1708831054 -2024713247 -329671967 -288940109 -755886096 -1811843467 -335035409 -237996629 -1394792889 -352594771 -1152934124 -618875187 -1171965488 -503946532 -153859556 -347246704 -1462285229 -824987535 -1411075713 -1287594570 -409227171 -1638425303 -1978745687 -847003967 -2074061053 -789559667 -827868456 -438591079 -1236388249 -925532571 -1201865576 -523552150 -1100483291 -1693503873 -2118819820 -1430880186 -1281406996 -1641369656 -2072362677 -162241646 -1638596279 -557372025 -427955961 -733102724 -1143799429 -1710878906 -2083223459 -163294725 -10342209 -2022814903 -636459064 -351442941 -1121480137 -252692840 -1433391761 -543775081 -1684868382 -863526932 -602659698 -1368665034 -1455883421 -603982829 -2131691281 -865676866 -229378437 -430244294 -538409809 -1705055052 -838473396 -434674958 -1990135659 -1152218788 -1481124917 -1783527642 -1172334268 -259581051 -1239437100 -627963800 -1452945242 -614132257 -914435917 -1531479087 -1977505914 -1484975626 -2077884395 -623959251 -720483256 -1649281806 -1907881613 -1687936334 -886988668 -1934549249 -1066812363 -574416138 -1273038101 -571788446 -59091597 -1015025865 -2077104934 -408460106 -1631265730 -1906886508 -2143075775 -1078822941 -572737766 -981927308 -1987922008 -454608430 -2004550631 -759001081 -478305187 -843987188 -763180281 -1998642883 -251728207 -253190459 -1206939706 -2052592827 -750337981 -906471483 -817222963 -1908416576 -2089124887 -564347359 -1698277561 -745815450 -58220611 -1408749692 -848865269 -1144709062 -1966695208 -178066232 -1314440953 -644820382 -1293677512 -1713501956 -1071668222 -582459765 -1170807329 -366121042 -855704239 -123160914 -1938729537 -457952428 -225066548 -974769869 -1951928967 -1109956797 -2000929337 -25454939 -471914020 -801825769 -825814658 -280146445 -1137146891 -1570822384 -1795335317 -2055432469 -1231560841 -1395664901 -2123598573 -143003271 -421774704 -2071415028 -1414974079 -235438875 -1356294351 -1847727999 -3459926 -168917813 -28301757 -1073743912 -1108843243 -465296435 -1249224318 -1912979554 -1469684841 -636214893 -542628238 -1737230904 -452138916 -1301618126 -2027415340 -646592431 -1011733997 -437770633 -332054209 -1672575757 -419808669 -1240519488 -1639789740 -1288518229 -900778455 -1771265482 -1240641260 -1538928097 -471481811 -2127623694 -1221218861 -1524182448 -1749462120 -2011239763 -1514092961 -1826662224 -285781256 -1352134900 -659311746 -36896502 -1644218778 -565432250 -604687775 -1094816821 -946423051 -120844828 -1666977781 -823906505 -422073679 -653836912 -363158285 -452771221 -1191350026 -2029846001 -696522565 -521390158 -1271105746 -306952666 -697737368 -1611231356 -196611622 -1621681868 -1892191399 -2122998217 -790238214 -1494789650 -1665944944 -644884222 -219152745 -365730610 -736164556 -1064402325 -871096765 -1127307756 -1560721258 -1676918748 -398014408 -16594851 -1884270294 -2136972596 -1581908544 -1289349148 -1981132206 -155039507 -851330338 -1772934452 -1373732639 -727774776 -1791290567 -647312276 -225267030 -49303549 -1863543948 -1681626188 -59063549 -543623129 -1278494765 -2087627120 -1161181154 -1787754989 -1354394946 -2136682869 -1007434149 -1184669295 -1415949728 -1600786089 -736668207 -939330094 -1168600761 -1935038312 -696559616 -1144106315 -426260967 -162625977 -1655596455 -664005006 -1607106030 -1729217891 -1068899186 -1287911947 -1448415116 -1785715867 -1442609844 -853273478 -71550080 -2098835887 -568367187 -540050053 -1355348549 -984019314 -641044851 -115353758 -1720361112 -389386176 -1030787623 -696999412 -2093306746 -2129374868 -588429221 -567722912 -449138363 -263447736 -1802302485 -1041024460 -948827111 -1871175602 -1097816146 -1963954445 -1358702725 -1523080524 -409294628 -624691455 -141734002 -564007091 -274360579 -530861144 -1536177570 -1488014756 -1616934777 -1564727901 -297090945 -308033340 -1680756110 -468048132 -252355563 -59744516 -1251217263 -1048667817 -561709390 -311605518 -1588809640 -1311952682 -1774122625 -2016003427 -2120098870 -1453037066 -9934578 -1614211627 -893902438 -22681054 -1095869059 -1451517941 -247804467 -878885336 -1033318086 -276818113 -1032445789 -648507963 -993825616 -99321746 -705791303 -1682247140 -1905469225 -1945120511 -496870096 -1479283936 -906931033 -2098428872 -170117023 -856071404 -1999135775 -2093313110 -88850969 -817101318 -2011412708 -125812282 -1403114926 -634633575 -1882704023 -1582459663 -1962071593 -1925863866 -1120468278 -426247803 -2088862276 -445611576 -1118280743 -167569057 -982079782 -255585232 -653700224 -213326716 -1231908969 -804201256 -2095919021 -936724206 -321114085 -338021684 -1036196673 -1412589588 -961487931 -2060696289 -1653754054 -1911026104 -850305396 -1726603434 -77393327 -1522040454 -108707314 -1682726448 -1371264193 -42792147 -1948076531 -786574355 -45853553 -1861519645 -2018904019 -1478224733 -284775388 -1626380600 -1406885184 -1724334018 -590024261 -1605756428 -521293547 -1794848316 -312857603 -1157765765 -219886888 -1967053776 -1909551314 -1833313630 -406812254 -1853104577 -173293198 -550953454 -2072699161 -1522560940 -266580928 -774769254 -1353500217 -2131358095 -1708270705 -1196862192 -183539495 -961775373 -449283042 -547584042 -1277566499 -1518645987 -1039958914 -220064665 -659984521 -606807692 -217039841 -1361375081 -1340211229 -2121636067 -1518903281 -1069331878 -2117715450 -49602772 -450133968 -1964195442 -1114172010 -1979053877 -1731786003 -1281484630 -798680647 -1652840379 -1587275908 -1304322722 -238920078 -1882814703 -1295174776 -1108214240 -631061249 -1972163057 -1881891201 -806262191 -226831567 -574673144 -1297570649 -573462458 -276923870 -662420041 -738403039 -31880460 -1091463117 -415294745 -536926465 -396812561 -1291988792 -1248472327 -11685052 -969657087 -1920747773 -1033639107 -1377250766 -1874876796 -1026757941 -1689610742 -1111476513 -1772992385 -199928923 -1540984953 -681322251 -600266753 -1952627712 -2116345777 -651828778 -972188499 -1516516317 -1753817223 -45528239 -688934541 -1838489610 -1500162234 -1768651058 -249690032 -357321586 -1139618890 -168036637 -250762254 -1198287564 -517446582 -1563416971 -1886610552 -667499509 -209675835 -1094118 -1208972050 -1850460083 -824439127 -783917045 -481600970 -401637247 -776107808 -228257178 -912597104 -691320054 -1129617308 -1722656076 -306140478 -2079679181 -724156495 -1108383916 -1335322134 -1554994988 -2072262973 -634000165 -1974400388 -830007672 -2032656039 -680190997 -914633598 -558936360 -949930542 -1089187596 -825318944 -538615835 -872766740 -1277290170 -1169351778 -1672479149 -943601660 -2093850172 -525317415 -704521088 -1808580105 -1322285097 -1484846123 -2048811121 -1615714649 -385389428 -429437044 -2003344588 -1963872850 -2134819207 -1897121620 -1233360331 -1574922273 -1982693036 -618105553 -1121628732 -602645358 -1127652654 -914971003 -1934734901 -2039581880 -1118683746 -498389537 -1246725059 -710122834 -1467844659 -1920530724 -1680663858 -1065052415 -1059741160 -1987791549 -409467664 -1385423860 -1801114246 -397644410 -240489406 -341222988 -1153421826 -225748113 -1692414589 -991092808 -1413657924 -1737141907 -1103849984 -295454655 -724194721 -1750848298 -1686413292 -1059025538 -697750830 -1837487190 -1832358470 -1533307310 -492195170 -217213946 -2140074169 -22954780 -1401414647 -2122815480 -2013944749 -1879636076 -1559081962 -2042558287 -1751032314 -484202910 -1182769887 -1704854177 -1757334565 -1179436764 -1519630738 -410799795 -152229460 -867510643 -984897418 -366953250 -1957722213 -1840278204 -1496290534 -1121498568 -562462657 -86862105 -1750002422 -354677242 -1793285869 -1970098285 -1539006549 -1790024575 -844621202 -681635344 -1567453510 -1009244821 -1551862541 -964833772 -312187507 -632880528 -336530505 -1743754984 -580685479 -1415153585 -1104912570 -974468381 -1179787445 -971075364 -2135409195 -1075631701 -624658261 -1731326091 -2141678234 -1212671471 -1749603067 -85168698 -1206198384 -330612208 -1059185067 -1231471086 -2034636263 -1749561060 -1526640696 -115563316 -947435124 -2098370210 -1331668436 -276834818 -1313206724 -1375970049 -1824702647 -1710908969 -441008653 -1066365174 -1648445203 -731996874 -1885131302 -1575548523 -1770658551 -1777370178 -763051876 -1988023695 -16178192 -1323933422 -1270956987 -2101727447 -1922175873 -1413395690 -1624742363 -1790323336 -1570930035 -1457142027 -282537401 -519755090 -1707805281 -1964415612 -519601906 -1280725440 -923876199 -1280508783 -1577489294 -29458396 -1186022762 -541349480 -1719981668 -454521809 -548711484 -899131370 -2005995298 -1417199233 -1126380154 -1002899973 -140700908 -380665409 -489744650 -1980997246 -34250434 -121426842 -711468844 -467914612 -155768570 -219790297 -343648839 -1122510290 -386605135 -1534471770 -735921567 -1275453496 -365142918 -1596243347 -1696214705 -435133010 -1098681035 -1467758339 -469750484 -946498216 -1384142983 -1748250977 -982912185 -1360880571 -1618916247 -507555839 -685940189 -904539427 -557412476 -1107815918 -378914336 -1124231797 -1402685873 -2013474392 -416796918 -14144312 -1500250614 -1106570071 -914800277 -1212826666 -62998138 -100267395 -1566928517 -775622058 -654191516 -2028020419 -78736949 -481975291 -250399353 -1541461398 -98998778 -1720119068 -616319962 -1175971853 -1266930030 -992654205 -1886253539 -1109632959 -853151365 -166680536 -1081092864 -68627981 -231758228 -1772685985 -1492715064 -1158116394 -1817941197 -1887852110 -59528345 -1912998560 -1789118683 -651679887 -617261109 -1961443953 -2114536621 -310114944 -159052539 -1726366105 -383572118 -2098162579 -2136981513 -1731776563 -1122826550 -1407019661 -1837005310 -175852251 -611284285 -293210747 -1665538611 -258096432 -2057249331 -1702789417 -1414651597 -1257934842 -134384779 -1599667656 -1266517599 -503377329 -1324682970 -983708341 -1856972581 -758327016 -2034196614 -802831258 -545199105 -1996119633 -793138397 -846041450 -929423363 -22413663 -896795816 -1407044866 -113142098 -1056213491 -680317135 -887151317 -373223698 -2118443046 -1540890509 -1241485590 -697196878 -1117150514 -499163077 -1362709957 -153152044 -1340994402 -252039149 -1184225359 -397168317 -828728943 -2015894206 -284421523 -2121422486 -76731061 -1128754027 -98394191 -148759947 -537464121 -843262365 -1465982002 -679625583 -1655088 -2047260252 -1320063130 -647468753 -707692322 -1420418768 -1550013724 -2104021158 -1817871004 -708118359 -2138371686 -1474094057 -1727464207 -1659503256 -1901100003 -1526050355 -931120364 -626622059 -377140725 -1379922778 -1686225893 -56894192 -590462029 -373388616 -595252578 -1431250720 -1066520993 -2119811489 -917991893 -1167225603 -297594276 -177582869 -1780493600 -1718797902 -2033803117 -631778120 -1135712072 -1078139568 -1972189637 -181137614 -1395550699 -204205559 -403962207 -1197004882 -434246678 -1234484640 -1143830813 -90866147 -326459612 -2133464446 -602489963 -663412536 -239397328 -1314020865 -26852307 -335157879 -148866272 -176984749 -317825348 -898793747 -626532831 -1024969376 -1693969845 -1360476636 -1272431643 -1116467075 -1897505686 -1245906652 -1987541914 -508819513 -449672637 -653056266 -127742845 -1637832562 -606482288 -1190425754 -1527992026 -1352530156 -859928397 -251624069 -650426740 -1030455950 -1565022242 -949112838 -230938350 -877898321 -1624426157 -770816388 -1489674412 -1593485758 -446572969 -96543718 -1260114941 -268086673 -312021705 -2141213608 -1993636877 -2015131245 -346237878 -1686815823 -1381913114 -778064693 -905368668 -1609564081 -92008108 -192045316 -37704571 -193048932 -1873093154 -1113857905 -994858436 -278058310 -401600298 -155105965 -1968289944 -1210990420 -1413466321 -664353933 -1029071178 -1913479355 -1279905660 -30735621 -1177506867 -1296106564 -1736389627 -1345181906 -1911942173 -1214291550 -1060983409 -1391434022 -1882175571 -1290701487 -1087573662 -1617217617 -2023452487 -614915117 -1187062055 -828877755 -222010196 -1146269333 -272882494 -1458490313 -1468343733 -1718532854 -1874108675 -1001850176 -1824115552 -433537892 -59336573 -837370203 -1220663030 -772265419 -73734665 -160450336 -1596820167 -653410210 -1781512359 -1661211239 -542399226 -35709867 -1027797156 -1975828071 -1202755736 -452085741 -407905901 -906676883 -2121897116 -1611386530 -657137393 -2147251277 -389524704 -1211544072 -2128760897 -1006836859 -1883434500 -974684720 -520829724 -441826096 -1920227793 -884269835 -1336279605 -467340909 -1250960484 -1027950458 -257407491 -1215636179 -37842895 -370376753 -1514478665 -1866738411 -1683874654 -1341809612 -1068371737 -1013011192 -428750528 -1202488411 -254121760 -1826930084 -492736982 -733513642 -1607647314 -89159844 -1713396149 -1440853620 -1401187768 -457143774 -1666404299 -1922812766 -1380238106 -543492648 -1232984245 -1696495812 -864731065 -1513170206 -1350304468 -2107495827 -87090771 -1298224590 -826830610 -175382533 -1306668447 -1008814507 -762026084 -1927406727 -1281529341 -1550138424 -2052370411 -1307159563 -673066531 -1432817768 -1634092965 -32101272 -507683107 -677449818 -2088278379 -1369472932 -1839578 -853016388 -45605744 -1991561076 -1486882190 -1909250838 -1078180792 -517557758 -1284468356 -1554039648 -1048249122 -2114637113 -1999083988 -1222929001 -201734370 -1820361624 -1765779406 -1377958749 -889045195 -2138860186 -1094378969 -29895428 -2088768645 -1019439006 -1086838076 -2139125597 -1260174352 -1266607350 -2011822386 -568819487 -1699405212 -370892984 -1600838494 -1617439042 -1449975168 -88222420 -990496510 -2129095673 -190966150 -1227514432 -2107145542 -642301717 -1912147797 -375246824 -1761383376 -508326537 -754159593 -711794957 -1653928509 -548123995 -1762621982 -1998224756 -1814202306 -1325336836 -1235815968 -2044624039 -2110387826 -1448277730 -1624153012 -475035667 -1727739370 -1989200503 -467437425 -725621249 -2104184277 -264444743 -1379129958 -1246202035 -509593054 -565674342 -378560725 -1623542661 -954284645 -1254152719 -992752928 -1398007353 -691000044 -46176532 -847376757 -1897091642 -729520085 -1059927872 -830892839 -1877272279 -485451429 -691792250 -475880892 -901050416 -2047146715 -1559330418 -1923390985 -360946604 -1935754300 -1992751697 -22812867 -1163766503 -142559045 -1545602910 -985914258 -277113954 -1709678182 -1230008014 -1067105276 -1202437635 -1548213175 -1906965173 -1317714783 -1980990017 -2060236278 -364800118 -129771041 -1365984382 -1499321844 -529118210 -159973243 -20769057 -1173190185 -1760076188 -13254291 -1574053196 -261017779 -1764204479 -677964424 -2147326833 -1659394396 -71489983 -1088785608 -511557569 -1371023242 -288095984 -1601062750 -1091542340 -1746795706 -146492605 -1084952773 -517609134 -461141 -1307945846 -1003223030 -1275352613 -817085984 -1753694170 -124860115 -432429686 -761071154 -910283746 -465417794 -1141421384 -397782237 -409464148 -1326330448 -755583676 -1024037821 -1069710489 -2038579586 -1452997664 -1495188811 -1932192930 -118864576 -597137122 -892527023 -528401266 -995197317 -1678663983 -1812891642 -771843458 -1571770726 -554250135 -1645441906 -1795191723 -1789531758 -1151780471 -556782039 -1249479494 -1906755292 -2085212110 -1374297377 -1629391754 -475742934 -729873957 -565003635 -1990890058 -946500899 -1429236164 -1567616653 -1603705575 -412345528 -361560227 -1511497826 -1159901219 -1750723914 -1743375051 -637602489 -241634093 -252624574 -286045099 -1491576907 -1356464518 -412757474 -842685708 -364042391 -279555234 -1938081849 -309678447 -1412782048 -2048679504 -1551111377 -1224922306 -1490956800 -1671744404 -1479644327 -521571629 -26121549 -938210055 -1671458111 -962885170 -1921772045 -1068709435 -246250537 -531787590 -2074569963 -752875449 -604023219 -663042364 -460367465 -12404114 -170030239 -1544976363 -1192957064 -1122046256 -1177520285 -1521622890 -1680643754 -727164487 -124097932 -507321887 -1048876219 -1916838157 -1896716052 -859429896 -463252350 -1254026075 -1011730867 -385164723 -947787403 -1576672422 -1332676221 -34808137 -904806575 -752401618 -1230280190 -1346600014 -2123763212 -762607297 -958435383 -148645934 -768731277 -804952187 -1831914456 -513214953 -1309388719 -1631269424 -1968971566 -1929593139 -1521333826 -1117312400 -1072497432 -1634090353 -2135685035 -1416707287 -1448178320 -2100852789 -106700749 -170643198 -1109560041 -1775102186 -1299615978 -589568609 -390064205 -1689002791 -1631062291 -635170882 -175804537 -1956838734 -2024032180 -1767880780 -188529568 -1078070051 -803817418 -2087204696 -503951927 -244533321 -1735309336 -368600245 -1721479767 -2010751585 -1899219903 -2139464360 -511313152 -1558074017 -134412201 -2060549210 -1329280948 -952513295 -1547844327 -2704131 -351173130 -881733954 -1665400578 -85659448 -864299046 -694677814 -1728914806 -269916885 -1007623731 -76006675 -1838900407 -1961976472 -327165219 -1107699413 -568298448 -1532237327 -1836343712 -1941276547 -315876558 -357734922 -1644106101 -819153558 -2143672036 -362763333 -257263898 -949752275 -240537774 -1154143964 -1625303244 -479632068 -1670039685 -745719505 -593156643 -564609527 -1809567843 -743328487 -1209506410 -94030368 -1967914431 -1342194370 -1092548502 -1477491264 -842263787 -1862750732 -1234946758 -320713451 -47016987 -2088002060 -1020346793 -1311628656 -623184937 -591489740 -466258217 -234025216 -1219247655 -606377911 -1583645162 -411916816 -1746132231 -1880370162 -1011963482 -2147241381 -223202632 -1860188362 -1118867108 -1432671024 -1315250204 -1361000057 -1479633802 -344677954 -1238976919 -1483636321 -1043021730 -157205649 -750456933 -758214100 -136417402 -1402224065 -694318277 -2128627388 -910434743 -855740726 -736397923 -691634200 -2114501836 -1872967096 -1142684746 -156270901 -72532826 -1435978733 -1073340545 -771905015 -458875578 -708063069 -1209112656 -2066141478 -829248756 -14973062 -396666335 -981852057 -723178451 -1850267584 -1884075728 -1014385481 -2051589281 -1063609535 -431577117 -1464329500 -823311880 -1165629539 -1389834039 -761065054 -807761046 -1795767435 -728105107 -900712743 -666843898 -2075723640 -815371965 -863464248 -1696613357 -692826233 -674163997 -550576007 -23914726 -355357893 -348085344 -524922180 -504257384 -1083381826 -2031990316 -228802771 -1492444067 -898437109 -1074968906 -222480931 -467977890 -1219281916 -1182202538 -759354122 -2116897980 -1342770011 -29928554 -498033680 -1708287401 -1477471864 -516207987 -73703629 -1786311931 -723239257 -724750379 -352374069 -1738562904 -1364226446 -2018462550 -500906191 -594455897 -926335035 -1803976142 -1252890248 -1249239301 -17315188 -1106072371 -1139890965 -445833868 -559375093 -1881265132 -1021338743 -803463130 -427653574 -2093335356 -462739491 -1224339450 -284830596 -406777809 -1274187462 -561745950 -926069438 -1635054657 -1162873187 -160982562 -1952007961 -290125308 -1348172866 -641399365 -1778703262 -1693358194 -1817876514 -800724929 -1651349601 -154090179 -2075843818 -687719964 -752446794 -1989553222 -2100618364 -461687068 -716135265 -1587041067 -1652317329 -1386309146 -1647730519 -1605204768 -1986962162 -1502345884 -1962034609 -1304273778 -1563801917 -1913947033 -550235218 -738724944 -1147170501 -386427541 -697133059 -44544581 -1336463711 -1414126804 -1027673479 -2044672379 -775354559 -453303117 -1540991510 -791525750 -1659570732 -887685488 -761101107 -1413703817 -360981911 -381675402 -284827825 -360205612 -219319991 -1029150485 -1098908457 -995072599 -1730012204 -1534015895 -1663965030 -1728207976 -1275126957 -1319452886 -1128516080 -394186256 -101353597 -495372708 -2082487584 -680345482 -1363579346 -1880071085 -280343637 -156385541 -1999287306 -345127333 -201755184 -22698875 -1395386606 -1741261802 -1627448545 -28483976 -1988814998 -430705831 -1853011227 -751843395 -438160817 -447425756 -1544432945 -649665326 -1118272734 -32961794 -2085574479 -1022182219 -2094862380 -357628095 -1996148359 -1275936279 -2036825858 -2042862226 -416884146 -1480185308 -1023904708 -979963945 -1201934772 -1686529322 -861658101 -1405471786 -1591673949 -60270164 -1495848611 -136549648 -1477398940 -1438057966 -1659271224 -148821826 -1577464474 -1759792303 -1684450037 -274853458 -224743909 -1994627137 -1478561889 -1656388986 -1099171641 -1123438793 -959569527 -2030334966 -324622732 -1325793344 -318411336 -10075828 -1840716730 -276662428 -563331641 -1806974311 -103509103 -215740051 -990641021 -262924756 -1602512213 -1830346864 -2083983620 -54418770 -1935717415 -1372825502 -513908746 -85065788 -1624073661 -1288867057 -321079710 -1907764706 -1870564032 -1556577391 -750422783 -184255050 -103206376 -1570258303 -904760538 -2126141406 -2078208209 -1771333855 -242302624 -751206856 -477268079 -593182208 -994280482 -1301803667 -850835633 -2048362105 -511553678 -1305627205 -688529389 -1471550887 -1934078957 -1752549307 -210500497 -976286470 -1671638210 -1842325416 -1544044266 -559588314 -1169903185 -202558363 -636826446 -83581274 -296166980 -1958822761 -1009835617 -743952678 -962866312 -1604825639 -2057392000 -1953143653 -50347929 -89085785 -468686536 -244593356 -596833934 -91813601 -1217933461 -2141039470 -1214383158 -453155418 -1206098064 -792017615 -1336411199 -531557620 -356947820 -1300184669 -1557623658 -1155163076 -1573649452 -2065226959 -491313452 -430565049 -1634371800 -423513823 -1236017003 -1128451990 -1464509273 -1697273044 -1042767407 -177766282 -568148597 -1161175217 -1687971830 -1483569940 -2074839910 -994907384 -1100727346 -1500368964 -948194874 -1982586578 -976349594 -585079631 -105738604 -1179741359 -196507962 -2026951895 -1447406904 -2020565959 -1493162902 -94995072 -1001825383 -1407419601 -2116345949 -654719582 -165807446 -1439454763 -1512918286 -1411252322 -2108378386 -2035358002 -994926551 -1422867115 -1897192460 -276484564 -1868938687 -9207740 -135663596 -1617908505 -750305221 -355874163 -435100646 -554739287 -1276684982 -1735375297 -1477206772 -355774037 -899766611 -1945072550 -1838273216 -10711923 -1794147160 -1413430593 -63873437 -1926515806 -1340205623 -2027416025 -658105226 -1233751332 -1704025139 -708594781 -1555661652 -391982939 -1724910424 -1687745315 -1971499629 -1469075040 -1124707721 -811605953 -1992609974 -1935841700 -1314199850 -887569555 -960098823 -188794603 -1237546002 -1056534419 -1779186737 -1229187931 -168872177 -1408781152 -1377613489 -1528711316 -556735304 -464004349 -1007971386 -1624076966 -1344414192 -1893874857 -352105765 -1524144870 -1117888674 -20516315 -1220322685 -1494537945 -1730506303 -1248403200 -997351210 -1371921635 -355001606 -802420676 -86998372 -1892758244 -912543897 -1944553652 -1707089118 -665282306 -1599850660 -47298533 -377494741 -887418749 -572986028 -859499448 -1632212814 -644658120 -714023725 -458126639 -1005547178 -1682602403 -1433923525 -891198041 -1814520909 -237646516 -1952894639 -160136925 -624288784 -1963977093 -1739347661 -1668735463 -300496821 -1716016450 -383095940 -537489874 -1276093036 -376473463 -902668579 -1326324845 -661414055 -1010665513 -1807112868 -284752955 -1249349169 -1863866664 -663063059 -808188330 -387195035 -711502835 -1039201349 -372571592 -1895915739 -293471187 -1747786397 -1764650713 -1735368321 -1359961140 -1198424959 -679160700 -778301095 -583609788 -1171891067 -1400636432 -1928257857 -554085722 -1029636262 -673427908 -1064030066 -1056990693 -857849267 -1814908158 -303689518 -1688583754 -1030758373 -205394662 -1061863505 -1150821965 -1627040873 -1766675260 -1402191398 -145284008 -99415817 -139358953 -1448747841 -935374001 -1250538767 -382603780 -855691342 -2053884682 -987708496 -368100962 -1919964974 -762038196 -2130973111 -1680295558 -1317485256 -270813375 -1042545632 -745361151 -1012751906 -365898020 -1402340779 -508446828 -628406783 -308225935 -622732981 -1585399836 -1985435323 -1610566575 -1908539237 -2003204667 -1759704250 -204543266 -1784836462 -1694835538 -877793358 -2007796663 -1627969730 -198105683 -962561331 -773977266 -927459783 -1380262955 -961129791 -336404603 -1775203717 -858563848 -939969143 -1171679069 -2132553340 -321916950 -946871857 -1221476329 -1556479830 -1258198703 -274129312 -938923969 -785308827 -250960927 -242417381 -532444108 -223766107 -593094452 -1666849037 -807589744 -1064178368 -1402018760 -1538724436 -1343518678 -1875356588 -500687497 -1213833133 -1946303478 -1051643642 -1184276284 -1253064792 -2035316662 -300125171 -1912145841 -342372332 -1143093611 -585614015 -497195904 -512688051 -1043681393 -506743455 -2064587830 -486890584 -1257350218 -1046027446 -1282150580 -1253884062 -772402023 -222154446 -1423195436 -972832566 -1603932151 -2072924713 -1018446110 -1579104180 -1401043634 -182167283 -1521328406 -1026218460 -1212488163 -816229158 -237921470 -131595576 -1966173069 -2139894294 -1294762949 -629088792 -1033332963 -526855852 -791227983 -949968057 -1719702201 -52487234 -1684646568 -1430466328 -768146531 -1714544400 -1412155354 -105768034 -1674371369 -533888495 -877258299 -1604994638 -602790899 -1426276594 -1218247544 -977381510 -748622667 -2141960143 -1655748740 -1075975354 -2105466938 -347291700 -71049354 -125584946 -1877246068 -44923152 -1256655567 -108446324 -1591234812 -1269629193 -1260330159 -1737771952 -955598064 -1853949382 -1487028951 -80895671 -256393946 -1360854540 -1181413230 -378356448 -337742769 -643439562 -1708555889 -1694982386 -1198384047 -2139036363 -1907902161 -2033286570 -540107279 -169662284 -1803207619 -1221226069 -1645327304 -2016559556 -729540738 -1407042843 -79141537 -839434866 -1561715719 -1210955599 -828229774 -68811764 -1173115462 -504206727 -231989627 -1366841684 -875611029 -1836615159 -61035335 -1471175726 -2071198971 -2078671374 -965813422 -1744779528 -620327311 -1955493439 -888495585 -1491499504 -55552297 -1659552881 -587663731 -587034364 -746681430 -1727844589 -1610132589 -1056987476 -803781148 -1477614806 -771150534 -663215293 -1219301521 -1511703773 -326285154 -1348832487 -990231277 -1966291936 -1990208316 -225881340 -1784077131 -1817661303 -1478640946 -837616338 -1062486681 -887122762 -2040783460 -1986285983 -875223666 -1768656159 -335422539 -302039598 -1875665725 -1401385762 -1637345285 -1006752337 -462873246 -1324876088 -2081958920 -385024222 -733870743 -1166992880 -681186109 -459611806 -196945183 -785390654 -1626227316 -978124643 -353557116 -147197363 -44918597 -1180099682 -1923875329 -2058865271 -944605586 -1786965278 -966624051 -336635602 -1362636616 -1067993504 -1098500102 -574301055 -1486321767 -1080156065 -1503716364 -1373371852 -1106478608 -1525065283 -1554884436 -214215509 -1137467391 -515014943 -1497049591 -994067685 -2020291782 -1180037357 -876379054 -1859909452 -726194032 -993529923 -1572060436 -1128438811 -1243009820 -545126724 -779612166 -1143943615 -1986729361 -1884626771 -1685830594 -2003038487 -1114200637 -312704219 -727324524 -666356144 -320493103 -638595445 -1897860056 -759352301 -2086292433 -203933215 -121643893 -64477707 -1345063461 -2068720705 -1228644005 -1764526130 -1788985487 -560538362 -2104974392 -659005666 -1335060883 -1459116725 -1259031982 -1394147583 -244355064 -886827584 -1374694108 -1854798730 -729635258 -848156836 -2122977513 -442266086 -725205135 -1553007220 -876100902 -1479976082 -1802410620 -710965758 -602482798 -542990381 -1381317364 -1502712678 -1684290426 -1887238675 -486944535 -16621028 -176743486 -557885401 -466331805 -1470818732 -366168107 -1646725694 -1896980169 -1003477021 -1249212056 -1706892120 -1649304214 -137009222 -611524570 -36713448 -715113847 -1599937917 -1513826932 -1650480115 -573024506 -1506199194 -152622722 -1034614136 -584693993 -66771679 -1245145219 -2075039365 -52180275 -820553949 -2057723456 -1081473704 -26954920 -2059774570 -1194808350 -24355353 -1318524941 -564929994 -753205771 -1860777779 -287780392 -591875300 -503914196 -1757872051 -1623029378 -917471852 -1016831104 -205502102 -720123938 -2052675121 -2133453239 -414133914 -354192671 -91552013 -1116391239 -622930034 -602302313 -1804546280 -97781379 -586646898 -676991309 -824568557 -811763408 -343988865 -394876331 -962025887 -364704546 -670976084 -658413391 -2118113193 -292018432 -953653229 -1379362242 -855231929 -774981332 -622927869 -565915158 -130987943 -343619826 -634888799 -1877286497 -724413355 -1130462642 -897799085 -1089117773 -1799287430 -1906602603 -1666451734 -572569164 -295717141 -840829629 -1381177343 -1296863378 -1571260643 -571219742 -1238301704 -872716051 -425360147 -54929766 -1934092599 -1981830401 -1152184637 -907149060 -1467841367 -1865202080 -1632563301 -92842188 -1325525994 -120027180 -809669727 -1662714297 -34491268 -2021640233 -221133197 -1438932669 -1328019016 -1218058641 -2097456083 -1000321476 -1901058416 -827097646 -368489291 -2004159536 -628318357 -969533800 -1996146811 -1249919043 -704320747 -588932565 -437490932 -2073570443 -1133811985 -1355632064 -1454088625 -503617515 -1066521778 -2133004984 -1470246717 -1489730237 -384252886 -654928473 -1529154836 -1568525003 -1837958496 -1163663824 -564316739 -1183647221 -1417821186 -842125990 -1694280200 -134162180 -5929910 -879749608 -526752061 -1194296293 -8147942 -1650991433 -576811544 -730437450 -1445695898 -1180975528 -1611833522 -1727280996 -727759626 -1536664517 -1082198397 -1469451936 -1016747852 -953769385 -1184112487 -647612260 -972130824 -547172592 -804777290 -1039904224 -1448373482 -1085973229 -488543950 -1128185169 -1275016020 -1602418374 -253194791 -1279747630 -1669692705 -1356477586 -632391350 -704850447 -901665877 -1653781507 -224945028 -1079866876 -938284135 -769037024 -1648674722 -294555413 -643019956 -1098688788 -1598063010 -67036041 -1393310059 -1200474725 -769839510 -103671395 -795898048 -2130339220 -1763907756 -2133391904 -1530760216 -632859252 -2126428420 -459601566 -24841503 -899313403 -770456635 -1885756682 -1348891948 -1989592304 -609985891 -2093422906 -1934192341 -1510710548 -813021755 -18190424 -783778294 -297096560 -402404645 -788864112 -2022577453 -940604208 -1107798289 -82623733 -1382644569 -186726996 -847013505 -86882572 -2093991291 -749620801 -1737729105 -235468535 -1854789971 -582422745 -548612189 -1377763952 -1910059310 -1781267814 -1846110718 -739105570 -1101900742 -1894282713 -764490616 -399123111 -1470696996 -467634802 -1895452841 -1103479089 -504273331 -1351403055 -1244094713 -1599054199 -1693564035 -982478907 -521228166 -695989849 -157966934 -660472046 -210705779 -131493750 -254783487 -63673891 -720229831 -1684935125 -1985276533 -1089266692 -7201769 -781047351 -1642777793 -2116601119 -648394478 -1233966868 -1031571397 -984987148 -1875045360 -1712329442 -692578247 -801230589 -1560042633 -1008686608 -759911238 -742928357 -926972441 -1779440549 -1200038921 -2035216270 -760320474 -1178506868 -923254195 -1563905790 -1512256897 -1032705634 -720755584 -1931331208 -668288451 -584522147 -1473523251 -723862353 -459706616 -1790416853 -995186607 -1498661013 -159949828 -1774716799 -1264867610 -689299617 -1531871001 -2121953571 -412742068 -583757066 -1499708766 -589665323 -2015536403 -713277443 -800266947 -396497068 -284465235 -708606423 -1751328746 -1171368240 -1203417631 -839136771 -846600348 -1732887461 -466336413 -1548265388 -637025417 -1280203224 -736926475 -985073076 -1171753609 -1237863473 -2097302222 -561863296 -750820013 -418048719 -1725810896 -1789592690 -28380948 -257223402 -269136003 -768241839 -1168902309 -560704607 -604086813 -1731866722 -490645216 -2084424479 -1021485042 -1114826776 -98804157 -596607568 -582247533 -1898791399 -1380048573 -1652978811 -1766418885 -1388264067 -144349414 -1571563635 -1368638992 -1018195527 -1662522993 -1114212234 -507614998 -1680225502 -140054064 -246576536 -1715885489 -329518060 -1997192454 -1644171768 -1922818827 -1482105333 -1081510178 -639973438 -1435468290 -1084259632 -1752890229 -1645409257 -1246459980 -549907375 -1671118584 -1698905822 -567579842 -192044520 -24326199 -828533663 -881306893 -930237292 -817216484 -1799524023 -1588053860 -1494460104 -422232616 -1177607424 -838684416 -1833804451 -66106213 -798076392 -87061182 -800922267 -673042073 -1021752162 -1309345322 -901896045 -1227247789 -1920643935 -1435917488 -43995830 -703540242 -355886912 -649373089 -501612769 -1732494108 -297703483 -2013024918 -1452421988 -409736867 -1614951387 -442146876 -869126312 -222158890 -1497885744 -14905627 -1410769937 -443384632 -197254934 -1696408417 -1543366947 -2060789763 -1077287925 -543527618 -1820725035 -1431177142 -1977379194 -1502676233 -1071759311 -2113392588 -409705136 -1081648470 -816763435 -627580421 -1451945330 -988480449 -457413151 -1898856244 -322414841 -724991306 -106666864 -1748621650 -770362355 -301192722 -527122675 -980754850 -1609773225 -1459607669 -920393202 -723836673 -28102856 -2025782099 -1113998355 -1207917939 -1313885682 -2049798920 -1037783266 -161170728 -819546629 -160081745 -1844362171 -1416047199 -1091497539 -993825299 -93993927 -1355450544 -550765632 -1063458454 -39842397 -1763752162 -1665807193 -477186812 -1374811386 -1678406429 -1779148858 -592555578 -1199928307 -176126772 -930191438 -46548306 -653331434 -457524127 -1616546229 -1476852606 -845757016 -443908419 -410608455 -1231345374 -2069278326 -2010645564 -117324956 -490547546 -442884789 -386328221 -1175345466 -1476661956 -1936469760 -1132586035 -78443237 -1988008648 -1910766910 -788999132 -2144374946 -1439153468 -744020515 -2103002771 -1881709871 -2053616175 -769878641 -761346112 -1236535558 -1253871287 -557692598 -1520859078 -1728157352 -424289389 -1386052883 -1635685572 -1029243357 -512324514 -1376165975 -822663635 -1007994059 -2005142077 -2109499415 -1549139582 -297218446 -303459000 -2109235022 -1400453725 -1004984955 -823255030 -210151589 -1554640655 -411955536 -249415624 -40313624 -1093729763 -2003592068 -1828301916 -2074280936 -190165954 -663522142 -2081545370 -2024423960 -1910076299 -2066801937 -1192164934 -693619228 -1117129080 -138921839 -544623784 -916634174 -1970362487 -1684482269 -816576682 -1783790044 -1287557388 -1931792944 -1986234462 -9310219 -1858028149 -1319389216 -58414390 -370626051 -1409462857 -2097611189 -1459704371 -398180069 -653375631 -1200343106 -705202624 -378253775 -759601305 -1976335367 -1138945020 -1727205429 -1605188704 -1716974514 -1452892059 -1867769223 -1828862762 -763001423 -1140060124 -1141405534 -131391287 -680171493 -586829870 -1604718066 -249412589 -2136788026 -627324201 -1440623084 -1821536510 -37251938 -1175580689 -1135087623 -1320443460 -597224122 -207252376 -72207998 -271561831 -736943742 -1275279545 -1736515755 -1317531555 -1048960668 -1188688853 -253184330 -1103929603 -1633611188 -524809821 -763323318 -107698448 -1906584762 -1366598047 -1075771264 -822809955 -1319710652 -1165821948 -328684808 -877627972 -1375637808 -535695454 -1182047154 -295298881 -253584750 -1391337602 -261644631 -1562287808 -88637187 -1519034538 -1127884630 -518824341 -1097092367 -536819027 -738585742 -955086134 -1839876460 -1186630067 -10906380 -767418665 -218718773 -1661897794 -1343910876 -2024577433 -194529716 -990826078 -1225694108 -1577731132 -1946546015 -832995707 -712952756 -1785703479 -1234404728 -1948233476 -1276865323 -471399190 -739012547 -1685946828 -1809099678 -1464813920 -375024232 -167763279 -2098885289 -1398666601 -1033562945 -97196032 -1486138104 -140815671 -162003503 -1931094172 -979391693 -174029996 -49415558 -1598595564 -427736531 -1340110008 -420414720 -689000410 -798066246 -2064021007 -1697714658 -2022522964 -24807585 -329253577 -1846993967 -551485984 -285512636 -1132405854 -1345108464 -677602479 -359084512 -704345114 -998468734 -826794680 -1718990670 -978687599 -1225224020 -119413057 -1225522701 -844377330 -877845934 -743957848 -1049758502 -1712983009 -939660581 -280644829 -923552191 -129873621 -942562795 -1813515293 -516127580 -869786827 -586016260 -815276678 -1409459286 -2037593392 -2057904282 -1973132639 -997786699 -101250670 -912962266 -386146847 -274476295 -328216309 -1593499867 -683702932 -1957666674 -906834231 -471477658 -2057824223 -627581026 -1462113565 -87314334 -760680637 -789315468 -1018583157 -1734969462 -1098788868 -1132623923 -715226853 -1351746112 -567402771 -1510979517 -1038616444 -1279491492 -1659748633 -1730183948 -125550009 -1290059909 -1041990451 -4368672 -409826306 -970669013 -1748318879 -2124141099 -671303165 -1860696464 -1068602834 -602091177 -403467175 -1466936646 -1691941762 -1634224007 -87040519 -453639226 -747524532 -865474374 -1121062687 -1826545278 -467753481 -1742607147 -616341843 -1543725820 -1649917333 -1851765667 -1292552945 -2140257210 -951841220 -989698037 -1594061844 -1538915783 -264520413 -503432001 -96071627 -1915616092 -684822420 -1445548667 -853947758 -666755805 -595144589 -1763763244 -1852062367 -1984222551 -554860394 -1164646684 -2050859230 -1678544260 -1948190828 -560080387 -850239508 -619223818 -588955764 -827396525 -1096781350 -1752007249 -1837549926 -739278775 -1865473530 -1899856157 -2095567103 -1464489321 -1361939780 -93689087 -526971958 -595137878 -1650971467 -241242982 -121672938 -552637022 -303655479 -1116490281 -140045281 -98960655 -1079385807 -1442892040 -1301174356 -1011423891 -1668270032 -1067932592 -74752118 -80913731 -559928366 -442706208 -1679884648 -853771827 -2004850782 -1508671644 -904900579 -184843199 -1398292031 -1180615896 -2009949439 -1302453963 -1042942270 -969205076 -766249837 -2049063047 -1554867637 -2079358363 -1774619310 -1773853634 -1790038984 -1086793265 -1385987120 -530406831 -342989920 -785476892 -928145735 -24156337 -121146676 -297686176 -1722146169 -326068117 -1996058922 -1920252267 -1295604353 -1885663938 -1937627187 -1258108801 -910630045 -1990697793 -2010070338 -1186919809 -585632880 -814259959 -1501332229 -2105404200 -1440337781 -1321416283 -1915074754 -176489242 -579773787 -1124731670 -1214116796 -271376578 -1918363865 -1769486644 -1408482052 -645607083 -1630859337 -1519090298 -2065042950 -1693641483 -136663796 -1248400729 -955821113 -1307766631 -138640172 -105613809 -1229795441 -1789358159 -381585725 -925110133 -544401051 -1468127937 -239133129 -1168595566 -1847725947 -2116455609 -350291555 -1097488458 -751469523 -596945054 -1959407441 -99134142 -1847698169 -1649590763 -658070971 -658027547 -2075684026 -149579467 -1426234879 -517143539 -765140564 -585380912 -874401077 -828304718 -1328395572 -1104384392 -687315323 -394096448 -739434188 -182532527 -1217533373 -1859211395 -1878851915 -1264589917 -317080660 -1267724413 -1458947404 -560737582 -1158297638 -569141811 -674253739 -2058869801 -1020741296 -1499589636 -734931060 -1807871523 -150565658 -821277840 -1339257611 -1126563870 -1943131138 -1421216437 -2071534725 -1279237911 -1692780060 -691112964 -1944022972 -1377884946 -1796121821 -241819668 -1224099952 -554555004 -326924248 -1352667110 -1014230628 -1596458557 -1018281881 -966391024 -715118107 -1671535737 -120061705 -1389931402 -249961348 -622362304 -1797882438 -1915222176 -506727149 -1790532888 -797903205 -1471274567 -1584936011 -632379489 -505502620 -537226808 -1149710068 -119257170 -753013539 -777418202 -777212666 -1617736408 -5354589 -1947747796 -1703976151 -2032737112 -2042784908 -1264884167 -967573116 -1255185528 -1171304615 -134072256 -642060889 -12035248 -412950318 -1936331169 -950770745 -178093888 -1779255345 -234798940 -1338325041 -485245409 -1524181404 -1731915612 -1312339446 -1832014232 -42666538 -1984449715 -77838448 -413254513 -606485593 -1245972889 -953303526 -1944354862 -513509235 -1960418999 -2068003919 -2066523585 -808870164 -1109360838 -574581012 -1896591772 -918139583 -1501967786 -2049792464 -929277274 -1862063134 -415905407 -62904464 -673372124 -126468378 -1692702163 -1529381732 -1086998781 -545127238 -788250964 -307333605 -657728200 -1339526291 -1347301336 -1025980184 -1502750725 -176262708 -1067384143 -1594388010 -578336804 -595678506 -2147371675 -265570243 -968055635 -774947773 -58901756 -2119335472 -1507508762 -687695628 -343431642 -1767047605 -1217742872 -1085293794 -1954181787 -318396891 -1914782360 -1704674225 -880364948 -131353206 -40144126 -392460524 -1161746931 -559350793 -1472855032 -230523855 -353931797 -2009989 -1569630418 -1089315578 -828828771 -1546219755 -615809938 -1193933073 -345960343 -1317252372 -651699281 -943216067 -2055639562 -417205598 -440378131 -1206600155 -640726464 -1206674390 -1888394109 -578970950 -516352093 -348209524 -464531793 -1282788106 -1231365309 -256842224 -305128298 -100355450 -899385255 -1978073199 -281916386 -819774220 -1837720035 -1450817091 -1353520399 -323073322 -1054663238 -395018728 -1207808619 -1624028089 -522938453 -1523496047 -950538748 -573887603 -979884944 -2021648612 -361959050 -1772065046 -1794011526 -1281313602 -71696698 -268077319 -154809027 -1272620272 -2139271031 -1556999943 -1409803306 -1377086591 -1263071218 -562110331 -607769964 -1357559816 -1641561784 -1006490679 -360154534 -1508335692 -1701006256 -1509835728 -1142307544 -259087828 -1539772727 -1782276339 -1616521217 -1056475922 -796027658 -13727196 -932232943 -2145868136 -765394034 -550483908 -623490480 -1431783647 -1433490494 -55696965 -1943504310 -1250667300 -395374264 -740851230 -376437304 -294944266 -736021386 -805627782 -301737739 -1097288806 -1690885653 -1064069220 -1715051971 -1352966563 -1752169905 -276342024 -1620752554 -1305596530 -172974664 -1639803457 -1519059848 -1553269800 -994315668 -1893174769 -1470628631 -1466107894 -648008780 -1193991523 -1328329493 -2141278286 -933196376 -1158417391 -434346835 -770339692 -2067779328 -439306295 -372121679 -776678889 -1236480957 -336192280 -354174703 -1937047484 -104975068 -1231893689 -547390296 -168761124 -1689797028 -2094901668 -1017941511 -1688243375 -1752459461 -847942422 -666805062 -1423006988 -2100554324 -1532850435 -1403431633 -1662560830 -1750138693 -497500292 -1333569873 -22031772 -920804720 -1197768758 -387808728 -288422851 -652265478 -1869354458 -554619996 -1419244792 -1146351915 -1660838168 -714645870 -177099419 -97600391 -1839748876 -1189809426 -1906785565 -446526774 -1467628000 -426626558 -2012146620 -1723253031 -1749228575 -233532595 -1529701096 -12098588 -1477505698 -1084856025 -1039049145 -2109446258 -655729883 -2113550824 -921693941 -1110520576 -738944755 -546566684 -1358699769 -1473399032 -783597267 -1549543065 -636106286 -864754036 -1899243803 -393668013 -2128661731 -1487637544 -1719583634 -207215312 -1596756997 -1739195667 -1261655952 -398054786 -695227897 -236741552 -1775550220 -239788828 -1451510424 -121466248 -1373765486 -1279834305 -978955783 -1437625214 -828459301 -1778988406 -43322461 -123645694 -1496492409 -219444399 -972592094 -1857286541 -1740085442 -1183718848 -474172528 -105864079 -1141116037 -1708266149 -1120289500 -1716493251 -1954239406 -1286799424 -2077593878 -36207326 -798655981 -1238278917 -489734942 -1817834890 -101150361 -1374552550 -1623117071 -243844456 -894973516 -844419824 -1592042592 -1961085771 -389539041 -1452506031 -1822247568 -1250585509 -1168196574 -1584318344 -988668455 -1469746346 -1669929428 -1040113753 -674960091 -1045625983 -977212880 -61941904 -1675495380 -97788549 -707153088 -947447518 -159192521 -1931559932 -217485425 -260370781 -1627527328 -1352589857 -1863323104 -117384727 -1495118743 -754560054 -999892043 -1126028926 -1542261918 -668436536 -925903095 -986811503 -324725140 -899480953 -1438985838 -74146752 -643945604 -1623669195 -933457936 -1259489017 -485600240 -1045375080 -1055253453 -1724827645 -296478662 -754811194 -925834729 -1985267788 -942289477 -1514826961 -1278098342 -1867396700 -2010319642 -1082004843 -363873505 -1736055526 -24913693 -2112610733 -153970033 -56549996 -1248010798 -844701737 -2035187089 -269875407 -310502985 -238406685 -1844153140 -50346829 -70598085 -1131041451 -2035907360 -1638051869 -2144891390 -1529093188 -532407067 -1748701667 -2115208074 -857807280 -1109232649 -567592136 -398669778 -293980206 -1712934142 -118352912 -587534862 -568616728 -439118346 -1508230130 -2074309369 -668039385 -693437179 -204915184 -1593211347 -129514586 -1350712491 -375203800 -1038279008 -2050655581 -403299164 -790659416 -2131480723 -1621795854 -1660470454 -976927613 -1709910376 -837525278 -1679524908 -1250072588 -1137467915 -523821811 -1337708424 -859181725 -587209647 -1545179164 -306466177 -1111251333 -135875772 -888983243 -1097632922 -1031992324 -1617056296 -1459614087 -1028260528 -1173786687 -1048067067 -1202322375 -1758522002 -1809337600 -1168601680 -1950483945 -445792160 -2005872384 -1498867282 -1479229264 -2135542376 -1166521121 -1342267184 -168849753 -1031900984 -81904916 -38905485 -1049457707 -952488738 -1135114828 -1777677895 -1639884201 -728640609 -1310960269 -127022863 -274513323 -950545905 -694175302 -1873130210 -1736658097 -1562389902 -1804531045 -1989210381 -633456971 -1434873418 -1823664163 -1436977557 -680706337 -986018390 -2027260478 -191310444 -571612749 -1401119412 -1455768129 -813753832 -1584790328 -331368955 -892930014 -859020062 -17623253 -1988753532 -1545130416 -1634642188 -672957645 -1750254413 -294922685 -373309519 -1413352946 -906343955 -821343514 -295556882 -294840263 -1135526612 -108596995 -1976078662 -1119471379 -851235486 -178756888 -37394463 -1423514717 -2044021039 -565701414 -833559829 -1604216622 -411577869 -344417296 -1153065207 -674503521 -1961988581 -530681182 -659039883 -1910146002 -1090816611 -286886638 -602937351 -1740211711 -1158438284 -785495486 -1240655093 -1771419328 -1678847335 -599521412 -163099760 -1028532748 -1454020933 -1513401718 -946359358 -1197840224 -1588937790 -1318286085 -845444496 -1633835720 -3551851 -1713901288 -1340790205 -1115067464 -1996563726 -1814558507 -869556102 -1003188479 -694653956 -1327933400 -1926594176 -509886566 -1203763232 -205201837 -2116021024 -1636156048 -346598901 -1312078443 -1740304105 -563820595 -1434889601 -2095651844 -741247661 -596802180 -1705607770 -1538070234 -1085763899 -1265301934 -1546532144 -1571164567 -1103954057 -2044609566 -1867140115 -1992862841 -1890810075 -381922219 -138113850 -1997138190 -732156720 -276695730 -1123038355 -671859002 -465230688 -144214489 -1451362807 -1935434623 -914907652 -869994644 -1931312932 -361123719 -617558811 -522470526 -101497899 -773172775 -291281428 -1451728883 -1645623014 -544106585 -814005169 -1514043993 -1003657048 -2127442198 -318299236 -273494775 -1011678845 -1658314616 -1250980346 -1361771092 -1553517165 -856811929 -1560237568 -2137475506 -1444382326 -578607394 -848517342 -1739550914 -789841340 -1266979273 -1820281306 -415874780 -1695640122 -1515534764 -289241481 -1526078006 -1395850721 -951708019 -898472477 -1669398882 -713161719 -1002777326 -226856426 -992478357 -1078259850 -1846285564 -1530258645 -792890043 -966923066 -1067213413 -872412547 -1766819360 -1676596451 -1423619670 -1660482463 -1178762876 -931013357 -975639057 -1527986154 -1253839452 -22641753 -435337152 -234728335 -151666806 -919453 -420861042 -1747883323 -1246202348 -514853645 -933597752 -1461892882 -673262447 -430610686 -253909212 -402119495 -291315356 -2021956779 -1246354525 -925008837 -989402826 -927417861 -675679901 -258570771 -1439530316 -635253910 -1571256133 -495420172 -732731385 -1345155797 -1473128210 -526859207 -847615468 -1614140125 -1839651971 -1708610738 -469345882 -588803343 -413140425 -836492224 -1496855506 -2027048384 -921613880 -1912418996 -638321123 -1582297496 -1384014471 -1735833440 -587281585 -606757483 -1520660825 -543602828 -937295858 -1338934661 -2141194161 -1666791148 -1982132968 -1942460912 -894146290 -1973617971 -564827035 -1170257505 -1862647309 -1644200044 -250569912 -113079217 -2146856171 -191429103 -418430915 -1706928127 -106990216 -740747773 -785119152 -1358060496 -1466555956 -1736135873 -1375305722 -1396776993 -1487175994 -404763725 -1783216026 -229971450 -1807079197 -1866328105 -1230312653 -1892205655 -215115162 -1225549833 -1300384854 -627165659 -923491337 -1254584090 -1800354384 -511545658 -1170835065 -832279994 -1568866247 -1130795463 -49070691 -97383189 -336718509 -608570918 -1934291812 -1035035998 -1232477686 -1772693287 -1615439778 -60599825 -594010097 -2023709023 -631548375 -1569355151 -757870403 -802352864 -1094765735 -87820649 -680382254 -1981606350 -1681526774 -535696098 -1192870862 -1820732889 -1563179320 -39893842 -480904630 -1583152749 -725866113 -1924646231 -2130513303 -394753443 -1044130918 -1619459189 -1042847445 -1522964948 -614292443 -1459198372 -483789464 -676433906 -46230924 -1761543101 -1045340965 -481882648 -840832099 -1422690633 -1078543133 -164972004 -283082951 -1098879352 -505904864 -855290775 -1764006054 -1638002743 -1319230708 -1689337728 -817897509 -360609316 -561922178 -1740449787 -864814322 -764986958 -151208517 -888390818 -1878164182 -443279621 -579818704 -1879651689 -1821489653 -1397209986 -174554757 -279139097 -1386518231 -866854820 -699898492 -1426020425 -1207782455 -1184289741 -1479236591 -111203618 -688434836 -2029882263 -1305977999 -141873206 -756125072 -1533345805 -1139180635 -1392219440 -50310368 -1605281705 -1132558674 -1766070557 -1976366312 -1659037635 -517858797 -2049063535 -1563069453 -340842820 -1206389191 -1390021810 -1769448604 -769143772 -1295304711 -1144548138 -1409529187 -1064935852 -1248150466 -1044618166 -1218701737 -21068673 -1913869003 -1386268655 -967198282 -1397801431 -1525036284 -1067498243 -1364583063 -1569673528 -1813865348 -2104534671 -1858549407 -1490237834 -325501077 -1055752230 -1517838096 -346636759 -1948357849 -1219718687 -2080561794 -525847657 -1026363794 -1507633054 -629187625 -546935547 -1115729269 -234618479 -452800661 -1686148106 -897011730 -740944170 -1938479884 -557001751 -647211784 -683781633 -1132910734 -1240692036 -244836682 -391446722 -1302645893 -2121226133 -1071593484 -1473821846 -1447381224 -1588962199 -1728528148 -213806820 -711082309 -413871808 -243944423 -427635238 -1785162204 -727130391 -1698530107 -695388778 -793184872 -1627146775 -1399086527 -1648808286 -391881914 -26983249 -388416426 -1912068549 -1190809335 -1532386952 -56123793 -527267918 -1274370304 -1487287797 -136353099 -321483544 -105068156 -648940058 -1813595340 -1861477509 -1310724267 -455504543 -2033136293 -161885387 -2093402207 -1586304248 -6018631 -223399808 -879158100 -1322695340 -1937349283 -882343567 -1173748034 -398426096 -493384126 -872644615 -1372218942 -1056873061 -1028291890 -1700887821 -1666782330 -1833928842 -9262103 -1049342537 -1164310195 -690455901 -1638183366 -59994175 -1152268782 -173890428 -1998663476 -597834758 -1880277040 -1594345675 -2014296106 -1342442234 -963431456 -365782612 -1610162170 -1554155343 -845251340 -534946475 -1478858983 -207196903 -1287356934 -710246213 -1393991865 -1922169932 -1313545303 -624016361 -1680331026 -1913595932 -1091731652 -633595196 -1610537346 -1417287434 -461290714 -497064528 -452135266 -1240272576 -1784907050 -733724407 -855007375 -1295869548 -2047829009 -141743794 -728581235 -313061451 -288871807 -1755418029 -1180470917 -1720771033 -836477482 -1249086712 -1747719159 -634581647 -1009950127 -521038601 -1804938188 -242128194 -2114529140 -184381777 -85623418 -258742836 -36459477 -741590544 -2064669467 -1858963643 -2009851345 -1801271752 -897364105 -220859854 -1139824162 -1470559494 -304122335 -373004485 -581613802 -1985092717 -147354827 -543932398 -33927907 -1143166494 -1810558596 -215044982 -46034573 -608955491 -1955359282 -781202533 -2103438020 -607005226 -1389510132 -1759611046 -785547285 -2111240886 -753271621 -820035082 -1927060375 -1902842218 -742686802 -1162124850 -468584485 -676905846 -1535675563 -1640717695 -1852272385 -1219027783 -1205956501 -560251921 -1585727799 -1055058523 -596122782 -1024383819 -442447934 -1634040824 -1303251132 -1556059771 -640718031 -1064940959 -1333983815 -536704025 -953230775 -721628805 -1575171026 -1868517413 -1518790210 -1316431228 -1883117602 -2091030975 -387713670 -838266692 -1255568124 -1159144646 -1919903385 -1874395520 -1527886797 -1731430000 -1740593150 -1126832616 -17494219 -1967562741 -1873791481 -2113221559 -1830188027 -1561893808 -2056613775 -1758417960 -60703706 -192454417 -471014137 -709877717 -1643130534 -1602668165 -156464834 -1184481110 -400608080 -658767215 -1622382220 -778105581 -1592573284 -143007980 -500918867 -807501429 -1727351810 -1917930524 -928775398 -2016967790 -1148278635 -1830966503 -1760838058 -2080585146 -918324721 -318614858 -1283186435 -1483629871 -934616580 -1405465902 -1492781561 -128247826 -1535113641 -786429229 -1901688165 -673870854 -2066172547 -1351425439 -1620302601 -185687400 -554392709 -1894199477 -1513026811 -1087748350 -258231539 -33025386 -1006881576 -487509472 -921582599 -1386679229 -1425264559 -1388844475 -1309332082 -679371365 -23980456 -1460082003 -302590152 -391408568 -661391615 -633516433 -286767605 -749833367 -1015358573 -1226477349 -1856760737 -1492832202 -979371113 -1975625583 -2094507214 -830804074 -385398924 -589036316 -33750342 -306315186 -721029243 -88267080 -1741097130 -1007289888 -907558315 -1903739211 -786062624 -35125224 -1939120490 -586248558 -424541870 -1334533756 -1189627824 -1002084398 -1465717412 -527628747 -896372366 -732571657 -808090948 -897979408 -1972322787 -271506017 -1946361491 -2026668133 -973186264 -1106083496 -1326868840 -1214403432 -793900536 -770409741 -1097609224 -633700038 -1225133193 -740367315 -833212487 -61406922 -1273987494 -1495851068 -177844447 -1881867752 -412154848 -1451768761 -168368913 -1540357692 -876364859 -1621334087 -342003426 -1385341410 -415377096 -1920999722 -973178656 -978215840 -1886305095 -1976134651 -2060478502 -140891592 -1438007750 -815290912 -1648690124 -553416827 -524936232 -740429348 -1875801118 -1529452266 -124980072 -301063338 -500049434 -1227326527 -1096509854 -1483941271 -1873349086 -1120339735 -413309249 -1526433545 -928943753 -551542981 -1243461215 -1689271548 -1853093896 -2141261278 -647342920 -740300738 -1861736495 -1368534675 -1412423355 -315093547 -82570927 -495134127 -220140364 -1932257614 -1206008564 -1435274762 -2126601830 -1226619789 -2103266170 -2013689570 -1885809917 -96128946 -731492878 -2004405118 -460847737 -1641884677 -2138386036 -1715274507 -798161821 -1522866385 -1105227749 -1976714540 -1069254690 -820416734 -1899034598 -1172526872 -1349192832 -604098751 -1932508688 -1130841988 -831016366 -1805906921 -1491238196 -2106199682 -1925101873 -1198553809 -697259003 -13801742 -37643918 -1321137608 -1526351323 -1694522246 -2054745655 -425696178 -1407635489 -1449808271 -1578151835 -427366748 -1567618068 -1627487480 -682864521 -751394879 -1489886993 -871367331 -1379743224 -815945462 -1912293739 -680610371 -1520601475 -1693591025 -1436099837 -961251826 -239963201 -87230141 -1493132533 -1732066936 -1708158267 -1454600373 -514631563 -1496032872 -1085940628 -2088102590 -562470856 -224662698 -629713860 -801432604 -660341444 -163161612 -2068079312 -1186170089 -869990722 -1865395878 -594758993 -1725502213 -896524803 -1147096669 -1293016764 -1345728555 -362053681 -1215044616 -832861789 -609676577 -1189749802 -904684997 -856523819 -1012940092 -1381256475 -479351255 -1245382888 -1774574954 -1028362342 -737490938 -1882068129 -1632407440 -1768253655 -12988752 -1406106517 -1522179631 -300371506 -1757330892 -1117704653 -1222642662 -1831685738 -964118821 -1180907932 -475747550 -807455069 -948179290 -1720666290 -1223545528 -1973769071 -956881088 -1942897280 -1785732325 -1719219450 -528825765 -1687301069 -947508048 -1176520231 -1893584488 -1914324923 -458981507 -340928125 -492626679 -1027134768 -1580491190 -1090200587 -670789505 -1817547432 -1712294696 -108602225 -2063979272 -996274513 -455744332 -1768302722 -837657821 -1759691462 -2137098997 -1558846504 -232699328 -409884509 -1948886834 -1520434994 -1043028505 -271073074 -1112339431 -1243669682 -898009123 -324259145 -1657437576 -1542954595 -1572840640 -1356425557 -1905423594 -1178200294 -65632271 -1422467786 -1628120898 -591302612 -1616165215 -1515601249 -1406654876 -1031109 -149979787 -1711962178 -962423140 -598884776 -200576743 -1691477458 -273117620 -1115285701 -1369505691 -552420091 -952663456 -1924116607 -1819057323 -1319228969 -1660110355 -1367194661 -365644527 -1436851222 -704877639 -1358681821 -1171746996 -1126718782 -251769828 -952714606 -636311010 -10583010 -1774990016 -1561858435 -1462099764 -2002844574 -2588493 -555128911 -1382644609 -187399276 -1408605230 -568376082 -689548318 -1416821414 -1218827162 -2129086648 -39282975 -951481196 -1381225610 -2108086847 -1430429323 -146203496 -520865104 -1036457756 -1505644275 -1563517324 -1425759776 -1122022006 -769950535 -1969668570 -759237485 -156579921 -971264672 -1022141457 -1409775446 -908843571 -2030200333 -209329548 -623499450 -1582542437 -1205770564 -1730176056 -2140392812 -1083420387 -532601396 -719821876 -1270886381 -915052405 -1155374668 -834908902 -655766416 -580077308 -1931041823 -99562050 -449613337 -1803884813 -1865407392 -788274791 -707793994 -981736425 -927235074 -1898546086 -1552040276 -1804542270 -30385309 -1732264024 -725648989 -422926810 -2107507747 -287430211 -1148834174 -430492241 -410687744 -416471950 -994858077 -272024597 -2072200963 -1739281742 -560834830 -645261127 -111344139 -902687636 -1646615844 -50731219 -88589874 -723844947 -167163974 -616300742 -852941313 -931303866 -1563256526 -1337495084 -1568543639 -3690101 -1889985391 -1553843760 -2050926800 -666709603 -1966111222 -1100431765 -827506391 -795815565 -744047439 -408030792 -858236273 -1876867059 -117369830 -1244744864 -1788723821 -457685194 -28632004 -181754300 -1022774066 -1304616674 -884404048 -1444513849 -641630808 -1373598469 -620263233 -878534493 -1579150726 -35858609 -1380220303 -244277627 -1732827572 -1607265637 -116765446 -1824281211 -1070285058 -957942534 -455267379 -194604592 -101783363 -1275998929 -942300761 -1704477149 -1863075910 -257762463 -739199642 -535485199 -1943258663 -1417045465 -689485025 -353055963 -314253480 -995950387 -1450609591 -13551546 -127567040 -830561574 -604668718 -774525822 -1557105887 -1042920467 -602762055 -941495486 -1055122106 -1664762263 -94917478 -1845186672 -241049977 -1172805197 -1732033813 -1151460006 -1613177725 -696980700 -1778814162 -1409770847 -831548178 -6652970 -147317146 -2058111478 -1160508517 -1220163165 -960968952 -1928150824 -902665738 -1278576158 -1308115624 -1709198229 -1753372531 -1161524383 -1113953851 -459939211 -1404673724 -1063547797 -1541430198 -1722104025 -1765237556 -861020387 -1424830823 -541494464 -2009244109 -185390888 -2013366466 -750368283 -1415757197 -512401219 -517863263 -2124123597 -377147051 -1486243860 -1918256763 -2116906977 -1493982590 -986589406 -886908155 -581367258 -2136395003 -464237581 -632934316 -1240545421 -2075645671 -1652430629 -1143058599 -2144650978 -1783455998 -2115697207 -488731023 -2124837433 -1637170468 -216086665 -373731578 -2064447618 -277831147 -878639051 -1188973385 -740346360 -481021802 -1404978906 -1897774377 -1466828995 -2030135052 -1259635428 -798846270 -141498846 -906707493 -488875739 -262111951 -826600460 -602218777 -400556728 -1943177798 -57947410 -1112027779 -300701812 -866332893 -517805991 -1161553093 -1596482821 -1426086929 -178031536 -731305281 -998945986 -258034456 -1015618699 -1303447737 -565432712 -612452609 -601879392 -1138963974 -2045765307 -1964326279 -1165665822 -1999642420 -2018561037 -8693553 -83657275 -1573515787 -1966202951 -494637421 -461937210 -625304565 -1856339184 -850241872 -658955566 -493030183 -1366375555 -1631315514 -596122549 -1020467788 -1197707974 -1513695687 -1592129047 -1266651309 -603157652 -1147843324 -957145467 -2091347839 -1418279624 -2104642515 -1523599868 -547974648 -1400030600 -335974021 -980862984 -1279697716 -830788107 -117041555 -22394233 -570235806 -1881158528 -1377128962 -1975200615 -1394520979 -77570695 -208097136 -1385187436 -2122503372 -1063312887 -1888265122 -558570088 -1236447979 -1929414681 -669473867 -1180456036 -1470666066 -2095277939 -899477267 -1377035236 -399947733 -297733421 -368709237 -1405824664 -1080043554 -1760227634 -411123566 -1298881363 -1127796186 -1179829680 -1680919009 -1058407978 -1055838145 -814327854 -494959847 -1585983698 -1060985722 -1430308613 -264914173 -678905380 -782105149 -93835956 -847915594 -215906866 -1646817079 -1285404217 -103186299 -1232824164 -1153498092 -1507550775 -1393808119 -981434557 -148706892 -1793252383 -1407299083 -90799923 -1360916491 -75140040 -158267844 -1422899122 -287650462 -555625437 -1137822503 -40931386 -739037462 -2104693233 -228533647 -1264244293 -950629033 -2091307598 -741949137 -1649091077 -849782957 -1535905749 -1214486503 -42591186 -718008651 -860784864 -1761363056 -166808297 -1080888344 -926227635 -2146387989 -912628817 -1224320445 -2112897208 -673788064 -674721017 -1322476559 -407780663 -949285464 -984779885 -539059766 -1891464116 -636971071 -366810002 -1697636724 -712686226 -1601101063 -1735468931 -903429763 -1234642451 -1648676643 -326841660 -2112094241 -63223577 -1741737021 -1024519690 -578548184 -2000858519 -982700460 -2097385790 -1966390672 -1502180621 -1331943015 -596716777 -270239549 -2135670285 -1168804037 -1056530750 -1717521854 -2062100851 -1637907471 -1865477851 -1972479204 -752922889 -1401347299 -990897644 -281020223 -790348208 -1195975161 -307595007 -756144320 -1856846941 -794179183 -1158662576 -260203836 -969166360 -115550025 -724053287 -1521250707 -1867815014 -450988452 -1293122501 -975366667 -1244894718 -12352705 -1453482823 -1059321536 -1377621922 -1670444747 -1111145598 -506271274 -571092704 -1250657685 -233774959 -1308145550 -64680864 -464555866 -1687383017 -177324437 -1731994270 -486860805 -756854565 -909032774 -915167860 -948343206 -180635208 -1541547645 -1548552107 -1160944356 -2102858297 -1601019000 -356236090 -75556794 -720201381 -1206775975 -1448249557 -1150649401 -874241372 -291626430 -807726556 -1216094005 -1290073536 -1271019440 -1003891371 -1770741565 -1025102829 -1789430769 -1601941995 -836627526 -1623392573 -579239276 -731139881 -366551833 -1653557635 -757295618 -1879359604 -1207384352 -935823561 -216359099 -657562522 -702459792 -1524116585 -642502679 -994748837 -583511564 -1668523946 -1040497896 -688800551 -1734003327 -2040827099 -572243009 -1256480997 -1469415628 -406519296 -1224326765 -71633801 -1358451087 -1588767952 -611302466 -598778814 -567157056 -1676214806 -1451763096 -73157258 -1193389122 -1941194121 -1078026423 -70561622 -518207810 -1472474085 -270398567 -513318517 -902505220 -728233779 -915819400 -1161357751 -460853474 -1738306436 -1348736064 -1517133563 -1390452510 -418288916 -1467834581 -1751149778 -310936711 -1085588626 -466972270 -1497695752 -1116677377 -1137084106 -515594889 -506783778 -594812844 -483092323 -1844487001 -1366581362 -795346469 -1449885555 -729580376 -2073238709 -2000809588 -160317143 -1505729063 -841065593 -1052056997 -1689082828 -828760503 -398839479 -998661266 -1915196357 -72787216 -1416544169 -854137741 -1712316439 -474036826 -2120087859 -1267975189 -1378772342 -1678200864 -471701550 -1525809773 -1182625984 -1433760103 -292048134 -1452854743 -1240599211 -832210554 -401788167 -1165136601 -1694959661 -816444972 -1717623721 -1626695873 -263227554 -249187258 -497133556 -1612288862 -790245788 -1622085868 -92284811 -547625343 -1971712406 -750250785 -1588451958 -1742842249 -272733863 -1107932743 -194908464 -913992773 -526008820 -1587546688 -1560354888 -1961789099 -1472954502 -1902316145 -490912479 -133862779 -1416348244 -1856193560 -550222951 -532553475 -2061897276 -363906093 -136278395 -1213417063 -1395865929 -1207308875 -1814765269 -49637742 -1037874758 -1698876772 -79336492 -1968559904 -1453240846 -1287381391 -1121295012 -1436264259 -1577208733 -1756520610 -384196961 -1862480645 -990561843 -1079663757 -1819430396 -1147015939 -2083671301 -1247724278 -324127391 -1590531745 -190600359 -1522116036 -1379013988 -1444577892 -1718001509 -1533727848 -1117726395 -1588060456 -1605319076 -1760653071 -1118992284 -1389020409 -2118771173 -613270057 -1455826046 -1787164851 -25880168 -1176286882 -119171492 -1460507040 -1003736070 -1308081305 -1132398796 -1226484658 -1979603100 -225158729 -376572289 -416153514 -2085355166 -1631155922 -61343452 -207247204 -2132765841 -1745937610 -756858662 -977891053 -722577280 -336321175 -373029321 -999032454 -1711302132 -606448253 -618399509 -1767179930 -1294245500 -522258037 -825162570 -57921664 -679314757 -1220053447 -1264422173 -1792774546 -1966227212 -902392048 -973635622 -68508814 -376402106 -1850855127 -1021492694 -1243433940 -1230860623 -364519210 -1851001226 -1329494940 -254109545 -1621632579 -1063791176 -1336933757 -724255338 -622154570 -453980747 -45017038 -687113922 -1304117135 -1078586663 -896580714 -2086792846 -24439918 -592325249 -1623756098 -246553010 -1320484007 -1278697551 -1200884128 -1208224790 -28679498 -979985958 -1571907263 -701543847 -1162214499 -1975315228 -1173338023 -2097305807 -622116391 -1959789941 -85360701 -138225511 -1726340970 -2108611820 -1663715946 -1836820482 -1364415349 -898387977 -249207382 -835357624 -1754986129 -363978558 -1354197650 -968212644 -1266314389 -1382994153 -1767217990 -1933919920 -1227098095 -1552220524 -539003112 -939280338 -332351669 -229535036 -914720040 -2011767054 -1786338210 -1164910410 -40851171 -1538347604 -1452554195 -484256269 -2079574600 -1113947275 -349416379 -1420790955 -1362909692 -1362614542 -696995786 -2032364564 -76337966 -964457303 -427323965 -848564187 -379391182 -548647931 -1978479746 -672300874 -1449322451 -2002909683 -1096875456 -1186163144 -753266107 -727361284 -1284181464 -1027213098 -749499853 -1852439716 -1883876253 -1956776450 -977224992 -265508288 -2074261597 -2012619028 -1073079699 -682833587 -231487141 -1511494070 -1096774127 -1630610288 -1628291049 -1303546822 -83270660 -1518128423 -931195354 -1886978989 -417369227 -1043007087 -2058584395 -518889948 -52265569 -106606560 -735092322 -223234663 -251049732 -1734963016 -990450946 -1363301525 -1505700832 -366587176 -100083789 -628546122 -502612861 -1361171176 -60663541 -1664884909 -8745153 -950898475 -177368351 -322573221 -1239400319 -9785533 -1256695959 -787314668 -1750875909 -2987722 -822519773 -737589072 -1383922620 -192093683 -850608740 -382455101 -504327036 -106539343 -1752859850 -1134829404 -1275524021 -1550456593 -957385853 -1836548047 -1080567598 -1977900554 -1675239165 -86550338 -805101747 -50602082 -65667962 -2022326423 -1016510292 -1256065759 -932961503 -1505874174 -1132462523 -150060700 -924383322 -1213790456 -1229031139 -1828636327 -1252275672 -1657478704 -86709244 -1328351242 -359330082 -536672810 -428600270 -824585852 -1102440473 -228123395 -811589870 -1722302993 -814325438 -454354135 -2025581860 -2043548776 -1218311761 -2056676629 -667321491 -1512694603 -1946779435 -461118353 -1895160495 -484987161 -1478774562 -935816803 -102777393 -802791963 -2032251687 -326697874 -1842966586 -1582770221 -739168958 -19779211 -1716717639 -1430561228 -215647184 -1577308999 -1294207625 -2033176559 -838636049 -1020900282 -2024183691 -19358863 -1094379744 -42920853 -1963754626 -147828439 -2061478341 -1912800136 -601690162 -106059011 -122370867 -1545311490 -382985612 -830690825 -629506628 -1613451674 -1006274249 -1017582818 -2102141065 -283919011 -118154243 -1543472273 -1683520198 -1826918561 -299069921 -1356428267 -1950970564 -34463105 -1548304692 -1297607745 -1196934930 -1406047061 -522902639 -921570149 -1177432079 -39144648 -774102954 -892414352 -782223416 -2081549425 -2092576345 -590943496 -2022953544 -819114704 -1490652858 -858358504 -1783719829 -107453883 -2091148101 -208766705 -1901215384 -1317775175 -848514714 -1695382118 -1474228830 -1845110371 -1106142717 -174712540 -783514331 -155637713 -167960345 -1116006257 -594988501 -1287875875 -842153012 -955307 -1023459220 -2082581717 -114955166 -1463676309 -582548978 -522726573 -109912534 -464022518 -1313337769 -1430959717 -470600866 -206482961 -25551975 -2102798072 -588817425 -649816599 -1513234398 -281695765 -1406764367 -1841246346 -587983952 -1674021417 -1094696172 -1066158955 -330006117 -1610031865 -1511602855 -777639975 -209584183 -608182601 -1850298934 -263491531 -390881403 -391264048 -379927622 -974660423 -112470045 -498436955 -2043679385 -1265973577 -2097417810 -357067165 -1158532437 -220441310 -547806095 -714643976 -145266961 -1960390535 -1589609471 -1869810417 -1775471968 -1072091111 -1247504247 -921033668 -750730500 -1061087375 -991306937 -717556733 -1855333626 -1129697742 -927026667 -543333284 -702037144 -863122590 -249334645 -826783218 -1526348836 -1652723237 -1765953961 -16737340 -2131599270 -1466731636 -393822339 -427451519 -844880618 -746672762 -1582161513 -1246031837 -1944042562 -1707134076 -1420891412 -903806844 -1129791877 -361669965 -1208380745 -502331536 -927909195 -343595851 -231940974 -549130713 -1502662232 -836444504 -694825466 -2063018323 -2025473846 -228157478 -1384422851 -9541512 -1450402306 -824679845 -534697177 -1583874791 -2123807772 -1511527217 -1653875756 -1808987971 -1734838018 -1037093207 -1448250997 -1174851481 -1764190649 -445523614 -1787387056 -1612995956 -1936956411 -721794804 -70148925 -24460272 -934414927 -163767578 -1515131639 -2103854194 -1159190703 -546499737 -233521540 -1343899711 -1836927278 -1011852074 -274807125 -1593508825 -834260038 -487727403 -289381622 -1733944146 -1046172032 -1564723835 -228753683 -667422051 -1055322876 -744136359 -1902509232 -1588642041 -642599936 -481863589 -520507486 -1468422971 -902802273 -1425836256 -259937719 -791505235 -1314775127 -1966315506 -238865659 -968194570 -962544671 -493972646 -26482020 -554195211 -722334238 -546481575 -2075756453 -1366860056 -1184389233 -1003914988 -20188837 -11367233 -2070524095 -1473448677 -1617980782 -1965064760 -692414107 -190013256 -244610503 -885023563 -1119284219 -2000604660 -1011059541 -1987090523 -1512225564 -506091903 -1851371601 -1111936624 -916143374 -163937828 -81556095 -618721879 -742801579 -943698242 -1569620199 -917564845 -432280808 -406362255 -732422325 -445751671 -1325373761 -1856414443 -2115119885 -1523098404 -709803788 -400605831 -620968272 -1990706731 -12807657 -509926499 -1874917163 -1705206110 -1229821555 -80772510 -333910666 -661793851 -951445944 -788745246 -24796591 -144477419 -1575460023 -283239051 -1574968405 -610549913 -835522425 -229829242 -1564472988 -307735448 -969052560 -350397072 -723429030 -1766781543 -1041006132 -640788415 -100401200 -1668305505 -1664127303 -160562993 -1342762719 -2054855557 -125335445 -1978850055 -453633296 -647859022 -824492464 -1680352004 -118689531 -1950123101 -823537993 -670943436 -109698455 -1160964059 -286522971 -933237023 -1841571520 -1758216076 -962606612 -1535015033 -1276608220 -445236363 -1254526793 -837363705 -1111451144 -1346615602 -238267081 -1645312359 -1765378941 -1089794435 -287043782 -1096572912 -396273430 -820748663 -1035314360 -1615940526 -2034220520 -1204619400 -1709915531 -924165363 -1845520837 -1562393838 -1870683397 -1415261299 -767778121 -1965128471 -1763204884 -1057640435 -1040644826 -1010769414 -1405893328 -86595755 -1568425266 -161678737 -767719304 -976591152 -349977643 -116536768 -128373712 -1503395996 -283914170 -36791556 -2027875003 -1929697531 -1128366523 -28065404 -1396326335 -355417929 -1357110396 -530610785 -1623361151 -51129722 -343778854 -1160188748 -140772876 -1590231585 -1588262180 -700727050 -319209202 -534907808 -828982714 -1986056109 -1306698642 -1516301872 -297123755 -859471010 -1154255348 -1349850485 -919854487 -259588256 -1360531535 -47635489 -1745746939 -1847218459 -29555734 -674498881 -1884004101 -1958034139 -640367545 -1616773698 -1004956795 -349969910 -2134051884 -1885625841 -1297330908 -839102765 -275061506 -1573922998 -220263640 -1856673699 -29984536 -1438923154 -1168100411 -2115590450 -841949771 -880051114 -1299196109 -2122764914 -1164081987 -1149931339 -1690675220 -1822289083 -1948328114 -719962542 -1487576196 -688507798 -1108670950 -1864535278 -1163040322 -822536860 -1024770281 -495263827 -252524617 -753551447 -1228103370 -1268008273 -1934815130 -1240507036 -1430508976 -1484931467 -1335704082 -1531944083 -1202759098 -508590875 -901921065 -1647758929 -2082691638 -1962397413 -959469665 -351954332 -1126494086 -770271450 -920836034 -1724063156 -332613921 -342237106 -1017833876 -2026705577 -1602507572 -1752345577 -1081377681 -560580006 -657401453 -142856756 -106780746 -1515152777 -311636913 -2116465405 -514932927 -118606679 -557629537 -460992851 -1933332028 -2083815486 -1523557926 -1990539101 -1490417541 -1198352979 -1616876487 -585047871 -1719431931 -1952510285 -142750188 -463176017 -2118580991 -1711848477 -1198934080 -646022759 -27191281 -1737326603 -2060552009 -1376323741 -1326753150 -1417485249 -1638483772 -813950523 -595608671 -973654830 -391337670 -1617292576 -1135804753 -488345488 -2087601629 -732753917 -1723851121 -1063908970 -1169213868 -1502109426 -135368650 -955718377 -1728566326 -855464466 -388263397 -1487593793 -984260577 -400984798 -547815700 -876075211 -1048187445 -1078031774 -160495879 -214777721 -1996629887 -779042787 -164325350 -152187408 -160742679 -67778027 -978966879 -1624115686 -1995181232 -53818319 -433872046 -1380495557 -575504311 -234608889 -291621531 -725389063 -349317822 -1911827103 -1427793707 -946561971 -308189621 -12403583 -161105722 -1874474434 -706710748 -2102973726 -1393550556 -947540510 -1722109065 -1849944836 -754617386 -1963470967 -1822822567 -177175467 -1375739127 -91080240 -1777237016 -672481789 -194993562 -196751212 -1820287351 -517473095 -2009020962 -729926553 -1448984607 -619732869 -554641333 -1777855751 -334142699 -266605188 -1182507074 -1582723380 -2099395918 -1390873616 -1053366517 -75865351 -1611151586 -1003400879 -2116977109 -525207467 -1004108699 -1128405967 -691000712 -57403608 -562282153 -1348098671 -1541887647 -820514780 -1399410073 -644194967 -1519745842 -197869076 -1280874776 -1286282704 -1983015426 -1741546989 -2125619160 -1890754275 -1591575266 -549188630 -328589604 -1425017991 -1539743393 -1289259801 -479477177 -1214270295 -703750624 -1744293539 -1042244776 -2131325300 -1157085140 -1665524395 -19168120 -36045790 -231204076 -1048987909 -1646528340 -727535138 -2058661995 -1823113148 -766003040 -48629515 -1272472745 -1807268389 -751110755 -1009582219 -780059786 -77158367 -1868035028 -2001280103 -1625811807 -437115821 -64047160 -551310973 -1639070053 -2077640702 -823178294 -1067933284 -86382562 -132774162 -299831501 -1271401445 -981798465 -1969941354 -1048950879 -1024165130 -1061909205 -1918901865 -74234409 -2117196803 -2070120878 -1139031499 -1033174335 -8278703 -1701207913 -604117633 -102374815 -479114458 -1560503003 -156190610 -870565636 -790557241 -414225498 -1893444959 -1716744667 -1884820824 -652312071 -504959362 -2144107837 -1244819799 -900672719 -2141644177 -640275472 -69302787 -835804435 -674604018 -1503558013 -859450242 -805207572 -1829202857 -36527147 -1878920234 -265343703 -1455565149 -1697236266 -424639561 -828942746 -1314313933 -657478889 -1444323608 -1739217615 -1630535988 -379530949 -750228253 -1209756634 -4577842 -1777862849 -453438785 -1673679939 -1797926367 -506053232 -1201428104 -1760894834 -887335731 -1325186149 -850703206 -1970145163 -179401448 -133096148 -1416482909 -1972024568 -1701790225 -1801100829 -172144891 -578710528 -434406833 -1778726078 -2076826706 -27249404 -566716217 -709484674 -1479707774 -1587925358 -1482210637 -703870859 -1617599537 -1999930986 -426038858 -724607308 -95263419 -1216966118 -915291198 -873801325 -1485691089 -1217769154 -1527015368 -2117708326 -2077353351 -288637331 -2109547191 -204627167 -1047476922 -2021173595 -968282919 -299942667 -992284760 -2119442365 -1156575766 -1694410165 -171000288 -668720730 -1407384359 -1524033655 -1396181816 -73970743 -1980729635 -1978963298 -209424750 -76075817 -853486354 -1501873365 -462858717 -1080687185 -1840315616 -2125074018 -1318487269 -2079260337 -127096328 -1509239578 -1860232729 -1864543277 -1297479515 -1189256967 -1211541740 -2089566973 -1552035820 -1729650278 -1893576554 -1780978185 -1273283409 -399712708 -642635540 -1080260017 -1103353981 -549066822 -428846195 -662880033 -2027037642 -741073086 -1957687449 -1255999656 -1969452029 -1414800192 -1607887360 -1976129319 -1970863578 -1516384118 -1679432277 -1840707018 -113432844 -1647814219 -864467021 -1370349992 -1857685116 -1996484526 -483444107 -1314469748 -1128777947 -500417631 -973162565 -707774403 -652470488 -1019990234 -1761392484 -661404693 -853318379 -826201187 -334088407 -1501603191 -217011593 -886610945 -2028609729 -1393335531 -1628582629 -1909164588 -1776060689 -229306723 -1372430743 -321645174 -674099919 -1621100708 -714569867 -1047200645 -1672753350 -1257130573 -1649421225 -2103613099 -1402074332 -325239393 -952596536 -799392167 -726455137 -1086954364 -1946094366 -1832065552 -905201778 -952127498 -1506205089 -251699987 -1926380566 -1214710590 -1661337748 -521152342 -1569099528 -756581936 -621924465 -881573306 -1112873289 -1626286500 -1972830131 -208502037 -1747907602 -1654259501 -1816139245 -1667215904 -531072472 -792999972 -667016122 -675325114 -738116603 -1660201549 -752408572 -1347156068 -731944555 -1005805869 -1735454746 -665022468 -1527720688 -1087119684 -429660312 -1460842570 -200537839 -1037617930 -1677335870 -966132921 -672148280 -1032158740 -119042714 -1443618841 -631616881 -573251846 -1032135280 -1872234141 -1708811943 -1703514670 -719076886 -1634741333 -191804013 -277092344 -1346478912 -88401898 -1859499609 -280413672 -1333463786 -386511210 -2103357942 -1408617927 -781774561 -980094381 -1246688977 -103692660 -1153298903 -307264899 -1650470105 -404786436 -17436156 -991697900 -846020933 -584594144 -536093183 -1424227516 -1139131950 -573970645 -228088191 -219916242 -312922807 -106165746 -1916266012 -870609625 -1529880364 -877572217 -438563523 -773254557 -1665791502 -213468175 -1461926735 -1242229818 -320534992 -1342623868 -1868670447 -1943349001 -787872584 -390351886 -81606417 -1464483733 -1268022264 -22478220 -1981805315 -730564235 -1429087746 -1220638974 -367956227 -1634887476 -500545767 -979260670 -119410082 -1175521876 -146617532 -1037117215 -1851753453 -1087272247 -846303006 -1030427761 -1091249719 -1123681853 -749711653 -1117195022 -1247209033 -254339264 -1187552518 -482154808 -1120057925 -2119379520 -100339851 -637212862 -135624045 -953174848 -1929147363 -471627535 -281839668 -1677858441 -1159049130 -314565973 -1953052944 -673285413 -816600248 -32380159 -899969622 -1062111133 -1017738467 -423166514 -1841245581 -575126597 -328820632 -1012938293 -1351020682 -1260002643 -528177834 -1534942987 -65731098 -935969528 -522142821 -1036210905 -1651786812 -1059844515 -1577395387 -598647094 -500822663 -1338084448 -736566152 -1371575356 -977541394 -1288309408 -1686091202 -2088109849 -684472869 -2013095951 -498789972 -1534385163 -1427801365 -1075269977 -987613934 -926281075 -897070422 -1727380614 -254555705 -530309111 -848093527 -1058943150 -1460539361 -1546955117 -90137190 -959781195 -1292871748 -1055928290 -181911222 -1512678473 -1675682525 -1095650917 -2080172641 -427804127 -328712333 -1340240647 -468580746 -614064473 -1922673876 -1193397523 -2082389728 -1183163337 -1875117386 -775386777 -994791043 -1292867806 -989675096 -1208492457 -232391473 -1678216465 -733907557 -1785725778 -1609184021 -146790629 -1798874847 -1414771063 -1118316257 -764452855 -1911957631 -1474094156 -1729128100 -1707265496 -1482183705 -251224735 -381271143 -2080381400 -1788932993 -1825755351 -76352274 -1204931859 -518963003 -1280100954 -1165558232 -191377290 -1695093471 -917905995 -1871021564 -656383127 -207720850 -1503399575 -344066423 -1698393637 -549221135 -874901139 -642912164 -1434512291 -49169968 -1765931728 -1790550956 -1101572081 -665444580 -32222484 -397409544 -588063838 -869181772 -1154275110 -1681990419 -1885726672 -844513878 -1025324523 -1220474533 -1899163634 -1193751277 -1585482265 -1223335879 -597681975 -1459936806 -9747820 -622853568 -1464621898 -1442677772 -1994939374 -283878207 -1579845062 -968145526 -138262163 -194867487 -225292334 -474587877 -644183781 -1331742740 -1525662146 -848942642 -297633426 -835576919 -1145709900 -1607910298 -214164638 -282478494 -1677188788 -641609394 -1013693371 -1156714746 -1882763378 -432555501 -728160212 -1826862478 -1503966587 -1283902519 -633951777 -1161143272 -1151072215 -1538025329 -331045564 -1900148418 -565146789 -101912042 -1291223235 -1266657710 -710739259 -1090681399 -161862201 -1703715105 -1940304284 -1154921493 -1808331265 -1434998511 -1778618567 -269889329 -544490039 -816265606 -850503006 -752867410 -468911746 -1882214179 -1939586143 -1970027588 -350802070 -1087779475 -781349414 -277099693 -1469993555 -1529803797 -1738194295 -1611465924 -1991512351 -667961115 -1525436936 -1358805466 -1102364864 -1104846579 -2012841291 -513686646 -647198382 -458534219 -1413293297 -2051306859 -611910275 -76806442 -248198847 -1064779055 -760346934 -1623220088 -1975251175 -96799252 -1259907585 -1078021675 -2138245633 -1503004933 -153769270 -977293549 -1417745787 -1722378644 -2085791795 -379644937 -518540922 -628636528 -2022066503 -943002146 -607752962 -1071807202 -770812978 -1432362542 -425560524 -1275182358 -103093846 -1826450240 -1017933462 -1552963832 -146878786 -1133045899 -1364926544 -900107754 -1236212010 -110967345 -1012361819 -252156752 -1013295333 -909341021 -1800907895 -1224470447 -339013528 -526249605 -1339452889 -113633922 -732364871 -1627605940 -526338094 -679203865 -1503775250 -215585207 -535661560 -612390696 -1708791248 -1355693805 -344285965 -1093268737 -697579027 -1097477816 -572609429 -972450996 -1633336102 -196406713 -325259952 -1298131649 -1412254870 -1778333446 -1920311623 -145716998 -934227806 -1313792225 -479067121 -764910044 -1005998566 -679145931 -530078512 -1267383428 -22979803 -1821976208 -984805283 -965923952 -1454973591 -344855548 -2076315630 -27529660 -982011515 -1255705410 -1319026801 -409756426 -1943679500 -2047601983 -621085106 -1806852122 -197362227 -1352198221 -1723547793 -260842568 -966916849 -962724294 -1365412760 -482005478 -757752262 -964240724 -1082248006 -155746752 -2000578818 -576733047 -1558622018 -754730420 -1715749758 -195770790 -374720326 -1502466078 -1834651520 -1417893014 -2049339186 -1900968516 -1463631993 -1985213613 -31770252 -1386680908 -1453483512 -1070901559 -582056606 -837364957 -1132493508 -670825595 -276628415 -2139158797 -1818166752 -1383787701 -71993697 -964772218 -1425133076 -1326493341 -1345842680 -132668909 -678327977 -1815111163 -1568110906 -1320681158 -297247114 -785282076 -1948840517 -741985175 -107298096 -1620319639 -472045066 -856832244 -1901671773 -398370510 -1706633871 -1603880565 -1205918811 -2074279738 -170031168 -1560590066 -1619458451 -1030443879 -1362144945 -1394413595 -420251454 -92472395 -1552865984 -649831097 -1756902284 -356540938 -904169836 -788147480 -715561664 -536463648 -1208181830 -1454134425 -1273378115 -1991436450 -1539776655 -1848294235 -930253790 -1094498370 -2036668035 -1537814712 -1086172939 -1697586273 -2012239916 -1143795256 -1640743295 -135047938 -2007962734 -124157733 -1512397294 -1244874366 -1817780288 -1330938194 -888559406 -416655404 -1930685808 -558468886 -1683029612 -24090600 -1163788564 -513338272 -1234527505 -1864262868 -879612746 -373996074 -67380949 -747727874 -2135559721 -1458038536 -317778635 -113688356 -1647237109 -1902397486 -1858010666 -1025552435 -756024223 -1985860309 -163371689 -1303876157 -1323436711 -1512669798 -1529881800 -901707069 -198611804 -879002390 -853161017 -328901700 -227964522 -288895006 -2145323622 -203681824 -191482650 -1318395344 -534276862 -962091527 -1467916026 -972512246 -515281205 -1677147731 -2099048042 -1986572625 -1397848466 -168069882 -809510969 -1141952238 -729910827 -1184677725 -1557632738 -1307770636 -205952207 -1842587732 -1657821984 -1561248910 -1955231324 -778096074 -1432789135 -1152858134 -1489194904 -2124329390 -1688426355 -532837027 -385104799 -2088128382 -995957000 -1561754282 -1859083940 -1884199377 -945070577 -1012134427 -725346702 -1784840142 -1756685298 -1004624530 -1208042996 -1268235034 -1451019963 -468222809 -1040668255 -1404540617 -973902095 -252153231 -954117886 -598917853 -756501882 -1423940534 -610792770 -622252730 -2103755867 -1654092461 -1156181612 -1512314828 -2006351951 -969015263 -1871030040 -798839259 -23664969 -452659288 -1457575742 -1129534465 -330313775 -338388930 -766049254 -825348213 -1030539918 -828788771 -873939755 -1664800452 -736760001 -334628205 -1984053589 -2010083354 -1405679721 -791470200 -725941882 -1050612167 -1028145135 -1381860183 -2035937023 -2136597910 -1727011883 -499744729 -401116886 -620335069 -2085882145 -1898157387 -1461627124 -501635035 -2106718770 -2059479301 -527189561 -2104907852 -1688151533 -208870967 -1506063171 -13967808 -681231533 -1223052974 -137864934 -2108574272 -1032646710 -1877903563 -358023382 -49802380 -1657461977 -1953062202 -828884619 -337373444 -878645228 -1292790224 -1833238069 -1284342174 -1580782421 -1689952710 -416481748 -1159533063 -2005576963 -828693829 -1425733208 -675493630 -1422881368 -2136742631 -2011854083 -1101550966 -310564775 -1276911215 -1242706034 -1881846363 -52669925 -460166911 -936660330 -1395033800 -106618654 -938356180 -1979897339 -875466308 -1551772959 -1606712745 -1561727837 -1414622825 -774363838 -982124446 -1006253080 -661795435 -978068232 -1552941086 -1912070411 -1222103969 -1367807075 -2068552037 -541324576 -1301420140 -847348285 -1418562738 -420488572 -1930230974 -1504008436 -1987258662 -43170443 -1863646462 -1257095339 -1057243387 -809910031 -1406536331 -156128941 -1981578400 -1211771124 -1649856567 -830471505 -1238362682 -1897573297 -234761082 -702045635 -1005830827 -7440205 -493473909 -234143849 -1065628839 -10281093 -995638291 -500179413 -1264399933 -1418986866 -1106356927 -1627456363 -159881102 -619638917 -1123073716 -1266171329 -1126068380 -57881649 -6782652 -179398873 -89818123 -2039673067 -503780008 -1650057982 -2068169763 -558896399 -278306015 -269810939 -1374472956 -285380713 -1062659640 -1646561028 -1276922354 -1429919207 -162618472 -1529459920 -253620850 -1998070302 -1365777575 -171000242 -667947608 -1298424787 -2044057942 -1185930135 -1132051138 -1825847593 -1626663568 -1867761066 -1691768063 -862348561 -125131124 -692310655 -598779139 -572619331 -1138873910 -532059659 -204782705 -1514120441 -141034937 -1699723518 -1425694632 -27146798 -989700822 -1640869339 -105985799 -1039380430 -1234902312 -1721193176 -1488983942 -726174703 -668667420 -511403189 -923842229 -709574993 -850215560 -216729782 -445180762 -320040786 -1626438214 -227720035 -474769291 -1545725232 -894296465 -202641902 -2040866419 -1233094249 -1397849393 -183649971 -671061858 -2100017009 -1092131818 -916734217 -1504301541 -471023456 -866502150 -1215024743 -498856278 -501306458 -879292425 -1432811968 -1536612365 -205679733 -1558084508 -310734438 -1980953609 -1448327022 -305120009 -2108525874 -219221524 -1521699263 -816761118 -588638602 -1939305732 -1552127205 -1118074326 -993285832 -1764590293 -719889381 -257959269 -1899434437 -1450170004 -1215347425 -1627205358 -236207361 -1387336671 -1737474018 -243188620 -609756099 -378792409 -1222488355 -1385731636 -531454537 -771915486 -634861675 -1421413429 -1087411975 -1047227855 -2130071820 -1564683250 -1694125235 -1824632719 -535629073 -66381687 -1133000616 -603855163 -2133492466 -1073422103 -2142650321 -370668504 -2122970428 -323188491 -842824974 -557202406 -1872136722 -71490810 -1102684997 -42870969 -1125354238 -940198937 -738859533 -1261724177 -1544712361 -1050842744 -608485480 -498335346 -335936922 -357340091 -1450632425 -397322584 -1274010765 -1886966765 -211920459 -1219267687 -943055735 -1508423285 -1025698160 -1057740651 -577491491 -1420888444 -853923668 -261875175 -1142073522 -620847368 -2106156850 -1205224449 -1141555839 -510083775 -223287601 -1140778698 -333576870 -1494135420 -1407719569 -715457184 -927951935 -1061927031 -71019800 -1776354515 -872673011 -1849470514 -1372622120 -1390634766 -1333981861 -503863147 -899891508 -1896732782 -1140611006 -1810144720 -1848965638 -1477105776 -805817912 -1349769002 -1697853353 -58602535 -1385295419 -1789890006 -730403666 -877888210 -1454490580 -816824259 -1649849389 -709830859 -855588128 -319166984 -1972833529 -265612223 -1673613495 -681202059 -727683456 -256475327 -581141360 -487210964 -199525937 -1210450192 -923788913 -1960976628 -702656287 -531640756 -1754214572 -281321941 -1566355340 -1879654454 -1867961008 -757225963 -708668019 -639089071 -1604297650 -1773415465 -868183542 -1556892676 -1754450484 -2098811278 -154763724 -511212751 -2018118057 -1153463281 -922482298 -1475534793 -172110395 -2146419903 -1449007415 -1003066925 -799179525 -1447548337 -102663096 -1029285931 -1227865732 -1568993701 -1125431194 -86114782 -2074646643 -2041636209 -1286052897 -268132824 -1087681562 -1283209270 -1867417716 -216051907 -1937037519 -2084976960 -1717098621 -1391274761 -1352959591 -1634991501 -101410295 -1448295994 -1931116060 -1347263309 -386860395 -1529659296 -1457049635 -877188704 -435311473 -1950625029 -669507301 -1742381274 -1115061626 -1898444460 -1991495741 -388796845 -1863319741 -60862786 -718628330 -538311582 -54153863 -1778392760 -769718374 -215222290 -878566482 -2116789849 -1672895941 -1506173863 -1874368252 -1069593521 -72698410 -2071465374 -113655654 -1097614595 -723970435 -128757143 -1505269872 -1713377044 -1119755885 -1337960534 -801427201 -569533223 -810264282 -917981947 -1000063181 -1854861645 -1787047663 -203785099 -1927225575 -384391324 -834172292 -1160464028 -472436542 -993918435 -1659330679 -1148082011 -673790582 -717041043 -1778066384 -1726767883 -693804023 -2075494998 -1267553165 -728265915 -1455929152 -1372583746 -745682948 -2126226791 -1365790257 -384146616 -1016332230 -410861372 -1187154099 -228377616 -789314923 -1009423342 -257297694 -1517761647 -1209242063 -2093601280 -637156865 -1341966113 -1551200397 -573597799 -404116410 -1641211056 -1554256124 -391593960 -1629791312 -748663299 -677378520 -889972893 -550811296 -1830933302 -1202828851 -1680929546 -1235503337 -1085202116 -413349641 -57818242 -1088584850 -1432385157 -805650829 -689088668 -133934805 -479405579 -10922709 -1041860168 -2109669585 -114219478 -1983869975 -1071566503 -1020352179 -1402151158 -1616453975 -2073823275 -1088192115 -1274138953 -1893938834 -1427367204 -220776991 -1894629368 -148270260 -897229300 -102675866 -1243911321 -664268502 -1740716008 -1044223375 -1025900341 -160829424 -1525701242 -1506029114 -1589055456 -1148414900 -1973688711 -1753754215 -1134036430 -832911885 -1451640049 -152589976 -484252114 -2009741515 -2102842589 -1337014644 -2083723147 -2119100000 -1844898152 -1834345278 -565851014 -1200403382 -1718261356 -1606009083 -472698838 -1107360013 -1306453589 -1692663395 -877807956 -105661602 -2033052392 -899244927 -1767064150 -1495814687 -1713872627 -859084778 -1105305065 -1128680905 -1016916384 -1638803062 -1885290259 -2099655175 -1453238721 -1251666516 -9328400 -16112569 -221007661 -1476532764 -1912623463 -1927314345 -1876348714 -2142963650 -1341821713 -1271753244 -452033317 -1674299380 -1471453019 -289211481 -1021868006 -1108851783 -608828215 -1963715197 -1632628883 -1195078862 -275883243 -352471228 -1224030570 -1535935377 -1712444299 -475496199 -877966106 -616205005 -1391373201 -859957024 -732758058 -1793448908 -415327464 -1086834698 -2082351551 -541522498 -332927900 -1324314865 -1239418547 -316143529 -549749225 -1160575181 -193101366 -606867745 -1226350612 -1874175625 -2127078826 -653556973 -2100674453 -1404374891 -336028860 -1902542057 -2140331816 -58260615 -2081096920 -929775751 -1650031485 -1622834684 -1940217088 -1836901968 -586466904 -1946799445 -797426423 -2047934081 -1907688898 -596458976 -232345436 -904472606 -1581835576 -62975972 -1875207080 -135390188 -1317707543 -1859307337 -1343865462 -1261304335 -930878808 -861757661 -931293059 -1381623277 -201741528 -1940666130 -794016274 -568134660 -926936058 -1167951468 -1759789096 -1630549988 -614828949 -1886320126 -81277021 -223292455 -1222359876 -1373868730 -867572566 -2025637279 -827492262 -558349462 -1823354091 -520564747 -283324951 -871206058 -816711560 -1903200943 -329326936 -932455033 -1583567472 -1253664633 -1379426114 -1928728633 -2023967013 -672619011 -353800069 -2083024787 -1119181715 -277819932 -690148546 -767435175 -496202343 -993777500 -1438119781 -550712282 -166805004 -1025542893 -595651829 -1699011336 -193469993 -359930793 -2042887999 -850050957 -1745214455 -1487694459 -528670392 -1223430705 -43938910 -1894369449 -74778921 -531391752 -1864171638 -1493793783 -2108277451 -338943457 -1496049955 -1373054609 -69542801 -574752439 -482798067 -1193893703 -1831752400 -2084507055 -261856227 -823614486 -1956561287 -1655947745 -125685095 -1412966664 -856553322 -1508797013 -864493715 -1818996050 -289413658 -124889551 -927160538 -645819534 -906556000 -90216535 -145848963 -1004679914 -2138881884 -1459057255 -259519692 -208176387 -569675346 -1051441896 -2088498556 -775020477 -1280837884 -666238860 -496784562 -41713998 -1007495464 -67706853 -1930229108 -1472646574 -1021937543 -130076495 -57298819 -948577077 -1963821458 -1271073863 -1918578732 -1085789019 -1687493774 -2038817336 -1153894620 -1729545930 -139799718 -266750608 -1479097367 -2066233144 -222395571 -1180816017 -1078415792 -172235464 -2100970939 -2092447799 -577954521 -613099066 -729463956 -116567769 -649407519 -1080277779 -1401879915 -1352640168 -561416434 -1830344967 -2052100741 -1069783167 -1112595085 -1245479166 -1245235653 -1447479956 -1100867276 -1704688827 -1125780762 -1666336864 -789432721 -841770681 -17569131 -1079125078 -1355787031 -1911135347 -538868850 -830222551 -1349160098 -53938413 -304808257 -1163877304 -2004791452 -511512334 -610758597 -47907119 -2016065055 -1008397019 -187756209 -965127220 -949200749 -1708458527 -58619252 -1666258038 -1612087786 -1705728750 -1423897447 -2034113208 -1548510263 -457672248 -1958532229 -421831587 -879963962 -1981916092 -444909627 -58042135 -556587207 -122421717 -252463793 -1878766126 -1970217841 -1400900594 -2073061297 -1166529751 -1487311594 -536309278 -761168887 -405398630 -1716646126 -228642237 -941832776 -281504195 -334531024 -350732522 -2066369886 -373134718 -622956186 -1041838977 -1753512448 -1365625755 -1914328796 -524075018 -1298391179 -1479208286 -1782965130 -308129672 -1152324387 -1108443663 -192006316 -1529715218 -249447042 -568355950 -351189794 -1161805802 -1548795690 -959876543 -747901937 -766069268 -1161723511 -165730853 -152156212 -1783915154 -1242797511 -1271816655 -1517781994 -1551214092 -803769664 -1284603218 -1673181635 -2012865627 -922701798 -869703999 -1341409711 -789686571 -813260337 -1880554451 -1961825058 -2077317415 -1832144626 -86714849 -1422554477 -937652888 -897086930 -2004830570 -1168968560 -1674185164 -1699308354 -890484225 -554833632 -714857750 -1590682932 -584116621 -1100298710 -738734653 -1310349664 -602002863 -1066657424 -117840012 -557159150 -1145133130 -504071496 -106645857 -1395557001 -310123273 -299038042 -820637914 -1321439564 -158874874 -887834097 -1111288923 -767650902 -1974442385 -1535851251 -298538617 -1016736527 -763430110 -1902551592 -153102914 -515266492 -1429866340 -1421566450 -1511752275 -1141458268 -1017691625 -1783376667 -782381090 -436609049 -136664744 -1264333765 -306901290 -1981744583 -1857325158 -241637714 -313482721 -926705756 -1592233048 -867112469 -735237941 -523169549 -1112559225 -642780146 -1363169412 -1432761288 -684833605 -1633534962 -1391163086 -1623521513 -598850209 -1767092821 -1977688184 -253420222 -773599153 -1014965533 -1063105010 -541960030 -1244077283 -1306108189 -182492889 -551337507 -2085026991 -410485991 -1320576573 -686970666 -1043897190 -1986159987 -905092541 -1263664886 -1949953819 -125899066 -714209967 -1440812286 -706487230 -493790347 -1257550021 -109149173 -519116073 -1705264797 -68690317 -1279439380 -783902249 -232924598 -2048513752 -912801160 -1973405599 -1290458125 -1292355822 -974694596 -686815656 -586127767 -541891180 -86915333 -497121771 -1414218367 -419089173 -2032852098 -1827870963 -1273704806 -1039681146 -1994068830 -685030728 -651613929 -1656188650 -2027091783 -1651020873 -1071609624 -1745086826 -1490117503 -450581607 -897729527 -2067540114 -713803891 -1058343895 -2126278811 -92606750 -1663486822 -133417061 -367616759 -224416094 -780007726 -1349669594 -27103097 -255218115 -926015746 -732653213 -31318993 -244821836 -141930000 -1710661830 -582310774 -814199239 -480811189 -12689862 -677629581 -814587826 -569341957 -1890623914 -1548081586 -1842832497 -1476620045 -1232071583 -1389771107 -1850850577 -945020844 -176271896 -1221806859 -669246599 -1655730054 -761919752 -140284803 -1977123262 -1496194403 -1653308498 -865017353 -2029845328 -685211454 -1541592164 -149299293 -1012317755 -1659056751 -839141409 -924551214 -1888067653 -1534675899 -2019234023 -582151020 -276697408 -1151240501 -71440837 -262788786 -1464748070 -1415766929 -675966943 -787918371 -1159893995 -1629310146 -1251640925 -1726704110 -1769454859 -874271557 -798945725 -1813039031 -1101526734 -2050781198 -367060436 -1611713668 -1860378465 -18960935 -848854789 -968571702 -858551254 -728301785 -2058796242 -1931918830 -1954516817 -1654278807 -2140615187 -525909718 -2069423021 -147567135 -1964709307 -1160766477 -1260729591 -2008574635 -1818443252 -1735955907 -498100807 -689007243 -912908477 -1629598771 -1807594006 -1928788380 -880651195 -647339241 -678467785 -2017380572 -1643454768 -609618062 -206288197 -1047120721 -329470682 -1200910408 -1649912750 -1774739186 -1641125919 -123358565 -965682600 -1693537821 -541900209 -238665736 -1903056003 -40804003 -745595028 -648555351 -1790275732 -770849607 -2047986145 -635244899 -1419808256 -2026556775 -1249076005 -1567766610 -1976549227 -438322746 -1021482812 -1077347166 -1539191105 -596889973 -1033661074 -1746450135 -780931749 -1847338626 -2049202503 -1751220982 -1507662339 -1121380620 -727594268 -904976258 -1456780152 -642955217 -10620415 -256172204 -1929004040 -210281521 -1590924132 -342997727 -916689141 -746709209 -47242595 -1584828422 -971614813 -464510303 -921605676 -1774534368 -346233440 -1612226357 -1887207900 -2117192757 -2002119756 -705474249 -648487856 -655887267 -463736418 -799822363 -1514308368 -1152040379 -630088501 -655572950 -1623461540 -1738367645 -229992080 -6323960 -1060097017 -1526229207 -1789602281 -189576885 -1500457694 -291996337 -582302564 -676213769 -641355659 -1044136520 -1713612003 -773744504 -1310396143 -1383175416 -518737937 -1792383986 -1844536233 -46539939 -512707265 -1366611091 -1295001772 -348019659 -1568438032 -376236899 -1221704725 -1100164108 -623962486 -774853901 -628678699 -583350853 -1114937816 -1965053437 -502108446 -1473402859 -847917656 -250562900 -2142712180 -1410332717 -1684962680 -300909771 -66532512 -1520432744 -1005212755 -356922336 -871875081 -1323562886 -1485809376 -1058335116 -1978730158 -586008064 -677526506 -1229689948 -16337308 -1850712387 -769945161 -1879347752 -1008187788 -966178086 -1431236435 -826432998 -2082652237 -1300184806 -1559926217 -1199566543 -538410165 -1711038344 -467930631 -424999903 -442759799 -433104938 -1372613283 -1242111307 -476204262 -2040962712 -704007053 -1759128448 -1264457287 -235451897 -1575155105 -1600933166 -1061107699 -1332892405 -1520728978 -1689050299 -282045600 -843990271 -814996262 -991474868 -1392489403 -292611215 -179138875 -14999031 -833127318 -777455186 -1398802754 -1174402769 -665139006 -1338891207 -1410862783 -2003847354 -1823926424 -1549830890 -1178613767 -572422041 -2117988174 -338307746 -1549073413 -1332599710 -896371407 -716453744 -497266679 -1702203476 -156675798 -435185764 -1985317513 -1778017552 -906048459 -149909536 -531253621 -1690087568 -535556507 -994248572 -765492297 -54506502 -1262745492 -1530084390 -11669905 -715081458 -1055575994 -703323291 -1004558749 -102461729 -1939878056 -433758438 -1618569548 -1123036687 -643824926 -1742917696 -1540771592 -1390331218 -527217919 -434037111 -2007259365 -1187536832 -218520206 -472065872 -1206518686 -1418960628 -665374861 -1007938898 -1078051150 -486148311 -1666869789 -1156368608 -360189306 -2092748696 -1340163106 -1312832806 -1533981164 -1080241113 -785634453 -1428789815 -508279951 -2118672338 -1099633859 -302002131 -1245957856 -700643895 -1069106764 -481708099 -54670703 -1874988052 -749153886 -332739641 -307729499 -869067717 -1384836372 -517138018 -672349117 -112658905 -1525123328 -382963104 -452398869 -1375680903 -1259993119 -368107966 -2037681202 -1386243305 -541140832 -360718379 -247460372 -1538131612 -2117343945 -248169178 -566132172 -1630858594 -1506602697 -491846702 -802963211 -615449529 -1578989951 -1628680478 -1406229084 -1434679553 -712858755 -205828672 -1913818634 -539716872 -50542776 -1216395667 -2065139476 -1168470318 -1890166458 -302069535 -231333237 -1072313189 -685001899 -167084926 -1435224653 -1284419867 -739085025 -756600927 -941106202 -954876859 -470075182 -2108730208 -1505979415 -753764363 -511615288 -193622828 -781144991 -1136329626 -719951411 -1300497479 -372570387 -1875663304 -1360696015 -664567202 -318515967 -1768609045 -1691061188 -1866802318 -610475956 -1740010773 -2076240612 -914185781 -1622410629 -1255575644 -1285533286 -124965335 -53378579 -1633096454 -463610071 -823791981 -644752458 -152078844 -483591178 -1638808398 -1974972411 -1854063645 -1259963545 -2018541395 -1826054106 -802560265 -285587048 -235564691 -1323400216 -899298333 -517175145 -1296342606 -1408580227 -148150661 -1034612554 -558105319 -2015009984 -455687898 -819816484 -400567436 -2123147154 -1145938726 -1158821586 -785201259 -590549198 -1838437999 -632736157 -57570755 -1224038135 -1663080332 -1891474219 -806772192 -208483786 -1441163045 -159242802 -629149052 -2046122783 -1529974470 -311728112 -1501763351 -761337066 -1084499436 -1488308763 -115859485 -1630180213 -842471465 -1058227584 -171439834 -1613719411 -1211162714 -14244285 -1033013178 -1594680298 -1195853926 -417482009 -791050514 -114730221 -1977992988 -1081293756 -1297536178 -2141592008 -1910954736 -1798307067 -462027191 -2137615232 -1645273561 -1113300955 -224134374 -340106980 -1724028193 -1892474427 -437398872 -526318023 -341870568 -1299880651 -742960426 -1465956124 -244694037 -141495854 -856420949 -1431487649 -753619402 -222739408 -517233535 -130219689 -316476730 -1854891138 -135252867 -1157237143 -2072755169 -316403749 -628299471 -652116798 -1517973345 -472283055 -561746073 -928136699 -2019771932 -1032852995 -1049968264 -943485649 -144053295 -889658896 -1715914658 -819761443 -1622976996 -37087578 -560665816 -2099610123 -696049757 -1164840690 -1016550778 -1936513961 -1875472242 -297000628 -937559168 -1469418537 -455410859 -458589305 -191640052 -1816367111 -1201992472 -508809575 -282644671 -175158333 -1833506341 -1498222384 -1377846813 -1155220490 -391122903 -155187254 -1187030520 -298869010 -127200737 -1116557994 -1278097672 -1856136010 -1730463748 -533181315 -1876585921 -1834734405 -663457562 -996149310 -498941158 -1927884618 -723508790 -959824216 -2015925695 -813657146 -2107272373 -626466687 -2060770815 -758828889 -1879241537 -1370515930 -351637788 -101306372 -1849145780 -209785076 -1837107605 -1895124316 -2024410355 -1681417064 -839283775 -1169812929 -833109418 -476609886 -268350692 -454421744 -1014402676 -193101999 -617506576 -1792040528 -367004921 -678673063 -1172520624 -1244182696 -930300833 -1885150071 -1890999106 -1411482589 -1683508561 -1631335502 -932060865 -1401236837 -1281846457 -437456095 -1488064984 -313633126 -1307078944 -1465586645 -477311425 -1321698430 -214668442 -159977734 -96249294 -606698067 -522056113 -1726393196 -838890555 -1003415330 -212371419 -208617819 -1546372029 -1027595409 -732549889 -442236172 -222440537 -1936559579 -494690321 -1351027510 -1374760839 -828863000 -2121506558 -1489729165 -366235782 -636655772 -1510030650 -123394304 -1566347973 -1755837285 -1784455568 -1735601021 -975982746 -861916236 -1448979437 -532840679 -446483963 -748103523 -2006641523 -1540884573 -1141719238 -1108847121 -530473981 -1471579970 -275393291 -707782552 -789430731 -808324751 -532539135 -1820884896 -1970477322 -1467030467 -1121307662 -1648872809 -1476319975 -483762387 -221350767 -800664365 -633450453 -1325325392 -1043476660 -1360763218 -1794048023 -1894718681 -1649353851 -971258281 -914727920 -2144206214 -750758391 -1529851412 -390975953 -1980365898 -160602833 -2012353599 -906981790 -804018124 -1165503144 -1412996921 -1365082721 -1377490946 -1616614762 -481203090 -156919028 -228185080 -1848329665 -1525725800 -1918775420 -96556941 -1482353902 -964242067 -1104819807 -1562884287 -1523725152 -506139189 -498623756 -888276498 -2104271589 -1731897527 -1008384851 -2130732280 -1927616235 -507763003 -2020261890 -677642513 -1031935950 -669578478 -791169466 -2113956485 -1297187427 -575101245 -2050213215 -1558388390 -1123111918 -1908232343 -1140204503 -1420499740 -763426481 -1841558989 -1547607559 -318311649 -482120066 -536149131 -217061905 -1732204729 -1876561571 -1425483955 -781265753 -1018492913 -218238554 -33308002 -1461841394 -1955387278 -1251731305 -1098237123 -449380296 -34648373 -367136674 -745562087 -94915964 -1819740874 -2070252391 -1201886843 -880986619 -1989843115 -530399074 -212618021 -58290339 -433184541 -563017257 -818089717 -1443565525 -1883018516 -425692573 -1347046254 -1033784304 -1670093098 -1643431796 -223527658 -880449403 -1550788391 -91463898 -1782926081 -1799316776 -252337178 -1898231468 -559222844 -1469899836 -2102152211 -471249833 -376253095 -1493910897 -1929128802 -159672808 -1413808953 -2128002663 -1148099903 -974501426 -1735174760 -254265060 -2087889537 -1276656379 -1254644676 -671139639 -1259798629 -1394281830 -353160746 -2075341361 -832859753 -575457525 -1595760234 -18985455 -1260962429 -1626915607 -1808813245 -945701783 -883395434 -1672607527 -953767059 -1145019405 -740179068 -1964312452 -933275433 -339644743 -397661875 -534023661 -1001509614 -395257312 -922722613 -1219541704 -1253492160 -628156050 -389123698 -914287171 -1178988712 -431671715 -906754439 -1277897161 -633631280 -69517487 -149300041 -1024889391 -349661950 -1253135458 -1075516477 -835572140 -1065389247 -278425643 -132915088 -520891136 -1473977580 -1917318915 -1386881170 -524319652 -1114987523 -652995339 -1251226403 -1202283797 -1110141556 -811206556 -1722395536 -222211992 -242887411 -1989787377 -1741094155 -957289063 -209798517 -2063010492 -1893858229 -72638969 -1072440487 -677015738 -1235146760 -1534663418 -1809465856 -1176716625 -899411152 -265840431 -1214138057 -628710205 -1112872195 -1607899642 -35069246 -998298244 -108852897 -1982056282 -653599310 -664748765 -1222561661 -470301931 -1624733357 -1638959494 -219475589 -1496802424 -1134899210 -301269816 -1822841533 -495937029 -829612396 -1831703248 -1258409391 -1667678881 -1869875970 -729737592 -420600727 -1667736412 -689315840 -1804530962 -1987815400 -810331421 -2046387120 -1677719135 -965216835 -307876407 -1190666826 -1284721836 -1519310714 -1474607368 -1764747596 -1216197255 -877912639 -1865068783 -1539724269 -967842733 -1491671153 -792973393 -220302869 -368511855 -235909037 -668372497 -1997083269 -1956583120 -2022894976 -1982245975 -1694285914 -230197378 -1309283799 -2015362631 -2087658733 -1692500845 -293313753 -1249276806 -647661723 -1803455465 -1091806497 -1891515111 -1494044036 -2019312328 -1898223155 -419506253 -452781070 -1356882169 -989766890 -603790568 -1047844301 -1753261507 -1443027662 -1433089663 -1908864936 -1034776819 -1171423527 -2132626240 -1547147250 -1171832874 -422586681 -685926938 -681829870 -541884698 -2125456006 -1296108644 -1771348187 -483180548 -1179800929 -1197700952 -1395676933 -178336750 -1566069685 -1373618163 -951260291 -1963442569 -1345537381 -1443959557 -2063063399 -635582531 -651938339 -666096579 -252951442 -1484748281 -404380627 -1786938881 -522969672 -2048193780 -1977482697 -1094767507 -117602653 -862833731 -1836932373 -1097483739 -672157290 -1183589810 -452914509 -1452107795 -1571546057 -1073205546 -650460469 -1597339253 -787754024 -545197613 -1971043589 -246861701 -66202703 -272300175 -261389468 -1568730561 -997804508 -400566533 -2107970433 -1621342872 -489652921 -439307943 -399819615 -291937842 -1746660746 -25703532 -355049277 -1603627173 -1242126761 -735939640 -1579206407 -971689176 -1714329244 -2090995756 -1943271584 -1634208712 -1977461101 -731803535 -783166376 -750008969 -1819217740 -1867873841 -1439693841 -1236134938 -963101888 -1269184177 -223397188 -835123760 -2119401175 -464295436 -1605303301 -1495522646 -1100506834 -2089191074 -1676752268 -1894952342 -1281526984 -1510524325 -1978139088 -1389312809 -590687032 -2007530390 -1447686713 -280864881 -326998861 -459204154 -1935472607 -1553304740 -1581552248 -1743533217 -1148414804 -1972075239 -405934075 -2125935653 -767601185 -1138848766 -109464451 -1523026125 -1642494282 -1646599036 -1915722810 -330948199 -263734863 -185595033 -1149464187 -281702497 -1519909091 -794111372 -18963099 -885225137 -212171143 -1137546381 -1842599873 -1861875771 -1561862760 -1534790039 -1790101356 -2135079469 -1976377760 -1851444171 -184136967 -266069042 -761435840 -597110407 -443528018 -459659789 -1003395464 -2025967204 -2077574443 -1857046928 -2007877045 -831466357 -778971070 -1106461378 -1235480673 -704288268 -43058012 -2121502292 -1418030503 -65149515 -1898722282 -218399154 -585028555 -1394787919 -269063981 -1705251732 -1996590509 -117216741 -819261688 -1813529299 -751526422 -1553246547 -603502497 -501202298 -1276158952 -1484323675 -1857962173 -210530584 -1481958679 -764180047 -1621840869 -269553912 -1349587461 -794177413 -1128914186 -642702857 -64173189 -521996729 -728326308 -323470656 -1290204835 -1330278086 -531542485 -102573875 -1677232231 -1371755895 -1864376720 -645639663 -30947750 -447791676 -1251999444 -1309882002 -1331942217 -583304791 -340773782 -46067525 -1162779755 -738154585 -151081376 -899015678 -61559854 -1696831971 -72104437 -678495751 -339921487 -753930989 -1164614823 -1515371403 -1838600448 -1215532853 -448726460 -1930528603 -63808098 -828363233 -164373530 -961948668 -1214368460 -206126132 -470777913 -1034628243 -821790342 -1362944137 -1941531657 -308543034 -1657248580 -513982470 -1324145056 -532922331 -1818809127 -1442766091 -1331833160 -897867439 -90459804 -2086987399 -1146808542 -745433569 -82397585 -1876742427 -170163453 -1636420414 -494830969 -1567414799 -358629044 -1639229026 -454532619 -730395154 -734827026 -59372085 -1434220387 -1585590381 -892957844 -1326758872 -1513654903 -906672359 -2045862248 -1446130019 -2034796234 -143226363 -2023798301 -2132043721 -346685005 -611744724 -1589358079 -1939632367 -599430709 -786138086 -1303415058 -16196759 -1635988991 -1833839196 -650065428 -1400336107 -1175662876 -368920885 -668025306 -456811426 -375598757 -1233870366 -1557145930 -1715923168 -962789013 -305661346 -469358598 -802521155 -1775748925 -1431940116 -1915781330 -1314493839 -1533675384 -235963947 -1591244867 -1438623578 -428093873 -903506061 -369499290 -1799343553 -702378217 -153085560 -223597814 -2059561295 -1905262719 -621857816 -1908887210 -1409135937 -898034043 -743089585 -1489247790 -865700745 -630712790 -410579938 -752060155 -1933762490 -728655732 -1565132530 -655239607 -315933033 -1306910247 -777779813 -412357802 -567849345 -426614147 -1803554943 -616249596 -2140814138 -1722195528 -1155644830 -1080554342 -1755106962 -247335142 -1580874649 -1092545059 -1419624763 -1090073571 -683515240 -950610877 -1786159706 -312277329 -2142518882 -309056878 -1703490100 -306128896 -1885020507 -1860900605 -204633327 -1151008042 -459469718 -2103839461 -911573172 -661964106 -1665438082 -715989176 -1279206891 -1171426920 -42168744 -60476898 -675459655 -851863543 -2144576299 -528326045 -1878441617 -811162372 -979795048 -510766540 -961100721 -1995308760 -49697768 -2046731740 -1027296534 -4325058 -1824289455 -1208841966 -1811621942 -906832028 -434451837 -387624659 -1489742462 -589718461 -761143122 -2119849922 -1563935324 -2008634835 -682741005 -822945114 -1443844318 -126241526 -27484246 -218738417 -1992054502 -1189958384 -115355377 -1747571645 -302797496 -1728755529 -1887915640 -1127277055 -1044729551 -943265785 -743766341 -2126067647 -838540696 -1565786058 -901666468 -1663714444 -1811576368 -140869810 -1071917676 -480065849 -370662364 -2019775448 -1091946407 -2095498834 -317092238 -1462315859 -1339785945 -1416338820 -1697804392 -1383198655 -909315810 -1377186618 -796741360 -1271498475 -465098028 -62081516 -1874470617 -642558429 -1931739087 -1081059863 -1661463821 -492577606 -202364857 -1679538398 -1476799018 -2092587147 -772492710 -1746330855 -923676436 -70575689 -754631879 -59571171 -485291495 -151265159 -1840372912 -940564243 -436106534 -280829727 -1883649230 -288684536 -755437979 -722791989 -1797451691 -1118108288 -1564085166 -232062035 -436319293 -1709186593 -1557806279 -2076990576 -633928847 -775758762 -804291997 -1473519361 -658483123 -1142615270 -1136071416 -675183235 -501039897 -694168992 -1767078040 -1729263917 -1842458168 -1627723483 -354399648 -1422730805 -1753713937 -457084084 -663194469 -869312553 -1204827730 -916350547 -1498410792 -249452775 -664710481 -579122473 -915515507 -348795394 -1721314295 -1377147328 -136394330 -1014452961 -1038241994 -1428561283 -962309921 -843496690 -1109314983 -1951379674 -467923934 -312443424 -639110253 -1960303524 -127215594 -1366259593 -1829825827 -1916849349 -2084819996 -1226488320 -2041150334 -1709886360 -433888366 -1654785797 -2071661529 -1262949092 -657022296 -212815998 -1238206131 -1413904287 -1582797554 -1198554689 -712049163 -1631401457 -2040566550 -488163260 -1172379280 -1016097735 -764671201 -1286731559 -936986823 -439950710 -465386349 -612925269 -2103425071 -389371383 -782161672 -1043818017 -655499376 -386903322 -103649738 -431908849 -597298283 -1453676303 -16172602 -1229982292 -634795622 -311260658 -87714914 -1050777756 -1663715811 -1834551537 -1884962380 -883960116 -425799666 -999474658 -553490172 -1757645647 -2112824644 -1601688563 -872163196 -1870944397 -1506921005 -1546681964 -1941705660 -1085527808 -1592287791 -1787178070 -248051901 -742541280 -863820243 -1237370381 -252355919 -65727808 -880674498 -1038992762 -1161817177 -1739975315 -1480298006 -770536347 -1077992619 -1649901441 -1584668823 -436718067 -1968930270 -1235531267 -1554621626 -92135133 -179470844 -1299434720 -1838132697 -1943976384 -594880430 -1619010225 -2087044085 -2099530144 -1499326351 -604867359 -1965601462 -1122830033 -1465558442 -3303604 -1836581253 -1638660840 -1642448752 -881376326 -2097197723 -953032250 -1679986424 -416837412 -694726970 -407596051 -2141478874 -9511598 -947637708 -1208232204 -153286596 -1454926219 -1696157991 -1629424459 -1025415869 -608243108 -719756436 -171036301 -1273991221 -1558490757 -696110440 -37256224 -1247615491 -643227929 -299123705 -112892308 -1152960255 -1058058904 -1631402368 -2055877727 -125077459 -1937846647 -651605727 -1518337636 -152470951 -631282586 -1397206722 -119696709 -1697894571 -751353461 -793774667 -802413105 -2107236222 -18876830 -1582785701 -999341318 -459928439 -1223628720 -1224493368 -724246775 -478236229 -1832493729 -1659121676 -1930335884 -1119747159 -1191302652 -1233631183 -1832164543 -421459868 -1074933670 -1777753126 -756807971 -125927416 -1190688417 -1647601773 -1588854393 -2064116353 -1152711233 -1167713444 -2054287022 -1307385935 -182733441 -299327677 -1393566065 -1208200273 -1764105926 -1169067800 -1194628197 -1291491176 -1474974803 -1497776700 -329686766 -537666902 -2103918985 -100649393 -1544717962 -1144978751 -56907290 -810600115 -119876237 -420254373 -141532028 -1464397367 -1963952549 -1326836653 -673436523 -1208822371 -1482288777 -2017169839 -249148884 -1999665385 -257050145 -1652172898 -1106340976 -1359367906 -1965359356 -1348721785 -1277146410 -900661105 -1946447679 -1327746202 -927841037 -1345547992 -1622298634 -1520759326 -51625488 -86183428 -1080896318 -1060246653 -1893677812 -1335337744 -1817352258 -579488925 -632023330 -961989248 -1896396520 -1931506513 -1467155939 -1082631919 -165721602 -2144158302 -2092985054 -1017664718 -1331150718 -165482980 -281121995 -353346565 -903434000 -1305853710 -200431630 -1400046914 -610163419 -782168708 -1162072069 -1728977865 -1329749498 -237498557 -1613631373 -1878991695 -1466388730 -1073052138 -219615860 -1706853474 -999780892 -1405397716 -346779459 -51749455 -22213150 -1821741119 -1328631754 -778927972 -382113292 -1201994114 -536406669 -250535777 -1686855919 -2055806586 -1076894319 -370642517 -1686206919 -1885481821 -1024270415 -683950553 -1824465527 -2020600423 -2072399350 -778604757 -1392289728 -1231640784 -591783255 -1104397528 -908092075 -137225296 -2095596641 -1960934487 -2141876147 -244027968 -1831776053 -334559379 -827295007 -1538051971 -778817658 -675549541 -215093898 -868165785 -1258450777 -215769736 -1489556816 -1764533433 -1911727008 -1892980689 -356209718 -1779806237 -903706196 -1585684588 -328811246 -855187791 -33153966 -1020441989 -764104181 -346761007 -1889110338 -1879213518 -899600597 -1302358899 -1592685269 -2025139875 -1057557822 -1799651782 -1587815726 -1787109260 -1239045878 -495146587 -429555584 -1848162721 -867381639 -964210837 -579937197 -1723679893 -333563621 -1271459477 -1957142289 -683430124 -1667549912 -1849777634 -91937019 -1144736140 -274311507 -1853591687 -1917700027 -1349779613 -1876192430 -1663782109 -801338376 -1224135095 -1145203405 -1685183421 -1863420111 -1747781376 -1680262766 -766350112 -1586901325 -1451157182 -626978895 -2079516083 -130452056 -2074385252 -1943404966 -1728476339 -1490536604 -1051961173 -78568860 -1951870762 -131705362 -1663862724 -8751034 -1049740442 -1409448589 -1857808913 -1929657058 -448136812 -610249255 -77330713 -469686956 -2026266767 -669878843 -1544436727 -713229400 -2140291893 -1534758401 -1258361490 -862606774 -169949721 -191710337 -850163459 -1488551922 -2055149151 -764802509 -1346141468 -859431531 -490731795 -1392074085 -1902296177 -155310303 -1107631416 -1572956516 -1156469842 -2061629144 -152378863 -1231043217 -1285892921 -1874383486 -1325631359 -1890896735 -1838416839 -277100037 -1475775163 -2064525338 -1584071187 -1129668050 -427993223 -1359365158 -1919173720 -348334100 -410796978 -104884141 -1851167247 -1972326240 -329540588 -228336903 -105051532 -369540490 -344308306 -1468753924 -22678403 -1051313702 -2081425645 -12205885 -1133362730 -247454220 -1434734948 -1643882520 -1356394985 -1391599990 -376632453 -1427329862 -1740653644 -2143555274 -547828046 -1083574433 -974168871 -440890169 -1222488233 -1383681182 -429212511 -377102104 -730819631 -1426561024 -1703695260 -1606769369 -365923758 -1834919345 -1624260495 -134018801 -1891126351 -1402605657 -665284080 -1629666278 -794700508 -1330637263 -125779383 -850181433 -1790640940 -466449522 -1301804704 -868264492 -769935679 -1719983778 -489984579 -1718516655 -1601852082 -1472943382 -1715422305 -1134719160 -1570136760 -1009470984 -1058016788 -923558756 -240211576 -2114185119 -844871771 -597981233 -47115071 -1589016201 -488656115 -865858677 -1137592267 -466322228 -1309858093 -930103654 -718646265 -839745127 -333821405 -1309067871 -533744382 -602634755 -949448033 -1569593421 -467506999 -1894951467 -1266820859 -1305300855 -1646015880 -704554506 -222752784 -742043967 -1095415240 -266632949 -1649086201 -767832025 -723609352 -502486103 -1378233117 -1205380877 -1623157588 -924813675 -2004282386 -545574660 -1865621577 -93114792 -1612214128 -1681675097 -881077112 -1363275319 -1065256590 -196343091 -1403448645 -1948481514 -1150672695 -1265743630 -380182228 -958856171 -778378909 -1891429686 -58306061 -697424195 -642700039 -16811063 -1223178084 -93105057 -1448597983 -564194242 -1272323789 -1451248544 -15016382 -1124745575 -1447818131 -342123560 -1256949901 -760350568 -1684296726 -1993122775 -1964553519 -689921208 -1241532703 -1489025069 -1417396192 -141702773 -39141288 -717631434 -963349686 -1138957869 -1943158572 -1882299675 -1229033768 -1872821930 -850363431 -554514032 -1785791491 -566138765 -1741667145 -1997597405 -2007732284 -545951877 -1763056755 -715519979 -1983347500 -880263766 -578270979 -1636841378 -1127521976 -866149504 -1730554362 -2056130813 -83726567 -590622784 -927714254 -1362189758 -102039 -1714969473 -2113906324 -454131500 -431239062 -77606409 -808342334 -828056616 -1453512552 -1558976839 -275756026 -361818756 -1561627435 -1874650058 -1510939669 -368891108 -167563267 -884767252 -1106432536 -750733179 -1106113328 -1828255264 -1290200772 -1261991245 -1738356943 -50123566 -613184138 -11785413 -508940767 -340104968 -1690212509 -487956247 -1988079083 -947084308 -497172992 -127606067 -1486488363 -1732651390 -793658410 -995965353 -1702143153 -1290310784 -963479282 -1169594194 -1451797567 -652511355 -1706841903 -805307095 -1354402271 -112310497 -2111881013 -774467875 -583190658 -570024098 -470465819 -84231679 -490105580 -1604696815 -2039730679 -1472064892 -1983026404 -1926054235 -25032767 -1966403804 -1722890145 -2092654514 -1904729879 -256350524 -631060986 -1967742816 -605344712 -1398538745 -1032170800 -321735134 -38573992 -1920505797 -1261715769 -1403399105 -1115862734 -330281087 -1936485361 -1394792042 -338359242 -267083038 -623797436 -148342198 -2106291266 -1316870514 -676262816 -1465688588 -43183779 -2087784614 -1660699165 -525906096 -2008548067 -1371914876 -241403093 -665174868 -1941623841 -1857879522 -968898874 -2062363764 -1761718968 -1853653987 -817292480 -929305148 -183057805 -1455946131 -1657949799 -1561951968 -886625248 -121516603 -72598324 -389319972 -2065580642 -2140696339 -1889831382 -1112898144 -2044024485 -623618336 -1433175792 -1208951392 -1503261077 -163814184 -150955034 -923069331 -604380189 -220186213 -555358110 -939824908 -895005071 -1374764709 -893906090 -84060218 -1903327847 -314718817 -226934758 -161520634 -257965830 -2009705164 -1491891332 -198554552 -2064251673 -1279550826 -509491524 -1006743279 -310635440 -317094223 -1495677754 -1559923343 -1151263225 -453363105 -401726179 -123304285 -53398640 -1970261681 -2137719474 -1249785208 -602439549 -1963588085 -1643741146 -1127805814 -1341647476 -490835632 -989778897 -805592217 -1851480431 -793558787 -1469085239 -1296122314 -2001099877 -744237072 -1447708976 -655039122 -1241348932 -547869519 -1780611144 -1546876263 -912321659 -356883233 -214670960 -202297760 -551839119 -1925685287 -266574672 -669624662 -1567383954 -1987700776 -1031329500 -1214391563 -594418253 -293652327 -497239083 -1238397504 -335343004 -1112778500 -33167777 -1252563466 -51981521 -1775062765 -637067231 -1982971122 -996929661 -729398533 -1164487055 -1515458274 -1151157698 -827254463 -856628963 -632611653 -112515674 -1265323558 -1909966712 -224973228 -1553824276 -1723459212 -919545348 -1506340024 -372068885 -2036853778 -364630019 -1565884442 -407722709 -2122736233 -682040420 -1933114901 -582045644 -653126623 -1310232944 -787773470 -872026535 -1721566617 -1322955888 -2021412225 -683970035 -4415854 -1202814180 -1434354049 -1684563968 -42208128 -722403786 -1715374811 -336487502 -1021003563 -1612543811 -780206337 -392757377 -1855988008 -1390477781 -843018613 -1664209432 -1540905096 -1486649299 -142535448 -1149008131 -1206703893 -236767383 -62208190 -1855996888 -1539723941 -962330037 -1181586302 -1139693905 -1428813742 -910421040 -625434405 -1891076417 -563364919 -218794010 -778922406 -288565530 -902787784 -1182319633 -579886140 -865564894 -494948680 -1398299929 -1313357582 -1763956808 -810325221 -1942183720 -530347640 -1495650430 -1100688875 -853786867 -110144415 -66279191 -1557833991 -395262513 -1010135820 -1494497205 -1045789123 -1571623213 -222482791 -499238910 -489751541 -2096814283 -951007111 -2003213603 -1909891602 -1110083105 -1976304246 -615894373 -465548471 -1190226076 -319487527 -917748789 -1376343969 -1666725146 -872837354 -316616021 -2048471328 -199780992 -1202192283 -1719549405 -1779412156 -722837770 -419409311 -970960523 -205276508 -1223532874 -1761093293 -2075352497 -1020022505 -156287534 -352083657 -1152575714 -1037529258 -187025566 -1570112201 -596707871 -120556407 -1114453328 -264714562 -1619010597 -2093296289 -1953624069 -1682248700 -1931688145 -224877669 -2095247810 -393099164 -1157951176 -1188605918 -1006779432 -918258911 -1360029835 -205498177 -654156463 -1438884648 -520930069 -2128324511 -114948298 -1348245833 -1867755734 -1602153139 -90357440 -366555651 -1717726761 -1211005506 -1667016723 -1478404699 -1161980303 -186666703 -1981152701 -499498972 -565646281 -2054423145 -1447721549 -866353533 -864702471 -1032590848 -939030929 -435501900 -856164324 -1413358568 -1000832909 -1906778259 -323734832 -1435243573 -1602408307 -83998722 -869764575 -212026896 -860670699 -1990075548 -141933211 -1764629107 -1372236279 -1348256020 -2038968643 -1549427722 -845020132 -944000913 -214160755 -217216913 -42456891 -608396233 -1145844664 -1725405199 -1413494152 -1132109550 -660094430 -306564608 -618097503 -986332382 -862073081 -1937589705 -628148827 -267726737 -705028294 -1743256759 -796952492 -525026705 -113525412 -1056120948 -1272430581 -1098618041 -409018181 -273414020 -1801913207 -940880055 -1448991524 -735986888 -225819896 -751387823 -1371296801 -590834803 -196150293 -310576306 -1470712732 -732109754 -1634821815 -1544464987 -1188195220 -546629087 -260023343 -83104156 -867179342 -1859172452 -1224336914 -242208044 -1309084443 -812269986 -268110723 -716230055 -1032692950 -507575596 -1017996088 -458035367 -1619022321 -142857910 -126176024 -1074075779 -244080971 -575113827 -114195242 -1576535523 -1179298375 -1341210462 -1735875922 -1301276559 -581666065 -715993311 -1348703836 -975477567 -961307371 -1173508016 -659410864 -1702772728 -1134159574 -755109446 -1643588799 -714793432 -509690306 -52705059 -1050664049 -1900125909 -186838026 -565611068 -1462598254 -1791031416 -586728713 -2052056014 -318056478 -488428363 -1332998107 -1149778845 -1275192209 -268659603 -1351321627 -2023017964 -1901821644 -769768760 -1062059792 -154850280 -1965959443 -696965759 -1527700775 -752441893 -1907182115 -668891683 -2133107783 -1050505863 -1388977454 -1396826488 -171554812 -1398671010 -1107665008 -2137537260 -334798157 -545469559 -99189070 -623389418 -1880718260 -419995627 -87755300 -1729545258 -128505414 -1569427863 -1979940987 -1609058244 -180340237 -878937342 -1907382928 -1896472127 -1054749715 -1848437667 -1193431767 -510444989 -1999244005 -1764851073 -807851547 -1169334095 -1375280968 -980736515 -1301616880 -2006473818 -869750285 -2119338513 -1558618849 -701469037 -2052366476 -1241024018 -1529490862 -773663044 -2088781570 -1236669481 -1357231501 -418538873 -1373894586 -1302134358 -2113791976 -679768311 -253000937 -169127099 -1398287912 -1111387863 -283051835 -575912740 -656624151 -2111127571 -996270063 -380953182 -1031378167 -2032337832 -1774536889 -388603887 -767758282 -1631694398 -521574996 -82710718 -697117817 -1935855934 -1553430688 -1550876637 -1574614420 -1103574959 -2115560421 -337252368 -991204543 -1144104422 -394445316 -160407723 -880623476 -181466008 -472417716 -677509853 -949802977 -1092686288 -1645776919 -983304273 -1508252646 -305252134 -34183455 -1143194436 -132696143 -1136049815 -312135228 -1901711022 -1058028453 -1119612411 -1074076663 -258938359 -1175130891 -17783578 -388368513 -1106794758 -396147392 -849911644 -1551264511 -1651161797 -1292635645 -1382712463 -1327821454 -45117754 -232364087 -1217939963 -102834937 -1769933971 -336772353 -1513527026 -904927267 -633388415 -282652726 -310538718 -838971216 -211601110 -146936338 -2100322363 -1929249202 -35751961 -1735271014 -1872006038 -22568469 -1351136611 -1060937699 -623186052 -610229545 -1893548390 -1307625837 -2067282708 -682548543 -1883203574 -1388478732 -1604740422 -625149881 -1404048843 -1298591065 -543724994 -843056173 -147996705 -594557709 -490005672 -2073026706 -585158814 -1436567285 -227715774 -403154664 -509531563 -1679678752 -1688245049 -1780594379 -1265106908 -416213809 -951249584 -1783490020 -540021314 -872332176 -416023963 -2055475156 -1949001250 -1295941059 -1102230739 -998091351 -926569540 -1450334383 -1830581631 -1734745295 -1626181393 -206296782 -1191408816 -870445884 -925369024 -600614794 -1359701858 -1135639679 -2008914064 -1080775514 -1177377472 -1268848446 -1023217212 -162636908 -1839313772 -319467439 -580129773 -665337431 -378852888 -91475261 -1973904022 -1077518898 -130523535 -1128249158 -202995496 -1541269836 -1174383538 -341923589 -43520951 -1312183477 -1358126896 -435057109 -1970496575 -1790615638 -41198808 -938631722 -168480792 -1273224398 -1555398478 -263784815 -1025138297 -238057798 -275376625 -427677090 -341085121 -983774804 -826532575 -1608759229 -1597246073 -1369161411 -1208557072 -1318375778 -205431100 -1674276971 -1094824956 -1083147996 -249493153 -1343343527 -1079077378 -554093131 -1154159325 -1883475571 -1664965017 -1355120309 -1442956928 -244263325 -1492453858 -1062994446 -831194529 -505325168 -1849758338 -1915112794 -815827522 -2077559806 -1611042869 -1323677907 -1271483676 -216371235 -861532274 -1438181044 -1580359523 -1024756965 -271461815 -1203458477 -1525635493 -400985671 -562488211 -516348183 -282494154 -1940386408 -387695914 -539841600 -2146846272 -25056610 -219649458 -124051413 -1872960701 -1035203981 -1908284320 -2013781942 -1290822474 -973518524 -247926375 -780309445 -2125693533 -993257639 -1290750542 -1912041047 -728583221 -346440153 -791484454 -965508860 -920973288 -1883407487 -520677229 -26326278 -84123064 -812096922 -1654391369 -1884961074 -862010174 -880311756 -1384838909 -559777377 -52517732 -49742807 -656218566 -1736911417 -1524971848 -2132006038 -1860830471 -1173374836 -568538251 -1267639054 -24318691 -702346707 -1770980637 -748218639 -1793912488 -1764265583 -1704939352 -1041387143 -601989351 -839561240 -1538199890 -1117408644 -542586693 -1038984089 -1016050066 -2110981965 -696553668 -1044138279 -1743175516 -1578985038 -1546107687 -879766709 -814168568 -2112807339 -1310843428 -310759823 -260115657 -1634625554 -393390007 -1751182183 -855567546 -2120728957 -1305491040 -547487881 -1808872219 -1936877801 -1548080181 -1819218662 -1883369895 -2036352132 -523400285 -695571883 -1723146960 -2113976925 -1640722507 -1933147669 -1132777420 -1147567285 -612725288 -889828051 -263935449 -1409360288 -373734006 -2105255014 -1080452326 -40524050 -335392251 -1940472829 -1840173661 -1886719980 -359172258 -31608489 -815413814 -1566820391 -1105832023 -1395329423 -780187121 -69794065 -502779193 -2009229453 -2086551143 -257104891 -424805273 -1466580683 -4238915 -376484054 -1080671516 -1576966733 -1984193904 -73390265 -814570477 -277757314 -1785211467 -1555093632 -1582689034 -1522142696 -1827088608 -1009566203 -510878874 -701614612 -204078207 -411040790 -2055148778 -758533498 -1209572294 -1201342756 -326450998 -1988688948 -459667128 -1126742037 -642616613 -762153928 -1928597188 -1962254545 -705770836 -1338258271 -1510525666 -2000677275 -84016199 -1163500514 -2114532863 -246954238 -1621472062 -513465604 -1227112782 -1799064933 -314579171 -27388083 -750010523 -1845335818 -600263152 -1892105705 -682739159 -791919392 -1833060885 -453894333 -740140587 -1317562285 -1565439778 -1524189449 -1867127927 -1788019125 -1498761404 -1847221365 -78396876 -1208819321 -1431027427 -1608602836 -1116232569 -103646991 -385740020 -2026869494 -62493297 -205339296 -131327143 -1749586932 -1961471400 -428354703 -992308577 -372251037 -803315148 -88003747 -1610226693 -491109757 -1302030478 -367880816 -367454799 -1797321668 -1080295374 -1697599080 -80003518 -294364004 -1720976187 -2137017113 -182622116 -575772049 -439514161 -1718241894 -1278911249 -497539120 -1986152069 -772014715 -155119831 -53852159 -1002620926 -1893208920 -2044604488 -1781794169 -2102624615 -1968492920 -327440758 -1443716092 -118630791 -962879921 -1833552102 -119843864 -2023645009 -1703148724 -1011073405 -72619124 -738905572 -2035501650 -1261734840 -1723925402 -164866090 -650470000 -1757526770 -114858905 -1993301329 -670543303 -1974597712 -1998948493 -1093148183 -818911596 -224500349 -48597864 -740514388 -1157584751 -1472551884 -1577966360 -1605055717 -1629345652 -1848390267 -396779967 -744181434 -512601110 -1729947653 -449107238 -1887813508 -1558228178 -577912481 -2054016433 -1054563906 -873029451 -1397706653 -2079586085 -1306975670 -1877344174 -1693790694 -496969426 -1001239599 -152082501 -545054377 -1711159784 -361489064 -315461285 -1968176199 -1446761852 -1916595230 -2108809257 -687072311 -604761058 -179000555 -1985222085 -174159156 -72724031 -354593874 -392119893 -1879212655 -885096156 -191871123 -1405010114 -274803586 -1534028852 -1881733329 -300391134 -2087218688 -739115471 -1268306849 -510531021 -1297700182 -603039942 -1316975001 -284892178 -1441786483 -2047430680 -2036962879 -50806879 -1360207494 -1043929343 -379071811 -1623430475 -1216258190 -1902047184 -265452246 -1132363703 -636676607 -1860204495 -1390014439 -1645564207 -1703220983 -78046771 -1767055527 -1350887926 -1176256198 -1750949151 -1233966016 -1017251833 -834243464 -209168185 -58955156 -869345625 -1760668834 -1383921025 -165286518 -1274152455 -2120866948 -1477222130 -613895943 -1237673813 -1057170249 -1728163312 -524459109 -1311357675 -363774564 -73154139 -1140968089 -1369187760 -1651404715 -1080391177 -1160276454 -1614847618 -845584940 -1846794381 -1492011376 -68650413 -608772852 -1033229256 -931335950 -2102492314 -1892393660 -1227431550 -714147768 -395433693 -1739674433 -718341526 -12964048 -990906389 -427997438 -1430206663 -698924170 -82976100 -862425797 -1423236576 -1664272546 -454178447 -1220277291 -731600987 -1673909434 -1360081538 -1074470498 -435672263 -1571971618 -1783158332 -1407792039 -1933460474 -2095123761 -455691268 -876456074 -1006900945 -813044255 -396347924 -2072769321 -554256413 -1750956252 -1353312523 -1124268684 -2022645682 -2087329011 -445830485 -502517012 -1897720680 -564343516 -1633688260 -1820158925 -506500960 -136458012 -2084756335 -156537893 -264900076 -441977101 -163201534 -591564719 -1726430270 -1461993273 -213050337 -881774410 -197860923 -1143847305 -368047191 -1016235777 -937259448 -726991791 -1516563554 -400245835 -1012966441 -1824104118 -241366654 -52744595 -1715145601 -779122326 -1501137323 -977102705 -357714326 -1297949129 -492124877 -1183283142 -1741196374 -527800149 -1629642133 -388895493 -1373813030 -2078906313 -619465901 -362677451 -961328771 -1533177816 -463273159 -1603762938 -1376445469 -1225151999 -1056439757 -188202503 -2023539537 -2077964467 -1969729355 -1780850980 -1282832621 -1979528914 -1125798274 -1960661048 -1841154168 -1186231953 -1909738970 -692280728 -95796050 -1578960747 -1137848850 -483745415 -2083586010 -1961722088 -346700625 -874270064 -773852874 -984287086 -846521561 -408714352 -1609410958 -1813437141 -1350110563 -996018139 -441833808 -2049843377 -1784972065 -1826431512 -703171966 -608723121 -197400339 -1992746605 -2084715270 -1613842085 -1125460985 -586812119 -1306377009 -405583335 -526015767 -1704304917 -1115856333 -222699480 -1993647286 -42591661 -725991976 -1892542025 -1573518458 -2011094448 -1219267403 -938282547 -742347508 -1902061533 -506615889 -2068069715 -1024873310 -79388583 -696569694 -1313487261 -1795988114 -142089766 -100881698 -1154100803 -899896317 -1977557645 -206934896 -1178772579 -1094091678 -1643846532 -751544669 -1859923876 -968618200 -1640043140 -1252444735 -203953251 -458388945 -1119156826 -2006994156 -1025136463 -207233760 -1906812533 -899777950 -2135647123 -779520303 -1747485821 -1007837175 -1515876336 -1735074791 -721569724 -582196659 -1043752081 -1694796671 -224555689 -978697244 -1387327535 -1583925266 -824657450 -158304412 -2037497498 -446213824 -502844644 -961780763 -539872772 -523270429 -660565738 -1785387223 -214057430 -628117285 -1885083990 -780375739 -1092413144 -1350013005 -1503844480 -1379133817 -1311060248 -1807369916 -309991397 -230081757 -1513525299 -875901578 -277421261 -432135990 -119889776 -647804346 -2053036579 -1766026904 -1242690341 -1618094112 -1722318423 -1073657448 -1803126442 -2004367877 -1982421897 -356039674 -1069360376 -449197689 -1260539818 -966543471 -1129811189 -686246749 -1761926053 -1039164288 -1897171012 -2063491675 -1391166322 -1677908965 -2008205998 -2065212134 -242149677 -328110274 -1958853269 -1522583573 -646973759 -978262752 -527271432 -1333430102 -1967867869 -559626836 -1817342439 -414460992 -1556425323 -342099554 -853481059 -1412880300 -1552517221 -1230622297 -653941422 -2119657855 -483348902 -1861842960 -1010408283 -1778815552 -1433132577 -482636887 -632425090 -1271918627 -1084141751 -1919147909 -2062012270 -149126604 -257417379 -1381823795 -1424363907 -1283971840 -1799029824 -1871985855 -1830836435 -1722268829 -240131090 -761456917 -951351546 -1349681707 -230686288 -936459581 -168529004 -2083523482 -910813992 -787327728 -1970375329 -1900317763 -1263844557 -674717022 -1255332594 -1495559230 -1715374122 -324907479 -1816568879 -298139954 -758858427 -228203056 -2968650 -501976669 -1406110467 -1588567281 -1533592263 -986432947 -404785389 -2147322874 -1592855483 -590959279 -140734778 -949918499 -886780895 -589992085 -1064974396 -1895959474 -1028525332 -1329380221 -473510959 -1871775778 -447555943 -1585002207 -1744935661 -1096970995 -644403470 -729088469 -248208701 -1230395233 -1132644068 -1053803868 -983972667 -2004532369 -452071647 -171028043 -1135199015 -1045125157 -1149764886 -1040583296 -2124118351 -288977529 -1384804036 -2121150513 -1948131791 -1715329175 -1716966897 -1324873140 -2032411884 -871645206 -1755021055 -950979840 -1544869906 -1551217912 -867972404 -155779957 -411171606 -2106289643 -1289592753 -1780434147 -719571331 -1354943860 -624862232 -864499394 -1914443003 -296068420 -302324841 -227293885 -1902400829 -1914196467 -447505162 -731525940 -412594505 -251149372 -1262128849 -1903583724 -320276262 -1289116052 -210971381 -300499270 -1757176793 -675246407 -1562771701 -1778975897 -1980567345 -1398838915 -1782160696 -1820392963 -145010332 -1942194226 -706921982 -1358216270 -1937165927 -2095646569 -652590736 -893514723 -2096289637 -723216377 -340206219 -1244454419 -1202182000 -1546723024 -484317433 -960074301 -1924136996 -14251599 -1155939576 -1739383070 -116370879 -1635244583 -59992175 -1118654782 -11591589 -1546308093 -2100506704 -732501095 -1769639061 -1822670924 -1923478860 -1837861729 -1684784502 -1601239419 -1913334576 -994088654 -225234118 -1643635212 -1494856723 -645757208 -2006526565 -1756269114 -452270983 -1373784548 -1600209339 -1780649192 -38865352 -374942376 -939493134 -1761330394 -1765341710 -464053018 -1825951269 -1221662453 -389698604 -1986797725 -886136872 -503315759 -289875980 -1452684464 -526203705 -568011589 -1005965408 -121859425 -1539440384 -491554832 -192471415 -756699523 -450725527 -1169109320 -1892454837 -108149742 -901548432 -1827367039 -1394188726 -935845465 -584499627 -1095029611 -227817287 -2109283655 -70344909 -1170879713 -1582678930 -1352324768 -1702939575 -1790873456 -79378640 -529457693 -1570696730 -1830952186 -1520212239 -1594152514 -915322826 -1405373121 -2080894941 -1830081992 -1927247210 -748010769 -447725045 -132132227 -248248191 -1894103663 -2050164560 -740643805 -1185212623 -1957728836 -1951590965 -1871608124 -1924762459 -1936473652 -1197998879 -2107968728 -1592686937 -2053173951 -1927354461 -403094679 -1648847315 -1047842317 -1719916419 -1505365513 -1173331684 -1990766234 -1012874578 -280162677 -1409958115 -1831477807 -1764389798 -1645137210 -969133345 -1708150567 -1325186473 -856148674 -1150329018 -1932015232 -1427261584 -593105298 -1849137759 -74976129 -1698382961 -369789603 -236183203 -981313165 -255955195 -429217424 -459674895 -1257282006 -2047072009 -303746676 -501754613 -1968982569 -2114520560 -40177717 -957024461 -57599997 -1715508429 -434721581 -626244773 -478545864 -594078233 -1021387128 -1616669825 -1406646931 -2014983141 -4537597 -1101465134 -1015469998 -951713677 -993566483 -39040709 -1174683828 -1093930325 -1079470308 -715616700 -1461453700 -1881865161 -368607911 -1850322229 -655010596 -761912450 -17560089 -927156184 -572641856 -1517451585 -292997323 -226005090 -1716459734 -1390919187 -1819278314 -738457412 -945727471 -1315133650 -1549560626 -931254013 -725377155 -149180066 -1155953213 -1968580129 -1793162421 -2042791396 -1373927983 -1863437737 -2044021558 -574424247 -1409326064 -1946014885 -496228385 -1431465394 -379579617 -1568191329 -524866872 -1722179475 -885842059 -1990844609 -182639556 -868886129 -480370503 -1196014848 -974614416 -1486714043 -1230687856 -1755791535 -1015535318 -2049546917 -1097336139 -338927737 -1231843915 -1858322325 -1968637954 -617543549 -265962092 -1111410837 -669175853 -466702032 -1250772980 -24054377 -554988603 -1171971700 -608351616 -395966745 -2108744809 -1751378422 -2006272772 -1785737457 -1805472974 -640341908 -1185892639 -501855866 -1523258093 -1246213164 -696638157 -316661255 -661235519 -157494608 -1312023552 -817751068 -46859076 -1581475530 -454133791 -469743899 -835824121 -1005466620 -328664097 -529538195 -776210197 -1949109101 -961109169 -2137294296 -546269503 -658945996 -332187193 -1760154198 -1324368361 -2138525819 -1917123741 -254075399 -1047740757 -12997499 -1553117346 -579504937 -901137014 -1355115654 -1364720343 -1729454841 -756350542 -1027852801 -763569939 -2105173948 -1865459711 -1667600224 -547887771 -2087372508 -1176884564 -1574478278 -962920012 -359877892 -1153780892 -1965603081 -1150040566 -1378969762 -701271510 -880013834 -672631149 -557803435 -1236212890 -125757505 -482477887 -107595737 -180320985 -555368978 -1122483384 -2081879640 -1200048909 -55600939 -329595328 -1148352083 -917923392 -15929296 -1435705644 -778501016 -1796198388 -1528681237 -51197551 -1483780857 -1324754635 -40698349 -1117351897 -1736323511 -233970294 -296173601 -2070101908 -820202709 -449400070 -366989991 -427744553 -1474935762 -841614613 -1689501549 -1423753409 -1760750189 -603770863 -716662366 -1856092986 -1007359380 -2075510359 -1525725492 -1913598864 -1141009776 -2069821169 -396789630 -906587475 -619216860 -472012658 -312150988 -19105695 -1134352462 -1849494415 -1774326227 -1142974947 -738711814 -926494591 -190666540 -486936456 -2028320922 -834323576 -1555610569 -1680914605 -984389950 -427873162 -1488983578 -720056955 -926891840 -424779542 -1034119766 -865751991 -1492004312 -2097409412 -215921979 -1900821270 -1136352118 -1097974455 -329686514 -533431538 -1787116588 -1362207574 -299535551 -592337089 -1822750978 -1121462791 -2108642265 -27921414 -1123770052 -84588599 -46409079 -460826892 -1291542762 -194497058 -441943072 -1738759778 -378120470 -666627817 -591533920 -1208791477 -963053319 -452884994 -956049190 -846089476 -1736596345 -524524038 -255135731 -1688871505 -1572022136 -484730711 -1463586706 -1224075004 -135253968 -1175741650 -1692875503 -147739818 -572025194 -1890631586 -1677024890 -34459355 -1485278442 -724861966 -80333131 -1539202401 -786741845 -713374336 -281263951 -591717410 -2145224260 -681188337 -497057802 -339091384 -1834775397 -1352410106 -989731694 -12251396 -1898266107 -1141400517 -47070568 -841054280 -861919406 -1502257627 -478699210 -1023880808 -578276645 -1732069840 -1756965795 -1423970315 -1111322037 -1324197900 -1421071439 -1782036986 -1888682640 -1133344173 -2083050368 -1549121582 -2142176093 -990253096 -185520222 -2039599357 -1412419685 -253411857 -633008598 -341519348 -1839377052 -1383014399 -2107492512 -31375566 -1195644247 -1188374350 -1409783350 -1041686099 -1331575549 -863166656 -989951907 -1565887640 -461471495 -1387967148 -1596482722 -1424423036 -130269296 -1150221579 -126287959 -807883677 -1709343005 -2039139116 -119600139 -74842581 -1601325372 -1210463000 -1139052969 -1394020625 -258055605 -1371069942 -1072982884 -1203147529 -594499751 -1663389213 -640386245 -1931064598 -482341475 -2109886547 -1613216165 -1343041780 -302582843 -268566205 -1929065088 -1236315257 -1846239674 -758985415 -215006725 -1550532821 -91066202 -1541300350 -1687232336 -1939796164 -1204883241 -1849323924 -1056367637 -1123565310 -938457099 -1528559325 -149706214 -1408988061 -560165758 -137586258 -1719834034 -120720818 -1730225358 -821527879 -1246695790 -218198751 -1511822628 -176397492 -1185215184 -2000771563 -1668714615 -2097588132 -1072185372 -684265227 -670740504 -993987625 -674723362 -1361888974 -1387276292 -722684165 -2132737370 -1267425513 -730302398 -1323360581 -233152888 -1590416488 -400959607 -124430563 -1802883810 -73935500 -1388400534 -290466636 -642421621 -1779890678 -175422436 -1977318168 -477012251 -588448306 -888484507 -1305311558 -1825901201 -380169577 -746230814 -596792418 -1541537836 -1383692244 -615131545 -529600157 -1817605531 -541280942 -568063502 -1878467199 -1241119046 -979142811 -286037516 -1364129426 -387847410 -938551225 -963051360 -419960081 -1637817325 -350394029 -672285329 -1188057636 -381738446 -1344408333 -1795402644 -1039513711 -1327472432 -621555941 -1130241379 -1473999138 -132160574 -724676220 -1253467403 -212065151 -1503622484 -1943014339 -1605659291 -1036195635 -1395143922 -1957439108 -1377099763 -1484453022 -1884413555 -249792929 -2086711465 -804153098 -1286527515 -1802586609 -1521329234 -1040134656 -1026276812 -45726580 -1874968081 -413501289 -459082531 -2038838493 -1509480319 -1611399422 -873813237 -1685896073 -956060393 -1034378297 -915915214 -624220002 -807958019 -811325352 -1571516261 -572424174 -6353858 -1562592703 -918040158 -1978415458 -1739296105 -802233771 -1240653331 -1741805394 -26181054 -1938310590 -2006644787 -1595742621 -1870447411 -1744011891 -603554134 -1369065357 -1741661141 -1896688177 -390934771 -1288220024 -183814314 -1285691012 -628382570 -2048761691 -784944639 -572504152 -1350544104 -1840090785 -493823048 -1807155728 -1005100975 -625719523 -240603702 -114712213 -1675332532 -1655769507 -1425006323 -1343639317 -1755452614 -1761741012 -76663848 -2146588783 -2139889928 -1221383587 -2145248683 -1091665698 -1672589965 -658602525 -1001921037 -867592732 -217083594 -2096731752 -1711392241 -2120910216 -56943759 -1423534598 -230677359 -786389878 -1240315908 -365704327 -294426175 -618400537 -1784457526 -1768509127 -11739362 -1882445257 -1528346795 -872681798 -1997153623 -991539151 -325410137 -1674807297 -1418079450 -887801744 -567532052 -1536321637 -1761865178 -16038163 -1117949666 -1045608859 -689409812 -1236434719 -1706553861 -259152495 -479147349 -2113302040 -1035348547 -43037788 -1781597524 -945095747 -1435166617 -309008815 -895695259 -89852543 -470686360 -1643380619 -1510879466 -1504542934 -233148313 -1513524463 -861850926 -351314267 -1106339866 -1340712136 -1950445428 -1945920588 -1058862353 -102584182 -1850461980 -856322006 -1916036295 -1304723300 -528983583 -44780901 -1013326657 -1435803489 -275498284 -324916256 -1964083918 -1387271789 -647002244 -1457010147 -213513888 -82741479 -1214117944 -290671014 -1929919020 -555964852 -399919467 -1970150406 -267520549 -1534593872 -640606234 -1333452427 -195600497 -1807573169 -1578580921 -1196564209 -1617790155 -908680418 -1435571509 -671577718 -32657794 -1271213773 -2122562455 -2056320868 -1130497305 -1480380126 -3243540 -827085605 -166116204 -186299528 -105009770 -1815130203 -1888116186 -202886383 -1854891292 -137841145 -1708752549 -705279712 -1673871791 -727415637 -50208688 -2043829592 -1643018979 -1875246927 -805098717 -2147160519 -1011638645 -982673216 -1639495882 -644614117 -2121948951 -335093728 -1218164062 -1721783183 -667813356 -1189535070 -1590651567 -56965066 -1781641347 -1681628908 -104778589 -77154783 -1807798740 -1074785424 -1433666251 -862161217 -1271407810 -1088775020 -333605053 -1967807101 -1685782707 -1198201678 -1221444227 -1016941516 -2061196586 -1472311145 -1826833281 -1013252608 -191261946 -1903990510 -714677623 -710772090 -1642472016 -1272374374 -153946992 -1816783556 -1758732646 -1054664014 -408060960 -1365269849 -227583948 -335038729 -293795869 -762265830 -1661850455 -548284303 -161951244 -1052777159 -907943680 -1938117825 -914327079 -1849722468 -1312245704 -256492438 -868725937 -2082990853 -548852977 -1129720574 -1310764091 -1124826511 -660625836 -647970662 -553342297 -1419794169 -1789796566 -1307441233 -1112126927 -1967082248 -240596571 -2142345143 -1683992799 -1179988980 -63306815 -993234440 -900844949 -741346493 -110387957 -2012005938 -1506294304 -1751136492 -87638909 -1920845368 -526434625 -154116735 -374686863 -940053437 -440924680 -1802514610 -311242041 -1922302642 -1396518626 -1439769119 -353848637 -751823516 -104054464 -791687790 -88009718 -1710581290 -1376158641 -699401097 -1656237248 -696394722 -520216504 -872855791 -626486680 -249309519 -404490536 -1486695797 -924027334 -1673151081 -1499344549 -910721145 -1374331846 -61228590 -424245217 -643654079 -1018975814 -1891904720 -1599751558 -529174866 -1112190635 -890338957 -260798003 -217912894 -1002391323 -181754946 -1033631388 -1247517533 -1144331470 -2062957405 -1001625020 -187402307 -1459547247 -2052364295 -1204367951 -1778779482 -826904087 -1410310472 -1311090965 -176146888 -1268281050 -76927228 -130765502 -900021233 -1929537210 -581335123 -1596302058 -535486835 -1970754915 -1837568724 -1055216761 -1108145201 -1618206423 -1462445753 -1375430756 -1350739784 -833917251 -1168957235 -1483845889 -270263812 -395974879 -97969300 -1597551498 -59988445 -1055964672 -793383496 -670453049 -457698734 -256198784 -228250453 -799570029 -1568298124 -172286790 -816123374 -607493429 -1004803365 -2066239194 -324077921 -759089455 -1963607005 -1961729586 -472719511 -1454811124 -1909239973 -895572737 -178108936 -2032167081 -1052208479 -2087557155 -2132763046 -1698962045 -1512519803 -1156399482 -879088624 -155012208 -392516045 -2094888378 -794576481 -1393599121 -1763772465 -2007039714 -1790829769 -1492614878 -1621773939 -1292145049 -1727200079 -1515271254 -155396205 -403902683 -196585014 -1174481212 -1983530507 -1808578768 -1299814138 -1772560082 -1524146990 -1153519514 -1867590329 -969674951 -73504374 -584916793 -1663887632 -427379790 -1786814962 -587746686 -1981259049 -139406161 -94689050 -153480923 -426012814 -286885800 -588853085 -1249154219 -734825661 -36430530 -255078315 -723880793 -769627696 -838680791 -1772879076 -443028207 -649270900 -931605893 -196973374 -1259196791 -2016608799 -1557167839 -2084147731 -665148700 -1501818265 -1684276664 -1655940741 -7968867 -788761555 -298901954 -680890545 -1934518599 -551677813 -1362098992 -622081524 -1373780272 -1528342607 -802294082 -106816661 -2118776182 -697456320 -1182624914 -1415776613 -838725931 -384063409 -1765355828 -701334244 -1934384172 -439846871 -867647923 -1144678731 -1456922091 -881040343 -745298736 -2111226648 -513973555 -1174310651 -1264395427 -1343254524 -1730687604 -561813 -852456503 -1373036784 -1917441673 -1302591229 -1202488285 -252004078 -594787062 -49774249 -1184664260 -1331326483 -972081688 -1868827487 -287752987 -131279465 -948262786 -976499915 -964041031 -2020975049 -1926287591 -1799563412 -102581136 -1799267858 -1577655999 -683785684 -1200995891 -939141884 -152838938 -373589154 -1818211097 -2129094116 -164797651 -1647699374 -1081750753 -388350169 -798487150 -548219947 -1227803599 -524724370 -1474632008 -31388429 -1411832688 -1125171513 -16623509 -218441653 -1299309248 -1876808440 -1279643944 -2074525750 -9787558 -1290730134 -1569043791 -1967293824 -1649070756 -508247910 -1580159251 -1953752755 -1697590655 -2085888190 -1999755702 -1775007964 -1863510471 -1118978249 -1153134164 -1833463820 -783571937 -1123821755 -953560920 -1975408526 -593913862 -406287378 -1621448233 -112971601 -338154059 -1113539651 -2088414399 -1508077425 -1655280081 -1789158129 -1314648809 -1990772527 -1118641029 -1927928565 -1462126019 -296628712 -1129217897 -1452206340 -1080308225 -1913585837 -922064987 -904239757 -1963309727 -1260345534 -1996179577 -1800617205 -633810911 -941092057 -717141844 -1324745144 -2028666759 -204355094 -769713305 -130027607 -1383121850 -1765937822 -1892972814 -223854593 -2080278654 -62080971 -1865310802 -1312370308 -203228219 -1157678003 -892354601 -1925472006 -976928199 -1719759278 -1011780373 -1217212065 -753955133 -1570403031 -1189720387 -410307092 -461304727 -732581019 -965438082 -1878891089 -1922987335 -19251995 -1445732915 -1803120247 -1900248512 -99943000 -409789046 -344440193 -1537895086 -289535110 -18649668 -2059841261 -168200340 -854634928 -1478603760 -212631236 -280394844 -1017021590 -1259516657 -950145720 -410716948 -907303578 -1917341746 -1770601787 -823337630 -1598409789 -1600383400 -411125125 -1325083476 -1272561742 -1155557321 -1757274226 -165319191 -1823287566 -1549962719 -1246780123 -1635583482 -1460900374 -1172049667 -1918742985 -1698905543 -562890689 -838344988 -424005349 -907159897 -1649978826 -737794871 -547819119 -933538344 -463422626 -1968371160 -428504085 -1355488204 -1183717252 -447348556 -246932545 -1256877811 -1696217585 -483537170 -731095942 -1775552707 -281587837 -1740302118 -530425086 -649801705 -1262910940 -15801632 -1437540443 -1551196751 -512319477 -1291509116 -1776492383 -1042336840 -1531161301 -931443906 -1769425159 -375103657 -1502659254 -786393258 -1297123568 -1649306679 -178438477 -1128311727 -1254592679 -1944709707 -34938209 -943443032 -1575273023 -1435297345 -358670664 -191252719 -1748912321 -1360702558 -774535403 -1718133754 -1608885916 -1578990835 -1643537866 -2006246148 -1338267889 -1672175392 -133325055 -968755564 -1801236241 -300530728 -138407752 -494298163 -1202478945 -95026698 -1533363565 -1437672955 -1630842288 -1232547755 -802859323 -1016887560 -1154358094 -929218860 -880299036 -1171053869 -214751528 -1556404136 -2133493292 -1087304685 -1391488472 -649833074 -1790129723 -464359991 -542795539 -254091517 -1318635983 -283729241 -1223657147 -1702265957 -1206793965 -1750607487 -1934070109 -1603840971 -540462453 -1844104408 -1378791752 -2004424734 -790533849 -21076154 -2039602170 -1459697776 -287337904 -1744914072 -734124672 -1139810289 -1237395983 -682648733 -1419613257 -896692229 -1813541804 -961697957 -1295635977 -269684859 -1402930043 -1822272288 -1666054549 -339531810 -647080591 -626304529 -1482864956 -963592057 -917519972 -1825583944 -1490482119 -136231778 -429925144 -1616906700 -1092837762 -2044116790 -27504824 -564592863 -1529495995 -859933375 -335289315 -210427477 -1896522977 -1909385665 -1196734534 -185475136 -1281838955 -311369981 -1925106575 -1277580323 -1750985955 -1852530844 -1267980902 -1474790733 -551595857 -2132148147 -2101772787 -536721606 -1248714642 -1936789610 -65854044 -854839303 -618567091 -288763310 -2079392597 -202506501 -1912665459 -485657470 -2007239690 -856859107 -205674567 -1471259546 -1332478064 -999350732 -618149537 -1860867820 -1801099479 -149455441 -1489213544 -290128223 -1397165271 -1570513399 -897191716 -1618485225 -1853303673 -1372016023 -1941380722 -2066745783 -248384656 -2040187271 -556072048 -54078992 -520035863 -2131789798 -373968438 -1750386344 -364803355 -184175300 -910331773 -1272607583 -1926007008 -1378772225 -1676234445 -1781835769 -654312168 -1908334936 -717001407 -1111904132 -370050330 -323254598 -1953885323 -1778177384 -1444861236 -37713176 -337673167 -1621122395 -1079063276 -317080817 -1270363112 -710404910 -1913728697 -1175629360 -1953101120 -1482979445 -740325033 -122578913 -746973318 -191155264 -110986136 -1328182156 -1812468974 -110513323 -1971548653 -145537761 -69275194 -372048884 -1700696971 -606650027 -1862131480 -1564596629 -238286088 -1964763008 -2063319184 -639593732 -1496200489 -1755595900 -2022465167 -1200897053 -1425455265 -299072923 -1406882881 -1685627497 -737070855 -1264184089 -2086264052 -1874417395 -1895539922 -419565809 -1453738762 -1065921015 -625915831 -1392468611 -2090643718 -321536212 -990259232 -288647974 -140940445 -111596474 -848714687 -761361035 -1487346419 -1121613053 -339128405 -309503697 -623242445 -1558026696 -1486571801 -987510209 -1330458647 -1418747565 -1379392314 -1360652033 -2072845375 -1832495991 -1697139110 -939222316 -1504659562 -45831462 -1490236208 -298172895 -1312497814 -198737914 -851049513 -1348075971 -1160368747 -1018532422 -882266317 -2022890931 -1914261660 -1543203913 -1468160972 -794352374 -1922000066 -606091088 -1057978295 -276606905 -1777640227 -1006798125 -1232432162 -1007571419 -1344282538 -1828649726 -1477472665 -529670394 -850595143 -153930322 -1536610866 -180486040 -1181964716 -1057247062 -871675756 -120991258 -1980543144 -992092708 -1039108048 -951945332 -592024774 -868640067 -639773763 -227014212 -1496904012 -694805079 -1720374014 -606230090 -1246701262 -310166655 -1028159316 -1620200250 -612957790 -502521871 -1979385893 -869527974 -530441183 -920343984 -2044113394 -2117911899 -1203837468 -1452886289 -1770792833 -1886764105 -1100781133 -256883426 -997610312 -1431681655 -1866794597 -480709109 -444514949 -2014623577 -403796390 -557602210 -1707962 -788429923 -1167613871 -380763611 -2140225664 -421647598 -2082628133 -895068878 -299685311 -961869762 -2035678965 -2094384398 -914119209 -503535025 -1827595995 -947284924 -1721442457 -1383682415 -449935542 -776733307 -3600636 -386347136 -1493249871 -1556683055 -378833984 -1921239380 -706143368 -1156952654 -1586315840 -200845375 -1911408188 -829540243 -619027777 -1589061971 -1257912505 -1906450467 -1256985629 -1360831064 -786852098 -418912860 -1217043154 -62551603 -1185288238 -1081106494 -297707391 -2078706674 -1559100522 -207012560 -336587780 -558892262 -208775456 -2048293441 -1505001477 -1497429573 -937974218 -2002712946 -2085283991 -434917697 -1774882738 -1906320736 -1224080359 -225255453 -2002212557 -117697009 -301191376 -504500453 -873675215 -1513643966 -722854200 -695548321 -1327140426 -1483982040 -411070022 -398967355 -1000389551 -897711294 -1761098083 -8374380 -1161767605 -906818711 -210633018 -1056083270 -639176435 -925140751 -1058997777 -231171703 -504894898 -1060661389 -274211176 -167328570 -1235182067 -2128068167 -101541984 -1514109370 -2102448287 -1152431871 -767443604 -637868546 -418286798 -1432237355 -469026262 -1659400944 -181542219 -1753295993 -2022633864 -1888703885 -1490408888 -1052922008 -1194937176 -42050288 -217070553 -1877551665 -886124637 -297682114 -1653876135 -1815357824 -1418775039 -1841147832 -1079742801 -1000439257 -1733120036 -80257144 -262088892 -439047847 -323353437 -1467588749 -1914418648 -2034217582 -1155240434 -726321711 -991947229 -741526142 -982265053 -1221951282 -949080313 -1831774322 -305466462 -1488910504 -1639385884 -943361378 -202914245 -175684279 -2083146175 -1011866184 -511953895 -1589623383 -2103629401 -1676062046 -1031809423 -690522836 -615676264 -1094757802 -2101974365 -1777159405 -1515557359 -668995646 -1732930277 -1185944925 -1380626668 -631603241 -344004366 -655401638 -891704403 -1735012455 -1821372219 -1570980395 -156058900 -804399313 -1129695726 -893143755 -156397755 -57084357 -1639081537 -123168643 -2068630840 -1865766597 -382982285 -774773936 -1432190591 -1830547361 -1158769405 -2055678839 -1077334137 -1320212702 -1013841710 -1502364672 -130320878 -2017160253 -88036982 -21323691 -1904989235 -320379522 -877123225 -1482289567 -2030447369 -66296306 -1845485796 -973459751 -1407612211 -1058574925 -1714232727 -468834537 -584562516 -4521387 -829023664 -526819112 -173738803 -1597785748 -1849544548 -469427911 -1967464746 -226789516 -2015405634 -662926507 -660642513 -928261001 -1961431999 -1913625743 -1592765129 -1219863248 -215231227 -1028770641 -1157321290 -1339530151 -1412176356 -458748648 -722234206 -1012727398 -2101475711 -1986216215 -1850116537 -1492912446 -180548374 -82128607 -1650996475 -661552438 -1188984947 -934668894 -137223653 -2067982740 -1710568132 -1155012135 -1184267712 -1108995188 -871552403 -195281034 -733325822 -598440221 -1318875446 -13416588 -6811581 -665608576 -641019609 -1838595111 -1125833894 -411842741 -501153706 -459473208 -15012244 -1055198209 -796341737 -997485655 -1484055103 -1639039863 -1570237372 -552973221 -1659184778 -843407551 -1758639457 -1635920138 -676626825 -1141136910 -2059078660 -236067215 -1179386496 -674776462 -106857027 -649723897 -2102675531 -676754485 -1139234883 -156481929 -1471796775 -1771751279 -815496851 -814939603 -39207055 -1822977403 -632020472 -913954842 -2035986150 -814791752 -1849242592 -1836904360 -626669248 -1170246248 -1673450910 -96119611 -574599533 -60390572 -1372062220 -570330054 -1317701017 -1749624855 -451359614 -1088791294 -607122171 -1207521100 -1086663550 -1353350762 -1766951557 -1750947783 -1210974040 -1138167661 -1547034598 -1425974357 -433517579 -1865419629 -993942050 -2056227984 -1716879564 -2004551056 -766144056 -271201780 -1128017526 -604923766 -766150264 -375539636 -240223719 -170788873 -1410436119 -1275356447 -881524022 -284557101 -105114638 -1430163032 -2113101600 -1961520761 -1257965030 -641754495 -1304922231 -1724933253 -2071432318 -1705567109 -854680807 -102208466 -1978254109 -1174987109 -1896206798 -890332506 -152376046 -1183697898 -122065878 -714328661 -1288218697 -161511425 -103190167 -1297833640 -698584901 -823332958 -1519887485 -430979330 -7257979 -1725768821 -1082438165 -1204265418 -55507351 -904145459 -378443241 -1796472720 -1844411867 -103804224 -880871404 -53424610 -259255824 -68314205 -1400575937 -911518392 -1888760293 -290974497 -588106860 -1592252526 -1194479215 -935034349 -1984458544 -226227451 -1158713767 -1120570973 -4759021 -527971008 -206302052 -1279981706 -1308840743 -1011371380 -785717655 -679682182 -952914481 -1848126488 -258413608 -945575422 -907129754 -1143365425 -859024619 -94212752 -738275025 -27832809 -1782069464 -287056739 -1314341211 -1115940235 -1632840394 -454976945 -1755731295 -3081638 -253482338 -1817582765 -158652780 -1450067533 -1640600975 -2038042992 -1024396894 -662199459 -1326048659 -314523247 -1234957062 -493892779 -831640998 -1566678710 -872083103 -524821346 -957023993 -49734321 -513594364 -1243698455 -1381596934 -1906478374 -1726018578 -985136770 -94775020 -1598378713 -1078089068 -1123436137 -914930135 -1247866425 -565708373 -950519742 -254453761 -964419950 -1947015741 -137746001 -109667341 -638031061 -1002192756 -1139406671 -896239198 -641900728 -1615176615 -2080070225 -853982062 -1243303133 -1179871021 -228253549 -851604501 -2085824699 -932662465 -774909802 -1568206806 -784988811 -1314902956 -1967253862 -977429422 -1553879651 -506663190 -715573975 -743374625 -1984947776 -2006298734 -74597144 -1771233007 -694833935 -57873159 -2011574869 -703768562 -2045777505 -21854418 -87499689 -1728458475 -1190296356 -1500683487 -1939415641 -1251884121 -1519131988 -618243133 -1286452145 -535843019 -1514688462 -1097829296 -37482848 -761517765 -1974023882 -944522271 -386690073 -814541089 -1931316845 -426889510 -2136613590 -1990545643 -1600368935 -168011870 -1981986932 -1635517507 -352058549 -730585558 -1787463407 -748743566 -2026425989 -1198439350 -921030237 -693065683 -403632853 -2104003145 -1515126513 -2017701512 -595042407 -46390370 -146384729 -1419364488 -1010598940 -688220457 -574298057 -1435934381 -327916481 -849257965 -1302299793 -599290727 -580944259 -1469501751 -1853988557 -2145443176 -65542255 -2057052521 -542487394 -1517549443 -1937696729 -279417548 -1771476894 -498875450 -823530262 -541008519 -284417435 -2052715470 -664115235 -1312241186 -180558412 -250837273 -311648250 -159522717 -1038713163 -757564078 -2096399530 -422704381 -516627191 -676814316 -2144814500 -236802958 -660117215 -689512103 -808155909 -1989778935 -1599209461 -8085175 -596066464 -77847193 -560231728 -1246344048 -748921898 -728684619 -2050636339 -79898870 -683028715 -1363519790 -879113393 -571304791 -520236600 -1210609263 -1449811563 -1633480479 -475467305 -392344648 -1361702646 -403145243 -351192816 -1212596556 -490506662 -1903231048 -835301671 -814584058 -506013181 -528290947 -1288549531 -1426871169 -473851334 -1150007462 -822590834 -1931911299 -1827943300 -341989118 -1144866854 -323738058 -1489462955 -187011606 -1335486481 -22207723 -1730529530 -1638779389 -1487418148 -179678709 -498054481 -2057889808 -1729868121 -1259896561 -892741307 -1982388807 -1947379691 -1959686357 -491908060 -1834207117 -391262734 -357843224 -1316854168 -401535594 -1215109484 -1923098265 -1883652505 -343727461 -296426597 -2027238386 -1967493847 -715890023 -1760226067 -384786997 -1041797462 -1055769843 -1813859787 -2011070944 -824235675 -1659466575 -1284602436 -1660038561 -160552903 -1173180089 -1590392716 -1423603 -304175504 -1266615868 -7500765 -1511305829 -80491287 -2049846646 -1839914148 -1820052283 -861652513 -1311554270 -1520463082 -1515103521 -1631274968 -2062149574 -309311285 -1684341255 -594038031 -345712114 -1440234863 -1739157104 -613527611 -1489568830 -1966452731 -397722587 -1554410245 -834421960 -1061666810 -2139936394 -2002337649 -72634606 -999111546 -893117729 -1866462420 -1340261211 -814199894 -491819774 -350384315 -509022131 -1707589716 -488898304 -641361906 -1149129849 -1104934672 -1345936695 -1712779014 -1806083910 -170925025 -1551259136 -1560824172 -1259110699 -569660555 -802849559 -852784012 -435029606 -1508253654 -322193590 -1301393043 -391929006 -818458493 -1199132816 -1838695064 -658260318 -1692898929 -541460600 -1440091861 -1483206137 -255370183 -1334338975 -63427204 -869128716 -262562918 -1963551888 -1035378167 -540861128 -2102184192 -1008754500 -1900972082 -1523565755 -2122121104 -1080985552 -412518844 -1126998592 -659569204 -69025814 -475686518 -1929173892 -917500438 -1497276006 -504457296 -148335516 -1993986892 -1455382409 -773408733 -2109543887 -149096839 -1904640671 -904515315 -152162092 -1882740314 -44918853 -1184402274 -1223095075 -845456441 -1834595335 -473591719 -1081625451 -429883102 -910306806 -852987214 -1702761973 -953400289 -1423166956 -494169206 -1182582293 -699445466 -254463384 -1126153711 -1492039766 -545801143 -1377154064 -249606282 -1097218983 -517370492 -284572341 -361253318 -648245557 -878535268 -1592176151 -2058328237 -508609736 -1218917892 -1506502111 -948781447 -1103700754 -2082313339 -2046777061 -1789006581 -915065220 -1370756373 -97795995 -832298010 -1871661159 -668638057 -17899248 -184950556 -1055157483 -111859855 -980391860 -1951451236 -1670666468 -542643151 -1987873695 -1790095486 -2036422379 -1704041614 -985490106 -1738325878 -1675497758 -137755595 -270913699 -581207453 -1598036015 -1760814723 -1688393801 -2133185596 -210825307 -2140400846 -1218447825 -48536983 -1864771068 -830995558 -1456186865 -1408998843 -741378832 -653909530 -1583649011 -476606959 -219156603 -430572016 -1751466169 -1333552954 -1885157786 -2020665111 -1012126919 -599159746 -527030239 -1574666645 -1981320534 -1172784556 -1385120526 -997947002 -647979544 -702622071 -2104056091 -257506288 -728633711 -1195025583 -1527906737 -2066561580 -1447452129 -633178887 -1056082924 -633361213 -1972952359 -115304386 -890565908 -1927679813 -1576318449 -1825902951 -409581827 -1156677754 -1261038834 -763570795 -2119560740 -998620744 -1234143103 -1846069395 -44589909 -2098291407 -7226415 -1195272673 -1385781073 -1362342196 -414643858 -334886891 -2036821897 -1976289699 -371402944 -1581801626 -1639861969 -354987385 -563408329 -948385880 -897857126 -2064612860 -907569794 -2096666764 -619138925 -1309642760 -1605969217 -1950154623 -1353328247 -1388541952 -519795315 -236383209 -47846713 -1000821413 -1713564987 -2131030239 -492962207 -223902923 -745077317 -537321162 -588034099 -369358399 -1578872163 -1796501209 -175742843 -919947676 -1825815779 -1091965670 -271768428 -2061735874 -1946189973 -1291448754 -761988249 -1291513882 -1856594545 -847126905 -1992796372 -773665592 -2131605806 -1576582188 -1963597030 -1794079761 -280655600 -1104580388 -1833936448 -137096145 -2072439431 -1452246124 -1748957913 -2126967302 -926656752 -768622820 -1129599035 -1415541765 -1186602889 -1701609381 -909139368 -559209571 -1246820525 -167136249 -150326667 -1099523397 -592950944 -1402393728 -1398360671 -186764729 -1481192036 -764113028 -495452536 -1276673133 -1536229154 -207503397 -2143634298 -1875984414 -315140844 -877491606 -1231218093 -2077550206 -1449695669 -1833133668 -1677158214 -127752176 -1794658679 -1420595838 -231061920 -807255664 -1891746749 -1092216608 -194316100 -1695549260 -2135900777 -747715787 -1932413512 -1678702603 -314494335 -749033078 -449803232 -700482784 -508797834 -85313684 -1495494439 -626431785 -1474172901 -905111668 -1585132375 -1785185590 -1120178893 -2005005049 -1953953466 -775973138 -112342135 -496137232 -2046940570 -242135050 -82274285 -1951922974 -1009232446 -1343875916 -1437004713 -1137117229 -1072293150 -348206426 -412463707 -200311033 -1520656782 -475652127 -1351164355 -1527231107 -1448666405 -1714162796 -1440987867 -1509993450 -1645657551 -1124569944 -643471561 -98879435 -1861804914 -370969161 -733661686 -1948339175 -905864769 -1357599000 -152643625 -1385930857 -1732278237 -964526880 -1596704604 -858626516 -1993230219 -1622881180 -574191713 -1796094420 -1928774708 -650865891 -1968815866 -1460226886 -590155086 -1657048556 -1447146396 -1937175297 -105644512 -1745820762 -940477973 -1133650291 -785524653 -1730864862 -832253372 -1121430293 -1562448379 -639870337 -1850133430 -1776833097 -326266097 -1028541488 -1600914113 -740883928 -925992590 -343470321 -269641911 -681103007 -1210400139 -82548142 -112186632 -30081958 -928811061 -468872184 -1217295645 -11200546 -1416499333 -100579089 -363118634 -1933840511 -2039954679 -941865598 -833143549 -1050249603 -1376982928 -1668290824 -1417383736 -2079838428 -1253137177 -1104407710 -1079220949 -819607281 -1179459909 -1908628753 -1360216432 -1194150309 -1849562148 -765231111 -2107204341 -1630536510 -388304203 -25936588 -2124537822 -896575685 -2002270443 -1090587011 -722966732 -439389998 -1778918000 -1007492466 -17319467 -1177989524 -818188175 -950865484 -1770372261 -1260661442 -863194392 -1456110859 -131566001 -1469106044 -1645791949 -1235913483 -1536074997 -1911553992 -1132584424 -51367160 -39432026 -1309097706 -1035181227 -1525857842 -1990521667 -1197404303 -704864484 -1137585736 -356555711 -1152459647 -1234274836 -1912622279 -1907414857 -285619183 -775657636 -1252150962 -1708961381 -2067635489 -169287869 -1952865655 -1820486484 -1716817779 -966130561 -632483760 -110501670 -1775696682 -553892015 -2068970007 -1123695425 -977816257 -1612964555 -1409199804 -1971446712 -579699021 -2015623155 -23834660 -1157172278 -982569114 -2037337215 -2047304737 -2067722525 -1632101921 -928363116 -1530195157 -1873330874 -814250651 -1344892673 -1345770436 -1065947648 -1073536662 -1920559787 -21642052 -813231621 -1397924639 -1448309493 -10510106 -549692488 -206996422 -65356414 -1081106481 -297488900 -554012084 -1939486043 -287646888 -495557219 -888596667 -1042901031 -276101203 -1868241301 -1173143120 -969054733 -386918683 -361822065 -1617241798 -282378907 -3430079 -1814762931 -10342976 -2035705872 -399126700 -1531017319 -659022079 -1610914174 -1308184689 -722490037 -1017511721 -907213786 -408207602 -1682398296 -150980823 -1356505054 -1094046026 -876573368 -830777556 -2087194545 -333344070 -1876433114 -1413990803 -889388319 -1463294313 -604793147 -718320378 -1805013259 -1503846491 -1412932694 -285619532 -781523279 -1051765101 -1078154050 -68104964 -31346097 -700358764 -571877341 -1553149862 -1126001349 -1078775279 -1919166179 -221592513 -568722093 -62504254 -389493595 -688695109 -2109323280 -736322284 -1567853174 -1283946728 -1376972440 -1492019008 -196921437 -386291632 -560394143 -1828569306 -125853725 -2099647427 -1323018085 -919273557 -1233315981 -829531823 -477512837 -411862620 -835260059 -115211174 -1471435471 -2141765892 -538455830 -331046352 -1913392334 -1964827360 -997399601 -37745525 -881362810 -1870034311 -1243491132 -44602920 -169483637 -948171137 -1583638819 -305310015 -1006989422 -152593547 -544269911 -1411541604 -527890019 -992603576 -1035331936 -1911340358 -1837005080 -171986641 -66486425 -745848535 -614280206 -1253531113 -1282839121 -2088774414 -1116398589 -746461484 -178695814 -1158407392 -266293642 -241320746 -1428652486 -347675095 -72318178 -2123357091 -379382591 -404258994 -1890136697 -1949360055 -883925753 -1995744372 -928577711 -841926028 -481002513 -1080788683 -1398708855 -1743725923 -92257252 -84441230 -1864545590 -1336354106 -1719479216 -599745633 -1784098460 -28654159 -554113385 -1494568303 -93249562 -1729809871 -280888811 -729190371 -1960875615 -1152414443 -474531208 -1839231545 -1084961897 -670956202 -324256617 -1614949480 -410095927 -1207221866 -352405006 -111037416 -42561469 -218555032 -1057386454 -1066953453 -798232121 -556914838 -1333948640 -2093001447 -1293181869 -1973164643 -1535677927 -1680449443 -1756346804 -1758006813 -1740490665 -1551850868 -768645661 -1513487722 -244344939 -716656709 -1761015787 -772709155 -1089154676 -272032504 -57610265 -1888082705 -1787654863 -1819060911 -1379532485 -1569022383 -1607489568 -1732890116 -510958998 -2048258680 -920773350 -670533168 -1804258767 -1708001329 -964427054 -2066412669 -1092188599 -1871052484 -1176055567 -526427581 -35728227 -1336373676 -2048392206 -1017461185 -57855234 -1710309394 -1101369863 -1561733948 -1517330402 -403758289 -2064722350 -600284577 -104712033 -1106031738 -456972134 -929134466 -1609372725 -1170855110 -1169176309 -870855313 -1364191286 -1427528430 -783018726 -415939066 -628611277 -1597672946 -2101164981 -1058744399 -267614951 -973724639 -1564617533 -589619616 -1247338854 -288757164 -1976096775 -1423896570 -2019373469 -778336295 -1175216188 -1451370257 -2060646773 -821538642 -1427589531 -1809943233 -610057276 -1145706954 -1558396876 -1265736120 -253961658 -1283579417 -1646027404 -898238374 -2029797055 -2021370790 -2135055637 -1575833336 -115059701 -1073112407 -1232556943 -957282039 -91746149 -84267697 -1095460106 -1020695811 -735123241 -742890296 -287281214 -792125242 -997814541 -569191164 -1503729610 -1595997374 -1857113788 -984109418 -7939132 -289005410 -1853400003 -843550686 -2016825755 -908580037 -1895951689 -897682837 -1282821284 -1788987955 -602018038 -1321703649 -302384175 -1224520423 -1178960160 -2099281898 -1622023123 -1185213243 -1968149176 -992586291 -744822941 -556991024 -466923095 -671211527 -320536598 -1369615910 -257387177 -874218781 -2059423140 -1730775281 -1474149152 -505962225 -1819357102 -2062647328 -85128175 -525128323 -1821419138 -212064381 -1490681094 -1332920956 -2000585635 -691306366 -899563092 -672012364 -895302175 -2073224343 -1759360226 -864982839 -1449768530 -910224848 -1623002755 -470019091 -1166008771 -1321135322 -1487930521 -201197132 -1380937146 -1554839693 -1609703555 -288663979 -409936480 -674879784 -1843389881 -107154698 -1357713100 -2070322325 -229783934 -802981432 -921689876 -1042200121 -1380808715 -1543783523 -472248007 -2120177984 -635222417 -1041953282 -1527152936 -134846408 -768331671 -531225086 -1210499823 -1757937130 -569328484 -1664183203 -1100074293 -1261925428 -632170624 -1290075859 -1310062101 -63898816 -205577012 -1979136308 -969720173 -833550528 -1447894715 -1629270848 -591159439 -1357340251 -98816476 -803653001 -1471331824 -399770763 -1618365925 -1995712220 -388199047 -406063343 -3575635 -2113638976 -255780958 -1795783459 -997420475 -388574843 -279615774 -808093982 -948971846 -8769453 -1359308575 -968183239 -772104554 -1665043904 -533490471 -630119872 -1182825347 -489486750 -1941439240 -902774162 -953374679 -992739686 -1175449059 -1070265860 -635281748 -2039129399 -2103770167 -1894432561 -1135502305 -1847552893 -1355420678 -48807770 -2120920883 -236224028 -1667458940 -320811230 -1690388640 -1300706317 -1735027006 -2065930876 -1584628236 -1902056005 -413706793 -1765504612 -1054463285 -1329375951 -401745069 -440788515 -1661473102 -648563373 -1925101486 -1192049500 -901003637 -1260932062 -1116537438 -932612980 -2090699054 diff --git a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvh b/ravenpy/models/ostrich-hmets/model/raven-hmets.rvh deleted file mode 120000 index 3ca66bf3..00000000 --- a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvh +++ /dev/null @@ -1 +0,0 @@ -../../raven-hmets/raven-hmets.rvh \ No newline at end of file diff --git a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvi b/ravenpy/models/ostrich-hmets/model/raven-hmets.rvi deleted file mode 120000 index e5f6124b..00000000 --- a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvi +++ /dev/null @@ -1 +0,0 @@ -../../raven-hmets/raven-hmets.rvi \ No newline at end of file diff --git a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvt b/ravenpy/models/ostrich-hmets/model/raven-hmets.rvt deleted file mode 120000 index 99d29371..00000000 --- a/ravenpy/models/ostrich-hmets/model/raven-hmets.rvt +++ /dev/null @@ -1 +0,0 @@ -../../raven-hmets/raven-hmets.rvt \ No newline at end of file diff --git a/ravenpy/models/ostrich-hmets/ostIn.txt b/ravenpy/models/ostrich-hmets/ostIn.txt deleted file mode 100644 index f561b9f6..00000000 --- a/ravenpy/models/ostrich-hmets/ostIn.txt +++ /dev/null @@ -1,110 +0,0 @@ -ProgramType {algorithm} -ObjectiveFunction GCOP -ModelExecutable ./ostrich-runs-raven.sh -PreserveBestModel ./save_best.sh -#OstrichWarmStart yes - -ModelSubdir processor_ - -BeginExtraDirs -model -#best -EndExtraDirs - -BeginFilePairs - raven-hmets.rvp.tpl; raven-hmets.rvp - raven-hmets.rvc.tpl; raven-hmets.rvc - #can be multiple (.rvh, .rvi) -EndFilePairs - -#Parameter/DV Specification -BeginParams - #parameter init. low high tx_in tx_ost tx_out - par_x01 random {lowerBounds.GAMMA_SHAPE} {upperBounds.GAMMA_SHAPE} none none none - par_x02 random {lowerBounds.GAMMA_SCALE} {upperBounds.GAMMA_SCALE} none none none - par_x03 random {lowerBounds.GAMMA_SHAPE2} {upperBounds.GAMMA_SHAPE2} none none none - par_x04 random {lowerBounds.GAMMA_SCALE2} {upperBounds.GAMMA_SCALE2} none none none - par_x05 random {lowerBounds.MIN_MELT_FACTOR} {upperBounds.MIN_MELT_FACTOR} none none none - par_x06 random {lowerBounds.MAX_MELT_FACTOR} {upperBounds.MAX_MELT_FACTOR} none none none - par_x07 random {lowerBounds.DD_MELT_TEMP} {upperBounds.DD_MELT_TEMP} none none none - par_x08 random {lowerBounds.DD_AGGRADATION} {upperBounds.DD_AGGRADATION} none none none - par_x09 random {lowerBounds.SNOW_SWI_MIN} {upperBounds.SNOW_SWI_MIN} none none none - par_x10 random {lowerBounds.SNOW_SWI_MAX} {upperBounds.SNOW_SWI_MAX} none none none - par_x11 random {lowerBounds.SWI_REDUCT_COEFF} {upperBounds.SWI_REDUCT_COEFF} none none none - par_x12 random {lowerBounds.DD_REFREEZE_TEMP} {upperBounds.DD_REFREEZE_TEMP} none none none - par_x13 random {lowerBounds.REFREEZE_FACTOR} {upperBounds.REFREEZE_FACTOR} none none none - par_x14 random {lowerBounds.REFREEZE_EXP} {upperBounds.REFREEZE_EXP} none none none - par_x15 random {lowerBounds.PET_CORRECTION} {upperBounds.PET_CORRECTION} none none none - par_x16 random {lowerBounds.HMETS_RUNOFF_COEFF} {upperBounds.HMETS_RUNOFF_COEFF} none none none - par_x17 random {lowerBounds.PERC_COEFF} {upperBounds.PERC_COEFF} none none none - par_x18 random {lowerBounds.BASEFLOW_COEFF_1} {upperBounds.BASEFLOW_COEFF_1} none none none - par_x19 random {lowerBounds.BASEFLOW_COEFF_2} {upperBounds.BASEFLOW_COEFF_2} none none none - par_x20 random {lowerBounds.TOPSOIL} {upperBounds.TOPSOIL} none none none - par_x21 random {lowerBounds.PHREATIC} {upperBounds.PHREATIC} none none none -EndParams - -BeginTiedParams - # par_sum_x05_x06 = par_x05 + par_x06 - # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> c3 = 0.0 - # - par_sum_x05_x06 2 par_x05 par_x06 linear 0.00 1.00 1.00 0.00 free - # - # par_sum_x09_x10 = par_x09 + par_x10 - # Xtied =(c3 * X1 * X2) + (c2 * X2) + (c1 * X1) + c0 - # --> c0 = 0.0 - # --> c1 = 1.0 - # --> c2 = 1.0 - # --> c3 = 0.0 - # - par_sum_x09_x10 2 par_x09 par_x10 linear 0.00 1.00 1.00 0.00 free - # - # par_half_x20 = par_x20 * 0.5 * 1000 --> half of it but in [mm] not [m] - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 500. - # - par_half_x20 1 par_x20 linear 500.0 0.0 free - # - # par_half_x21 = par_x21 * 0.5 * 1000 --> half of it but in [mm] not [m] - # Xtied = (c1 * X) + c0 - # --> c0 = 0.0 - # --> c1 = 500. - # - par_half_x21 1 par_x21 linear 500.0 0.0 free -EndTiedParams - -BeginResponseVars - #name filename keyword line col token - NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' -EndResponseVars - -BeginTiedRespVars - NegNS 1 NS wsum -1.00 -EndTiedRespVars - -BeginGCOP - CostFunction NegNS - PenaltyFunction APM -EndGCOP - -BeginConstraints - # not needed when no constraints, but PenaltyFunction statement above is required - # name type penalty lwr upr resp.var -EndConstraints - -# Randomsed control added -{random_seed} - -#Algorithm should be last in this file: - -BeginDDSAlg - PerturbationValue 0.20 - MaxIterations {max_iterations} - UseRandomParamValues - # UseInitialParamValues - # above intializes DDS to parameter values IN the initial model input files -EndDDSAlg diff --git a/ravenpy/models/ostrich-hmets/raven-hmets.rvc.tpl b/ravenpy/models/ostrich-hmets/raven-hmets.rvc.tpl deleted file mode 100644 index aed34dfd..00000000 --- a/ravenpy/models/ostrich-hmets/raven-hmets.rvc.tpl +++ /dev/null @@ -1,25 +0,0 @@ -######################################################################### -:FileType rvc ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "par_x20" and "par_x21" wouldn't be detectable) -# para_half_x20 = para_x20 / 2. = par_x20 / 2. [m] = par_half_x20 [mm] -# para_half_x21 = para_x21 / 2. = par_x21 / 2. [m] = par_half_x21 [mm] - - -# initialize to 1/2 full -:UniformInitialConditions SOIL[0] par_half_x20 -:UniformInitialConditions SOIL[1] par_half_x21 - -:HRUStateVariableTable (formerly :IntialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 par_half_x20 par_half_x21 -:EndHRUStateVariableTable diff --git a/ravenpy/models/ostrich-hmets/raven-hmets.rvp.tpl b/ravenpy/models/ostrich-hmets/raven-hmets.rvp.tpl deleted file mode 100644 index e7e073c9..00000000 --- a/ravenpy/models/ostrich-hmets/raven-hmets.rvp.tpl +++ /dev/null @@ -1,100 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of HMETS simulation of Salmon River near Prince George -#------------------------------------------------------------------------ -# - -#----------------------------------------------------------------- -# Raven Properties file Template. Created by Raven v2.8.2 -#----------------------------------------------------------------- - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "par_x06" and "par_x10" wouldn't be detectable) -# para_sum_x05_x06 = par_x05 + par_x06 -# para_sum_x09_x10 = par_x09 + par_x10 - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL, - PHREATIC, -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -:LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - FOREST, 0.0, 1.0, -:EndLandUseClasses - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - FOREST, 4, 5, 5, -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - DEFAULT_P, 2, TOPSOIL, par_x20, PHREATIC, par_x21, -# DEFAULT_P, 2, TOPSOIL, x(20)/1000, PHREATIC, x(21)/1000, -:EndSoilProfiles - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -:GlobalParameter SNOW_SWI_MIN par_x09 # x(9) -:GlobalParameter SNOW_SWI_MAX par_sum_x09_x10 # x(9)+x(10) -:GlobalParameter SWI_REDUCT_COEFF par_x11 # x(11) -:GlobalParameter SNOW_SWI 0.05 #not sure why/if needed... - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PERC_COEFF, PET_CORRECTION, BASEFLOW_COEFF - :Units, -, 1/d, -, 1/d - TOPSOIL, 1.0, par_x17, par_x15, par_x18 - PHREATIC, 1.0, 0.0, 0.0, par_x19 - # TOPSOIL, 1.0, x(17), x(15), x(18) - # PHREATIC, 1.0, 0.0, 0.0, x(19) -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MIN_MELT_FACTOR, MAX_MELT_FACTOR, DD_MELT_TEMP, DD_AGGRADATION, REFREEZE_FACTOR, REFREEZE_EXP, DD_REFREEZE_TEMP, HMETS_RUNOFF_COEFF, - :Units, mm/d/C, mm/d/C, C, 1/mm, mm/d/C, -, C, -, - [DEFAULT], par_x05, par_sum_x05_x06, par_x07, par_x08, par_x13, par_x14, par_x12, par_x16, -# x(5), x(5)+x(6), x(7), x(8), x(13), x(14), x(12), x(16), -:EndLandUseParameterList -:LandUseParameterList - :Parameters, GAMMA_SHAPE, GAMMA_SCALE, GAMMA_SHAPE2, GAMMA_SCALE2, - :Units, -, -, -, -, - [DEFAULT], par_x01, par_x02, par_x03, par_x04, - # x(1), x(2), x(3), x(4), -:EndLandUseParameterList -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, - [DEFAULT], 0.0, 0.0, -:EndVegetationParameterList diff --git a/ravenpy/models/ostrich-mohyse/OstRandomNumbers.txt b/ravenpy/models/ostrich-mohyse/OstRandomNumbers.txt deleted file mode 100644 index e9e16423..00000000 --- a/ravenpy/models/ostrich-mohyse/OstRandomNumbers.txt +++ /dev/null @@ -1,16833 +0,0 @@ -16832 -2067261 -384717275 -2017463455 -888985702 -1138961335 -2001411634 -1688969677 -1074515293 -1188541828 -2077102449 -366694711 -1907424534 -448260522 -541959578 -1236480519 -328830814 -1184067167 -2033402667 -343865911 -475872100 -753283272 -1015853439 -953755623 -952814553 -168636592 -1744271351 -669331060 -927782434 -360607371 -529232563 -2081904114 -1611383427 -604985272 -1799881606 -1155500400 -800602979 -1749219598 -82656156 -1927577930 -2011454515 -828462531 -1833275016 -1905310403 -1423282804 -293742895 -2019415459 -1484062225 -1758739317 -1166783511 -1457288620 -598842305 -1634250293 -528829321 -1747066761 -407146696 -1031620330 -1807404079 -884168938 -1787987373 -965105540 -584824989 -120937804 -1082141766 -517654719 -766608236 -1630224099 -1580063467 -343911067 -1234808992 -152763936 -1260514187 -535763254 -174078107 -858017135 -341298340 -272379243 -1590285344 -344306046 -1430770104 -1578742469 -1764217798 -901816857 -2043818720 -1460293275 -1705955009 -931665166 -1193174685 -484635109 -2004287539 -632181131 -1466667008 -1455103190 -375542294 -284896725 -1518207912 -119683330 -1473033718 -1086215810 -270635523 -200870715 -189813921 -1189354452 -702488488 -2006410257 -1948964205 -673325744 -1494443365 -140900243 -1583405107 -672279725 -1093871208 -85890889 -459160639 -1204116002 -1839239933 -1225939013 -1398882173 -361714255 -1952762775 -91382324 -411911863 -1662887160 -792316062 -2057442634 -656665644 -661016775 -776031494 -1093131427 -537293504 -123186093 -214429343 -436408135 -1054870440 -1729979095 -977552932 -1482228574 -1005338018 -314733930 -480938949 -12468535 -1252753986 -1106567514 -871824778 -478120365 -2032651128 -597651820 -953121721 -1036241874 -24799148 -187452918 -162682677 -461069708 -1077583980 -1224356709 -574902609 -859221610 -1257556842 -223789720 -989958143 -1670696092 -1040533719 -1290877712 -1901903590 -2147035182 -1052583333 -1945277392 -986085416 -1006282813 -1161517966 -1006103332 -292464446 -2007359586 -724467532 -2041015481 -1590895636 -2011549102 -270702593 -1328116205 -704030517 -6004249 -2129165181 -1359187106 -1074137403 -1279795539 -327415621 -1021238533 -1266717307 -1712386038 -1643787219 -1902154725 -2072893833 -499445950 -1821989174 -1202724845 -2080384351 -1838530450 -39076467 -1775668534 -80808579 -940122349 -1599128664 -797613643 -899573327 -844032009 -1516486828 -1258195600 -221977191 -591554298 -1551284523 -1987503481 -2010359729 -1755747052 -267909537 -1629864247 -1974481844 -51555017 -1049260978 -1941031729 -496187726 -748109581 -2108458329 -1231476356 -2123209153 -40472272 -1612643052 -300666177 -267415448 -1915645012 -1170880860 -1601956559 -1081404674 -1014251357 -1944850860 -259813033 -843391280 -1485172760 -1096148239 -1848728907 -1793335153 -650930826 -912694764 -185208027 -1087505286 -468022185 -1963747981 -36145924 -1914156214 -1918456638 -1181238808 -1741813188 -157174812 -232179474 -262632919 -992575048 -555861840 -816080430 -2033217268 -1522832212 -530882138 -1889023728 -423559248 -1999474978 -1351846990 -115375670 -2088636096 -939171610 -652443820 -571781158 -2084085828 -1772228626 -248333292 -1176912523 -2044385191 -243553137 -293742377 -2010709433 -1190771239 -892107480 -2067076653 -1514349452 -1842539167 -841590029 -1276318261 -2014346391 -40098582 -1774486163 -1683535652 -2086653939 -1984797263 -1624110390 -1906171360 -861001574 -1108640732 -1356661352 -1573462865 -1076742897 -2120660257 -150850140 -1307599520 -1624972889 -1369806524 -1313553028 -753850436 -1958244199 -2023362318 -1246928381 -1979872041 -450282822 -171017326 -955078396 -1709823894 -1531505951 -281525515 -692856264 -1178895014 -1004373076 -1276822912 -1906081160 -1492493821 -1734652587 -68038037 -1053987655 -1925397129 -1865954107 -1386979208 -24560671 -474337273 -727249647 -1555382052 -2135196680 -1798859390 -1154985264 -732646815 -2071271454 -1149409508 -1510196191 -758158244 -1345129257 -1027070430 -499162424 -1351734986 -380408089 -459934704 -1328924575 -1405403225 -439369222 -1429735768 -1374526493 -1185177072 -1360223179 -1307547138 -744588615 -913641236 -1060177402 -729776255 -1070409768 -906459857 -621824781 -1353667965 -655731437 -2139668902 -1801566899 -1562932440 -185548976 -375384188 -1922576477 -1703896177 -688614094 -747704175 -1737250628 -783640184 -123365437 -1081180304 -1538232061 -1658106641 -2050511815 -134507649 -1517260099 -1369659415 -988575712 -2058498392 -1220921174 -815924333 -1557178636 -118129263 -1123633413 -2083064220 -1781932146 -126636760 -227731143 -661461447 -1807182857 -1461058078 -1675097148 -1994637913 -1659674121 -477860764 -1964504415 -2012113927 -1173781780 -965595118 -223227847 -136493220 -529013544 -548335428 -1021209119 -772356209 -1599642195 -838594572 -323796343 -321575303 -1647261669 -167693759 -930462649 -309824289 -1716464895 -1477660114 -1532642090 -49260865 -1146153960 -481292130 -1653414308 -495882376 -2058543072 -1971857934 -1048656234 -367033909 -1165874379 -1209892625 -142694932 -1681972072 -1577368643 -149160686 -830233553 -1534070712 -437790702 -669353892 -1311519858 -942100598 -487821255 -1866752186 -1915391079 -1197996223 -2063329336 -810218396 -146775945 -1552080859 -339137104 -455707790 -1154141328 -1580999992 -1051701213 -4388434 -741966240 -1936541198 -185760854 -1788934087 -1844142209 -2014113159 -415135652 -10534061 -952304173 -180614520 -1193844429 -1003604282 -1240604036 -913304329 -1840232394 -726361864 -1666798700 -2109059432 -596796242 -1605807804 -1384769979 -1548754514 -267831511 -318481265 -1185372531 -350335298 -1832677059 -445381692 -1549587649 -1385429574 -1897149444 -1700998299 -1376102429 -1902129660 -1651626378 -510913924 -1290699962 -1061942987 -339192292 -1383252506 -1814389567 -177665169 -1016226053 -773828180 -569255028 -429608211 -585181063 -1810506228 -1482379653 -1397039124 -1597844417 -688110784 -878507593 -1127042426 -1396287242 -1845865525 -913114113 -790755729 -1602729667 -1190128948 -834540878 -912837989 -444906955 -13133831 -1696965623 -170909954 -1297960839 -688934847 -1843632552 -2038242548 -83367292 -994738800 -414819705 -1142863773 -1017694043 -1824015993 -907733426 -551862494 -171065265 -1760789169 -1258907723 -1453210217 -772599788 -1398507154 -501220863 -1588180907 -1482255386 -1455967302 -2013770796 -1103491652 -715419672 -297487751 -534700841 -1645455639 -2026002254 -519176146 -567428061 -1936028547 -159570085 -1834827139 -74554253 -1050363970 -1151665450 -771107739 -2091443375 -876469529 -1233039130 -471464360 -1834324737 -220618427 -1377127867 -1956796950 -1321768492 -1392200476 -1879066067 -568875287 -489752165 -2107301851 -1121903433 -924577771 -186927505 -2069484621 -1182878335 -1380056066 -1778913662 -934583700 -852851742 -1573367716 -1625057301 -641035361 -2103338975 -1089839558 -1045426043 -1911788594 -780572944 -111870285 -1155688870 -1820734622 -1592305851 -2090712490 -1477387216 -1241012698 -1339235622 -756994747 -1117588001 -1409556145 -1518018958 -1238900746 -203396710 -1842022593 -749465399 -1273371338 -1877535411 -612943659 -265022154 -346258400 -2031729077 -133126192 -1921432417 -1803032580 -426829243 -1123706121 -1157583929 -1458736530 -1311545558 -1374040498 -1606993695 -1988687193 -430170843 -1451402499 -455054420 -910369973 -1914634983 -1375192633 -1643573817 -462990958 -1155778025 -1171679060 -2132402077 -2074607003 -1375406729 -946917995 -1996917695 -1321264549 -1512365063 -703167949 -541209402 -1513174369 -1420272009 -1230918858 -1343274855 -2072390721 -633577154 -1307305452 -977539307 -1253233199 -570765817 -51635170 -248908802 -112090858 -567891987 -1143298241 -1877346778 -1737556122 -1623110548 -134212395 -849893415 -1244889708 -2075633282 -1444208706 -1955543348 -1727316148 -1318559290 -1142233637 -1164416526 -330077371 -660114196 -638771770 -566387037 -1619407355 -171673407 -1244413528 -514926963 -18369731 -1649907396 -1684754508 -1097130261 -1173703485 -1797174700 -757687845 -2029067852 -503074204 -525028389 -141828400 -3070630 -68470882 -1886362629 -795624942 -1835213972 -133605543 -1387950086 -1309721688 -785028466 -1981384541 -101066558 -2113559176 -1062066005 -259272171 -343058234 -1933630290 -654253979 -930352413 -604571484 -1287797631 -1674589751 -2056751122 -1919325342 -749161407 -459145088 -942750345 -670700849 -327506040 -393427019 -225759220 -1879089938 -970075184 -357769464 -77169848 -2060996195 -251823255 -1850662195 -2073851864 -1568687438 -273036247 -1895133337 -28542655 -827549304 -1517054356 -59220461 -1033359466 -972291773 -1104758788 -537337954 -870257243 -2049847031 -1846384843 -1051357151 -664189341 -410257081 -1768253497 -10333246 -1872173762 -694022090 -1445579773 -1376746300 -1986251322 -292676239 -1271997243 -257957216 -1864929666 -1349068497 -661884053 -319987311 -727683889 -263752758 -486356298 -867540004 -1478367745 -540894425 -514323224 -608746593 -591894243 -822289197 -1157265534 -402439059 -1367260210 -1467326570 -1802943489 -1076960453 -1482156655 -1944079032 -172601719 -1814167783 -745108775 -1066035768 -407085855 -9065643 -2042406611 -1349297429 -214576883 -768629268 -1237970571 -1749814661 -1493945409 -361688339 -1517192563 -234581863 -1984879196 -853674674 -372000311 -884330560 -209401033 -1824947845 -1536984461 -17046264 -881233997 -1852557867 -1722156463 -499079375 -2103414090 -204813716 -2035322318 -395185563 -1864320817 -1853561589 -1411842941 -1297493684 -1427395350 -693826813 -311042881 -722504169 -1255028245 -675332881 -868656572 -917173298 -294001320 -2067797140 -738672579 -267071946 -437374192 -111521263 -1732127057 -571128267 -1848365026 -2120038127 -432129465 -10224101 -37773747 -1355689964 -279730278 -585079063 -96192228 -1795073452 -1949234708 -924702371 -133596058 -1228535691 -2091576379 -964384110 -1344652861 -1610217446 -335695428 -593517727 -190897374 -71596200 -726491080 -1691048365 -1651286157 -1235270518 -1467180477 -1495042085 -1613652695 -89866902 -712018073 -1108871827 -945707723 -983229014 -243374633 -1588592943 -1964893497 -2108964160 -1143043385 -1888949280 -1319795359 -442008850 -696806977 -1006535348 -1110906417 -781323501 -1989063549 -313135194 -1528270408 -1736329136 -328509669 -81550446 -523779136 -620469699 -53641261 -1753025534 -1771996745 -646076619 -932416301 -932598748 -1851501830 -1153211780 -990472285 -1721946098 -1258442114 -70170695 -390348662 -27420649 -1297347285 -1114351004 -692438741 -604036894 -892878089 -2133800234 -1951111585 -257119405 -668742071 -1766062546 -1841725435 -50098187 -186639285 -1520338375 -1566636619 -164659666 -1476069126 -562710538 -2105514425 -1145405709 -790339455 -1048863490 -1702901854 -1156896609 -644367525 -124960854 -2125550059 -729373768 -748261700 -370155068 -2083586164 -1964310366 -898216031 -1654278254 -2131320916 -1083403252 -244613451 -934570599 -632663235 -979454348 -1227072581 -1123406726 -420619458 -1982548329 -333498651 -179508687 -1935462021 -1375385838 -595802958 -2091552792 -567957401 -95227692 -616502429 -2095211075 -1923177666 -1070661465 -841764042 -2053471105 -479170798 -359925736 -1957895000 -449342019 -1538810481 -642193346 -90756400 -629425430 -248756888 -1853839554 -1788633402 -1085496708 -1069590091 -15050400 -1696486101 -701518288 -732644386 -2030447251 -64313080 -725661119 -626795720 -1148377505 -1345190946 -2063877453 -1432486227 -356850672 -1814901880 -198175172 -2130462954 -1696021447 -1482013098 -1678800180 -1954470974 -883795506 -1954166690 -64661612 -140987502 -902483473 -362731950 -1877293464 -841507724 -2040501773 -1546939868 -1981330894 -1346905076 -808489305 -1150714566 -1969469527 -1708889078 -852438968 -1078326039 -811240440 -144400277 -278934429 -94146802 -1777337022 -205798984 -1414852418 -338166095 -1315828703 -346414515 -360586588 -179932682 -471611398 -10625109 -335064262 -722929000 -1952711921 -1384162793 -2081197647 -475210793 -376114758 -1316364585 -763048701 -1934661470 -805427063 -1223220800 -811032869 -950721774 -1502521938 -626006893 -775463998 -145160743 -175184609 -127643426 -2114381076 -1990837423 -61864454 -373793230 -953149135 -1496988972 -2122727799 -540290182 -1096229358 -1064612293 -105061647 -539543295 -1428201431 -1356728298 -551140640 -923766969 -1592163820 -1851081120 -524789751 -426006828 -186279098 -1909126407 -1134352622 -1852183535 -1873209480 -921465340 -1563390863 -1447813396 -262542415 -1618957967 -1208743879 -163073733 -591096959 -307238891 -1213353649 -330066831 -482968416 -1909465699 -394382325 -1249201633 -1531712759 -1609863924 -836502115 -1663093543 -2113511496 -260708245 -856833835 -1928411710 -992409446 -2067556320 -986178133 -417093785 -708620687 -1991063794 -1718998204 -1105311537 -1237455809 -1688144315 -87558041 -561696892 -101551632 -1676263306 -119418949 -1324549545 -888718013 -934879606 -1531176590 -1188406129 -1943893003 -1340979610 -3430005 -1813519213 -582011020 -71201055 -527740006 -618818732 -223126303 -577326859 -801402067 -147106085 -658292898 -92987342 -1617645625 -627048355 -1099446656 -1450648604 -669243037 -1595863520 -1754913257 -1286702501 -448609017 -2104147749 -1798002294 -1782158321 -1780476338 -1428675468 -733933569 -75425815 -666320975 -1876891367 -525914386 -394450 -187070209 -172943455 -1115273794 -1169384742 -79021450 -968616304 -1608177068 -402800734 -1003480994 -1315986267 -847109016 -1692135949 -602957622 -2080906408 -2022807861 -518104170 -1878080252 -1180151758 -651633014 -1976950245 -735781331 -1065990691 -1796960363 -1450293180 -1138082810 -120943841 -1183605625 -718717214 -2032184970 -1352868902 -110781478 -35978797 -1252736372 -810529016 -1072398991 -2127076113 -607959582 -249502248 -1496203192 -1801025221 -1048884882 -2062437198 -848440559 -449059033 -1077632073 -2032655760 -675501844 -1560934066 -958615510 -1028556776 -1857859529 -632876523 -269218470 -6781061 -152658936 -1643262834 -1678750618 -1121482440 -291399361 -1286345167 -885347420 -119897877 -783957853 -1167461026 -2106864990 -222031547 -1505115590 -1267843117 -1306521885 -693030620 -1961812659 -1868927422 -1967360532 -622748465 -1845639424 -1408001900 -1165627007 -1347278715 -645789037 -393992921 -1146939546 -799734150 -31712477 -415656483 -174206090 -861543769 -1631377509 -1638072514 -344388258 -665023541 -1545754599 -1387867634 -2071434571 -1743433280 -1616257292 -915655741 -558224585 -1872029999 -425280996 -872122556 -1187907917 -12894860 -1975547320 -779140973 -1814537452 -515684717 -2016522974 -114707064 -1588793289 -1037141425 -111167276 -77634842 -1286215765 -857971653 -1724366013 -1127764226 -642677960 -1793212957 -744666301 -71826191 -296982523 -633268433 -413598899 -2099613801 -757865903 -726721364 -1266464259 -1754375596 -840168662 -1009723209 -1002195069 -1178281262 -1426461447 -30104621 -1309708102 -556688564 -1825928816 -844294882 -1639626045 -684780011 -732780604 -24895883 -1813278063 -823970264 -1493671192 -47890514 -1736984820 -611172422 -560612953 -1211141682 -1808243108 -2100827459 -1828463086 -488097832 -72730884 -469772245 -1312235343 -82355111 -1162881909 -307573216 -389902983 -1126828284 -2092169942 -202979216 -1267651876 -239818045 -1942560543 -421160860 -344473508 -2097820291 -679114391 -2147469379 -1907681371 -469952687 -49956743 -2104357271 -1024471254 -1911967979 -1648012992 -2057761185 -1715585007 -1721768027 -413086464 -2077053344 -1688870623 -1557198362 -449664145 -510331222 -87162036 -348491798 -913743617 -633411222 -665969975 -272601661 -1033497376 -1142661496 -1912991798 -1675469749 -1814491979 -1898903653 -1119217904 -886048455 -1164774887 -2058083404 -688668799 -1667131110 -1253423361 -1619334904 -1101473097 -1149304139 -1886743055 -746993783 -535110519 -2088462844 -174808893 -255435555 -285562532 -1971007926 -1794957307 -2144669340 -2092066132 -605728193 -1401252971 -1553010595 -932824527 -1351202189 -15623498 -591125952 -794524242 -515618248 -899378491 -1864390651 -879777980 -1003600265 -1173090317 -81594712 -1267757798 -2020049099 -1396231470 -908505521 -643561277 -1606736247 -1956725951 -128488299 -1281776058 -1401743749 -1211581853 -616262517 -210493738 -862687957 -1534392402 -1549467238 -1509165544 -615943291 -1287713297 -257188213 -1825198127 -1448506741 -1178173595 -1764385825 -1578362999 -1828916449 -1665318832 -859238073 -1534250483 -1311718252 -2129024909 -1149119249 -926780472 -700501213 -818534037 -321317177 -1603905281 -1621320623 -115713978 -1332127711 -1553418802 -1351108635 -590745067 -835440988 -1008601230 -1472446839 -1959958692 -774075111 -424457051 -2056464470 -1396532472 -1672478841 -938425104 -990819360 -1112784682 -137068651 -1610347773 -378617670 -433133629 -1854822920 -1136196588 -631465392 -174659870 -2045773288 -2098462946 -742798741 -895999976 -916263868 -41596839 -1185887798 -420493179 -2007660823 -1492390497 -2145569766 -45656738 -701133587 -709425620 -487187196 -1947540808 -372612482 -435670322 -1539349231 -1107030008 -55026848 -1418266126 -1877781629 -456162291 -203005047 -1701793493 -1856026105 -2030774060 -1262024649 -152294324 -1957679891 -1128972350 -1620265205 -1704656475 -582040698 -569999201 -52021940 -306901251 -1981089110 -1578208682 -1382794277 -555385705 -1403614073 -433862616 -1222005547 -1861112168 -1612889021 -139699866 -736021691 -810753917 -557342804 -2084322261 -1450990763 -2124942056 -1248085582 -2101596425 -1867572766 -674493610 -1795414404 -1237164031 -1079198763 -446727179 -540867541 -62483836 -46328269 -1250136869 -70355035 -1341067395 -1478832500 -1909580769 -180880168 -1363623071 -467473513 -1332152265 -1966097880 -876192771 -876534718 -181187006 -78198396 -20449608 -99178136 -439621680 -1377830080 -873988959 -344288433 -1134748413 -2061791931 -740856325 -462068969 -692294431 -326102371 -424282253 -1266118131 -231969594 -1030147053 -668357657 -1747667389 -1911966904 -1629945467 -1192062737 -1123477896 -1616773648 -1004116445 -1258592989 -458443173 -2030566822 -2073942877 -950859282 -1666135247 -1695823096 -295811488 -279036011 -1801435476 -1501589726 -2138188985 -550921997 -1544001362 -1985984433 -102040110 -1296178464 -797329280 -415251680 -1960616657 -1095074631 -984468427 -1746836101 -825411370 -2092019617 -1971434235 -369998082 -1592606109 -694697755 -2064063193 -259251113 -2136620075 -2099539038 -1648807809 -383864975 -577759237 -1625928172 -245378729 -911696063 -579909496 -1258109186 -917100740 -1222002661 -1812607166 -285622620 -833423295 -1456973331 -1742231023 -737276716 -429122622 -1013821328 -1159804398 -123453367 -411536167 -1791015429 -318035204 -130876245 -613795187 -1691751368 -581755696 -74937881 -1055548825 -246693908 -1541073046 -14417655 -1799359121 -964029593 -1828736583 -789794617 -481705812 -16233094 -99187689 -600178951 -476939498 -1513172282 -1385195800 -115593473 -1454283823 -1636826654 -880055708 -1376407467 -586452385 -1702778612 -1233051962 -687131784 -1604323769 -64913851 -85401081 -816892171 -643762726 -697522296 -143999899 -2139715971 -445171935 -171685397 -1445929458 -811451154 -1538386828 -2111791963 -1425288172 -1785708166 -1313179137 -912315340 -250679800 -1959966833 -910900898 -100473223 -731312419 -1118914352 -79217285 -2112531502 -969818263 -334665511 -463571884 -181983072 -572777776 -1654375378 -1616200337 -2105896703 -1127901114 -795870929 -1674550187 -1391798974 -1573472894 -1245300300 -386518438 -77355291 -882769402 -1888305938 -1244564600 -906510420 -1471637122 -1235946955 -2098638901 -1552590779 -319427956 -2064022639 -1725143682 -1313145227 -342389970 -1439535477 -721994837 -1284619909 -1953707272 -933157874 -511314277 -1576981892 -91487570 -33297738 -1289334346 -1732354992 -107064518 -1989541487 -1903388219 -1329391021 -655026559 -1030202591 -1601784823 -342521369 -1500474823 -579883440 -820185994 -168471065 -1109742709 -550235968 -751330194 -402726198 -1898238089 -670501991 -1280266928 -1807599603 -2022857159 -1346655656 -911454659 -817599762 -1798826428 -600992930 -1272582669 -1507277410 -1094329858 -1351970498 -43690979 -2022360426 -1587998713 -567604475 -606051351 -390118536 -454660261 -728190601 -190126754 -4687742 -1477468502 -459702853 -1727172112 -1045229885 -762444735 -373739496 -50041797 -1386376202 -627257064 -312251525 -1708831054 -2024713247 -329671967 -288940109 -755886096 -1811843467 -335035409 -237996629 -1394792889 -352594771 -1152934124 -618875187 -1171965488 -503946532 -153859556 -347246704 -1462285229 -824987535 -1411075713 -1287594570 -409227171 -1638425303 -1978745687 -847003967 -2074061053 -789559667 -827868456 -438591079 -1236388249 -925532571 -1201865576 -523552150 -1100483291 -1693503873 -2118819820 -1430880186 -1281406996 -1641369656 -2072362677 -162241646 -1638596279 -557372025 -427955961 -733102724 -1143799429 -1710878906 -2083223459 -163294725 -10342209 -2022814903 -636459064 -351442941 -1121480137 -252692840 -1433391761 -543775081 -1684868382 -863526932 -602659698 -1368665034 -1455883421 -603982829 -2131691281 -865676866 -229378437 -430244294 -538409809 -1705055052 -838473396 -434674958 -1990135659 -1152218788 -1481124917 -1783527642 -1172334268 -259581051 -1239437100 -627963800 -1452945242 -614132257 -914435917 -1531479087 -1977505914 -1484975626 -2077884395 -623959251 -720483256 -1649281806 -1907881613 -1687936334 -886988668 -1934549249 -1066812363 -574416138 -1273038101 -571788446 -59091597 -1015025865 -2077104934 -408460106 -1631265730 -1906886508 -2143075775 -1078822941 -572737766 -981927308 -1987922008 -454608430 -2004550631 -759001081 -478305187 -843987188 -763180281 -1998642883 -251728207 -253190459 -1206939706 -2052592827 -750337981 -906471483 -817222963 -1908416576 -2089124887 -564347359 -1698277561 -745815450 -58220611 -1408749692 -848865269 -1144709062 -1966695208 -178066232 -1314440953 -644820382 -1293677512 -1713501956 -1071668222 -582459765 -1170807329 -366121042 -855704239 -123160914 -1938729537 -457952428 -225066548 -974769869 -1951928967 -1109956797 -2000929337 -25454939 -471914020 -801825769 -825814658 -280146445 -1137146891 -1570822384 -1795335317 -2055432469 -1231560841 -1395664901 -2123598573 -143003271 -421774704 -2071415028 -1414974079 -235438875 -1356294351 -1847727999 -3459926 -168917813 -28301757 -1073743912 -1108843243 -465296435 -1249224318 -1912979554 -1469684841 -636214893 -542628238 -1737230904 -452138916 -1301618126 -2027415340 -646592431 -1011733997 -437770633 -332054209 -1672575757 -419808669 -1240519488 -1639789740 -1288518229 -900778455 -1771265482 -1240641260 -1538928097 -471481811 -2127623694 -1221218861 -1524182448 -1749462120 -2011239763 -1514092961 -1826662224 -285781256 -1352134900 -659311746 -36896502 -1644218778 -565432250 -604687775 -1094816821 -946423051 -120844828 -1666977781 -823906505 -422073679 -653836912 -363158285 -452771221 -1191350026 -2029846001 -696522565 -521390158 -1271105746 -306952666 -697737368 -1611231356 -196611622 -1621681868 -1892191399 -2122998217 -790238214 -1494789650 -1665944944 -644884222 -219152745 -365730610 -736164556 -1064402325 -871096765 -1127307756 -1560721258 -1676918748 -398014408 -16594851 -1884270294 -2136972596 -1581908544 -1289349148 -1981132206 -155039507 -851330338 -1772934452 -1373732639 -727774776 -1791290567 -647312276 -225267030 -49303549 -1863543948 -1681626188 -59063549 -543623129 -1278494765 -2087627120 -1161181154 -1787754989 -1354394946 -2136682869 -1007434149 -1184669295 -1415949728 -1600786089 -736668207 -939330094 -1168600761 -1935038312 -696559616 -1144106315 -426260967 -162625977 -1655596455 -664005006 -1607106030 -1729217891 -1068899186 -1287911947 -1448415116 -1785715867 -1442609844 -853273478 -71550080 -2098835887 -568367187 -540050053 -1355348549 -984019314 -641044851 -115353758 -1720361112 -389386176 -1030787623 -696999412 -2093306746 -2129374868 -588429221 -567722912 -449138363 -263447736 -1802302485 -1041024460 -948827111 -1871175602 -1097816146 -1963954445 -1358702725 -1523080524 -409294628 -624691455 -141734002 -564007091 -274360579 -530861144 -1536177570 -1488014756 -1616934777 -1564727901 -297090945 -308033340 -1680756110 -468048132 -252355563 -59744516 -1251217263 -1048667817 -561709390 -311605518 -1588809640 -1311952682 -1774122625 -2016003427 -2120098870 -1453037066 -9934578 -1614211627 -893902438 -22681054 -1095869059 -1451517941 -247804467 -878885336 -1033318086 -276818113 -1032445789 -648507963 -993825616 -99321746 -705791303 -1682247140 -1905469225 -1945120511 -496870096 -1479283936 -906931033 -2098428872 -170117023 -856071404 -1999135775 -2093313110 -88850969 -817101318 -2011412708 -125812282 -1403114926 -634633575 -1882704023 -1582459663 -1962071593 -1925863866 -1120468278 -426247803 -2088862276 -445611576 -1118280743 -167569057 -982079782 -255585232 -653700224 -213326716 -1231908969 -804201256 -2095919021 -936724206 -321114085 -338021684 -1036196673 -1412589588 -961487931 -2060696289 -1653754054 -1911026104 -850305396 -1726603434 -77393327 -1522040454 -108707314 -1682726448 -1371264193 -42792147 -1948076531 -786574355 -45853553 -1861519645 -2018904019 -1478224733 -284775388 -1626380600 -1406885184 -1724334018 -590024261 -1605756428 -521293547 -1794848316 -312857603 -1157765765 -219886888 -1967053776 -1909551314 -1833313630 -406812254 -1853104577 -173293198 -550953454 -2072699161 -1522560940 -266580928 -774769254 -1353500217 -2131358095 -1708270705 -1196862192 -183539495 -961775373 -449283042 -547584042 -1277566499 -1518645987 -1039958914 -220064665 -659984521 -606807692 -217039841 -1361375081 -1340211229 -2121636067 -1518903281 -1069331878 -2117715450 -49602772 -450133968 -1964195442 -1114172010 -1979053877 -1731786003 -1281484630 -798680647 -1652840379 -1587275908 -1304322722 -238920078 -1882814703 -1295174776 -1108214240 -631061249 -1972163057 -1881891201 -806262191 -226831567 -574673144 -1297570649 -573462458 -276923870 -662420041 -738403039 -31880460 -1091463117 -415294745 -536926465 -396812561 -1291988792 -1248472327 -11685052 -969657087 -1920747773 -1033639107 -1377250766 -1874876796 -1026757941 -1689610742 -1111476513 -1772992385 -199928923 -1540984953 -681322251 -600266753 -1952627712 -2116345777 -651828778 -972188499 -1516516317 -1753817223 -45528239 -688934541 -1838489610 -1500162234 -1768651058 -249690032 -357321586 -1139618890 -168036637 -250762254 -1198287564 -517446582 -1563416971 -1886610552 -667499509 -209675835 -1094118 -1208972050 -1850460083 -824439127 -783917045 -481600970 -401637247 -776107808 -228257178 -912597104 -691320054 -1129617308 -1722656076 -306140478 -2079679181 -724156495 -1108383916 -1335322134 -1554994988 -2072262973 -634000165 -1974400388 -830007672 -2032656039 -680190997 -914633598 -558936360 -949930542 -1089187596 -825318944 -538615835 -872766740 -1277290170 -1169351778 -1672479149 -943601660 -2093850172 -525317415 -704521088 -1808580105 -1322285097 -1484846123 -2048811121 -1615714649 -385389428 -429437044 -2003344588 -1963872850 -2134819207 -1897121620 -1233360331 -1574922273 -1982693036 -618105553 -1121628732 -602645358 -1127652654 -914971003 -1934734901 -2039581880 -1118683746 -498389537 -1246725059 -710122834 -1467844659 -1920530724 -1680663858 -1065052415 -1059741160 -1987791549 -409467664 -1385423860 -1801114246 -397644410 -240489406 -341222988 -1153421826 -225748113 -1692414589 -991092808 -1413657924 -1737141907 -1103849984 -295454655 -724194721 -1750848298 -1686413292 -1059025538 -697750830 -1837487190 -1832358470 -1533307310 -492195170 -217213946 -2140074169 -22954780 -1401414647 -2122815480 -2013944749 -1879636076 -1559081962 -2042558287 -1751032314 -484202910 -1182769887 -1704854177 -1757334565 -1179436764 -1519630738 -410799795 -152229460 -867510643 -984897418 -366953250 -1957722213 -1840278204 -1496290534 -1121498568 -562462657 -86862105 -1750002422 -354677242 -1793285869 -1970098285 -1539006549 -1790024575 -844621202 -681635344 -1567453510 -1009244821 -1551862541 -964833772 -312187507 -632880528 -336530505 -1743754984 -580685479 -1415153585 -1104912570 -974468381 -1179787445 -971075364 -2135409195 -1075631701 -624658261 -1731326091 -2141678234 -1212671471 -1749603067 -85168698 -1206198384 -330612208 -1059185067 -1231471086 -2034636263 -1749561060 -1526640696 -115563316 -947435124 -2098370210 -1331668436 -276834818 -1313206724 -1375970049 -1824702647 -1710908969 -441008653 -1066365174 -1648445203 -731996874 -1885131302 -1575548523 -1770658551 -1777370178 -763051876 -1988023695 -16178192 -1323933422 -1270956987 -2101727447 -1922175873 -1413395690 -1624742363 -1790323336 -1570930035 -1457142027 -282537401 -519755090 -1707805281 -1964415612 -519601906 -1280725440 -923876199 -1280508783 -1577489294 -29458396 -1186022762 -541349480 -1719981668 -454521809 -548711484 -899131370 -2005995298 -1417199233 -1126380154 -1002899973 -140700908 -380665409 -489744650 -1980997246 -34250434 -121426842 -711468844 -467914612 -155768570 -219790297 -343648839 -1122510290 -386605135 -1534471770 -735921567 -1275453496 -365142918 -1596243347 -1696214705 -435133010 -1098681035 -1467758339 -469750484 -946498216 -1384142983 -1748250977 -982912185 -1360880571 -1618916247 -507555839 -685940189 -904539427 -557412476 -1107815918 -378914336 -1124231797 -1402685873 -2013474392 -416796918 -14144312 -1500250614 -1106570071 -914800277 -1212826666 -62998138 -100267395 -1566928517 -775622058 -654191516 -2028020419 -78736949 -481975291 -250399353 -1541461398 -98998778 -1720119068 -616319962 -1175971853 -1266930030 -992654205 -1886253539 -1109632959 -853151365 -166680536 -1081092864 -68627981 -231758228 -1772685985 -1492715064 -1158116394 -1817941197 -1887852110 -59528345 -1912998560 -1789118683 -651679887 -617261109 -1961443953 -2114536621 -310114944 -159052539 -1726366105 -383572118 -2098162579 -2136981513 -1731776563 -1122826550 -1407019661 -1837005310 -175852251 -611284285 -293210747 -1665538611 -258096432 -2057249331 -1702789417 -1414651597 -1257934842 -134384779 -1599667656 -1266517599 -503377329 -1324682970 -983708341 -1856972581 -758327016 -2034196614 -802831258 -545199105 -1996119633 -793138397 -846041450 -929423363 -22413663 -896795816 -1407044866 -113142098 -1056213491 -680317135 -887151317 -373223698 -2118443046 -1540890509 -1241485590 -697196878 -1117150514 -499163077 -1362709957 -153152044 -1340994402 -252039149 -1184225359 -397168317 -828728943 -2015894206 -284421523 -2121422486 -76731061 -1128754027 -98394191 -148759947 -537464121 -843262365 -1465982002 -679625583 -1655088 -2047260252 -1320063130 -647468753 -707692322 -1420418768 -1550013724 -2104021158 -1817871004 -708118359 -2138371686 -1474094057 -1727464207 -1659503256 -1901100003 -1526050355 -931120364 -626622059 -377140725 -1379922778 -1686225893 -56894192 -590462029 -373388616 -595252578 -1431250720 -1066520993 -2119811489 -917991893 -1167225603 -297594276 -177582869 -1780493600 -1718797902 -2033803117 -631778120 -1135712072 -1078139568 -1972189637 -181137614 -1395550699 -204205559 -403962207 -1197004882 -434246678 -1234484640 -1143830813 -90866147 -326459612 -2133464446 -602489963 -663412536 -239397328 -1314020865 -26852307 -335157879 -148866272 -176984749 -317825348 -898793747 -626532831 -1024969376 -1693969845 -1360476636 -1272431643 -1116467075 -1897505686 -1245906652 -1987541914 -508819513 -449672637 -653056266 -127742845 -1637832562 -606482288 -1190425754 -1527992026 -1352530156 -859928397 -251624069 -650426740 -1030455950 -1565022242 -949112838 -230938350 -877898321 -1624426157 -770816388 -1489674412 -1593485758 -446572969 -96543718 -1260114941 -268086673 -312021705 -2141213608 -1993636877 -2015131245 -346237878 -1686815823 -1381913114 -778064693 -905368668 -1609564081 -92008108 -192045316 -37704571 -193048932 -1873093154 -1113857905 -994858436 -278058310 -401600298 -155105965 -1968289944 -1210990420 -1413466321 -664353933 -1029071178 -1913479355 -1279905660 -30735621 -1177506867 -1296106564 -1736389627 -1345181906 -1911942173 -1214291550 -1060983409 -1391434022 -1882175571 -1290701487 -1087573662 -1617217617 -2023452487 -614915117 -1187062055 -828877755 -222010196 -1146269333 -272882494 -1458490313 -1468343733 -1718532854 -1874108675 -1001850176 -1824115552 -433537892 -59336573 -837370203 -1220663030 -772265419 -73734665 -160450336 -1596820167 -653410210 -1781512359 -1661211239 -542399226 -35709867 -1027797156 -1975828071 -1202755736 -452085741 -407905901 -906676883 -2121897116 -1611386530 -657137393 -2147251277 -389524704 -1211544072 -2128760897 -1006836859 -1883434500 -974684720 -520829724 -441826096 -1920227793 -884269835 -1336279605 -467340909 -1250960484 -1027950458 -257407491 -1215636179 -37842895 -370376753 -1514478665 -1866738411 -1683874654 -1341809612 -1068371737 -1013011192 -428750528 -1202488411 -254121760 -1826930084 -492736982 -733513642 -1607647314 -89159844 -1713396149 -1440853620 -1401187768 -457143774 -1666404299 -1922812766 -1380238106 -543492648 -1232984245 -1696495812 -864731065 -1513170206 -1350304468 -2107495827 -87090771 -1298224590 -826830610 -175382533 -1306668447 -1008814507 -762026084 -1927406727 -1281529341 -1550138424 -2052370411 -1307159563 -673066531 -1432817768 -1634092965 -32101272 -507683107 -677449818 -2088278379 -1369472932 -1839578 -853016388 -45605744 -1991561076 -1486882190 -1909250838 -1078180792 -517557758 -1284468356 -1554039648 -1048249122 -2114637113 -1999083988 -1222929001 -201734370 -1820361624 -1765779406 -1377958749 -889045195 -2138860186 -1094378969 -29895428 -2088768645 -1019439006 -1086838076 -2139125597 -1260174352 -1266607350 -2011822386 -568819487 -1699405212 -370892984 -1600838494 -1617439042 -1449975168 -88222420 -990496510 -2129095673 -190966150 -1227514432 -2107145542 -642301717 -1912147797 -375246824 -1761383376 -508326537 -754159593 -711794957 -1653928509 -548123995 -1762621982 -1998224756 -1814202306 -1325336836 -1235815968 -2044624039 -2110387826 -1448277730 -1624153012 -475035667 -1727739370 -1989200503 -467437425 -725621249 -2104184277 -264444743 -1379129958 -1246202035 -509593054 -565674342 -378560725 -1623542661 -954284645 -1254152719 -992752928 -1398007353 -691000044 -46176532 -847376757 -1897091642 -729520085 -1059927872 -830892839 -1877272279 -485451429 -691792250 -475880892 -901050416 -2047146715 -1559330418 -1923390985 -360946604 -1935754300 -1992751697 -22812867 -1163766503 -142559045 -1545602910 -985914258 -277113954 -1709678182 -1230008014 -1067105276 -1202437635 -1548213175 -1906965173 -1317714783 -1980990017 -2060236278 -364800118 -129771041 -1365984382 -1499321844 -529118210 -159973243 -20769057 -1173190185 -1760076188 -13254291 -1574053196 -261017779 -1764204479 -677964424 -2147326833 -1659394396 -71489983 -1088785608 -511557569 -1371023242 -288095984 -1601062750 -1091542340 -1746795706 -146492605 -1084952773 -517609134 -461141 -1307945846 -1003223030 -1275352613 -817085984 -1753694170 -124860115 -432429686 -761071154 -910283746 -465417794 -1141421384 -397782237 -409464148 -1326330448 -755583676 -1024037821 -1069710489 -2038579586 -1452997664 -1495188811 -1932192930 -118864576 -597137122 -892527023 -528401266 -995197317 -1678663983 -1812891642 -771843458 -1571770726 -554250135 -1645441906 -1795191723 -1789531758 -1151780471 -556782039 -1249479494 -1906755292 -2085212110 -1374297377 -1629391754 -475742934 -729873957 -565003635 -1990890058 -946500899 -1429236164 -1567616653 -1603705575 -412345528 -361560227 -1511497826 -1159901219 -1750723914 -1743375051 -637602489 -241634093 -252624574 -286045099 -1491576907 -1356464518 -412757474 -842685708 -364042391 -279555234 -1938081849 -309678447 -1412782048 -2048679504 -1551111377 -1224922306 -1490956800 -1671744404 -1479644327 -521571629 -26121549 -938210055 -1671458111 -962885170 -1921772045 -1068709435 -246250537 -531787590 -2074569963 -752875449 -604023219 -663042364 -460367465 -12404114 -170030239 -1544976363 -1192957064 -1122046256 -1177520285 -1521622890 -1680643754 -727164487 -124097932 -507321887 -1048876219 -1916838157 -1896716052 -859429896 -463252350 -1254026075 -1011730867 -385164723 -947787403 -1576672422 -1332676221 -34808137 -904806575 -752401618 -1230280190 -1346600014 -2123763212 -762607297 -958435383 -148645934 -768731277 -804952187 -1831914456 -513214953 -1309388719 -1631269424 -1968971566 -1929593139 -1521333826 -1117312400 -1072497432 -1634090353 -2135685035 -1416707287 -1448178320 -2100852789 -106700749 -170643198 -1109560041 -1775102186 -1299615978 -589568609 -390064205 -1689002791 -1631062291 -635170882 -175804537 -1956838734 -2024032180 -1767880780 -188529568 -1078070051 -803817418 -2087204696 -503951927 -244533321 -1735309336 -368600245 -1721479767 -2010751585 -1899219903 -2139464360 -511313152 -1558074017 -134412201 -2060549210 -1329280948 -952513295 -1547844327 -2704131 -351173130 -881733954 -1665400578 -85659448 -864299046 -694677814 -1728914806 -269916885 -1007623731 -76006675 -1838900407 -1961976472 -327165219 -1107699413 -568298448 -1532237327 -1836343712 -1941276547 -315876558 -357734922 -1644106101 -819153558 -2143672036 -362763333 -257263898 -949752275 -240537774 -1154143964 -1625303244 -479632068 -1670039685 -745719505 -593156643 -564609527 -1809567843 -743328487 -1209506410 -94030368 -1967914431 -1342194370 -1092548502 -1477491264 -842263787 -1862750732 -1234946758 -320713451 -47016987 -2088002060 -1020346793 -1311628656 -623184937 -591489740 -466258217 -234025216 -1219247655 -606377911 -1583645162 -411916816 -1746132231 -1880370162 -1011963482 -2147241381 -223202632 -1860188362 -1118867108 -1432671024 -1315250204 -1361000057 -1479633802 -344677954 -1238976919 -1483636321 -1043021730 -157205649 -750456933 -758214100 -136417402 -1402224065 -694318277 -2128627388 -910434743 -855740726 -736397923 -691634200 -2114501836 -1872967096 -1142684746 -156270901 -72532826 -1435978733 -1073340545 -771905015 -458875578 -708063069 -1209112656 -2066141478 -829248756 -14973062 -396666335 -981852057 -723178451 -1850267584 -1884075728 -1014385481 -2051589281 -1063609535 -431577117 -1464329500 -823311880 -1165629539 -1389834039 -761065054 -807761046 -1795767435 -728105107 -900712743 -666843898 -2075723640 -815371965 -863464248 -1696613357 -692826233 -674163997 -550576007 -23914726 -355357893 -348085344 -524922180 -504257384 -1083381826 -2031990316 -228802771 -1492444067 -898437109 -1074968906 -222480931 -467977890 -1219281916 -1182202538 -759354122 -2116897980 -1342770011 -29928554 -498033680 -1708287401 -1477471864 -516207987 -73703629 -1786311931 -723239257 -724750379 -352374069 -1738562904 -1364226446 -2018462550 -500906191 -594455897 -926335035 -1803976142 -1252890248 -1249239301 -17315188 -1106072371 -1139890965 -445833868 -559375093 -1881265132 -1021338743 -803463130 -427653574 -2093335356 -462739491 -1224339450 -284830596 -406777809 -1274187462 -561745950 -926069438 -1635054657 -1162873187 -160982562 -1952007961 -290125308 -1348172866 -641399365 -1778703262 -1693358194 -1817876514 -800724929 -1651349601 -154090179 -2075843818 -687719964 -752446794 -1989553222 -2100618364 -461687068 -716135265 -1587041067 -1652317329 -1386309146 -1647730519 -1605204768 -1986962162 -1502345884 -1962034609 -1304273778 -1563801917 -1913947033 -550235218 -738724944 -1147170501 -386427541 -697133059 -44544581 -1336463711 -1414126804 -1027673479 -2044672379 -775354559 -453303117 -1540991510 -791525750 -1659570732 -887685488 -761101107 -1413703817 -360981911 -381675402 -284827825 -360205612 -219319991 -1029150485 -1098908457 -995072599 -1730012204 -1534015895 -1663965030 -1728207976 -1275126957 -1319452886 -1128516080 -394186256 -101353597 -495372708 -2082487584 -680345482 -1363579346 -1880071085 -280343637 -156385541 -1999287306 -345127333 -201755184 -22698875 -1395386606 -1741261802 -1627448545 -28483976 -1988814998 -430705831 -1853011227 -751843395 -438160817 -447425756 -1544432945 -649665326 -1118272734 -32961794 -2085574479 -1022182219 -2094862380 -357628095 -1996148359 -1275936279 -2036825858 -2042862226 -416884146 -1480185308 -1023904708 -979963945 -1201934772 -1686529322 -861658101 -1405471786 -1591673949 -60270164 -1495848611 -136549648 -1477398940 -1438057966 -1659271224 -148821826 -1577464474 -1759792303 -1684450037 -274853458 -224743909 -1994627137 -1478561889 -1656388986 -1099171641 -1123438793 -959569527 -2030334966 -324622732 -1325793344 -318411336 -10075828 -1840716730 -276662428 -563331641 -1806974311 -103509103 -215740051 -990641021 -262924756 -1602512213 -1830346864 -2083983620 -54418770 -1935717415 -1372825502 -513908746 -85065788 -1624073661 -1288867057 -321079710 -1907764706 -1870564032 -1556577391 -750422783 -184255050 -103206376 -1570258303 -904760538 -2126141406 -2078208209 -1771333855 -242302624 -751206856 -477268079 -593182208 -994280482 -1301803667 -850835633 -2048362105 -511553678 -1305627205 -688529389 -1471550887 -1934078957 -1752549307 -210500497 -976286470 -1671638210 -1842325416 -1544044266 -559588314 -1169903185 -202558363 -636826446 -83581274 -296166980 -1958822761 -1009835617 -743952678 -962866312 -1604825639 -2057392000 -1953143653 -50347929 -89085785 -468686536 -244593356 -596833934 -91813601 -1217933461 -2141039470 -1214383158 -453155418 -1206098064 -792017615 -1336411199 -531557620 -356947820 -1300184669 -1557623658 -1155163076 -1573649452 -2065226959 -491313452 -430565049 -1634371800 -423513823 -1236017003 -1128451990 -1464509273 -1697273044 -1042767407 -177766282 -568148597 -1161175217 -1687971830 -1483569940 -2074839910 -994907384 -1100727346 -1500368964 -948194874 -1982586578 -976349594 -585079631 -105738604 -1179741359 -196507962 -2026951895 -1447406904 -2020565959 -1493162902 -94995072 -1001825383 -1407419601 -2116345949 -654719582 -165807446 -1439454763 -1512918286 -1411252322 -2108378386 -2035358002 -994926551 -1422867115 -1897192460 -276484564 -1868938687 -9207740 -135663596 -1617908505 -750305221 -355874163 -435100646 -554739287 -1276684982 -1735375297 -1477206772 -355774037 -899766611 -1945072550 -1838273216 -10711923 -1794147160 -1413430593 -63873437 -1926515806 -1340205623 -2027416025 -658105226 -1233751332 -1704025139 -708594781 -1555661652 -391982939 -1724910424 -1687745315 -1971499629 -1469075040 -1124707721 -811605953 -1992609974 -1935841700 -1314199850 -887569555 -960098823 -188794603 -1237546002 -1056534419 -1779186737 -1229187931 -168872177 -1408781152 -1377613489 -1528711316 -556735304 -464004349 -1007971386 -1624076966 -1344414192 -1893874857 -352105765 -1524144870 -1117888674 -20516315 -1220322685 -1494537945 -1730506303 -1248403200 -997351210 -1371921635 -355001606 -802420676 -86998372 -1892758244 -912543897 -1944553652 -1707089118 -665282306 -1599850660 -47298533 -377494741 -887418749 -572986028 -859499448 -1632212814 -644658120 -714023725 -458126639 -1005547178 -1682602403 -1433923525 -891198041 -1814520909 -237646516 -1952894639 -160136925 -624288784 -1963977093 -1739347661 -1668735463 -300496821 -1716016450 -383095940 -537489874 -1276093036 -376473463 -902668579 -1326324845 -661414055 -1010665513 -1807112868 -284752955 -1249349169 -1863866664 -663063059 -808188330 -387195035 -711502835 -1039201349 -372571592 -1895915739 -293471187 -1747786397 -1764650713 -1735368321 -1359961140 -1198424959 -679160700 -778301095 -583609788 -1171891067 -1400636432 -1928257857 -554085722 -1029636262 -673427908 -1064030066 -1056990693 -857849267 -1814908158 -303689518 -1688583754 -1030758373 -205394662 -1061863505 -1150821965 -1627040873 -1766675260 -1402191398 -145284008 -99415817 -139358953 -1448747841 -935374001 -1250538767 -382603780 -855691342 -2053884682 -987708496 -368100962 -1919964974 -762038196 -2130973111 -1680295558 -1317485256 -270813375 -1042545632 -745361151 -1012751906 -365898020 -1402340779 -508446828 -628406783 -308225935 -622732981 -1585399836 -1985435323 -1610566575 -1908539237 -2003204667 -1759704250 -204543266 -1784836462 -1694835538 -877793358 -2007796663 -1627969730 -198105683 -962561331 -773977266 -927459783 -1380262955 -961129791 -336404603 -1775203717 -858563848 -939969143 -1171679069 -2132553340 -321916950 -946871857 -1221476329 -1556479830 -1258198703 -274129312 -938923969 -785308827 -250960927 -242417381 -532444108 -223766107 -593094452 -1666849037 -807589744 -1064178368 -1402018760 -1538724436 -1343518678 -1875356588 -500687497 -1213833133 -1946303478 -1051643642 -1184276284 -1253064792 -2035316662 -300125171 -1912145841 -342372332 -1143093611 -585614015 -497195904 -512688051 -1043681393 -506743455 -2064587830 -486890584 -1257350218 -1046027446 -1282150580 -1253884062 -772402023 -222154446 -1423195436 -972832566 -1603932151 -2072924713 -1018446110 -1579104180 -1401043634 -182167283 -1521328406 -1026218460 -1212488163 -816229158 -237921470 -131595576 -1966173069 -2139894294 -1294762949 -629088792 -1033332963 -526855852 -791227983 -949968057 -1719702201 -52487234 -1684646568 -1430466328 -768146531 -1714544400 -1412155354 -105768034 -1674371369 -533888495 -877258299 -1604994638 -602790899 -1426276594 -1218247544 -977381510 -748622667 -2141960143 -1655748740 -1075975354 -2105466938 -347291700 -71049354 -125584946 -1877246068 -44923152 -1256655567 -108446324 -1591234812 -1269629193 -1260330159 -1737771952 -955598064 -1853949382 -1487028951 -80895671 -256393946 -1360854540 -1181413230 -378356448 -337742769 -643439562 -1708555889 -1694982386 -1198384047 -2139036363 -1907902161 -2033286570 -540107279 -169662284 -1803207619 -1221226069 -1645327304 -2016559556 -729540738 -1407042843 -79141537 -839434866 -1561715719 -1210955599 -828229774 -68811764 -1173115462 -504206727 -231989627 -1366841684 -875611029 -1836615159 -61035335 -1471175726 -2071198971 -2078671374 -965813422 -1744779528 -620327311 -1955493439 -888495585 -1491499504 -55552297 -1659552881 -587663731 -587034364 -746681430 -1727844589 -1610132589 -1056987476 -803781148 -1477614806 -771150534 -663215293 -1219301521 -1511703773 -326285154 -1348832487 -990231277 -1966291936 -1990208316 -225881340 -1784077131 -1817661303 -1478640946 -837616338 -1062486681 -887122762 -2040783460 -1986285983 -875223666 -1768656159 -335422539 -302039598 -1875665725 -1401385762 -1637345285 -1006752337 -462873246 -1324876088 -2081958920 -385024222 -733870743 -1166992880 -681186109 -459611806 -196945183 -785390654 -1626227316 -978124643 -353557116 -147197363 -44918597 -1180099682 -1923875329 -2058865271 -944605586 -1786965278 -966624051 -336635602 -1362636616 -1067993504 -1098500102 -574301055 -1486321767 -1080156065 -1503716364 -1373371852 -1106478608 -1525065283 -1554884436 -214215509 -1137467391 -515014943 -1497049591 -994067685 -2020291782 -1180037357 -876379054 -1859909452 -726194032 -993529923 -1572060436 -1128438811 -1243009820 -545126724 -779612166 -1143943615 -1986729361 -1884626771 -1685830594 -2003038487 -1114200637 -312704219 -727324524 -666356144 -320493103 -638595445 -1897860056 -759352301 -2086292433 -203933215 -121643893 -64477707 -1345063461 -2068720705 -1228644005 -1764526130 -1788985487 -560538362 -2104974392 -659005666 -1335060883 -1459116725 -1259031982 -1394147583 -244355064 -886827584 -1374694108 -1854798730 -729635258 -848156836 -2122977513 -442266086 -725205135 -1553007220 -876100902 -1479976082 -1802410620 -710965758 -602482798 -542990381 -1381317364 -1502712678 -1684290426 -1887238675 -486944535 -16621028 -176743486 -557885401 -466331805 -1470818732 -366168107 -1646725694 -1896980169 -1003477021 -1249212056 -1706892120 -1649304214 -137009222 -611524570 -36713448 -715113847 -1599937917 -1513826932 -1650480115 -573024506 -1506199194 -152622722 -1034614136 -584693993 -66771679 -1245145219 -2075039365 -52180275 -820553949 -2057723456 -1081473704 -26954920 -2059774570 -1194808350 -24355353 -1318524941 -564929994 -753205771 -1860777779 -287780392 -591875300 -503914196 -1757872051 -1623029378 -917471852 -1016831104 -205502102 -720123938 -2052675121 -2133453239 -414133914 -354192671 -91552013 -1116391239 -622930034 -602302313 -1804546280 -97781379 -586646898 -676991309 -824568557 -811763408 -343988865 -394876331 -962025887 -364704546 -670976084 -658413391 -2118113193 -292018432 -953653229 -1379362242 -855231929 -774981332 -622927869 -565915158 -130987943 -343619826 -634888799 -1877286497 -724413355 -1130462642 -897799085 -1089117773 -1799287430 -1906602603 -1666451734 -572569164 -295717141 -840829629 -1381177343 -1296863378 -1571260643 -571219742 -1238301704 -872716051 -425360147 -54929766 -1934092599 -1981830401 -1152184637 -907149060 -1467841367 -1865202080 -1632563301 -92842188 -1325525994 -120027180 -809669727 -1662714297 -34491268 -2021640233 -221133197 -1438932669 -1328019016 -1218058641 -2097456083 -1000321476 -1901058416 -827097646 -368489291 -2004159536 -628318357 -969533800 -1996146811 -1249919043 -704320747 -588932565 -437490932 -2073570443 -1133811985 -1355632064 -1454088625 -503617515 -1066521778 -2133004984 -1470246717 -1489730237 -384252886 -654928473 -1529154836 -1568525003 -1837958496 -1163663824 -564316739 -1183647221 -1417821186 -842125990 -1694280200 -134162180 -5929910 -879749608 -526752061 -1194296293 -8147942 -1650991433 -576811544 -730437450 -1445695898 -1180975528 -1611833522 -1727280996 -727759626 -1536664517 -1082198397 -1469451936 -1016747852 -953769385 -1184112487 -647612260 -972130824 -547172592 -804777290 -1039904224 -1448373482 -1085973229 -488543950 -1128185169 -1275016020 -1602418374 -253194791 -1279747630 -1669692705 -1356477586 -632391350 -704850447 -901665877 -1653781507 -224945028 -1079866876 -938284135 -769037024 -1648674722 -294555413 -643019956 -1098688788 -1598063010 -67036041 -1393310059 -1200474725 -769839510 -103671395 -795898048 -2130339220 -1763907756 -2133391904 -1530760216 -632859252 -2126428420 -459601566 -24841503 -899313403 -770456635 -1885756682 -1348891948 -1989592304 -609985891 -2093422906 -1934192341 -1510710548 -813021755 -18190424 -783778294 -297096560 -402404645 -788864112 -2022577453 -940604208 -1107798289 -82623733 -1382644569 -186726996 -847013505 -86882572 -2093991291 -749620801 -1737729105 -235468535 -1854789971 -582422745 -548612189 -1377763952 -1910059310 -1781267814 -1846110718 -739105570 -1101900742 -1894282713 -764490616 -399123111 -1470696996 -467634802 -1895452841 -1103479089 -504273331 -1351403055 -1244094713 -1599054199 -1693564035 -982478907 -521228166 -695989849 -157966934 -660472046 -210705779 -131493750 -254783487 -63673891 -720229831 -1684935125 -1985276533 -1089266692 -7201769 -781047351 -1642777793 -2116601119 -648394478 -1233966868 -1031571397 -984987148 -1875045360 -1712329442 -692578247 -801230589 -1560042633 -1008686608 -759911238 -742928357 -926972441 -1779440549 -1200038921 -2035216270 -760320474 -1178506868 -923254195 -1563905790 -1512256897 -1032705634 -720755584 -1931331208 -668288451 -584522147 -1473523251 -723862353 -459706616 -1790416853 -995186607 -1498661013 -159949828 -1774716799 -1264867610 -689299617 -1531871001 -2121953571 -412742068 -583757066 -1499708766 -589665323 -2015536403 -713277443 -800266947 -396497068 -284465235 -708606423 -1751328746 -1171368240 -1203417631 -839136771 -846600348 -1732887461 -466336413 -1548265388 -637025417 -1280203224 -736926475 -985073076 -1171753609 -1237863473 -2097302222 -561863296 -750820013 -418048719 -1725810896 -1789592690 -28380948 -257223402 -269136003 -768241839 -1168902309 -560704607 -604086813 -1731866722 -490645216 -2084424479 -1021485042 -1114826776 -98804157 -596607568 -582247533 -1898791399 -1380048573 -1652978811 -1766418885 -1388264067 -144349414 -1571563635 -1368638992 -1018195527 -1662522993 -1114212234 -507614998 -1680225502 -140054064 -246576536 -1715885489 -329518060 -1997192454 -1644171768 -1922818827 -1482105333 -1081510178 -639973438 -1435468290 -1084259632 -1752890229 -1645409257 -1246459980 -549907375 -1671118584 -1698905822 -567579842 -192044520 -24326199 -828533663 -881306893 -930237292 -817216484 -1799524023 -1588053860 -1494460104 -422232616 -1177607424 -838684416 -1833804451 -66106213 -798076392 -87061182 -800922267 -673042073 -1021752162 -1309345322 -901896045 -1227247789 -1920643935 -1435917488 -43995830 -703540242 -355886912 -649373089 -501612769 -1732494108 -297703483 -2013024918 -1452421988 -409736867 -1614951387 -442146876 -869126312 -222158890 -1497885744 -14905627 -1410769937 -443384632 -197254934 -1696408417 -1543366947 -2060789763 -1077287925 -543527618 -1820725035 -1431177142 -1977379194 -1502676233 -1071759311 -2113392588 -409705136 -1081648470 -816763435 -627580421 -1451945330 -988480449 -457413151 -1898856244 -322414841 -724991306 -106666864 -1748621650 -770362355 -301192722 -527122675 -980754850 -1609773225 -1459607669 -920393202 -723836673 -28102856 -2025782099 -1113998355 -1207917939 -1313885682 -2049798920 -1037783266 -161170728 -819546629 -160081745 -1844362171 -1416047199 -1091497539 -993825299 -93993927 -1355450544 -550765632 -1063458454 -39842397 -1763752162 -1665807193 -477186812 -1374811386 -1678406429 -1779148858 -592555578 -1199928307 -176126772 -930191438 -46548306 -653331434 -457524127 -1616546229 -1476852606 -845757016 -443908419 -410608455 -1231345374 -2069278326 -2010645564 -117324956 -490547546 -442884789 -386328221 -1175345466 -1476661956 -1936469760 -1132586035 -78443237 -1988008648 -1910766910 -788999132 -2144374946 -1439153468 -744020515 -2103002771 -1881709871 -2053616175 -769878641 -761346112 -1236535558 -1253871287 -557692598 -1520859078 -1728157352 -424289389 -1386052883 -1635685572 -1029243357 -512324514 -1376165975 -822663635 -1007994059 -2005142077 -2109499415 -1549139582 -297218446 -303459000 -2109235022 -1400453725 -1004984955 -823255030 -210151589 -1554640655 -411955536 -249415624 -40313624 -1093729763 -2003592068 -1828301916 -2074280936 -190165954 -663522142 -2081545370 -2024423960 -1910076299 -2066801937 -1192164934 -693619228 -1117129080 -138921839 -544623784 -916634174 -1970362487 -1684482269 -816576682 -1783790044 -1287557388 -1931792944 -1986234462 -9310219 -1858028149 -1319389216 -58414390 -370626051 -1409462857 -2097611189 -1459704371 -398180069 -653375631 -1200343106 -705202624 -378253775 -759601305 -1976335367 -1138945020 -1727205429 -1605188704 -1716974514 -1452892059 -1867769223 -1828862762 -763001423 -1140060124 -1141405534 -131391287 -680171493 -586829870 -1604718066 -249412589 -2136788026 -627324201 -1440623084 -1821536510 -37251938 -1175580689 -1135087623 -1320443460 -597224122 -207252376 -72207998 -271561831 -736943742 -1275279545 -1736515755 -1317531555 -1048960668 -1188688853 -253184330 -1103929603 -1633611188 -524809821 -763323318 -107698448 -1906584762 -1366598047 -1075771264 -822809955 -1319710652 -1165821948 -328684808 -877627972 -1375637808 -535695454 -1182047154 -295298881 -253584750 -1391337602 -261644631 -1562287808 -88637187 -1519034538 -1127884630 -518824341 -1097092367 -536819027 -738585742 -955086134 -1839876460 -1186630067 -10906380 -767418665 -218718773 -1661897794 -1343910876 -2024577433 -194529716 -990826078 -1225694108 -1577731132 -1946546015 -832995707 -712952756 -1785703479 -1234404728 -1948233476 -1276865323 -471399190 -739012547 -1685946828 -1809099678 -1464813920 -375024232 -167763279 -2098885289 -1398666601 -1033562945 -97196032 -1486138104 -140815671 -162003503 -1931094172 -979391693 -174029996 -49415558 -1598595564 -427736531 -1340110008 -420414720 -689000410 -798066246 -2064021007 -1697714658 -2022522964 -24807585 -329253577 -1846993967 -551485984 -285512636 -1132405854 -1345108464 -677602479 -359084512 -704345114 -998468734 -826794680 -1718990670 -978687599 -1225224020 -119413057 -1225522701 -844377330 -877845934 -743957848 -1049758502 -1712983009 -939660581 -280644829 -923552191 -129873621 -942562795 -1813515293 -516127580 -869786827 -586016260 -815276678 -1409459286 -2037593392 -2057904282 -1973132639 -997786699 -101250670 -912962266 -386146847 -274476295 -328216309 -1593499867 -683702932 -1957666674 -906834231 -471477658 -2057824223 -627581026 -1462113565 -87314334 -760680637 -789315468 -1018583157 -1734969462 -1098788868 -1132623923 -715226853 -1351746112 -567402771 -1510979517 -1038616444 -1279491492 -1659748633 -1730183948 -125550009 -1290059909 -1041990451 -4368672 -409826306 -970669013 -1748318879 -2124141099 -671303165 -1860696464 -1068602834 -602091177 -403467175 -1466936646 -1691941762 -1634224007 -87040519 -453639226 -747524532 -865474374 -1121062687 -1826545278 -467753481 -1742607147 -616341843 -1543725820 -1649917333 -1851765667 -1292552945 -2140257210 -951841220 -989698037 -1594061844 -1538915783 -264520413 -503432001 -96071627 -1915616092 -684822420 -1445548667 -853947758 -666755805 -595144589 -1763763244 -1852062367 -1984222551 -554860394 -1164646684 -2050859230 -1678544260 -1948190828 -560080387 -850239508 -619223818 -588955764 -827396525 -1096781350 -1752007249 -1837549926 -739278775 -1865473530 -1899856157 -2095567103 -1464489321 -1361939780 -93689087 -526971958 -595137878 -1650971467 -241242982 -121672938 -552637022 -303655479 -1116490281 -140045281 -98960655 -1079385807 -1442892040 -1301174356 -1011423891 -1668270032 -1067932592 -74752118 -80913731 -559928366 -442706208 -1679884648 -853771827 -2004850782 -1508671644 -904900579 -184843199 -1398292031 -1180615896 -2009949439 -1302453963 -1042942270 -969205076 -766249837 -2049063047 -1554867637 -2079358363 -1774619310 -1773853634 -1790038984 -1086793265 -1385987120 -530406831 -342989920 -785476892 -928145735 -24156337 -121146676 -297686176 -1722146169 -326068117 -1996058922 -1920252267 -1295604353 -1885663938 -1937627187 -1258108801 -910630045 -1990697793 -2010070338 -1186919809 -585632880 -814259959 -1501332229 -2105404200 -1440337781 -1321416283 -1915074754 -176489242 -579773787 -1124731670 -1214116796 -271376578 -1918363865 -1769486644 -1408482052 -645607083 -1630859337 -1519090298 -2065042950 -1693641483 -136663796 -1248400729 -955821113 -1307766631 -138640172 -105613809 -1229795441 -1789358159 -381585725 -925110133 -544401051 -1468127937 -239133129 -1168595566 -1847725947 -2116455609 -350291555 -1097488458 -751469523 -596945054 -1959407441 -99134142 -1847698169 -1649590763 -658070971 -658027547 -2075684026 -149579467 -1426234879 -517143539 -765140564 -585380912 -874401077 -828304718 -1328395572 -1104384392 -687315323 -394096448 -739434188 -182532527 -1217533373 -1859211395 -1878851915 -1264589917 -317080660 -1267724413 -1458947404 -560737582 -1158297638 -569141811 -674253739 -2058869801 -1020741296 -1499589636 -734931060 -1807871523 -150565658 -821277840 -1339257611 -1126563870 -1943131138 -1421216437 -2071534725 -1279237911 -1692780060 -691112964 -1944022972 -1377884946 -1796121821 -241819668 -1224099952 -554555004 -326924248 -1352667110 -1014230628 -1596458557 -1018281881 -966391024 -715118107 -1671535737 -120061705 -1389931402 -249961348 -622362304 -1797882438 -1915222176 -506727149 -1790532888 -797903205 -1471274567 -1584936011 -632379489 -505502620 -537226808 -1149710068 -119257170 -753013539 -777418202 -777212666 -1617736408 -5354589 -1947747796 -1703976151 -2032737112 -2042784908 -1264884167 -967573116 -1255185528 -1171304615 -134072256 -642060889 -12035248 -412950318 -1936331169 -950770745 -178093888 -1779255345 -234798940 -1338325041 -485245409 -1524181404 -1731915612 -1312339446 -1832014232 -42666538 -1984449715 -77838448 -413254513 -606485593 -1245972889 -953303526 -1944354862 -513509235 -1960418999 -2068003919 -2066523585 -808870164 -1109360838 -574581012 -1896591772 -918139583 -1501967786 -2049792464 -929277274 -1862063134 -415905407 -62904464 -673372124 -126468378 -1692702163 -1529381732 -1086998781 -545127238 -788250964 -307333605 -657728200 -1339526291 -1347301336 -1025980184 -1502750725 -176262708 -1067384143 -1594388010 -578336804 -595678506 -2147371675 -265570243 -968055635 -774947773 -58901756 -2119335472 -1507508762 -687695628 -343431642 -1767047605 -1217742872 -1085293794 -1954181787 -318396891 -1914782360 -1704674225 -880364948 -131353206 -40144126 -392460524 -1161746931 -559350793 -1472855032 -230523855 -353931797 -2009989 -1569630418 -1089315578 -828828771 -1546219755 -615809938 -1193933073 -345960343 -1317252372 -651699281 -943216067 -2055639562 -417205598 -440378131 -1206600155 -640726464 -1206674390 -1888394109 -578970950 -516352093 -348209524 -464531793 -1282788106 -1231365309 -256842224 -305128298 -100355450 -899385255 -1978073199 -281916386 -819774220 -1837720035 -1450817091 -1353520399 -323073322 -1054663238 -395018728 -1207808619 -1624028089 -522938453 -1523496047 -950538748 -573887603 -979884944 -2021648612 -361959050 -1772065046 -1794011526 -1281313602 -71696698 -268077319 -154809027 -1272620272 -2139271031 -1556999943 -1409803306 -1377086591 -1263071218 -562110331 -607769964 -1357559816 -1641561784 -1006490679 -360154534 -1508335692 -1701006256 -1509835728 -1142307544 -259087828 -1539772727 -1782276339 -1616521217 -1056475922 -796027658 -13727196 -932232943 -2145868136 -765394034 -550483908 -623490480 -1431783647 -1433490494 -55696965 -1943504310 -1250667300 -395374264 -740851230 -376437304 -294944266 -736021386 -805627782 -301737739 -1097288806 -1690885653 -1064069220 -1715051971 -1352966563 -1752169905 -276342024 -1620752554 -1305596530 -172974664 -1639803457 -1519059848 -1553269800 -994315668 -1893174769 -1470628631 -1466107894 -648008780 -1193991523 -1328329493 -2141278286 -933196376 -1158417391 -434346835 -770339692 -2067779328 -439306295 -372121679 -776678889 -1236480957 -336192280 -354174703 -1937047484 -104975068 -1231893689 -547390296 -168761124 -1689797028 -2094901668 -1017941511 -1688243375 -1752459461 -847942422 -666805062 -1423006988 -2100554324 -1532850435 -1403431633 -1662560830 -1750138693 -497500292 -1333569873 -22031772 -920804720 -1197768758 -387808728 -288422851 -652265478 -1869354458 -554619996 -1419244792 -1146351915 -1660838168 -714645870 -177099419 -97600391 -1839748876 -1189809426 -1906785565 -446526774 -1467628000 -426626558 -2012146620 -1723253031 -1749228575 -233532595 -1529701096 -12098588 -1477505698 -1084856025 -1039049145 -2109446258 -655729883 -2113550824 -921693941 -1110520576 -738944755 -546566684 -1358699769 -1473399032 -783597267 -1549543065 -636106286 -864754036 -1899243803 -393668013 -2128661731 -1487637544 -1719583634 -207215312 -1596756997 -1739195667 -1261655952 -398054786 -695227897 -236741552 -1775550220 -239788828 -1451510424 -121466248 -1373765486 -1279834305 -978955783 -1437625214 -828459301 -1778988406 -43322461 -123645694 -1496492409 -219444399 -972592094 -1857286541 -1740085442 -1183718848 -474172528 -105864079 -1141116037 -1708266149 -1120289500 -1716493251 -1954239406 -1286799424 -2077593878 -36207326 -798655981 -1238278917 -489734942 -1817834890 -101150361 -1374552550 -1623117071 -243844456 -894973516 -844419824 -1592042592 -1961085771 -389539041 -1452506031 -1822247568 -1250585509 -1168196574 -1584318344 -988668455 -1469746346 -1669929428 -1040113753 -674960091 -1045625983 -977212880 -61941904 -1675495380 -97788549 -707153088 -947447518 -159192521 -1931559932 -217485425 -260370781 -1627527328 -1352589857 -1863323104 -117384727 -1495118743 -754560054 -999892043 -1126028926 -1542261918 -668436536 -925903095 -986811503 -324725140 -899480953 -1438985838 -74146752 -643945604 -1623669195 -933457936 -1259489017 -485600240 -1045375080 -1055253453 -1724827645 -296478662 -754811194 -925834729 -1985267788 -942289477 -1514826961 -1278098342 -1867396700 -2010319642 -1082004843 -363873505 -1736055526 -24913693 -2112610733 -153970033 -56549996 -1248010798 -844701737 -2035187089 -269875407 -310502985 -238406685 -1844153140 -50346829 -70598085 -1131041451 -2035907360 -1638051869 -2144891390 -1529093188 -532407067 -1748701667 -2115208074 -857807280 -1109232649 -567592136 -398669778 -293980206 -1712934142 -118352912 -587534862 -568616728 -439118346 -1508230130 -2074309369 -668039385 -693437179 -204915184 -1593211347 -129514586 -1350712491 -375203800 -1038279008 -2050655581 -403299164 -790659416 -2131480723 -1621795854 -1660470454 -976927613 -1709910376 -837525278 -1679524908 -1250072588 -1137467915 -523821811 -1337708424 -859181725 -587209647 -1545179164 -306466177 -1111251333 -135875772 -888983243 -1097632922 -1031992324 -1617056296 -1459614087 -1028260528 -1173786687 -1048067067 -1202322375 -1758522002 -1809337600 -1168601680 -1950483945 -445792160 -2005872384 -1498867282 -1479229264 -2135542376 -1166521121 -1342267184 -168849753 -1031900984 -81904916 -38905485 -1049457707 -952488738 -1135114828 -1777677895 -1639884201 -728640609 -1310960269 -127022863 -274513323 -950545905 -694175302 -1873130210 -1736658097 -1562389902 -1804531045 -1989210381 -633456971 -1434873418 -1823664163 -1436977557 -680706337 -986018390 -2027260478 -191310444 -571612749 -1401119412 -1455768129 -813753832 -1584790328 -331368955 -892930014 -859020062 -17623253 -1988753532 -1545130416 -1634642188 -672957645 -1750254413 -294922685 -373309519 -1413352946 -906343955 -821343514 -295556882 -294840263 -1135526612 -108596995 -1976078662 -1119471379 -851235486 -178756888 -37394463 -1423514717 -2044021039 -565701414 -833559829 -1604216622 -411577869 -344417296 -1153065207 -674503521 -1961988581 -530681182 -659039883 -1910146002 -1090816611 -286886638 -602937351 -1740211711 -1158438284 -785495486 -1240655093 -1771419328 -1678847335 -599521412 -163099760 -1028532748 -1454020933 -1513401718 -946359358 -1197840224 -1588937790 -1318286085 -845444496 -1633835720 -3551851 -1713901288 -1340790205 -1115067464 -1996563726 -1814558507 -869556102 -1003188479 -694653956 -1327933400 -1926594176 -509886566 -1203763232 -205201837 -2116021024 -1636156048 -346598901 -1312078443 -1740304105 -563820595 -1434889601 -2095651844 -741247661 -596802180 -1705607770 -1538070234 -1085763899 -1265301934 -1546532144 -1571164567 -1103954057 -2044609566 -1867140115 -1992862841 -1890810075 -381922219 -138113850 -1997138190 -732156720 -276695730 -1123038355 -671859002 -465230688 -144214489 -1451362807 -1935434623 -914907652 -869994644 -1931312932 -361123719 -617558811 -522470526 -101497899 -773172775 -291281428 -1451728883 -1645623014 -544106585 -814005169 -1514043993 -1003657048 -2127442198 -318299236 -273494775 -1011678845 -1658314616 -1250980346 -1361771092 -1553517165 -856811929 -1560237568 -2137475506 -1444382326 -578607394 -848517342 -1739550914 -789841340 -1266979273 -1820281306 -415874780 -1695640122 -1515534764 -289241481 -1526078006 -1395850721 -951708019 -898472477 -1669398882 -713161719 -1002777326 -226856426 -992478357 -1078259850 -1846285564 -1530258645 -792890043 -966923066 -1067213413 -872412547 -1766819360 -1676596451 -1423619670 -1660482463 -1178762876 -931013357 -975639057 -1527986154 -1253839452 -22641753 -435337152 -234728335 -151666806 -919453 -420861042 -1747883323 -1246202348 -514853645 -933597752 -1461892882 -673262447 -430610686 -253909212 -402119495 -291315356 -2021956779 -1246354525 -925008837 -989402826 -927417861 -675679901 -258570771 -1439530316 -635253910 -1571256133 -495420172 -732731385 -1345155797 -1473128210 -526859207 -847615468 -1614140125 -1839651971 -1708610738 -469345882 -588803343 -413140425 -836492224 -1496855506 -2027048384 -921613880 -1912418996 -638321123 -1582297496 -1384014471 -1735833440 -587281585 -606757483 -1520660825 -543602828 -937295858 -1338934661 -2141194161 -1666791148 -1982132968 -1942460912 -894146290 -1973617971 -564827035 -1170257505 -1862647309 -1644200044 -250569912 -113079217 -2146856171 -191429103 -418430915 -1706928127 -106990216 -740747773 -785119152 -1358060496 -1466555956 -1736135873 -1375305722 -1396776993 -1487175994 -404763725 -1783216026 -229971450 -1807079197 -1866328105 -1230312653 -1892205655 -215115162 -1225549833 -1300384854 -627165659 -923491337 -1254584090 -1800354384 -511545658 -1170835065 -832279994 -1568866247 -1130795463 -49070691 -97383189 -336718509 -608570918 -1934291812 -1035035998 -1232477686 -1772693287 -1615439778 -60599825 -594010097 -2023709023 -631548375 -1569355151 -757870403 -802352864 -1094765735 -87820649 -680382254 -1981606350 -1681526774 -535696098 -1192870862 -1820732889 -1563179320 -39893842 -480904630 -1583152749 -725866113 -1924646231 -2130513303 -394753443 -1044130918 -1619459189 -1042847445 -1522964948 -614292443 -1459198372 -483789464 -676433906 -46230924 -1761543101 -1045340965 -481882648 -840832099 -1422690633 -1078543133 -164972004 -283082951 -1098879352 -505904864 -855290775 -1764006054 -1638002743 -1319230708 -1689337728 -817897509 -360609316 -561922178 -1740449787 -864814322 -764986958 -151208517 -888390818 -1878164182 -443279621 -579818704 -1879651689 -1821489653 -1397209986 -174554757 -279139097 -1386518231 -866854820 -699898492 -1426020425 -1207782455 -1184289741 -1479236591 -111203618 -688434836 -2029882263 -1305977999 -141873206 -756125072 -1533345805 -1139180635 -1392219440 -50310368 -1605281705 -1132558674 -1766070557 -1976366312 -1659037635 -517858797 -2049063535 -1563069453 -340842820 -1206389191 -1390021810 -1769448604 -769143772 -1295304711 -1144548138 -1409529187 -1064935852 -1248150466 -1044618166 -1218701737 -21068673 -1913869003 -1386268655 -967198282 -1397801431 -1525036284 -1067498243 -1364583063 -1569673528 -1813865348 -2104534671 -1858549407 -1490237834 -325501077 -1055752230 -1517838096 -346636759 -1948357849 -1219718687 -2080561794 -525847657 -1026363794 -1507633054 -629187625 -546935547 -1115729269 -234618479 -452800661 -1686148106 -897011730 -740944170 -1938479884 -557001751 -647211784 -683781633 -1132910734 -1240692036 -244836682 -391446722 -1302645893 -2121226133 -1071593484 -1473821846 -1447381224 -1588962199 -1728528148 -213806820 -711082309 -413871808 -243944423 -427635238 -1785162204 -727130391 -1698530107 -695388778 -793184872 -1627146775 -1399086527 -1648808286 -391881914 -26983249 -388416426 -1912068549 -1190809335 -1532386952 -56123793 -527267918 -1274370304 -1487287797 -136353099 -321483544 -105068156 -648940058 -1813595340 -1861477509 -1310724267 -455504543 -2033136293 -161885387 -2093402207 -1586304248 -6018631 -223399808 -879158100 -1322695340 -1937349283 -882343567 -1173748034 -398426096 -493384126 -872644615 -1372218942 -1056873061 -1028291890 -1700887821 -1666782330 -1833928842 -9262103 -1049342537 -1164310195 -690455901 -1638183366 -59994175 -1152268782 -173890428 -1998663476 -597834758 -1880277040 -1594345675 -2014296106 -1342442234 -963431456 -365782612 -1610162170 -1554155343 -845251340 -534946475 -1478858983 -207196903 -1287356934 -710246213 -1393991865 -1922169932 -1313545303 -624016361 -1680331026 -1913595932 -1091731652 -633595196 -1610537346 -1417287434 -461290714 -497064528 -452135266 -1240272576 -1784907050 -733724407 -855007375 -1295869548 -2047829009 -141743794 -728581235 -313061451 -288871807 -1755418029 -1180470917 -1720771033 -836477482 -1249086712 -1747719159 -634581647 -1009950127 -521038601 -1804938188 -242128194 -2114529140 -184381777 -85623418 -258742836 -36459477 -741590544 -2064669467 -1858963643 -2009851345 -1801271752 -897364105 -220859854 -1139824162 -1470559494 -304122335 -373004485 -581613802 -1985092717 -147354827 -543932398 -33927907 -1143166494 -1810558596 -215044982 -46034573 -608955491 -1955359282 -781202533 -2103438020 -607005226 -1389510132 -1759611046 -785547285 -2111240886 -753271621 -820035082 -1927060375 -1902842218 -742686802 -1162124850 -468584485 -676905846 -1535675563 -1640717695 -1852272385 -1219027783 -1205956501 -560251921 -1585727799 -1055058523 -596122782 -1024383819 -442447934 -1634040824 -1303251132 -1556059771 -640718031 -1064940959 -1333983815 -536704025 -953230775 -721628805 -1575171026 -1868517413 -1518790210 -1316431228 -1883117602 -2091030975 -387713670 -838266692 -1255568124 -1159144646 -1919903385 -1874395520 -1527886797 -1731430000 -1740593150 -1126832616 -17494219 -1967562741 -1873791481 -2113221559 -1830188027 -1561893808 -2056613775 -1758417960 -60703706 -192454417 -471014137 -709877717 -1643130534 -1602668165 -156464834 -1184481110 -400608080 -658767215 -1622382220 -778105581 -1592573284 -143007980 -500918867 -807501429 -1727351810 -1917930524 -928775398 -2016967790 -1148278635 -1830966503 -1760838058 -2080585146 -918324721 -318614858 -1283186435 -1483629871 -934616580 -1405465902 -1492781561 -128247826 -1535113641 -786429229 -1901688165 -673870854 -2066172547 -1351425439 -1620302601 -185687400 -554392709 -1894199477 -1513026811 -1087748350 -258231539 -33025386 -1006881576 -487509472 -921582599 -1386679229 -1425264559 -1388844475 -1309332082 -679371365 -23980456 -1460082003 -302590152 -391408568 -661391615 -633516433 -286767605 -749833367 -1015358573 -1226477349 -1856760737 -1492832202 -979371113 -1975625583 -2094507214 -830804074 -385398924 -589036316 -33750342 -306315186 -721029243 -88267080 -1741097130 -1007289888 -907558315 -1903739211 -786062624 -35125224 -1939120490 -586248558 -424541870 -1334533756 -1189627824 -1002084398 -1465717412 -527628747 -896372366 -732571657 -808090948 -897979408 -1972322787 -271506017 -1946361491 -2026668133 -973186264 -1106083496 -1326868840 -1214403432 -793900536 -770409741 -1097609224 -633700038 -1225133193 -740367315 -833212487 -61406922 -1273987494 -1495851068 -177844447 -1881867752 -412154848 -1451768761 -168368913 -1540357692 -876364859 -1621334087 -342003426 -1385341410 -415377096 -1920999722 -973178656 -978215840 -1886305095 -1976134651 -2060478502 -140891592 -1438007750 -815290912 -1648690124 -553416827 -524936232 -740429348 -1875801118 -1529452266 -124980072 -301063338 -500049434 -1227326527 -1096509854 -1483941271 -1873349086 -1120339735 -413309249 -1526433545 -928943753 -551542981 -1243461215 -1689271548 -1853093896 -2141261278 -647342920 -740300738 -1861736495 -1368534675 -1412423355 -315093547 -82570927 -495134127 -220140364 -1932257614 -1206008564 -1435274762 -2126601830 -1226619789 -2103266170 -2013689570 -1885809917 -96128946 -731492878 -2004405118 -460847737 -1641884677 -2138386036 -1715274507 -798161821 -1522866385 -1105227749 -1976714540 -1069254690 -820416734 -1899034598 -1172526872 -1349192832 -604098751 -1932508688 -1130841988 -831016366 -1805906921 -1491238196 -2106199682 -1925101873 -1198553809 -697259003 -13801742 -37643918 -1321137608 -1526351323 -1694522246 -2054745655 -425696178 -1407635489 -1449808271 -1578151835 -427366748 -1567618068 -1627487480 -682864521 -751394879 -1489886993 -871367331 -1379743224 -815945462 -1912293739 -680610371 -1520601475 -1693591025 -1436099837 -961251826 -239963201 -87230141 -1493132533 -1732066936 -1708158267 -1454600373 -514631563 -1496032872 -1085940628 -2088102590 -562470856 -224662698 -629713860 -801432604 -660341444 -163161612 -2068079312 -1186170089 -869990722 -1865395878 -594758993 -1725502213 -896524803 -1147096669 -1293016764 -1345728555 -362053681 -1215044616 -832861789 -609676577 -1189749802 -904684997 -856523819 -1012940092 -1381256475 -479351255 -1245382888 -1774574954 -1028362342 -737490938 -1882068129 -1632407440 -1768253655 -12988752 -1406106517 -1522179631 -300371506 -1757330892 -1117704653 -1222642662 -1831685738 -964118821 -1180907932 -475747550 -807455069 -948179290 -1720666290 -1223545528 -1973769071 -956881088 -1942897280 -1785732325 -1719219450 -528825765 -1687301069 -947508048 -1176520231 -1893584488 -1914324923 -458981507 -340928125 -492626679 -1027134768 -1580491190 -1090200587 -670789505 -1817547432 -1712294696 -108602225 -2063979272 -996274513 -455744332 -1768302722 -837657821 -1759691462 -2137098997 -1558846504 -232699328 -409884509 -1948886834 -1520434994 -1043028505 -271073074 -1112339431 -1243669682 -898009123 -324259145 -1657437576 -1542954595 -1572840640 -1356425557 -1905423594 -1178200294 -65632271 -1422467786 -1628120898 -591302612 -1616165215 -1515601249 -1406654876 -1031109 -149979787 -1711962178 -962423140 -598884776 -200576743 -1691477458 -273117620 -1115285701 -1369505691 -552420091 -952663456 -1924116607 -1819057323 -1319228969 -1660110355 -1367194661 -365644527 -1436851222 -704877639 -1358681821 -1171746996 -1126718782 -251769828 -952714606 -636311010 -10583010 -1774990016 -1561858435 -1462099764 -2002844574 -2588493 -555128911 -1382644609 -187399276 -1408605230 -568376082 -689548318 -1416821414 -1218827162 -2129086648 -39282975 -951481196 -1381225610 -2108086847 -1430429323 -146203496 -520865104 -1036457756 -1505644275 -1563517324 -1425759776 -1122022006 -769950535 -1969668570 -759237485 -156579921 -971264672 -1022141457 -1409775446 -908843571 -2030200333 -209329548 -623499450 -1582542437 -1205770564 -1730176056 -2140392812 -1083420387 -532601396 -719821876 -1270886381 -915052405 -1155374668 -834908902 -655766416 -580077308 -1931041823 -99562050 -449613337 -1803884813 -1865407392 -788274791 -707793994 -981736425 -927235074 -1898546086 -1552040276 -1804542270 -30385309 -1732264024 -725648989 -422926810 -2107507747 -287430211 -1148834174 -430492241 -410687744 -416471950 -994858077 -272024597 -2072200963 -1739281742 -560834830 -645261127 -111344139 -902687636 -1646615844 -50731219 -88589874 -723844947 -167163974 -616300742 -852941313 -931303866 -1563256526 -1337495084 -1568543639 -3690101 -1889985391 -1553843760 -2050926800 -666709603 -1966111222 -1100431765 -827506391 -795815565 -744047439 -408030792 -858236273 -1876867059 -117369830 -1244744864 -1788723821 -457685194 -28632004 -181754300 -1022774066 -1304616674 -884404048 -1444513849 -641630808 -1373598469 -620263233 -878534493 -1579150726 -35858609 -1380220303 -244277627 -1732827572 -1607265637 -116765446 -1824281211 -1070285058 -957942534 -455267379 -194604592 -101783363 -1275998929 -942300761 -1704477149 -1863075910 -257762463 -739199642 -535485199 -1943258663 -1417045465 -689485025 -353055963 -314253480 -995950387 -1450609591 -13551546 -127567040 -830561574 -604668718 -774525822 -1557105887 -1042920467 -602762055 -941495486 -1055122106 -1664762263 -94917478 -1845186672 -241049977 -1172805197 -1732033813 -1151460006 -1613177725 -696980700 -1778814162 -1409770847 -831548178 -6652970 -147317146 -2058111478 -1160508517 -1220163165 -960968952 -1928150824 -902665738 -1278576158 -1308115624 -1709198229 -1753372531 -1161524383 -1113953851 -459939211 -1404673724 -1063547797 -1541430198 -1722104025 -1765237556 -861020387 -1424830823 -541494464 -2009244109 -185390888 -2013366466 -750368283 -1415757197 -512401219 -517863263 -2124123597 -377147051 -1486243860 -1918256763 -2116906977 -1493982590 -986589406 -886908155 -581367258 -2136395003 -464237581 -632934316 -1240545421 -2075645671 -1652430629 -1143058599 -2144650978 -1783455998 -2115697207 -488731023 -2124837433 -1637170468 -216086665 -373731578 -2064447618 -277831147 -878639051 -1188973385 -740346360 -481021802 -1404978906 -1897774377 -1466828995 -2030135052 -1259635428 -798846270 -141498846 -906707493 -488875739 -262111951 -826600460 -602218777 -400556728 -1943177798 -57947410 -1112027779 -300701812 -866332893 -517805991 -1161553093 -1596482821 -1426086929 -178031536 -731305281 -998945986 -258034456 -1015618699 -1303447737 -565432712 -612452609 -601879392 -1138963974 -2045765307 -1964326279 -1165665822 -1999642420 -2018561037 -8693553 -83657275 -1573515787 -1966202951 -494637421 -461937210 -625304565 -1856339184 -850241872 -658955566 -493030183 -1366375555 -1631315514 -596122549 -1020467788 -1197707974 -1513695687 -1592129047 -1266651309 -603157652 -1147843324 -957145467 -2091347839 -1418279624 -2104642515 -1523599868 -547974648 -1400030600 -335974021 -980862984 -1279697716 -830788107 -117041555 -22394233 -570235806 -1881158528 -1377128962 -1975200615 -1394520979 -77570695 -208097136 -1385187436 -2122503372 -1063312887 -1888265122 -558570088 -1236447979 -1929414681 -669473867 -1180456036 -1470666066 -2095277939 -899477267 -1377035236 -399947733 -297733421 -368709237 -1405824664 -1080043554 -1760227634 -411123566 -1298881363 -1127796186 -1179829680 -1680919009 -1058407978 -1055838145 -814327854 -494959847 -1585983698 -1060985722 -1430308613 -264914173 -678905380 -782105149 -93835956 -847915594 -215906866 -1646817079 -1285404217 -103186299 -1232824164 -1153498092 -1507550775 -1393808119 -981434557 -148706892 -1793252383 -1407299083 -90799923 -1360916491 -75140040 -158267844 -1422899122 -287650462 -555625437 -1137822503 -40931386 -739037462 -2104693233 -228533647 -1264244293 -950629033 -2091307598 -741949137 -1649091077 -849782957 -1535905749 -1214486503 -42591186 -718008651 -860784864 -1761363056 -166808297 -1080888344 -926227635 -2146387989 -912628817 -1224320445 -2112897208 -673788064 -674721017 -1322476559 -407780663 -949285464 -984779885 -539059766 -1891464116 -636971071 -366810002 -1697636724 -712686226 -1601101063 -1735468931 -903429763 -1234642451 -1648676643 -326841660 -2112094241 -63223577 -1741737021 -1024519690 -578548184 -2000858519 -982700460 -2097385790 -1966390672 -1502180621 -1331943015 -596716777 -270239549 -2135670285 -1168804037 -1056530750 -1717521854 -2062100851 -1637907471 -1865477851 -1972479204 -752922889 -1401347299 -990897644 -281020223 -790348208 -1195975161 -307595007 -756144320 -1856846941 -794179183 -1158662576 -260203836 -969166360 -115550025 -724053287 -1521250707 -1867815014 -450988452 -1293122501 -975366667 -1244894718 -12352705 -1453482823 -1059321536 -1377621922 -1670444747 -1111145598 -506271274 -571092704 -1250657685 -233774959 -1308145550 -64680864 -464555866 -1687383017 -177324437 -1731994270 -486860805 -756854565 -909032774 -915167860 -948343206 -180635208 -1541547645 -1548552107 -1160944356 -2102858297 -1601019000 -356236090 -75556794 -720201381 -1206775975 -1448249557 -1150649401 -874241372 -291626430 -807726556 -1216094005 -1290073536 -1271019440 -1003891371 -1770741565 -1025102829 -1789430769 -1601941995 -836627526 -1623392573 -579239276 -731139881 -366551833 -1653557635 -757295618 -1879359604 -1207384352 -935823561 -216359099 -657562522 -702459792 -1524116585 -642502679 -994748837 -583511564 -1668523946 -1040497896 -688800551 -1734003327 -2040827099 -572243009 -1256480997 -1469415628 -406519296 -1224326765 -71633801 -1358451087 -1588767952 -611302466 -598778814 -567157056 -1676214806 -1451763096 -73157258 -1193389122 -1941194121 -1078026423 -70561622 -518207810 -1472474085 -270398567 -513318517 -902505220 -728233779 -915819400 -1161357751 -460853474 -1738306436 -1348736064 -1517133563 -1390452510 -418288916 -1467834581 -1751149778 -310936711 -1085588626 -466972270 -1497695752 -1116677377 -1137084106 -515594889 -506783778 -594812844 -483092323 -1844487001 -1366581362 -795346469 -1449885555 -729580376 -2073238709 -2000809588 -160317143 -1505729063 -841065593 -1052056997 -1689082828 -828760503 -398839479 -998661266 -1915196357 -72787216 -1416544169 -854137741 -1712316439 -474036826 -2120087859 -1267975189 -1378772342 -1678200864 -471701550 -1525809773 -1182625984 -1433760103 -292048134 -1452854743 -1240599211 -832210554 -401788167 -1165136601 -1694959661 -816444972 -1717623721 -1626695873 -263227554 -249187258 -497133556 -1612288862 -790245788 -1622085868 -92284811 -547625343 -1971712406 -750250785 -1588451958 -1742842249 -272733863 -1107932743 -194908464 -913992773 -526008820 -1587546688 -1560354888 -1961789099 -1472954502 -1902316145 -490912479 -133862779 -1416348244 -1856193560 -550222951 -532553475 -2061897276 -363906093 -136278395 -1213417063 -1395865929 -1207308875 -1814765269 -49637742 -1037874758 -1698876772 -79336492 -1968559904 -1453240846 -1287381391 -1121295012 -1436264259 -1577208733 -1756520610 -384196961 -1862480645 -990561843 -1079663757 -1819430396 -1147015939 -2083671301 -1247724278 -324127391 -1590531745 -190600359 -1522116036 -1379013988 -1444577892 -1718001509 -1533727848 -1117726395 -1588060456 -1605319076 -1760653071 -1118992284 -1389020409 -2118771173 -613270057 -1455826046 -1787164851 -25880168 -1176286882 -119171492 -1460507040 -1003736070 -1308081305 -1132398796 -1226484658 -1979603100 -225158729 -376572289 -416153514 -2085355166 -1631155922 -61343452 -207247204 -2132765841 -1745937610 -756858662 -977891053 -722577280 -336321175 -373029321 -999032454 -1711302132 -606448253 -618399509 -1767179930 -1294245500 -522258037 -825162570 -57921664 -679314757 -1220053447 -1264422173 -1792774546 -1966227212 -902392048 -973635622 -68508814 -376402106 -1850855127 -1021492694 -1243433940 -1230860623 -364519210 -1851001226 -1329494940 -254109545 -1621632579 -1063791176 -1336933757 -724255338 -622154570 -453980747 -45017038 -687113922 -1304117135 -1078586663 -896580714 -2086792846 -24439918 -592325249 -1623756098 -246553010 -1320484007 -1278697551 -1200884128 -1208224790 -28679498 -979985958 -1571907263 -701543847 -1162214499 -1975315228 -1173338023 -2097305807 -622116391 -1959789941 -85360701 -138225511 -1726340970 -2108611820 -1663715946 -1836820482 -1364415349 -898387977 -249207382 -835357624 -1754986129 -363978558 -1354197650 -968212644 -1266314389 -1382994153 -1767217990 -1933919920 -1227098095 -1552220524 -539003112 -939280338 -332351669 -229535036 -914720040 -2011767054 -1786338210 -1164910410 -40851171 -1538347604 -1452554195 -484256269 -2079574600 -1113947275 -349416379 -1420790955 -1362909692 -1362614542 -696995786 -2032364564 -76337966 -964457303 -427323965 -848564187 -379391182 -548647931 -1978479746 -672300874 -1449322451 -2002909683 -1096875456 -1186163144 -753266107 -727361284 -1284181464 -1027213098 -749499853 -1852439716 -1883876253 -1956776450 -977224992 -265508288 -2074261597 -2012619028 -1073079699 -682833587 -231487141 -1511494070 -1096774127 -1630610288 -1628291049 -1303546822 -83270660 -1518128423 -931195354 -1886978989 -417369227 -1043007087 -2058584395 -518889948 -52265569 -106606560 -735092322 -223234663 -251049732 -1734963016 -990450946 -1363301525 -1505700832 -366587176 -100083789 -628546122 -502612861 -1361171176 -60663541 -1664884909 -8745153 -950898475 -177368351 -322573221 -1239400319 -9785533 -1256695959 -787314668 -1750875909 -2987722 -822519773 -737589072 -1383922620 -192093683 -850608740 -382455101 -504327036 -106539343 -1752859850 -1134829404 -1275524021 -1550456593 -957385853 -1836548047 -1080567598 -1977900554 -1675239165 -86550338 -805101747 -50602082 -65667962 -2022326423 -1016510292 -1256065759 -932961503 -1505874174 -1132462523 -150060700 -924383322 -1213790456 -1229031139 -1828636327 -1252275672 -1657478704 -86709244 -1328351242 -359330082 -536672810 -428600270 -824585852 -1102440473 -228123395 -811589870 -1722302993 -814325438 -454354135 -2025581860 -2043548776 -1218311761 -2056676629 -667321491 -1512694603 -1946779435 -461118353 -1895160495 -484987161 -1478774562 -935816803 -102777393 -802791963 -2032251687 -326697874 -1842966586 -1582770221 -739168958 -19779211 -1716717639 -1430561228 -215647184 -1577308999 -1294207625 -2033176559 -838636049 -1020900282 -2024183691 -19358863 -1094379744 -42920853 -1963754626 -147828439 -2061478341 -1912800136 -601690162 -106059011 -122370867 -1545311490 -382985612 -830690825 -629506628 -1613451674 -1006274249 -1017582818 -2102141065 -283919011 -118154243 -1543472273 -1683520198 -1826918561 -299069921 -1356428267 -1950970564 -34463105 -1548304692 -1297607745 -1196934930 -1406047061 -522902639 -921570149 -1177432079 -39144648 -774102954 -892414352 -782223416 -2081549425 -2092576345 -590943496 -2022953544 -819114704 -1490652858 -858358504 -1783719829 -107453883 -2091148101 -208766705 -1901215384 -1317775175 -848514714 -1695382118 -1474228830 -1845110371 -1106142717 -174712540 -783514331 -155637713 -167960345 -1116006257 -594988501 -1287875875 -842153012 -955307 -1023459220 -2082581717 -114955166 -1463676309 -582548978 -522726573 -109912534 -464022518 -1313337769 -1430959717 -470600866 -206482961 -25551975 -2102798072 -588817425 -649816599 -1513234398 -281695765 -1406764367 -1841246346 -587983952 -1674021417 -1094696172 -1066158955 -330006117 -1610031865 -1511602855 -777639975 -209584183 -608182601 -1850298934 -263491531 -390881403 -391264048 -379927622 -974660423 -112470045 -498436955 -2043679385 -1265973577 -2097417810 -357067165 -1158532437 -220441310 -547806095 -714643976 -145266961 -1960390535 -1589609471 -1869810417 -1775471968 -1072091111 -1247504247 -921033668 -750730500 -1061087375 -991306937 -717556733 -1855333626 -1129697742 -927026667 -543333284 -702037144 -863122590 -249334645 -826783218 -1526348836 -1652723237 -1765953961 -16737340 -2131599270 -1466731636 -393822339 -427451519 -844880618 -746672762 -1582161513 -1246031837 -1944042562 -1707134076 -1420891412 -903806844 -1129791877 -361669965 -1208380745 -502331536 -927909195 -343595851 -231940974 -549130713 -1502662232 -836444504 -694825466 -2063018323 -2025473846 -228157478 -1384422851 -9541512 -1450402306 -824679845 -534697177 -1583874791 -2123807772 -1511527217 -1653875756 -1808987971 -1734838018 -1037093207 -1448250997 -1174851481 -1764190649 -445523614 -1787387056 -1612995956 -1936956411 -721794804 -70148925 -24460272 -934414927 -163767578 -1515131639 -2103854194 -1159190703 -546499737 -233521540 -1343899711 -1836927278 -1011852074 -274807125 -1593508825 -834260038 -487727403 -289381622 -1733944146 -1046172032 -1564723835 -228753683 -667422051 -1055322876 -744136359 -1902509232 -1588642041 -642599936 -481863589 -520507486 -1468422971 -902802273 -1425836256 -259937719 -791505235 -1314775127 -1966315506 -238865659 -968194570 -962544671 -493972646 -26482020 -554195211 -722334238 -546481575 -2075756453 -1366860056 -1184389233 -1003914988 -20188837 -11367233 -2070524095 -1473448677 -1617980782 -1965064760 -692414107 -190013256 -244610503 -885023563 -1119284219 -2000604660 -1011059541 -1987090523 -1512225564 -506091903 -1851371601 -1111936624 -916143374 -163937828 -81556095 -618721879 -742801579 -943698242 -1569620199 -917564845 -432280808 -406362255 -732422325 -445751671 -1325373761 -1856414443 -2115119885 -1523098404 -709803788 -400605831 -620968272 -1990706731 -12807657 -509926499 -1874917163 -1705206110 -1229821555 -80772510 -333910666 -661793851 -951445944 -788745246 -24796591 -144477419 -1575460023 -283239051 -1574968405 -610549913 -835522425 -229829242 -1564472988 -307735448 -969052560 -350397072 -723429030 -1766781543 -1041006132 -640788415 -100401200 -1668305505 -1664127303 -160562993 -1342762719 -2054855557 -125335445 -1978850055 -453633296 -647859022 -824492464 -1680352004 -118689531 -1950123101 -823537993 -670943436 -109698455 -1160964059 -286522971 -933237023 -1841571520 -1758216076 -962606612 -1535015033 -1276608220 -445236363 -1254526793 -837363705 -1111451144 -1346615602 -238267081 -1645312359 -1765378941 -1089794435 -287043782 -1096572912 -396273430 -820748663 -1035314360 -1615940526 -2034220520 -1204619400 -1709915531 -924165363 -1845520837 -1562393838 -1870683397 -1415261299 -767778121 -1965128471 -1763204884 -1057640435 -1040644826 -1010769414 -1405893328 -86595755 -1568425266 -161678737 -767719304 -976591152 -349977643 -116536768 -128373712 -1503395996 -283914170 -36791556 -2027875003 -1929697531 -1128366523 -28065404 -1396326335 -355417929 -1357110396 -530610785 -1623361151 -51129722 -343778854 -1160188748 -140772876 -1590231585 -1588262180 -700727050 -319209202 -534907808 -828982714 -1986056109 -1306698642 -1516301872 -297123755 -859471010 -1154255348 -1349850485 -919854487 -259588256 -1360531535 -47635489 -1745746939 -1847218459 -29555734 -674498881 -1884004101 -1958034139 -640367545 -1616773698 -1004956795 -349969910 -2134051884 -1885625841 -1297330908 -839102765 -275061506 -1573922998 -220263640 -1856673699 -29984536 -1438923154 -1168100411 -2115590450 -841949771 -880051114 -1299196109 -2122764914 -1164081987 -1149931339 -1690675220 -1822289083 -1948328114 -719962542 -1487576196 -688507798 -1108670950 -1864535278 -1163040322 -822536860 -1024770281 -495263827 -252524617 -753551447 -1228103370 -1268008273 -1934815130 -1240507036 -1430508976 -1484931467 -1335704082 -1531944083 -1202759098 -508590875 -901921065 -1647758929 -2082691638 -1962397413 -959469665 -351954332 -1126494086 -770271450 -920836034 -1724063156 -332613921 -342237106 -1017833876 -2026705577 -1602507572 -1752345577 -1081377681 -560580006 -657401453 -142856756 -106780746 -1515152777 -311636913 -2116465405 -514932927 -118606679 -557629537 -460992851 -1933332028 -2083815486 -1523557926 -1990539101 -1490417541 -1198352979 -1616876487 -585047871 -1719431931 -1952510285 -142750188 -463176017 -2118580991 -1711848477 -1198934080 -646022759 -27191281 -1737326603 -2060552009 -1376323741 -1326753150 -1417485249 -1638483772 -813950523 -595608671 -973654830 -391337670 -1617292576 -1135804753 -488345488 -2087601629 -732753917 -1723851121 -1063908970 -1169213868 -1502109426 -135368650 -955718377 -1728566326 -855464466 -388263397 -1487593793 -984260577 -400984798 -547815700 -876075211 -1048187445 -1078031774 -160495879 -214777721 -1996629887 -779042787 -164325350 -152187408 -160742679 -67778027 -978966879 -1624115686 -1995181232 -53818319 -433872046 -1380495557 -575504311 -234608889 -291621531 -725389063 -349317822 -1911827103 -1427793707 -946561971 -308189621 -12403583 -161105722 -1874474434 -706710748 -2102973726 -1393550556 -947540510 -1722109065 -1849944836 -754617386 -1963470967 -1822822567 -177175467 -1375739127 -91080240 -1777237016 -672481789 -194993562 -196751212 -1820287351 -517473095 -2009020962 -729926553 -1448984607 -619732869 -554641333 -1777855751 -334142699 -266605188 -1182507074 -1582723380 -2099395918 -1390873616 -1053366517 -75865351 -1611151586 -1003400879 -2116977109 -525207467 -1004108699 -1128405967 -691000712 -57403608 -562282153 -1348098671 -1541887647 -820514780 -1399410073 -644194967 -1519745842 -197869076 -1280874776 -1286282704 -1983015426 -1741546989 -2125619160 -1890754275 -1591575266 -549188630 -328589604 -1425017991 -1539743393 -1289259801 -479477177 -1214270295 -703750624 -1744293539 -1042244776 -2131325300 -1157085140 -1665524395 -19168120 -36045790 -231204076 -1048987909 -1646528340 -727535138 -2058661995 -1823113148 -766003040 -48629515 -1272472745 -1807268389 -751110755 -1009582219 -780059786 -77158367 -1868035028 -2001280103 -1625811807 -437115821 -64047160 -551310973 -1639070053 -2077640702 -823178294 -1067933284 -86382562 -132774162 -299831501 -1271401445 -981798465 -1969941354 -1048950879 -1024165130 -1061909205 -1918901865 -74234409 -2117196803 -2070120878 -1139031499 -1033174335 -8278703 -1701207913 -604117633 -102374815 -479114458 -1560503003 -156190610 -870565636 -790557241 -414225498 -1893444959 -1716744667 -1884820824 -652312071 -504959362 -2144107837 -1244819799 -900672719 -2141644177 -640275472 -69302787 -835804435 -674604018 -1503558013 -859450242 -805207572 -1829202857 -36527147 -1878920234 -265343703 -1455565149 -1697236266 -424639561 -828942746 -1314313933 -657478889 -1444323608 -1739217615 -1630535988 -379530949 -750228253 -1209756634 -4577842 -1777862849 -453438785 -1673679939 -1797926367 -506053232 -1201428104 -1760894834 -887335731 -1325186149 -850703206 -1970145163 -179401448 -133096148 -1416482909 -1972024568 -1701790225 -1801100829 -172144891 -578710528 -434406833 -1778726078 -2076826706 -27249404 -566716217 -709484674 -1479707774 -1587925358 -1482210637 -703870859 -1617599537 -1999930986 -426038858 -724607308 -95263419 -1216966118 -915291198 -873801325 -1485691089 -1217769154 -1527015368 -2117708326 -2077353351 -288637331 -2109547191 -204627167 -1047476922 -2021173595 -968282919 -299942667 -992284760 -2119442365 -1156575766 -1694410165 -171000288 -668720730 -1407384359 -1524033655 -1396181816 -73970743 -1980729635 -1978963298 -209424750 -76075817 -853486354 -1501873365 -462858717 -1080687185 -1840315616 -2125074018 -1318487269 -2079260337 -127096328 -1509239578 -1860232729 -1864543277 -1297479515 -1189256967 -1211541740 -2089566973 -1552035820 -1729650278 -1893576554 -1780978185 -1273283409 -399712708 -642635540 -1080260017 -1103353981 -549066822 -428846195 -662880033 -2027037642 -741073086 -1957687449 -1255999656 -1969452029 -1414800192 -1607887360 -1976129319 -1970863578 -1516384118 -1679432277 -1840707018 -113432844 -1647814219 -864467021 -1370349992 -1857685116 -1996484526 -483444107 -1314469748 -1128777947 -500417631 -973162565 -707774403 -652470488 -1019990234 -1761392484 -661404693 -853318379 -826201187 -334088407 -1501603191 -217011593 -886610945 -2028609729 -1393335531 -1628582629 -1909164588 -1776060689 -229306723 -1372430743 -321645174 -674099919 -1621100708 -714569867 -1047200645 -1672753350 -1257130573 -1649421225 -2103613099 -1402074332 -325239393 -952596536 -799392167 -726455137 -1086954364 -1946094366 -1832065552 -905201778 -952127498 -1506205089 -251699987 -1926380566 -1214710590 -1661337748 -521152342 -1569099528 -756581936 -621924465 -881573306 -1112873289 -1626286500 -1972830131 -208502037 -1747907602 -1654259501 -1816139245 -1667215904 -531072472 -792999972 -667016122 -675325114 -738116603 -1660201549 -752408572 -1347156068 -731944555 -1005805869 -1735454746 -665022468 -1527720688 -1087119684 -429660312 -1460842570 -200537839 -1037617930 -1677335870 -966132921 -672148280 -1032158740 -119042714 -1443618841 -631616881 -573251846 -1032135280 -1872234141 -1708811943 -1703514670 -719076886 -1634741333 -191804013 -277092344 -1346478912 -88401898 -1859499609 -280413672 -1333463786 -386511210 -2103357942 -1408617927 -781774561 -980094381 -1246688977 -103692660 -1153298903 -307264899 -1650470105 -404786436 -17436156 -991697900 -846020933 -584594144 -536093183 -1424227516 -1139131950 -573970645 -228088191 -219916242 -312922807 -106165746 -1916266012 -870609625 -1529880364 -877572217 -438563523 -773254557 -1665791502 -213468175 -1461926735 -1242229818 -320534992 -1342623868 -1868670447 -1943349001 -787872584 -390351886 -81606417 -1464483733 -1268022264 -22478220 -1981805315 -730564235 -1429087746 -1220638974 -367956227 -1634887476 -500545767 -979260670 -119410082 -1175521876 -146617532 -1037117215 -1851753453 -1087272247 -846303006 -1030427761 -1091249719 -1123681853 -749711653 -1117195022 -1247209033 -254339264 -1187552518 -482154808 -1120057925 -2119379520 -100339851 -637212862 -135624045 -953174848 -1929147363 -471627535 -281839668 -1677858441 -1159049130 -314565973 -1953052944 -673285413 -816600248 -32380159 -899969622 -1062111133 -1017738467 -423166514 -1841245581 -575126597 -328820632 -1012938293 -1351020682 -1260002643 -528177834 -1534942987 -65731098 -935969528 -522142821 -1036210905 -1651786812 -1059844515 -1577395387 -598647094 -500822663 -1338084448 -736566152 -1371575356 -977541394 -1288309408 -1686091202 -2088109849 -684472869 -2013095951 -498789972 -1534385163 -1427801365 -1075269977 -987613934 -926281075 -897070422 -1727380614 -254555705 -530309111 -848093527 -1058943150 -1460539361 -1546955117 -90137190 -959781195 -1292871748 -1055928290 -181911222 -1512678473 -1675682525 -1095650917 -2080172641 -427804127 -328712333 -1340240647 -468580746 -614064473 -1922673876 -1193397523 -2082389728 -1183163337 -1875117386 -775386777 -994791043 -1292867806 -989675096 -1208492457 -232391473 -1678216465 -733907557 -1785725778 -1609184021 -146790629 -1798874847 -1414771063 -1118316257 -764452855 -1911957631 -1474094156 -1729128100 -1707265496 -1482183705 -251224735 -381271143 -2080381400 -1788932993 -1825755351 -76352274 -1204931859 -518963003 -1280100954 -1165558232 -191377290 -1695093471 -917905995 -1871021564 -656383127 -207720850 -1503399575 -344066423 -1698393637 -549221135 -874901139 -642912164 -1434512291 -49169968 -1765931728 -1790550956 -1101572081 -665444580 -32222484 -397409544 -588063838 -869181772 -1154275110 -1681990419 -1885726672 -844513878 -1025324523 -1220474533 -1899163634 -1193751277 -1585482265 -1223335879 -597681975 -1459936806 -9747820 -622853568 -1464621898 -1442677772 -1994939374 -283878207 -1579845062 -968145526 -138262163 -194867487 -225292334 -474587877 -644183781 -1331742740 -1525662146 -848942642 -297633426 -835576919 -1145709900 -1607910298 -214164638 -282478494 -1677188788 -641609394 -1013693371 -1156714746 -1882763378 -432555501 -728160212 -1826862478 -1503966587 -1283902519 -633951777 -1161143272 -1151072215 -1538025329 -331045564 -1900148418 -565146789 -101912042 -1291223235 -1266657710 -710739259 -1090681399 -161862201 -1703715105 -1940304284 -1154921493 -1808331265 -1434998511 -1778618567 -269889329 -544490039 -816265606 -850503006 -752867410 -468911746 -1882214179 -1939586143 -1970027588 -350802070 -1087779475 -781349414 -277099693 -1469993555 -1529803797 -1738194295 -1611465924 -1991512351 -667961115 -1525436936 -1358805466 -1102364864 -1104846579 -2012841291 -513686646 -647198382 -458534219 -1413293297 -2051306859 -611910275 -76806442 -248198847 -1064779055 -760346934 -1623220088 -1975251175 -96799252 -1259907585 -1078021675 -2138245633 -1503004933 -153769270 -977293549 -1417745787 -1722378644 -2085791795 -379644937 -518540922 -628636528 -2022066503 -943002146 -607752962 -1071807202 -770812978 -1432362542 -425560524 -1275182358 -103093846 -1826450240 -1017933462 -1552963832 -146878786 -1133045899 -1364926544 -900107754 -1236212010 -110967345 -1012361819 -252156752 -1013295333 -909341021 -1800907895 -1224470447 -339013528 -526249605 -1339452889 -113633922 -732364871 -1627605940 -526338094 -679203865 -1503775250 -215585207 -535661560 -612390696 -1708791248 -1355693805 -344285965 -1093268737 -697579027 -1097477816 -572609429 -972450996 -1633336102 -196406713 -325259952 -1298131649 -1412254870 -1778333446 -1920311623 -145716998 -934227806 -1313792225 -479067121 -764910044 -1005998566 -679145931 -530078512 -1267383428 -22979803 -1821976208 -984805283 -965923952 -1454973591 -344855548 -2076315630 -27529660 -982011515 -1255705410 -1319026801 -409756426 -1943679500 -2047601983 -621085106 -1806852122 -197362227 -1352198221 -1723547793 -260842568 -966916849 -962724294 -1365412760 -482005478 -757752262 -964240724 -1082248006 -155746752 -2000578818 -576733047 -1558622018 -754730420 -1715749758 -195770790 -374720326 -1502466078 -1834651520 -1417893014 -2049339186 -1900968516 -1463631993 -1985213613 -31770252 -1386680908 -1453483512 -1070901559 -582056606 -837364957 -1132493508 -670825595 -276628415 -2139158797 -1818166752 -1383787701 -71993697 -964772218 -1425133076 -1326493341 -1345842680 -132668909 -678327977 -1815111163 -1568110906 -1320681158 -297247114 -785282076 -1948840517 -741985175 -107298096 -1620319639 -472045066 -856832244 -1901671773 -398370510 -1706633871 -1603880565 -1205918811 -2074279738 -170031168 -1560590066 -1619458451 -1030443879 -1362144945 -1394413595 -420251454 -92472395 -1552865984 -649831097 -1756902284 -356540938 -904169836 -788147480 -715561664 -536463648 -1208181830 -1454134425 -1273378115 -1991436450 -1539776655 -1848294235 -930253790 -1094498370 -2036668035 -1537814712 -1086172939 -1697586273 -2012239916 -1143795256 -1640743295 -135047938 -2007962734 -124157733 -1512397294 -1244874366 -1817780288 -1330938194 -888559406 -416655404 -1930685808 -558468886 -1683029612 -24090600 -1163788564 -513338272 -1234527505 -1864262868 -879612746 -373996074 -67380949 -747727874 -2135559721 -1458038536 -317778635 -113688356 -1647237109 -1902397486 -1858010666 -1025552435 -756024223 -1985860309 -163371689 -1303876157 -1323436711 -1512669798 -1529881800 -901707069 -198611804 -879002390 -853161017 -328901700 -227964522 -288895006 -2145323622 -203681824 -191482650 -1318395344 -534276862 -962091527 -1467916026 -972512246 -515281205 -1677147731 -2099048042 -1986572625 -1397848466 -168069882 -809510969 -1141952238 -729910827 -1184677725 -1557632738 -1307770636 -205952207 -1842587732 -1657821984 -1561248910 -1955231324 -778096074 -1432789135 -1152858134 -1489194904 -2124329390 -1688426355 -532837027 -385104799 -2088128382 -995957000 -1561754282 -1859083940 -1884199377 -945070577 -1012134427 -725346702 -1784840142 -1756685298 -1004624530 -1208042996 -1268235034 -1451019963 -468222809 -1040668255 -1404540617 -973902095 -252153231 -954117886 -598917853 -756501882 -1423940534 -610792770 -622252730 -2103755867 -1654092461 -1156181612 -1512314828 -2006351951 -969015263 -1871030040 -798839259 -23664969 -452659288 -1457575742 -1129534465 -330313775 -338388930 -766049254 -825348213 -1030539918 -828788771 -873939755 -1664800452 -736760001 -334628205 -1984053589 -2010083354 -1405679721 -791470200 -725941882 -1050612167 -1028145135 -1381860183 -2035937023 -2136597910 -1727011883 -499744729 -401116886 -620335069 -2085882145 -1898157387 -1461627124 -501635035 -2106718770 -2059479301 -527189561 -2104907852 -1688151533 -208870967 -1506063171 -13967808 -681231533 -1223052974 -137864934 -2108574272 -1032646710 -1877903563 -358023382 -49802380 -1657461977 -1953062202 -828884619 -337373444 -878645228 -1292790224 -1833238069 -1284342174 -1580782421 -1689952710 -416481748 -1159533063 -2005576963 -828693829 -1425733208 -675493630 -1422881368 -2136742631 -2011854083 -1101550966 -310564775 -1276911215 -1242706034 -1881846363 -52669925 -460166911 -936660330 -1395033800 -106618654 -938356180 -1979897339 -875466308 -1551772959 -1606712745 -1561727837 -1414622825 -774363838 -982124446 -1006253080 -661795435 -978068232 -1552941086 -1912070411 -1222103969 -1367807075 -2068552037 -541324576 -1301420140 -847348285 -1418562738 -420488572 -1930230974 -1504008436 -1987258662 -43170443 -1863646462 -1257095339 -1057243387 -809910031 -1406536331 -156128941 -1981578400 -1211771124 -1649856567 -830471505 -1238362682 -1897573297 -234761082 -702045635 -1005830827 -7440205 -493473909 -234143849 -1065628839 -10281093 -995638291 -500179413 -1264399933 -1418986866 -1106356927 -1627456363 -159881102 -619638917 -1123073716 -1266171329 -1126068380 -57881649 -6782652 -179398873 -89818123 -2039673067 -503780008 -1650057982 -2068169763 -558896399 -278306015 -269810939 -1374472956 -285380713 -1062659640 -1646561028 -1276922354 -1429919207 -162618472 -1529459920 -253620850 -1998070302 -1365777575 -171000242 -667947608 -1298424787 -2044057942 -1185930135 -1132051138 -1825847593 -1626663568 -1867761066 -1691768063 -862348561 -125131124 -692310655 -598779139 -572619331 -1138873910 -532059659 -204782705 -1514120441 -141034937 -1699723518 -1425694632 -27146798 -989700822 -1640869339 -105985799 -1039380430 -1234902312 -1721193176 -1488983942 -726174703 -668667420 -511403189 -923842229 -709574993 -850215560 -216729782 -445180762 -320040786 -1626438214 -227720035 -474769291 -1545725232 -894296465 -202641902 -2040866419 -1233094249 -1397849393 -183649971 -671061858 -2100017009 -1092131818 -916734217 -1504301541 -471023456 -866502150 -1215024743 -498856278 -501306458 -879292425 -1432811968 -1536612365 -205679733 -1558084508 -310734438 -1980953609 -1448327022 -305120009 -2108525874 -219221524 -1521699263 -816761118 -588638602 -1939305732 -1552127205 -1118074326 -993285832 -1764590293 -719889381 -257959269 -1899434437 -1450170004 -1215347425 -1627205358 -236207361 -1387336671 -1737474018 -243188620 -609756099 -378792409 -1222488355 -1385731636 -531454537 -771915486 -634861675 -1421413429 -1087411975 -1047227855 -2130071820 -1564683250 -1694125235 -1824632719 -535629073 -66381687 -1133000616 -603855163 -2133492466 -1073422103 -2142650321 -370668504 -2122970428 -323188491 -842824974 -557202406 -1872136722 -71490810 -1102684997 -42870969 -1125354238 -940198937 -738859533 -1261724177 -1544712361 -1050842744 -608485480 -498335346 -335936922 -357340091 -1450632425 -397322584 -1274010765 -1886966765 -211920459 -1219267687 -943055735 -1508423285 -1025698160 -1057740651 -577491491 -1420888444 -853923668 -261875175 -1142073522 -620847368 -2106156850 -1205224449 -1141555839 -510083775 -223287601 -1140778698 -333576870 -1494135420 -1407719569 -715457184 -927951935 -1061927031 -71019800 -1776354515 -872673011 -1849470514 -1372622120 -1390634766 -1333981861 -503863147 -899891508 -1896732782 -1140611006 -1810144720 -1848965638 -1477105776 -805817912 -1349769002 -1697853353 -58602535 -1385295419 -1789890006 -730403666 -877888210 -1454490580 -816824259 -1649849389 -709830859 -855588128 -319166984 -1972833529 -265612223 -1673613495 -681202059 -727683456 -256475327 -581141360 -487210964 -199525937 -1210450192 -923788913 -1960976628 -702656287 -531640756 -1754214572 -281321941 -1566355340 -1879654454 -1867961008 -757225963 -708668019 -639089071 -1604297650 -1773415465 -868183542 -1556892676 -1754450484 -2098811278 -154763724 -511212751 -2018118057 -1153463281 -922482298 -1475534793 -172110395 -2146419903 -1449007415 -1003066925 -799179525 -1447548337 -102663096 -1029285931 -1227865732 -1568993701 -1125431194 -86114782 -2074646643 -2041636209 -1286052897 -268132824 -1087681562 -1283209270 -1867417716 -216051907 -1937037519 -2084976960 -1717098621 -1391274761 -1352959591 -1634991501 -101410295 -1448295994 -1931116060 -1347263309 -386860395 -1529659296 -1457049635 -877188704 -435311473 -1950625029 -669507301 -1742381274 -1115061626 -1898444460 -1991495741 -388796845 -1863319741 -60862786 -718628330 -538311582 -54153863 -1778392760 -769718374 -215222290 -878566482 -2116789849 -1672895941 -1506173863 -1874368252 -1069593521 -72698410 -2071465374 -113655654 -1097614595 -723970435 -128757143 -1505269872 -1713377044 -1119755885 -1337960534 -801427201 -569533223 -810264282 -917981947 -1000063181 -1854861645 -1787047663 -203785099 -1927225575 -384391324 -834172292 -1160464028 -472436542 -993918435 -1659330679 -1148082011 -673790582 -717041043 -1778066384 -1726767883 -693804023 -2075494998 -1267553165 -728265915 -1455929152 -1372583746 -745682948 -2126226791 -1365790257 -384146616 -1016332230 -410861372 -1187154099 -228377616 -789314923 -1009423342 -257297694 -1517761647 -1209242063 -2093601280 -637156865 -1341966113 -1551200397 -573597799 -404116410 -1641211056 -1554256124 -391593960 -1629791312 -748663299 -677378520 -889972893 -550811296 -1830933302 -1202828851 -1680929546 -1235503337 -1085202116 -413349641 -57818242 -1088584850 -1432385157 -805650829 -689088668 -133934805 -479405579 -10922709 -1041860168 -2109669585 -114219478 -1983869975 -1071566503 -1020352179 -1402151158 -1616453975 -2073823275 -1088192115 -1274138953 -1893938834 -1427367204 -220776991 -1894629368 -148270260 -897229300 -102675866 -1243911321 -664268502 -1740716008 -1044223375 -1025900341 -160829424 -1525701242 -1506029114 -1589055456 -1148414900 -1973688711 -1753754215 -1134036430 -832911885 -1451640049 -152589976 -484252114 -2009741515 -2102842589 -1337014644 -2083723147 -2119100000 -1844898152 -1834345278 -565851014 -1200403382 -1718261356 -1606009083 -472698838 -1107360013 -1306453589 -1692663395 -877807956 -105661602 -2033052392 -899244927 -1767064150 -1495814687 -1713872627 -859084778 -1105305065 -1128680905 -1016916384 -1638803062 -1885290259 -2099655175 -1453238721 -1251666516 -9328400 -16112569 -221007661 -1476532764 -1912623463 -1927314345 -1876348714 -2142963650 -1341821713 -1271753244 -452033317 -1674299380 -1471453019 -289211481 -1021868006 -1108851783 -608828215 -1963715197 -1632628883 -1195078862 -275883243 -352471228 -1224030570 -1535935377 -1712444299 -475496199 -877966106 -616205005 -1391373201 -859957024 -732758058 -1793448908 -415327464 -1086834698 -2082351551 -541522498 -332927900 -1324314865 -1239418547 -316143529 -549749225 -1160575181 -193101366 -606867745 -1226350612 -1874175625 -2127078826 -653556973 -2100674453 -1404374891 -336028860 -1902542057 -2140331816 -58260615 -2081096920 -929775751 -1650031485 -1622834684 -1940217088 -1836901968 -586466904 -1946799445 -797426423 -2047934081 -1907688898 -596458976 -232345436 -904472606 -1581835576 -62975972 -1875207080 -135390188 -1317707543 -1859307337 -1343865462 -1261304335 -930878808 -861757661 -931293059 -1381623277 -201741528 -1940666130 -794016274 -568134660 -926936058 -1167951468 -1759789096 -1630549988 -614828949 -1886320126 -81277021 -223292455 -1222359876 -1373868730 -867572566 -2025637279 -827492262 -558349462 -1823354091 -520564747 -283324951 -871206058 -816711560 -1903200943 -329326936 -932455033 -1583567472 -1253664633 -1379426114 -1928728633 -2023967013 -672619011 -353800069 -2083024787 -1119181715 -277819932 -690148546 -767435175 -496202343 -993777500 -1438119781 -550712282 -166805004 -1025542893 -595651829 -1699011336 -193469993 -359930793 -2042887999 -850050957 -1745214455 -1487694459 -528670392 -1223430705 -43938910 -1894369449 -74778921 -531391752 -1864171638 -1493793783 -2108277451 -338943457 -1496049955 -1373054609 -69542801 -574752439 -482798067 -1193893703 -1831752400 -2084507055 -261856227 -823614486 -1956561287 -1655947745 -125685095 -1412966664 -856553322 -1508797013 -864493715 -1818996050 -289413658 -124889551 -927160538 -645819534 -906556000 -90216535 -145848963 -1004679914 -2138881884 -1459057255 -259519692 -208176387 -569675346 -1051441896 -2088498556 -775020477 -1280837884 -666238860 -496784562 -41713998 -1007495464 -67706853 -1930229108 -1472646574 -1021937543 -130076495 -57298819 -948577077 -1963821458 -1271073863 -1918578732 -1085789019 -1687493774 -2038817336 -1153894620 -1729545930 -139799718 -266750608 -1479097367 -2066233144 -222395571 -1180816017 -1078415792 -172235464 -2100970939 -2092447799 -577954521 -613099066 -729463956 -116567769 -649407519 -1080277779 -1401879915 -1352640168 -561416434 -1830344967 -2052100741 -1069783167 -1112595085 -1245479166 -1245235653 -1447479956 -1100867276 -1704688827 -1125780762 -1666336864 -789432721 -841770681 -17569131 -1079125078 -1355787031 -1911135347 -538868850 -830222551 -1349160098 -53938413 -304808257 -1163877304 -2004791452 -511512334 -610758597 -47907119 -2016065055 -1008397019 -187756209 -965127220 -949200749 -1708458527 -58619252 -1666258038 -1612087786 -1705728750 -1423897447 -2034113208 -1548510263 -457672248 -1958532229 -421831587 -879963962 -1981916092 -444909627 -58042135 -556587207 -122421717 -252463793 -1878766126 -1970217841 -1400900594 -2073061297 -1166529751 -1487311594 -536309278 -761168887 -405398630 -1716646126 -228642237 -941832776 -281504195 -334531024 -350732522 -2066369886 -373134718 -622956186 -1041838977 -1753512448 -1365625755 -1914328796 -524075018 -1298391179 -1479208286 -1782965130 -308129672 -1152324387 -1108443663 -192006316 -1529715218 -249447042 -568355950 -351189794 -1161805802 -1548795690 -959876543 -747901937 -766069268 -1161723511 -165730853 -152156212 -1783915154 -1242797511 -1271816655 -1517781994 -1551214092 -803769664 -1284603218 -1673181635 -2012865627 -922701798 -869703999 -1341409711 -789686571 -813260337 -1880554451 -1961825058 -2077317415 -1832144626 -86714849 -1422554477 -937652888 -897086930 -2004830570 -1168968560 -1674185164 -1699308354 -890484225 -554833632 -714857750 -1590682932 -584116621 -1100298710 -738734653 -1310349664 -602002863 -1066657424 -117840012 -557159150 -1145133130 -504071496 -106645857 -1395557001 -310123273 -299038042 -820637914 -1321439564 -158874874 -887834097 -1111288923 -767650902 -1974442385 -1535851251 -298538617 -1016736527 -763430110 -1902551592 -153102914 -515266492 -1429866340 -1421566450 -1511752275 -1141458268 -1017691625 -1783376667 -782381090 -436609049 -136664744 -1264333765 -306901290 -1981744583 -1857325158 -241637714 -313482721 -926705756 -1592233048 -867112469 -735237941 -523169549 -1112559225 -642780146 -1363169412 -1432761288 -684833605 -1633534962 -1391163086 -1623521513 -598850209 -1767092821 -1977688184 -253420222 -773599153 -1014965533 -1063105010 -541960030 -1244077283 -1306108189 -182492889 -551337507 -2085026991 -410485991 -1320576573 -686970666 -1043897190 -1986159987 -905092541 -1263664886 -1949953819 -125899066 -714209967 -1440812286 -706487230 -493790347 -1257550021 -109149173 -519116073 -1705264797 -68690317 -1279439380 -783902249 -232924598 -2048513752 -912801160 -1973405599 -1290458125 -1292355822 -974694596 -686815656 -586127767 -541891180 -86915333 -497121771 -1414218367 -419089173 -2032852098 -1827870963 -1273704806 -1039681146 -1994068830 -685030728 -651613929 -1656188650 -2027091783 -1651020873 -1071609624 -1745086826 -1490117503 -450581607 -897729527 -2067540114 -713803891 -1058343895 -2126278811 -92606750 -1663486822 -133417061 -367616759 -224416094 -780007726 -1349669594 -27103097 -255218115 -926015746 -732653213 -31318993 -244821836 -141930000 -1710661830 -582310774 -814199239 -480811189 -12689862 -677629581 -814587826 -569341957 -1890623914 -1548081586 -1842832497 -1476620045 -1232071583 -1389771107 -1850850577 -945020844 -176271896 -1221806859 -669246599 -1655730054 -761919752 -140284803 -1977123262 -1496194403 -1653308498 -865017353 -2029845328 -685211454 -1541592164 -149299293 -1012317755 -1659056751 -839141409 -924551214 -1888067653 -1534675899 -2019234023 -582151020 -276697408 -1151240501 -71440837 -262788786 -1464748070 -1415766929 -675966943 -787918371 -1159893995 -1629310146 -1251640925 -1726704110 -1769454859 -874271557 -798945725 -1813039031 -1101526734 -2050781198 -367060436 -1611713668 -1860378465 -18960935 -848854789 -968571702 -858551254 -728301785 -2058796242 -1931918830 -1954516817 -1654278807 -2140615187 -525909718 -2069423021 -147567135 -1964709307 -1160766477 -1260729591 -2008574635 -1818443252 -1735955907 -498100807 -689007243 -912908477 -1629598771 -1807594006 -1928788380 -880651195 -647339241 -678467785 -2017380572 -1643454768 -609618062 -206288197 -1047120721 -329470682 -1200910408 -1649912750 -1774739186 -1641125919 -123358565 -965682600 -1693537821 -541900209 -238665736 -1903056003 -40804003 -745595028 -648555351 -1790275732 -770849607 -2047986145 -635244899 -1419808256 -2026556775 -1249076005 -1567766610 -1976549227 -438322746 -1021482812 -1077347166 -1539191105 -596889973 -1033661074 -1746450135 -780931749 -1847338626 -2049202503 -1751220982 -1507662339 -1121380620 -727594268 -904976258 -1456780152 -642955217 -10620415 -256172204 -1929004040 -210281521 -1590924132 -342997727 -916689141 -746709209 -47242595 -1584828422 -971614813 -464510303 -921605676 -1774534368 -346233440 -1612226357 -1887207900 -2117192757 -2002119756 -705474249 -648487856 -655887267 -463736418 -799822363 -1514308368 -1152040379 -630088501 -655572950 -1623461540 -1738367645 -229992080 -6323960 -1060097017 -1526229207 -1789602281 -189576885 -1500457694 -291996337 -582302564 -676213769 -641355659 -1044136520 -1713612003 -773744504 -1310396143 -1383175416 -518737937 -1792383986 -1844536233 -46539939 -512707265 -1366611091 -1295001772 -348019659 -1568438032 -376236899 -1221704725 -1100164108 -623962486 -774853901 -628678699 -583350853 -1114937816 -1965053437 -502108446 -1473402859 -847917656 -250562900 -2142712180 -1410332717 -1684962680 -300909771 -66532512 -1520432744 -1005212755 -356922336 -871875081 -1323562886 -1485809376 -1058335116 -1978730158 -586008064 -677526506 -1229689948 -16337308 -1850712387 -769945161 -1879347752 -1008187788 -966178086 -1431236435 -826432998 -2082652237 -1300184806 -1559926217 -1199566543 -538410165 -1711038344 -467930631 -424999903 -442759799 -433104938 -1372613283 -1242111307 -476204262 -2040962712 -704007053 -1759128448 -1264457287 -235451897 -1575155105 -1600933166 -1061107699 -1332892405 -1520728978 -1689050299 -282045600 -843990271 -814996262 -991474868 -1392489403 -292611215 -179138875 -14999031 -833127318 -777455186 -1398802754 -1174402769 -665139006 -1338891207 -1410862783 -2003847354 -1823926424 -1549830890 -1178613767 -572422041 -2117988174 -338307746 -1549073413 -1332599710 -896371407 -716453744 -497266679 -1702203476 -156675798 -435185764 -1985317513 -1778017552 -906048459 -149909536 -531253621 -1690087568 -535556507 -994248572 -765492297 -54506502 -1262745492 -1530084390 -11669905 -715081458 -1055575994 -703323291 -1004558749 -102461729 -1939878056 -433758438 -1618569548 -1123036687 -643824926 -1742917696 -1540771592 -1390331218 -527217919 -434037111 -2007259365 -1187536832 -218520206 -472065872 -1206518686 -1418960628 -665374861 -1007938898 -1078051150 -486148311 -1666869789 -1156368608 -360189306 -2092748696 -1340163106 -1312832806 -1533981164 -1080241113 -785634453 -1428789815 -508279951 -2118672338 -1099633859 -302002131 -1245957856 -700643895 -1069106764 -481708099 -54670703 -1874988052 -749153886 -332739641 -307729499 -869067717 -1384836372 -517138018 -672349117 -112658905 -1525123328 -382963104 -452398869 -1375680903 -1259993119 -368107966 -2037681202 -1386243305 -541140832 -360718379 -247460372 -1538131612 -2117343945 -248169178 -566132172 -1630858594 -1506602697 -491846702 -802963211 -615449529 -1578989951 -1628680478 -1406229084 -1434679553 -712858755 -205828672 -1913818634 -539716872 -50542776 -1216395667 -2065139476 -1168470318 -1890166458 -302069535 -231333237 -1072313189 -685001899 -167084926 -1435224653 -1284419867 -739085025 -756600927 -941106202 -954876859 -470075182 -2108730208 -1505979415 -753764363 -511615288 -193622828 -781144991 -1136329626 -719951411 -1300497479 -372570387 -1875663304 -1360696015 -664567202 -318515967 -1768609045 -1691061188 -1866802318 -610475956 -1740010773 -2076240612 -914185781 -1622410629 -1255575644 -1285533286 -124965335 -53378579 -1633096454 -463610071 -823791981 -644752458 -152078844 -483591178 -1638808398 -1974972411 -1854063645 -1259963545 -2018541395 -1826054106 -802560265 -285587048 -235564691 -1323400216 -899298333 -517175145 -1296342606 -1408580227 -148150661 -1034612554 -558105319 -2015009984 -455687898 -819816484 -400567436 -2123147154 -1145938726 -1158821586 -785201259 -590549198 -1838437999 -632736157 -57570755 -1224038135 -1663080332 -1891474219 -806772192 -208483786 -1441163045 -159242802 -629149052 -2046122783 -1529974470 -311728112 -1501763351 -761337066 -1084499436 -1488308763 -115859485 -1630180213 -842471465 -1058227584 -171439834 -1613719411 -1211162714 -14244285 -1033013178 -1594680298 -1195853926 -417482009 -791050514 -114730221 -1977992988 -1081293756 -1297536178 -2141592008 -1910954736 -1798307067 -462027191 -2137615232 -1645273561 -1113300955 -224134374 -340106980 -1724028193 -1892474427 -437398872 -526318023 -341870568 -1299880651 -742960426 -1465956124 -244694037 -141495854 -856420949 -1431487649 -753619402 -222739408 -517233535 -130219689 -316476730 -1854891138 -135252867 -1157237143 -2072755169 -316403749 -628299471 -652116798 -1517973345 -472283055 -561746073 -928136699 -2019771932 -1032852995 -1049968264 -943485649 -144053295 -889658896 -1715914658 -819761443 -1622976996 -37087578 -560665816 -2099610123 -696049757 -1164840690 -1016550778 -1936513961 -1875472242 -297000628 -937559168 -1469418537 -455410859 -458589305 -191640052 -1816367111 -1201992472 -508809575 -282644671 -175158333 -1833506341 -1498222384 -1377846813 -1155220490 -391122903 -155187254 -1187030520 -298869010 -127200737 -1116557994 -1278097672 -1856136010 -1730463748 -533181315 -1876585921 -1834734405 -663457562 -996149310 -498941158 -1927884618 -723508790 -959824216 -2015925695 -813657146 -2107272373 -626466687 -2060770815 -758828889 -1879241537 -1370515930 -351637788 -101306372 -1849145780 -209785076 -1837107605 -1895124316 -2024410355 -1681417064 -839283775 -1169812929 -833109418 -476609886 -268350692 -454421744 -1014402676 -193101999 -617506576 -1792040528 -367004921 -678673063 -1172520624 -1244182696 -930300833 -1885150071 -1890999106 -1411482589 -1683508561 -1631335502 -932060865 -1401236837 -1281846457 -437456095 -1488064984 -313633126 -1307078944 -1465586645 -477311425 -1321698430 -214668442 -159977734 -96249294 -606698067 -522056113 -1726393196 -838890555 -1003415330 -212371419 -208617819 -1546372029 -1027595409 -732549889 -442236172 -222440537 -1936559579 -494690321 -1351027510 -1374760839 -828863000 -2121506558 -1489729165 -366235782 -636655772 -1510030650 -123394304 -1566347973 -1755837285 -1784455568 -1735601021 -975982746 -861916236 -1448979437 -532840679 -446483963 -748103523 -2006641523 -1540884573 -1141719238 -1108847121 -530473981 -1471579970 -275393291 -707782552 -789430731 -808324751 -532539135 -1820884896 -1970477322 -1467030467 -1121307662 -1648872809 -1476319975 -483762387 -221350767 -800664365 -633450453 -1325325392 -1043476660 -1360763218 -1794048023 -1894718681 -1649353851 -971258281 -914727920 -2144206214 -750758391 -1529851412 -390975953 -1980365898 -160602833 -2012353599 -906981790 -804018124 -1165503144 -1412996921 -1365082721 -1377490946 -1616614762 -481203090 -156919028 -228185080 -1848329665 -1525725800 -1918775420 -96556941 -1482353902 -964242067 -1104819807 -1562884287 -1523725152 -506139189 -498623756 -888276498 -2104271589 -1731897527 -1008384851 -2130732280 -1927616235 -507763003 -2020261890 -677642513 -1031935950 -669578478 -791169466 -2113956485 -1297187427 -575101245 -2050213215 -1558388390 -1123111918 -1908232343 -1140204503 -1420499740 -763426481 -1841558989 -1547607559 -318311649 -482120066 -536149131 -217061905 -1732204729 -1876561571 -1425483955 -781265753 -1018492913 -218238554 -33308002 -1461841394 -1955387278 -1251731305 -1098237123 -449380296 -34648373 -367136674 -745562087 -94915964 -1819740874 -2070252391 -1201886843 -880986619 -1989843115 -530399074 -212618021 -58290339 -433184541 -563017257 -818089717 -1443565525 -1883018516 -425692573 -1347046254 -1033784304 -1670093098 -1643431796 -223527658 -880449403 -1550788391 -91463898 -1782926081 -1799316776 -252337178 -1898231468 -559222844 -1469899836 -2102152211 -471249833 -376253095 -1493910897 -1929128802 -159672808 -1413808953 -2128002663 -1148099903 -974501426 -1735174760 -254265060 -2087889537 -1276656379 -1254644676 -671139639 -1259798629 -1394281830 -353160746 -2075341361 -832859753 -575457525 -1595760234 -18985455 -1260962429 -1626915607 -1808813245 -945701783 -883395434 -1672607527 -953767059 -1145019405 -740179068 -1964312452 -933275433 -339644743 -397661875 -534023661 -1001509614 -395257312 -922722613 -1219541704 -1253492160 -628156050 -389123698 -914287171 -1178988712 -431671715 -906754439 -1277897161 -633631280 -69517487 -149300041 -1024889391 -349661950 -1253135458 -1075516477 -835572140 -1065389247 -278425643 -132915088 -520891136 -1473977580 -1917318915 -1386881170 -524319652 -1114987523 -652995339 -1251226403 -1202283797 -1110141556 -811206556 -1722395536 -222211992 -242887411 -1989787377 -1741094155 -957289063 -209798517 -2063010492 -1893858229 -72638969 -1072440487 -677015738 -1235146760 -1534663418 -1809465856 -1176716625 -899411152 -265840431 -1214138057 -628710205 -1112872195 -1607899642 -35069246 -998298244 -108852897 -1982056282 -653599310 -664748765 -1222561661 -470301931 -1624733357 -1638959494 -219475589 -1496802424 -1134899210 -301269816 -1822841533 -495937029 -829612396 -1831703248 -1258409391 -1667678881 -1869875970 -729737592 -420600727 -1667736412 -689315840 -1804530962 -1987815400 -810331421 -2046387120 -1677719135 -965216835 -307876407 -1190666826 -1284721836 -1519310714 -1474607368 -1764747596 -1216197255 -877912639 -1865068783 -1539724269 -967842733 -1491671153 -792973393 -220302869 -368511855 -235909037 -668372497 -1997083269 -1956583120 -2022894976 -1982245975 -1694285914 -230197378 -1309283799 -2015362631 -2087658733 -1692500845 -293313753 -1249276806 -647661723 -1803455465 -1091806497 -1891515111 -1494044036 -2019312328 -1898223155 -419506253 -452781070 -1356882169 -989766890 -603790568 -1047844301 -1753261507 -1443027662 -1433089663 -1908864936 -1034776819 -1171423527 -2132626240 -1547147250 -1171832874 -422586681 -685926938 -681829870 -541884698 -2125456006 -1296108644 -1771348187 -483180548 -1179800929 -1197700952 -1395676933 -178336750 -1566069685 -1373618163 -951260291 -1963442569 -1345537381 -1443959557 -2063063399 -635582531 -651938339 -666096579 -252951442 -1484748281 -404380627 -1786938881 -522969672 -2048193780 -1977482697 -1094767507 -117602653 -862833731 -1836932373 -1097483739 -672157290 -1183589810 -452914509 -1452107795 -1571546057 -1073205546 -650460469 -1597339253 -787754024 -545197613 -1971043589 -246861701 -66202703 -272300175 -261389468 -1568730561 -997804508 -400566533 -2107970433 -1621342872 -489652921 -439307943 -399819615 -291937842 -1746660746 -25703532 -355049277 -1603627173 -1242126761 -735939640 -1579206407 -971689176 -1714329244 -2090995756 -1943271584 -1634208712 -1977461101 -731803535 -783166376 -750008969 -1819217740 -1867873841 -1439693841 -1236134938 -963101888 -1269184177 -223397188 -835123760 -2119401175 -464295436 -1605303301 -1495522646 -1100506834 -2089191074 -1676752268 -1894952342 -1281526984 -1510524325 -1978139088 -1389312809 -590687032 -2007530390 -1447686713 -280864881 -326998861 -459204154 -1935472607 -1553304740 -1581552248 -1743533217 -1148414804 -1972075239 -405934075 -2125935653 -767601185 -1138848766 -109464451 -1523026125 -1642494282 -1646599036 -1915722810 -330948199 -263734863 -185595033 -1149464187 -281702497 -1519909091 -794111372 -18963099 -885225137 -212171143 -1137546381 -1842599873 -1861875771 -1561862760 -1534790039 -1790101356 -2135079469 -1976377760 -1851444171 -184136967 -266069042 -761435840 -597110407 -443528018 -459659789 -1003395464 -2025967204 -2077574443 -1857046928 -2007877045 -831466357 -778971070 -1106461378 -1235480673 -704288268 -43058012 -2121502292 -1418030503 -65149515 -1898722282 -218399154 -585028555 -1394787919 -269063981 -1705251732 -1996590509 -117216741 -819261688 -1813529299 -751526422 -1553246547 -603502497 -501202298 -1276158952 -1484323675 -1857962173 -210530584 -1481958679 -764180047 -1621840869 -269553912 -1349587461 -794177413 -1128914186 -642702857 -64173189 -521996729 -728326308 -323470656 -1290204835 -1330278086 -531542485 -102573875 -1677232231 -1371755895 -1864376720 -645639663 -30947750 -447791676 -1251999444 -1309882002 -1331942217 -583304791 -340773782 -46067525 -1162779755 -738154585 -151081376 -899015678 -61559854 -1696831971 -72104437 -678495751 -339921487 -753930989 -1164614823 -1515371403 -1838600448 -1215532853 -448726460 -1930528603 -63808098 -828363233 -164373530 -961948668 -1214368460 -206126132 -470777913 -1034628243 -821790342 -1362944137 -1941531657 -308543034 -1657248580 -513982470 -1324145056 -532922331 -1818809127 -1442766091 -1331833160 -897867439 -90459804 -2086987399 -1146808542 -745433569 -82397585 -1876742427 -170163453 -1636420414 -494830969 -1567414799 -358629044 -1639229026 -454532619 -730395154 -734827026 -59372085 -1434220387 -1585590381 -892957844 -1326758872 -1513654903 -906672359 -2045862248 -1446130019 -2034796234 -143226363 -2023798301 -2132043721 -346685005 -611744724 -1589358079 -1939632367 -599430709 -786138086 -1303415058 -16196759 -1635988991 -1833839196 -650065428 -1400336107 -1175662876 -368920885 -668025306 -456811426 -375598757 -1233870366 -1557145930 -1715923168 -962789013 -305661346 -469358598 -802521155 -1775748925 -1431940116 -1915781330 -1314493839 -1533675384 -235963947 -1591244867 -1438623578 -428093873 -903506061 -369499290 -1799343553 -702378217 -153085560 -223597814 -2059561295 -1905262719 -621857816 -1908887210 -1409135937 -898034043 -743089585 -1489247790 -865700745 -630712790 -410579938 -752060155 -1933762490 -728655732 -1565132530 -655239607 -315933033 -1306910247 -777779813 -412357802 -567849345 -426614147 -1803554943 -616249596 -2140814138 -1722195528 -1155644830 -1080554342 -1755106962 -247335142 -1580874649 -1092545059 -1419624763 -1090073571 -683515240 -950610877 -1786159706 -312277329 -2142518882 -309056878 -1703490100 -306128896 -1885020507 -1860900605 -204633327 -1151008042 -459469718 -2103839461 -911573172 -661964106 -1665438082 -715989176 -1279206891 -1171426920 -42168744 -60476898 -675459655 -851863543 -2144576299 -528326045 -1878441617 -811162372 -979795048 -510766540 -961100721 -1995308760 -49697768 -2046731740 -1027296534 -4325058 -1824289455 -1208841966 -1811621942 -906832028 -434451837 -387624659 -1489742462 -589718461 -761143122 -2119849922 -1563935324 -2008634835 -682741005 -822945114 -1443844318 -126241526 -27484246 -218738417 -1992054502 -1189958384 -115355377 -1747571645 -302797496 -1728755529 -1887915640 -1127277055 -1044729551 -943265785 -743766341 -2126067647 -838540696 -1565786058 -901666468 -1663714444 -1811576368 -140869810 -1071917676 -480065849 -370662364 -2019775448 -1091946407 -2095498834 -317092238 -1462315859 -1339785945 -1416338820 -1697804392 -1383198655 -909315810 -1377186618 -796741360 -1271498475 -465098028 -62081516 -1874470617 -642558429 -1931739087 -1081059863 -1661463821 -492577606 -202364857 -1679538398 -1476799018 -2092587147 -772492710 -1746330855 -923676436 -70575689 -754631879 -59571171 -485291495 -151265159 -1840372912 -940564243 -436106534 -280829727 -1883649230 -288684536 -755437979 -722791989 -1797451691 -1118108288 -1564085166 -232062035 -436319293 -1709186593 -1557806279 -2076990576 -633928847 -775758762 -804291997 -1473519361 -658483123 -1142615270 -1136071416 -675183235 -501039897 -694168992 -1767078040 -1729263917 -1842458168 -1627723483 -354399648 -1422730805 -1753713937 -457084084 -663194469 -869312553 -1204827730 -916350547 -1498410792 -249452775 -664710481 -579122473 -915515507 -348795394 -1721314295 -1377147328 -136394330 -1014452961 -1038241994 -1428561283 -962309921 -843496690 -1109314983 -1951379674 -467923934 -312443424 -639110253 -1960303524 -127215594 -1366259593 -1829825827 -1916849349 -2084819996 -1226488320 -2041150334 -1709886360 -433888366 -1654785797 -2071661529 -1262949092 -657022296 -212815998 -1238206131 -1413904287 -1582797554 -1198554689 -712049163 -1631401457 -2040566550 -488163260 -1172379280 -1016097735 -764671201 -1286731559 -936986823 -439950710 -465386349 -612925269 -2103425071 -389371383 -782161672 -1043818017 -655499376 -386903322 -103649738 -431908849 -597298283 -1453676303 -16172602 -1229982292 -634795622 -311260658 -87714914 -1050777756 -1663715811 -1834551537 -1884962380 -883960116 -425799666 -999474658 -553490172 -1757645647 -2112824644 -1601688563 -872163196 -1870944397 -1506921005 -1546681964 -1941705660 -1085527808 -1592287791 -1787178070 -248051901 -742541280 -863820243 -1237370381 -252355919 -65727808 -880674498 -1038992762 -1161817177 -1739975315 -1480298006 -770536347 -1077992619 -1649901441 -1584668823 -436718067 -1968930270 -1235531267 -1554621626 -92135133 -179470844 -1299434720 -1838132697 -1943976384 -594880430 -1619010225 -2087044085 -2099530144 -1499326351 -604867359 -1965601462 -1122830033 -1465558442 -3303604 -1836581253 -1638660840 -1642448752 -881376326 -2097197723 -953032250 -1679986424 -416837412 -694726970 -407596051 -2141478874 -9511598 -947637708 -1208232204 -153286596 -1454926219 -1696157991 -1629424459 -1025415869 -608243108 -719756436 -171036301 -1273991221 -1558490757 -696110440 -37256224 -1247615491 -643227929 -299123705 -112892308 -1152960255 -1058058904 -1631402368 -2055877727 -125077459 -1937846647 -651605727 -1518337636 -152470951 -631282586 -1397206722 -119696709 -1697894571 -751353461 -793774667 -802413105 -2107236222 -18876830 -1582785701 -999341318 -459928439 -1223628720 -1224493368 -724246775 -478236229 -1832493729 -1659121676 -1930335884 -1119747159 -1191302652 -1233631183 -1832164543 -421459868 -1074933670 -1777753126 -756807971 -125927416 -1190688417 -1647601773 -1588854393 -2064116353 -1152711233 -1167713444 -2054287022 -1307385935 -182733441 -299327677 -1393566065 -1208200273 -1764105926 -1169067800 -1194628197 -1291491176 -1474974803 -1497776700 -329686766 -537666902 -2103918985 -100649393 -1544717962 -1144978751 -56907290 -810600115 -119876237 -420254373 -141532028 -1464397367 -1963952549 -1326836653 -673436523 -1208822371 -1482288777 -2017169839 -249148884 -1999665385 -257050145 -1652172898 -1106340976 -1359367906 -1965359356 -1348721785 -1277146410 -900661105 -1946447679 -1327746202 -927841037 -1345547992 -1622298634 -1520759326 -51625488 -86183428 -1080896318 -1060246653 -1893677812 -1335337744 -1817352258 -579488925 -632023330 -961989248 -1896396520 -1931506513 -1467155939 -1082631919 -165721602 -2144158302 -2092985054 -1017664718 -1331150718 -165482980 -281121995 -353346565 -903434000 -1305853710 -200431630 -1400046914 -610163419 -782168708 -1162072069 -1728977865 -1329749498 -237498557 -1613631373 -1878991695 -1466388730 -1073052138 -219615860 -1706853474 -999780892 -1405397716 -346779459 -51749455 -22213150 -1821741119 -1328631754 -778927972 -382113292 -1201994114 -536406669 -250535777 -1686855919 -2055806586 -1076894319 -370642517 -1686206919 -1885481821 -1024270415 -683950553 -1824465527 -2020600423 -2072399350 -778604757 -1392289728 -1231640784 -591783255 -1104397528 -908092075 -137225296 -2095596641 -1960934487 -2141876147 -244027968 -1831776053 -334559379 -827295007 -1538051971 -778817658 -675549541 -215093898 -868165785 -1258450777 -215769736 -1489556816 -1764533433 -1911727008 -1892980689 -356209718 -1779806237 -903706196 -1585684588 -328811246 -855187791 -33153966 -1020441989 -764104181 -346761007 -1889110338 -1879213518 -899600597 -1302358899 -1592685269 -2025139875 -1057557822 -1799651782 -1587815726 -1787109260 -1239045878 -495146587 -429555584 -1848162721 -867381639 -964210837 -579937197 -1723679893 -333563621 -1271459477 -1957142289 -683430124 -1667549912 -1849777634 -91937019 -1144736140 -274311507 -1853591687 -1917700027 -1349779613 -1876192430 -1663782109 -801338376 -1224135095 -1145203405 -1685183421 -1863420111 -1747781376 -1680262766 -766350112 -1586901325 -1451157182 -626978895 -2079516083 -130452056 -2074385252 -1943404966 -1728476339 -1490536604 -1051961173 -78568860 -1951870762 -131705362 -1663862724 -8751034 -1049740442 -1409448589 -1857808913 -1929657058 -448136812 -610249255 -77330713 -469686956 -2026266767 -669878843 -1544436727 -713229400 -2140291893 -1534758401 -1258361490 -862606774 -169949721 -191710337 -850163459 -1488551922 -2055149151 -764802509 -1346141468 -859431531 -490731795 -1392074085 -1902296177 -155310303 -1107631416 -1572956516 -1156469842 -2061629144 -152378863 -1231043217 -1285892921 -1874383486 -1325631359 -1890896735 -1838416839 -277100037 -1475775163 -2064525338 -1584071187 -1129668050 -427993223 -1359365158 -1919173720 -348334100 -410796978 -104884141 -1851167247 -1972326240 -329540588 -228336903 -105051532 -369540490 -344308306 -1468753924 -22678403 -1051313702 -2081425645 -12205885 -1133362730 -247454220 -1434734948 -1643882520 -1356394985 -1391599990 -376632453 -1427329862 -1740653644 -2143555274 -547828046 -1083574433 -974168871 -440890169 -1222488233 -1383681182 -429212511 -377102104 -730819631 -1426561024 -1703695260 -1606769369 -365923758 -1834919345 -1624260495 -134018801 -1891126351 -1402605657 -665284080 -1629666278 -794700508 -1330637263 -125779383 -850181433 -1790640940 -466449522 -1301804704 -868264492 -769935679 -1719983778 -489984579 -1718516655 -1601852082 -1472943382 -1715422305 -1134719160 -1570136760 -1009470984 -1058016788 -923558756 -240211576 -2114185119 -844871771 -597981233 -47115071 -1589016201 -488656115 -865858677 -1137592267 -466322228 -1309858093 -930103654 -718646265 -839745127 -333821405 -1309067871 -533744382 -602634755 -949448033 -1569593421 -467506999 -1894951467 -1266820859 -1305300855 -1646015880 -704554506 -222752784 -742043967 -1095415240 -266632949 -1649086201 -767832025 -723609352 -502486103 -1378233117 -1205380877 -1623157588 -924813675 -2004282386 -545574660 -1865621577 -93114792 -1612214128 -1681675097 -881077112 -1363275319 -1065256590 -196343091 -1403448645 -1948481514 -1150672695 -1265743630 -380182228 -958856171 -778378909 -1891429686 -58306061 -697424195 -642700039 -16811063 -1223178084 -93105057 -1448597983 -564194242 -1272323789 -1451248544 -15016382 -1124745575 -1447818131 -342123560 -1256949901 -760350568 -1684296726 -1993122775 -1964553519 -689921208 -1241532703 -1489025069 -1417396192 -141702773 -39141288 -717631434 -963349686 -1138957869 -1943158572 -1882299675 -1229033768 -1872821930 -850363431 -554514032 -1785791491 -566138765 -1741667145 -1997597405 -2007732284 -545951877 -1763056755 -715519979 -1983347500 -880263766 -578270979 -1636841378 -1127521976 -866149504 -1730554362 -2056130813 -83726567 -590622784 -927714254 -1362189758 -102039 -1714969473 -2113906324 -454131500 -431239062 -77606409 -808342334 -828056616 -1453512552 -1558976839 -275756026 -361818756 -1561627435 -1874650058 -1510939669 -368891108 -167563267 -884767252 -1106432536 -750733179 -1106113328 -1828255264 -1290200772 -1261991245 -1738356943 -50123566 -613184138 -11785413 -508940767 -340104968 -1690212509 -487956247 -1988079083 -947084308 -497172992 -127606067 -1486488363 -1732651390 -793658410 -995965353 -1702143153 -1290310784 -963479282 -1169594194 -1451797567 -652511355 -1706841903 -805307095 -1354402271 -112310497 -2111881013 -774467875 -583190658 -570024098 -470465819 -84231679 -490105580 -1604696815 -2039730679 -1472064892 -1983026404 -1926054235 -25032767 -1966403804 -1722890145 -2092654514 -1904729879 -256350524 -631060986 -1967742816 -605344712 -1398538745 -1032170800 -321735134 -38573992 -1920505797 -1261715769 -1403399105 -1115862734 -330281087 -1936485361 -1394792042 -338359242 -267083038 -623797436 -148342198 -2106291266 -1316870514 -676262816 -1465688588 -43183779 -2087784614 -1660699165 -525906096 -2008548067 -1371914876 -241403093 -665174868 -1941623841 -1857879522 -968898874 -2062363764 -1761718968 -1853653987 -817292480 -929305148 -183057805 -1455946131 -1657949799 -1561951968 -886625248 -121516603 -72598324 -389319972 -2065580642 -2140696339 -1889831382 -1112898144 -2044024485 -623618336 -1433175792 -1208951392 -1503261077 -163814184 -150955034 -923069331 -604380189 -220186213 -555358110 -939824908 -895005071 -1374764709 -893906090 -84060218 -1903327847 -314718817 -226934758 -161520634 -257965830 -2009705164 -1491891332 -198554552 -2064251673 -1279550826 -509491524 -1006743279 -310635440 -317094223 -1495677754 -1559923343 -1151263225 -453363105 -401726179 -123304285 -53398640 -1970261681 -2137719474 -1249785208 -602439549 -1963588085 -1643741146 -1127805814 -1341647476 -490835632 -989778897 -805592217 -1851480431 -793558787 -1469085239 -1296122314 -2001099877 -744237072 -1447708976 -655039122 -1241348932 -547869519 -1780611144 -1546876263 -912321659 -356883233 -214670960 -202297760 -551839119 -1925685287 -266574672 -669624662 -1567383954 -1987700776 -1031329500 -1214391563 -594418253 -293652327 -497239083 -1238397504 -335343004 -1112778500 -33167777 -1252563466 -51981521 -1775062765 -637067231 -1982971122 -996929661 -729398533 -1164487055 -1515458274 -1151157698 -827254463 -856628963 -632611653 -112515674 -1265323558 -1909966712 -224973228 -1553824276 -1723459212 -919545348 -1506340024 -372068885 -2036853778 -364630019 -1565884442 -407722709 -2122736233 -682040420 -1933114901 -582045644 -653126623 -1310232944 -787773470 -872026535 -1721566617 -1322955888 -2021412225 -683970035 -4415854 -1202814180 -1434354049 -1684563968 -42208128 -722403786 -1715374811 -336487502 -1021003563 -1612543811 -780206337 -392757377 -1855988008 -1390477781 -843018613 -1664209432 -1540905096 -1486649299 -142535448 -1149008131 -1206703893 -236767383 -62208190 -1855996888 -1539723941 -962330037 -1181586302 -1139693905 -1428813742 -910421040 -625434405 -1891076417 -563364919 -218794010 -778922406 -288565530 -902787784 -1182319633 -579886140 -865564894 -494948680 -1398299929 -1313357582 -1763956808 -810325221 -1942183720 -530347640 -1495650430 -1100688875 -853786867 -110144415 -66279191 -1557833991 -395262513 -1010135820 -1494497205 -1045789123 -1571623213 -222482791 -499238910 -489751541 -2096814283 -951007111 -2003213603 -1909891602 -1110083105 -1976304246 -615894373 -465548471 -1190226076 -319487527 -917748789 -1376343969 -1666725146 -872837354 -316616021 -2048471328 -199780992 -1202192283 -1719549405 -1779412156 -722837770 -419409311 -970960523 -205276508 -1223532874 -1761093293 -2075352497 -1020022505 -156287534 -352083657 -1152575714 -1037529258 -187025566 -1570112201 -596707871 -120556407 -1114453328 -264714562 -1619010597 -2093296289 -1953624069 -1682248700 -1931688145 -224877669 -2095247810 -393099164 -1157951176 -1188605918 -1006779432 -918258911 -1360029835 -205498177 -654156463 -1438884648 -520930069 -2128324511 -114948298 -1348245833 -1867755734 -1602153139 -90357440 -366555651 -1717726761 -1211005506 -1667016723 -1478404699 -1161980303 -186666703 -1981152701 -499498972 -565646281 -2054423145 -1447721549 -866353533 -864702471 -1032590848 -939030929 -435501900 -856164324 -1413358568 -1000832909 -1906778259 -323734832 -1435243573 -1602408307 -83998722 -869764575 -212026896 -860670699 -1990075548 -141933211 -1764629107 -1372236279 -1348256020 -2038968643 -1549427722 -845020132 -944000913 -214160755 -217216913 -42456891 -608396233 -1145844664 -1725405199 -1413494152 -1132109550 -660094430 -306564608 -618097503 -986332382 -862073081 -1937589705 -628148827 -267726737 -705028294 -1743256759 -796952492 -525026705 -113525412 -1056120948 -1272430581 -1098618041 -409018181 -273414020 -1801913207 -940880055 -1448991524 -735986888 -225819896 -751387823 -1371296801 -590834803 -196150293 -310576306 -1470712732 -732109754 -1634821815 -1544464987 -1188195220 -546629087 -260023343 -83104156 -867179342 -1859172452 -1224336914 -242208044 -1309084443 -812269986 -268110723 -716230055 -1032692950 -507575596 -1017996088 -458035367 -1619022321 -142857910 -126176024 -1074075779 -244080971 -575113827 -114195242 -1576535523 -1179298375 -1341210462 -1735875922 -1301276559 -581666065 -715993311 -1348703836 -975477567 -961307371 -1173508016 -659410864 -1702772728 -1134159574 -755109446 -1643588799 -714793432 -509690306 -52705059 -1050664049 -1900125909 -186838026 -565611068 -1462598254 -1791031416 -586728713 -2052056014 -318056478 -488428363 -1332998107 -1149778845 -1275192209 -268659603 -1351321627 -2023017964 -1901821644 -769768760 -1062059792 -154850280 -1965959443 -696965759 -1527700775 -752441893 -1907182115 -668891683 -2133107783 -1050505863 -1388977454 -1396826488 -171554812 -1398671010 -1107665008 -2137537260 -334798157 -545469559 -99189070 -623389418 -1880718260 -419995627 -87755300 -1729545258 -128505414 -1569427863 -1979940987 -1609058244 -180340237 -878937342 -1907382928 -1896472127 -1054749715 -1848437667 -1193431767 -510444989 -1999244005 -1764851073 -807851547 -1169334095 -1375280968 -980736515 -1301616880 -2006473818 -869750285 -2119338513 -1558618849 -701469037 -2052366476 -1241024018 -1529490862 -773663044 -2088781570 -1236669481 -1357231501 -418538873 -1373894586 -1302134358 -2113791976 -679768311 -253000937 -169127099 -1398287912 -1111387863 -283051835 -575912740 -656624151 -2111127571 -996270063 -380953182 -1031378167 -2032337832 -1774536889 -388603887 -767758282 -1631694398 -521574996 -82710718 -697117817 -1935855934 -1553430688 -1550876637 -1574614420 -1103574959 -2115560421 -337252368 -991204543 -1144104422 -394445316 -160407723 -880623476 -181466008 -472417716 -677509853 -949802977 -1092686288 -1645776919 -983304273 -1508252646 -305252134 -34183455 -1143194436 -132696143 -1136049815 -312135228 -1901711022 -1058028453 -1119612411 -1074076663 -258938359 -1175130891 -17783578 -388368513 -1106794758 -396147392 -849911644 -1551264511 -1651161797 -1292635645 -1382712463 -1327821454 -45117754 -232364087 -1217939963 -102834937 -1769933971 -336772353 -1513527026 -904927267 -633388415 -282652726 -310538718 -838971216 -211601110 -146936338 -2100322363 -1929249202 -35751961 -1735271014 -1872006038 -22568469 -1351136611 -1060937699 -623186052 -610229545 -1893548390 -1307625837 -2067282708 -682548543 -1883203574 -1388478732 -1604740422 -625149881 -1404048843 -1298591065 -543724994 -843056173 -147996705 -594557709 -490005672 -2073026706 -585158814 -1436567285 -227715774 -403154664 -509531563 -1679678752 -1688245049 -1780594379 -1265106908 -416213809 -951249584 -1783490020 -540021314 -872332176 -416023963 -2055475156 -1949001250 -1295941059 -1102230739 -998091351 -926569540 -1450334383 -1830581631 -1734745295 -1626181393 -206296782 -1191408816 -870445884 -925369024 -600614794 -1359701858 -1135639679 -2008914064 -1080775514 -1177377472 -1268848446 -1023217212 -162636908 -1839313772 -319467439 -580129773 -665337431 -378852888 -91475261 -1973904022 -1077518898 -130523535 -1128249158 -202995496 -1541269836 -1174383538 -341923589 -43520951 -1312183477 -1358126896 -435057109 -1970496575 -1790615638 -41198808 -938631722 -168480792 -1273224398 -1555398478 -263784815 -1025138297 -238057798 -275376625 -427677090 -341085121 -983774804 -826532575 -1608759229 -1597246073 -1369161411 -1208557072 -1318375778 -205431100 -1674276971 -1094824956 -1083147996 -249493153 -1343343527 -1079077378 -554093131 -1154159325 -1883475571 -1664965017 -1355120309 -1442956928 -244263325 -1492453858 -1062994446 -831194529 -505325168 -1849758338 -1915112794 -815827522 -2077559806 -1611042869 -1323677907 -1271483676 -216371235 -861532274 -1438181044 -1580359523 -1024756965 -271461815 -1203458477 -1525635493 -400985671 -562488211 -516348183 -282494154 -1940386408 -387695914 -539841600 -2146846272 -25056610 -219649458 -124051413 -1872960701 -1035203981 -1908284320 -2013781942 -1290822474 -973518524 -247926375 -780309445 -2125693533 -993257639 -1290750542 -1912041047 -728583221 -346440153 -791484454 -965508860 -920973288 -1883407487 -520677229 -26326278 -84123064 -812096922 -1654391369 -1884961074 -862010174 -880311756 -1384838909 -559777377 -52517732 -49742807 -656218566 -1736911417 -1524971848 -2132006038 -1860830471 -1173374836 -568538251 -1267639054 -24318691 -702346707 -1770980637 -748218639 -1793912488 -1764265583 -1704939352 -1041387143 -601989351 -839561240 -1538199890 -1117408644 -542586693 -1038984089 -1016050066 -2110981965 -696553668 -1044138279 -1743175516 -1578985038 -1546107687 -879766709 -814168568 -2112807339 -1310843428 -310759823 -260115657 -1634625554 -393390007 -1751182183 -855567546 -2120728957 -1305491040 -547487881 -1808872219 -1936877801 -1548080181 -1819218662 -1883369895 -2036352132 -523400285 -695571883 -1723146960 -2113976925 -1640722507 -1933147669 -1132777420 -1147567285 -612725288 -889828051 -263935449 -1409360288 -373734006 -2105255014 -1080452326 -40524050 -335392251 -1940472829 -1840173661 -1886719980 -359172258 -31608489 -815413814 -1566820391 -1105832023 -1395329423 -780187121 -69794065 -502779193 -2009229453 -2086551143 -257104891 -424805273 -1466580683 -4238915 -376484054 -1080671516 -1576966733 -1984193904 -73390265 -814570477 -277757314 -1785211467 -1555093632 -1582689034 -1522142696 -1827088608 -1009566203 -510878874 -701614612 -204078207 -411040790 -2055148778 -758533498 -1209572294 -1201342756 -326450998 -1988688948 -459667128 -1126742037 -642616613 -762153928 -1928597188 -1962254545 -705770836 -1338258271 -1510525666 -2000677275 -84016199 -1163500514 -2114532863 -246954238 -1621472062 -513465604 -1227112782 -1799064933 -314579171 -27388083 -750010523 -1845335818 -600263152 -1892105705 -682739159 -791919392 -1833060885 -453894333 -740140587 -1317562285 -1565439778 -1524189449 -1867127927 -1788019125 -1498761404 -1847221365 -78396876 -1208819321 -1431027427 -1608602836 -1116232569 -103646991 -385740020 -2026869494 -62493297 -205339296 -131327143 -1749586932 -1961471400 -428354703 -992308577 -372251037 -803315148 -88003747 -1610226693 -491109757 -1302030478 -367880816 -367454799 -1797321668 -1080295374 -1697599080 -80003518 -294364004 -1720976187 -2137017113 -182622116 -575772049 -439514161 -1718241894 -1278911249 -497539120 -1986152069 -772014715 -155119831 -53852159 -1002620926 -1893208920 -2044604488 -1781794169 -2102624615 -1968492920 -327440758 -1443716092 -118630791 -962879921 -1833552102 -119843864 -2023645009 -1703148724 -1011073405 -72619124 -738905572 -2035501650 -1261734840 -1723925402 -164866090 -650470000 -1757526770 -114858905 -1993301329 -670543303 -1974597712 -1998948493 -1093148183 -818911596 -224500349 -48597864 -740514388 -1157584751 -1472551884 -1577966360 -1605055717 -1629345652 -1848390267 -396779967 -744181434 -512601110 -1729947653 -449107238 -1887813508 -1558228178 -577912481 -2054016433 -1054563906 -873029451 -1397706653 -2079586085 -1306975670 -1877344174 -1693790694 -496969426 -1001239599 -152082501 -545054377 -1711159784 -361489064 -315461285 -1968176199 -1446761852 -1916595230 -2108809257 -687072311 -604761058 -179000555 -1985222085 -174159156 -72724031 -354593874 -392119893 -1879212655 -885096156 -191871123 -1405010114 -274803586 -1534028852 -1881733329 -300391134 -2087218688 -739115471 -1268306849 -510531021 -1297700182 -603039942 -1316975001 -284892178 -1441786483 -2047430680 -2036962879 -50806879 -1360207494 -1043929343 -379071811 -1623430475 -1216258190 -1902047184 -265452246 -1132363703 -636676607 -1860204495 -1390014439 -1645564207 -1703220983 -78046771 -1767055527 -1350887926 -1176256198 -1750949151 -1233966016 -1017251833 -834243464 -209168185 -58955156 -869345625 -1760668834 -1383921025 -165286518 -1274152455 -2120866948 -1477222130 -613895943 -1237673813 -1057170249 -1728163312 -524459109 -1311357675 -363774564 -73154139 -1140968089 -1369187760 -1651404715 -1080391177 -1160276454 -1614847618 -845584940 -1846794381 -1492011376 -68650413 -608772852 -1033229256 -931335950 -2102492314 -1892393660 -1227431550 -714147768 -395433693 -1739674433 -718341526 -12964048 -990906389 -427997438 -1430206663 -698924170 -82976100 -862425797 -1423236576 -1664272546 -454178447 -1220277291 -731600987 -1673909434 -1360081538 -1074470498 -435672263 -1571971618 -1783158332 -1407792039 -1933460474 -2095123761 -455691268 -876456074 -1006900945 -813044255 -396347924 -2072769321 -554256413 -1750956252 -1353312523 -1124268684 -2022645682 -2087329011 -445830485 -502517012 -1897720680 -564343516 -1633688260 -1820158925 -506500960 -136458012 -2084756335 -156537893 -264900076 -441977101 -163201534 -591564719 -1726430270 -1461993273 -213050337 -881774410 -197860923 -1143847305 -368047191 -1016235777 -937259448 -726991791 -1516563554 -400245835 -1012966441 -1824104118 -241366654 -52744595 -1715145601 -779122326 -1501137323 -977102705 -357714326 -1297949129 -492124877 -1183283142 -1741196374 -527800149 -1629642133 -388895493 -1373813030 -2078906313 -619465901 -362677451 -961328771 -1533177816 -463273159 -1603762938 -1376445469 -1225151999 -1056439757 -188202503 -2023539537 -2077964467 -1969729355 -1780850980 -1282832621 -1979528914 -1125798274 -1960661048 -1841154168 -1186231953 -1909738970 -692280728 -95796050 -1578960747 -1137848850 -483745415 -2083586010 -1961722088 -346700625 -874270064 -773852874 -984287086 -846521561 -408714352 -1609410958 -1813437141 -1350110563 -996018139 -441833808 -2049843377 -1784972065 -1826431512 -703171966 -608723121 -197400339 -1992746605 -2084715270 -1613842085 -1125460985 -586812119 -1306377009 -405583335 -526015767 -1704304917 -1115856333 -222699480 -1993647286 -42591661 -725991976 -1892542025 -1573518458 -2011094448 -1219267403 -938282547 -742347508 -1902061533 -506615889 -2068069715 -1024873310 -79388583 -696569694 -1313487261 -1795988114 -142089766 -100881698 -1154100803 -899896317 -1977557645 -206934896 -1178772579 -1094091678 -1643846532 -751544669 -1859923876 -968618200 -1640043140 -1252444735 -203953251 -458388945 -1119156826 -2006994156 -1025136463 -207233760 -1906812533 -899777950 -2135647123 -779520303 -1747485821 -1007837175 -1515876336 -1735074791 -721569724 -582196659 -1043752081 -1694796671 -224555689 -978697244 -1387327535 -1583925266 -824657450 -158304412 -2037497498 -446213824 -502844644 -961780763 -539872772 -523270429 -660565738 -1785387223 -214057430 -628117285 -1885083990 -780375739 -1092413144 -1350013005 -1503844480 -1379133817 -1311060248 -1807369916 -309991397 -230081757 -1513525299 -875901578 -277421261 -432135990 -119889776 -647804346 -2053036579 -1766026904 -1242690341 -1618094112 -1722318423 -1073657448 -1803126442 -2004367877 -1982421897 -356039674 -1069360376 -449197689 -1260539818 -966543471 -1129811189 -686246749 -1761926053 -1039164288 -1897171012 -2063491675 -1391166322 -1677908965 -2008205998 -2065212134 -242149677 -328110274 -1958853269 -1522583573 -646973759 -978262752 -527271432 -1333430102 -1967867869 -559626836 -1817342439 -414460992 -1556425323 -342099554 -853481059 -1412880300 -1552517221 -1230622297 -653941422 -2119657855 -483348902 -1861842960 -1010408283 -1778815552 -1433132577 -482636887 -632425090 -1271918627 -1084141751 -1919147909 -2062012270 -149126604 -257417379 -1381823795 -1424363907 -1283971840 -1799029824 -1871985855 -1830836435 -1722268829 -240131090 -761456917 -951351546 -1349681707 -230686288 -936459581 -168529004 -2083523482 -910813992 -787327728 -1970375329 -1900317763 -1263844557 -674717022 -1255332594 -1495559230 -1715374122 -324907479 -1816568879 -298139954 -758858427 -228203056 -2968650 -501976669 -1406110467 -1588567281 -1533592263 -986432947 -404785389 -2147322874 -1592855483 -590959279 -140734778 -949918499 -886780895 -589992085 -1064974396 -1895959474 -1028525332 -1329380221 -473510959 -1871775778 -447555943 -1585002207 -1744935661 -1096970995 -644403470 -729088469 -248208701 -1230395233 -1132644068 -1053803868 -983972667 -2004532369 -452071647 -171028043 -1135199015 -1045125157 -1149764886 -1040583296 -2124118351 -288977529 -1384804036 -2121150513 -1948131791 -1715329175 -1716966897 -1324873140 -2032411884 -871645206 -1755021055 -950979840 -1544869906 -1551217912 -867972404 -155779957 -411171606 -2106289643 -1289592753 -1780434147 -719571331 -1354943860 -624862232 -864499394 -1914443003 -296068420 -302324841 -227293885 -1902400829 -1914196467 -447505162 -731525940 -412594505 -251149372 -1262128849 -1903583724 -320276262 -1289116052 -210971381 -300499270 -1757176793 -675246407 -1562771701 -1778975897 -1980567345 -1398838915 -1782160696 -1820392963 -145010332 -1942194226 -706921982 -1358216270 -1937165927 -2095646569 -652590736 -893514723 -2096289637 -723216377 -340206219 -1244454419 -1202182000 -1546723024 -484317433 -960074301 -1924136996 -14251599 -1155939576 -1739383070 -116370879 -1635244583 -59992175 -1118654782 -11591589 -1546308093 -2100506704 -732501095 -1769639061 -1822670924 -1923478860 -1837861729 -1684784502 -1601239419 -1913334576 -994088654 -225234118 -1643635212 -1494856723 -645757208 -2006526565 -1756269114 -452270983 -1373784548 -1600209339 -1780649192 -38865352 -374942376 -939493134 -1761330394 -1765341710 -464053018 -1825951269 -1221662453 -389698604 -1986797725 -886136872 -503315759 -289875980 -1452684464 -526203705 -568011589 -1005965408 -121859425 -1539440384 -491554832 -192471415 -756699523 -450725527 -1169109320 -1892454837 -108149742 -901548432 -1827367039 -1394188726 -935845465 -584499627 -1095029611 -227817287 -2109283655 -70344909 -1170879713 -1582678930 -1352324768 -1702939575 -1790873456 -79378640 -529457693 -1570696730 -1830952186 -1520212239 -1594152514 -915322826 -1405373121 -2080894941 -1830081992 -1927247210 -748010769 -447725045 -132132227 -248248191 -1894103663 -2050164560 -740643805 -1185212623 -1957728836 -1951590965 -1871608124 -1924762459 -1936473652 -1197998879 -2107968728 -1592686937 -2053173951 -1927354461 -403094679 -1648847315 -1047842317 -1719916419 -1505365513 -1173331684 -1990766234 -1012874578 -280162677 -1409958115 -1831477807 -1764389798 -1645137210 -969133345 -1708150567 -1325186473 -856148674 -1150329018 -1932015232 -1427261584 -593105298 -1849137759 -74976129 -1698382961 -369789603 -236183203 -981313165 -255955195 -429217424 -459674895 -1257282006 -2047072009 -303746676 -501754613 -1968982569 -2114520560 -40177717 -957024461 -57599997 -1715508429 -434721581 -626244773 -478545864 -594078233 -1021387128 -1616669825 -1406646931 -2014983141 -4537597 -1101465134 -1015469998 -951713677 -993566483 -39040709 -1174683828 -1093930325 -1079470308 -715616700 -1461453700 -1881865161 -368607911 -1850322229 -655010596 -761912450 -17560089 -927156184 -572641856 -1517451585 -292997323 -226005090 -1716459734 -1390919187 -1819278314 -738457412 -945727471 -1315133650 -1549560626 -931254013 -725377155 -149180066 -1155953213 -1968580129 -1793162421 -2042791396 -1373927983 -1863437737 -2044021558 -574424247 -1409326064 -1946014885 -496228385 -1431465394 -379579617 -1568191329 -524866872 -1722179475 -885842059 -1990844609 -182639556 -868886129 -480370503 -1196014848 -974614416 -1486714043 -1230687856 -1755791535 -1015535318 -2049546917 -1097336139 -338927737 -1231843915 -1858322325 -1968637954 -617543549 -265962092 -1111410837 -669175853 -466702032 -1250772980 -24054377 -554988603 -1171971700 -608351616 -395966745 -2108744809 -1751378422 -2006272772 -1785737457 -1805472974 -640341908 -1185892639 -501855866 -1523258093 -1246213164 -696638157 -316661255 -661235519 -157494608 -1312023552 -817751068 -46859076 -1581475530 -454133791 -469743899 -835824121 -1005466620 -328664097 -529538195 -776210197 -1949109101 -961109169 -2137294296 -546269503 -658945996 -332187193 -1760154198 -1324368361 -2138525819 -1917123741 -254075399 -1047740757 -12997499 -1553117346 -579504937 -901137014 -1355115654 -1364720343 -1729454841 -756350542 -1027852801 -763569939 -2105173948 -1865459711 -1667600224 -547887771 -2087372508 -1176884564 -1574478278 -962920012 -359877892 -1153780892 -1965603081 -1150040566 -1378969762 -701271510 -880013834 -672631149 -557803435 -1236212890 -125757505 -482477887 -107595737 -180320985 -555368978 -1122483384 -2081879640 -1200048909 -55600939 -329595328 -1148352083 -917923392 -15929296 -1435705644 -778501016 -1796198388 -1528681237 -51197551 -1483780857 -1324754635 -40698349 -1117351897 -1736323511 -233970294 -296173601 -2070101908 -820202709 -449400070 -366989991 -427744553 -1474935762 -841614613 -1689501549 -1423753409 -1760750189 -603770863 -716662366 -1856092986 -1007359380 -2075510359 -1525725492 -1913598864 -1141009776 -2069821169 -396789630 -906587475 -619216860 -472012658 -312150988 -19105695 -1134352462 -1849494415 -1774326227 -1142974947 -738711814 -926494591 -190666540 -486936456 -2028320922 -834323576 -1555610569 -1680914605 -984389950 -427873162 -1488983578 -720056955 -926891840 -424779542 -1034119766 -865751991 -1492004312 -2097409412 -215921979 -1900821270 -1136352118 -1097974455 -329686514 -533431538 -1787116588 -1362207574 -299535551 -592337089 -1822750978 -1121462791 -2108642265 -27921414 -1123770052 -84588599 -46409079 -460826892 -1291542762 -194497058 -441943072 -1738759778 -378120470 -666627817 -591533920 -1208791477 -963053319 -452884994 -956049190 -846089476 -1736596345 -524524038 -255135731 -1688871505 -1572022136 -484730711 -1463586706 -1224075004 -135253968 -1175741650 -1692875503 -147739818 -572025194 -1890631586 -1677024890 -34459355 -1485278442 -724861966 -80333131 -1539202401 -786741845 -713374336 -281263951 -591717410 -2145224260 -681188337 -497057802 -339091384 -1834775397 -1352410106 -989731694 -12251396 -1898266107 -1141400517 -47070568 -841054280 -861919406 -1502257627 -478699210 -1023880808 -578276645 -1732069840 -1756965795 -1423970315 -1111322037 -1324197900 -1421071439 -1782036986 -1888682640 -1133344173 -2083050368 -1549121582 -2142176093 -990253096 -185520222 -2039599357 -1412419685 -253411857 -633008598 -341519348 -1839377052 -1383014399 -2107492512 -31375566 -1195644247 -1188374350 -1409783350 -1041686099 -1331575549 -863166656 -989951907 -1565887640 -461471495 -1387967148 -1596482722 -1424423036 -130269296 -1150221579 -126287959 -807883677 -1709343005 -2039139116 -119600139 -74842581 -1601325372 -1210463000 -1139052969 -1394020625 -258055605 -1371069942 -1072982884 -1203147529 -594499751 -1663389213 -640386245 -1931064598 -482341475 -2109886547 -1613216165 -1343041780 -302582843 -268566205 -1929065088 -1236315257 -1846239674 -758985415 -215006725 -1550532821 -91066202 -1541300350 -1687232336 -1939796164 -1204883241 -1849323924 -1056367637 -1123565310 -938457099 -1528559325 -149706214 -1408988061 -560165758 -137586258 -1719834034 -120720818 -1730225358 -821527879 -1246695790 -218198751 -1511822628 -176397492 -1185215184 -2000771563 -1668714615 -2097588132 -1072185372 -684265227 -670740504 -993987625 -674723362 -1361888974 -1387276292 -722684165 -2132737370 -1267425513 -730302398 -1323360581 -233152888 -1590416488 -400959607 -124430563 -1802883810 -73935500 -1388400534 -290466636 -642421621 -1779890678 -175422436 -1977318168 -477012251 -588448306 -888484507 -1305311558 -1825901201 -380169577 -746230814 -596792418 -1541537836 -1383692244 -615131545 -529600157 -1817605531 -541280942 -568063502 -1878467199 -1241119046 -979142811 -286037516 -1364129426 -387847410 -938551225 -963051360 -419960081 -1637817325 -350394029 -672285329 -1188057636 -381738446 -1344408333 -1795402644 -1039513711 -1327472432 -621555941 -1130241379 -1473999138 -132160574 -724676220 -1253467403 -212065151 -1503622484 -1943014339 -1605659291 -1036195635 -1395143922 -1957439108 -1377099763 -1484453022 -1884413555 -249792929 -2086711465 -804153098 -1286527515 -1802586609 -1521329234 -1040134656 -1026276812 -45726580 -1874968081 -413501289 -459082531 -2038838493 -1509480319 -1611399422 -873813237 -1685896073 -956060393 -1034378297 -915915214 -624220002 -807958019 -811325352 -1571516261 -572424174 -6353858 -1562592703 -918040158 -1978415458 -1739296105 -802233771 -1240653331 -1741805394 -26181054 -1938310590 -2006644787 -1595742621 -1870447411 -1744011891 -603554134 -1369065357 -1741661141 -1896688177 -390934771 -1288220024 -183814314 -1285691012 -628382570 -2048761691 -784944639 -572504152 -1350544104 -1840090785 -493823048 -1807155728 -1005100975 -625719523 -240603702 -114712213 -1675332532 -1655769507 -1425006323 -1343639317 -1755452614 -1761741012 -76663848 -2146588783 -2139889928 -1221383587 -2145248683 -1091665698 -1672589965 -658602525 -1001921037 -867592732 -217083594 -2096731752 -1711392241 -2120910216 -56943759 -1423534598 -230677359 -786389878 -1240315908 -365704327 -294426175 -618400537 -1784457526 -1768509127 -11739362 -1882445257 -1528346795 -872681798 -1997153623 -991539151 -325410137 -1674807297 -1418079450 -887801744 -567532052 -1536321637 -1761865178 -16038163 -1117949666 -1045608859 -689409812 -1236434719 -1706553861 -259152495 -479147349 -2113302040 -1035348547 -43037788 -1781597524 -945095747 -1435166617 -309008815 -895695259 -89852543 -470686360 -1643380619 -1510879466 -1504542934 -233148313 -1513524463 -861850926 -351314267 -1106339866 -1340712136 -1950445428 -1945920588 -1058862353 -102584182 -1850461980 -856322006 -1916036295 -1304723300 -528983583 -44780901 -1013326657 -1435803489 -275498284 -324916256 -1964083918 -1387271789 -647002244 -1457010147 -213513888 -82741479 -1214117944 -290671014 -1929919020 -555964852 -399919467 -1970150406 -267520549 -1534593872 -640606234 -1333452427 -195600497 -1807573169 -1578580921 -1196564209 -1617790155 -908680418 -1435571509 -671577718 -32657794 -1271213773 -2122562455 -2056320868 -1130497305 -1480380126 -3243540 -827085605 -166116204 -186299528 -105009770 -1815130203 -1888116186 -202886383 -1854891292 -137841145 -1708752549 -705279712 -1673871791 -727415637 -50208688 -2043829592 -1643018979 -1875246927 -805098717 -2147160519 -1011638645 -982673216 -1639495882 -644614117 -2121948951 -335093728 -1218164062 -1721783183 -667813356 -1189535070 -1590651567 -56965066 -1781641347 -1681628908 -104778589 -77154783 -1807798740 -1074785424 -1433666251 -862161217 -1271407810 -1088775020 -333605053 -1967807101 -1685782707 -1198201678 -1221444227 -1016941516 -2061196586 -1472311145 -1826833281 -1013252608 -191261946 -1903990510 -714677623 -710772090 -1642472016 -1272374374 -153946992 -1816783556 -1758732646 -1054664014 -408060960 -1365269849 -227583948 -335038729 -293795869 -762265830 -1661850455 -548284303 -161951244 -1052777159 -907943680 -1938117825 -914327079 -1849722468 -1312245704 -256492438 -868725937 -2082990853 -548852977 -1129720574 -1310764091 -1124826511 -660625836 -647970662 -553342297 -1419794169 -1789796566 -1307441233 -1112126927 -1967082248 -240596571 -2142345143 -1683992799 -1179988980 -63306815 -993234440 -900844949 -741346493 -110387957 -2012005938 -1506294304 -1751136492 -87638909 -1920845368 -526434625 -154116735 -374686863 -940053437 -440924680 -1802514610 -311242041 -1922302642 -1396518626 -1439769119 -353848637 -751823516 -104054464 -791687790 -88009718 -1710581290 -1376158641 -699401097 -1656237248 -696394722 -520216504 -872855791 -626486680 -249309519 -404490536 -1486695797 -924027334 -1673151081 -1499344549 -910721145 -1374331846 -61228590 -424245217 -643654079 -1018975814 -1891904720 -1599751558 -529174866 -1112190635 -890338957 -260798003 -217912894 -1002391323 -181754946 -1033631388 -1247517533 -1144331470 -2062957405 -1001625020 -187402307 -1459547247 -2052364295 -1204367951 -1778779482 -826904087 -1410310472 -1311090965 -176146888 -1268281050 -76927228 -130765502 -900021233 -1929537210 -581335123 -1596302058 -535486835 -1970754915 -1837568724 -1055216761 -1108145201 -1618206423 -1462445753 -1375430756 -1350739784 -833917251 -1168957235 -1483845889 -270263812 -395974879 -97969300 -1597551498 -59988445 -1055964672 -793383496 -670453049 -457698734 -256198784 -228250453 -799570029 -1568298124 -172286790 -816123374 -607493429 -1004803365 -2066239194 -324077921 -759089455 -1963607005 -1961729586 -472719511 -1454811124 -1909239973 -895572737 -178108936 -2032167081 -1052208479 -2087557155 -2132763046 -1698962045 -1512519803 -1156399482 -879088624 -155012208 -392516045 -2094888378 -794576481 -1393599121 -1763772465 -2007039714 -1790829769 -1492614878 -1621773939 -1292145049 -1727200079 -1515271254 -155396205 -403902683 -196585014 -1174481212 -1983530507 -1808578768 -1299814138 -1772560082 -1524146990 -1153519514 -1867590329 -969674951 -73504374 -584916793 -1663887632 -427379790 -1786814962 -587746686 -1981259049 -139406161 -94689050 -153480923 -426012814 -286885800 -588853085 -1249154219 -734825661 -36430530 -255078315 -723880793 -769627696 -838680791 -1772879076 -443028207 -649270900 -931605893 -196973374 -1259196791 -2016608799 -1557167839 -2084147731 -665148700 -1501818265 -1684276664 -1655940741 -7968867 -788761555 -298901954 -680890545 -1934518599 -551677813 -1362098992 -622081524 -1373780272 -1528342607 -802294082 -106816661 -2118776182 -697456320 -1182624914 -1415776613 -838725931 -384063409 -1765355828 -701334244 -1934384172 -439846871 -867647923 -1144678731 -1456922091 -881040343 -745298736 -2111226648 -513973555 -1174310651 -1264395427 -1343254524 -1730687604 -561813 -852456503 -1373036784 -1917441673 -1302591229 -1202488285 -252004078 -594787062 -49774249 -1184664260 -1331326483 -972081688 -1868827487 -287752987 -131279465 -948262786 -976499915 -964041031 -2020975049 -1926287591 -1799563412 -102581136 -1799267858 -1577655999 -683785684 -1200995891 -939141884 -152838938 -373589154 -1818211097 -2129094116 -164797651 -1647699374 -1081750753 -388350169 -798487150 -548219947 -1227803599 -524724370 -1474632008 -31388429 -1411832688 -1125171513 -16623509 -218441653 -1299309248 -1876808440 -1279643944 -2074525750 -9787558 -1290730134 -1569043791 -1967293824 -1649070756 -508247910 -1580159251 -1953752755 -1697590655 -2085888190 -1999755702 -1775007964 -1863510471 -1118978249 -1153134164 -1833463820 -783571937 -1123821755 -953560920 -1975408526 -593913862 -406287378 -1621448233 -112971601 -338154059 -1113539651 -2088414399 -1508077425 -1655280081 -1789158129 -1314648809 -1990772527 -1118641029 -1927928565 -1462126019 -296628712 -1129217897 -1452206340 -1080308225 -1913585837 -922064987 -904239757 -1963309727 -1260345534 -1996179577 -1800617205 -633810911 -941092057 -717141844 -1324745144 -2028666759 -204355094 -769713305 -130027607 -1383121850 -1765937822 -1892972814 -223854593 -2080278654 -62080971 -1865310802 -1312370308 -203228219 -1157678003 -892354601 -1925472006 -976928199 -1719759278 -1011780373 -1217212065 -753955133 -1570403031 -1189720387 -410307092 -461304727 -732581019 -965438082 -1878891089 -1922987335 -19251995 -1445732915 -1803120247 -1900248512 -99943000 -409789046 -344440193 -1537895086 -289535110 -18649668 -2059841261 -168200340 -854634928 -1478603760 -212631236 -280394844 -1017021590 -1259516657 -950145720 -410716948 -907303578 -1917341746 -1770601787 -823337630 -1598409789 -1600383400 -411125125 -1325083476 -1272561742 -1155557321 -1757274226 -165319191 -1823287566 -1549962719 -1246780123 -1635583482 -1460900374 -1172049667 -1918742985 -1698905543 -562890689 -838344988 -424005349 -907159897 -1649978826 -737794871 -547819119 -933538344 -463422626 -1968371160 -428504085 -1355488204 -1183717252 -447348556 -246932545 -1256877811 -1696217585 -483537170 -731095942 -1775552707 -281587837 -1740302118 -530425086 -649801705 -1262910940 -15801632 -1437540443 -1551196751 -512319477 -1291509116 -1776492383 -1042336840 -1531161301 -931443906 -1769425159 -375103657 -1502659254 -786393258 -1297123568 -1649306679 -178438477 -1128311727 -1254592679 -1944709707 -34938209 -943443032 -1575273023 -1435297345 -358670664 -191252719 -1748912321 -1360702558 -774535403 -1718133754 -1608885916 -1578990835 -1643537866 -2006246148 -1338267889 -1672175392 -133325055 -968755564 -1801236241 -300530728 -138407752 -494298163 -1202478945 -95026698 -1533363565 -1437672955 -1630842288 -1232547755 -802859323 -1016887560 -1154358094 -929218860 -880299036 -1171053869 -214751528 -1556404136 -2133493292 -1087304685 -1391488472 -649833074 -1790129723 -464359991 -542795539 -254091517 -1318635983 -283729241 -1223657147 -1702265957 -1206793965 -1750607487 -1934070109 -1603840971 -540462453 -1844104408 -1378791752 -2004424734 -790533849 -21076154 -2039602170 -1459697776 -287337904 -1744914072 -734124672 -1139810289 -1237395983 -682648733 -1419613257 -896692229 -1813541804 -961697957 -1295635977 -269684859 -1402930043 -1822272288 -1666054549 -339531810 -647080591 -626304529 -1482864956 -963592057 -917519972 -1825583944 -1490482119 -136231778 -429925144 -1616906700 -1092837762 -2044116790 -27504824 -564592863 -1529495995 -859933375 -335289315 -210427477 -1896522977 -1909385665 -1196734534 -185475136 -1281838955 -311369981 -1925106575 -1277580323 -1750985955 -1852530844 -1267980902 -1474790733 -551595857 -2132148147 -2101772787 -536721606 -1248714642 -1936789610 -65854044 -854839303 -618567091 -288763310 -2079392597 -202506501 -1912665459 -485657470 -2007239690 -856859107 -205674567 -1471259546 -1332478064 -999350732 -618149537 -1860867820 -1801099479 -149455441 -1489213544 -290128223 -1397165271 -1570513399 -897191716 -1618485225 -1853303673 -1372016023 -1941380722 -2066745783 -248384656 -2040187271 -556072048 -54078992 -520035863 -2131789798 -373968438 -1750386344 -364803355 -184175300 -910331773 -1272607583 -1926007008 -1378772225 -1676234445 -1781835769 -654312168 -1908334936 -717001407 -1111904132 -370050330 -323254598 -1953885323 -1778177384 -1444861236 -37713176 -337673167 -1621122395 -1079063276 -317080817 -1270363112 -710404910 -1913728697 -1175629360 -1953101120 -1482979445 -740325033 -122578913 -746973318 -191155264 -110986136 -1328182156 -1812468974 -110513323 -1971548653 -145537761 -69275194 -372048884 -1700696971 -606650027 -1862131480 -1564596629 -238286088 -1964763008 -2063319184 -639593732 -1496200489 -1755595900 -2022465167 -1200897053 -1425455265 -299072923 -1406882881 -1685627497 -737070855 -1264184089 -2086264052 -1874417395 -1895539922 -419565809 -1453738762 -1065921015 -625915831 -1392468611 -2090643718 -321536212 -990259232 -288647974 -140940445 -111596474 -848714687 -761361035 -1487346419 -1121613053 -339128405 -309503697 -623242445 -1558026696 -1486571801 -987510209 -1330458647 -1418747565 -1379392314 -1360652033 -2072845375 -1832495991 -1697139110 -939222316 -1504659562 -45831462 -1490236208 -298172895 -1312497814 -198737914 -851049513 -1348075971 -1160368747 -1018532422 -882266317 -2022890931 -1914261660 -1543203913 -1468160972 -794352374 -1922000066 -606091088 -1057978295 -276606905 -1777640227 -1006798125 -1232432162 -1007571419 -1344282538 -1828649726 -1477472665 -529670394 -850595143 -153930322 -1536610866 -180486040 -1181964716 -1057247062 -871675756 -120991258 -1980543144 -992092708 -1039108048 -951945332 -592024774 -868640067 -639773763 -227014212 -1496904012 -694805079 -1720374014 -606230090 -1246701262 -310166655 -1028159316 -1620200250 -612957790 -502521871 -1979385893 -869527974 -530441183 -920343984 -2044113394 -2117911899 -1203837468 -1452886289 -1770792833 -1886764105 -1100781133 -256883426 -997610312 -1431681655 -1866794597 -480709109 -444514949 -2014623577 -403796390 -557602210 -1707962 -788429923 -1167613871 -380763611 -2140225664 -421647598 -2082628133 -895068878 -299685311 -961869762 -2035678965 -2094384398 -914119209 -503535025 -1827595995 -947284924 -1721442457 -1383682415 -449935542 -776733307 -3600636 -386347136 -1493249871 -1556683055 -378833984 -1921239380 -706143368 -1156952654 -1586315840 -200845375 -1911408188 -829540243 -619027777 -1589061971 -1257912505 -1906450467 -1256985629 -1360831064 -786852098 -418912860 -1217043154 -62551603 -1185288238 -1081106494 -297707391 -2078706674 -1559100522 -207012560 -336587780 -558892262 -208775456 -2048293441 -1505001477 -1497429573 -937974218 -2002712946 -2085283991 -434917697 -1774882738 -1906320736 -1224080359 -225255453 -2002212557 -117697009 -301191376 -504500453 -873675215 -1513643966 -722854200 -695548321 -1327140426 -1483982040 -411070022 -398967355 -1000389551 -897711294 -1761098083 -8374380 -1161767605 -906818711 -210633018 -1056083270 -639176435 -925140751 -1058997777 -231171703 -504894898 -1060661389 -274211176 -167328570 -1235182067 -2128068167 -101541984 -1514109370 -2102448287 -1152431871 -767443604 -637868546 -418286798 -1432237355 -469026262 -1659400944 -181542219 -1753295993 -2022633864 -1888703885 -1490408888 -1052922008 -1194937176 -42050288 -217070553 -1877551665 -886124637 -297682114 -1653876135 -1815357824 -1418775039 -1841147832 -1079742801 -1000439257 -1733120036 -80257144 -262088892 -439047847 -323353437 -1467588749 -1914418648 -2034217582 -1155240434 -726321711 -991947229 -741526142 -982265053 -1221951282 -949080313 -1831774322 -305466462 -1488910504 -1639385884 -943361378 -202914245 -175684279 -2083146175 -1011866184 -511953895 -1589623383 -2103629401 -1676062046 -1031809423 -690522836 -615676264 -1094757802 -2101974365 -1777159405 -1515557359 -668995646 -1732930277 -1185944925 -1380626668 -631603241 -344004366 -655401638 -891704403 -1735012455 -1821372219 -1570980395 -156058900 -804399313 -1129695726 -893143755 -156397755 -57084357 -1639081537 -123168643 -2068630840 -1865766597 -382982285 -774773936 -1432190591 -1830547361 -1158769405 -2055678839 -1077334137 -1320212702 -1013841710 -1502364672 -130320878 -2017160253 -88036982 -21323691 -1904989235 -320379522 -877123225 -1482289567 -2030447369 -66296306 -1845485796 -973459751 -1407612211 -1058574925 -1714232727 -468834537 -584562516 -4521387 -829023664 -526819112 -173738803 -1597785748 -1849544548 -469427911 -1967464746 -226789516 -2015405634 -662926507 -660642513 -928261001 -1961431999 -1913625743 -1592765129 -1219863248 -215231227 -1028770641 -1157321290 -1339530151 -1412176356 -458748648 -722234206 -1012727398 -2101475711 -1986216215 -1850116537 -1492912446 -180548374 -82128607 -1650996475 -661552438 -1188984947 -934668894 -137223653 -2067982740 -1710568132 -1155012135 -1184267712 -1108995188 -871552403 -195281034 -733325822 -598440221 -1318875446 -13416588 -6811581 -665608576 -641019609 -1838595111 -1125833894 -411842741 -501153706 -459473208 -15012244 -1055198209 -796341737 -997485655 -1484055103 -1639039863 -1570237372 -552973221 -1659184778 -843407551 -1758639457 -1635920138 -676626825 -1141136910 -2059078660 -236067215 -1179386496 -674776462 -106857027 -649723897 -2102675531 -676754485 -1139234883 -156481929 -1471796775 -1771751279 -815496851 -814939603 -39207055 -1822977403 -632020472 -913954842 -2035986150 -814791752 -1849242592 -1836904360 -626669248 -1170246248 -1673450910 -96119611 -574599533 -60390572 -1372062220 -570330054 -1317701017 -1749624855 -451359614 -1088791294 -607122171 -1207521100 -1086663550 -1353350762 -1766951557 -1750947783 -1210974040 -1138167661 -1547034598 -1425974357 -433517579 -1865419629 -993942050 -2056227984 -1716879564 -2004551056 -766144056 -271201780 -1128017526 -604923766 -766150264 -375539636 -240223719 -170788873 -1410436119 -1275356447 -881524022 -284557101 -105114638 -1430163032 -2113101600 -1961520761 -1257965030 -641754495 -1304922231 -1724933253 -2071432318 -1705567109 -854680807 -102208466 -1978254109 -1174987109 -1896206798 -890332506 -152376046 -1183697898 -122065878 -714328661 -1288218697 -161511425 -103190167 -1297833640 -698584901 -823332958 -1519887485 -430979330 -7257979 -1725768821 -1082438165 -1204265418 -55507351 -904145459 -378443241 -1796472720 -1844411867 -103804224 -880871404 -53424610 -259255824 -68314205 -1400575937 -911518392 -1888760293 -290974497 -588106860 -1592252526 -1194479215 -935034349 -1984458544 -226227451 -1158713767 -1120570973 -4759021 -527971008 -206302052 -1279981706 -1308840743 -1011371380 -785717655 -679682182 -952914481 -1848126488 -258413608 -945575422 -907129754 -1143365425 -859024619 -94212752 -738275025 -27832809 -1782069464 -287056739 -1314341211 -1115940235 -1632840394 -454976945 -1755731295 -3081638 -253482338 -1817582765 -158652780 -1450067533 -1640600975 -2038042992 -1024396894 -662199459 -1326048659 -314523247 -1234957062 -493892779 -831640998 -1566678710 -872083103 -524821346 -957023993 -49734321 -513594364 -1243698455 -1381596934 -1906478374 -1726018578 -985136770 -94775020 -1598378713 -1078089068 -1123436137 -914930135 -1247866425 -565708373 -950519742 -254453761 -964419950 -1947015741 -137746001 -109667341 -638031061 -1002192756 -1139406671 -896239198 -641900728 -1615176615 -2080070225 -853982062 -1243303133 -1179871021 -228253549 -851604501 -2085824699 -932662465 -774909802 -1568206806 -784988811 -1314902956 -1967253862 -977429422 -1553879651 -506663190 -715573975 -743374625 -1984947776 -2006298734 -74597144 -1771233007 -694833935 -57873159 -2011574869 -703768562 -2045777505 -21854418 -87499689 -1728458475 -1190296356 -1500683487 -1939415641 -1251884121 -1519131988 -618243133 -1286452145 -535843019 -1514688462 -1097829296 -37482848 -761517765 -1974023882 -944522271 -386690073 -814541089 -1931316845 -426889510 -2136613590 -1990545643 -1600368935 -168011870 -1981986932 -1635517507 -352058549 -730585558 -1787463407 -748743566 -2026425989 -1198439350 -921030237 -693065683 -403632853 -2104003145 -1515126513 -2017701512 -595042407 -46390370 -146384729 -1419364488 -1010598940 -688220457 -574298057 -1435934381 -327916481 -849257965 -1302299793 -599290727 -580944259 -1469501751 -1853988557 -2145443176 -65542255 -2057052521 -542487394 -1517549443 -1937696729 -279417548 -1771476894 -498875450 -823530262 -541008519 -284417435 -2052715470 -664115235 -1312241186 -180558412 -250837273 -311648250 -159522717 -1038713163 -757564078 -2096399530 -422704381 -516627191 -676814316 -2144814500 -236802958 -660117215 -689512103 -808155909 -1989778935 -1599209461 -8085175 -596066464 -77847193 -560231728 -1246344048 -748921898 -728684619 -2050636339 -79898870 -683028715 -1363519790 -879113393 -571304791 -520236600 -1210609263 -1449811563 -1633480479 -475467305 -392344648 -1361702646 -403145243 -351192816 -1212596556 -490506662 -1903231048 -835301671 -814584058 -506013181 -528290947 -1288549531 -1426871169 -473851334 -1150007462 -822590834 -1931911299 -1827943300 -341989118 -1144866854 -323738058 -1489462955 -187011606 -1335486481 -22207723 -1730529530 -1638779389 -1487418148 -179678709 -498054481 -2057889808 -1729868121 -1259896561 -892741307 -1982388807 -1947379691 -1959686357 -491908060 -1834207117 -391262734 -357843224 -1316854168 -401535594 -1215109484 -1923098265 -1883652505 -343727461 -296426597 -2027238386 -1967493847 -715890023 -1760226067 -384786997 -1041797462 -1055769843 -1813859787 -2011070944 -824235675 -1659466575 -1284602436 -1660038561 -160552903 -1173180089 -1590392716 -1423603 -304175504 -1266615868 -7500765 -1511305829 -80491287 -2049846646 -1839914148 -1820052283 -861652513 -1311554270 -1520463082 -1515103521 -1631274968 -2062149574 -309311285 -1684341255 -594038031 -345712114 -1440234863 -1739157104 -613527611 -1489568830 -1966452731 -397722587 -1554410245 -834421960 -1061666810 -2139936394 -2002337649 -72634606 -999111546 -893117729 -1866462420 -1340261211 -814199894 -491819774 -350384315 -509022131 -1707589716 -488898304 -641361906 -1149129849 -1104934672 -1345936695 -1712779014 -1806083910 -170925025 -1551259136 -1560824172 -1259110699 -569660555 -802849559 -852784012 -435029606 -1508253654 -322193590 -1301393043 -391929006 -818458493 -1199132816 -1838695064 -658260318 -1692898929 -541460600 -1440091861 -1483206137 -255370183 -1334338975 -63427204 -869128716 -262562918 -1963551888 -1035378167 -540861128 -2102184192 -1008754500 -1900972082 -1523565755 -2122121104 -1080985552 -412518844 -1126998592 -659569204 -69025814 -475686518 -1929173892 -917500438 -1497276006 -504457296 -148335516 -1993986892 -1455382409 -773408733 -2109543887 -149096839 -1904640671 -904515315 -152162092 -1882740314 -44918853 -1184402274 -1223095075 -845456441 -1834595335 -473591719 -1081625451 -429883102 -910306806 -852987214 -1702761973 -953400289 -1423166956 -494169206 -1182582293 -699445466 -254463384 -1126153711 -1492039766 -545801143 -1377154064 -249606282 -1097218983 -517370492 -284572341 -361253318 -648245557 -878535268 -1592176151 -2058328237 -508609736 -1218917892 -1506502111 -948781447 -1103700754 -2082313339 -2046777061 -1789006581 -915065220 -1370756373 -97795995 -832298010 -1871661159 -668638057 -17899248 -184950556 -1055157483 -111859855 -980391860 -1951451236 -1670666468 -542643151 -1987873695 -1790095486 -2036422379 -1704041614 -985490106 -1738325878 -1675497758 -137755595 -270913699 -581207453 -1598036015 -1760814723 -1688393801 -2133185596 -210825307 -2140400846 -1218447825 -48536983 -1864771068 -830995558 -1456186865 -1408998843 -741378832 -653909530 -1583649011 -476606959 -219156603 -430572016 -1751466169 -1333552954 -1885157786 -2020665111 -1012126919 -599159746 -527030239 -1574666645 -1981320534 -1172784556 -1385120526 -997947002 -647979544 -702622071 -2104056091 -257506288 -728633711 -1195025583 -1527906737 -2066561580 -1447452129 -633178887 -1056082924 -633361213 -1972952359 -115304386 -890565908 -1927679813 -1576318449 -1825902951 -409581827 -1156677754 -1261038834 -763570795 -2119560740 -998620744 -1234143103 -1846069395 -44589909 -2098291407 -7226415 -1195272673 -1385781073 -1362342196 -414643858 -334886891 -2036821897 -1976289699 -371402944 -1581801626 -1639861969 -354987385 -563408329 -948385880 -897857126 -2064612860 -907569794 -2096666764 -619138925 -1309642760 -1605969217 -1950154623 -1353328247 -1388541952 -519795315 -236383209 -47846713 -1000821413 -1713564987 -2131030239 -492962207 -223902923 -745077317 -537321162 -588034099 -369358399 -1578872163 -1796501209 -175742843 -919947676 -1825815779 -1091965670 -271768428 -2061735874 -1946189973 -1291448754 -761988249 -1291513882 -1856594545 -847126905 -1992796372 -773665592 -2131605806 -1576582188 -1963597030 -1794079761 -280655600 -1104580388 -1833936448 -137096145 -2072439431 -1452246124 -1748957913 -2126967302 -926656752 -768622820 -1129599035 -1415541765 -1186602889 -1701609381 -909139368 -559209571 -1246820525 -167136249 -150326667 -1099523397 -592950944 -1402393728 -1398360671 -186764729 -1481192036 -764113028 -495452536 -1276673133 -1536229154 -207503397 -2143634298 -1875984414 -315140844 -877491606 -1231218093 -2077550206 -1449695669 -1833133668 -1677158214 -127752176 -1794658679 -1420595838 -231061920 -807255664 -1891746749 -1092216608 -194316100 -1695549260 -2135900777 -747715787 -1932413512 -1678702603 -314494335 -749033078 -449803232 -700482784 -508797834 -85313684 -1495494439 -626431785 -1474172901 -905111668 -1585132375 -1785185590 -1120178893 -2005005049 -1953953466 -775973138 -112342135 -496137232 -2046940570 -242135050 -82274285 -1951922974 -1009232446 -1343875916 -1437004713 -1137117229 -1072293150 -348206426 -412463707 -200311033 -1520656782 -475652127 -1351164355 -1527231107 -1448666405 -1714162796 -1440987867 -1509993450 -1645657551 -1124569944 -643471561 -98879435 -1861804914 -370969161 -733661686 -1948339175 -905864769 -1357599000 -152643625 -1385930857 -1732278237 -964526880 -1596704604 -858626516 -1993230219 -1622881180 -574191713 -1796094420 -1928774708 -650865891 -1968815866 -1460226886 -590155086 -1657048556 -1447146396 -1937175297 -105644512 -1745820762 -940477973 -1133650291 -785524653 -1730864862 -832253372 -1121430293 -1562448379 -639870337 -1850133430 -1776833097 -326266097 -1028541488 -1600914113 -740883928 -925992590 -343470321 -269641911 -681103007 -1210400139 -82548142 -112186632 -30081958 -928811061 -468872184 -1217295645 -11200546 -1416499333 -100579089 -363118634 -1933840511 -2039954679 -941865598 -833143549 -1050249603 -1376982928 -1668290824 -1417383736 -2079838428 -1253137177 -1104407710 -1079220949 -819607281 -1179459909 -1908628753 -1360216432 -1194150309 -1849562148 -765231111 -2107204341 -1630536510 -388304203 -25936588 -2124537822 -896575685 -2002270443 -1090587011 -722966732 -439389998 -1778918000 -1007492466 -17319467 -1177989524 -818188175 -950865484 -1770372261 -1260661442 -863194392 -1456110859 -131566001 -1469106044 -1645791949 -1235913483 -1536074997 -1911553992 -1132584424 -51367160 -39432026 -1309097706 -1035181227 -1525857842 -1990521667 -1197404303 -704864484 -1137585736 -356555711 -1152459647 -1234274836 -1912622279 -1907414857 -285619183 -775657636 -1252150962 -1708961381 -2067635489 -169287869 -1952865655 -1820486484 -1716817779 -966130561 -632483760 -110501670 -1775696682 -553892015 -2068970007 -1123695425 -977816257 -1612964555 -1409199804 -1971446712 -579699021 -2015623155 -23834660 -1157172278 -982569114 -2037337215 -2047304737 -2067722525 -1632101921 -928363116 -1530195157 -1873330874 -814250651 -1344892673 -1345770436 -1065947648 -1073536662 -1920559787 -21642052 -813231621 -1397924639 -1448309493 -10510106 -549692488 -206996422 -65356414 -1081106481 -297488900 -554012084 -1939486043 -287646888 -495557219 -888596667 -1042901031 -276101203 -1868241301 -1173143120 -969054733 -386918683 -361822065 -1617241798 -282378907 -3430079 -1814762931 -10342976 -2035705872 -399126700 -1531017319 -659022079 -1610914174 -1308184689 -722490037 -1017511721 -907213786 -408207602 -1682398296 -150980823 -1356505054 -1094046026 -876573368 -830777556 -2087194545 -333344070 -1876433114 -1413990803 -889388319 -1463294313 -604793147 -718320378 -1805013259 -1503846491 -1412932694 -285619532 -781523279 -1051765101 -1078154050 -68104964 -31346097 -700358764 -571877341 -1553149862 -1126001349 -1078775279 -1919166179 -221592513 -568722093 -62504254 -389493595 -688695109 -2109323280 -736322284 -1567853174 -1283946728 -1376972440 -1492019008 -196921437 -386291632 -560394143 -1828569306 -125853725 -2099647427 -1323018085 -919273557 -1233315981 -829531823 -477512837 -411862620 -835260059 -115211174 -1471435471 -2141765892 -538455830 -331046352 -1913392334 -1964827360 -997399601 -37745525 -881362810 -1870034311 -1243491132 -44602920 -169483637 -948171137 -1583638819 -305310015 -1006989422 -152593547 -544269911 -1411541604 -527890019 -992603576 -1035331936 -1911340358 -1837005080 -171986641 -66486425 -745848535 -614280206 -1253531113 -1282839121 -2088774414 -1116398589 -746461484 -178695814 -1158407392 -266293642 -241320746 -1428652486 -347675095 -72318178 -2123357091 -379382591 -404258994 -1890136697 -1949360055 -883925753 -1995744372 -928577711 -841926028 -481002513 -1080788683 -1398708855 -1743725923 -92257252 -84441230 -1864545590 -1336354106 -1719479216 -599745633 -1784098460 -28654159 -554113385 -1494568303 -93249562 -1729809871 -280888811 -729190371 -1960875615 -1152414443 -474531208 -1839231545 -1084961897 -670956202 -324256617 -1614949480 -410095927 -1207221866 -352405006 -111037416 -42561469 -218555032 -1057386454 -1066953453 -798232121 -556914838 -1333948640 -2093001447 -1293181869 -1973164643 -1535677927 -1680449443 -1756346804 -1758006813 -1740490665 -1551850868 -768645661 -1513487722 -244344939 -716656709 -1761015787 -772709155 -1089154676 -272032504 -57610265 -1888082705 -1787654863 -1819060911 -1379532485 -1569022383 -1607489568 -1732890116 -510958998 -2048258680 -920773350 -670533168 -1804258767 -1708001329 -964427054 -2066412669 -1092188599 -1871052484 -1176055567 -526427581 -35728227 -1336373676 -2048392206 -1017461185 -57855234 -1710309394 -1101369863 -1561733948 -1517330402 -403758289 -2064722350 -600284577 -104712033 -1106031738 -456972134 -929134466 -1609372725 -1170855110 -1169176309 -870855313 -1364191286 -1427528430 -783018726 -415939066 -628611277 -1597672946 -2101164981 -1058744399 -267614951 -973724639 -1564617533 -589619616 -1247338854 -288757164 -1976096775 -1423896570 -2019373469 -778336295 -1175216188 -1451370257 -2060646773 -821538642 -1427589531 -1809943233 -610057276 -1145706954 -1558396876 -1265736120 -253961658 -1283579417 -1646027404 -898238374 -2029797055 -2021370790 -2135055637 -1575833336 -115059701 -1073112407 -1232556943 -957282039 -91746149 -84267697 -1095460106 -1020695811 -735123241 -742890296 -287281214 -792125242 -997814541 -569191164 -1503729610 -1595997374 -1857113788 -984109418 -7939132 -289005410 -1853400003 -843550686 -2016825755 -908580037 -1895951689 -897682837 -1282821284 -1788987955 -602018038 -1321703649 -302384175 -1224520423 -1178960160 -2099281898 -1622023123 -1185213243 -1968149176 -992586291 -744822941 -556991024 -466923095 -671211527 -320536598 -1369615910 -257387177 -874218781 -2059423140 -1730775281 -1474149152 -505962225 -1819357102 -2062647328 -85128175 -525128323 -1821419138 -212064381 -1490681094 -1332920956 -2000585635 -691306366 -899563092 -672012364 -895302175 -2073224343 -1759360226 -864982839 -1449768530 -910224848 -1623002755 -470019091 -1166008771 -1321135322 -1487930521 -201197132 -1380937146 -1554839693 -1609703555 -288663979 -409936480 -674879784 -1843389881 -107154698 -1357713100 -2070322325 -229783934 -802981432 -921689876 -1042200121 -1380808715 -1543783523 -472248007 -2120177984 -635222417 -1041953282 -1527152936 -134846408 -768331671 -531225086 -1210499823 -1757937130 -569328484 -1664183203 -1100074293 -1261925428 -632170624 -1290075859 -1310062101 -63898816 -205577012 -1979136308 -969720173 -833550528 -1447894715 -1629270848 -591159439 -1357340251 -98816476 -803653001 -1471331824 -399770763 -1618365925 -1995712220 -388199047 -406063343 -3575635 -2113638976 -255780958 -1795783459 -997420475 -388574843 -279615774 -808093982 -948971846 -8769453 -1359308575 -968183239 -772104554 -1665043904 -533490471 -630119872 -1182825347 -489486750 -1941439240 -902774162 -953374679 -992739686 -1175449059 -1070265860 -635281748 -2039129399 -2103770167 -1894432561 -1135502305 -1847552893 -1355420678 -48807770 -2120920883 -236224028 -1667458940 -320811230 -1690388640 -1300706317 -1735027006 -2065930876 -1584628236 -1902056005 -413706793 -1765504612 -1054463285 -1329375951 -401745069 -440788515 -1661473102 -648563373 -1925101486 -1192049500 -901003637 -1260932062 -1116537438 -932612980 -2090699054 diff --git a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvc b/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvc deleted file mode 120000 index 1c3b3880..00000000 --- a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvc +++ /dev/null @@ -1 +0,0 @@ -../../raven-mohyse/raven-mohyse.rvc \ No newline at end of file diff --git a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvi b/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvi deleted file mode 120000 index abe6bfb1..00000000 --- a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvi +++ /dev/null @@ -1 +0,0 @@ -../../raven-mohyse/raven-mohyse.rvi \ No newline at end of file diff --git a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvt b/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvt deleted file mode 120000 index fcdcf611..00000000 --- a/ravenpy/models/ostrich-mohyse/model/raven-mohyse.rvt +++ /dev/null @@ -1 +0,0 @@ -../../raven-mohyse/raven-mohyse.rvt \ No newline at end of file diff --git a/ravenpy/models/ostrich-mohyse/ostIn.txt b/ravenpy/models/ostrich-mohyse/ostIn.txt deleted file mode 100644 index 0398232e..00000000 --- a/ravenpy/models/ostrich-mohyse/ostIn.txt +++ /dev/null @@ -1,75 +0,0 @@ -ProgramType {algorithm} -ObjectiveFunction GCOP -ModelExecutable ./ostrich-runs-raven.sh -PreserveBestModel ./save_best.sh -#OstrichWarmStart yes - -ModelSubdir processor_ - -BeginExtraDirs -model -#best -EndExtraDirs - -BeginFilePairs - raven-mohyse.rvp.tpl; raven-mohyse.rvp - raven-mohyse.rvh.tpl; raven-mohyse.rvh - #can be multiple (.rvh, .rvi) -EndFilePairs - -#Parameter/DV Specification -BeginParams - #parameter init. low high tx_in tx_ost tx_out - par_x01 random {lowerBounds.par_x01} {upperBounds.par_x01} none none none - par_x02 random {lowerBounds.par_x02} {upperBounds.par_x02} none none none - par_x03 random {lowerBounds.par_x03} {upperBounds.par_x03} none none none - par_x04 random {lowerBounds.par_x04} {upperBounds.par_x04} none none none - par_x05 random {lowerBounds.par_x05} {upperBounds.par_x05} none none none - par_x06 random {lowerBounds.par_x06} {upperBounds.par_x06} none none none - par_x07 random {lowerBounds.par_x07} {upperBounds.par_x07} none none none - par_x08 random {lowerBounds.par_x08} {upperBounds.par_x08} none none none - par_x09 random {lowerBounds.par_x09} {upperBounds.par_x09} none none none - par_x10 random {lowerBounds.par_x10} {upperBounds.par_x10} none none none -EndParams - -BeginTiedParams - # 2-parameter ratio (par_rezi_x10 = 1.0 / par_x10 ) - # Xtied =(c3 * par_x10 + c2)/(c1 * par_x10 + c0) - # --> c3 = 0.0 - # --> c2 = 1.0 - # --> c1 = 1.0 - # --> c0 = 0.0 - par_rezi_x10 2 par_x10 par_x10 ratio 0.00 1.00 1.00 0.00 free -EndTiedParams - -BeginResponseVars - #name filename keyword line col token - NS ./model/output/{run_name}-{run_index}_Diagnostics.csv; OST_NULL 1 3 ',' -EndResponseVars - -BeginTiedRespVars - NegNS 1 NS wsum -1.00 -EndTiedRespVars - -BeginGCOP - CostFunction NegNS - PenaltyFunction APM -EndGCOP - -BeginConstraints - # not needed when no constraints, but PenaltyFunction statement above is required - # name type penalty lwr upr resp.var -EndConstraints - -# Randomsed control added -{random_seed} - -#Algorithm should be last in this file: - -BeginDDSAlg - PerturbationValue 0.20 - MaxIterations {max_iterations} - UseRandomParamValues - # UseInitialParamValues - # above intializes DDS to parameter values IN the initial model input files -EndDDSAlg diff --git a/ravenpy/models/ostrich-mohyse/raven-mohyse.rvh.tpl b/ravenpy/models/ostrich-mohyse/raven-mohyse.rvh.tpl deleted file mode 100644 index c9e9706b..00000000 --- a/ravenpy/models/ostrich-mohyse/raven-mohyse.rvh.tpl +++ /dev/null @@ -1,33 +0,0 @@ -######################################################################### -:FileType rvh ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of MOHYSE simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -# tied parameters: -# (it is important for OSTRICH to find every parameter place holder somewhere in this file) -# (without this "par_x11" wouldn't be detectable) -# para_rezi_x10 = 1.0 / par_x10 -# para_x11 = par_x11 - -:SubBasins - :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED - :Units none none none km none - 1, mohyse, -1, NONE, _AUTO, 1 -:EndSubBasins - -:HRUs - :Attributes AREA ELEVATION LATITUDE LONGITUDE BASIN_ID LAND_USE_CLASS VEG_CLASS SOIL_PROFILE AQUIFER_PROFILE TERRAIN_CLASS SLOPE ASPECT - :Units km2 m deg deg none none none none none none ratio deg - 1, 4250.6, 843.0, 54.4848, -123.3659, 1, LU_ALL, VEG_ALL, DEFAULT_P, [NONE], [NONE], [NONE], [NONE] -:EndHRUs - -:SubBasinProperties -# 1.0 / MOHYSE_PARA_10, MOHYSE_PARA_9 - :Parameters, GAMMA_SCALE, GAMMA_SHAPE, - :Units, 1/d, - - 1, par_rezi_x10, par_x09 -:EndSubBasinProperties - diff --git a/ravenpy/models/ostrich-mohyse/raven-mohyse.rvp.tpl b/ravenpy/models/ostrich-mohyse/raven-mohyse.rvp.tpl deleted file mode 100644 index 984b9b6c..00000000 --- a/ravenpy/models/ostrich-mohyse/raven-mohyse.rvp.tpl +++ /dev/null @@ -1,93 +0,0 @@ -######################################################################### -:FileType rvp ASCII Raven 2.8.2 -:WrittenBy Juliane Mai & James Craig -:CreationDate Sep 2018 -# -# Emulation of MOHYSE simulation of Salmon River near Prince George -#------------------------------------------------------------------------ - -#----------------------------------------------------------------- -# Raven Properties file Template. Created by Raven v2.8.1 w/ netCDF -#----------------------------------------------------------------- -# all expressions of format *xxx* need to be specified by the user -# all parameter values of format ** need to be specified by the user -# soil, land use, and vegetation classes should be made consistent with user-generated .rvh file -#----------------------------------------------------------------- - -#----------------------------------------------------------------- -# Soil Classes -#----------------------------------------------------------------- -:SoilClasses - :Attributes, - :Units, - TOPSOIL - GWSOIL -:EndSoilClasses - -#----------------------------------------------------------------- -# Land Use Classes -#----------------------------------------------------------------- -:LandUseClasses, - :Attributes, IMPERM, FOREST_COV, - :Units, frac, frac, - LU_ALL, 0.0, 1.0 -:EndLandUseClasses - -#----------------------------------------------------------------- -# Vegetation Classes -#----------------------------------------------------------------- -:VegetationClasses, - :Attributes, MAX_HT, MAX_LAI, MAX_LEAF_COND, - :Units, m, none, mm_per_s, - VEG_ALL, 0.0, 0.0, 0.0 -:EndVegetationClasses - -#----------------------------------------------------------------- -# Soil Profiles -#----------------------------------------------------------------- -:SoilProfiles - LAKE, 0 - ROCK, 0 - # DEFAULT_P, 2, TOPSOIL, MOHYSE_PARA_5, GWSOIL, 10.0 - DEFAULT_P, 2, TOPSOIL, par_x05, GWSOIL, 10.0 -:EndSoilProfiles - -#----------------------------------------------------------------- -# Global Parameters -#----------------------------------------------------------------- -#:GlobalParameter RAINSNOW_TEMP -2.0 -:GlobalParameter TOC_MULTIPLIER 1.0 -# :GlobalParameter MOHYSE_PET_COEFF MOHYSE_PARA_1 -:GlobalParameter MOHYSE_PET_COEFF par_x01 - -#----------------------------------------------------------------- -# Soil Parameters -#----------------------------------------------------------------- -:SoilParameterList - :Parameters, POROSITY, PET_CORRECTION, HBV_BETA, BASEFLOW_COEFF, PERC_COEFF, - :Units, -, -, -, 1/d, 1/d, # (units not generated by .rvp template) - # TOPSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_7, MOHYSE_PARA_6, - # GWSOIL, 1.0 , 1.0, 1.0, MOHYSE_PARA_8, 0.0, - TOPSOIL, 1.0 , 1.0, 1.0, par_x07, par_x06, - GWSOIL, 1.0 , 1.0, 1.0, par_x08, 0.0, -:EndSoilParameterList - -#----------------------------------------------------------------- -# Land Use Parameters -#----------------------------------------------------------------- -:LandUseParameterList - :Parameters, MELT_FACTOR, AET_COEFF, FOREST_SPARSENESS, DD_MELT_TEMP, - :Units, mm/d/K, mm/d, -, degC, - # [DEFAULT], MOHYSE_PARA_3, MOHYSE_PARA_2, 0.0,MOHYSE_PARA_4, - [DEFAULT], par_x03, par_x02, 0.0, par_x04, -:EndLandUseParameterList - -#----------------------------------------------------------------- -# Vegetation Parameters -#----------------------------------------------------------------- -:VegetationParameterList - :Parameters, SAI_HT_RATIO, RAIN_ICEPT_PCT, SNOW_ICEPT_PCT, - :Units, -, -, -, - [DEFAULT], 0.0, 0.0, 0.0, -:EndVegetationParameterList - From 864e9ec77aa295c109bb560009dc4fa8518a1be4 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 6 Apr 2021 22:37:28 -0400 Subject: [PATCH 16/59] WIP --- ravenpy/config/rvs.py | 27 +++++++++++++++++++++++ ravenpy/models/base.py | 33 +++++++++++++++++++++++----- ravenpy/models/emulators/__init__.py | 27 +++++++++++++++++++++++ 3 files changed, 81 insertions(+), 6 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 1082029d..86b120b6 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -19,6 +19,7 @@ GriddedForcingCommand, GridWeightsCommand, HRUsCommand, + HRUState, HRUStateVariableTableCommand, LandUseClassesCommand, MonthlyAverageCommand, @@ -141,6 +142,32 @@ def _parser(lines, indent="", fmt=str): lines = iter(solution_str.splitlines()) return _parser(lines) + @staticmethod + def get_states(solution, hru_index=None, basin_index=None): + """Return state variables. + Parameters + ---------- + solution : dict + `solution.rvc` parsed content. + """ + hru_state = {} + basin_state = {} + + for index, params in solution["HRUStateVariableTable"]["data"].items(): + hru_state[index] = HRUState(*params) + + for index, raw in solution["BasinStateVariables"]["BasinIndex"].items(): + params = {k.lower(): v for (k, v) in raw.items()} + basin_state[index] = BasinIndexCommand(**params) + + if hru_index is not None: + hru_state = hru_state[hru_index] + + if basin_index is not None: + basin_state = basin_state[basin_index] + + return hru_state, basin_state + def set_from_solution(self, solution_str): solution_objs = RVC.parse_solution(solution_str) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index ddd2d182..029bc57d 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -187,17 +187,38 @@ def derived_parameters(self): """Subclassed by emulators. Defines model parameters that are a function of other parameters.""" return + def configure(self, fns): + """Read configuration files.""" + # for fn in fns: + # shutil.copy(fn, self.model_path / fn.name) + # self.rvfiles = + # rvf = RVFile(fn) + # if rvf.ext not in self._rvext + ("txt",): + # raise ValueError( + # "rv contains unrecognized configuration file keys : {}.".format( + # rvf.ext + # ) + # ) + # else: + # if rvf.ext.startswith("rv"): + # setattr(self, "name", rvf.stem) + # self.rvfiles[rvf.ext] = rvf + # elif rvf.ext == "txt": + # self.rvfiles[rvf.stem] = rvf + # else: + # raise ValueError + def _dump_rv(self): """Write configuration files to disk.""" identifier = self.config.identifier - for rvs in ["rvt", "rvh", "rvp", "rvc", "rvi"]: - rvo = getattr(self.config, rvs) + for rvx in ["rvt", "rvh", "rvp", "rvc", "rvi"]: + rvo = getattr(self.config, rvx) if rvo.is_ostrich_tmpl: - fn = self.exec_path / f"{identifier}.{rvs}.tpl" + fn = self.exec_path / f"{identifier}.{rvx}.tpl" else: - fn = self.model_path / f"{identifier}.{rvs}" + fn = self.model_path / f"{identifier}.{rvx}" with open(fn, "w") as f: f.write(rvo.to_rv()) @@ -610,9 +631,9 @@ def get_final_state(self, hru_index=1, basin_index=1): """ solution = self.solution if isinstance(solution, dict): - return get_states(solution, hru_index, basin_index) + return RVC.get_states(solution, hru_index, basin_index) else: - return zip(*[get_states(s, hru_index, basin_index) for s in solution]) + return zip(*[RVC.get_states(s, hru_index, basin_index) for s in solution]) @property def diagnostics(self): diff --git a/ravenpy/models/emulators/__init__.py b/ravenpy/models/emulators/__init__.py index d343407a..73326726 100644 --- a/ravenpy/models/emulators/__init__.py +++ b/ravenpy/models/emulators/__init__.py @@ -3,3 +3,30 @@ from .hbvec import * from .hmets import * from .mohyse import * + + +def get_model(name): + """Return the corresponding Raven emulated model instance. + + Parameters + ---------- + name : str + Model class name or model identifier. + + Returns + ------- + Raven model instance + """ + from ravenpy.models import emulators + + model_cls = getattr(emulators, name, None) + + if model_cls is None: + for m in [GR4JCN, MOHYSE, HMETS, HBVEC, BLENDED]: + if m.identifier == name: + model_cls = m + + if model_cls is None: + raise ValueError("Model {} is not recognized.".format(name)) + + return model_cls From 58b1518c46df35c3366e0b1dc31acf73eb651a44 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 7 Apr 2021 13:41:06 -0400 Subject: [PATCH 17/59] WIP --- ravenpy/config/rvs.py | 12 +- ravenpy/models/multimodel.py | 4 +- ravenpy/utilities/coords.py | 4 +- ravenpy/utilities/data_assimilation.py | 4 +- ravenpy/utilities/forecasting.py | 2 +- tests/test_base.py | 2 + tests/test_climatology_ESP_verfication.py | 2 +- tests/test_data_assimilation.py | 38 ++-- tests/test_emulators.py | 247 +-------------------- tests/test_hindcasting.py | 5 +- tests/test_routing_lievre_tutorial.py | 258 ++++++++++++++++++++++ tests/test_rv.py | 9 +- 12 files changed, 312 insertions(+), 275 deletions(-) create mode 100644 tests/test_routing_lievre_tutorial.py diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 86b120b6..05858aca 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -1,5 +1,6 @@ import collections import datetime as dt +from abc import ABC, abstractmethod from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent @@ -36,7 +37,7 @@ ) -class RV: +class RV(ABC): def __init__(self, **kwds): # TODO: find something better than this! self.is_ostrich_tmpl = False @@ -67,6 +68,15 @@ def get_extra_attributes(self, d): e[k] = v return e + @property + @abstractmethod + def tmpl(self): + pass + + @abstractmethod + def to_rv(self) -> str: + pass + ######### # R V C # diff --git a/ravenpy/models/multimodel.py b/ravenpy/models/multimodel.py index 19f0a277..d795d53b 100644 --- a/ravenpy/models/multimodel.py +++ b/ravenpy/models/multimodel.py @@ -1,7 +1,5 @@ from .base import Raven -from .emulators import GR4JCN # , HBVEC, HMETS, MOHYSE, get_model - -# from .rv import RV +from .emulators import get_model class RavenMultiModel(Raven): diff --git a/ravenpy/utilities/coords.py b/ravenpy/utilities/coords.py index 5ba37ae5..9a6e8383 100644 --- a/ravenpy/utilities/coords.py +++ b/ravenpy/utilities/coords.py @@ -1,3 +1,5 @@ +from dataclasses import astuple + import numpy as np import xarray as xr @@ -35,7 +37,7 @@ def param(model): model = models.get_model(model) return xr.IndexVariable( "param", - data=np.array(model.params._fields), + data=np.array(astuple(model.config.rvp.params)), attrs={ "standard_name": "parameter", "long_name": "{} model parameter name".format(model), diff --git a/ravenpy/utilities/data_assimilation.py b/ravenpy/utilities/data_assimilation.py index fc6ded76..1ead9421 100644 --- a/ravenpy/utilities/data_assimilation.py +++ b/ravenpy/utilities/data_assimilation.py @@ -74,7 +74,9 @@ def assimilate(model, ts, q_obs, keys, basin_states, hru_states, days): n_members = len(basin_states) # Run simulation with perturbed inputs - model(ts, hru_state=hru_states, basin_state=basin_states, nc_index=range(n_members)) + model( + ts, hru_states=hru_states, basin_states=basin_states, nc_index=range(n_members) + ) # Extract final states (n_states, n_members) f_hru_states, f_basin_states = model.get_final_state() diff --git a/ravenpy/utilities/forecasting.py b/ravenpy/utilities/forecasting.py index fbca56b4..0bd6786a 100644 --- a/ravenpy/utilities/forecasting.py +++ b/ravenpy/utilities/forecasting.py @@ -28,7 +28,7 @@ msg = gis_import_error_message.format(Path(__file__).stem) raise ImportError(msg) from e -from ravenpy.models import get_model +from ravenpy.models.emulators import get_model LOGGER = logging.getLogger("PYWPS") diff --git a/tests/test_base.py b/tests/test_base.py index d8665ccb..5800e9f4 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -11,6 +11,8 @@ has_singularity = False # ravenpy.raven_simg.exists() +pytestmark = pytest.mark.skip + class TestRaven: def test_gr4j(self): diff --git a/tests/test_climatology_ESP_verfication.py b/tests/test_climatology_ESP_verfication.py index 685e7a2e..8190dbc8 100644 --- a/tests/test_climatology_ESP_verfication.py +++ b/tests/test_climatology_ESP_verfication.py @@ -9,7 +9,7 @@ import datetime as dt import logging -from ravenpy.models import GR4JCN +from ravenpy.models.emulators import GR4JCN from ravenpy.utilities.forecasting import ( make_climpred_hindcast_object, make_ESP_hindcast_dataset, diff --git a/tests/test_data_assimilation.py b/tests/test_data_assimilation.py index 2385654d..4a971750 100644 --- a/tests/test_data_assimilation.py +++ b/tests/test_data_assimilation.py @@ -3,14 +3,17 @@ import matplotlib.pyplot as plt import numpy as np +import pytest import xarray as xr from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.rvs import RVC from ravenpy.models import GR4JCN -from ravenpy.models.rv import RVC from ravenpy.utilities.data_assimilation import assimilate, perturbation from ravenpy.utilities.testdata import get_local_testdata +# pytestmark = pytest.mark.skip + def test_perturbation(): ts = get_local_testdata( @@ -81,22 +84,22 @@ def test_simple(self): # Set model options - model.rvh.hrus = ( + model.config.rvh.hrus = ( GR4JCN.LandHRU( area=4250.6, elevation=843.0, latitude=54.4848, longitude=-123.3659 ), ) - model.rvp.params = model.params( + model.config.rvp.params = GR4JCN.Params( 0.1353389, -0.005067198, 576.8007, 6.986121, 1.102917, 0.9224778 ) # SALMON # ==== Initialization (just to get reasonable states) ==== # Set initialization run options - model.rvi.run_name = "init" - model.rvi.start_date = start_date + model.config.rvi.run_name = "init" + model.config.rvi.start_date = start_date # Richard: what is the end date policy for the init run ? - model.rvi.end_date = start_date + dt.timedelta(days=assim_days[0]) + model.config.rvi.end_date = start_date + dt.timedelta(days=assim_days[0]) # Run the model model([ts]) @@ -104,13 +107,15 @@ def test_simple(self): # Extract final model states hru_state, basin_state = model.get_final_state() xa = n_members * [getattr(hru_state, key) for key in assim_var] - hru_states = n_members * [hru_state] - basin_states = n_members * [basin_state] + # hru_states = n_members * [hru_state] + hru_states = {i: hru_state for i in range(n_members)} + # basin_states = n_members * [basin_state] + basin_states = {i: basin_state for i in range(n_members)} # === Create perturbed time series for full assimilation period ==== perturbed = {} for key, s in std.items(): - nc = model.rvt.var_cmds[key] + nc = model.config.rvt._var_cmds[key] with xr.open_dataset(nc.file_name_nc) as ds: da = ds.get(nc.var_name_nc).sel(time=slice(start_date, end_date)) @@ -135,11 +140,12 @@ def test_simple(self): # ==== Assimilation ==== q_assim = [] sd = start_date + for i, ndays in enumerate(assim_days): dates = [sd + dt.timedelta(days=x) for x in range(ndays)] - model.rvi.end_date = dates[-1] - model.rvi.run_name = f"assim_{i}" + model.config.rvi.end_date = dates[-1] + model.config.rvi.run_name = f"assim_{i}" # Perform the first assimilation step here [xa, model] = assimilate( @@ -151,7 +157,7 @@ def test_simple(self): # Update the start-time for the next loop sd += dt.timedelta(days=ndays) - model.rvi.start_date = sd + model.config.rvi.start_date = sd # Get new initial conditions and feed assimilated values hru_states, basin_states = model.get_final_state() @@ -163,10 +169,10 @@ def test_simple(self): q_assim = xr.concat(q_assim, dim="time") # ==== Reference run ==== - model.rvi.run_name = "ref" - model.rvi.start_date = start_date - model.rvi.end_date = end_date - model.rvc = RVC(soil0=None, soil1=15, basin_state=BasinIndexCommand()) + model.config.rvi.run_name = "ref" + model.config.rvi.start_date = start_date + model.config.rvi.end_date = end_date + model.config.rvc = RVC(soil0=None, soil1=15, basin_state=BasinIndexCommand()) model([ts]) # We can now plot everything! diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 472be28a..4f699c58 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -22,8 +22,7 @@ Sub, VegetationClassesCommand, ) -from ravenpy.config.importers import * -from ravenpy.models import ( # Sub, +from ravenpy.models import ( GR4JCN, GR4JCN_OST, HBVEC, @@ -1363,247 +1362,3 @@ def test_simple(self): np.testing.assert_almost_equal( hbvec.diagnostics["DIAG_NASH_SUTCLIFFE"], d["DIAG_NASH_SUTCLIFFE"], 4 ) - - -class TestRouting: - # importers = pytest.importorskip("ravenpy.config.importers") - - def test_lievre_tutorial(self): - """ - This test reproduces the Lievre tutorial setup: - - http://raven.uwaterloo.ca/files/RavenTutorial6.zip - - """ - - ############### - # Input files # - ############### - - routing_product_shp_path = get_local_testdata( - "raven-routing-sample/finalcat_hru_info.zip" - ) - - vic_streaminputs_nc_path = get_local_testdata( - "raven-routing-sample/VIC_streaminputs.nc" - ) - vic_temperatures_nc_path = get_local_testdata( - "raven-routing-sample/VIC_temperatures.nc" - ) - - observation_data_nc_path = get_local_testdata( - "raven-routing-sample/WSC02LE024.nc" - ) - - ######### - # Model # - ######### - - model = Raven(identifier="raven-lievre-routing") - - ####### - # RVI # - ####### - - model.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES # Numerical method used for simulation - - :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. - :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. - :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. - :PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. - :SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. - - :HydrologicProcesses - :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. - :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. - :EndHydrologicProcesses - - - # Output Options - # - #:WriteForcingFunctions - # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id routing - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} - """ - - streaminputs = xr.open_dataset(vic_streaminputs_nc_path) - - start = streaminputs.indexes["time"][0] - end = streaminputs.indexes["time"][-4] # to match the tutorial end date - - model.config.rvi.start_date = start.to_pydatetime() - model.config.rvi.end_date = end.to_pydatetime() - - # Raven will use 24h even though the NC inputs are 6h - model.config.rvi.time_step = "24:00:00" - - model.config.rvi.evaluation_metrics = "NASH_SUTCLIFFE PCT_BIAS KLING_GUPTA" - - ####### - # RVH # - ####### - - rvh_importer = RoutingProductShapefileImporter( - routing_product_shp_path, hru_aspect_convention="ArcGIS" - ) - rvh_config = rvh_importer.extract() - channel_profiles = rvh_config.pop("channel_profiles") - - gauge = [sb for sb in rvh_config["subbasins"] if sb.gauged] - assert len(gauge) == 1 - gauge = gauge[0] - - rvh_config.update( - { - "land_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( - "Land", "MANNINGS_N", 1.0 - ), - "lake_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( - "Lakes", "RESERVOIR_CREST_WIDTH", 1.0 - ), - } - ) - - for k, v in rvh_config.items(): - model.config.rvh.update(k, v) - - ####### - # RVP # - ####### - - # The labels used for the following commands ("Lake_Soil_Lake_HRU", "Soil_Land_HRU", etc) - # must correspond to the values of certain fields of the Routing Product: - # LAND_USE_C, VEG_C, SOIL_PROF - - model.config.rvp.tmpl = """ - {soil_classes} - - {soil_profiles} - - {vegetation_classes} - - {land_use_classes} - - {avg_annual_runoff} - - {channel_profiles} - """ - - model.config.rvp.avg_annual_runoff = 594 - model.config.rvp.soil_classes = [SoilClassesCommand.Record("AQUIFER")] - model.config.rvp.soil_profiles = [ - SoilProfilesCommand.Record("Lake_Soil_Lake_HRU", ("AQUIFER",), (5,)), - SoilProfilesCommand.Record("Soil_Land_HRU", ("AQUIFER",), (5,)), - ] - model.config.rvp.vegetation_classes = [ - VegetationClassesCommand.Record("Veg_Land_HRU", 25, 5.0, 5.0), - VegetationClassesCommand.Record("Veg_Lake_HRU", 0, 0, 0), - ] - model.config.rvp.land_use_classes = [ - LandUseClassesCommand.Record("Landuse_Land_HRU", 0, 1), - LandUseClassesCommand.Record("Landuse_Lake_HRU", 0, 0), - ] - model.config.rvp.channel_profiles = channel_profiles - - ####### - # RVT # - ####### - - streaminputs_importer = RoutingProductGridWeightImporter( - vic_streaminputs_nc_path, routing_product_shp_path - ) - - temperatures_importer = RoutingProductGridWeightImporter( - vic_temperatures_nc_path, routing_product_shp_path - ) - - model.config.rvt.add_nc_variable( - name="StreamInputs", - data_type="PRECIP", - file_name_nc=vic_streaminputs_nc_path.name, - var_name_nc="Streaminputs", - dim_names_nc=("lon_dim", "lat_dim", "time"), - scale=4.0, - offset=0, - grid_weights=streaminputs_importer.extract(), - ) - - model.config.rvt.add_nc_variable( - name="AverageTemp", - data_type="TEMP_AVE", - file_name_nc=vic_temperatures_nc_path.name, - var_name_nc="Avg_temp", - dim_names_nc=("lon_dim", "lat_dim", "time"), - grid_weights=temperatures_importer.extract(), - ) - - model.config.rvt.add_nc_variable( - is_observation=True, - data_type="HYDROGRAPH", - subbasin_id=gauge.subbasin_id, - units="m3/s", - file_name_nc=observation_data_nc_path.name, - var_name_nc="Q", - dim_names_nc=("nstations", "time"), - index=1, # StationIdx - ) - - ############# - # Run model # - ############# - - model( - [ - vic_streaminputs_nc_path, - vic_temperatures_nc_path, - observation_data_nc_path, - ], - ) - - ########## - # Verify # - ########## - - assert len(model.hydrograph.time) == (end - start).days + 1 - - assert model.hydrograph.basin_name.item() == gauge.name - - csv_lines = model.outputs["diagnostics"].read_text().split("\n") - assert csv_lines[1].split(",")[:-1] == [ - "HYDROGRAPH_ALL", - observation_data_nc_path.name, - "0.311049", - "-11.9514", - "0.471256", - ] - - for d, q_sim in [ - (0, 85.97869699520872), - (1000, 78.9516829670743), - (2000, 70.29412760595676), - (3000, 44.711237489482755), - (4000, 129.98874279175033), - ]: - assert model.hydrograph.q_sim[d].item() == pytest.approx(q_sim) diff --git a/tests/test_hindcasting.py b/tests/test_hindcasting.py index 793369fe..4097ed5c 100644 --- a/tests/test_hindcasting.py +++ b/tests/test_hindcasting.py @@ -46,7 +46,7 @@ def test_hindcasting_GEPS(self): # data provided in the testdata above. Then the dates will not work, and the model errors. model = GR4JCN() - model.rvc.parse(rvc.read_text()) + model.config.rvc.set_from_solution(rvc.read_text()) # And run the model with the forecast data. model( @@ -58,7 +58,8 @@ def test_hindcasting_GEPS(self): params=(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), overwrite=True, pr={ - "linear_transform": (1000.0, 0.0), + "scale": 1.0, + "offset": 0.0, "time_shift": -0.25, "deaccumulate": True, }, diff --git a/tests/test_routing_lievre_tutorial.py b/tests/test_routing_lievre_tutorial.py new file mode 100644 index 00000000..79b33348 --- /dev/null +++ b/tests/test_routing_lievre_tutorial.py @@ -0,0 +1,258 @@ +import pytest +import xarray as xr + +from ravenpy.config.commands import ( + LandUseClassesCommand, + SBGroupPropertyMultiplierCommand, + SoilClassesCommand, + SoilProfilesCommand, + VegetationClassesCommand, +) +from ravenpy.config.importers import ( + RoutingProductGridWeightImporter, + RoutingProductShapefileImporter, +) +from ravenpy.models import Raven +from ravenpy.utilities.testdata import get_local_testdata + + +class TestRouting: + def test_lievre_tutorial(self): + """ + This test reproduces the Lievre tutorial setup: + + http://raven.uwaterloo.ca/files/RavenTutorial6.zip + + """ + + ############### + # Input files # + ############### + + routing_product_shp_path = get_local_testdata( + "raven-routing-sample/finalcat_hru_info.zip" + ) + + vic_streaminputs_nc_path = get_local_testdata( + "raven-routing-sample/VIC_streaminputs.nc" + ) + vic_temperatures_nc_path = get_local_testdata( + "raven-routing-sample/VIC_temperatures.nc" + ) + + observation_data_nc_path = get_local_testdata( + "raven-routing-sample/WSC02LE024.nc" + ) + + ######### + # Model # + ######### + + model = Raven(identifier="raven-lievre-routing") + + ####### + # RVI # + ####### + + model.config.rvi.tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES # Numerical method used for simulation + + :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. + :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. + :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. + :PotentialMeltMethod POTMELT_NONE # Estimation of the potential snow melt. In this routing model, snow melt processes are not relevant, thus using DEFAULT POTMELT_NONE method. + :SoilModel SOIL_ONE_LAYER # In this routing model, use DEFAULT SOIL_ONE_LAYER to define single soil layer structure. + + :HydrologicProcesses + :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. + :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. + :EndHydrologicProcesses + + + # Output Options + # + #:WriteForcingFunctions + # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:NoisyMode + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + + :NetCDFAttribute model_id routing + + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + + streaminputs = xr.open_dataset(vic_streaminputs_nc_path) + + start = streaminputs.indexes["time"][0] + end = streaminputs.indexes["time"][-4] # to match the tutorial end date + + model.config.rvi.start_date = start.to_pydatetime() + model.config.rvi.end_date = end.to_pydatetime() + + # Raven will use 24h even though the NC inputs are 6h + model.config.rvi.time_step = "24:00:00" + + model.config.rvi.evaluation_metrics = "NASH_SUTCLIFFE PCT_BIAS KLING_GUPTA" + + ####### + # RVH # + ####### + + rvh_importer = RoutingProductShapefileImporter( + routing_product_shp_path, hru_aspect_convention="ArcGIS" + ) + rvh_config = rvh_importer.extract() + channel_profiles = rvh_config.pop("channel_profiles") + + gauge = [sb for sb in rvh_config["subbasins"] if sb.gauged] + assert len(gauge) == 1 + gauge = gauge[0] + + rvh_config.update( + { + "land_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( + "Land", "MANNINGS_N", 1.0 + ), + "lake_subbasin_property_multiplier": SBGroupPropertyMultiplierCommand( + "Lakes", "RESERVOIR_CREST_WIDTH", 1.0 + ), + } + ) + + for k, v in rvh_config.items(): + model.config.rvh.update(k, v) + + ####### + # RVP # + ####### + + # The labels used for the following commands ("Lake_Soil_Lake_HRU", "Soil_Land_HRU", etc) + # must correspond to the values of certain fields of the Routing Product: + # LAND_USE_C, VEG_C, SOIL_PROF + + model.config.rvp.tmpl = """ + {soil_classes} + + {soil_profiles} + + {vegetation_classes} + + {land_use_classes} + + {avg_annual_runoff} + + {channel_profiles} + """ + + model.config.rvp.avg_annual_runoff = 594 + model.config.rvp.soil_classes = [SoilClassesCommand.Record("AQUIFER")] + model.config.rvp.soil_profiles = [ + SoilProfilesCommand.Record("Lake_Soil_Lake_HRU", ("AQUIFER",), (5,)), + SoilProfilesCommand.Record("Soil_Land_HRU", ("AQUIFER",), (5,)), + ] + model.config.rvp.vegetation_classes = [ + VegetationClassesCommand.Record("Veg_Land_HRU", 25, 5.0, 5.0), + VegetationClassesCommand.Record("Veg_Lake_HRU", 0, 0, 0), + ] + model.config.rvp.land_use_classes = [ + LandUseClassesCommand.Record("Landuse_Land_HRU", 0, 1), + LandUseClassesCommand.Record("Landuse_Lake_HRU", 0, 0), + ] + model.config.rvp.channel_profiles = channel_profiles + + ####### + # RVT # + ####### + + streaminputs_importer = RoutingProductGridWeightImporter( + vic_streaminputs_nc_path, routing_product_shp_path + ) + + temperatures_importer = RoutingProductGridWeightImporter( + vic_temperatures_nc_path, routing_product_shp_path + ) + + model.config.rvt.add_nc_variable( + name="StreamInputs", + data_type="PRECIP", + file_name_nc=vic_streaminputs_nc_path.name, + var_name_nc="Streaminputs", + dim_names_nc=("lon_dim", "lat_dim", "time"), + scale=4.0, + offset=0, + grid_weights=streaminputs_importer.extract(), + ) + + model.config.rvt.add_nc_variable( + name="AverageTemp", + data_type="TEMP_AVE", + file_name_nc=vic_temperatures_nc_path.name, + var_name_nc="Avg_temp", + dim_names_nc=("lon_dim", "lat_dim", "time"), + grid_weights=temperatures_importer.extract(), + ) + + model.config.rvt.add_nc_variable( + is_observation=True, + data_type="HYDROGRAPH", + subbasin_id=gauge.subbasin_id, + units="m3/s", + file_name_nc=observation_data_nc_path.name, + var_name_nc="Q", + dim_names_nc=("nstations", "time"), + index=1, # StationIdx + ) + + ############# + # Run model # + ############# + + model( + [ + vic_streaminputs_nc_path, + vic_temperatures_nc_path, + observation_data_nc_path, + ], + ) + + ########## + # Verify # + ########## + + assert len(model.hydrograph.time) == (end - start).days + 1 + + assert model.hydrograph.basin_name.item() == gauge.name + + csv_lines = model.outputs["diagnostics"].read_text().split("\n") + assert csv_lines[1].split(",")[:-1] == [ + "HYDROGRAPH_ALL", + observation_data_nc_path.name, + "0.311049", + "-11.9514", + "0.471256", + ] + + for d, q_sim in [ + (0, 85.97869699520872), + (1000, 78.9516829670743), + (2000, 70.29412760595676), + (3000, 44.711237489482755), + (4000, 129.98874279175033), + ]: + assert model.hydrograph.q_sim[d].item() == pytest.approx(q_sim) diff --git a/tests/test_rv.py b/tests/test_rv.py index db39d037..067098a2 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -6,10 +6,13 @@ import pytest import ravenpy -from ravenpy.config.commands import GriddedForcingCommand, RainCorrection -from ravenpy.models.rv import RV, RVC, RVH, RVI, RVP, Ost, RVFile, isinstance_namedtuple +from ravenpy.config.commands import GriddedForcingCommand, RainCorrectionCommand + +# from ravenpy.models.rv import RV, RVC, RVH, RVI, RVP, Ost, RVFile, isinstance_namedtuple from ravenpy.utilities.testdata import get_local_testdata +pytestmark = pytest.mark.skip + class TestRVFile: def test_simple_rv(self): @@ -246,5 +249,5 @@ def test_isinstance_namedtuple(): class TestBaseValueCommand: def test_raincorrection(self): - rc = RainCorrection(3) + rc = RainCorrectionCommand(3) assert f"{rc}" == ":RainCorrection 3" From 094b82b746da332b8731c36fce4d4443e17d4e50 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 7 Apr 2021 21:22:50 -0400 Subject: [PATCH 18/59] WIP --- ravenpy/config/rvs.py | 154 ++++++++++++------------- ravenpy/utilities/data_assimilation.py | 4 +- tests/test_data_assimilation.py | 15 ++- 3 files changed, 86 insertions(+), 87 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 05858aca..a435b2f9 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -38,7 +38,9 @@ class RV(ABC): - def __init__(self, **kwds): + def __init__(self, config, **kwds): + # Each RV has a reference to their parent object in order to access sibling RVs. + self._config = config # TODO: find something better than this! self.is_ostrich_tmpl = False @@ -91,12 +93,30 @@ class RVC(RV): {basin_states} """ - def __init__(self, tmpl=None): - super().__init__() + def __init__(self, config): + super().__init__(config) self.hru_states = {} self.basin_states = {} - self.tmpl = tmpl or RVC.tmpl + def reset(self, **kwargs): + self.hru_states = {} + self.basin_states = {} + + @property + def hru_state(self): + return self.hru_states.get(1, None) + + @hru_state.setter + def hru_state(self, value): + self.hru_states[1] = value + + @property + def basin_state(self): + return self.basin_states.get(1, None) + + @basin_state.setter + def basin_state(self, value): + self.basin_states[1] = value @staticmethod def parse_solution(solution_str): @@ -226,8 +246,8 @@ class RVH(RV): {reservoirs} """ - def __init__(self, tmpl=None): - super().__init__() + def __init__(self, config): + super().__init__(config) self.hrus = () self.subbasins = () self.land_subbasin_ids = () @@ -235,7 +255,6 @@ def __init__(self, tmpl=None): self.lake_subbasin_ids = () self.lake_subbasin_property_multiplier = None self.reservoirs = () - self.tmpl = tmpl or RVH.tmpl def to_rv(self): d = { @@ -304,8 +323,8 @@ class RVI(RV): "366_DAY", ) - def __init__(self, tmpl=None): - super().__init__() + def __init__(self, config): + super().__init__(config) self.name = None self.area = None self.elevation = None @@ -328,8 +347,6 @@ def __init__(self, tmpl=None): self._suppress_output = False self._calendar = "standard" - self.tmpl = tmpl or RVI.tmpl - @property def start_date(self): return self._start_date @@ -531,8 +548,8 @@ class RVP(RV): tmpl = """ """ - def __init__(self, tmpl=None): - super().__init__() + def __init__(self, config): + super().__init__(config) # Model specific params and derived params self.params = None @@ -545,8 +562,6 @@ def __init__(self, tmpl=None): self.channel_profiles: Tuple[ChannelProfileCommand] = () self.avg_annual_runoff: float = None - self.tmpl = tmpl or RVP.tmpl - def to_rv(self): d = { "params": self.params, @@ -576,48 +591,35 @@ class RVT(RV): {observed_data} """ - # Map CF-Convention standard name to Raven Forcing name - forcing_names = { - "tasmin": "TEMP_MIN", - "tasmax": "TEMP_MAX", - "tas": "TEMP_AVE", - "rainfall": "RAINFALL", - "pr": "PRECIP", - "prsn": "SNOWFALL", - "evspsbl": "PET", - "water_volume_transport_in_river_channel": "HYDROGRAPH", + NC_VARS = { + "tasmin": {"name": "TEMP_MIN", "alts": ["tasmin", "tmin"]}, + "tasmax": {"name": "TEMP_MAX", "alts": ["tasmax", "tmax"]}, + "tas": {"name": "TEMP_AVE", "alts": ["tas", "t2m"]}, + "rainfall": {"name": "RAINFALL", "alts": ["rainfall", "rain"]}, + "pr": { + "name": "PRECIP", + "alts": ["pr", "precip", "prec", "precipitation", "tp"], + }, + "prsn": { + "name": "SNOWFALL", + "alts": ["prsn", "snow", "snowfall", "solid_precip"], + }, + "evspsbl": {"name": "PET", "alts": ["pet", "evap", "evapotranspiration"]}, + "water_volume_transport_in_river_channel": { + "name": "HYDROGRAPH", + "alts": [ + "qobs", + "discharge", + "streamflow", + "dis", + ], + }, } - alternate_nc_names = { - "tasmin": ["tasmin", "tmin"], - "tasmax": ["tasmax", "tmax"], - "tas": ["tas", "t2m"], - "rainfall": ["rainfall", "rain"], - "pr": ["pr", "precip", "prec", "precipitation", "tp"], - "prsn": ["prsn", "snow", "snowfall", "solid_precip"], - "evspsbl": ["pet", "evap", "evapotranspiration"], - "water_volume_transport_in_river_channel": [ - "qobs", - "discharge", - "streamflow", - "dis", - ], - } + def __init__(self, config): + super().__init__(config) - def __init__(self, rvh, tmpl=None): - super().__init__() - - self._rvh = rvh - self._var_cmds = { - "pr": {}, - "rainfall": {}, - "prsn": {}, - "tasmin": {}, - "tasmax": {}, - "tas": {}, - "evspsbl": {}, - "water_volume_transport_in_river_channel": {}, - } + self._var_cmds = {k: {} for k in RVT.NC_VARS.keys()} self.nc_index = 0 self.grid_weights = None @@ -631,8 +633,6 @@ def __init__(self, rvh, tmpl=None): self._nc_elevation = [] self._number_grid_cells = 0 - self.tmpl = tmpl or RVT.tmpl - def add_nc_variable(self, **kwargs): var_name = kwargs.get("name", kwargs["var_name_nc"]) is_obs_var = kwargs.pop("is_observation", False) @@ -656,6 +656,8 @@ def add_nc_variable(self, **kwargs): def configure_from_nc_data(self, fns): + self._var_cmds = {k: {} for k in RVT.NC_VARS.keys()} + for fn in fns: with xr.open_dataset(fn) as ds: try: @@ -667,15 +669,15 @@ def configure_from_nc_data(self, fns): pass # Check if any alternate variable name is in the file. - for var_name, alt_names in RVT.alternate_nc_names.items(): - for alt_name in alt_names: + for var_name in RVT.NC_VARS: + for alt_name in RVT.NC_VARS[var_name]["alts"]: if alt_name not in ds.data_vars: continue nc_var = ds[alt_name] self.add_nc_variable( name=var_name, file_name_nc=fn, - data_type=RVT.forcing_names[var_name], + data_type=RVT.NC_VARS[var_name]["name"], var_name_nc=alt_name, dim_names_nc=nc_var.dims, units=nc_var.attrs.get("units"), @@ -714,17 +716,17 @@ def to_rv(self): lat = ( self._nc_latitude[self.nc_index] if self._nc_latitude - else self._rvh.hrus[0].latitude + else self._config.rvh.hrus[0].latitude ) lon = ( self._nc_longitude[self.nc_index] if self._nc_longitude - else self._rvh.hrus[0].longitude + else self._config.rvh.hrus[0].longitude ) elev = ( self._nc_elevation[self.nc_index] if self._nc_elevation - else self._rvh.hrus[0].elevation + else self._config.rvh.hrus[0].elevation ) d["gauge"] = GaugeCommand( @@ -739,7 +741,7 @@ def to_rv(self): ) else: # Construct default grid weights applying equally to all HRUs - data = [(hru.hru_id, self.nc_index, 1.0) for hru in self._rvh.hrus] + data = [(hru.hru_id, self.nc_index, 1.0) for hru in self._config.rvh.hrus] gw = self.grid_weights or GridWeightsCommand( number_hrus=len(data), number_grid_cells=self._number_grid_cells, @@ -761,7 +763,7 @@ def to_rv(self): if isinstance(cmd, ObservationDataCommand): # Search for the gauged SB, not sure what should happen when there are # more than one (should it be even supported?) - for sb in self._rvh.subbasins: + for sb in self._config.rvh.subbasins: if sb.gauged: cmd.subbasin_id = sb.subbasin_id break @@ -785,10 +787,8 @@ class Ost(RV): tmpl = """ """ - def __init__(self, rvi, tmpl=None, identifier=None): - super().__init__() - - self._rvi = rvi + def __init__(self, config, identifier=None): + super().__init__(config) self._max_iterations = None self._random_seed = None @@ -799,8 +799,6 @@ def __init__(self, rvi, tmpl=None, identifier=None): # TODO: find something better than this self.identifier = identifier - self.tmpl = tmpl or Ost.tmpl - @property def max_iterations(self): return self._max_iterations @@ -827,8 +825,8 @@ def random_seed(self, value): def to_rv(self): # Get those from RVI (there's probably a better way to do this!) - self.run_name = self._rvi.run_name - self.run_index = self._rvi.run_index + self.run_name = self._config.rvi.run_name + self.run_index = self._config.rvi.run_index # Attributes a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) @@ -848,12 +846,12 @@ def to_rv(self): class Config: def __init__(self, identifier, **kwargs): - self.rvc = RVC() - self.rvh = RVH() - self.rvi = RVI() - self.rvp = RVP() - self.rvt = RVT(self.rvh) - self.ost = Ost(self.rvi, identifier=identifier) + self.rvc = RVC(self) + self.rvh = RVH(self) + self.rvi = RVI(self) + self.rvp = RVP(self) + self.rvt = RVT(self) + self.ost = Ost(self, identifier=identifier) self.identifier = identifier self.update(**kwargs) diff --git a/ravenpy/utilities/data_assimilation.py b/ravenpy/utilities/data_assimilation.py index 1ead9421..fc6ded76 100644 --- a/ravenpy/utilities/data_assimilation.py +++ b/ravenpy/utilities/data_assimilation.py @@ -74,9 +74,7 @@ def assimilate(model, ts, q_obs, keys, basin_states, hru_states, days): n_members = len(basin_states) # Run simulation with perturbed inputs - model( - ts, hru_states=hru_states, basin_states=basin_states, nc_index=range(n_members) - ) + model(ts, hru_state=hru_states, basin_state=basin_states, nc_index=range(n_members)) # Extract final states (n_states, n_members) f_hru_states, f_basin_states = model.get_final_state() diff --git a/tests/test_data_assimilation.py b/tests/test_data_assimilation.py index 4a971750..3f402f1e 100644 --- a/tests/test_data_assimilation.py +++ b/tests/test_data_assimilation.py @@ -6,7 +6,7 @@ import pytest import xarray as xr -from ravenpy.config.commands import BasinIndexCommand +from ravenpy.config.commands import BasinIndexCommand, HRUState from ravenpy.config.rvs import RVC from ravenpy.models import GR4JCN from ravenpy.utilities.data_assimilation import assimilate, perturbation @@ -107,10 +107,8 @@ def test_simple(self): # Extract final model states hru_state, basin_state = model.get_final_state() xa = n_members * [getattr(hru_state, key) for key in assim_var] - # hru_states = n_members * [hru_state] - hru_states = {i: hru_state for i in range(n_members)} - # basin_states = n_members * [basin_state] - basin_states = {i: basin_state for i in range(n_members)} + hru_states = n_members * [hru_state] + basin_states = n_members * [basin_state] # === Create perturbed time series for full assimilation period ==== perturbed = {} @@ -172,7 +170,12 @@ def test_simple(self): model.config.rvi.run_name = "ref" model.config.rvi.start_date = start_date model.config.rvi.end_date = end_date - model.config.rvc = RVC(soil0=None, soil1=15, basin_state=BasinIndexCommand()) + + model.config.rvc.hru_states = {} + model.config.rvc.basin_states = {} + model.config.rvc.soil0 = None + model.config.rvc.soil1 = 15 + model([ts]) # We can now plot everything! From 42a17e59dd6e19ad0f09ae7001c52ee885243848 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 8 Apr 2021 12:04:46 -0400 Subject: [PATCH 19/59] WIP --- ravenpy/config/rvs.py | 9 ++++++++- ravenpy/models/emulators/__init__.py | 7 +------ ravenpy/models/multimodel.py | 27 +++++++-------------------- ravenpy/utilities/coords.py | 6 +++--- tests/test_emulators.py | 9 ++++----- 5 files changed, 23 insertions(+), 35 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index a435b2f9..c31bbaa3 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -4,6 +4,7 @@ from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent +from typing import Tuple import cf_xarray import cftime @@ -656,7 +657,13 @@ def add_nc_variable(self, **kwargs): def configure_from_nc_data(self, fns): - self._var_cmds = {k: {} for k in RVT.NC_VARS.keys()} + # Important note: if the object at key `k` is a dict (as opposed to a `Command`), + # don't reset it because it contains initial user-defined config (for the future Command + # object at that particular key) + for k in RVT.NC_VARS: + v = self._var_cmds[k] + if not isinstance(v, dict): + self._var_cmds[k] = {} for fn in fns: with xr.open_dataset(fn) as ds: diff --git a/ravenpy/models/emulators/__init__.py b/ravenpy/models/emulators/__init__.py index 73326726..97fab5f9 100644 --- a/ravenpy/models/emulators/__init__.py +++ b/ravenpy/models/emulators/__init__.py @@ -19,12 +19,7 @@ def get_model(name): """ from ravenpy.models import emulators - model_cls = getattr(emulators, name, None) - - if model_cls is None: - for m in [GR4JCN, MOHYSE, HMETS, HBVEC, BLENDED]: - if m.identifier == name: - model_cls = m + model_cls = getattr(emulators, name.upper(), None) if model_cls is None: raise ValueError("Model {} is not recognized.".format(name)) diff --git a/ravenpy/models/multimodel.py b/ravenpy/models/multimodel.py index d795d53b..2e1b0958 100644 --- a/ravenpy/models/multimodel.py +++ b/ravenpy/models/multimodel.py @@ -3,19 +3,6 @@ class RavenMultiModel(Raven): - identifier = "raven-multi-model" - - # rvt = RV( - # pr=None, - # prsn=None, - # tasmin=None, - # tasmax=None, - # evspsbl=None, - # water_volume_transport_in_river_channel=None, - # ) - # rvi = RVI() - # rvh = RV(name=None, area=None, elevation=None, latitude=None, longitude=None) - def __init__(self, models, workdir=None): """Create multi-model raven instance. @@ -34,15 +21,15 @@ def __init__(self, models, workdir=None): for name in models: m = get_model(name)(workdir) - m.model_dir = m.name + m.model_dir = name self._models.append(m) def _rename_run_name(self, run_name=None): - rns = {m.rvi.run_name for m in self._models} + rns = {m.config.rvi.run_name for m in self._models} if (run_name is not None) or (len(rns) < len(self._models)): for m in self._models: - rn = run_name or m.rvi.run_name - m.rvi.run_name = rn + "_" + m.identifier + rn = run_name or m.config.rvi.run_name + m.config.rvi.run_name = rn + "_" + m.config.identifier def assign(self, key, value): """Assign key to all models, unless it's model parameters.""" @@ -82,14 +69,14 @@ def run(self, ts, overwrite=False, **kwds): p = {} for m in self._models: - p[m.identifier] = kwds.pop(m.identifier, None) + p[m.config.identifier] = kwds.pop(m.config.identifier, None) procs = [] for m in self._models: # Add params to kwds if passed in run. kw = kwds.copy() - if p[m.identifier]: - kw["params"] = p[m.identifier] + if p[m.config.identifier]: + kw["params"] = p[m.config.identifier] procs.extend(m.run(ts, **kw)) diff --git a/ravenpy/utilities/coords.py b/ravenpy/utilities/coords.py index 9a6e8383..b6c2f5c7 100644 --- a/ravenpy/utilities/coords.py +++ b/ravenpy/utilities/coords.py @@ -1,4 +1,4 @@ -from dataclasses import astuple +from dataclasses import fields import numpy as np import xarray as xr @@ -34,10 +34,10 @@ def param(model): model : str Model name. """ - model = models.get_model(model) + model_cls = models.get_model(model) return xr.IndexVariable( "param", - data=np.array(astuple(model.config.rvp.params)), + data=np.array([f.name for f in fields(model_cls.Params)]), attrs={ "standard_name": "parameter", "long_name": "{} model parameter name".format(model), diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 4f699c58..84b3f4b5 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -100,9 +100,9 @@ def test_simple(self): ) total_area_in_m2 = model.config.rvh.hrus[0].area * 1000 * 1000 - # model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) + model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) - # np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) + np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) assert model.config.rvi.suppress_output == "" @@ -653,7 +653,7 @@ def test_parallel_params(self): assert len(model.diagnostics) == 2 assert model.hydrograph.dims["params"] == 2 z = zipfile.ZipFile(model.outputs["rv_config"]) - # assert len(z.filelist) == 4 + assert len(z.filelist) == 10 def test_parallel_basins(self, input2d): ts = input2d @@ -676,7 +676,7 @@ def test_parallel_basins(self, input2d): model.hydrograph.basin_name[:], ["sub_001", "sub_001"] ) z = zipfile.ZipFile(model.outputs["rv_config"]) - # assert len(z.filelist) == 4 + assert len(z.filelist) == 10 class TestGR4JCN_OST: @@ -708,7 +708,6 @@ def test_simple(self): # Algorithm: DDS # :StartDate 1954-01-01 00:00:00 # :Duration 208 - a = model.calibrated_params opt_para = astuple(model.calibrated_params) opt_func = model.obj_func From 05a895d047d83a9c966a5cae3195bfc3f89e77e4 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 9 Apr 2021 19:48:31 -0400 Subject: [PATCH 20/59] Everything works except test_rv.py --- ravenpy/config/rvs.py | 67 +- ravenpy/data/OstRandomNumbers.txt | 16833 ------------------------ ravenpy/models/base.py | 106 +- ravenpy/models/emulators/blended.py | 5 +- ravenpy/models/emulators/gr4jcn.py | 5 +- ravenpy/models/emulators/hbvec.py | 4 +- ravenpy/models/emulators/hmets.py | 5 +- ravenpy/models/emulators/mohyse.py | 5 +- ravenpy/models/multimodel.py | 15 +- tests/test_base.py | 58 +- tests/test_blended.py | 6 +- tests/test_cli.py | 2 - tests/test_data_assimilation.py | 4 +- tests/test_emulators.py | 40 +- tests/test_routing_lievre_tutorial.py | 4 +- tests/test_rv.py | 6 +- 16 files changed, 224 insertions(+), 16941 deletions(-) delete mode 100644 ravenpy/data/OstRandomNumbers.txt diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index c31bbaa3..bf5ebd2d 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -1,7 +1,6 @@ import collections import datetime as dt from abc import ABC, abstractmethod -from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent from typing import Tuple @@ -10,6 +9,7 @@ import cftime import numpy as np import xarray as xr +from dataclasses import is_dataclass, replace from ravenpy.config.commands import ( AvgAnnualRunoffCommand, @@ -44,6 +44,8 @@ def __init__(self, config, **kwds): self._config = config # TODO: find something better than this! self.is_ostrich_tmpl = False + # There's probably a much better way than this also! + self.content = None def update(self, key, value): if hasattr(self, key): @@ -287,7 +289,7 @@ class RVI(RV): tmpl = """ """ - rain_snow_fraction_options = ( + RAIN_SNOW_FRACTION_OPTIONS = ( "RAINSNOW_DATA", "RAINSNOW_DINGMAN", "RAINSNOW_UBC", @@ -296,7 +298,7 @@ class RVI(RV): "RAINSNOW_HSPF", ) - evaporation_options = ( + EVAPORATION_OPTIONS = ( "PET_CONSTANT", "PET_PENMAN_MONTEITH", "PET_PENMAN_COMBINATION", @@ -313,7 +315,7 @@ class RVI(RV): "PET_OUDIN", ) - calendar_options = ( + CALENDAR_OPTIONS = ( "PROLEPTIC_GREGORIAN", "JULIAN", "GREGORIAN", @@ -472,11 +474,11 @@ def rain_snow_fraction(self, value): """ v = value.upper() - if v in RVI.rain_snow_fraction_options: + if v in RVI.RAIN_SNOW_FRACTION_OPTIONS: self._rain_snow_fraction = v else: raise ValueError( - f"Value should be one of {RVI.rain_snow_fraction_options}." + f"Value should be one of {RVI.RAIN_SNOW_FRACTION_OPTIONS}." ) @property @@ -487,10 +489,10 @@ def evaporation(self): @evaporation.setter def evaporation(self, value): v = value.upper() - if v in RVI.evaporation_options: + if v in RVI.EVAPORATION_OPTIONS: self._evaporation = v else: - raise ValueError(f"Value {v} should be one of {RVI.evaporation_options}.") + raise ValueError(f"Value {v} should be one of {RVI.EVAPORATION_OPTIONS}.") @property def ow_evaporation(self): @@ -500,10 +502,10 @@ def ow_evaporation(self): @ow_evaporation.setter def ow_evaporation(self, value): v = value.upper() - if v in RVI.evaporation_options: + if v in RVI.EVAPORATION_OPTIONS: self._ow_evaporation = v else: - raise ValueError(f"Value {v} should be one of {RVI.evaporation_options}.") + raise ValueError(f"Value {v} should be one of {RVI.EVAPORATION_OPTIONS}.") @property def calendar(self): @@ -512,10 +514,10 @@ def calendar(self): @calendar.setter def calendar(self, value): - if value.upper() in RVI.calendar_options: + if value.upper() in RVI.CALENDAR_OPTIONS: self._calendar = value else: - raise ValueError(f"Value should be one of {RVI.calendar_options}.") + raise ValueError(f"Value should be one of {RVI.CALENDAR_OPTIONS}.") def _dt2cf(self, date): """Convert datetime to cftime datetime.""" @@ -794,7 +796,7 @@ class Ost(RV): tmpl = """ """ - def __init__(self, config, identifier=None): + def __init__(self, config): super().__init__(config) self._max_iterations = None @@ -802,9 +804,8 @@ def __init__(self, config, identifier=None): self.lowerBounds = None self.upperBounds = None self.algorithm = None - - # TODO: find something better than this - self.identifier = identifier + # If there's an OstRandomNumbers.txt file this is its path + self.random_numbers_path = None @property def max_iterations(self): @@ -830,6 +831,10 @@ def random_seed(self, value): else: self._random_seed = None + @property + def identifier(self): + return self._config.identifier + def to_rv(self): # Get those from RVI (there's probably a better way to do this!) self.run_name = self._config.rvi.run_name @@ -852,14 +857,14 @@ def to_rv(self): class Config: - def __init__(self, identifier, **kwargs): + def __init__(self, **kwargs): self.rvc = RVC(self) self.rvh = RVH(self) self.rvi = RVI(self) self.rvp = RVP(self) self.rvt = RVT(self) - self.ost = Ost(self, identifier=identifier) - self.identifier = identifier + self.ost = Ost(self) + self.identifier = None self.update(**kwargs) def update(self, key=None, value=None, **kwargs): @@ -875,8 +880,32 @@ def _update_single(key, value): f"No field named `{key}` found in any RV* conf class" ) + identifier = kwargs.pop("identifier", None) + if identifier: + self.identifier = identifier + if key is None and value is None: for k, v in kwargs.items(): _update_single(k, v) else: _update_single(key, value) + + def set_rv_file(self, fn): + fn = Path(fn) + if fn.name == "OstRandomNumbers.txt": + self.ost.random_numbers_path = fn + else: + rvx = fn.suffixes[0][1:] # get first suffix: eg.g. .rvt[.tpl] + rvo = getattr(self, rvx, None) or self.ost + rvo.content = fn.read_text() + rvo.is_ostrich_tmpl = fn.suffixes[-1] == ".tpl" + if not self.identifier: + # Get the "true" stem if there are more than one suffixes + identifier = fn + while identifier.suffixes: + identifier = Path(identifier.stem) + self.identifier = identifier.as_posix() + # This is a sorry hack: I want to have rvi.run_name have a default of "run" + # because I don't want to burden the user with setting it.. but the problem + # is that externally supplied rv files might not have it (to be discussed) + self.rvi.run_name = None diff --git a/ravenpy/data/OstRandomNumbers.txt b/ravenpy/data/OstRandomNumbers.txt deleted file mode 100644 index e9e16423..00000000 --- a/ravenpy/data/OstRandomNumbers.txt +++ /dev/null @@ -1,16833 +0,0 @@ -16832 -2067261 -384717275 -2017463455 -888985702 -1138961335 -2001411634 -1688969677 -1074515293 -1188541828 -2077102449 -366694711 -1907424534 -448260522 -541959578 -1236480519 -328830814 -1184067167 -2033402667 -343865911 -475872100 -753283272 -1015853439 -953755623 -952814553 -168636592 -1744271351 -669331060 -927782434 -360607371 -529232563 -2081904114 -1611383427 -604985272 -1799881606 -1155500400 -800602979 -1749219598 -82656156 -1927577930 -2011454515 -828462531 -1833275016 -1905310403 -1423282804 -293742895 -2019415459 -1484062225 -1758739317 -1166783511 -1457288620 -598842305 -1634250293 -528829321 -1747066761 -407146696 -1031620330 -1807404079 -884168938 -1787987373 -965105540 -584824989 -120937804 -1082141766 -517654719 -766608236 -1630224099 -1580063467 -343911067 -1234808992 -152763936 -1260514187 -535763254 -174078107 -858017135 -341298340 -272379243 -1590285344 -344306046 -1430770104 -1578742469 -1764217798 -901816857 -2043818720 -1460293275 -1705955009 -931665166 -1193174685 -484635109 -2004287539 -632181131 -1466667008 -1455103190 -375542294 -284896725 -1518207912 -119683330 -1473033718 -1086215810 -270635523 -200870715 -189813921 -1189354452 -702488488 -2006410257 -1948964205 -673325744 -1494443365 -140900243 -1583405107 -672279725 -1093871208 -85890889 -459160639 -1204116002 -1839239933 -1225939013 -1398882173 -361714255 -1952762775 -91382324 -411911863 -1662887160 -792316062 -2057442634 -656665644 -661016775 -776031494 -1093131427 -537293504 -123186093 -214429343 -436408135 -1054870440 -1729979095 -977552932 -1482228574 -1005338018 -314733930 -480938949 -12468535 -1252753986 -1106567514 -871824778 -478120365 -2032651128 -597651820 -953121721 -1036241874 -24799148 -187452918 -162682677 -461069708 -1077583980 -1224356709 -574902609 -859221610 -1257556842 -223789720 -989958143 -1670696092 -1040533719 -1290877712 -1901903590 -2147035182 -1052583333 -1945277392 -986085416 -1006282813 -1161517966 -1006103332 -292464446 -2007359586 -724467532 -2041015481 -1590895636 -2011549102 -270702593 -1328116205 -704030517 -6004249 -2129165181 -1359187106 -1074137403 -1279795539 -327415621 -1021238533 -1266717307 -1712386038 -1643787219 -1902154725 -2072893833 -499445950 -1821989174 -1202724845 -2080384351 -1838530450 -39076467 -1775668534 -80808579 -940122349 -1599128664 -797613643 -899573327 -844032009 -1516486828 -1258195600 -221977191 -591554298 -1551284523 -1987503481 -2010359729 -1755747052 -267909537 -1629864247 -1974481844 -51555017 -1049260978 -1941031729 -496187726 -748109581 -2108458329 -1231476356 -2123209153 -40472272 -1612643052 -300666177 -267415448 -1915645012 -1170880860 -1601956559 -1081404674 -1014251357 -1944850860 -259813033 -843391280 -1485172760 -1096148239 -1848728907 -1793335153 -650930826 -912694764 -185208027 -1087505286 -468022185 -1963747981 -36145924 -1914156214 -1918456638 -1181238808 -1741813188 -157174812 -232179474 -262632919 -992575048 -555861840 -816080430 -2033217268 -1522832212 -530882138 -1889023728 -423559248 -1999474978 -1351846990 -115375670 -2088636096 -939171610 -652443820 -571781158 -2084085828 -1772228626 -248333292 -1176912523 -2044385191 -243553137 -293742377 -2010709433 -1190771239 -892107480 -2067076653 -1514349452 -1842539167 -841590029 -1276318261 -2014346391 -40098582 -1774486163 -1683535652 -2086653939 -1984797263 -1624110390 -1906171360 -861001574 -1108640732 -1356661352 -1573462865 -1076742897 -2120660257 -150850140 -1307599520 -1624972889 -1369806524 -1313553028 -753850436 -1958244199 -2023362318 -1246928381 -1979872041 -450282822 -171017326 -955078396 -1709823894 -1531505951 -281525515 -692856264 -1178895014 -1004373076 -1276822912 -1906081160 -1492493821 -1734652587 -68038037 -1053987655 -1925397129 -1865954107 -1386979208 -24560671 -474337273 -727249647 -1555382052 -2135196680 -1798859390 -1154985264 -732646815 -2071271454 -1149409508 -1510196191 -758158244 -1345129257 -1027070430 -499162424 -1351734986 -380408089 -459934704 -1328924575 -1405403225 -439369222 -1429735768 -1374526493 -1185177072 -1360223179 -1307547138 -744588615 -913641236 -1060177402 -729776255 -1070409768 -906459857 -621824781 -1353667965 -655731437 -2139668902 -1801566899 -1562932440 -185548976 -375384188 -1922576477 -1703896177 -688614094 -747704175 -1737250628 -783640184 -123365437 -1081180304 -1538232061 -1658106641 -2050511815 -134507649 -1517260099 -1369659415 -988575712 -2058498392 -1220921174 -815924333 -1557178636 -118129263 -1123633413 -2083064220 -1781932146 -126636760 -227731143 -661461447 -1807182857 -1461058078 -1675097148 -1994637913 -1659674121 -477860764 -1964504415 -2012113927 -1173781780 -965595118 -223227847 -136493220 -529013544 -548335428 -1021209119 -772356209 -1599642195 -838594572 -323796343 -321575303 -1647261669 -167693759 -930462649 -309824289 -1716464895 -1477660114 -1532642090 -49260865 -1146153960 -481292130 -1653414308 -495882376 -2058543072 -1971857934 -1048656234 -367033909 -1165874379 -1209892625 -142694932 -1681972072 -1577368643 -149160686 -830233553 -1534070712 -437790702 -669353892 -1311519858 -942100598 -487821255 -1866752186 -1915391079 -1197996223 -2063329336 -810218396 -146775945 -1552080859 -339137104 -455707790 -1154141328 -1580999992 -1051701213 -4388434 -741966240 -1936541198 -185760854 -1788934087 -1844142209 -2014113159 -415135652 -10534061 -952304173 -180614520 -1193844429 -1003604282 -1240604036 -913304329 -1840232394 -726361864 -1666798700 -2109059432 -596796242 -1605807804 -1384769979 -1548754514 -267831511 -318481265 -1185372531 -350335298 -1832677059 -445381692 -1549587649 -1385429574 -1897149444 -1700998299 -1376102429 -1902129660 -1651626378 -510913924 -1290699962 -1061942987 -339192292 -1383252506 -1814389567 -177665169 -1016226053 -773828180 -569255028 -429608211 -585181063 -1810506228 -1482379653 -1397039124 -1597844417 -688110784 -878507593 -1127042426 -1396287242 -1845865525 -913114113 -790755729 -1602729667 -1190128948 -834540878 -912837989 -444906955 -13133831 -1696965623 -170909954 -1297960839 -688934847 -1843632552 -2038242548 -83367292 -994738800 -414819705 -1142863773 -1017694043 -1824015993 -907733426 -551862494 -171065265 -1760789169 -1258907723 -1453210217 -772599788 -1398507154 -501220863 -1588180907 -1482255386 -1455967302 -2013770796 -1103491652 -715419672 -297487751 -534700841 -1645455639 -2026002254 -519176146 -567428061 -1936028547 -159570085 -1834827139 -74554253 -1050363970 -1151665450 -771107739 -2091443375 -876469529 -1233039130 -471464360 -1834324737 -220618427 -1377127867 -1956796950 -1321768492 -1392200476 -1879066067 -568875287 -489752165 -2107301851 -1121903433 -924577771 -186927505 -2069484621 -1182878335 -1380056066 -1778913662 -934583700 -852851742 -1573367716 -1625057301 -641035361 -2103338975 -1089839558 -1045426043 -1911788594 -780572944 -111870285 -1155688870 -1820734622 -1592305851 -2090712490 -1477387216 -1241012698 -1339235622 -756994747 -1117588001 -1409556145 -1518018958 -1238900746 -203396710 -1842022593 -749465399 -1273371338 -1877535411 -612943659 -265022154 -346258400 -2031729077 -133126192 -1921432417 -1803032580 -426829243 -1123706121 -1157583929 -1458736530 -1311545558 -1374040498 -1606993695 -1988687193 -430170843 -1451402499 -455054420 -910369973 -1914634983 -1375192633 -1643573817 -462990958 -1155778025 -1171679060 -2132402077 -2074607003 -1375406729 -946917995 -1996917695 -1321264549 -1512365063 -703167949 -541209402 -1513174369 -1420272009 -1230918858 -1343274855 -2072390721 -633577154 -1307305452 -977539307 -1253233199 -570765817 -51635170 -248908802 -112090858 -567891987 -1143298241 -1877346778 -1737556122 -1623110548 -134212395 -849893415 -1244889708 -2075633282 -1444208706 -1955543348 -1727316148 -1318559290 -1142233637 -1164416526 -330077371 -660114196 -638771770 -566387037 -1619407355 -171673407 -1244413528 -514926963 -18369731 -1649907396 -1684754508 -1097130261 -1173703485 -1797174700 -757687845 -2029067852 -503074204 -525028389 -141828400 -3070630 -68470882 -1886362629 -795624942 -1835213972 -133605543 -1387950086 -1309721688 -785028466 -1981384541 -101066558 -2113559176 -1062066005 -259272171 -343058234 -1933630290 -654253979 -930352413 -604571484 -1287797631 -1674589751 -2056751122 -1919325342 -749161407 -459145088 -942750345 -670700849 -327506040 -393427019 -225759220 -1879089938 -970075184 -357769464 -77169848 -2060996195 -251823255 -1850662195 -2073851864 -1568687438 -273036247 -1895133337 -28542655 -827549304 -1517054356 -59220461 -1033359466 -972291773 -1104758788 -537337954 -870257243 -2049847031 -1846384843 -1051357151 -664189341 -410257081 -1768253497 -10333246 -1872173762 -694022090 -1445579773 -1376746300 -1986251322 -292676239 -1271997243 -257957216 -1864929666 -1349068497 -661884053 -319987311 -727683889 -263752758 -486356298 -867540004 -1478367745 -540894425 -514323224 -608746593 -591894243 -822289197 -1157265534 -402439059 -1367260210 -1467326570 -1802943489 -1076960453 -1482156655 -1944079032 -172601719 -1814167783 -745108775 -1066035768 -407085855 -9065643 -2042406611 -1349297429 -214576883 -768629268 -1237970571 -1749814661 -1493945409 -361688339 -1517192563 -234581863 -1984879196 -853674674 -372000311 -884330560 -209401033 -1824947845 -1536984461 -17046264 -881233997 -1852557867 -1722156463 -499079375 -2103414090 -204813716 -2035322318 -395185563 -1864320817 -1853561589 -1411842941 -1297493684 -1427395350 -693826813 -311042881 -722504169 -1255028245 -675332881 -868656572 -917173298 -294001320 -2067797140 -738672579 -267071946 -437374192 -111521263 -1732127057 -571128267 -1848365026 -2120038127 -432129465 -10224101 -37773747 -1355689964 -279730278 -585079063 -96192228 -1795073452 -1949234708 -924702371 -133596058 -1228535691 -2091576379 -964384110 -1344652861 -1610217446 -335695428 -593517727 -190897374 -71596200 -726491080 -1691048365 -1651286157 -1235270518 -1467180477 -1495042085 -1613652695 -89866902 -712018073 -1108871827 -945707723 -983229014 -243374633 -1588592943 -1964893497 -2108964160 -1143043385 -1888949280 -1319795359 -442008850 -696806977 -1006535348 -1110906417 -781323501 -1989063549 -313135194 -1528270408 -1736329136 -328509669 -81550446 -523779136 -620469699 -53641261 -1753025534 -1771996745 -646076619 -932416301 -932598748 -1851501830 -1153211780 -990472285 -1721946098 -1258442114 -70170695 -390348662 -27420649 -1297347285 -1114351004 -692438741 -604036894 -892878089 -2133800234 -1951111585 -257119405 -668742071 -1766062546 -1841725435 -50098187 -186639285 -1520338375 -1566636619 -164659666 -1476069126 -562710538 -2105514425 -1145405709 -790339455 -1048863490 -1702901854 -1156896609 -644367525 -124960854 -2125550059 -729373768 -748261700 -370155068 -2083586164 -1964310366 -898216031 -1654278254 -2131320916 -1083403252 -244613451 -934570599 -632663235 -979454348 -1227072581 -1123406726 -420619458 -1982548329 -333498651 -179508687 -1935462021 -1375385838 -595802958 -2091552792 -567957401 -95227692 -616502429 -2095211075 -1923177666 -1070661465 -841764042 -2053471105 -479170798 -359925736 -1957895000 -449342019 -1538810481 -642193346 -90756400 -629425430 -248756888 -1853839554 -1788633402 -1085496708 -1069590091 -15050400 -1696486101 -701518288 -732644386 -2030447251 -64313080 -725661119 -626795720 -1148377505 -1345190946 -2063877453 -1432486227 -356850672 -1814901880 -198175172 -2130462954 -1696021447 -1482013098 -1678800180 -1954470974 -883795506 -1954166690 -64661612 -140987502 -902483473 -362731950 -1877293464 -841507724 -2040501773 -1546939868 -1981330894 -1346905076 -808489305 -1150714566 -1969469527 -1708889078 -852438968 -1078326039 -811240440 -144400277 -278934429 -94146802 -1777337022 -205798984 -1414852418 -338166095 -1315828703 -346414515 -360586588 -179932682 -471611398 -10625109 -335064262 -722929000 -1952711921 -1384162793 -2081197647 -475210793 -376114758 -1316364585 -763048701 -1934661470 -805427063 -1223220800 -811032869 -950721774 -1502521938 -626006893 -775463998 -145160743 -175184609 -127643426 -2114381076 -1990837423 -61864454 -373793230 -953149135 -1496988972 -2122727799 -540290182 -1096229358 -1064612293 -105061647 -539543295 -1428201431 -1356728298 -551140640 -923766969 -1592163820 -1851081120 -524789751 -426006828 -186279098 -1909126407 -1134352622 -1852183535 -1873209480 -921465340 -1563390863 -1447813396 -262542415 -1618957967 -1208743879 -163073733 -591096959 -307238891 -1213353649 -330066831 -482968416 -1909465699 -394382325 -1249201633 -1531712759 -1609863924 -836502115 -1663093543 -2113511496 -260708245 -856833835 -1928411710 -992409446 -2067556320 -986178133 -417093785 -708620687 -1991063794 -1718998204 -1105311537 -1237455809 -1688144315 -87558041 -561696892 -101551632 -1676263306 -119418949 -1324549545 -888718013 -934879606 -1531176590 -1188406129 -1943893003 -1340979610 -3430005 -1813519213 -582011020 -71201055 -527740006 -618818732 -223126303 -577326859 -801402067 -147106085 -658292898 -92987342 -1617645625 -627048355 -1099446656 -1450648604 -669243037 -1595863520 -1754913257 -1286702501 -448609017 -2104147749 -1798002294 -1782158321 -1780476338 -1428675468 -733933569 -75425815 -666320975 -1876891367 -525914386 -394450 -187070209 -172943455 -1115273794 -1169384742 -79021450 -968616304 -1608177068 -402800734 -1003480994 -1315986267 -847109016 -1692135949 -602957622 -2080906408 -2022807861 -518104170 -1878080252 -1180151758 -651633014 -1976950245 -735781331 -1065990691 -1796960363 -1450293180 -1138082810 -120943841 -1183605625 -718717214 -2032184970 -1352868902 -110781478 -35978797 -1252736372 -810529016 -1072398991 -2127076113 -607959582 -249502248 -1496203192 -1801025221 -1048884882 -2062437198 -848440559 -449059033 -1077632073 -2032655760 -675501844 -1560934066 -958615510 -1028556776 -1857859529 -632876523 -269218470 -6781061 -152658936 -1643262834 -1678750618 -1121482440 -291399361 -1286345167 -885347420 -119897877 -783957853 -1167461026 -2106864990 -222031547 -1505115590 -1267843117 -1306521885 -693030620 -1961812659 -1868927422 -1967360532 -622748465 -1845639424 -1408001900 -1165627007 -1347278715 -645789037 -393992921 -1146939546 -799734150 -31712477 -415656483 -174206090 -861543769 -1631377509 -1638072514 -344388258 -665023541 -1545754599 -1387867634 -2071434571 -1743433280 -1616257292 -915655741 -558224585 -1872029999 -425280996 -872122556 -1187907917 -12894860 -1975547320 -779140973 -1814537452 -515684717 -2016522974 -114707064 -1588793289 -1037141425 -111167276 -77634842 -1286215765 -857971653 -1724366013 -1127764226 -642677960 -1793212957 -744666301 -71826191 -296982523 -633268433 -413598899 -2099613801 -757865903 -726721364 -1266464259 -1754375596 -840168662 -1009723209 -1002195069 -1178281262 -1426461447 -30104621 -1309708102 -556688564 -1825928816 -844294882 -1639626045 -684780011 -732780604 -24895883 -1813278063 -823970264 -1493671192 -47890514 -1736984820 -611172422 -560612953 -1211141682 -1808243108 -2100827459 -1828463086 -488097832 -72730884 -469772245 -1312235343 -82355111 -1162881909 -307573216 -389902983 -1126828284 -2092169942 -202979216 -1267651876 -239818045 -1942560543 -421160860 -344473508 -2097820291 -679114391 -2147469379 -1907681371 -469952687 -49956743 -2104357271 -1024471254 -1911967979 -1648012992 -2057761185 -1715585007 -1721768027 -413086464 -2077053344 -1688870623 -1557198362 -449664145 -510331222 -87162036 -348491798 -913743617 -633411222 -665969975 -272601661 -1033497376 -1142661496 -1912991798 -1675469749 -1814491979 -1898903653 -1119217904 -886048455 -1164774887 -2058083404 -688668799 -1667131110 -1253423361 -1619334904 -1101473097 -1149304139 -1886743055 -746993783 -535110519 -2088462844 -174808893 -255435555 -285562532 -1971007926 -1794957307 -2144669340 -2092066132 -605728193 -1401252971 -1553010595 -932824527 -1351202189 -15623498 -591125952 -794524242 -515618248 -899378491 -1864390651 -879777980 -1003600265 -1173090317 -81594712 -1267757798 -2020049099 -1396231470 -908505521 -643561277 -1606736247 -1956725951 -128488299 -1281776058 -1401743749 -1211581853 -616262517 -210493738 -862687957 -1534392402 -1549467238 -1509165544 -615943291 -1287713297 -257188213 -1825198127 -1448506741 -1178173595 -1764385825 -1578362999 -1828916449 -1665318832 -859238073 -1534250483 -1311718252 -2129024909 -1149119249 -926780472 -700501213 -818534037 -321317177 -1603905281 -1621320623 -115713978 -1332127711 -1553418802 -1351108635 -590745067 -835440988 -1008601230 -1472446839 -1959958692 -774075111 -424457051 -2056464470 -1396532472 -1672478841 -938425104 -990819360 -1112784682 -137068651 -1610347773 -378617670 -433133629 -1854822920 -1136196588 -631465392 -174659870 -2045773288 -2098462946 -742798741 -895999976 -916263868 -41596839 -1185887798 -420493179 -2007660823 -1492390497 -2145569766 -45656738 -701133587 -709425620 -487187196 -1947540808 -372612482 -435670322 -1539349231 -1107030008 -55026848 -1418266126 -1877781629 -456162291 -203005047 -1701793493 -1856026105 -2030774060 -1262024649 -152294324 -1957679891 -1128972350 -1620265205 -1704656475 -582040698 -569999201 -52021940 -306901251 -1981089110 -1578208682 -1382794277 -555385705 -1403614073 -433862616 -1222005547 -1861112168 -1612889021 -139699866 -736021691 -810753917 -557342804 -2084322261 -1450990763 -2124942056 -1248085582 -2101596425 -1867572766 -674493610 -1795414404 -1237164031 -1079198763 -446727179 -540867541 -62483836 -46328269 -1250136869 -70355035 -1341067395 -1478832500 -1909580769 -180880168 -1363623071 -467473513 -1332152265 -1966097880 -876192771 -876534718 -181187006 -78198396 -20449608 -99178136 -439621680 -1377830080 -873988959 -344288433 -1134748413 -2061791931 -740856325 -462068969 -692294431 -326102371 -424282253 -1266118131 -231969594 -1030147053 -668357657 -1747667389 -1911966904 -1629945467 -1192062737 -1123477896 -1616773648 -1004116445 -1258592989 -458443173 -2030566822 -2073942877 -950859282 -1666135247 -1695823096 -295811488 -279036011 -1801435476 -1501589726 -2138188985 -550921997 -1544001362 -1985984433 -102040110 -1296178464 -797329280 -415251680 -1960616657 -1095074631 -984468427 -1746836101 -825411370 -2092019617 -1971434235 -369998082 -1592606109 -694697755 -2064063193 -259251113 -2136620075 -2099539038 -1648807809 -383864975 -577759237 -1625928172 -245378729 -911696063 -579909496 -1258109186 -917100740 -1222002661 -1812607166 -285622620 -833423295 -1456973331 -1742231023 -737276716 -429122622 -1013821328 -1159804398 -123453367 -411536167 -1791015429 -318035204 -130876245 -613795187 -1691751368 -581755696 -74937881 -1055548825 -246693908 -1541073046 -14417655 -1799359121 -964029593 -1828736583 -789794617 -481705812 -16233094 -99187689 -600178951 -476939498 -1513172282 -1385195800 -115593473 -1454283823 -1636826654 -880055708 -1376407467 -586452385 -1702778612 -1233051962 -687131784 -1604323769 -64913851 -85401081 -816892171 -643762726 -697522296 -143999899 -2139715971 -445171935 -171685397 -1445929458 -811451154 -1538386828 -2111791963 -1425288172 -1785708166 -1313179137 -912315340 -250679800 -1959966833 -910900898 -100473223 -731312419 -1118914352 -79217285 -2112531502 -969818263 -334665511 -463571884 -181983072 -572777776 -1654375378 -1616200337 -2105896703 -1127901114 -795870929 -1674550187 -1391798974 -1573472894 -1245300300 -386518438 -77355291 -882769402 -1888305938 -1244564600 -906510420 -1471637122 -1235946955 -2098638901 -1552590779 -319427956 -2064022639 -1725143682 -1313145227 -342389970 -1439535477 -721994837 -1284619909 -1953707272 -933157874 -511314277 -1576981892 -91487570 -33297738 -1289334346 -1732354992 -107064518 -1989541487 -1903388219 -1329391021 -655026559 -1030202591 -1601784823 -342521369 -1500474823 -579883440 -820185994 -168471065 -1109742709 -550235968 -751330194 -402726198 -1898238089 -670501991 -1280266928 -1807599603 -2022857159 -1346655656 -911454659 -817599762 -1798826428 -600992930 -1272582669 -1507277410 -1094329858 -1351970498 -43690979 -2022360426 -1587998713 -567604475 -606051351 -390118536 -454660261 -728190601 -190126754 -4687742 -1477468502 -459702853 -1727172112 -1045229885 -762444735 -373739496 -50041797 -1386376202 -627257064 -312251525 -1708831054 -2024713247 -329671967 -288940109 -755886096 -1811843467 -335035409 -237996629 -1394792889 -352594771 -1152934124 -618875187 -1171965488 -503946532 -153859556 -347246704 -1462285229 -824987535 -1411075713 -1287594570 -409227171 -1638425303 -1978745687 -847003967 -2074061053 -789559667 -827868456 -438591079 -1236388249 -925532571 -1201865576 -523552150 -1100483291 -1693503873 -2118819820 -1430880186 -1281406996 -1641369656 -2072362677 -162241646 -1638596279 -557372025 -427955961 -733102724 -1143799429 -1710878906 -2083223459 -163294725 -10342209 -2022814903 -636459064 -351442941 -1121480137 -252692840 -1433391761 -543775081 -1684868382 -863526932 -602659698 -1368665034 -1455883421 -603982829 -2131691281 -865676866 -229378437 -430244294 -538409809 -1705055052 -838473396 -434674958 -1990135659 -1152218788 -1481124917 -1783527642 -1172334268 -259581051 -1239437100 -627963800 -1452945242 -614132257 -914435917 -1531479087 -1977505914 -1484975626 -2077884395 -623959251 -720483256 -1649281806 -1907881613 -1687936334 -886988668 -1934549249 -1066812363 -574416138 -1273038101 -571788446 -59091597 -1015025865 -2077104934 -408460106 -1631265730 -1906886508 -2143075775 -1078822941 -572737766 -981927308 -1987922008 -454608430 -2004550631 -759001081 -478305187 -843987188 -763180281 -1998642883 -251728207 -253190459 -1206939706 -2052592827 -750337981 -906471483 -817222963 -1908416576 -2089124887 -564347359 -1698277561 -745815450 -58220611 -1408749692 -848865269 -1144709062 -1966695208 -178066232 -1314440953 -644820382 -1293677512 -1713501956 -1071668222 -582459765 -1170807329 -366121042 -855704239 -123160914 -1938729537 -457952428 -225066548 -974769869 -1951928967 -1109956797 -2000929337 -25454939 -471914020 -801825769 -825814658 -280146445 -1137146891 -1570822384 -1795335317 -2055432469 -1231560841 -1395664901 -2123598573 -143003271 -421774704 -2071415028 -1414974079 -235438875 -1356294351 -1847727999 -3459926 -168917813 -28301757 -1073743912 -1108843243 -465296435 -1249224318 -1912979554 -1469684841 -636214893 -542628238 -1737230904 -452138916 -1301618126 -2027415340 -646592431 -1011733997 -437770633 -332054209 -1672575757 -419808669 -1240519488 -1639789740 -1288518229 -900778455 -1771265482 -1240641260 -1538928097 -471481811 -2127623694 -1221218861 -1524182448 -1749462120 -2011239763 -1514092961 -1826662224 -285781256 -1352134900 -659311746 -36896502 -1644218778 -565432250 -604687775 -1094816821 -946423051 -120844828 -1666977781 -823906505 -422073679 -653836912 -363158285 -452771221 -1191350026 -2029846001 -696522565 -521390158 -1271105746 -306952666 -697737368 -1611231356 -196611622 -1621681868 -1892191399 -2122998217 -790238214 -1494789650 -1665944944 -644884222 -219152745 -365730610 -736164556 -1064402325 -871096765 -1127307756 -1560721258 -1676918748 -398014408 -16594851 -1884270294 -2136972596 -1581908544 -1289349148 -1981132206 -155039507 -851330338 -1772934452 -1373732639 -727774776 -1791290567 -647312276 -225267030 -49303549 -1863543948 -1681626188 -59063549 -543623129 -1278494765 -2087627120 -1161181154 -1787754989 -1354394946 -2136682869 -1007434149 -1184669295 -1415949728 -1600786089 -736668207 -939330094 -1168600761 -1935038312 -696559616 -1144106315 -426260967 -162625977 -1655596455 -664005006 -1607106030 -1729217891 -1068899186 -1287911947 -1448415116 -1785715867 -1442609844 -853273478 -71550080 -2098835887 -568367187 -540050053 -1355348549 -984019314 -641044851 -115353758 -1720361112 -389386176 -1030787623 -696999412 -2093306746 -2129374868 -588429221 -567722912 -449138363 -263447736 -1802302485 -1041024460 -948827111 -1871175602 -1097816146 -1963954445 -1358702725 -1523080524 -409294628 -624691455 -141734002 -564007091 -274360579 -530861144 -1536177570 -1488014756 -1616934777 -1564727901 -297090945 -308033340 -1680756110 -468048132 -252355563 -59744516 -1251217263 -1048667817 -561709390 -311605518 -1588809640 -1311952682 -1774122625 -2016003427 -2120098870 -1453037066 -9934578 -1614211627 -893902438 -22681054 -1095869059 -1451517941 -247804467 -878885336 -1033318086 -276818113 -1032445789 -648507963 -993825616 -99321746 -705791303 -1682247140 -1905469225 -1945120511 -496870096 -1479283936 -906931033 -2098428872 -170117023 -856071404 -1999135775 -2093313110 -88850969 -817101318 -2011412708 -125812282 -1403114926 -634633575 -1882704023 -1582459663 -1962071593 -1925863866 -1120468278 -426247803 -2088862276 -445611576 -1118280743 -167569057 -982079782 -255585232 -653700224 -213326716 -1231908969 -804201256 -2095919021 -936724206 -321114085 -338021684 -1036196673 -1412589588 -961487931 -2060696289 -1653754054 -1911026104 -850305396 -1726603434 -77393327 -1522040454 -108707314 -1682726448 -1371264193 -42792147 -1948076531 -786574355 -45853553 -1861519645 -2018904019 -1478224733 -284775388 -1626380600 -1406885184 -1724334018 -590024261 -1605756428 -521293547 -1794848316 -312857603 -1157765765 -219886888 -1967053776 -1909551314 -1833313630 -406812254 -1853104577 -173293198 -550953454 -2072699161 -1522560940 -266580928 -774769254 -1353500217 -2131358095 -1708270705 -1196862192 -183539495 -961775373 -449283042 -547584042 -1277566499 -1518645987 -1039958914 -220064665 -659984521 -606807692 -217039841 -1361375081 -1340211229 -2121636067 -1518903281 -1069331878 -2117715450 -49602772 -450133968 -1964195442 -1114172010 -1979053877 -1731786003 -1281484630 -798680647 -1652840379 -1587275908 -1304322722 -238920078 -1882814703 -1295174776 -1108214240 -631061249 -1972163057 -1881891201 -806262191 -226831567 -574673144 -1297570649 -573462458 -276923870 -662420041 -738403039 -31880460 -1091463117 -415294745 -536926465 -396812561 -1291988792 -1248472327 -11685052 -969657087 -1920747773 -1033639107 -1377250766 -1874876796 -1026757941 -1689610742 -1111476513 -1772992385 -199928923 -1540984953 -681322251 -600266753 -1952627712 -2116345777 -651828778 -972188499 -1516516317 -1753817223 -45528239 -688934541 -1838489610 -1500162234 -1768651058 -249690032 -357321586 -1139618890 -168036637 -250762254 -1198287564 -517446582 -1563416971 -1886610552 -667499509 -209675835 -1094118 -1208972050 -1850460083 -824439127 -783917045 -481600970 -401637247 -776107808 -228257178 -912597104 -691320054 -1129617308 -1722656076 -306140478 -2079679181 -724156495 -1108383916 -1335322134 -1554994988 -2072262973 -634000165 -1974400388 -830007672 -2032656039 -680190997 -914633598 -558936360 -949930542 -1089187596 -825318944 -538615835 -872766740 -1277290170 -1169351778 -1672479149 -943601660 -2093850172 -525317415 -704521088 -1808580105 -1322285097 -1484846123 -2048811121 -1615714649 -385389428 -429437044 -2003344588 -1963872850 -2134819207 -1897121620 -1233360331 -1574922273 -1982693036 -618105553 -1121628732 -602645358 -1127652654 -914971003 -1934734901 -2039581880 -1118683746 -498389537 -1246725059 -710122834 -1467844659 -1920530724 -1680663858 -1065052415 -1059741160 -1987791549 -409467664 -1385423860 -1801114246 -397644410 -240489406 -341222988 -1153421826 -225748113 -1692414589 -991092808 -1413657924 -1737141907 -1103849984 -295454655 -724194721 -1750848298 -1686413292 -1059025538 -697750830 -1837487190 -1832358470 -1533307310 -492195170 -217213946 -2140074169 -22954780 -1401414647 -2122815480 -2013944749 -1879636076 -1559081962 -2042558287 -1751032314 -484202910 -1182769887 -1704854177 -1757334565 -1179436764 -1519630738 -410799795 -152229460 -867510643 -984897418 -366953250 -1957722213 -1840278204 -1496290534 -1121498568 -562462657 -86862105 -1750002422 -354677242 -1793285869 -1970098285 -1539006549 -1790024575 -844621202 -681635344 -1567453510 -1009244821 -1551862541 -964833772 -312187507 -632880528 -336530505 -1743754984 -580685479 -1415153585 -1104912570 -974468381 -1179787445 -971075364 -2135409195 -1075631701 -624658261 -1731326091 -2141678234 -1212671471 -1749603067 -85168698 -1206198384 -330612208 -1059185067 -1231471086 -2034636263 -1749561060 -1526640696 -115563316 -947435124 -2098370210 -1331668436 -276834818 -1313206724 -1375970049 -1824702647 -1710908969 -441008653 -1066365174 -1648445203 -731996874 -1885131302 -1575548523 -1770658551 -1777370178 -763051876 -1988023695 -16178192 -1323933422 -1270956987 -2101727447 -1922175873 -1413395690 -1624742363 -1790323336 -1570930035 -1457142027 -282537401 -519755090 -1707805281 -1964415612 -519601906 -1280725440 -923876199 -1280508783 -1577489294 -29458396 -1186022762 -541349480 -1719981668 -454521809 -548711484 -899131370 -2005995298 -1417199233 -1126380154 -1002899973 -140700908 -380665409 -489744650 -1980997246 -34250434 -121426842 -711468844 -467914612 -155768570 -219790297 -343648839 -1122510290 -386605135 -1534471770 -735921567 -1275453496 -365142918 -1596243347 -1696214705 -435133010 -1098681035 -1467758339 -469750484 -946498216 -1384142983 -1748250977 -982912185 -1360880571 -1618916247 -507555839 -685940189 -904539427 -557412476 -1107815918 -378914336 -1124231797 -1402685873 -2013474392 -416796918 -14144312 -1500250614 -1106570071 -914800277 -1212826666 -62998138 -100267395 -1566928517 -775622058 -654191516 -2028020419 -78736949 -481975291 -250399353 -1541461398 -98998778 -1720119068 -616319962 -1175971853 -1266930030 -992654205 -1886253539 -1109632959 -853151365 -166680536 -1081092864 -68627981 -231758228 -1772685985 -1492715064 -1158116394 -1817941197 -1887852110 -59528345 -1912998560 -1789118683 -651679887 -617261109 -1961443953 -2114536621 -310114944 -159052539 -1726366105 -383572118 -2098162579 -2136981513 -1731776563 -1122826550 -1407019661 -1837005310 -175852251 -611284285 -293210747 -1665538611 -258096432 -2057249331 -1702789417 -1414651597 -1257934842 -134384779 -1599667656 -1266517599 -503377329 -1324682970 -983708341 -1856972581 -758327016 -2034196614 -802831258 -545199105 -1996119633 -793138397 -846041450 -929423363 -22413663 -896795816 -1407044866 -113142098 -1056213491 -680317135 -887151317 -373223698 -2118443046 -1540890509 -1241485590 -697196878 -1117150514 -499163077 -1362709957 -153152044 -1340994402 -252039149 -1184225359 -397168317 -828728943 -2015894206 -284421523 -2121422486 -76731061 -1128754027 -98394191 -148759947 -537464121 -843262365 -1465982002 -679625583 -1655088 -2047260252 -1320063130 -647468753 -707692322 -1420418768 -1550013724 -2104021158 -1817871004 -708118359 -2138371686 -1474094057 -1727464207 -1659503256 -1901100003 -1526050355 -931120364 -626622059 -377140725 -1379922778 -1686225893 -56894192 -590462029 -373388616 -595252578 -1431250720 -1066520993 -2119811489 -917991893 -1167225603 -297594276 -177582869 -1780493600 -1718797902 -2033803117 -631778120 -1135712072 -1078139568 -1972189637 -181137614 -1395550699 -204205559 -403962207 -1197004882 -434246678 -1234484640 -1143830813 -90866147 -326459612 -2133464446 -602489963 -663412536 -239397328 -1314020865 -26852307 -335157879 -148866272 -176984749 -317825348 -898793747 -626532831 -1024969376 -1693969845 -1360476636 -1272431643 -1116467075 -1897505686 -1245906652 -1987541914 -508819513 -449672637 -653056266 -127742845 -1637832562 -606482288 -1190425754 -1527992026 -1352530156 -859928397 -251624069 -650426740 -1030455950 -1565022242 -949112838 -230938350 -877898321 -1624426157 -770816388 -1489674412 -1593485758 -446572969 -96543718 -1260114941 -268086673 -312021705 -2141213608 -1993636877 -2015131245 -346237878 -1686815823 -1381913114 -778064693 -905368668 -1609564081 -92008108 -192045316 -37704571 -193048932 -1873093154 -1113857905 -994858436 -278058310 -401600298 -155105965 -1968289944 -1210990420 -1413466321 -664353933 -1029071178 -1913479355 -1279905660 -30735621 -1177506867 -1296106564 -1736389627 -1345181906 -1911942173 -1214291550 -1060983409 -1391434022 -1882175571 -1290701487 -1087573662 -1617217617 -2023452487 -614915117 -1187062055 -828877755 -222010196 -1146269333 -272882494 -1458490313 -1468343733 -1718532854 -1874108675 -1001850176 -1824115552 -433537892 -59336573 -837370203 -1220663030 -772265419 -73734665 -160450336 -1596820167 -653410210 -1781512359 -1661211239 -542399226 -35709867 -1027797156 -1975828071 -1202755736 -452085741 -407905901 -906676883 -2121897116 -1611386530 -657137393 -2147251277 -389524704 -1211544072 -2128760897 -1006836859 -1883434500 -974684720 -520829724 -441826096 -1920227793 -884269835 -1336279605 -467340909 -1250960484 -1027950458 -257407491 -1215636179 -37842895 -370376753 -1514478665 -1866738411 -1683874654 -1341809612 -1068371737 -1013011192 -428750528 -1202488411 -254121760 -1826930084 -492736982 -733513642 -1607647314 -89159844 -1713396149 -1440853620 -1401187768 -457143774 -1666404299 -1922812766 -1380238106 -543492648 -1232984245 -1696495812 -864731065 -1513170206 -1350304468 -2107495827 -87090771 -1298224590 -826830610 -175382533 -1306668447 -1008814507 -762026084 -1927406727 -1281529341 -1550138424 -2052370411 -1307159563 -673066531 -1432817768 -1634092965 -32101272 -507683107 -677449818 -2088278379 -1369472932 -1839578 -853016388 -45605744 -1991561076 -1486882190 -1909250838 -1078180792 -517557758 -1284468356 -1554039648 -1048249122 -2114637113 -1999083988 -1222929001 -201734370 -1820361624 -1765779406 -1377958749 -889045195 -2138860186 -1094378969 -29895428 -2088768645 -1019439006 -1086838076 -2139125597 -1260174352 -1266607350 -2011822386 -568819487 -1699405212 -370892984 -1600838494 -1617439042 -1449975168 -88222420 -990496510 -2129095673 -190966150 -1227514432 -2107145542 -642301717 -1912147797 -375246824 -1761383376 -508326537 -754159593 -711794957 -1653928509 -548123995 -1762621982 -1998224756 -1814202306 -1325336836 -1235815968 -2044624039 -2110387826 -1448277730 -1624153012 -475035667 -1727739370 -1989200503 -467437425 -725621249 -2104184277 -264444743 -1379129958 -1246202035 -509593054 -565674342 -378560725 -1623542661 -954284645 -1254152719 -992752928 -1398007353 -691000044 -46176532 -847376757 -1897091642 -729520085 -1059927872 -830892839 -1877272279 -485451429 -691792250 -475880892 -901050416 -2047146715 -1559330418 -1923390985 -360946604 -1935754300 -1992751697 -22812867 -1163766503 -142559045 -1545602910 -985914258 -277113954 -1709678182 -1230008014 -1067105276 -1202437635 -1548213175 -1906965173 -1317714783 -1980990017 -2060236278 -364800118 -129771041 -1365984382 -1499321844 -529118210 -159973243 -20769057 -1173190185 -1760076188 -13254291 -1574053196 -261017779 -1764204479 -677964424 -2147326833 -1659394396 -71489983 -1088785608 -511557569 -1371023242 -288095984 -1601062750 -1091542340 -1746795706 -146492605 -1084952773 -517609134 -461141 -1307945846 -1003223030 -1275352613 -817085984 -1753694170 -124860115 -432429686 -761071154 -910283746 -465417794 -1141421384 -397782237 -409464148 -1326330448 -755583676 -1024037821 -1069710489 -2038579586 -1452997664 -1495188811 -1932192930 -118864576 -597137122 -892527023 -528401266 -995197317 -1678663983 -1812891642 -771843458 -1571770726 -554250135 -1645441906 -1795191723 -1789531758 -1151780471 -556782039 -1249479494 -1906755292 -2085212110 -1374297377 -1629391754 -475742934 -729873957 -565003635 -1990890058 -946500899 -1429236164 -1567616653 -1603705575 -412345528 -361560227 -1511497826 -1159901219 -1750723914 -1743375051 -637602489 -241634093 -252624574 -286045099 -1491576907 -1356464518 -412757474 -842685708 -364042391 -279555234 -1938081849 -309678447 -1412782048 -2048679504 -1551111377 -1224922306 -1490956800 -1671744404 -1479644327 -521571629 -26121549 -938210055 -1671458111 -962885170 -1921772045 -1068709435 -246250537 -531787590 -2074569963 -752875449 -604023219 -663042364 -460367465 -12404114 -170030239 -1544976363 -1192957064 -1122046256 -1177520285 -1521622890 -1680643754 -727164487 -124097932 -507321887 -1048876219 -1916838157 -1896716052 -859429896 -463252350 -1254026075 -1011730867 -385164723 -947787403 -1576672422 -1332676221 -34808137 -904806575 -752401618 -1230280190 -1346600014 -2123763212 -762607297 -958435383 -148645934 -768731277 -804952187 -1831914456 -513214953 -1309388719 -1631269424 -1968971566 -1929593139 -1521333826 -1117312400 -1072497432 -1634090353 -2135685035 -1416707287 -1448178320 -2100852789 -106700749 -170643198 -1109560041 -1775102186 -1299615978 -589568609 -390064205 -1689002791 -1631062291 -635170882 -175804537 -1956838734 -2024032180 -1767880780 -188529568 -1078070051 -803817418 -2087204696 -503951927 -244533321 -1735309336 -368600245 -1721479767 -2010751585 -1899219903 -2139464360 -511313152 -1558074017 -134412201 -2060549210 -1329280948 -952513295 -1547844327 -2704131 -351173130 -881733954 -1665400578 -85659448 -864299046 -694677814 -1728914806 -269916885 -1007623731 -76006675 -1838900407 -1961976472 -327165219 -1107699413 -568298448 -1532237327 -1836343712 -1941276547 -315876558 -357734922 -1644106101 -819153558 -2143672036 -362763333 -257263898 -949752275 -240537774 -1154143964 -1625303244 -479632068 -1670039685 -745719505 -593156643 -564609527 -1809567843 -743328487 -1209506410 -94030368 -1967914431 -1342194370 -1092548502 -1477491264 -842263787 -1862750732 -1234946758 -320713451 -47016987 -2088002060 -1020346793 -1311628656 -623184937 -591489740 -466258217 -234025216 -1219247655 -606377911 -1583645162 -411916816 -1746132231 -1880370162 -1011963482 -2147241381 -223202632 -1860188362 -1118867108 -1432671024 -1315250204 -1361000057 -1479633802 -344677954 -1238976919 -1483636321 -1043021730 -157205649 -750456933 -758214100 -136417402 -1402224065 -694318277 -2128627388 -910434743 -855740726 -736397923 -691634200 -2114501836 -1872967096 -1142684746 -156270901 -72532826 -1435978733 -1073340545 -771905015 -458875578 -708063069 -1209112656 -2066141478 -829248756 -14973062 -396666335 -981852057 -723178451 -1850267584 -1884075728 -1014385481 -2051589281 -1063609535 -431577117 -1464329500 -823311880 -1165629539 -1389834039 -761065054 -807761046 -1795767435 -728105107 -900712743 -666843898 -2075723640 -815371965 -863464248 -1696613357 -692826233 -674163997 -550576007 -23914726 -355357893 -348085344 -524922180 -504257384 -1083381826 -2031990316 -228802771 -1492444067 -898437109 -1074968906 -222480931 -467977890 -1219281916 -1182202538 -759354122 -2116897980 -1342770011 -29928554 -498033680 -1708287401 -1477471864 -516207987 -73703629 -1786311931 -723239257 -724750379 -352374069 -1738562904 -1364226446 -2018462550 -500906191 -594455897 -926335035 -1803976142 -1252890248 -1249239301 -17315188 -1106072371 -1139890965 -445833868 -559375093 -1881265132 -1021338743 -803463130 -427653574 -2093335356 -462739491 -1224339450 -284830596 -406777809 -1274187462 -561745950 -926069438 -1635054657 -1162873187 -160982562 -1952007961 -290125308 -1348172866 -641399365 -1778703262 -1693358194 -1817876514 -800724929 -1651349601 -154090179 -2075843818 -687719964 -752446794 -1989553222 -2100618364 -461687068 -716135265 -1587041067 -1652317329 -1386309146 -1647730519 -1605204768 -1986962162 -1502345884 -1962034609 -1304273778 -1563801917 -1913947033 -550235218 -738724944 -1147170501 -386427541 -697133059 -44544581 -1336463711 -1414126804 -1027673479 -2044672379 -775354559 -453303117 -1540991510 -791525750 -1659570732 -887685488 -761101107 -1413703817 -360981911 -381675402 -284827825 -360205612 -219319991 -1029150485 -1098908457 -995072599 -1730012204 -1534015895 -1663965030 -1728207976 -1275126957 -1319452886 -1128516080 -394186256 -101353597 -495372708 -2082487584 -680345482 -1363579346 -1880071085 -280343637 -156385541 -1999287306 -345127333 -201755184 -22698875 -1395386606 -1741261802 -1627448545 -28483976 -1988814998 -430705831 -1853011227 -751843395 -438160817 -447425756 -1544432945 -649665326 -1118272734 -32961794 -2085574479 -1022182219 -2094862380 -357628095 -1996148359 -1275936279 -2036825858 -2042862226 -416884146 -1480185308 -1023904708 -979963945 -1201934772 -1686529322 -861658101 -1405471786 -1591673949 -60270164 -1495848611 -136549648 -1477398940 -1438057966 -1659271224 -148821826 -1577464474 -1759792303 -1684450037 -274853458 -224743909 -1994627137 -1478561889 -1656388986 -1099171641 -1123438793 -959569527 -2030334966 -324622732 -1325793344 -318411336 -10075828 -1840716730 -276662428 -563331641 -1806974311 -103509103 -215740051 -990641021 -262924756 -1602512213 -1830346864 -2083983620 -54418770 -1935717415 -1372825502 -513908746 -85065788 -1624073661 -1288867057 -321079710 -1907764706 -1870564032 -1556577391 -750422783 -184255050 -103206376 -1570258303 -904760538 -2126141406 -2078208209 -1771333855 -242302624 -751206856 -477268079 -593182208 -994280482 -1301803667 -850835633 -2048362105 -511553678 -1305627205 -688529389 -1471550887 -1934078957 -1752549307 -210500497 -976286470 -1671638210 -1842325416 -1544044266 -559588314 -1169903185 -202558363 -636826446 -83581274 -296166980 -1958822761 -1009835617 -743952678 -962866312 -1604825639 -2057392000 -1953143653 -50347929 -89085785 -468686536 -244593356 -596833934 -91813601 -1217933461 -2141039470 -1214383158 -453155418 -1206098064 -792017615 -1336411199 -531557620 -356947820 -1300184669 -1557623658 -1155163076 -1573649452 -2065226959 -491313452 -430565049 -1634371800 -423513823 -1236017003 -1128451990 -1464509273 -1697273044 -1042767407 -177766282 -568148597 -1161175217 -1687971830 -1483569940 -2074839910 -994907384 -1100727346 -1500368964 -948194874 -1982586578 -976349594 -585079631 -105738604 -1179741359 -196507962 -2026951895 -1447406904 -2020565959 -1493162902 -94995072 -1001825383 -1407419601 -2116345949 -654719582 -165807446 -1439454763 -1512918286 -1411252322 -2108378386 -2035358002 -994926551 -1422867115 -1897192460 -276484564 -1868938687 -9207740 -135663596 -1617908505 -750305221 -355874163 -435100646 -554739287 -1276684982 -1735375297 -1477206772 -355774037 -899766611 -1945072550 -1838273216 -10711923 -1794147160 -1413430593 -63873437 -1926515806 -1340205623 -2027416025 -658105226 -1233751332 -1704025139 -708594781 -1555661652 -391982939 -1724910424 -1687745315 -1971499629 -1469075040 -1124707721 -811605953 -1992609974 -1935841700 -1314199850 -887569555 -960098823 -188794603 -1237546002 -1056534419 -1779186737 -1229187931 -168872177 -1408781152 -1377613489 -1528711316 -556735304 -464004349 -1007971386 -1624076966 -1344414192 -1893874857 -352105765 -1524144870 -1117888674 -20516315 -1220322685 -1494537945 -1730506303 -1248403200 -997351210 -1371921635 -355001606 -802420676 -86998372 -1892758244 -912543897 -1944553652 -1707089118 -665282306 -1599850660 -47298533 -377494741 -887418749 -572986028 -859499448 -1632212814 -644658120 -714023725 -458126639 -1005547178 -1682602403 -1433923525 -891198041 -1814520909 -237646516 -1952894639 -160136925 -624288784 -1963977093 -1739347661 -1668735463 -300496821 -1716016450 -383095940 -537489874 -1276093036 -376473463 -902668579 -1326324845 -661414055 -1010665513 -1807112868 -284752955 -1249349169 -1863866664 -663063059 -808188330 -387195035 -711502835 -1039201349 -372571592 -1895915739 -293471187 -1747786397 -1764650713 -1735368321 -1359961140 -1198424959 -679160700 -778301095 -583609788 -1171891067 -1400636432 -1928257857 -554085722 -1029636262 -673427908 -1064030066 -1056990693 -857849267 -1814908158 -303689518 -1688583754 -1030758373 -205394662 -1061863505 -1150821965 -1627040873 -1766675260 -1402191398 -145284008 -99415817 -139358953 -1448747841 -935374001 -1250538767 -382603780 -855691342 -2053884682 -987708496 -368100962 -1919964974 -762038196 -2130973111 -1680295558 -1317485256 -270813375 -1042545632 -745361151 -1012751906 -365898020 -1402340779 -508446828 -628406783 -308225935 -622732981 -1585399836 -1985435323 -1610566575 -1908539237 -2003204667 -1759704250 -204543266 -1784836462 -1694835538 -877793358 -2007796663 -1627969730 -198105683 -962561331 -773977266 -927459783 -1380262955 -961129791 -336404603 -1775203717 -858563848 -939969143 -1171679069 -2132553340 -321916950 -946871857 -1221476329 -1556479830 -1258198703 -274129312 -938923969 -785308827 -250960927 -242417381 -532444108 -223766107 -593094452 -1666849037 -807589744 -1064178368 -1402018760 -1538724436 -1343518678 -1875356588 -500687497 -1213833133 -1946303478 -1051643642 -1184276284 -1253064792 -2035316662 -300125171 -1912145841 -342372332 -1143093611 -585614015 -497195904 -512688051 -1043681393 -506743455 -2064587830 -486890584 -1257350218 -1046027446 -1282150580 -1253884062 -772402023 -222154446 -1423195436 -972832566 -1603932151 -2072924713 -1018446110 -1579104180 -1401043634 -182167283 -1521328406 -1026218460 -1212488163 -816229158 -237921470 -131595576 -1966173069 -2139894294 -1294762949 -629088792 -1033332963 -526855852 -791227983 -949968057 -1719702201 -52487234 -1684646568 -1430466328 -768146531 -1714544400 -1412155354 -105768034 -1674371369 -533888495 -877258299 -1604994638 -602790899 -1426276594 -1218247544 -977381510 -748622667 -2141960143 -1655748740 -1075975354 -2105466938 -347291700 -71049354 -125584946 -1877246068 -44923152 -1256655567 -108446324 -1591234812 -1269629193 -1260330159 -1737771952 -955598064 -1853949382 -1487028951 -80895671 -256393946 -1360854540 -1181413230 -378356448 -337742769 -643439562 -1708555889 -1694982386 -1198384047 -2139036363 -1907902161 -2033286570 -540107279 -169662284 -1803207619 -1221226069 -1645327304 -2016559556 -729540738 -1407042843 -79141537 -839434866 -1561715719 -1210955599 -828229774 -68811764 -1173115462 -504206727 -231989627 -1366841684 -875611029 -1836615159 -61035335 -1471175726 -2071198971 -2078671374 -965813422 -1744779528 -620327311 -1955493439 -888495585 -1491499504 -55552297 -1659552881 -587663731 -587034364 -746681430 -1727844589 -1610132589 -1056987476 -803781148 -1477614806 -771150534 -663215293 -1219301521 -1511703773 -326285154 -1348832487 -990231277 -1966291936 -1990208316 -225881340 -1784077131 -1817661303 -1478640946 -837616338 -1062486681 -887122762 -2040783460 -1986285983 -875223666 -1768656159 -335422539 -302039598 -1875665725 -1401385762 -1637345285 -1006752337 -462873246 -1324876088 -2081958920 -385024222 -733870743 -1166992880 -681186109 -459611806 -196945183 -785390654 -1626227316 -978124643 -353557116 -147197363 -44918597 -1180099682 -1923875329 -2058865271 -944605586 -1786965278 -966624051 -336635602 -1362636616 -1067993504 -1098500102 -574301055 -1486321767 -1080156065 -1503716364 -1373371852 -1106478608 -1525065283 -1554884436 -214215509 -1137467391 -515014943 -1497049591 -994067685 -2020291782 -1180037357 -876379054 -1859909452 -726194032 -993529923 -1572060436 -1128438811 -1243009820 -545126724 -779612166 -1143943615 -1986729361 -1884626771 -1685830594 -2003038487 -1114200637 -312704219 -727324524 -666356144 -320493103 -638595445 -1897860056 -759352301 -2086292433 -203933215 -121643893 -64477707 -1345063461 -2068720705 -1228644005 -1764526130 -1788985487 -560538362 -2104974392 -659005666 -1335060883 -1459116725 -1259031982 -1394147583 -244355064 -886827584 -1374694108 -1854798730 -729635258 -848156836 -2122977513 -442266086 -725205135 -1553007220 -876100902 -1479976082 -1802410620 -710965758 -602482798 -542990381 -1381317364 -1502712678 -1684290426 -1887238675 -486944535 -16621028 -176743486 -557885401 -466331805 -1470818732 -366168107 -1646725694 -1896980169 -1003477021 -1249212056 -1706892120 -1649304214 -137009222 -611524570 -36713448 -715113847 -1599937917 -1513826932 -1650480115 -573024506 -1506199194 -152622722 -1034614136 -584693993 -66771679 -1245145219 -2075039365 -52180275 -820553949 -2057723456 -1081473704 -26954920 -2059774570 -1194808350 -24355353 -1318524941 -564929994 -753205771 -1860777779 -287780392 -591875300 -503914196 -1757872051 -1623029378 -917471852 -1016831104 -205502102 -720123938 -2052675121 -2133453239 -414133914 -354192671 -91552013 -1116391239 -622930034 -602302313 -1804546280 -97781379 -586646898 -676991309 -824568557 -811763408 -343988865 -394876331 -962025887 -364704546 -670976084 -658413391 -2118113193 -292018432 -953653229 -1379362242 -855231929 -774981332 -622927869 -565915158 -130987943 -343619826 -634888799 -1877286497 -724413355 -1130462642 -897799085 -1089117773 -1799287430 -1906602603 -1666451734 -572569164 -295717141 -840829629 -1381177343 -1296863378 -1571260643 -571219742 -1238301704 -872716051 -425360147 -54929766 -1934092599 -1981830401 -1152184637 -907149060 -1467841367 -1865202080 -1632563301 -92842188 -1325525994 -120027180 -809669727 -1662714297 -34491268 -2021640233 -221133197 -1438932669 -1328019016 -1218058641 -2097456083 -1000321476 -1901058416 -827097646 -368489291 -2004159536 -628318357 -969533800 -1996146811 -1249919043 -704320747 -588932565 -437490932 -2073570443 -1133811985 -1355632064 -1454088625 -503617515 -1066521778 -2133004984 -1470246717 -1489730237 -384252886 -654928473 -1529154836 -1568525003 -1837958496 -1163663824 -564316739 -1183647221 -1417821186 -842125990 -1694280200 -134162180 -5929910 -879749608 -526752061 -1194296293 -8147942 -1650991433 -576811544 -730437450 -1445695898 -1180975528 -1611833522 -1727280996 -727759626 -1536664517 -1082198397 -1469451936 -1016747852 -953769385 -1184112487 -647612260 -972130824 -547172592 -804777290 -1039904224 -1448373482 -1085973229 -488543950 -1128185169 -1275016020 -1602418374 -253194791 -1279747630 -1669692705 -1356477586 -632391350 -704850447 -901665877 -1653781507 -224945028 -1079866876 -938284135 -769037024 -1648674722 -294555413 -643019956 -1098688788 -1598063010 -67036041 -1393310059 -1200474725 -769839510 -103671395 -795898048 -2130339220 -1763907756 -2133391904 -1530760216 -632859252 -2126428420 -459601566 -24841503 -899313403 -770456635 -1885756682 -1348891948 -1989592304 -609985891 -2093422906 -1934192341 -1510710548 -813021755 -18190424 -783778294 -297096560 -402404645 -788864112 -2022577453 -940604208 -1107798289 -82623733 -1382644569 -186726996 -847013505 -86882572 -2093991291 -749620801 -1737729105 -235468535 -1854789971 -582422745 -548612189 -1377763952 -1910059310 -1781267814 -1846110718 -739105570 -1101900742 -1894282713 -764490616 -399123111 -1470696996 -467634802 -1895452841 -1103479089 -504273331 -1351403055 -1244094713 -1599054199 -1693564035 -982478907 -521228166 -695989849 -157966934 -660472046 -210705779 -131493750 -254783487 -63673891 -720229831 -1684935125 -1985276533 -1089266692 -7201769 -781047351 -1642777793 -2116601119 -648394478 -1233966868 -1031571397 -984987148 -1875045360 -1712329442 -692578247 -801230589 -1560042633 -1008686608 -759911238 -742928357 -926972441 -1779440549 -1200038921 -2035216270 -760320474 -1178506868 -923254195 -1563905790 -1512256897 -1032705634 -720755584 -1931331208 -668288451 -584522147 -1473523251 -723862353 -459706616 -1790416853 -995186607 -1498661013 -159949828 -1774716799 -1264867610 -689299617 -1531871001 -2121953571 -412742068 -583757066 -1499708766 -589665323 -2015536403 -713277443 -800266947 -396497068 -284465235 -708606423 -1751328746 -1171368240 -1203417631 -839136771 -846600348 -1732887461 -466336413 -1548265388 -637025417 -1280203224 -736926475 -985073076 -1171753609 -1237863473 -2097302222 -561863296 -750820013 -418048719 -1725810896 -1789592690 -28380948 -257223402 -269136003 -768241839 -1168902309 -560704607 -604086813 -1731866722 -490645216 -2084424479 -1021485042 -1114826776 -98804157 -596607568 -582247533 -1898791399 -1380048573 -1652978811 -1766418885 -1388264067 -144349414 -1571563635 -1368638992 -1018195527 -1662522993 -1114212234 -507614998 -1680225502 -140054064 -246576536 -1715885489 -329518060 -1997192454 -1644171768 -1922818827 -1482105333 -1081510178 -639973438 -1435468290 -1084259632 -1752890229 -1645409257 -1246459980 -549907375 -1671118584 -1698905822 -567579842 -192044520 -24326199 -828533663 -881306893 -930237292 -817216484 -1799524023 -1588053860 -1494460104 -422232616 -1177607424 -838684416 -1833804451 -66106213 -798076392 -87061182 -800922267 -673042073 -1021752162 -1309345322 -901896045 -1227247789 -1920643935 -1435917488 -43995830 -703540242 -355886912 -649373089 -501612769 -1732494108 -297703483 -2013024918 -1452421988 -409736867 -1614951387 -442146876 -869126312 -222158890 -1497885744 -14905627 -1410769937 -443384632 -197254934 -1696408417 -1543366947 -2060789763 -1077287925 -543527618 -1820725035 -1431177142 -1977379194 -1502676233 -1071759311 -2113392588 -409705136 -1081648470 -816763435 -627580421 -1451945330 -988480449 -457413151 -1898856244 -322414841 -724991306 -106666864 -1748621650 -770362355 -301192722 -527122675 -980754850 -1609773225 -1459607669 -920393202 -723836673 -28102856 -2025782099 -1113998355 -1207917939 -1313885682 -2049798920 -1037783266 -161170728 -819546629 -160081745 -1844362171 -1416047199 -1091497539 -993825299 -93993927 -1355450544 -550765632 -1063458454 -39842397 -1763752162 -1665807193 -477186812 -1374811386 -1678406429 -1779148858 -592555578 -1199928307 -176126772 -930191438 -46548306 -653331434 -457524127 -1616546229 -1476852606 -845757016 -443908419 -410608455 -1231345374 -2069278326 -2010645564 -117324956 -490547546 -442884789 -386328221 -1175345466 -1476661956 -1936469760 -1132586035 -78443237 -1988008648 -1910766910 -788999132 -2144374946 -1439153468 -744020515 -2103002771 -1881709871 -2053616175 -769878641 -761346112 -1236535558 -1253871287 -557692598 -1520859078 -1728157352 -424289389 -1386052883 -1635685572 -1029243357 -512324514 -1376165975 -822663635 -1007994059 -2005142077 -2109499415 -1549139582 -297218446 -303459000 -2109235022 -1400453725 -1004984955 -823255030 -210151589 -1554640655 -411955536 -249415624 -40313624 -1093729763 -2003592068 -1828301916 -2074280936 -190165954 -663522142 -2081545370 -2024423960 -1910076299 -2066801937 -1192164934 -693619228 -1117129080 -138921839 -544623784 -916634174 -1970362487 -1684482269 -816576682 -1783790044 -1287557388 -1931792944 -1986234462 -9310219 -1858028149 -1319389216 -58414390 -370626051 -1409462857 -2097611189 -1459704371 -398180069 -653375631 -1200343106 -705202624 -378253775 -759601305 -1976335367 -1138945020 -1727205429 -1605188704 -1716974514 -1452892059 -1867769223 -1828862762 -763001423 -1140060124 -1141405534 -131391287 -680171493 -586829870 -1604718066 -249412589 -2136788026 -627324201 -1440623084 -1821536510 -37251938 -1175580689 -1135087623 -1320443460 -597224122 -207252376 -72207998 -271561831 -736943742 -1275279545 -1736515755 -1317531555 -1048960668 -1188688853 -253184330 -1103929603 -1633611188 -524809821 -763323318 -107698448 -1906584762 -1366598047 -1075771264 -822809955 -1319710652 -1165821948 -328684808 -877627972 -1375637808 -535695454 -1182047154 -295298881 -253584750 -1391337602 -261644631 -1562287808 -88637187 -1519034538 -1127884630 -518824341 -1097092367 -536819027 -738585742 -955086134 -1839876460 -1186630067 -10906380 -767418665 -218718773 -1661897794 -1343910876 -2024577433 -194529716 -990826078 -1225694108 -1577731132 -1946546015 -832995707 -712952756 -1785703479 -1234404728 -1948233476 -1276865323 -471399190 -739012547 -1685946828 -1809099678 -1464813920 -375024232 -167763279 -2098885289 -1398666601 -1033562945 -97196032 -1486138104 -140815671 -162003503 -1931094172 -979391693 -174029996 -49415558 -1598595564 -427736531 -1340110008 -420414720 -689000410 -798066246 -2064021007 -1697714658 -2022522964 -24807585 -329253577 -1846993967 -551485984 -285512636 -1132405854 -1345108464 -677602479 -359084512 -704345114 -998468734 -826794680 -1718990670 -978687599 -1225224020 -119413057 -1225522701 -844377330 -877845934 -743957848 -1049758502 -1712983009 -939660581 -280644829 -923552191 -129873621 -942562795 -1813515293 -516127580 -869786827 -586016260 -815276678 -1409459286 -2037593392 -2057904282 -1973132639 -997786699 -101250670 -912962266 -386146847 -274476295 -328216309 -1593499867 -683702932 -1957666674 -906834231 -471477658 -2057824223 -627581026 -1462113565 -87314334 -760680637 -789315468 -1018583157 -1734969462 -1098788868 -1132623923 -715226853 -1351746112 -567402771 -1510979517 -1038616444 -1279491492 -1659748633 -1730183948 -125550009 -1290059909 -1041990451 -4368672 -409826306 -970669013 -1748318879 -2124141099 -671303165 -1860696464 -1068602834 -602091177 -403467175 -1466936646 -1691941762 -1634224007 -87040519 -453639226 -747524532 -865474374 -1121062687 -1826545278 -467753481 -1742607147 -616341843 -1543725820 -1649917333 -1851765667 -1292552945 -2140257210 -951841220 -989698037 -1594061844 -1538915783 -264520413 -503432001 -96071627 -1915616092 -684822420 -1445548667 -853947758 -666755805 -595144589 -1763763244 -1852062367 -1984222551 -554860394 -1164646684 -2050859230 -1678544260 -1948190828 -560080387 -850239508 -619223818 -588955764 -827396525 -1096781350 -1752007249 -1837549926 -739278775 -1865473530 -1899856157 -2095567103 -1464489321 -1361939780 -93689087 -526971958 -595137878 -1650971467 -241242982 -121672938 -552637022 -303655479 -1116490281 -140045281 -98960655 -1079385807 -1442892040 -1301174356 -1011423891 -1668270032 -1067932592 -74752118 -80913731 -559928366 -442706208 -1679884648 -853771827 -2004850782 -1508671644 -904900579 -184843199 -1398292031 -1180615896 -2009949439 -1302453963 -1042942270 -969205076 -766249837 -2049063047 -1554867637 -2079358363 -1774619310 -1773853634 -1790038984 -1086793265 -1385987120 -530406831 -342989920 -785476892 -928145735 -24156337 -121146676 -297686176 -1722146169 -326068117 -1996058922 -1920252267 -1295604353 -1885663938 -1937627187 -1258108801 -910630045 -1990697793 -2010070338 -1186919809 -585632880 -814259959 -1501332229 -2105404200 -1440337781 -1321416283 -1915074754 -176489242 -579773787 -1124731670 -1214116796 -271376578 -1918363865 -1769486644 -1408482052 -645607083 -1630859337 -1519090298 -2065042950 -1693641483 -136663796 -1248400729 -955821113 -1307766631 -138640172 -105613809 -1229795441 -1789358159 -381585725 -925110133 -544401051 -1468127937 -239133129 -1168595566 -1847725947 -2116455609 -350291555 -1097488458 -751469523 -596945054 -1959407441 -99134142 -1847698169 -1649590763 -658070971 -658027547 -2075684026 -149579467 -1426234879 -517143539 -765140564 -585380912 -874401077 -828304718 -1328395572 -1104384392 -687315323 -394096448 -739434188 -182532527 -1217533373 -1859211395 -1878851915 -1264589917 -317080660 -1267724413 -1458947404 -560737582 -1158297638 -569141811 -674253739 -2058869801 -1020741296 -1499589636 -734931060 -1807871523 -150565658 -821277840 -1339257611 -1126563870 -1943131138 -1421216437 -2071534725 -1279237911 -1692780060 -691112964 -1944022972 -1377884946 -1796121821 -241819668 -1224099952 -554555004 -326924248 -1352667110 -1014230628 -1596458557 -1018281881 -966391024 -715118107 -1671535737 -120061705 -1389931402 -249961348 -622362304 -1797882438 -1915222176 -506727149 -1790532888 -797903205 -1471274567 -1584936011 -632379489 -505502620 -537226808 -1149710068 -119257170 -753013539 -777418202 -777212666 -1617736408 -5354589 -1947747796 -1703976151 -2032737112 -2042784908 -1264884167 -967573116 -1255185528 -1171304615 -134072256 -642060889 -12035248 -412950318 -1936331169 -950770745 -178093888 -1779255345 -234798940 -1338325041 -485245409 -1524181404 -1731915612 -1312339446 -1832014232 -42666538 -1984449715 -77838448 -413254513 -606485593 -1245972889 -953303526 -1944354862 -513509235 -1960418999 -2068003919 -2066523585 -808870164 -1109360838 -574581012 -1896591772 -918139583 -1501967786 -2049792464 -929277274 -1862063134 -415905407 -62904464 -673372124 -126468378 -1692702163 -1529381732 -1086998781 -545127238 -788250964 -307333605 -657728200 -1339526291 -1347301336 -1025980184 -1502750725 -176262708 -1067384143 -1594388010 -578336804 -595678506 -2147371675 -265570243 -968055635 -774947773 -58901756 -2119335472 -1507508762 -687695628 -343431642 -1767047605 -1217742872 -1085293794 -1954181787 -318396891 -1914782360 -1704674225 -880364948 -131353206 -40144126 -392460524 -1161746931 -559350793 -1472855032 -230523855 -353931797 -2009989 -1569630418 -1089315578 -828828771 -1546219755 -615809938 -1193933073 -345960343 -1317252372 -651699281 -943216067 -2055639562 -417205598 -440378131 -1206600155 -640726464 -1206674390 -1888394109 -578970950 -516352093 -348209524 -464531793 -1282788106 -1231365309 -256842224 -305128298 -100355450 -899385255 -1978073199 -281916386 -819774220 -1837720035 -1450817091 -1353520399 -323073322 -1054663238 -395018728 -1207808619 -1624028089 -522938453 -1523496047 -950538748 -573887603 -979884944 -2021648612 -361959050 -1772065046 -1794011526 -1281313602 -71696698 -268077319 -154809027 -1272620272 -2139271031 -1556999943 -1409803306 -1377086591 -1263071218 -562110331 -607769964 -1357559816 -1641561784 -1006490679 -360154534 -1508335692 -1701006256 -1509835728 -1142307544 -259087828 -1539772727 -1782276339 -1616521217 -1056475922 -796027658 -13727196 -932232943 -2145868136 -765394034 -550483908 -623490480 -1431783647 -1433490494 -55696965 -1943504310 -1250667300 -395374264 -740851230 -376437304 -294944266 -736021386 -805627782 -301737739 -1097288806 -1690885653 -1064069220 -1715051971 -1352966563 -1752169905 -276342024 -1620752554 -1305596530 -172974664 -1639803457 -1519059848 -1553269800 -994315668 -1893174769 -1470628631 -1466107894 -648008780 -1193991523 -1328329493 -2141278286 -933196376 -1158417391 -434346835 -770339692 -2067779328 -439306295 -372121679 -776678889 -1236480957 -336192280 -354174703 -1937047484 -104975068 -1231893689 -547390296 -168761124 -1689797028 -2094901668 -1017941511 -1688243375 -1752459461 -847942422 -666805062 -1423006988 -2100554324 -1532850435 -1403431633 -1662560830 -1750138693 -497500292 -1333569873 -22031772 -920804720 -1197768758 -387808728 -288422851 -652265478 -1869354458 -554619996 -1419244792 -1146351915 -1660838168 -714645870 -177099419 -97600391 -1839748876 -1189809426 -1906785565 -446526774 -1467628000 -426626558 -2012146620 -1723253031 -1749228575 -233532595 -1529701096 -12098588 -1477505698 -1084856025 -1039049145 -2109446258 -655729883 -2113550824 -921693941 -1110520576 -738944755 -546566684 -1358699769 -1473399032 -783597267 -1549543065 -636106286 -864754036 -1899243803 -393668013 -2128661731 -1487637544 -1719583634 -207215312 -1596756997 -1739195667 -1261655952 -398054786 -695227897 -236741552 -1775550220 -239788828 -1451510424 -121466248 -1373765486 -1279834305 -978955783 -1437625214 -828459301 -1778988406 -43322461 -123645694 -1496492409 -219444399 -972592094 -1857286541 -1740085442 -1183718848 -474172528 -105864079 -1141116037 -1708266149 -1120289500 -1716493251 -1954239406 -1286799424 -2077593878 -36207326 -798655981 -1238278917 -489734942 -1817834890 -101150361 -1374552550 -1623117071 -243844456 -894973516 -844419824 -1592042592 -1961085771 -389539041 -1452506031 -1822247568 -1250585509 -1168196574 -1584318344 -988668455 -1469746346 -1669929428 -1040113753 -674960091 -1045625983 -977212880 -61941904 -1675495380 -97788549 -707153088 -947447518 -159192521 -1931559932 -217485425 -260370781 -1627527328 -1352589857 -1863323104 -117384727 -1495118743 -754560054 -999892043 -1126028926 -1542261918 -668436536 -925903095 -986811503 -324725140 -899480953 -1438985838 -74146752 -643945604 -1623669195 -933457936 -1259489017 -485600240 -1045375080 -1055253453 -1724827645 -296478662 -754811194 -925834729 -1985267788 -942289477 -1514826961 -1278098342 -1867396700 -2010319642 -1082004843 -363873505 -1736055526 -24913693 -2112610733 -153970033 -56549996 -1248010798 -844701737 -2035187089 -269875407 -310502985 -238406685 -1844153140 -50346829 -70598085 -1131041451 -2035907360 -1638051869 -2144891390 -1529093188 -532407067 -1748701667 -2115208074 -857807280 -1109232649 -567592136 -398669778 -293980206 -1712934142 -118352912 -587534862 -568616728 -439118346 -1508230130 -2074309369 -668039385 -693437179 -204915184 -1593211347 -129514586 -1350712491 -375203800 -1038279008 -2050655581 -403299164 -790659416 -2131480723 -1621795854 -1660470454 -976927613 -1709910376 -837525278 -1679524908 -1250072588 -1137467915 -523821811 -1337708424 -859181725 -587209647 -1545179164 -306466177 -1111251333 -135875772 -888983243 -1097632922 -1031992324 -1617056296 -1459614087 -1028260528 -1173786687 -1048067067 -1202322375 -1758522002 -1809337600 -1168601680 -1950483945 -445792160 -2005872384 -1498867282 -1479229264 -2135542376 -1166521121 -1342267184 -168849753 -1031900984 -81904916 -38905485 -1049457707 -952488738 -1135114828 -1777677895 -1639884201 -728640609 -1310960269 -127022863 -274513323 -950545905 -694175302 -1873130210 -1736658097 -1562389902 -1804531045 -1989210381 -633456971 -1434873418 -1823664163 -1436977557 -680706337 -986018390 -2027260478 -191310444 -571612749 -1401119412 -1455768129 -813753832 -1584790328 -331368955 -892930014 -859020062 -17623253 -1988753532 -1545130416 -1634642188 -672957645 -1750254413 -294922685 -373309519 -1413352946 -906343955 -821343514 -295556882 -294840263 -1135526612 -108596995 -1976078662 -1119471379 -851235486 -178756888 -37394463 -1423514717 -2044021039 -565701414 -833559829 -1604216622 -411577869 -344417296 -1153065207 -674503521 -1961988581 -530681182 -659039883 -1910146002 -1090816611 -286886638 -602937351 -1740211711 -1158438284 -785495486 -1240655093 -1771419328 -1678847335 -599521412 -163099760 -1028532748 -1454020933 -1513401718 -946359358 -1197840224 -1588937790 -1318286085 -845444496 -1633835720 -3551851 -1713901288 -1340790205 -1115067464 -1996563726 -1814558507 -869556102 -1003188479 -694653956 -1327933400 -1926594176 -509886566 -1203763232 -205201837 -2116021024 -1636156048 -346598901 -1312078443 -1740304105 -563820595 -1434889601 -2095651844 -741247661 -596802180 -1705607770 -1538070234 -1085763899 -1265301934 -1546532144 -1571164567 -1103954057 -2044609566 -1867140115 -1992862841 -1890810075 -381922219 -138113850 -1997138190 -732156720 -276695730 -1123038355 -671859002 -465230688 -144214489 -1451362807 -1935434623 -914907652 -869994644 -1931312932 -361123719 -617558811 -522470526 -101497899 -773172775 -291281428 -1451728883 -1645623014 -544106585 -814005169 -1514043993 -1003657048 -2127442198 -318299236 -273494775 -1011678845 -1658314616 -1250980346 -1361771092 -1553517165 -856811929 -1560237568 -2137475506 -1444382326 -578607394 -848517342 -1739550914 -789841340 -1266979273 -1820281306 -415874780 -1695640122 -1515534764 -289241481 -1526078006 -1395850721 -951708019 -898472477 -1669398882 -713161719 -1002777326 -226856426 -992478357 -1078259850 -1846285564 -1530258645 -792890043 -966923066 -1067213413 -872412547 -1766819360 -1676596451 -1423619670 -1660482463 -1178762876 -931013357 -975639057 -1527986154 -1253839452 -22641753 -435337152 -234728335 -151666806 -919453 -420861042 -1747883323 -1246202348 -514853645 -933597752 -1461892882 -673262447 -430610686 -253909212 -402119495 -291315356 -2021956779 -1246354525 -925008837 -989402826 -927417861 -675679901 -258570771 -1439530316 -635253910 -1571256133 -495420172 -732731385 -1345155797 -1473128210 -526859207 -847615468 -1614140125 -1839651971 -1708610738 -469345882 -588803343 -413140425 -836492224 -1496855506 -2027048384 -921613880 -1912418996 -638321123 -1582297496 -1384014471 -1735833440 -587281585 -606757483 -1520660825 -543602828 -937295858 -1338934661 -2141194161 -1666791148 -1982132968 -1942460912 -894146290 -1973617971 -564827035 -1170257505 -1862647309 -1644200044 -250569912 -113079217 -2146856171 -191429103 -418430915 -1706928127 -106990216 -740747773 -785119152 -1358060496 -1466555956 -1736135873 -1375305722 -1396776993 -1487175994 -404763725 -1783216026 -229971450 -1807079197 -1866328105 -1230312653 -1892205655 -215115162 -1225549833 -1300384854 -627165659 -923491337 -1254584090 -1800354384 -511545658 -1170835065 -832279994 -1568866247 -1130795463 -49070691 -97383189 -336718509 -608570918 -1934291812 -1035035998 -1232477686 -1772693287 -1615439778 -60599825 -594010097 -2023709023 -631548375 -1569355151 -757870403 -802352864 -1094765735 -87820649 -680382254 -1981606350 -1681526774 -535696098 -1192870862 -1820732889 -1563179320 -39893842 -480904630 -1583152749 -725866113 -1924646231 -2130513303 -394753443 -1044130918 -1619459189 -1042847445 -1522964948 -614292443 -1459198372 -483789464 -676433906 -46230924 -1761543101 -1045340965 -481882648 -840832099 -1422690633 -1078543133 -164972004 -283082951 -1098879352 -505904864 -855290775 -1764006054 -1638002743 -1319230708 -1689337728 -817897509 -360609316 -561922178 -1740449787 -864814322 -764986958 -151208517 -888390818 -1878164182 -443279621 -579818704 -1879651689 -1821489653 -1397209986 -174554757 -279139097 -1386518231 -866854820 -699898492 -1426020425 -1207782455 -1184289741 -1479236591 -111203618 -688434836 -2029882263 -1305977999 -141873206 -756125072 -1533345805 -1139180635 -1392219440 -50310368 -1605281705 -1132558674 -1766070557 -1976366312 -1659037635 -517858797 -2049063535 -1563069453 -340842820 -1206389191 -1390021810 -1769448604 -769143772 -1295304711 -1144548138 -1409529187 -1064935852 -1248150466 -1044618166 -1218701737 -21068673 -1913869003 -1386268655 -967198282 -1397801431 -1525036284 -1067498243 -1364583063 -1569673528 -1813865348 -2104534671 -1858549407 -1490237834 -325501077 -1055752230 -1517838096 -346636759 -1948357849 -1219718687 -2080561794 -525847657 -1026363794 -1507633054 -629187625 -546935547 -1115729269 -234618479 -452800661 -1686148106 -897011730 -740944170 -1938479884 -557001751 -647211784 -683781633 -1132910734 -1240692036 -244836682 -391446722 -1302645893 -2121226133 -1071593484 -1473821846 -1447381224 -1588962199 -1728528148 -213806820 -711082309 -413871808 -243944423 -427635238 -1785162204 -727130391 -1698530107 -695388778 -793184872 -1627146775 -1399086527 -1648808286 -391881914 -26983249 -388416426 -1912068549 -1190809335 -1532386952 -56123793 -527267918 -1274370304 -1487287797 -136353099 -321483544 -105068156 -648940058 -1813595340 -1861477509 -1310724267 -455504543 -2033136293 -161885387 -2093402207 -1586304248 -6018631 -223399808 -879158100 -1322695340 -1937349283 -882343567 -1173748034 -398426096 -493384126 -872644615 -1372218942 -1056873061 -1028291890 -1700887821 -1666782330 -1833928842 -9262103 -1049342537 -1164310195 -690455901 -1638183366 -59994175 -1152268782 -173890428 -1998663476 -597834758 -1880277040 -1594345675 -2014296106 -1342442234 -963431456 -365782612 -1610162170 -1554155343 -845251340 -534946475 -1478858983 -207196903 -1287356934 -710246213 -1393991865 -1922169932 -1313545303 -624016361 -1680331026 -1913595932 -1091731652 -633595196 -1610537346 -1417287434 -461290714 -497064528 -452135266 -1240272576 -1784907050 -733724407 -855007375 -1295869548 -2047829009 -141743794 -728581235 -313061451 -288871807 -1755418029 -1180470917 -1720771033 -836477482 -1249086712 -1747719159 -634581647 -1009950127 -521038601 -1804938188 -242128194 -2114529140 -184381777 -85623418 -258742836 -36459477 -741590544 -2064669467 -1858963643 -2009851345 -1801271752 -897364105 -220859854 -1139824162 -1470559494 -304122335 -373004485 -581613802 -1985092717 -147354827 -543932398 -33927907 -1143166494 -1810558596 -215044982 -46034573 -608955491 -1955359282 -781202533 -2103438020 -607005226 -1389510132 -1759611046 -785547285 -2111240886 -753271621 -820035082 -1927060375 -1902842218 -742686802 -1162124850 -468584485 -676905846 -1535675563 -1640717695 -1852272385 -1219027783 -1205956501 -560251921 -1585727799 -1055058523 -596122782 -1024383819 -442447934 -1634040824 -1303251132 -1556059771 -640718031 -1064940959 -1333983815 -536704025 -953230775 -721628805 -1575171026 -1868517413 -1518790210 -1316431228 -1883117602 -2091030975 -387713670 -838266692 -1255568124 -1159144646 -1919903385 -1874395520 -1527886797 -1731430000 -1740593150 -1126832616 -17494219 -1967562741 -1873791481 -2113221559 -1830188027 -1561893808 -2056613775 -1758417960 -60703706 -192454417 -471014137 -709877717 -1643130534 -1602668165 -156464834 -1184481110 -400608080 -658767215 -1622382220 -778105581 -1592573284 -143007980 -500918867 -807501429 -1727351810 -1917930524 -928775398 -2016967790 -1148278635 -1830966503 -1760838058 -2080585146 -918324721 -318614858 -1283186435 -1483629871 -934616580 -1405465902 -1492781561 -128247826 -1535113641 -786429229 -1901688165 -673870854 -2066172547 -1351425439 -1620302601 -185687400 -554392709 -1894199477 -1513026811 -1087748350 -258231539 -33025386 -1006881576 -487509472 -921582599 -1386679229 -1425264559 -1388844475 -1309332082 -679371365 -23980456 -1460082003 -302590152 -391408568 -661391615 -633516433 -286767605 -749833367 -1015358573 -1226477349 -1856760737 -1492832202 -979371113 -1975625583 -2094507214 -830804074 -385398924 -589036316 -33750342 -306315186 -721029243 -88267080 -1741097130 -1007289888 -907558315 -1903739211 -786062624 -35125224 -1939120490 -586248558 -424541870 -1334533756 -1189627824 -1002084398 -1465717412 -527628747 -896372366 -732571657 -808090948 -897979408 -1972322787 -271506017 -1946361491 -2026668133 -973186264 -1106083496 -1326868840 -1214403432 -793900536 -770409741 -1097609224 -633700038 -1225133193 -740367315 -833212487 -61406922 -1273987494 -1495851068 -177844447 -1881867752 -412154848 -1451768761 -168368913 -1540357692 -876364859 -1621334087 -342003426 -1385341410 -415377096 -1920999722 -973178656 -978215840 -1886305095 -1976134651 -2060478502 -140891592 -1438007750 -815290912 -1648690124 -553416827 -524936232 -740429348 -1875801118 -1529452266 -124980072 -301063338 -500049434 -1227326527 -1096509854 -1483941271 -1873349086 -1120339735 -413309249 -1526433545 -928943753 -551542981 -1243461215 -1689271548 -1853093896 -2141261278 -647342920 -740300738 -1861736495 -1368534675 -1412423355 -315093547 -82570927 -495134127 -220140364 -1932257614 -1206008564 -1435274762 -2126601830 -1226619789 -2103266170 -2013689570 -1885809917 -96128946 -731492878 -2004405118 -460847737 -1641884677 -2138386036 -1715274507 -798161821 -1522866385 -1105227749 -1976714540 -1069254690 -820416734 -1899034598 -1172526872 -1349192832 -604098751 -1932508688 -1130841988 -831016366 -1805906921 -1491238196 -2106199682 -1925101873 -1198553809 -697259003 -13801742 -37643918 -1321137608 -1526351323 -1694522246 -2054745655 -425696178 -1407635489 -1449808271 -1578151835 -427366748 -1567618068 -1627487480 -682864521 -751394879 -1489886993 -871367331 -1379743224 -815945462 -1912293739 -680610371 -1520601475 -1693591025 -1436099837 -961251826 -239963201 -87230141 -1493132533 -1732066936 -1708158267 -1454600373 -514631563 -1496032872 -1085940628 -2088102590 -562470856 -224662698 -629713860 -801432604 -660341444 -163161612 -2068079312 -1186170089 -869990722 -1865395878 -594758993 -1725502213 -896524803 -1147096669 -1293016764 -1345728555 -362053681 -1215044616 -832861789 -609676577 -1189749802 -904684997 -856523819 -1012940092 -1381256475 -479351255 -1245382888 -1774574954 -1028362342 -737490938 -1882068129 -1632407440 -1768253655 -12988752 -1406106517 -1522179631 -300371506 -1757330892 -1117704653 -1222642662 -1831685738 -964118821 -1180907932 -475747550 -807455069 -948179290 -1720666290 -1223545528 -1973769071 -956881088 -1942897280 -1785732325 -1719219450 -528825765 -1687301069 -947508048 -1176520231 -1893584488 -1914324923 -458981507 -340928125 -492626679 -1027134768 -1580491190 -1090200587 -670789505 -1817547432 -1712294696 -108602225 -2063979272 -996274513 -455744332 -1768302722 -837657821 -1759691462 -2137098997 -1558846504 -232699328 -409884509 -1948886834 -1520434994 -1043028505 -271073074 -1112339431 -1243669682 -898009123 -324259145 -1657437576 -1542954595 -1572840640 -1356425557 -1905423594 -1178200294 -65632271 -1422467786 -1628120898 -591302612 -1616165215 -1515601249 -1406654876 -1031109 -149979787 -1711962178 -962423140 -598884776 -200576743 -1691477458 -273117620 -1115285701 -1369505691 -552420091 -952663456 -1924116607 -1819057323 -1319228969 -1660110355 -1367194661 -365644527 -1436851222 -704877639 -1358681821 -1171746996 -1126718782 -251769828 -952714606 -636311010 -10583010 -1774990016 -1561858435 -1462099764 -2002844574 -2588493 -555128911 -1382644609 -187399276 -1408605230 -568376082 -689548318 -1416821414 -1218827162 -2129086648 -39282975 -951481196 -1381225610 -2108086847 -1430429323 -146203496 -520865104 -1036457756 -1505644275 -1563517324 -1425759776 -1122022006 -769950535 -1969668570 -759237485 -156579921 -971264672 -1022141457 -1409775446 -908843571 -2030200333 -209329548 -623499450 -1582542437 -1205770564 -1730176056 -2140392812 -1083420387 -532601396 -719821876 -1270886381 -915052405 -1155374668 -834908902 -655766416 -580077308 -1931041823 -99562050 -449613337 -1803884813 -1865407392 -788274791 -707793994 -981736425 -927235074 -1898546086 -1552040276 -1804542270 -30385309 -1732264024 -725648989 -422926810 -2107507747 -287430211 -1148834174 -430492241 -410687744 -416471950 -994858077 -272024597 -2072200963 -1739281742 -560834830 -645261127 -111344139 -902687636 -1646615844 -50731219 -88589874 -723844947 -167163974 -616300742 -852941313 -931303866 -1563256526 -1337495084 -1568543639 -3690101 -1889985391 -1553843760 -2050926800 -666709603 -1966111222 -1100431765 -827506391 -795815565 -744047439 -408030792 -858236273 -1876867059 -117369830 -1244744864 -1788723821 -457685194 -28632004 -181754300 -1022774066 -1304616674 -884404048 -1444513849 -641630808 -1373598469 -620263233 -878534493 -1579150726 -35858609 -1380220303 -244277627 -1732827572 -1607265637 -116765446 -1824281211 -1070285058 -957942534 -455267379 -194604592 -101783363 -1275998929 -942300761 -1704477149 -1863075910 -257762463 -739199642 -535485199 -1943258663 -1417045465 -689485025 -353055963 -314253480 -995950387 -1450609591 -13551546 -127567040 -830561574 -604668718 -774525822 -1557105887 -1042920467 -602762055 -941495486 -1055122106 -1664762263 -94917478 -1845186672 -241049977 -1172805197 -1732033813 -1151460006 -1613177725 -696980700 -1778814162 -1409770847 -831548178 -6652970 -147317146 -2058111478 -1160508517 -1220163165 -960968952 -1928150824 -902665738 -1278576158 -1308115624 -1709198229 -1753372531 -1161524383 -1113953851 -459939211 -1404673724 -1063547797 -1541430198 -1722104025 -1765237556 -861020387 -1424830823 -541494464 -2009244109 -185390888 -2013366466 -750368283 -1415757197 -512401219 -517863263 -2124123597 -377147051 -1486243860 -1918256763 -2116906977 -1493982590 -986589406 -886908155 -581367258 -2136395003 -464237581 -632934316 -1240545421 -2075645671 -1652430629 -1143058599 -2144650978 -1783455998 -2115697207 -488731023 -2124837433 -1637170468 -216086665 -373731578 -2064447618 -277831147 -878639051 -1188973385 -740346360 -481021802 -1404978906 -1897774377 -1466828995 -2030135052 -1259635428 -798846270 -141498846 -906707493 -488875739 -262111951 -826600460 -602218777 -400556728 -1943177798 -57947410 -1112027779 -300701812 -866332893 -517805991 -1161553093 -1596482821 -1426086929 -178031536 -731305281 -998945986 -258034456 -1015618699 -1303447737 -565432712 -612452609 -601879392 -1138963974 -2045765307 -1964326279 -1165665822 -1999642420 -2018561037 -8693553 -83657275 -1573515787 -1966202951 -494637421 -461937210 -625304565 -1856339184 -850241872 -658955566 -493030183 -1366375555 -1631315514 -596122549 -1020467788 -1197707974 -1513695687 -1592129047 -1266651309 -603157652 -1147843324 -957145467 -2091347839 -1418279624 -2104642515 -1523599868 -547974648 -1400030600 -335974021 -980862984 -1279697716 -830788107 -117041555 -22394233 -570235806 -1881158528 -1377128962 -1975200615 -1394520979 -77570695 -208097136 -1385187436 -2122503372 -1063312887 -1888265122 -558570088 -1236447979 -1929414681 -669473867 -1180456036 -1470666066 -2095277939 -899477267 -1377035236 -399947733 -297733421 -368709237 -1405824664 -1080043554 -1760227634 -411123566 -1298881363 -1127796186 -1179829680 -1680919009 -1058407978 -1055838145 -814327854 -494959847 -1585983698 -1060985722 -1430308613 -264914173 -678905380 -782105149 -93835956 -847915594 -215906866 -1646817079 -1285404217 -103186299 -1232824164 -1153498092 -1507550775 -1393808119 -981434557 -148706892 -1793252383 -1407299083 -90799923 -1360916491 -75140040 -158267844 -1422899122 -287650462 -555625437 -1137822503 -40931386 -739037462 -2104693233 -228533647 -1264244293 -950629033 -2091307598 -741949137 -1649091077 -849782957 -1535905749 -1214486503 -42591186 -718008651 -860784864 -1761363056 -166808297 -1080888344 -926227635 -2146387989 -912628817 -1224320445 -2112897208 -673788064 -674721017 -1322476559 -407780663 -949285464 -984779885 -539059766 -1891464116 -636971071 -366810002 -1697636724 -712686226 -1601101063 -1735468931 -903429763 -1234642451 -1648676643 -326841660 -2112094241 -63223577 -1741737021 -1024519690 -578548184 -2000858519 -982700460 -2097385790 -1966390672 -1502180621 -1331943015 -596716777 -270239549 -2135670285 -1168804037 -1056530750 -1717521854 -2062100851 -1637907471 -1865477851 -1972479204 -752922889 -1401347299 -990897644 -281020223 -790348208 -1195975161 -307595007 -756144320 -1856846941 -794179183 -1158662576 -260203836 -969166360 -115550025 -724053287 -1521250707 -1867815014 -450988452 -1293122501 -975366667 -1244894718 -12352705 -1453482823 -1059321536 -1377621922 -1670444747 -1111145598 -506271274 -571092704 -1250657685 -233774959 -1308145550 -64680864 -464555866 -1687383017 -177324437 -1731994270 -486860805 -756854565 -909032774 -915167860 -948343206 -180635208 -1541547645 -1548552107 -1160944356 -2102858297 -1601019000 -356236090 -75556794 -720201381 -1206775975 -1448249557 -1150649401 -874241372 -291626430 -807726556 -1216094005 -1290073536 -1271019440 -1003891371 -1770741565 -1025102829 -1789430769 -1601941995 -836627526 -1623392573 -579239276 -731139881 -366551833 -1653557635 -757295618 -1879359604 -1207384352 -935823561 -216359099 -657562522 -702459792 -1524116585 -642502679 -994748837 -583511564 -1668523946 -1040497896 -688800551 -1734003327 -2040827099 -572243009 -1256480997 -1469415628 -406519296 -1224326765 -71633801 -1358451087 -1588767952 -611302466 -598778814 -567157056 -1676214806 -1451763096 -73157258 -1193389122 -1941194121 -1078026423 -70561622 -518207810 -1472474085 -270398567 -513318517 -902505220 -728233779 -915819400 -1161357751 -460853474 -1738306436 -1348736064 -1517133563 -1390452510 -418288916 -1467834581 -1751149778 -310936711 -1085588626 -466972270 -1497695752 -1116677377 -1137084106 -515594889 -506783778 -594812844 -483092323 -1844487001 -1366581362 -795346469 -1449885555 -729580376 -2073238709 -2000809588 -160317143 -1505729063 -841065593 -1052056997 -1689082828 -828760503 -398839479 -998661266 -1915196357 -72787216 -1416544169 -854137741 -1712316439 -474036826 -2120087859 -1267975189 -1378772342 -1678200864 -471701550 -1525809773 -1182625984 -1433760103 -292048134 -1452854743 -1240599211 -832210554 -401788167 -1165136601 -1694959661 -816444972 -1717623721 -1626695873 -263227554 -249187258 -497133556 -1612288862 -790245788 -1622085868 -92284811 -547625343 -1971712406 -750250785 -1588451958 -1742842249 -272733863 -1107932743 -194908464 -913992773 -526008820 -1587546688 -1560354888 -1961789099 -1472954502 -1902316145 -490912479 -133862779 -1416348244 -1856193560 -550222951 -532553475 -2061897276 -363906093 -136278395 -1213417063 -1395865929 -1207308875 -1814765269 -49637742 -1037874758 -1698876772 -79336492 -1968559904 -1453240846 -1287381391 -1121295012 -1436264259 -1577208733 -1756520610 -384196961 -1862480645 -990561843 -1079663757 -1819430396 -1147015939 -2083671301 -1247724278 -324127391 -1590531745 -190600359 -1522116036 -1379013988 -1444577892 -1718001509 -1533727848 -1117726395 -1588060456 -1605319076 -1760653071 -1118992284 -1389020409 -2118771173 -613270057 -1455826046 -1787164851 -25880168 -1176286882 -119171492 -1460507040 -1003736070 -1308081305 -1132398796 -1226484658 -1979603100 -225158729 -376572289 -416153514 -2085355166 -1631155922 -61343452 -207247204 -2132765841 -1745937610 -756858662 -977891053 -722577280 -336321175 -373029321 -999032454 -1711302132 -606448253 -618399509 -1767179930 -1294245500 -522258037 -825162570 -57921664 -679314757 -1220053447 -1264422173 -1792774546 -1966227212 -902392048 -973635622 -68508814 -376402106 -1850855127 -1021492694 -1243433940 -1230860623 -364519210 -1851001226 -1329494940 -254109545 -1621632579 -1063791176 -1336933757 -724255338 -622154570 -453980747 -45017038 -687113922 -1304117135 -1078586663 -896580714 -2086792846 -24439918 -592325249 -1623756098 -246553010 -1320484007 -1278697551 -1200884128 -1208224790 -28679498 -979985958 -1571907263 -701543847 -1162214499 -1975315228 -1173338023 -2097305807 -622116391 -1959789941 -85360701 -138225511 -1726340970 -2108611820 -1663715946 -1836820482 -1364415349 -898387977 -249207382 -835357624 -1754986129 -363978558 -1354197650 -968212644 -1266314389 -1382994153 -1767217990 -1933919920 -1227098095 -1552220524 -539003112 -939280338 -332351669 -229535036 -914720040 -2011767054 -1786338210 -1164910410 -40851171 -1538347604 -1452554195 -484256269 -2079574600 -1113947275 -349416379 -1420790955 -1362909692 -1362614542 -696995786 -2032364564 -76337966 -964457303 -427323965 -848564187 -379391182 -548647931 -1978479746 -672300874 -1449322451 -2002909683 -1096875456 -1186163144 -753266107 -727361284 -1284181464 -1027213098 -749499853 -1852439716 -1883876253 -1956776450 -977224992 -265508288 -2074261597 -2012619028 -1073079699 -682833587 -231487141 -1511494070 -1096774127 -1630610288 -1628291049 -1303546822 -83270660 -1518128423 -931195354 -1886978989 -417369227 -1043007087 -2058584395 -518889948 -52265569 -106606560 -735092322 -223234663 -251049732 -1734963016 -990450946 -1363301525 -1505700832 -366587176 -100083789 -628546122 -502612861 -1361171176 -60663541 -1664884909 -8745153 -950898475 -177368351 -322573221 -1239400319 -9785533 -1256695959 -787314668 -1750875909 -2987722 -822519773 -737589072 -1383922620 -192093683 -850608740 -382455101 -504327036 -106539343 -1752859850 -1134829404 -1275524021 -1550456593 -957385853 -1836548047 -1080567598 -1977900554 -1675239165 -86550338 -805101747 -50602082 -65667962 -2022326423 -1016510292 -1256065759 -932961503 -1505874174 -1132462523 -150060700 -924383322 -1213790456 -1229031139 -1828636327 -1252275672 -1657478704 -86709244 -1328351242 -359330082 -536672810 -428600270 -824585852 -1102440473 -228123395 -811589870 -1722302993 -814325438 -454354135 -2025581860 -2043548776 -1218311761 -2056676629 -667321491 -1512694603 -1946779435 -461118353 -1895160495 -484987161 -1478774562 -935816803 -102777393 -802791963 -2032251687 -326697874 -1842966586 -1582770221 -739168958 -19779211 -1716717639 -1430561228 -215647184 -1577308999 -1294207625 -2033176559 -838636049 -1020900282 -2024183691 -19358863 -1094379744 -42920853 -1963754626 -147828439 -2061478341 -1912800136 -601690162 -106059011 -122370867 -1545311490 -382985612 -830690825 -629506628 -1613451674 -1006274249 -1017582818 -2102141065 -283919011 -118154243 -1543472273 -1683520198 -1826918561 -299069921 -1356428267 -1950970564 -34463105 -1548304692 -1297607745 -1196934930 -1406047061 -522902639 -921570149 -1177432079 -39144648 -774102954 -892414352 -782223416 -2081549425 -2092576345 -590943496 -2022953544 -819114704 -1490652858 -858358504 -1783719829 -107453883 -2091148101 -208766705 -1901215384 -1317775175 -848514714 -1695382118 -1474228830 -1845110371 -1106142717 -174712540 -783514331 -155637713 -167960345 -1116006257 -594988501 -1287875875 -842153012 -955307 -1023459220 -2082581717 -114955166 -1463676309 -582548978 -522726573 -109912534 -464022518 -1313337769 -1430959717 -470600866 -206482961 -25551975 -2102798072 -588817425 -649816599 -1513234398 -281695765 -1406764367 -1841246346 -587983952 -1674021417 -1094696172 -1066158955 -330006117 -1610031865 -1511602855 -777639975 -209584183 -608182601 -1850298934 -263491531 -390881403 -391264048 -379927622 -974660423 -112470045 -498436955 -2043679385 -1265973577 -2097417810 -357067165 -1158532437 -220441310 -547806095 -714643976 -145266961 -1960390535 -1589609471 -1869810417 -1775471968 -1072091111 -1247504247 -921033668 -750730500 -1061087375 -991306937 -717556733 -1855333626 -1129697742 -927026667 -543333284 -702037144 -863122590 -249334645 -826783218 -1526348836 -1652723237 -1765953961 -16737340 -2131599270 -1466731636 -393822339 -427451519 -844880618 -746672762 -1582161513 -1246031837 -1944042562 -1707134076 -1420891412 -903806844 -1129791877 -361669965 -1208380745 -502331536 -927909195 -343595851 -231940974 -549130713 -1502662232 -836444504 -694825466 -2063018323 -2025473846 -228157478 -1384422851 -9541512 -1450402306 -824679845 -534697177 -1583874791 -2123807772 -1511527217 -1653875756 -1808987971 -1734838018 -1037093207 -1448250997 -1174851481 -1764190649 -445523614 -1787387056 -1612995956 -1936956411 -721794804 -70148925 -24460272 -934414927 -163767578 -1515131639 -2103854194 -1159190703 -546499737 -233521540 -1343899711 -1836927278 -1011852074 -274807125 -1593508825 -834260038 -487727403 -289381622 -1733944146 -1046172032 -1564723835 -228753683 -667422051 -1055322876 -744136359 -1902509232 -1588642041 -642599936 -481863589 -520507486 -1468422971 -902802273 -1425836256 -259937719 -791505235 -1314775127 -1966315506 -238865659 -968194570 -962544671 -493972646 -26482020 -554195211 -722334238 -546481575 -2075756453 -1366860056 -1184389233 -1003914988 -20188837 -11367233 -2070524095 -1473448677 -1617980782 -1965064760 -692414107 -190013256 -244610503 -885023563 -1119284219 -2000604660 -1011059541 -1987090523 -1512225564 -506091903 -1851371601 -1111936624 -916143374 -163937828 -81556095 -618721879 -742801579 -943698242 -1569620199 -917564845 -432280808 -406362255 -732422325 -445751671 -1325373761 -1856414443 -2115119885 -1523098404 -709803788 -400605831 -620968272 -1990706731 -12807657 -509926499 -1874917163 -1705206110 -1229821555 -80772510 -333910666 -661793851 -951445944 -788745246 -24796591 -144477419 -1575460023 -283239051 -1574968405 -610549913 -835522425 -229829242 -1564472988 -307735448 -969052560 -350397072 -723429030 -1766781543 -1041006132 -640788415 -100401200 -1668305505 -1664127303 -160562993 -1342762719 -2054855557 -125335445 -1978850055 -453633296 -647859022 -824492464 -1680352004 -118689531 -1950123101 -823537993 -670943436 -109698455 -1160964059 -286522971 -933237023 -1841571520 -1758216076 -962606612 -1535015033 -1276608220 -445236363 -1254526793 -837363705 -1111451144 -1346615602 -238267081 -1645312359 -1765378941 -1089794435 -287043782 -1096572912 -396273430 -820748663 -1035314360 -1615940526 -2034220520 -1204619400 -1709915531 -924165363 -1845520837 -1562393838 -1870683397 -1415261299 -767778121 -1965128471 -1763204884 -1057640435 -1040644826 -1010769414 -1405893328 -86595755 -1568425266 -161678737 -767719304 -976591152 -349977643 -116536768 -128373712 -1503395996 -283914170 -36791556 -2027875003 -1929697531 -1128366523 -28065404 -1396326335 -355417929 -1357110396 -530610785 -1623361151 -51129722 -343778854 -1160188748 -140772876 -1590231585 -1588262180 -700727050 -319209202 -534907808 -828982714 -1986056109 -1306698642 -1516301872 -297123755 -859471010 -1154255348 -1349850485 -919854487 -259588256 -1360531535 -47635489 -1745746939 -1847218459 -29555734 -674498881 -1884004101 -1958034139 -640367545 -1616773698 -1004956795 -349969910 -2134051884 -1885625841 -1297330908 -839102765 -275061506 -1573922998 -220263640 -1856673699 -29984536 -1438923154 -1168100411 -2115590450 -841949771 -880051114 -1299196109 -2122764914 -1164081987 -1149931339 -1690675220 -1822289083 -1948328114 -719962542 -1487576196 -688507798 -1108670950 -1864535278 -1163040322 -822536860 -1024770281 -495263827 -252524617 -753551447 -1228103370 -1268008273 -1934815130 -1240507036 -1430508976 -1484931467 -1335704082 -1531944083 -1202759098 -508590875 -901921065 -1647758929 -2082691638 -1962397413 -959469665 -351954332 -1126494086 -770271450 -920836034 -1724063156 -332613921 -342237106 -1017833876 -2026705577 -1602507572 -1752345577 -1081377681 -560580006 -657401453 -142856756 -106780746 -1515152777 -311636913 -2116465405 -514932927 -118606679 -557629537 -460992851 -1933332028 -2083815486 -1523557926 -1990539101 -1490417541 -1198352979 -1616876487 -585047871 -1719431931 -1952510285 -142750188 -463176017 -2118580991 -1711848477 -1198934080 -646022759 -27191281 -1737326603 -2060552009 -1376323741 -1326753150 -1417485249 -1638483772 -813950523 -595608671 -973654830 -391337670 -1617292576 -1135804753 -488345488 -2087601629 -732753917 -1723851121 -1063908970 -1169213868 -1502109426 -135368650 -955718377 -1728566326 -855464466 -388263397 -1487593793 -984260577 -400984798 -547815700 -876075211 -1048187445 -1078031774 -160495879 -214777721 -1996629887 -779042787 -164325350 -152187408 -160742679 -67778027 -978966879 -1624115686 -1995181232 -53818319 -433872046 -1380495557 -575504311 -234608889 -291621531 -725389063 -349317822 -1911827103 -1427793707 -946561971 -308189621 -12403583 -161105722 -1874474434 -706710748 -2102973726 -1393550556 -947540510 -1722109065 -1849944836 -754617386 -1963470967 -1822822567 -177175467 -1375739127 -91080240 -1777237016 -672481789 -194993562 -196751212 -1820287351 -517473095 -2009020962 -729926553 -1448984607 -619732869 -554641333 -1777855751 -334142699 -266605188 -1182507074 -1582723380 -2099395918 -1390873616 -1053366517 -75865351 -1611151586 -1003400879 -2116977109 -525207467 -1004108699 -1128405967 -691000712 -57403608 -562282153 -1348098671 -1541887647 -820514780 -1399410073 -644194967 -1519745842 -197869076 -1280874776 -1286282704 -1983015426 -1741546989 -2125619160 -1890754275 -1591575266 -549188630 -328589604 -1425017991 -1539743393 -1289259801 -479477177 -1214270295 -703750624 -1744293539 -1042244776 -2131325300 -1157085140 -1665524395 -19168120 -36045790 -231204076 -1048987909 -1646528340 -727535138 -2058661995 -1823113148 -766003040 -48629515 -1272472745 -1807268389 -751110755 -1009582219 -780059786 -77158367 -1868035028 -2001280103 -1625811807 -437115821 -64047160 -551310973 -1639070053 -2077640702 -823178294 -1067933284 -86382562 -132774162 -299831501 -1271401445 -981798465 -1969941354 -1048950879 -1024165130 -1061909205 -1918901865 -74234409 -2117196803 -2070120878 -1139031499 -1033174335 -8278703 -1701207913 -604117633 -102374815 -479114458 -1560503003 -156190610 -870565636 -790557241 -414225498 -1893444959 -1716744667 -1884820824 -652312071 -504959362 -2144107837 -1244819799 -900672719 -2141644177 -640275472 -69302787 -835804435 -674604018 -1503558013 -859450242 -805207572 -1829202857 -36527147 -1878920234 -265343703 -1455565149 -1697236266 -424639561 -828942746 -1314313933 -657478889 -1444323608 -1739217615 -1630535988 -379530949 -750228253 -1209756634 -4577842 -1777862849 -453438785 -1673679939 -1797926367 -506053232 -1201428104 -1760894834 -887335731 -1325186149 -850703206 -1970145163 -179401448 -133096148 -1416482909 -1972024568 -1701790225 -1801100829 -172144891 -578710528 -434406833 -1778726078 -2076826706 -27249404 -566716217 -709484674 -1479707774 -1587925358 -1482210637 -703870859 -1617599537 -1999930986 -426038858 -724607308 -95263419 -1216966118 -915291198 -873801325 -1485691089 -1217769154 -1527015368 -2117708326 -2077353351 -288637331 -2109547191 -204627167 -1047476922 -2021173595 -968282919 -299942667 -992284760 -2119442365 -1156575766 -1694410165 -171000288 -668720730 -1407384359 -1524033655 -1396181816 -73970743 -1980729635 -1978963298 -209424750 -76075817 -853486354 -1501873365 -462858717 -1080687185 -1840315616 -2125074018 -1318487269 -2079260337 -127096328 -1509239578 -1860232729 -1864543277 -1297479515 -1189256967 -1211541740 -2089566973 -1552035820 -1729650278 -1893576554 -1780978185 -1273283409 -399712708 -642635540 -1080260017 -1103353981 -549066822 -428846195 -662880033 -2027037642 -741073086 -1957687449 -1255999656 -1969452029 -1414800192 -1607887360 -1976129319 -1970863578 -1516384118 -1679432277 -1840707018 -113432844 -1647814219 -864467021 -1370349992 -1857685116 -1996484526 -483444107 -1314469748 -1128777947 -500417631 -973162565 -707774403 -652470488 -1019990234 -1761392484 -661404693 -853318379 -826201187 -334088407 -1501603191 -217011593 -886610945 -2028609729 -1393335531 -1628582629 -1909164588 -1776060689 -229306723 -1372430743 -321645174 -674099919 -1621100708 -714569867 -1047200645 -1672753350 -1257130573 -1649421225 -2103613099 -1402074332 -325239393 -952596536 -799392167 -726455137 -1086954364 -1946094366 -1832065552 -905201778 -952127498 -1506205089 -251699987 -1926380566 -1214710590 -1661337748 -521152342 -1569099528 -756581936 -621924465 -881573306 -1112873289 -1626286500 -1972830131 -208502037 -1747907602 -1654259501 -1816139245 -1667215904 -531072472 -792999972 -667016122 -675325114 -738116603 -1660201549 -752408572 -1347156068 -731944555 -1005805869 -1735454746 -665022468 -1527720688 -1087119684 -429660312 -1460842570 -200537839 -1037617930 -1677335870 -966132921 -672148280 -1032158740 -119042714 -1443618841 -631616881 -573251846 -1032135280 -1872234141 -1708811943 -1703514670 -719076886 -1634741333 -191804013 -277092344 -1346478912 -88401898 -1859499609 -280413672 -1333463786 -386511210 -2103357942 -1408617927 -781774561 -980094381 -1246688977 -103692660 -1153298903 -307264899 -1650470105 -404786436 -17436156 -991697900 -846020933 -584594144 -536093183 -1424227516 -1139131950 -573970645 -228088191 -219916242 -312922807 -106165746 -1916266012 -870609625 -1529880364 -877572217 -438563523 -773254557 -1665791502 -213468175 -1461926735 -1242229818 -320534992 -1342623868 -1868670447 -1943349001 -787872584 -390351886 -81606417 -1464483733 -1268022264 -22478220 -1981805315 -730564235 -1429087746 -1220638974 -367956227 -1634887476 -500545767 -979260670 -119410082 -1175521876 -146617532 -1037117215 -1851753453 -1087272247 -846303006 -1030427761 -1091249719 -1123681853 -749711653 -1117195022 -1247209033 -254339264 -1187552518 -482154808 -1120057925 -2119379520 -100339851 -637212862 -135624045 -953174848 -1929147363 -471627535 -281839668 -1677858441 -1159049130 -314565973 -1953052944 -673285413 -816600248 -32380159 -899969622 -1062111133 -1017738467 -423166514 -1841245581 -575126597 -328820632 -1012938293 -1351020682 -1260002643 -528177834 -1534942987 -65731098 -935969528 -522142821 -1036210905 -1651786812 -1059844515 -1577395387 -598647094 -500822663 -1338084448 -736566152 -1371575356 -977541394 -1288309408 -1686091202 -2088109849 -684472869 -2013095951 -498789972 -1534385163 -1427801365 -1075269977 -987613934 -926281075 -897070422 -1727380614 -254555705 -530309111 -848093527 -1058943150 -1460539361 -1546955117 -90137190 -959781195 -1292871748 -1055928290 -181911222 -1512678473 -1675682525 -1095650917 -2080172641 -427804127 -328712333 -1340240647 -468580746 -614064473 -1922673876 -1193397523 -2082389728 -1183163337 -1875117386 -775386777 -994791043 -1292867806 -989675096 -1208492457 -232391473 -1678216465 -733907557 -1785725778 -1609184021 -146790629 -1798874847 -1414771063 -1118316257 -764452855 -1911957631 -1474094156 -1729128100 -1707265496 -1482183705 -251224735 -381271143 -2080381400 -1788932993 -1825755351 -76352274 -1204931859 -518963003 -1280100954 -1165558232 -191377290 -1695093471 -917905995 -1871021564 -656383127 -207720850 -1503399575 -344066423 -1698393637 -549221135 -874901139 -642912164 -1434512291 -49169968 -1765931728 -1790550956 -1101572081 -665444580 -32222484 -397409544 -588063838 -869181772 -1154275110 -1681990419 -1885726672 -844513878 -1025324523 -1220474533 -1899163634 -1193751277 -1585482265 -1223335879 -597681975 -1459936806 -9747820 -622853568 -1464621898 -1442677772 -1994939374 -283878207 -1579845062 -968145526 -138262163 -194867487 -225292334 -474587877 -644183781 -1331742740 -1525662146 -848942642 -297633426 -835576919 -1145709900 -1607910298 -214164638 -282478494 -1677188788 -641609394 -1013693371 -1156714746 -1882763378 -432555501 -728160212 -1826862478 -1503966587 -1283902519 -633951777 -1161143272 -1151072215 -1538025329 -331045564 -1900148418 -565146789 -101912042 -1291223235 -1266657710 -710739259 -1090681399 -161862201 -1703715105 -1940304284 -1154921493 -1808331265 -1434998511 -1778618567 -269889329 -544490039 -816265606 -850503006 -752867410 -468911746 -1882214179 -1939586143 -1970027588 -350802070 -1087779475 -781349414 -277099693 -1469993555 -1529803797 -1738194295 -1611465924 -1991512351 -667961115 -1525436936 -1358805466 -1102364864 -1104846579 -2012841291 -513686646 -647198382 -458534219 -1413293297 -2051306859 -611910275 -76806442 -248198847 -1064779055 -760346934 -1623220088 -1975251175 -96799252 -1259907585 -1078021675 -2138245633 -1503004933 -153769270 -977293549 -1417745787 -1722378644 -2085791795 -379644937 -518540922 -628636528 -2022066503 -943002146 -607752962 -1071807202 -770812978 -1432362542 -425560524 -1275182358 -103093846 -1826450240 -1017933462 -1552963832 -146878786 -1133045899 -1364926544 -900107754 -1236212010 -110967345 -1012361819 -252156752 -1013295333 -909341021 -1800907895 -1224470447 -339013528 -526249605 -1339452889 -113633922 -732364871 -1627605940 -526338094 -679203865 -1503775250 -215585207 -535661560 -612390696 -1708791248 -1355693805 -344285965 -1093268737 -697579027 -1097477816 -572609429 -972450996 -1633336102 -196406713 -325259952 -1298131649 -1412254870 -1778333446 -1920311623 -145716998 -934227806 -1313792225 -479067121 -764910044 -1005998566 -679145931 -530078512 -1267383428 -22979803 -1821976208 -984805283 -965923952 -1454973591 -344855548 -2076315630 -27529660 -982011515 -1255705410 -1319026801 -409756426 -1943679500 -2047601983 -621085106 -1806852122 -197362227 -1352198221 -1723547793 -260842568 -966916849 -962724294 -1365412760 -482005478 -757752262 -964240724 -1082248006 -155746752 -2000578818 -576733047 -1558622018 -754730420 -1715749758 -195770790 -374720326 -1502466078 -1834651520 -1417893014 -2049339186 -1900968516 -1463631993 -1985213613 -31770252 -1386680908 -1453483512 -1070901559 -582056606 -837364957 -1132493508 -670825595 -276628415 -2139158797 -1818166752 -1383787701 -71993697 -964772218 -1425133076 -1326493341 -1345842680 -132668909 -678327977 -1815111163 -1568110906 -1320681158 -297247114 -785282076 -1948840517 -741985175 -107298096 -1620319639 -472045066 -856832244 -1901671773 -398370510 -1706633871 -1603880565 -1205918811 -2074279738 -170031168 -1560590066 -1619458451 -1030443879 -1362144945 -1394413595 -420251454 -92472395 -1552865984 -649831097 -1756902284 -356540938 -904169836 -788147480 -715561664 -536463648 -1208181830 -1454134425 -1273378115 -1991436450 -1539776655 -1848294235 -930253790 -1094498370 -2036668035 -1537814712 -1086172939 -1697586273 -2012239916 -1143795256 -1640743295 -135047938 -2007962734 -124157733 -1512397294 -1244874366 -1817780288 -1330938194 -888559406 -416655404 -1930685808 -558468886 -1683029612 -24090600 -1163788564 -513338272 -1234527505 -1864262868 -879612746 -373996074 -67380949 -747727874 -2135559721 -1458038536 -317778635 -113688356 -1647237109 -1902397486 -1858010666 -1025552435 -756024223 -1985860309 -163371689 -1303876157 -1323436711 -1512669798 -1529881800 -901707069 -198611804 -879002390 -853161017 -328901700 -227964522 -288895006 -2145323622 -203681824 -191482650 -1318395344 -534276862 -962091527 -1467916026 -972512246 -515281205 -1677147731 -2099048042 -1986572625 -1397848466 -168069882 -809510969 -1141952238 -729910827 -1184677725 -1557632738 -1307770636 -205952207 -1842587732 -1657821984 -1561248910 -1955231324 -778096074 -1432789135 -1152858134 -1489194904 -2124329390 -1688426355 -532837027 -385104799 -2088128382 -995957000 -1561754282 -1859083940 -1884199377 -945070577 -1012134427 -725346702 -1784840142 -1756685298 -1004624530 -1208042996 -1268235034 -1451019963 -468222809 -1040668255 -1404540617 -973902095 -252153231 -954117886 -598917853 -756501882 -1423940534 -610792770 -622252730 -2103755867 -1654092461 -1156181612 -1512314828 -2006351951 -969015263 -1871030040 -798839259 -23664969 -452659288 -1457575742 -1129534465 -330313775 -338388930 -766049254 -825348213 -1030539918 -828788771 -873939755 -1664800452 -736760001 -334628205 -1984053589 -2010083354 -1405679721 -791470200 -725941882 -1050612167 -1028145135 -1381860183 -2035937023 -2136597910 -1727011883 -499744729 -401116886 -620335069 -2085882145 -1898157387 -1461627124 -501635035 -2106718770 -2059479301 -527189561 -2104907852 -1688151533 -208870967 -1506063171 -13967808 -681231533 -1223052974 -137864934 -2108574272 -1032646710 -1877903563 -358023382 -49802380 -1657461977 -1953062202 -828884619 -337373444 -878645228 -1292790224 -1833238069 -1284342174 -1580782421 -1689952710 -416481748 -1159533063 -2005576963 -828693829 -1425733208 -675493630 -1422881368 -2136742631 -2011854083 -1101550966 -310564775 -1276911215 -1242706034 -1881846363 -52669925 -460166911 -936660330 -1395033800 -106618654 -938356180 -1979897339 -875466308 -1551772959 -1606712745 -1561727837 -1414622825 -774363838 -982124446 -1006253080 -661795435 -978068232 -1552941086 -1912070411 -1222103969 -1367807075 -2068552037 -541324576 -1301420140 -847348285 -1418562738 -420488572 -1930230974 -1504008436 -1987258662 -43170443 -1863646462 -1257095339 -1057243387 -809910031 -1406536331 -156128941 -1981578400 -1211771124 -1649856567 -830471505 -1238362682 -1897573297 -234761082 -702045635 -1005830827 -7440205 -493473909 -234143849 -1065628839 -10281093 -995638291 -500179413 -1264399933 -1418986866 -1106356927 -1627456363 -159881102 -619638917 -1123073716 -1266171329 -1126068380 -57881649 -6782652 -179398873 -89818123 -2039673067 -503780008 -1650057982 -2068169763 -558896399 -278306015 -269810939 -1374472956 -285380713 -1062659640 -1646561028 -1276922354 -1429919207 -162618472 -1529459920 -253620850 -1998070302 -1365777575 -171000242 -667947608 -1298424787 -2044057942 -1185930135 -1132051138 -1825847593 -1626663568 -1867761066 -1691768063 -862348561 -125131124 -692310655 -598779139 -572619331 -1138873910 -532059659 -204782705 -1514120441 -141034937 -1699723518 -1425694632 -27146798 -989700822 -1640869339 -105985799 -1039380430 -1234902312 -1721193176 -1488983942 -726174703 -668667420 -511403189 -923842229 -709574993 -850215560 -216729782 -445180762 -320040786 -1626438214 -227720035 -474769291 -1545725232 -894296465 -202641902 -2040866419 -1233094249 -1397849393 -183649971 -671061858 -2100017009 -1092131818 -916734217 -1504301541 -471023456 -866502150 -1215024743 -498856278 -501306458 -879292425 -1432811968 -1536612365 -205679733 -1558084508 -310734438 -1980953609 -1448327022 -305120009 -2108525874 -219221524 -1521699263 -816761118 -588638602 -1939305732 -1552127205 -1118074326 -993285832 -1764590293 -719889381 -257959269 -1899434437 -1450170004 -1215347425 -1627205358 -236207361 -1387336671 -1737474018 -243188620 -609756099 -378792409 -1222488355 -1385731636 -531454537 -771915486 -634861675 -1421413429 -1087411975 -1047227855 -2130071820 -1564683250 -1694125235 -1824632719 -535629073 -66381687 -1133000616 -603855163 -2133492466 -1073422103 -2142650321 -370668504 -2122970428 -323188491 -842824974 -557202406 -1872136722 -71490810 -1102684997 -42870969 -1125354238 -940198937 -738859533 -1261724177 -1544712361 -1050842744 -608485480 -498335346 -335936922 -357340091 -1450632425 -397322584 -1274010765 -1886966765 -211920459 -1219267687 -943055735 -1508423285 -1025698160 -1057740651 -577491491 -1420888444 -853923668 -261875175 -1142073522 -620847368 -2106156850 -1205224449 -1141555839 -510083775 -223287601 -1140778698 -333576870 -1494135420 -1407719569 -715457184 -927951935 -1061927031 -71019800 -1776354515 -872673011 -1849470514 -1372622120 -1390634766 -1333981861 -503863147 -899891508 -1896732782 -1140611006 -1810144720 -1848965638 -1477105776 -805817912 -1349769002 -1697853353 -58602535 -1385295419 -1789890006 -730403666 -877888210 -1454490580 -816824259 -1649849389 -709830859 -855588128 -319166984 -1972833529 -265612223 -1673613495 -681202059 -727683456 -256475327 -581141360 -487210964 -199525937 -1210450192 -923788913 -1960976628 -702656287 -531640756 -1754214572 -281321941 -1566355340 -1879654454 -1867961008 -757225963 -708668019 -639089071 -1604297650 -1773415465 -868183542 -1556892676 -1754450484 -2098811278 -154763724 -511212751 -2018118057 -1153463281 -922482298 -1475534793 -172110395 -2146419903 -1449007415 -1003066925 -799179525 -1447548337 -102663096 -1029285931 -1227865732 -1568993701 -1125431194 -86114782 -2074646643 -2041636209 -1286052897 -268132824 -1087681562 -1283209270 -1867417716 -216051907 -1937037519 -2084976960 -1717098621 -1391274761 -1352959591 -1634991501 -101410295 -1448295994 -1931116060 -1347263309 -386860395 -1529659296 -1457049635 -877188704 -435311473 -1950625029 -669507301 -1742381274 -1115061626 -1898444460 -1991495741 -388796845 -1863319741 -60862786 -718628330 -538311582 -54153863 -1778392760 -769718374 -215222290 -878566482 -2116789849 -1672895941 -1506173863 -1874368252 -1069593521 -72698410 -2071465374 -113655654 -1097614595 -723970435 -128757143 -1505269872 -1713377044 -1119755885 -1337960534 -801427201 -569533223 -810264282 -917981947 -1000063181 -1854861645 -1787047663 -203785099 -1927225575 -384391324 -834172292 -1160464028 -472436542 -993918435 -1659330679 -1148082011 -673790582 -717041043 -1778066384 -1726767883 -693804023 -2075494998 -1267553165 -728265915 -1455929152 -1372583746 -745682948 -2126226791 -1365790257 -384146616 -1016332230 -410861372 -1187154099 -228377616 -789314923 -1009423342 -257297694 -1517761647 -1209242063 -2093601280 -637156865 -1341966113 -1551200397 -573597799 -404116410 -1641211056 -1554256124 -391593960 -1629791312 -748663299 -677378520 -889972893 -550811296 -1830933302 -1202828851 -1680929546 -1235503337 -1085202116 -413349641 -57818242 -1088584850 -1432385157 -805650829 -689088668 -133934805 -479405579 -10922709 -1041860168 -2109669585 -114219478 -1983869975 -1071566503 -1020352179 -1402151158 -1616453975 -2073823275 -1088192115 -1274138953 -1893938834 -1427367204 -220776991 -1894629368 -148270260 -897229300 -102675866 -1243911321 -664268502 -1740716008 -1044223375 -1025900341 -160829424 -1525701242 -1506029114 -1589055456 -1148414900 -1973688711 -1753754215 -1134036430 -832911885 -1451640049 -152589976 -484252114 -2009741515 -2102842589 -1337014644 -2083723147 -2119100000 -1844898152 -1834345278 -565851014 -1200403382 -1718261356 -1606009083 -472698838 -1107360013 -1306453589 -1692663395 -877807956 -105661602 -2033052392 -899244927 -1767064150 -1495814687 -1713872627 -859084778 -1105305065 -1128680905 -1016916384 -1638803062 -1885290259 -2099655175 -1453238721 -1251666516 -9328400 -16112569 -221007661 -1476532764 -1912623463 -1927314345 -1876348714 -2142963650 -1341821713 -1271753244 -452033317 -1674299380 -1471453019 -289211481 -1021868006 -1108851783 -608828215 -1963715197 -1632628883 -1195078862 -275883243 -352471228 -1224030570 -1535935377 -1712444299 -475496199 -877966106 -616205005 -1391373201 -859957024 -732758058 -1793448908 -415327464 -1086834698 -2082351551 -541522498 -332927900 -1324314865 -1239418547 -316143529 -549749225 -1160575181 -193101366 -606867745 -1226350612 -1874175625 -2127078826 -653556973 -2100674453 -1404374891 -336028860 -1902542057 -2140331816 -58260615 -2081096920 -929775751 -1650031485 -1622834684 -1940217088 -1836901968 -586466904 -1946799445 -797426423 -2047934081 -1907688898 -596458976 -232345436 -904472606 -1581835576 -62975972 -1875207080 -135390188 -1317707543 -1859307337 -1343865462 -1261304335 -930878808 -861757661 -931293059 -1381623277 -201741528 -1940666130 -794016274 -568134660 -926936058 -1167951468 -1759789096 -1630549988 -614828949 -1886320126 -81277021 -223292455 -1222359876 -1373868730 -867572566 -2025637279 -827492262 -558349462 -1823354091 -520564747 -283324951 -871206058 -816711560 -1903200943 -329326936 -932455033 -1583567472 -1253664633 -1379426114 -1928728633 -2023967013 -672619011 -353800069 -2083024787 -1119181715 -277819932 -690148546 -767435175 -496202343 -993777500 -1438119781 -550712282 -166805004 -1025542893 -595651829 -1699011336 -193469993 -359930793 -2042887999 -850050957 -1745214455 -1487694459 -528670392 -1223430705 -43938910 -1894369449 -74778921 -531391752 -1864171638 -1493793783 -2108277451 -338943457 -1496049955 -1373054609 -69542801 -574752439 -482798067 -1193893703 -1831752400 -2084507055 -261856227 -823614486 -1956561287 -1655947745 -125685095 -1412966664 -856553322 -1508797013 -864493715 -1818996050 -289413658 -124889551 -927160538 -645819534 -906556000 -90216535 -145848963 -1004679914 -2138881884 -1459057255 -259519692 -208176387 -569675346 -1051441896 -2088498556 -775020477 -1280837884 -666238860 -496784562 -41713998 -1007495464 -67706853 -1930229108 -1472646574 -1021937543 -130076495 -57298819 -948577077 -1963821458 -1271073863 -1918578732 -1085789019 -1687493774 -2038817336 -1153894620 -1729545930 -139799718 -266750608 -1479097367 -2066233144 -222395571 -1180816017 -1078415792 -172235464 -2100970939 -2092447799 -577954521 -613099066 -729463956 -116567769 -649407519 -1080277779 -1401879915 -1352640168 -561416434 -1830344967 -2052100741 -1069783167 -1112595085 -1245479166 -1245235653 -1447479956 -1100867276 -1704688827 -1125780762 -1666336864 -789432721 -841770681 -17569131 -1079125078 -1355787031 -1911135347 -538868850 -830222551 -1349160098 -53938413 -304808257 -1163877304 -2004791452 -511512334 -610758597 -47907119 -2016065055 -1008397019 -187756209 -965127220 -949200749 -1708458527 -58619252 -1666258038 -1612087786 -1705728750 -1423897447 -2034113208 -1548510263 -457672248 -1958532229 -421831587 -879963962 -1981916092 -444909627 -58042135 -556587207 -122421717 -252463793 -1878766126 -1970217841 -1400900594 -2073061297 -1166529751 -1487311594 -536309278 -761168887 -405398630 -1716646126 -228642237 -941832776 -281504195 -334531024 -350732522 -2066369886 -373134718 -622956186 -1041838977 -1753512448 -1365625755 -1914328796 -524075018 -1298391179 -1479208286 -1782965130 -308129672 -1152324387 -1108443663 -192006316 -1529715218 -249447042 -568355950 -351189794 -1161805802 -1548795690 -959876543 -747901937 -766069268 -1161723511 -165730853 -152156212 -1783915154 -1242797511 -1271816655 -1517781994 -1551214092 -803769664 -1284603218 -1673181635 -2012865627 -922701798 -869703999 -1341409711 -789686571 -813260337 -1880554451 -1961825058 -2077317415 -1832144626 -86714849 -1422554477 -937652888 -897086930 -2004830570 -1168968560 -1674185164 -1699308354 -890484225 -554833632 -714857750 -1590682932 -584116621 -1100298710 -738734653 -1310349664 -602002863 -1066657424 -117840012 -557159150 -1145133130 -504071496 -106645857 -1395557001 -310123273 -299038042 -820637914 -1321439564 -158874874 -887834097 -1111288923 -767650902 -1974442385 -1535851251 -298538617 -1016736527 -763430110 -1902551592 -153102914 -515266492 -1429866340 -1421566450 -1511752275 -1141458268 -1017691625 -1783376667 -782381090 -436609049 -136664744 -1264333765 -306901290 -1981744583 -1857325158 -241637714 -313482721 -926705756 -1592233048 -867112469 -735237941 -523169549 -1112559225 -642780146 -1363169412 -1432761288 -684833605 -1633534962 -1391163086 -1623521513 -598850209 -1767092821 -1977688184 -253420222 -773599153 -1014965533 -1063105010 -541960030 -1244077283 -1306108189 -182492889 -551337507 -2085026991 -410485991 -1320576573 -686970666 -1043897190 -1986159987 -905092541 -1263664886 -1949953819 -125899066 -714209967 -1440812286 -706487230 -493790347 -1257550021 -109149173 -519116073 -1705264797 -68690317 -1279439380 -783902249 -232924598 -2048513752 -912801160 -1973405599 -1290458125 -1292355822 -974694596 -686815656 -586127767 -541891180 -86915333 -497121771 -1414218367 -419089173 -2032852098 -1827870963 -1273704806 -1039681146 -1994068830 -685030728 -651613929 -1656188650 -2027091783 -1651020873 -1071609624 -1745086826 -1490117503 -450581607 -897729527 -2067540114 -713803891 -1058343895 -2126278811 -92606750 -1663486822 -133417061 -367616759 -224416094 -780007726 -1349669594 -27103097 -255218115 -926015746 -732653213 -31318993 -244821836 -141930000 -1710661830 -582310774 -814199239 -480811189 -12689862 -677629581 -814587826 -569341957 -1890623914 -1548081586 -1842832497 -1476620045 -1232071583 -1389771107 -1850850577 -945020844 -176271896 -1221806859 -669246599 -1655730054 -761919752 -140284803 -1977123262 -1496194403 -1653308498 -865017353 -2029845328 -685211454 -1541592164 -149299293 -1012317755 -1659056751 -839141409 -924551214 -1888067653 -1534675899 -2019234023 -582151020 -276697408 -1151240501 -71440837 -262788786 -1464748070 -1415766929 -675966943 -787918371 -1159893995 -1629310146 -1251640925 -1726704110 -1769454859 -874271557 -798945725 -1813039031 -1101526734 -2050781198 -367060436 -1611713668 -1860378465 -18960935 -848854789 -968571702 -858551254 -728301785 -2058796242 -1931918830 -1954516817 -1654278807 -2140615187 -525909718 -2069423021 -147567135 -1964709307 -1160766477 -1260729591 -2008574635 -1818443252 -1735955907 -498100807 -689007243 -912908477 -1629598771 -1807594006 -1928788380 -880651195 -647339241 -678467785 -2017380572 -1643454768 -609618062 -206288197 -1047120721 -329470682 -1200910408 -1649912750 -1774739186 -1641125919 -123358565 -965682600 -1693537821 -541900209 -238665736 -1903056003 -40804003 -745595028 -648555351 -1790275732 -770849607 -2047986145 -635244899 -1419808256 -2026556775 -1249076005 -1567766610 -1976549227 -438322746 -1021482812 -1077347166 -1539191105 -596889973 -1033661074 -1746450135 -780931749 -1847338626 -2049202503 -1751220982 -1507662339 -1121380620 -727594268 -904976258 -1456780152 -642955217 -10620415 -256172204 -1929004040 -210281521 -1590924132 -342997727 -916689141 -746709209 -47242595 -1584828422 -971614813 -464510303 -921605676 -1774534368 -346233440 -1612226357 -1887207900 -2117192757 -2002119756 -705474249 -648487856 -655887267 -463736418 -799822363 -1514308368 -1152040379 -630088501 -655572950 -1623461540 -1738367645 -229992080 -6323960 -1060097017 -1526229207 -1789602281 -189576885 -1500457694 -291996337 -582302564 -676213769 -641355659 -1044136520 -1713612003 -773744504 -1310396143 -1383175416 -518737937 -1792383986 -1844536233 -46539939 -512707265 -1366611091 -1295001772 -348019659 -1568438032 -376236899 -1221704725 -1100164108 -623962486 -774853901 -628678699 -583350853 -1114937816 -1965053437 -502108446 -1473402859 -847917656 -250562900 -2142712180 -1410332717 -1684962680 -300909771 -66532512 -1520432744 -1005212755 -356922336 -871875081 -1323562886 -1485809376 -1058335116 -1978730158 -586008064 -677526506 -1229689948 -16337308 -1850712387 -769945161 -1879347752 -1008187788 -966178086 -1431236435 -826432998 -2082652237 -1300184806 -1559926217 -1199566543 -538410165 -1711038344 -467930631 -424999903 -442759799 -433104938 -1372613283 -1242111307 -476204262 -2040962712 -704007053 -1759128448 -1264457287 -235451897 -1575155105 -1600933166 -1061107699 -1332892405 -1520728978 -1689050299 -282045600 -843990271 -814996262 -991474868 -1392489403 -292611215 -179138875 -14999031 -833127318 -777455186 -1398802754 -1174402769 -665139006 -1338891207 -1410862783 -2003847354 -1823926424 -1549830890 -1178613767 -572422041 -2117988174 -338307746 -1549073413 -1332599710 -896371407 -716453744 -497266679 -1702203476 -156675798 -435185764 -1985317513 -1778017552 -906048459 -149909536 -531253621 -1690087568 -535556507 -994248572 -765492297 -54506502 -1262745492 -1530084390 -11669905 -715081458 -1055575994 -703323291 -1004558749 -102461729 -1939878056 -433758438 -1618569548 -1123036687 -643824926 -1742917696 -1540771592 -1390331218 -527217919 -434037111 -2007259365 -1187536832 -218520206 -472065872 -1206518686 -1418960628 -665374861 -1007938898 -1078051150 -486148311 -1666869789 -1156368608 -360189306 -2092748696 -1340163106 -1312832806 -1533981164 -1080241113 -785634453 -1428789815 -508279951 -2118672338 -1099633859 -302002131 -1245957856 -700643895 -1069106764 -481708099 -54670703 -1874988052 -749153886 -332739641 -307729499 -869067717 -1384836372 -517138018 -672349117 -112658905 -1525123328 -382963104 -452398869 -1375680903 -1259993119 -368107966 -2037681202 -1386243305 -541140832 -360718379 -247460372 -1538131612 -2117343945 -248169178 -566132172 -1630858594 -1506602697 -491846702 -802963211 -615449529 -1578989951 -1628680478 -1406229084 -1434679553 -712858755 -205828672 -1913818634 -539716872 -50542776 -1216395667 -2065139476 -1168470318 -1890166458 -302069535 -231333237 -1072313189 -685001899 -167084926 -1435224653 -1284419867 -739085025 -756600927 -941106202 -954876859 -470075182 -2108730208 -1505979415 -753764363 -511615288 -193622828 -781144991 -1136329626 -719951411 -1300497479 -372570387 -1875663304 -1360696015 -664567202 -318515967 -1768609045 -1691061188 -1866802318 -610475956 -1740010773 -2076240612 -914185781 -1622410629 -1255575644 -1285533286 -124965335 -53378579 -1633096454 -463610071 -823791981 -644752458 -152078844 -483591178 -1638808398 -1974972411 -1854063645 -1259963545 -2018541395 -1826054106 -802560265 -285587048 -235564691 -1323400216 -899298333 -517175145 -1296342606 -1408580227 -148150661 -1034612554 -558105319 -2015009984 -455687898 -819816484 -400567436 -2123147154 -1145938726 -1158821586 -785201259 -590549198 -1838437999 -632736157 -57570755 -1224038135 -1663080332 -1891474219 -806772192 -208483786 -1441163045 -159242802 -629149052 -2046122783 -1529974470 -311728112 -1501763351 -761337066 -1084499436 -1488308763 -115859485 -1630180213 -842471465 -1058227584 -171439834 -1613719411 -1211162714 -14244285 -1033013178 -1594680298 -1195853926 -417482009 -791050514 -114730221 -1977992988 -1081293756 -1297536178 -2141592008 -1910954736 -1798307067 -462027191 -2137615232 -1645273561 -1113300955 -224134374 -340106980 -1724028193 -1892474427 -437398872 -526318023 -341870568 -1299880651 -742960426 -1465956124 -244694037 -141495854 -856420949 -1431487649 -753619402 -222739408 -517233535 -130219689 -316476730 -1854891138 -135252867 -1157237143 -2072755169 -316403749 -628299471 -652116798 -1517973345 -472283055 -561746073 -928136699 -2019771932 -1032852995 -1049968264 -943485649 -144053295 -889658896 -1715914658 -819761443 -1622976996 -37087578 -560665816 -2099610123 -696049757 -1164840690 -1016550778 -1936513961 -1875472242 -297000628 -937559168 -1469418537 -455410859 -458589305 -191640052 -1816367111 -1201992472 -508809575 -282644671 -175158333 -1833506341 -1498222384 -1377846813 -1155220490 -391122903 -155187254 -1187030520 -298869010 -127200737 -1116557994 -1278097672 -1856136010 -1730463748 -533181315 -1876585921 -1834734405 -663457562 -996149310 -498941158 -1927884618 -723508790 -959824216 -2015925695 -813657146 -2107272373 -626466687 -2060770815 -758828889 -1879241537 -1370515930 -351637788 -101306372 -1849145780 -209785076 -1837107605 -1895124316 -2024410355 -1681417064 -839283775 -1169812929 -833109418 -476609886 -268350692 -454421744 -1014402676 -193101999 -617506576 -1792040528 -367004921 -678673063 -1172520624 -1244182696 -930300833 -1885150071 -1890999106 -1411482589 -1683508561 -1631335502 -932060865 -1401236837 -1281846457 -437456095 -1488064984 -313633126 -1307078944 -1465586645 -477311425 -1321698430 -214668442 -159977734 -96249294 -606698067 -522056113 -1726393196 -838890555 -1003415330 -212371419 -208617819 -1546372029 -1027595409 -732549889 -442236172 -222440537 -1936559579 -494690321 -1351027510 -1374760839 -828863000 -2121506558 -1489729165 -366235782 -636655772 -1510030650 -123394304 -1566347973 -1755837285 -1784455568 -1735601021 -975982746 -861916236 -1448979437 -532840679 -446483963 -748103523 -2006641523 -1540884573 -1141719238 -1108847121 -530473981 -1471579970 -275393291 -707782552 -789430731 -808324751 -532539135 -1820884896 -1970477322 -1467030467 -1121307662 -1648872809 -1476319975 -483762387 -221350767 -800664365 -633450453 -1325325392 -1043476660 -1360763218 -1794048023 -1894718681 -1649353851 -971258281 -914727920 -2144206214 -750758391 -1529851412 -390975953 -1980365898 -160602833 -2012353599 -906981790 -804018124 -1165503144 -1412996921 -1365082721 -1377490946 -1616614762 -481203090 -156919028 -228185080 -1848329665 -1525725800 -1918775420 -96556941 -1482353902 -964242067 -1104819807 -1562884287 -1523725152 -506139189 -498623756 -888276498 -2104271589 -1731897527 -1008384851 -2130732280 -1927616235 -507763003 -2020261890 -677642513 -1031935950 -669578478 -791169466 -2113956485 -1297187427 -575101245 -2050213215 -1558388390 -1123111918 -1908232343 -1140204503 -1420499740 -763426481 -1841558989 -1547607559 -318311649 -482120066 -536149131 -217061905 -1732204729 -1876561571 -1425483955 -781265753 -1018492913 -218238554 -33308002 -1461841394 -1955387278 -1251731305 -1098237123 -449380296 -34648373 -367136674 -745562087 -94915964 -1819740874 -2070252391 -1201886843 -880986619 -1989843115 -530399074 -212618021 -58290339 -433184541 -563017257 -818089717 -1443565525 -1883018516 -425692573 -1347046254 -1033784304 -1670093098 -1643431796 -223527658 -880449403 -1550788391 -91463898 -1782926081 -1799316776 -252337178 -1898231468 -559222844 -1469899836 -2102152211 -471249833 -376253095 -1493910897 -1929128802 -159672808 -1413808953 -2128002663 -1148099903 -974501426 -1735174760 -254265060 -2087889537 -1276656379 -1254644676 -671139639 -1259798629 -1394281830 -353160746 -2075341361 -832859753 -575457525 -1595760234 -18985455 -1260962429 -1626915607 -1808813245 -945701783 -883395434 -1672607527 -953767059 -1145019405 -740179068 -1964312452 -933275433 -339644743 -397661875 -534023661 -1001509614 -395257312 -922722613 -1219541704 -1253492160 -628156050 -389123698 -914287171 -1178988712 -431671715 -906754439 -1277897161 -633631280 -69517487 -149300041 -1024889391 -349661950 -1253135458 -1075516477 -835572140 -1065389247 -278425643 -132915088 -520891136 -1473977580 -1917318915 -1386881170 -524319652 -1114987523 -652995339 -1251226403 -1202283797 -1110141556 -811206556 -1722395536 -222211992 -242887411 -1989787377 -1741094155 -957289063 -209798517 -2063010492 -1893858229 -72638969 -1072440487 -677015738 -1235146760 -1534663418 -1809465856 -1176716625 -899411152 -265840431 -1214138057 -628710205 -1112872195 -1607899642 -35069246 -998298244 -108852897 -1982056282 -653599310 -664748765 -1222561661 -470301931 -1624733357 -1638959494 -219475589 -1496802424 -1134899210 -301269816 -1822841533 -495937029 -829612396 -1831703248 -1258409391 -1667678881 -1869875970 -729737592 -420600727 -1667736412 -689315840 -1804530962 -1987815400 -810331421 -2046387120 -1677719135 -965216835 -307876407 -1190666826 -1284721836 -1519310714 -1474607368 -1764747596 -1216197255 -877912639 -1865068783 -1539724269 -967842733 -1491671153 -792973393 -220302869 -368511855 -235909037 -668372497 -1997083269 -1956583120 -2022894976 -1982245975 -1694285914 -230197378 -1309283799 -2015362631 -2087658733 -1692500845 -293313753 -1249276806 -647661723 -1803455465 -1091806497 -1891515111 -1494044036 -2019312328 -1898223155 -419506253 -452781070 -1356882169 -989766890 -603790568 -1047844301 -1753261507 -1443027662 -1433089663 -1908864936 -1034776819 -1171423527 -2132626240 -1547147250 -1171832874 -422586681 -685926938 -681829870 -541884698 -2125456006 -1296108644 -1771348187 -483180548 -1179800929 -1197700952 -1395676933 -178336750 -1566069685 -1373618163 -951260291 -1963442569 -1345537381 -1443959557 -2063063399 -635582531 -651938339 -666096579 -252951442 -1484748281 -404380627 -1786938881 -522969672 -2048193780 -1977482697 -1094767507 -117602653 -862833731 -1836932373 -1097483739 -672157290 -1183589810 -452914509 -1452107795 -1571546057 -1073205546 -650460469 -1597339253 -787754024 -545197613 -1971043589 -246861701 -66202703 -272300175 -261389468 -1568730561 -997804508 -400566533 -2107970433 -1621342872 -489652921 -439307943 -399819615 -291937842 -1746660746 -25703532 -355049277 -1603627173 -1242126761 -735939640 -1579206407 -971689176 -1714329244 -2090995756 -1943271584 -1634208712 -1977461101 -731803535 -783166376 -750008969 -1819217740 -1867873841 -1439693841 -1236134938 -963101888 -1269184177 -223397188 -835123760 -2119401175 -464295436 -1605303301 -1495522646 -1100506834 -2089191074 -1676752268 -1894952342 -1281526984 -1510524325 -1978139088 -1389312809 -590687032 -2007530390 -1447686713 -280864881 -326998861 -459204154 -1935472607 -1553304740 -1581552248 -1743533217 -1148414804 -1972075239 -405934075 -2125935653 -767601185 -1138848766 -109464451 -1523026125 -1642494282 -1646599036 -1915722810 -330948199 -263734863 -185595033 -1149464187 -281702497 -1519909091 -794111372 -18963099 -885225137 -212171143 -1137546381 -1842599873 -1861875771 -1561862760 -1534790039 -1790101356 -2135079469 -1976377760 -1851444171 -184136967 -266069042 -761435840 -597110407 -443528018 -459659789 -1003395464 -2025967204 -2077574443 -1857046928 -2007877045 -831466357 -778971070 -1106461378 -1235480673 -704288268 -43058012 -2121502292 -1418030503 -65149515 -1898722282 -218399154 -585028555 -1394787919 -269063981 -1705251732 -1996590509 -117216741 -819261688 -1813529299 -751526422 -1553246547 -603502497 -501202298 -1276158952 -1484323675 -1857962173 -210530584 -1481958679 -764180047 -1621840869 -269553912 -1349587461 -794177413 -1128914186 -642702857 -64173189 -521996729 -728326308 -323470656 -1290204835 -1330278086 -531542485 -102573875 -1677232231 -1371755895 -1864376720 -645639663 -30947750 -447791676 -1251999444 -1309882002 -1331942217 -583304791 -340773782 -46067525 -1162779755 -738154585 -151081376 -899015678 -61559854 -1696831971 -72104437 -678495751 -339921487 -753930989 -1164614823 -1515371403 -1838600448 -1215532853 -448726460 -1930528603 -63808098 -828363233 -164373530 -961948668 -1214368460 -206126132 -470777913 -1034628243 -821790342 -1362944137 -1941531657 -308543034 -1657248580 -513982470 -1324145056 -532922331 -1818809127 -1442766091 -1331833160 -897867439 -90459804 -2086987399 -1146808542 -745433569 -82397585 -1876742427 -170163453 -1636420414 -494830969 -1567414799 -358629044 -1639229026 -454532619 -730395154 -734827026 -59372085 -1434220387 -1585590381 -892957844 -1326758872 -1513654903 -906672359 -2045862248 -1446130019 -2034796234 -143226363 -2023798301 -2132043721 -346685005 -611744724 -1589358079 -1939632367 -599430709 -786138086 -1303415058 -16196759 -1635988991 -1833839196 -650065428 -1400336107 -1175662876 -368920885 -668025306 -456811426 -375598757 -1233870366 -1557145930 -1715923168 -962789013 -305661346 -469358598 -802521155 -1775748925 -1431940116 -1915781330 -1314493839 -1533675384 -235963947 -1591244867 -1438623578 -428093873 -903506061 -369499290 -1799343553 -702378217 -153085560 -223597814 -2059561295 -1905262719 -621857816 -1908887210 -1409135937 -898034043 -743089585 -1489247790 -865700745 -630712790 -410579938 -752060155 -1933762490 -728655732 -1565132530 -655239607 -315933033 -1306910247 -777779813 -412357802 -567849345 -426614147 -1803554943 -616249596 -2140814138 -1722195528 -1155644830 -1080554342 -1755106962 -247335142 -1580874649 -1092545059 -1419624763 -1090073571 -683515240 -950610877 -1786159706 -312277329 -2142518882 -309056878 -1703490100 -306128896 -1885020507 -1860900605 -204633327 -1151008042 -459469718 -2103839461 -911573172 -661964106 -1665438082 -715989176 -1279206891 -1171426920 -42168744 -60476898 -675459655 -851863543 -2144576299 -528326045 -1878441617 -811162372 -979795048 -510766540 -961100721 -1995308760 -49697768 -2046731740 -1027296534 -4325058 -1824289455 -1208841966 -1811621942 -906832028 -434451837 -387624659 -1489742462 -589718461 -761143122 -2119849922 -1563935324 -2008634835 -682741005 -822945114 -1443844318 -126241526 -27484246 -218738417 -1992054502 -1189958384 -115355377 -1747571645 -302797496 -1728755529 -1887915640 -1127277055 -1044729551 -943265785 -743766341 -2126067647 -838540696 -1565786058 -901666468 -1663714444 -1811576368 -140869810 -1071917676 -480065849 -370662364 -2019775448 -1091946407 -2095498834 -317092238 -1462315859 -1339785945 -1416338820 -1697804392 -1383198655 -909315810 -1377186618 -796741360 -1271498475 -465098028 -62081516 -1874470617 -642558429 -1931739087 -1081059863 -1661463821 -492577606 -202364857 -1679538398 -1476799018 -2092587147 -772492710 -1746330855 -923676436 -70575689 -754631879 -59571171 -485291495 -151265159 -1840372912 -940564243 -436106534 -280829727 -1883649230 -288684536 -755437979 -722791989 -1797451691 -1118108288 -1564085166 -232062035 -436319293 -1709186593 -1557806279 -2076990576 -633928847 -775758762 -804291997 -1473519361 -658483123 -1142615270 -1136071416 -675183235 -501039897 -694168992 -1767078040 -1729263917 -1842458168 -1627723483 -354399648 -1422730805 -1753713937 -457084084 -663194469 -869312553 -1204827730 -916350547 -1498410792 -249452775 -664710481 -579122473 -915515507 -348795394 -1721314295 -1377147328 -136394330 -1014452961 -1038241994 -1428561283 -962309921 -843496690 -1109314983 -1951379674 -467923934 -312443424 -639110253 -1960303524 -127215594 -1366259593 -1829825827 -1916849349 -2084819996 -1226488320 -2041150334 -1709886360 -433888366 -1654785797 -2071661529 -1262949092 -657022296 -212815998 -1238206131 -1413904287 -1582797554 -1198554689 -712049163 -1631401457 -2040566550 -488163260 -1172379280 -1016097735 -764671201 -1286731559 -936986823 -439950710 -465386349 -612925269 -2103425071 -389371383 -782161672 -1043818017 -655499376 -386903322 -103649738 -431908849 -597298283 -1453676303 -16172602 -1229982292 -634795622 -311260658 -87714914 -1050777756 -1663715811 -1834551537 -1884962380 -883960116 -425799666 -999474658 -553490172 -1757645647 -2112824644 -1601688563 -872163196 -1870944397 -1506921005 -1546681964 -1941705660 -1085527808 -1592287791 -1787178070 -248051901 -742541280 -863820243 -1237370381 -252355919 -65727808 -880674498 -1038992762 -1161817177 -1739975315 -1480298006 -770536347 -1077992619 -1649901441 -1584668823 -436718067 -1968930270 -1235531267 -1554621626 -92135133 -179470844 -1299434720 -1838132697 -1943976384 -594880430 -1619010225 -2087044085 -2099530144 -1499326351 -604867359 -1965601462 -1122830033 -1465558442 -3303604 -1836581253 -1638660840 -1642448752 -881376326 -2097197723 -953032250 -1679986424 -416837412 -694726970 -407596051 -2141478874 -9511598 -947637708 -1208232204 -153286596 -1454926219 -1696157991 -1629424459 -1025415869 -608243108 -719756436 -171036301 -1273991221 -1558490757 -696110440 -37256224 -1247615491 -643227929 -299123705 -112892308 -1152960255 -1058058904 -1631402368 -2055877727 -125077459 -1937846647 -651605727 -1518337636 -152470951 -631282586 -1397206722 -119696709 -1697894571 -751353461 -793774667 -802413105 -2107236222 -18876830 -1582785701 -999341318 -459928439 -1223628720 -1224493368 -724246775 -478236229 -1832493729 -1659121676 -1930335884 -1119747159 -1191302652 -1233631183 -1832164543 -421459868 -1074933670 -1777753126 -756807971 -125927416 -1190688417 -1647601773 -1588854393 -2064116353 -1152711233 -1167713444 -2054287022 -1307385935 -182733441 -299327677 -1393566065 -1208200273 -1764105926 -1169067800 -1194628197 -1291491176 -1474974803 -1497776700 -329686766 -537666902 -2103918985 -100649393 -1544717962 -1144978751 -56907290 -810600115 -119876237 -420254373 -141532028 -1464397367 -1963952549 -1326836653 -673436523 -1208822371 -1482288777 -2017169839 -249148884 -1999665385 -257050145 -1652172898 -1106340976 -1359367906 -1965359356 -1348721785 -1277146410 -900661105 -1946447679 -1327746202 -927841037 -1345547992 -1622298634 -1520759326 -51625488 -86183428 -1080896318 -1060246653 -1893677812 -1335337744 -1817352258 -579488925 -632023330 -961989248 -1896396520 -1931506513 -1467155939 -1082631919 -165721602 -2144158302 -2092985054 -1017664718 -1331150718 -165482980 -281121995 -353346565 -903434000 -1305853710 -200431630 -1400046914 -610163419 -782168708 -1162072069 -1728977865 -1329749498 -237498557 -1613631373 -1878991695 -1466388730 -1073052138 -219615860 -1706853474 -999780892 -1405397716 -346779459 -51749455 -22213150 -1821741119 -1328631754 -778927972 -382113292 -1201994114 -536406669 -250535777 -1686855919 -2055806586 -1076894319 -370642517 -1686206919 -1885481821 -1024270415 -683950553 -1824465527 -2020600423 -2072399350 -778604757 -1392289728 -1231640784 -591783255 -1104397528 -908092075 -137225296 -2095596641 -1960934487 -2141876147 -244027968 -1831776053 -334559379 -827295007 -1538051971 -778817658 -675549541 -215093898 -868165785 -1258450777 -215769736 -1489556816 -1764533433 -1911727008 -1892980689 -356209718 -1779806237 -903706196 -1585684588 -328811246 -855187791 -33153966 -1020441989 -764104181 -346761007 -1889110338 -1879213518 -899600597 -1302358899 -1592685269 -2025139875 -1057557822 -1799651782 -1587815726 -1787109260 -1239045878 -495146587 -429555584 -1848162721 -867381639 -964210837 -579937197 -1723679893 -333563621 -1271459477 -1957142289 -683430124 -1667549912 -1849777634 -91937019 -1144736140 -274311507 -1853591687 -1917700027 -1349779613 -1876192430 -1663782109 -801338376 -1224135095 -1145203405 -1685183421 -1863420111 -1747781376 -1680262766 -766350112 -1586901325 -1451157182 -626978895 -2079516083 -130452056 -2074385252 -1943404966 -1728476339 -1490536604 -1051961173 -78568860 -1951870762 -131705362 -1663862724 -8751034 -1049740442 -1409448589 -1857808913 -1929657058 -448136812 -610249255 -77330713 -469686956 -2026266767 -669878843 -1544436727 -713229400 -2140291893 -1534758401 -1258361490 -862606774 -169949721 -191710337 -850163459 -1488551922 -2055149151 -764802509 -1346141468 -859431531 -490731795 -1392074085 -1902296177 -155310303 -1107631416 -1572956516 -1156469842 -2061629144 -152378863 -1231043217 -1285892921 -1874383486 -1325631359 -1890896735 -1838416839 -277100037 -1475775163 -2064525338 -1584071187 -1129668050 -427993223 -1359365158 -1919173720 -348334100 -410796978 -104884141 -1851167247 -1972326240 -329540588 -228336903 -105051532 -369540490 -344308306 -1468753924 -22678403 -1051313702 -2081425645 -12205885 -1133362730 -247454220 -1434734948 -1643882520 -1356394985 -1391599990 -376632453 -1427329862 -1740653644 -2143555274 -547828046 -1083574433 -974168871 -440890169 -1222488233 -1383681182 -429212511 -377102104 -730819631 -1426561024 -1703695260 -1606769369 -365923758 -1834919345 -1624260495 -134018801 -1891126351 -1402605657 -665284080 -1629666278 -794700508 -1330637263 -125779383 -850181433 -1790640940 -466449522 -1301804704 -868264492 -769935679 -1719983778 -489984579 -1718516655 -1601852082 -1472943382 -1715422305 -1134719160 -1570136760 -1009470984 -1058016788 -923558756 -240211576 -2114185119 -844871771 -597981233 -47115071 -1589016201 -488656115 -865858677 -1137592267 -466322228 -1309858093 -930103654 -718646265 -839745127 -333821405 -1309067871 -533744382 -602634755 -949448033 -1569593421 -467506999 -1894951467 -1266820859 -1305300855 -1646015880 -704554506 -222752784 -742043967 -1095415240 -266632949 -1649086201 -767832025 -723609352 -502486103 -1378233117 -1205380877 -1623157588 -924813675 -2004282386 -545574660 -1865621577 -93114792 -1612214128 -1681675097 -881077112 -1363275319 -1065256590 -196343091 -1403448645 -1948481514 -1150672695 -1265743630 -380182228 -958856171 -778378909 -1891429686 -58306061 -697424195 -642700039 -16811063 -1223178084 -93105057 -1448597983 -564194242 -1272323789 -1451248544 -15016382 -1124745575 -1447818131 -342123560 -1256949901 -760350568 -1684296726 -1993122775 -1964553519 -689921208 -1241532703 -1489025069 -1417396192 -141702773 -39141288 -717631434 -963349686 -1138957869 -1943158572 -1882299675 -1229033768 -1872821930 -850363431 -554514032 -1785791491 -566138765 -1741667145 -1997597405 -2007732284 -545951877 -1763056755 -715519979 -1983347500 -880263766 -578270979 -1636841378 -1127521976 -866149504 -1730554362 -2056130813 -83726567 -590622784 -927714254 -1362189758 -102039 -1714969473 -2113906324 -454131500 -431239062 -77606409 -808342334 -828056616 -1453512552 -1558976839 -275756026 -361818756 -1561627435 -1874650058 -1510939669 -368891108 -167563267 -884767252 -1106432536 -750733179 -1106113328 -1828255264 -1290200772 -1261991245 -1738356943 -50123566 -613184138 -11785413 -508940767 -340104968 -1690212509 -487956247 -1988079083 -947084308 -497172992 -127606067 -1486488363 -1732651390 -793658410 -995965353 -1702143153 -1290310784 -963479282 -1169594194 -1451797567 -652511355 -1706841903 -805307095 -1354402271 -112310497 -2111881013 -774467875 -583190658 -570024098 -470465819 -84231679 -490105580 -1604696815 -2039730679 -1472064892 -1983026404 -1926054235 -25032767 -1966403804 -1722890145 -2092654514 -1904729879 -256350524 -631060986 -1967742816 -605344712 -1398538745 -1032170800 -321735134 -38573992 -1920505797 -1261715769 -1403399105 -1115862734 -330281087 -1936485361 -1394792042 -338359242 -267083038 -623797436 -148342198 -2106291266 -1316870514 -676262816 -1465688588 -43183779 -2087784614 -1660699165 -525906096 -2008548067 -1371914876 -241403093 -665174868 -1941623841 -1857879522 -968898874 -2062363764 -1761718968 -1853653987 -817292480 -929305148 -183057805 -1455946131 -1657949799 -1561951968 -886625248 -121516603 -72598324 -389319972 -2065580642 -2140696339 -1889831382 -1112898144 -2044024485 -623618336 -1433175792 -1208951392 -1503261077 -163814184 -150955034 -923069331 -604380189 -220186213 -555358110 -939824908 -895005071 -1374764709 -893906090 -84060218 -1903327847 -314718817 -226934758 -161520634 -257965830 -2009705164 -1491891332 -198554552 -2064251673 -1279550826 -509491524 -1006743279 -310635440 -317094223 -1495677754 -1559923343 -1151263225 -453363105 -401726179 -123304285 -53398640 -1970261681 -2137719474 -1249785208 -602439549 -1963588085 -1643741146 -1127805814 -1341647476 -490835632 -989778897 -805592217 -1851480431 -793558787 -1469085239 -1296122314 -2001099877 -744237072 -1447708976 -655039122 -1241348932 -547869519 -1780611144 -1546876263 -912321659 -356883233 -214670960 -202297760 -551839119 -1925685287 -266574672 -669624662 -1567383954 -1987700776 -1031329500 -1214391563 -594418253 -293652327 -497239083 -1238397504 -335343004 -1112778500 -33167777 -1252563466 -51981521 -1775062765 -637067231 -1982971122 -996929661 -729398533 -1164487055 -1515458274 -1151157698 -827254463 -856628963 -632611653 -112515674 -1265323558 -1909966712 -224973228 -1553824276 -1723459212 -919545348 -1506340024 -372068885 -2036853778 -364630019 -1565884442 -407722709 -2122736233 -682040420 -1933114901 -582045644 -653126623 -1310232944 -787773470 -872026535 -1721566617 -1322955888 -2021412225 -683970035 -4415854 -1202814180 -1434354049 -1684563968 -42208128 -722403786 -1715374811 -336487502 -1021003563 -1612543811 -780206337 -392757377 -1855988008 -1390477781 -843018613 -1664209432 -1540905096 -1486649299 -142535448 -1149008131 -1206703893 -236767383 -62208190 -1855996888 -1539723941 -962330037 -1181586302 -1139693905 -1428813742 -910421040 -625434405 -1891076417 -563364919 -218794010 -778922406 -288565530 -902787784 -1182319633 -579886140 -865564894 -494948680 -1398299929 -1313357582 -1763956808 -810325221 -1942183720 -530347640 -1495650430 -1100688875 -853786867 -110144415 -66279191 -1557833991 -395262513 -1010135820 -1494497205 -1045789123 -1571623213 -222482791 -499238910 -489751541 -2096814283 -951007111 -2003213603 -1909891602 -1110083105 -1976304246 -615894373 -465548471 -1190226076 -319487527 -917748789 -1376343969 -1666725146 -872837354 -316616021 -2048471328 -199780992 -1202192283 -1719549405 -1779412156 -722837770 -419409311 -970960523 -205276508 -1223532874 -1761093293 -2075352497 -1020022505 -156287534 -352083657 -1152575714 -1037529258 -187025566 -1570112201 -596707871 -120556407 -1114453328 -264714562 -1619010597 -2093296289 -1953624069 -1682248700 -1931688145 -224877669 -2095247810 -393099164 -1157951176 -1188605918 -1006779432 -918258911 -1360029835 -205498177 -654156463 -1438884648 -520930069 -2128324511 -114948298 -1348245833 -1867755734 -1602153139 -90357440 -366555651 -1717726761 -1211005506 -1667016723 -1478404699 -1161980303 -186666703 -1981152701 -499498972 -565646281 -2054423145 -1447721549 -866353533 -864702471 -1032590848 -939030929 -435501900 -856164324 -1413358568 -1000832909 -1906778259 -323734832 -1435243573 -1602408307 -83998722 -869764575 -212026896 -860670699 -1990075548 -141933211 -1764629107 -1372236279 -1348256020 -2038968643 -1549427722 -845020132 -944000913 -214160755 -217216913 -42456891 -608396233 -1145844664 -1725405199 -1413494152 -1132109550 -660094430 -306564608 -618097503 -986332382 -862073081 -1937589705 -628148827 -267726737 -705028294 -1743256759 -796952492 -525026705 -113525412 -1056120948 -1272430581 -1098618041 -409018181 -273414020 -1801913207 -940880055 -1448991524 -735986888 -225819896 -751387823 -1371296801 -590834803 -196150293 -310576306 -1470712732 -732109754 -1634821815 -1544464987 -1188195220 -546629087 -260023343 -83104156 -867179342 -1859172452 -1224336914 -242208044 -1309084443 -812269986 -268110723 -716230055 -1032692950 -507575596 -1017996088 -458035367 -1619022321 -142857910 -126176024 -1074075779 -244080971 -575113827 -114195242 -1576535523 -1179298375 -1341210462 -1735875922 -1301276559 -581666065 -715993311 -1348703836 -975477567 -961307371 -1173508016 -659410864 -1702772728 -1134159574 -755109446 -1643588799 -714793432 -509690306 -52705059 -1050664049 -1900125909 -186838026 -565611068 -1462598254 -1791031416 -586728713 -2052056014 -318056478 -488428363 -1332998107 -1149778845 -1275192209 -268659603 -1351321627 -2023017964 -1901821644 -769768760 -1062059792 -154850280 -1965959443 -696965759 -1527700775 -752441893 -1907182115 -668891683 -2133107783 -1050505863 -1388977454 -1396826488 -171554812 -1398671010 -1107665008 -2137537260 -334798157 -545469559 -99189070 -623389418 -1880718260 -419995627 -87755300 -1729545258 -128505414 -1569427863 -1979940987 -1609058244 -180340237 -878937342 -1907382928 -1896472127 -1054749715 -1848437667 -1193431767 -510444989 -1999244005 -1764851073 -807851547 -1169334095 -1375280968 -980736515 -1301616880 -2006473818 -869750285 -2119338513 -1558618849 -701469037 -2052366476 -1241024018 -1529490862 -773663044 -2088781570 -1236669481 -1357231501 -418538873 -1373894586 -1302134358 -2113791976 -679768311 -253000937 -169127099 -1398287912 -1111387863 -283051835 -575912740 -656624151 -2111127571 -996270063 -380953182 -1031378167 -2032337832 -1774536889 -388603887 -767758282 -1631694398 -521574996 -82710718 -697117817 -1935855934 -1553430688 -1550876637 -1574614420 -1103574959 -2115560421 -337252368 -991204543 -1144104422 -394445316 -160407723 -880623476 -181466008 -472417716 -677509853 -949802977 -1092686288 -1645776919 -983304273 -1508252646 -305252134 -34183455 -1143194436 -132696143 -1136049815 -312135228 -1901711022 -1058028453 -1119612411 -1074076663 -258938359 -1175130891 -17783578 -388368513 -1106794758 -396147392 -849911644 -1551264511 -1651161797 -1292635645 -1382712463 -1327821454 -45117754 -232364087 -1217939963 -102834937 -1769933971 -336772353 -1513527026 -904927267 -633388415 -282652726 -310538718 -838971216 -211601110 -146936338 -2100322363 -1929249202 -35751961 -1735271014 -1872006038 -22568469 -1351136611 -1060937699 -623186052 -610229545 -1893548390 -1307625837 -2067282708 -682548543 -1883203574 -1388478732 -1604740422 -625149881 -1404048843 -1298591065 -543724994 -843056173 -147996705 -594557709 -490005672 -2073026706 -585158814 -1436567285 -227715774 -403154664 -509531563 -1679678752 -1688245049 -1780594379 -1265106908 -416213809 -951249584 -1783490020 -540021314 -872332176 -416023963 -2055475156 -1949001250 -1295941059 -1102230739 -998091351 -926569540 -1450334383 -1830581631 -1734745295 -1626181393 -206296782 -1191408816 -870445884 -925369024 -600614794 -1359701858 -1135639679 -2008914064 -1080775514 -1177377472 -1268848446 -1023217212 -162636908 -1839313772 -319467439 -580129773 -665337431 -378852888 -91475261 -1973904022 -1077518898 -130523535 -1128249158 -202995496 -1541269836 -1174383538 -341923589 -43520951 -1312183477 -1358126896 -435057109 -1970496575 -1790615638 -41198808 -938631722 -168480792 -1273224398 -1555398478 -263784815 -1025138297 -238057798 -275376625 -427677090 -341085121 -983774804 -826532575 -1608759229 -1597246073 -1369161411 -1208557072 -1318375778 -205431100 -1674276971 -1094824956 -1083147996 -249493153 -1343343527 -1079077378 -554093131 -1154159325 -1883475571 -1664965017 -1355120309 -1442956928 -244263325 -1492453858 -1062994446 -831194529 -505325168 -1849758338 -1915112794 -815827522 -2077559806 -1611042869 -1323677907 -1271483676 -216371235 -861532274 -1438181044 -1580359523 -1024756965 -271461815 -1203458477 -1525635493 -400985671 -562488211 -516348183 -282494154 -1940386408 -387695914 -539841600 -2146846272 -25056610 -219649458 -124051413 -1872960701 -1035203981 -1908284320 -2013781942 -1290822474 -973518524 -247926375 -780309445 -2125693533 -993257639 -1290750542 -1912041047 -728583221 -346440153 -791484454 -965508860 -920973288 -1883407487 -520677229 -26326278 -84123064 -812096922 -1654391369 -1884961074 -862010174 -880311756 -1384838909 -559777377 -52517732 -49742807 -656218566 -1736911417 -1524971848 -2132006038 -1860830471 -1173374836 -568538251 -1267639054 -24318691 -702346707 -1770980637 -748218639 -1793912488 -1764265583 -1704939352 -1041387143 -601989351 -839561240 -1538199890 -1117408644 -542586693 -1038984089 -1016050066 -2110981965 -696553668 -1044138279 -1743175516 -1578985038 -1546107687 -879766709 -814168568 -2112807339 -1310843428 -310759823 -260115657 -1634625554 -393390007 -1751182183 -855567546 -2120728957 -1305491040 -547487881 -1808872219 -1936877801 -1548080181 -1819218662 -1883369895 -2036352132 -523400285 -695571883 -1723146960 -2113976925 -1640722507 -1933147669 -1132777420 -1147567285 -612725288 -889828051 -263935449 -1409360288 -373734006 -2105255014 -1080452326 -40524050 -335392251 -1940472829 -1840173661 -1886719980 -359172258 -31608489 -815413814 -1566820391 -1105832023 -1395329423 -780187121 -69794065 -502779193 -2009229453 -2086551143 -257104891 -424805273 -1466580683 -4238915 -376484054 -1080671516 -1576966733 -1984193904 -73390265 -814570477 -277757314 -1785211467 -1555093632 -1582689034 -1522142696 -1827088608 -1009566203 -510878874 -701614612 -204078207 -411040790 -2055148778 -758533498 -1209572294 -1201342756 -326450998 -1988688948 -459667128 -1126742037 -642616613 -762153928 -1928597188 -1962254545 -705770836 -1338258271 -1510525666 -2000677275 -84016199 -1163500514 -2114532863 -246954238 -1621472062 -513465604 -1227112782 -1799064933 -314579171 -27388083 -750010523 -1845335818 -600263152 -1892105705 -682739159 -791919392 -1833060885 -453894333 -740140587 -1317562285 -1565439778 -1524189449 -1867127927 -1788019125 -1498761404 -1847221365 -78396876 -1208819321 -1431027427 -1608602836 -1116232569 -103646991 -385740020 -2026869494 -62493297 -205339296 -131327143 -1749586932 -1961471400 -428354703 -992308577 -372251037 -803315148 -88003747 -1610226693 -491109757 -1302030478 -367880816 -367454799 -1797321668 -1080295374 -1697599080 -80003518 -294364004 -1720976187 -2137017113 -182622116 -575772049 -439514161 -1718241894 -1278911249 -497539120 -1986152069 -772014715 -155119831 -53852159 -1002620926 -1893208920 -2044604488 -1781794169 -2102624615 -1968492920 -327440758 -1443716092 -118630791 -962879921 -1833552102 -119843864 -2023645009 -1703148724 -1011073405 -72619124 -738905572 -2035501650 -1261734840 -1723925402 -164866090 -650470000 -1757526770 -114858905 -1993301329 -670543303 -1974597712 -1998948493 -1093148183 -818911596 -224500349 -48597864 -740514388 -1157584751 -1472551884 -1577966360 -1605055717 -1629345652 -1848390267 -396779967 -744181434 -512601110 -1729947653 -449107238 -1887813508 -1558228178 -577912481 -2054016433 -1054563906 -873029451 -1397706653 -2079586085 -1306975670 -1877344174 -1693790694 -496969426 -1001239599 -152082501 -545054377 -1711159784 -361489064 -315461285 -1968176199 -1446761852 -1916595230 -2108809257 -687072311 -604761058 -179000555 -1985222085 -174159156 -72724031 -354593874 -392119893 -1879212655 -885096156 -191871123 -1405010114 -274803586 -1534028852 -1881733329 -300391134 -2087218688 -739115471 -1268306849 -510531021 -1297700182 -603039942 -1316975001 -284892178 -1441786483 -2047430680 -2036962879 -50806879 -1360207494 -1043929343 -379071811 -1623430475 -1216258190 -1902047184 -265452246 -1132363703 -636676607 -1860204495 -1390014439 -1645564207 -1703220983 -78046771 -1767055527 -1350887926 -1176256198 -1750949151 -1233966016 -1017251833 -834243464 -209168185 -58955156 -869345625 -1760668834 -1383921025 -165286518 -1274152455 -2120866948 -1477222130 -613895943 -1237673813 -1057170249 -1728163312 -524459109 -1311357675 -363774564 -73154139 -1140968089 -1369187760 -1651404715 -1080391177 -1160276454 -1614847618 -845584940 -1846794381 -1492011376 -68650413 -608772852 -1033229256 -931335950 -2102492314 -1892393660 -1227431550 -714147768 -395433693 -1739674433 -718341526 -12964048 -990906389 -427997438 -1430206663 -698924170 -82976100 -862425797 -1423236576 -1664272546 -454178447 -1220277291 -731600987 -1673909434 -1360081538 -1074470498 -435672263 -1571971618 -1783158332 -1407792039 -1933460474 -2095123761 -455691268 -876456074 -1006900945 -813044255 -396347924 -2072769321 -554256413 -1750956252 -1353312523 -1124268684 -2022645682 -2087329011 -445830485 -502517012 -1897720680 -564343516 -1633688260 -1820158925 -506500960 -136458012 -2084756335 -156537893 -264900076 -441977101 -163201534 -591564719 -1726430270 -1461993273 -213050337 -881774410 -197860923 -1143847305 -368047191 -1016235777 -937259448 -726991791 -1516563554 -400245835 -1012966441 -1824104118 -241366654 -52744595 -1715145601 -779122326 -1501137323 -977102705 -357714326 -1297949129 -492124877 -1183283142 -1741196374 -527800149 -1629642133 -388895493 -1373813030 -2078906313 -619465901 -362677451 -961328771 -1533177816 -463273159 -1603762938 -1376445469 -1225151999 -1056439757 -188202503 -2023539537 -2077964467 -1969729355 -1780850980 -1282832621 -1979528914 -1125798274 -1960661048 -1841154168 -1186231953 -1909738970 -692280728 -95796050 -1578960747 -1137848850 -483745415 -2083586010 -1961722088 -346700625 -874270064 -773852874 -984287086 -846521561 -408714352 -1609410958 -1813437141 -1350110563 -996018139 -441833808 -2049843377 -1784972065 -1826431512 -703171966 -608723121 -197400339 -1992746605 -2084715270 -1613842085 -1125460985 -586812119 -1306377009 -405583335 -526015767 -1704304917 -1115856333 -222699480 -1993647286 -42591661 -725991976 -1892542025 -1573518458 -2011094448 -1219267403 -938282547 -742347508 -1902061533 -506615889 -2068069715 -1024873310 -79388583 -696569694 -1313487261 -1795988114 -142089766 -100881698 -1154100803 -899896317 -1977557645 -206934896 -1178772579 -1094091678 -1643846532 -751544669 -1859923876 -968618200 -1640043140 -1252444735 -203953251 -458388945 -1119156826 -2006994156 -1025136463 -207233760 -1906812533 -899777950 -2135647123 -779520303 -1747485821 -1007837175 -1515876336 -1735074791 -721569724 -582196659 -1043752081 -1694796671 -224555689 -978697244 -1387327535 -1583925266 -824657450 -158304412 -2037497498 -446213824 -502844644 -961780763 -539872772 -523270429 -660565738 -1785387223 -214057430 -628117285 -1885083990 -780375739 -1092413144 -1350013005 -1503844480 -1379133817 -1311060248 -1807369916 -309991397 -230081757 -1513525299 -875901578 -277421261 -432135990 -119889776 -647804346 -2053036579 -1766026904 -1242690341 -1618094112 -1722318423 -1073657448 -1803126442 -2004367877 -1982421897 -356039674 -1069360376 -449197689 -1260539818 -966543471 -1129811189 -686246749 -1761926053 -1039164288 -1897171012 -2063491675 -1391166322 -1677908965 -2008205998 -2065212134 -242149677 -328110274 -1958853269 -1522583573 -646973759 -978262752 -527271432 -1333430102 -1967867869 -559626836 -1817342439 -414460992 -1556425323 -342099554 -853481059 -1412880300 -1552517221 -1230622297 -653941422 -2119657855 -483348902 -1861842960 -1010408283 -1778815552 -1433132577 -482636887 -632425090 -1271918627 -1084141751 -1919147909 -2062012270 -149126604 -257417379 -1381823795 -1424363907 -1283971840 -1799029824 -1871985855 -1830836435 -1722268829 -240131090 -761456917 -951351546 -1349681707 -230686288 -936459581 -168529004 -2083523482 -910813992 -787327728 -1970375329 -1900317763 -1263844557 -674717022 -1255332594 -1495559230 -1715374122 -324907479 -1816568879 -298139954 -758858427 -228203056 -2968650 -501976669 -1406110467 -1588567281 -1533592263 -986432947 -404785389 -2147322874 -1592855483 -590959279 -140734778 -949918499 -886780895 -589992085 -1064974396 -1895959474 -1028525332 -1329380221 -473510959 -1871775778 -447555943 -1585002207 -1744935661 -1096970995 -644403470 -729088469 -248208701 -1230395233 -1132644068 -1053803868 -983972667 -2004532369 -452071647 -171028043 -1135199015 -1045125157 -1149764886 -1040583296 -2124118351 -288977529 -1384804036 -2121150513 -1948131791 -1715329175 -1716966897 -1324873140 -2032411884 -871645206 -1755021055 -950979840 -1544869906 -1551217912 -867972404 -155779957 -411171606 -2106289643 -1289592753 -1780434147 -719571331 -1354943860 -624862232 -864499394 -1914443003 -296068420 -302324841 -227293885 -1902400829 -1914196467 -447505162 -731525940 -412594505 -251149372 -1262128849 -1903583724 -320276262 -1289116052 -210971381 -300499270 -1757176793 -675246407 -1562771701 -1778975897 -1980567345 -1398838915 -1782160696 -1820392963 -145010332 -1942194226 -706921982 -1358216270 -1937165927 -2095646569 -652590736 -893514723 -2096289637 -723216377 -340206219 -1244454419 -1202182000 -1546723024 -484317433 -960074301 -1924136996 -14251599 -1155939576 -1739383070 -116370879 -1635244583 -59992175 -1118654782 -11591589 -1546308093 -2100506704 -732501095 -1769639061 -1822670924 -1923478860 -1837861729 -1684784502 -1601239419 -1913334576 -994088654 -225234118 -1643635212 -1494856723 -645757208 -2006526565 -1756269114 -452270983 -1373784548 -1600209339 -1780649192 -38865352 -374942376 -939493134 -1761330394 -1765341710 -464053018 -1825951269 -1221662453 -389698604 -1986797725 -886136872 -503315759 -289875980 -1452684464 -526203705 -568011589 -1005965408 -121859425 -1539440384 -491554832 -192471415 -756699523 -450725527 -1169109320 -1892454837 -108149742 -901548432 -1827367039 -1394188726 -935845465 -584499627 -1095029611 -227817287 -2109283655 -70344909 -1170879713 -1582678930 -1352324768 -1702939575 -1790873456 -79378640 -529457693 -1570696730 -1830952186 -1520212239 -1594152514 -915322826 -1405373121 -2080894941 -1830081992 -1927247210 -748010769 -447725045 -132132227 -248248191 -1894103663 -2050164560 -740643805 -1185212623 -1957728836 -1951590965 -1871608124 -1924762459 -1936473652 -1197998879 -2107968728 -1592686937 -2053173951 -1927354461 -403094679 -1648847315 -1047842317 -1719916419 -1505365513 -1173331684 -1990766234 -1012874578 -280162677 -1409958115 -1831477807 -1764389798 -1645137210 -969133345 -1708150567 -1325186473 -856148674 -1150329018 -1932015232 -1427261584 -593105298 -1849137759 -74976129 -1698382961 -369789603 -236183203 -981313165 -255955195 -429217424 -459674895 -1257282006 -2047072009 -303746676 -501754613 -1968982569 -2114520560 -40177717 -957024461 -57599997 -1715508429 -434721581 -626244773 -478545864 -594078233 -1021387128 -1616669825 -1406646931 -2014983141 -4537597 -1101465134 -1015469998 -951713677 -993566483 -39040709 -1174683828 -1093930325 -1079470308 -715616700 -1461453700 -1881865161 -368607911 -1850322229 -655010596 -761912450 -17560089 -927156184 -572641856 -1517451585 -292997323 -226005090 -1716459734 -1390919187 -1819278314 -738457412 -945727471 -1315133650 -1549560626 -931254013 -725377155 -149180066 -1155953213 -1968580129 -1793162421 -2042791396 -1373927983 -1863437737 -2044021558 -574424247 -1409326064 -1946014885 -496228385 -1431465394 -379579617 -1568191329 -524866872 -1722179475 -885842059 -1990844609 -182639556 -868886129 -480370503 -1196014848 -974614416 -1486714043 -1230687856 -1755791535 -1015535318 -2049546917 -1097336139 -338927737 -1231843915 -1858322325 -1968637954 -617543549 -265962092 -1111410837 -669175853 -466702032 -1250772980 -24054377 -554988603 -1171971700 -608351616 -395966745 -2108744809 -1751378422 -2006272772 -1785737457 -1805472974 -640341908 -1185892639 -501855866 -1523258093 -1246213164 -696638157 -316661255 -661235519 -157494608 -1312023552 -817751068 -46859076 -1581475530 -454133791 -469743899 -835824121 -1005466620 -328664097 -529538195 -776210197 -1949109101 -961109169 -2137294296 -546269503 -658945996 -332187193 -1760154198 -1324368361 -2138525819 -1917123741 -254075399 -1047740757 -12997499 -1553117346 -579504937 -901137014 -1355115654 -1364720343 -1729454841 -756350542 -1027852801 -763569939 -2105173948 -1865459711 -1667600224 -547887771 -2087372508 -1176884564 -1574478278 -962920012 -359877892 -1153780892 -1965603081 -1150040566 -1378969762 -701271510 -880013834 -672631149 -557803435 -1236212890 -125757505 -482477887 -107595737 -180320985 -555368978 -1122483384 -2081879640 -1200048909 -55600939 -329595328 -1148352083 -917923392 -15929296 -1435705644 -778501016 -1796198388 -1528681237 -51197551 -1483780857 -1324754635 -40698349 -1117351897 -1736323511 -233970294 -296173601 -2070101908 -820202709 -449400070 -366989991 -427744553 -1474935762 -841614613 -1689501549 -1423753409 -1760750189 -603770863 -716662366 -1856092986 -1007359380 -2075510359 -1525725492 -1913598864 -1141009776 -2069821169 -396789630 -906587475 -619216860 -472012658 -312150988 -19105695 -1134352462 -1849494415 -1774326227 -1142974947 -738711814 -926494591 -190666540 -486936456 -2028320922 -834323576 -1555610569 -1680914605 -984389950 -427873162 -1488983578 -720056955 -926891840 -424779542 -1034119766 -865751991 -1492004312 -2097409412 -215921979 -1900821270 -1136352118 -1097974455 -329686514 -533431538 -1787116588 -1362207574 -299535551 -592337089 -1822750978 -1121462791 -2108642265 -27921414 -1123770052 -84588599 -46409079 -460826892 -1291542762 -194497058 -441943072 -1738759778 -378120470 -666627817 -591533920 -1208791477 -963053319 -452884994 -956049190 -846089476 -1736596345 -524524038 -255135731 -1688871505 -1572022136 -484730711 -1463586706 -1224075004 -135253968 -1175741650 -1692875503 -147739818 -572025194 -1890631586 -1677024890 -34459355 -1485278442 -724861966 -80333131 -1539202401 -786741845 -713374336 -281263951 -591717410 -2145224260 -681188337 -497057802 -339091384 -1834775397 -1352410106 -989731694 -12251396 -1898266107 -1141400517 -47070568 -841054280 -861919406 -1502257627 -478699210 -1023880808 -578276645 -1732069840 -1756965795 -1423970315 -1111322037 -1324197900 -1421071439 -1782036986 -1888682640 -1133344173 -2083050368 -1549121582 -2142176093 -990253096 -185520222 -2039599357 -1412419685 -253411857 -633008598 -341519348 -1839377052 -1383014399 -2107492512 -31375566 -1195644247 -1188374350 -1409783350 -1041686099 -1331575549 -863166656 -989951907 -1565887640 -461471495 -1387967148 -1596482722 -1424423036 -130269296 -1150221579 -126287959 -807883677 -1709343005 -2039139116 -119600139 -74842581 -1601325372 -1210463000 -1139052969 -1394020625 -258055605 -1371069942 -1072982884 -1203147529 -594499751 -1663389213 -640386245 -1931064598 -482341475 -2109886547 -1613216165 -1343041780 -302582843 -268566205 -1929065088 -1236315257 -1846239674 -758985415 -215006725 -1550532821 -91066202 -1541300350 -1687232336 -1939796164 -1204883241 -1849323924 -1056367637 -1123565310 -938457099 -1528559325 -149706214 -1408988061 -560165758 -137586258 -1719834034 -120720818 -1730225358 -821527879 -1246695790 -218198751 -1511822628 -176397492 -1185215184 -2000771563 -1668714615 -2097588132 -1072185372 -684265227 -670740504 -993987625 -674723362 -1361888974 -1387276292 -722684165 -2132737370 -1267425513 -730302398 -1323360581 -233152888 -1590416488 -400959607 -124430563 -1802883810 -73935500 -1388400534 -290466636 -642421621 -1779890678 -175422436 -1977318168 -477012251 -588448306 -888484507 -1305311558 -1825901201 -380169577 -746230814 -596792418 -1541537836 -1383692244 -615131545 -529600157 -1817605531 -541280942 -568063502 -1878467199 -1241119046 -979142811 -286037516 -1364129426 -387847410 -938551225 -963051360 -419960081 -1637817325 -350394029 -672285329 -1188057636 -381738446 -1344408333 -1795402644 -1039513711 -1327472432 -621555941 -1130241379 -1473999138 -132160574 -724676220 -1253467403 -212065151 -1503622484 -1943014339 -1605659291 -1036195635 -1395143922 -1957439108 -1377099763 -1484453022 -1884413555 -249792929 -2086711465 -804153098 -1286527515 -1802586609 -1521329234 -1040134656 -1026276812 -45726580 -1874968081 -413501289 -459082531 -2038838493 -1509480319 -1611399422 -873813237 -1685896073 -956060393 -1034378297 -915915214 -624220002 -807958019 -811325352 -1571516261 -572424174 -6353858 -1562592703 -918040158 -1978415458 -1739296105 -802233771 -1240653331 -1741805394 -26181054 -1938310590 -2006644787 -1595742621 -1870447411 -1744011891 -603554134 -1369065357 -1741661141 -1896688177 -390934771 -1288220024 -183814314 -1285691012 -628382570 -2048761691 -784944639 -572504152 -1350544104 -1840090785 -493823048 -1807155728 -1005100975 -625719523 -240603702 -114712213 -1675332532 -1655769507 -1425006323 -1343639317 -1755452614 -1761741012 -76663848 -2146588783 -2139889928 -1221383587 -2145248683 -1091665698 -1672589965 -658602525 -1001921037 -867592732 -217083594 -2096731752 -1711392241 -2120910216 -56943759 -1423534598 -230677359 -786389878 -1240315908 -365704327 -294426175 -618400537 -1784457526 -1768509127 -11739362 -1882445257 -1528346795 -872681798 -1997153623 -991539151 -325410137 -1674807297 -1418079450 -887801744 -567532052 -1536321637 -1761865178 -16038163 -1117949666 -1045608859 -689409812 -1236434719 -1706553861 -259152495 -479147349 -2113302040 -1035348547 -43037788 -1781597524 -945095747 -1435166617 -309008815 -895695259 -89852543 -470686360 -1643380619 -1510879466 -1504542934 -233148313 -1513524463 -861850926 -351314267 -1106339866 -1340712136 -1950445428 -1945920588 -1058862353 -102584182 -1850461980 -856322006 -1916036295 -1304723300 -528983583 -44780901 -1013326657 -1435803489 -275498284 -324916256 -1964083918 -1387271789 -647002244 -1457010147 -213513888 -82741479 -1214117944 -290671014 -1929919020 -555964852 -399919467 -1970150406 -267520549 -1534593872 -640606234 -1333452427 -195600497 -1807573169 -1578580921 -1196564209 -1617790155 -908680418 -1435571509 -671577718 -32657794 -1271213773 -2122562455 -2056320868 -1130497305 -1480380126 -3243540 -827085605 -166116204 -186299528 -105009770 -1815130203 -1888116186 -202886383 -1854891292 -137841145 -1708752549 -705279712 -1673871791 -727415637 -50208688 -2043829592 -1643018979 -1875246927 -805098717 -2147160519 -1011638645 -982673216 -1639495882 -644614117 -2121948951 -335093728 -1218164062 -1721783183 -667813356 -1189535070 -1590651567 -56965066 -1781641347 -1681628908 -104778589 -77154783 -1807798740 -1074785424 -1433666251 -862161217 -1271407810 -1088775020 -333605053 -1967807101 -1685782707 -1198201678 -1221444227 -1016941516 -2061196586 -1472311145 -1826833281 -1013252608 -191261946 -1903990510 -714677623 -710772090 -1642472016 -1272374374 -153946992 -1816783556 -1758732646 -1054664014 -408060960 -1365269849 -227583948 -335038729 -293795869 -762265830 -1661850455 -548284303 -161951244 -1052777159 -907943680 -1938117825 -914327079 -1849722468 -1312245704 -256492438 -868725937 -2082990853 -548852977 -1129720574 -1310764091 -1124826511 -660625836 -647970662 -553342297 -1419794169 -1789796566 -1307441233 -1112126927 -1967082248 -240596571 -2142345143 -1683992799 -1179988980 -63306815 -993234440 -900844949 -741346493 -110387957 -2012005938 -1506294304 -1751136492 -87638909 -1920845368 -526434625 -154116735 -374686863 -940053437 -440924680 -1802514610 -311242041 -1922302642 -1396518626 -1439769119 -353848637 -751823516 -104054464 -791687790 -88009718 -1710581290 -1376158641 -699401097 -1656237248 -696394722 -520216504 -872855791 -626486680 -249309519 -404490536 -1486695797 -924027334 -1673151081 -1499344549 -910721145 -1374331846 -61228590 -424245217 -643654079 -1018975814 -1891904720 -1599751558 -529174866 -1112190635 -890338957 -260798003 -217912894 -1002391323 -181754946 -1033631388 -1247517533 -1144331470 -2062957405 -1001625020 -187402307 -1459547247 -2052364295 -1204367951 -1778779482 -826904087 -1410310472 -1311090965 -176146888 -1268281050 -76927228 -130765502 -900021233 -1929537210 -581335123 -1596302058 -535486835 -1970754915 -1837568724 -1055216761 -1108145201 -1618206423 -1462445753 -1375430756 -1350739784 -833917251 -1168957235 -1483845889 -270263812 -395974879 -97969300 -1597551498 -59988445 -1055964672 -793383496 -670453049 -457698734 -256198784 -228250453 -799570029 -1568298124 -172286790 -816123374 -607493429 -1004803365 -2066239194 -324077921 -759089455 -1963607005 -1961729586 -472719511 -1454811124 -1909239973 -895572737 -178108936 -2032167081 -1052208479 -2087557155 -2132763046 -1698962045 -1512519803 -1156399482 -879088624 -155012208 -392516045 -2094888378 -794576481 -1393599121 -1763772465 -2007039714 -1790829769 -1492614878 -1621773939 -1292145049 -1727200079 -1515271254 -155396205 -403902683 -196585014 -1174481212 -1983530507 -1808578768 -1299814138 -1772560082 -1524146990 -1153519514 -1867590329 -969674951 -73504374 -584916793 -1663887632 -427379790 -1786814962 -587746686 -1981259049 -139406161 -94689050 -153480923 -426012814 -286885800 -588853085 -1249154219 -734825661 -36430530 -255078315 -723880793 -769627696 -838680791 -1772879076 -443028207 -649270900 -931605893 -196973374 -1259196791 -2016608799 -1557167839 -2084147731 -665148700 -1501818265 -1684276664 -1655940741 -7968867 -788761555 -298901954 -680890545 -1934518599 -551677813 -1362098992 -622081524 -1373780272 -1528342607 -802294082 -106816661 -2118776182 -697456320 -1182624914 -1415776613 -838725931 -384063409 -1765355828 -701334244 -1934384172 -439846871 -867647923 -1144678731 -1456922091 -881040343 -745298736 -2111226648 -513973555 -1174310651 -1264395427 -1343254524 -1730687604 -561813 -852456503 -1373036784 -1917441673 -1302591229 -1202488285 -252004078 -594787062 -49774249 -1184664260 -1331326483 -972081688 -1868827487 -287752987 -131279465 -948262786 -976499915 -964041031 -2020975049 -1926287591 -1799563412 -102581136 -1799267858 -1577655999 -683785684 -1200995891 -939141884 -152838938 -373589154 -1818211097 -2129094116 -164797651 -1647699374 -1081750753 -388350169 -798487150 -548219947 -1227803599 -524724370 -1474632008 -31388429 -1411832688 -1125171513 -16623509 -218441653 -1299309248 -1876808440 -1279643944 -2074525750 -9787558 -1290730134 -1569043791 -1967293824 -1649070756 -508247910 -1580159251 -1953752755 -1697590655 -2085888190 -1999755702 -1775007964 -1863510471 -1118978249 -1153134164 -1833463820 -783571937 -1123821755 -953560920 -1975408526 -593913862 -406287378 -1621448233 -112971601 -338154059 -1113539651 -2088414399 -1508077425 -1655280081 -1789158129 -1314648809 -1990772527 -1118641029 -1927928565 -1462126019 -296628712 -1129217897 -1452206340 -1080308225 -1913585837 -922064987 -904239757 -1963309727 -1260345534 -1996179577 -1800617205 -633810911 -941092057 -717141844 -1324745144 -2028666759 -204355094 -769713305 -130027607 -1383121850 -1765937822 -1892972814 -223854593 -2080278654 -62080971 -1865310802 -1312370308 -203228219 -1157678003 -892354601 -1925472006 -976928199 -1719759278 -1011780373 -1217212065 -753955133 -1570403031 -1189720387 -410307092 -461304727 -732581019 -965438082 -1878891089 -1922987335 -19251995 -1445732915 -1803120247 -1900248512 -99943000 -409789046 -344440193 -1537895086 -289535110 -18649668 -2059841261 -168200340 -854634928 -1478603760 -212631236 -280394844 -1017021590 -1259516657 -950145720 -410716948 -907303578 -1917341746 -1770601787 -823337630 -1598409789 -1600383400 -411125125 -1325083476 -1272561742 -1155557321 -1757274226 -165319191 -1823287566 -1549962719 -1246780123 -1635583482 -1460900374 -1172049667 -1918742985 -1698905543 -562890689 -838344988 -424005349 -907159897 -1649978826 -737794871 -547819119 -933538344 -463422626 -1968371160 -428504085 -1355488204 -1183717252 -447348556 -246932545 -1256877811 -1696217585 -483537170 -731095942 -1775552707 -281587837 -1740302118 -530425086 -649801705 -1262910940 -15801632 -1437540443 -1551196751 -512319477 -1291509116 -1776492383 -1042336840 -1531161301 -931443906 -1769425159 -375103657 -1502659254 -786393258 -1297123568 -1649306679 -178438477 -1128311727 -1254592679 -1944709707 -34938209 -943443032 -1575273023 -1435297345 -358670664 -191252719 -1748912321 -1360702558 -774535403 -1718133754 -1608885916 -1578990835 -1643537866 -2006246148 -1338267889 -1672175392 -133325055 -968755564 -1801236241 -300530728 -138407752 -494298163 -1202478945 -95026698 -1533363565 -1437672955 -1630842288 -1232547755 -802859323 -1016887560 -1154358094 -929218860 -880299036 -1171053869 -214751528 -1556404136 -2133493292 -1087304685 -1391488472 -649833074 -1790129723 -464359991 -542795539 -254091517 -1318635983 -283729241 -1223657147 -1702265957 -1206793965 -1750607487 -1934070109 -1603840971 -540462453 -1844104408 -1378791752 -2004424734 -790533849 -21076154 -2039602170 -1459697776 -287337904 -1744914072 -734124672 -1139810289 -1237395983 -682648733 -1419613257 -896692229 -1813541804 -961697957 -1295635977 -269684859 -1402930043 -1822272288 -1666054549 -339531810 -647080591 -626304529 -1482864956 -963592057 -917519972 -1825583944 -1490482119 -136231778 -429925144 -1616906700 -1092837762 -2044116790 -27504824 -564592863 -1529495995 -859933375 -335289315 -210427477 -1896522977 -1909385665 -1196734534 -185475136 -1281838955 -311369981 -1925106575 -1277580323 -1750985955 -1852530844 -1267980902 -1474790733 -551595857 -2132148147 -2101772787 -536721606 -1248714642 -1936789610 -65854044 -854839303 -618567091 -288763310 -2079392597 -202506501 -1912665459 -485657470 -2007239690 -856859107 -205674567 -1471259546 -1332478064 -999350732 -618149537 -1860867820 -1801099479 -149455441 -1489213544 -290128223 -1397165271 -1570513399 -897191716 -1618485225 -1853303673 -1372016023 -1941380722 -2066745783 -248384656 -2040187271 -556072048 -54078992 -520035863 -2131789798 -373968438 -1750386344 -364803355 -184175300 -910331773 -1272607583 -1926007008 -1378772225 -1676234445 -1781835769 -654312168 -1908334936 -717001407 -1111904132 -370050330 -323254598 -1953885323 -1778177384 -1444861236 -37713176 -337673167 -1621122395 -1079063276 -317080817 -1270363112 -710404910 -1913728697 -1175629360 -1953101120 -1482979445 -740325033 -122578913 -746973318 -191155264 -110986136 -1328182156 -1812468974 -110513323 -1971548653 -145537761 -69275194 -372048884 -1700696971 -606650027 -1862131480 -1564596629 -238286088 -1964763008 -2063319184 -639593732 -1496200489 -1755595900 -2022465167 -1200897053 -1425455265 -299072923 -1406882881 -1685627497 -737070855 -1264184089 -2086264052 -1874417395 -1895539922 -419565809 -1453738762 -1065921015 -625915831 -1392468611 -2090643718 -321536212 -990259232 -288647974 -140940445 -111596474 -848714687 -761361035 -1487346419 -1121613053 -339128405 -309503697 -623242445 -1558026696 -1486571801 -987510209 -1330458647 -1418747565 -1379392314 -1360652033 -2072845375 -1832495991 -1697139110 -939222316 -1504659562 -45831462 -1490236208 -298172895 -1312497814 -198737914 -851049513 -1348075971 -1160368747 -1018532422 -882266317 -2022890931 -1914261660 -1543203913 -1468160972 -794352374 -1922000066 -606091088 -1057978295 -276606905 -1777640227 -1006798125 -1232432162 -1007571419 -1344282538 -1828649726 -1477472665 -529670394 -850595143 -153930322 -1536610866 -180486040 -1181964716 -1057247062 -871675756 -120991258 -1980543144 -992092708 -1039108048 -951945332 -592024774 -868640067 -639773763 -227014212 -1496904012 -694805079 -1720374014 -606230090 -1246701262 -310166655 -1028159316 -1620200250 -612957790 -502521871 -1979385893 -869527974 -530441183 -920343984 -2044113394 -2117911899 -1203837468 -1452886289 -1770792833 -1886764105 -1100781133 -256883426 -997610312 -1431681655 -1866794597 -480709109 -444514949 -2014623577 -403796390 -557602210 -1707962 -788429923 -1167613871 -380763611 -2140225664 -421647598 -2082628133 -895068878 -299685311 -961869762 -2035678965 -2094384398 -914119209 -503535025 -1827595995 -947284924 -1721442457 -1383682415 -449935542 -776733307 -3600636 -386347136 -1493249871 -1556683055 -378833984 -1921239380 -706143368 -1156952654 -1586315840 -200845375 -1911408188 -829540243 -619027777 -1589061971 -1257912505 -1906450467 -1256985629 -1360831064 -786852098 -418912860 -1217043154 -62551603 -1185288238 -1081106494 -297707391 -2078706674 -1559100522 -207012560 -336587780 -558892262 -208775456 -2048293441 -1505001477 -1497429573 -937974218 -2002712946 -2085283991 -434917697 -1774882738 -1906320736 -1224080359 -225255453 -2002212557 -117697009 -301191376 -504500453 -873675215 -1513643966 -722854200 -695548321 -1327140426 -1483982040 -411070022 -398967355 -1000389551 -897711294 -1761098083 -8374380 -1161767605 -906818711 -210633018 -1056083270 -639176435 -925140751 -1058997777 -231171703 -504894898 -1060661389 -274211176 -167328570 -1235182067 -2128068167 -101541984 -1514109370 -2102448287 -1152431871 -767443604 -637868546 -418286798 -1432237355 -469026262 -1659400944 -181542219 -1753295993 -2022633864 -1888703885 -1490408888 -1052922008 -1194937176 -42050288 -217070553 -1877551665 -886124637 -297682114 -1653876135 -1815357824 -1418775039 -1841147832 -1079742801 -1000439257 -1733120036 -80257144 -262088892 -439047847 -323353437 -1467588749 -1914418648 -2034217582 -1155240434 -726321711 -991947229 -741526142 -982265053 -1221951282 -949080313 -1831774322 -305466462 -1488910504 -1639385884 -943361378 -202914245 -175684279 -2083146175 -1011866184 -511953895 -1589623383 -2103629401 -1676062046 -1031809423 -690522836 -615676264 -1094757802 -2101974365 -1777159405 -1515557359 -668995646 -1732930277 -1185944925 -1380626668 -631603241 -344004366 -655401638 -891704403 -1735012455 -1821372219 -1570980395 -156058900 -804399313 -1129695726 -893143755 -156397755 -57084357 -1639081537 -123168643 -2068630840 -1865766597 -382982285 -774773936 -1432190591 -1830547361 -1158769405 -2055678839 -1077334137 -1320212702 -1013841710 -1502364672 -130320878 -2017160253 -88036982 -21323691 -1904989235 -320379522 -877123225 -1482289567 -2030447369 -66296306 -1845485796 -973459751 -1407612211 -1058574925 -1714232727 -468834537 -584562516 -4521387 -829023664 -526819112 -173738803 -1597785748 -1849544548 -469427911 -1967464746 -226789516 -2015405634 -662926507 -660642513 -928261001 -1961431999 -1913625743 -1592765129 -1219863248 -215231227 -1028770641 -1157321290 -1339530151 -1412176356 -458748648 -722234206 -1012727398 -2101475711 -1986216215 -1850116537 -1492912446 -180548374 -82128607 -1650996475 -661552438 -1188984947 -934668894 -137223653 -2067982740 -1710568132 -1155012135 -1184267712 -1108995188 -871552403 -195281034 -733325822 -598440221 -1318875446 -13416588 -6811581 -665608576 -641019609 -1838595111 -1125833894 -411842741 -501153706 -459473208 -15012244 -1055198209 -796341737 -997485655 -1484055103 -1639039863 -1570237372 -552973221 -1659184778 -843407551 -1758639457 -1635920138 -676626825 -1141136910 -2059078660 -236067215 -1179386496 -674776462 -106857027 -649723897 -2102675531 -676754485 -1139234883 -156481929 -1471796775 -1771751279 -815496851 -814939603 -39207055 -1822977403 -632020472 -913954842 -2035986150 -814791752 -1849242592 -1836904360 -626669248 -1170246248 -1673450910 -96119611 -574599533 -60390572 -1372062220 -570330054 -1317701017 -1749624855 -451359614 -1088791294 -607122171 -1207521100 -1086663550 -1353350762 -1766951557 -1750947783 -1210974040 -1138167661 -1547034598 -1425974357 -433517579 -1865419629 -993942050 -2056227984 -1716879564 -2004551056 -766144056 -271201780 -1128017526 -604923766 -766150264 -375539636 -240223719 -170788873 -1410436119 -1275356447 -881524022 -284557101 -105114638 -1430163032 -2113101600 -1961520761 -1257965030 -641754495 -1304922231 -1724933253 -2071432318 -1705567109 -854680807 -102208466 -1978254109 -1174987109 -1896206798 -890332506 -152376046 -1183697898 -122065878 -714328661 -1288218697 -161511425 -103190167 -1297833640 -698584901 -823332958 -1519887485 -430979330 -7257979 -1725768821 -1082438165 -1204265418 -55507351 -904145459 -378443241 -1796472720 -1844411867 -103804224 -880871404 -53424610 -259255824 -68314205 -1400575937 -911518392 -1888760293 -290974497 -588106860 -1592252526 -1194479215 -935034349 -1984458544 -226227451 -1158713767 -1120570973 -4759021 -527971008 -206302052 -1279981706 -1308840743 -1011371380 -785717655 -679682182 -952914481 -1848126488 -258413608 -945575422 -907129754 -1143365425 -859024619 -94212752 -738275025 -27832809 -1782069464 -287056739 -1314341211 -1115940235 -1632840394 -454976945 -1755731295 -3081638 -253482338 -1817582765 -158652780 -1450067533 -1640600975 -2038042992 -1024396894 -662199459 -1326048659 -314523247 -1234957062 -493892779 -831640998 -1566678710 -872083103 -524821346 -957023993 -49734321 -513594364 -1243698455 -1381596934 -1906478374 -1726018578 -985136770 -94775020 -1598378713 -1078089068 -1123436137 -914930135 -1247866425 -565708373 -950519742 -254453761 -964419950 -1947015741 -137746001 -109667341 -638031061 -1002192756 -1139406671 -896239198 -641900728 -1615176615 -2080070225 -853982062 -1243303133 -1179871021 -228253549 -851604501 -2085824699 -932662465 -774909802 -1568206806 -784988811 -1314902956 -1967253862 -977429422 -1553879651 -506663190 -715573975 -743374625 -1984947776 -2006298734 -74597144 -1771233007 -694833935 -57873159 -2011574869 -703768562 -2045777505 -21854418 -87499689 -1728458475 -1190296356 -1500683487 -1939415641 -1251884121 -1519131988 -618243133 -1286452145 -535843019 -1514688462 -1097829296 -37482848 -761517765 -1974023882 -944522271 -386690073 -814541089 -1931316845 -426889510 -2136613590 -1990545643 -1600368935 -168011870 -1981986932 -1635517507 -352058549 -730585558 -1787463407 -748743566 -2026425989 -1198439350 -921030237 -693065683 -403632853 -2104003145 -1515126513 -2017701512 -595042407 -46390370 -146384729 -1419364488 -1010598940 -688220457 -574298057 -1435934381 -327916481 -849257965 -1302299793 -599290727 -580944259 -1469501751 -1853988557 -2145443176 -65542255 -2057052521 -542487394 -1517549443 -1937696729 -279417548 -1771476894 -498875450 -823530262 -541008519 -284417435 -2052715470 -664115235 -1312241186 -180558412 -250837273 -311648250 -159522717 -1038713163 -757564078 -2096399530 -422704381 -516627191 -676814316 -2144814500 -236802958 -660117215 -689512103 -808155909 -1989778935 -1599209461 -8085175 -596066464 -77847193 -560231728 -1246344048 -748921898 -728684619 -2050636339 -79898870 -683028715 -1363519790 -879113393 -571304791 -520236600 -1210609263 -1449811563 -1633480479 -475467305 -392344648 -1361702646 -403145243 -351192816 -1212596556 -490506662 -1903231048 -835301671 -814584058 -506013181 -528290947 -1288549531 -1426871169 -473851334 -1150007462 -822590834 -1931911299 -1827943300 -341989118 -1144866854 -323738058 -1489462955 -187011606 -1335486481 -22207723 -1730529530 -1638779389 -1487418148 -179678709 -498054481 -2057889808 -1729868121 -1259896561 -892741307 -1982388807 -1947379691 -1959686357 -491908060 -1834207117 -391262734 -357843224 -1316854168 -401535594 -1215109484 -1923098265 -1883652505 -343727461 -296426597 -2027238386 -1967493847 -715890023 -1760226067 -384786997 -1041797462 -1055769843 -1813859787 -2011070944 -824235675 -1659466575 -1284602436 -1660038561 -160552903 -1173180089 -1590392716 -1423603 -304175504 -1266615868 -7500765 -1511305829 -80491287 -2049846646 -1839914148 -1820052283 -861652513 -1311554270 -1520463082 -1515103521 -1631274968 -2062149574 -309311285 -1684341255 -594038031 -345712114 -1440234863 -1739157104 -613527611 -1489568830 -1966452731 -397722587 -1554410245 -834421960 -1061666810 -2139936394 -2002337649 -72634606 -999111546 -893117729 -1866462420 -1340261211 -814199894 -491819774 -350384315 -509022131 -1707589716 -488898304 -641361906 -1149129849 -1104934672 -1345936695 -1712779014 -1806083910 -170925025 -1551259136 -1560824172 -1259110699 -569660555 -802849559 -852784012 -435029606 -1508253654 -322193590 -1301393043 -391929006 -818458493 -1199132816 -1838695064 -658260318 -1692898929 -541460600 -1440091861 -1483206137 -255370183 -1334338975 -63427204 -869128716 -262562918 -1963551888 -1035378167 -540861128 -2102184192 -1008754500 -1900972082 -1523565755 -2122121104 -1080985552 -412518844 -1126998592 -659569204 -69025814 -475686518 -1929173892 -917500438 -1497276006 -504457296 -148335516 -1993986892 -1455382409 -773408733 -2109543887 -149096839 -1904640671 -904515315 -152162092 -1882740314 -44918853 -1184402274 -1223095075 -845456441 -1834595335 -473591719 -1081625451 -429883102 -910306806 -852987214 -1702761973 -953400289 -1423166956 -494169206 -1182582293 -699445466 -254463384 -1126153711 -1492039766 -545801143 -1377154064 -249606282 -1097218983 -517370492 -284572341 -361253318 -648245557 -878535268 -1592176151 -2058328237 -508609736 -1218917892 -1506502111 -948781447 -1103700754 -2082313339 -2046777061 -1789006581 -915065220 -1370756373 -97795995 -832298010 -1871661159 -668638057 -17899248 -184950556 -1055157483 -111859855 -980391860 -1951451236 -1670666468 -542643151 -1987873695 -1790095486 -2036422379 -1704041614 -985490106 -1738325878 -1675497758 -137755595 -270913699 -581207453 -1598036015 -1760814723 -1688393801 -2133185596 -210825307 -2140400846 -1218447825 -48536983 -1864771068 -830995558 -1456186865 -1408998843 -741378832 -653909530 -1583649011 -476606959 -219156603 -430572016 -1751466169 -1333552954 -1885157786 -2020665111 -1012126919 -599159746 -527030239 -1574666645 -1981320534 -1172784556 -1385120526 -997947002 -647979544 -702622071 -2104056091 -257506288 -728633711 -1195025583 -1527906737 -2066561580 -1447452129 -633178887 -1056082924 -633361213 -1972952359 -115304386 -890565908 -1927679813 -1576318449 -1825902951 -409581827 -1156677754 -1261038834 -763570795 -2119560740 -998620744 -1234143103 -1846069395 -44589909 -2098291407 -7226415 -1195272673 -1385781073 -1362342196 -414643858 -334886891 -2036821897 -1976289699 -371402944 -1581801626 -1639861969 -354987385 -563408329 -948385880 -897857126 -2064612860 -907569794 -2096666764 -619138925 -1309642760 -1605969217 -1950154623 -1353328247 -1388541952 -519795315 -236383209 -47846713 -1000821413 -1713564987 -2131030239 -492962207 -223902923 -745077317 -537321162 -588034099 -369358399 -1578872163 -1796501209 -175742843 -919947676 -1825815779 -1091965670 -271768428 -2061735874 -1946189973 -1291448754 -761988249 -1291513882 -1856594545 -847126905 -1992796372 -773665592 -2131605806 -1576582188 -1963597030 -1794079761 -280655600 -1104580388 -1833936448 -137096145 -2072439431 -1452246124 -1748957913 -2126967302 -926656752 -768622820 -1129599035 -1415541765 -1186602889 -1701609381 -909139368 -559209571 -1246820525 -167136249 -150326667 -1099523397 -592950944 -1402393728 -1398360671 -186764729 -1481192036 -764113028 -495452536 -1276673133 -1536229154 -207503397 -2143634298 -1875984414 -315140844 -877491606 -1231218093 -2077550206 -1449695669 -1833133668 -1677158214 -127752176 -1794658679 -1420595838 -231061920 -807255664 -1891746749 -1092216608 -194316100 -1695549260 -2135900777 -747715787 -1932413512 -1678702603 -314494335 -749033078 -449803232 -700482784 -508797834 -85313684 -1495494439 -626431785 -1474172901 -905111668 -1585132375 -1785185590 -1120178893 -2005005049 -1953953466 -775973138 -112342135 -496137232 -2046940570 -242135050 -82274285 -1951922974 -1009232446 -1343875916 -1437004713 -1137117229 -1072293150 -348206426 -412463707 -200311033 -1520656782 -475652127 -1351164355 -1527231107 -1448666405 -1714162796 -1440987867 -1509993450 -1645657551 -1124569944 -643471561 -98879435 -1861804914 -370969161 -733661686 -1948339175 -905864769 -1357599000 -152643625 -1385930857 -1732278237 -964526880 -1596704604 -858626516 -1993230219 -1622881180 -574191713 -1796094420 -1928774708 -650865891 -1968815866 -1460226886 -590155086 -1657048556 -1447146396 -1937175297 -105644512 -1745820762 -940477973 -1133650291 -785524653 -1730864862 -832253372 -1121430293 -1562448379 -639870337 -1850133430 -1776833097 -326266097 -1028541488 -1600914113 -740883928 -925992590 -343470321 -269641911 -681103007 -1210400139 -82548142 -112186632 -30081958 -928811061 -468872184 -1217295645 -11200546 -1416499333 -100579089 -363118634 -1933840511 -2039954679 -941865598 -833143549 -1050249603 -1376982928 -1668290824 -1417383736 -2079838428 -1253137177 -1104407710 -1079220949 -819607281 -1179459909 -1908628753 -1360216432 -1194150309 -1849562148 -765231111 -2107204341 -1630536510 -388304203 -25936588 -2124537822 -896575685 -2002270443 -1090587011 -722966732 -439389998 -1778918000 -1007492466 -17319467 -1177989524 -818188175 -950865484 -1770372261 -1260661442 -863194392 -1456110859 -131566001 -1469106044 -1645791949 -1235913483 -1536074997 -1911553992 -1132584424 -51367160 -39432026 -1309097706 -1035181227 -1525857842 -1990521667 -1197404303 -704864484 -1137585736 -356555711 -1152459647 -1234274836 -1912622279 -1907414857 -285619183 -775657636 -1252150962 -1708961381 -2067635489 -169287869 -1952865655 -1820486484 -1716817779 -966130561 -632483760 -110501670 -1775696682 -553892015 -2068970007 -1123695425 -977816257 -1612964555 -1409199804 -1971446712 -579699021 -2015623155 -23834660 -1157172278 -982569114 -2037337215 -2047304737 -2067722525 -1632101921 -928363116 -1530195157 -1873330874 -814250651 -1344892673 -1345770436 -1065947648 -1073536662 -1920559787 -21642052 -813231621 -1397924639 -1448309493 -10510106 -549692488 -206996422 -65356414 -1081106481 -297488900 -554012084 -1939486043 -287646888 -495557219 -888596667 -1042901031 -276101203 -1868241301 -1173143120 -969054733 -386918683 -361822065 -1617241798 -282378907 -3430079 -1814762931 -10342976 -2035705872 -399126700 -1531017319 -659022079 -1610914174 -1308184689 -722490037 -1017511721 -907213786 -408207602 -1682398296 -150980823 -1356505054 -1094046026 -876573368 -830777556 -2087194545 -333344070 -1876433114 -1413990803 -889388319 -1463294313 -604793147 -718320378 -1805013259 -1503846491 -1412932694 -285619532 -781523279 -1051765101 -1078154050 -68104964 -31346097 -700358764 -571877341 -1553149862 -1126001349 -1078775279 -1919166179 -221592513 -568722093 -62504254 -389493595 -688695109 -2109323280 -736322284 -1567853174 -1283946728 -1376972440 -1492019008 -196921437 -386291632 -560394143 -1828569306 -125853725 -2099647427 -1323018085 -919273557 -1233315981 -829531823 -477512837 -411862620 -835260059 -115211174 -1471435471 -2141765892 -538455830 -331046352 -1913392334 -1964827360 -997399601 -37745525 -881362810 -1870034311 -1243491132 -44602920 -169483637 -948171137 -1583638819 -305310015 -1006989422 -152593547 -544269911 -1411541604 -527890019 -992603576 -1035331936 -1911340358 -1837005080 -171986641 -66486425 -745848535 -614280206 -1253531113 -1282839121 -2088774414 -1116398589 -746461484 -178695814 -1158407392 -266293642 -241320746 -1428652486 -347675095 -72318178 -2123357091 -379382591 -404258994 -1890136697 -1949360055 -883925753 -1995744372 -928577711 -841926028 -481002513 -1080788683 -1398708855 -1743725923 -92257252 -84441230 -1864545590 -1336354106 -1719479216 -599745633 -1784098460 -28654159 -554113385 -1494568303 -93249562 -1729809871 -280888811 -729190371 -1960875615 -1152414443 -474531208 -1839231545 -1084961897 -670956202 -324256617 -1614949480 -410095927 -1207221866 -352405006 -111037416 -42561469 -218555032 -1057386454 -1066953453 -798232121 -556914838 -1333948640 -2093001447 -1293181869 -1973164643 -1535677927 -1680449443 -1756346804 -1758006813 -1740490665 -1551850868 -768645661 -1513487722 -244344939 -716656709 -1761015787 -772709155 -1089154676 -272032504 -57610265 -1888082705 -1787654863 -1819060911 -1379532485 -1569022383 -1607489568 -1732890116 -510958998 -2048258680 -920773350 -670533168 -1804258767 -1708001329 -964427054 -2066412669 -1092188599 -1871052484 -1176055567 -526427581 -35728227 -1336373676 -2048392206 -1017461185 -57855234 -1710309394 -1101369863 -1561733948 -1517330402 -403758289 -2064722350 -600284577 -104712033 -1106031738 -456972134 -929134466 -1609372725 -1170855110 -1169176309 -870855313 -1364191286 -1427528430 -783018726 -415939066 -628611277 -1597672946 -2101164981 -1058744399 -267614951 -973724639 -1564617533 -589619616 -1247338854 -288757164 -1976096775 -1423896570 -2019373469 -778336295 -1175216188 -1451370257 -2060646773 -821538642 -1427589531 -1809943233 -610057276 -1145706954 -1558396876 -1265736120 -253961658 -1283579417 -1646027404 -898238374 -2029797055 -2021370790 -2135055637 -1575833336 -115059701 -1073112407 -1232556943 -957282039 -91746149 -84267697 -1095460106 -1020695811 -735123241 -742890296 -287281214 -792125242 -997814541 -569191164 -1503729610 -1595997374 -1857113788 -984109418 -7939132 -289005410 -1853400003 -843550686 -2016825755 -908580037 -1895951689 -897682837 -1282821284 -1788987955 -602018038 -1321703649 -302384175 -1224520423 -1178960160 -2099281898 -1622023123 -1185213243 -1968149176 -992586291 -744822941 -556991024 -466923095 -671211527 -320536598 -1369615910 -257387177 -874218781 -2059423140 -1730775281 -1474149152 -505962225 -1819357102 -2062647328 -85128175 -525128323 -1821419138 -212064381 -1490681094 -1332920956 -2000585635 -691306366 -899563092 -672012364 -895302175 -2073224343 -1759360226 -864982839 -1449768530 -910224848 -1623002755 -470019091 -1166008771 -1321135322 -1487930521 -201197132 -1380937146 -1554839693 -1609703555 -288663979 -409936480 -674879784 -1843389881 -107154698 -1357713100 -2070322325 -229783934 -802981432 -921689876 -1042200121 -1380808715 -1543783523 -472248007 -2120177984 -635222417 -1041953282 -1527152936 -134846408 -768331671 -531225086 -1210499823 -1757937130 -569328484 -1664183203 -1100074293 -1261925428 -632170624 -1290075859 -1310062101 -63898816 -205577012 -1979136308 -969720173 -833550528 -1447894715 -1629270848 -591159439 -1357340251 -98816476 -803653001 -1471331824 -399770763 -1618365925 -1995712220 -388199047 -406063343 -3575635 -2113638976 -255780958 -1795783459 -997420475 -388574843 -279615774 -808093982 -948971846 -8769453 -1359308575 -968183239 -772104554 -1665043904 -533490471 -630119872 -1182825347 -489486750 -1941439240 -902774162 -953374679 -992739686 -1175449059 -1070265860 -635281748 -2039129399 -2103770167 -1894432561 -1135502305 -1847552893 -1355420678 -48807770 -2120920883 -236224028 -1667458940 -320811230 -1690388640 -1300706317 -1735027006 -2065930876 -1584628236 -1902056005 -413706793 -1765504612 -1054463285 -1329375951 -401745069 -440788515 -1661473102 -648563373 -1925101486 -1192049500 -901003637 -1260932062 -1116537438 -932612980 -2090699054 diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index fdf7a759..b8857519 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -20,7 +20,8 @@ class is the base class adapting `Raven` to work with the Ostrich calibration to import numpy as np import xarray as xr -from dataclasses import astuple, fields, replace +from dataclasses import astuple, fields, is_dataclass, replace +from numpy.distutils.misc_util import is_sequence import ravenpy from ravenpy.config.commands import ( @@ -61,7 +62,7 @@ class Raven: "region_id", ] - def __init__(self, workdir: Union[str, Path] = None, identifier: str = None): + def __init__(self, workdir: Union[str, Path] = None): # , identifier: str = None): """Initialize the RAVEN model. Directory for the model configuration and outputs. If None, a temporary directory will be created. @@ -89,7 +90,8 @@ def __init__(self, workdir: Union[str, Path] = None, identifier: str = None): self.raven_simg = None # ravenpy.raven_simg # self._name = None self._defaults = {} - # self.rvfiles = {} + + self._rv_paths = [] # Directory logic # Top directory inside workdir. This is where Ostrich and its config and templates are stored. @@ -102,7 +104,8 @@ def __init__(self, workdir: Union[str, Path] = None, identifier: str = None): self._psim = 0 self._pdim = None # Parallel dimension (either initparam, params or region) - self.config = Config(identifier=identifier or self.__class__.__name__.lower()) + # or self.__class__.__name__.lower()) + self.config = Config() @property def output_path(self): @@ -153,7 +156,8 @@ def cmd(self): @property def bash_cmd(self): """Bash command arguments.""" - return [self.cmd, self.config.identifier, "-o", str(self.output_path)] + identifier = self.config.identifier or "raven-generic" + return [self.cmd, identifier, "-o", str(self.output_path)] @property def singularity_cmd(self): @@ -174,44 +178,21 @@ def cmd_path(self): """This is the main executable.""" return self.model_path - # @property - # def name(self): - # """Name of the model configuration.""" - # return self._name - - # @name.setter - # def name(self, x): - # self._name = x - def derived_parameters(self): """Subclassed by emulators. Defines model parameters that are a function of other parameters.""" return def configure(self, fns): """Read configuration files.""" - # for fn in fns: - # shutil.copy(fn, self.model_path / fn.name) - # self.rvfiles = - # rvf = RVFile(fn) - # if rvf.ext not in self._rvext + ("txt",): - # raise ValueError( - # "rv contains unrecognized configuration file keys : {}.".format( - # rvf.ext - # ) - # ) - # else: - # if rvf.ext.startswith("rv"): - # setattr(self, "name", rvf.stem) - # self.rvfiles[rvf.ext] = rvf - # elif rvf.ext == "txt": - # self.rvfiles[rvf.stem] = rvf - # else: - # raise ValueError + if not is_sequence(fns): + fns = [fns] + for fn in map(Path, fns): + self.config.set_rv_file(fn) def _dump_rv(self): """Write configuration files to disk.""" - identifier = self.config.identifier + identifier = self.config.identifier or "raven-generic" for rvx in ["rvt", "rvh", "rvp", "rvc", "rvi"]: rvo = getattr(self.config, rvx) @@ -220,7 +201,8 @@ def _dump_rv(self): else: fn = self.model_path / f"{identifier}.{rvx}" with open(fn, "w") as f: - f.write(rvo.to_rv()) + self._rv_paths.append(fn) + f.write(rvo.content or rvo.to_rv()) def setup(self, overwrite=False): """Create directory structure to store model input files, executable and output results. @@ -314,6 +296,8 @@ def run(self, ts, overwrite=False, **kwds): if isinstance(ts, (str, Path)): ts = [ts] + ts_are_ncs = all(Path(f).suffix.startswith(".nc") for f in ts) + # Support legacy interface for single HRU emulator hru_attrs = {} for k in ["area", "latitude", "longitude", "elevation"]: @@ -376,11 +360,13 @@ def run(self, ts, overwrite=False, **kwds): for key, val in kwds.items(): self.config.update(key, val) - if self.config.rvi: + # if self.config.rvi: + if ts_are_ncs: self.handle_date_defaults(ts) self.set_calendar(ts) - self.config.rvt.configure_from_nc_data(ts) + if ts_are_ncs: + self.config.rvt.configure_from_nc_data(ts) # Loop over parallel parameters - sets self.rvi.run_index procs = [] @@ -445,7 +431,7 @@ def parse_results(self, path=None, run_name=None): # Output files default names. The actual output file names will be composed of the run_name and the default # name. path = path or self.exec_path - run_name = run_name or getattr(self.config.rvi, "run_name", "") + run_name = run_name or self.config.rvi.run_name or "" patterns = { "hydrograph": f"{run_name}*Hydrographs.nc", "storage": f"{run_name}*WatershedStorage.nc", @@ -467,8 +453,7 @@ def parse_results(self, path=None, run_name=None): self.ind_outputs[key] = fns self.outputs[key] = self._merge_output(fns, pattern[1:]) - # TODO!!! - self.outputs["rv_config"] = self._merge_output([], "rv.zip") + self.outputs["rv_config"] = self._merge_output(self._rv_paths, "rv.zip") def _merge_output(self, files, name): """Merge multiple output files into one if possible, otherwise return a list of files.""" @@ -570,10 +555,6 @@ def handle_date_defaults(self, ts): if rvi.end_date in [None, dt.datetime(1, 1, 1)]: rvi.end_date = end - # @property - # def rvs(self): - # return self._rvs - @property def q_sim(self): """Return a view of the hydrograph time series. @@ -754,7 +735,8 @@ def write_save_best(self): def write_ostrich_runs_raven(self): fn = self.exec_path / "ostrich-runs-raven.sh" - fn.write_text(ostrich_runs_raven.format(identifier=self.config.identifier)) + identifier = self.config.identifier or "ostrich-generic" + fn.write_text(ostrich_runs_raven.format(identifier=identifier)) make_executable(fn) def setup(self, overwrite=False): @@ -774,19 +756,22 @@ def setup(self, overwrite=False): os.symlink(self.ostrich_exec, str(self.cmd)) def _dump_rv(self): - """Write configuration files to disk.""" + """write configuration files to disk.""" super()._dump_rv() - # OST - with open(self.exec_path / "ostIn.txt", "w") as f: - f.write(self.config.ost.to_rv()) + # ostIn.txt + fn = self.exec_path / "ostIn.txt" + with open(fn, "w") as f: + self._rv_paths.append(fn) + f.write(self.config.ost.content or self.config.ost.to_rv()) - # Not sure about this - shutil.copy( - Path(__file__).parent.parent / "data" / "OstRandomNumbers.txt", - self.exec_path / "OstRandomNumbers.txt", - ) + # OstRandomNumbers.txt + if self.config.ost.random_numbers_path: + fn = self.exec_path / "OstRandomNumbers.txt" + with open(fn, "w") as f: + self._rv_paths.append(fn) + f.write(self.config.ost.random_numbers_path.read_text()) def parse_results(self): """Store output files in the self.outputs dictionary.""" @@ -807,9 +792,14 @@ def parse_results(self): self.outputs[key] = fns try: - self.outputs["calibparams"] = ", ".join( - map(str, astuple(self.calibrated_params)) - ) + if is_dataclass(self.calibrated_params): + self.outputs["calibparams"] = ", ".join( + map(str, astuple(self.calibrated_params)) + ) + else: + self.outputs["calibparams"] = ", ".join( + map(str, self.calibrated_params) + ) except (AttributeError, TypeError): err = self.parse_errors() raise UserWarning(err) @@ -859,12 +849,14 @@ def ost2raven(self, ops): Raven model. """ - if hasattr(self.config.rvp, "params"): + if self.config.rvp.params: + # We are using an emulator n = len(fields(self.config.rvp.params)) pattern = "par_x{}" if n < 8 else "par_x{:02}" names = [pattern.format(i + 1) for i in range(n)] return self.__class__.Params(*[ops[n] for n in names]) else: + # We are using generic Ostrich return ops.values() @property diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 3174ed0d..2bf654fb 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -1,7 +1,8 @@ from collections import defaultdict -from dataclasses import dataclass from pathlib import Path +from dataclasses import dataclass + from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven @@ -79,6 +80,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="blended", hrus=(BLENDED.ForestHRU(),), subbasins=( Sub( @@ -363,6 +365,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="blended-ost", algorithm="DDS", max_iterations=50, lowerBounds=BLENDED.Params(), diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index 296d402b..b53e6f3d 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -1,7 +1,8 @@ from collections import defaultdict -from dataclasses import dataclass from pathlib import Path +from dataclasses import dataclass + from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven @@ -56,6 +57,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="gr4jcn", hrus=(GR4JCN.LandHRU(),), subbasins=( Sub( @@ -274,6 +276,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="gr4jcn-ost", algorithm="DDS", max_iterations=50, lowerBounds=GR4JCN.Params(), diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index a11a7a7c..0759c98b 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -1,8 +1,8 @@ from collections import defaultdict -from dataclasses import dataclass from pathlib import Path import xarray as xr +from dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven @@ -44,6 +44,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="hbvec", hrus=(GR4JCN.LandHRU(),), subbasins=( Sub( @@ -314,6 +315,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="hbvec-ost", algorithm="DDS", max_iterations=50, lowerBounds=HBVEC.Params(), diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index b9a7f1db..8faa8a35 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -1,6 +1,7 @@ -from dataclasses import dataclass from pathlib import Path +from dataclasses import dataclass + from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven @@ -52,6 +53,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="hmets", hrus=(HMETS.ForestHRU(),), subbasins=( Sub( @@ -254,6 +256,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="hmets-ost", algorithm="DDS", max_iterations=50, lowerBounds=HMETS.Params(), diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 8996fdee..7116250a 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -1,7 +1,8 @@ from collections import defaultdict -from dataclasses import dataclass from pathlib import Path +from dataclasses import dataclass + from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven @@ -30,6 +31,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="mohyse", hrus=(GR4JCN.LandHRU(),), subbasins=( Sub( @@ -221,6 +223,7 @@ def __init__(self, *args, **kwds): super().__init__(*args, **kwds) self.config.update( + identifier="mohyse-ost", algorithm="DDS", max_iterations=50, lowerBounds=MOHYSE.Params(), diff --git a/ravenpy/models/multimodel.py b/ravenpy/models/multimodel.py index 2e1b0958..a6da18fa 100644 --- a/ravenpy/models/multimodel.py +++ b/ravenpy/models/multimodel.py @@ -47,12 +47,23 @@ def resume(self, solution=None): m.resume(solution) @property - def rvs(self): + def _rv_paths(self): out = [] for m in self._models: - out.extend(m.rvs) + out.extend(m._rv_paths) return out + @_rv_paths.setter + def _rv_paths(self, value): + pass + + # @property + # def rvs(self): + # out = [] + # for m in self._models: + # out.extend(m._rv_paths) + # return out + def run(self, ts, overwrite=False, **kwds): """Run model. diff --git a/tests/test_base.py b/tests/test_base.py index 5800e9f4..5663d8ad 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -1,4 +1,4 @@ -import tempfile +import zipfile from pathlib import Path import numpy as np @@ -11,10 +11,25 @@ has_singularity = False # ravenpy.raven_simg.exists() -pytestmark = pytest.mark.skip - class TestRaven: + def test_identifier(self): + model = Raven() + assert model.config.identifier is None + + model.config.update(identifier="toto") + assert model.config.identifier == "toto" + + rvt = get_local_testdata("raven-gr4j-cemaneige/raven-gr4j-salmon.rvt") + model = Raven() + model.configure(rvt) + assert model.config.identifier == rvt.stem + + rvp_tpl = get_local_testdata("ostrich-gr4j-cemaneige/raven-gr4j-salmon.rvp.tpl") + model = Raven() + model.configure(rvp_tpl) + assert model.config.identifier == Path(rvp_tpl.stem).stem + def test_gr4j(self): rvs = get_local_testdata("raven-gr4j-cemaneige/raven-gr4j-salmon.rv?") ts = get_local_testdata( @@ -25,30 +40,42 @@ def test_gr4j(self): model.configure(rvs) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 5 + def test_mohyse(self): rvs = get_local_testdata("raven-mohyse/raven-mohyse-salmon.rv?") ts = get_local_testdata("raven-mohyse/Salmon-River-Near-Prince-George_*.rvt") - model = Raven(tempfile.mkdtemp()) + model = Raven() model.configure(rvs) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 5 + def test_hmets(self): rvs = get_local_testdata("raven-hmets/raven-hmets-salmon.rv?") ts = get_local_testdata("raven-hmets/Salmon-River-Near-Prince-George_*.rvt") - model = Raven(tempfile.mkdtemp()) + model = Raven() model.configure(rvs) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 5 + def test_hbvec(self): rvs = get_local_testdata("raven-hbv-ec/raven-hbv-ec-salmon.rv?") ts = get_local_testdata("raven-hbv-ec/Salmon-River-Near-Prince-George_*.rvt") - model = Raven(tempfile.mkdtemp()) + model = Raven() model.configure(rvs) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 5 + @pytest.mark.skipif(not has_singularity, reason="Singularity is not available.") def test_singularity(self): rvs = get_local_testdata("raven-gr4j-cemaneige/raven-gr4j-salmon.rv?") @@ -72,6 +99,7 @@ def test_gr4j_with_no_tags(self): model = Ostrich() model.configure(ost) + model(ts) opt_para = model.optimized_parameters @@ -110,6 +138,9 @@ def test_gr4j_with_no_tags(self): assert Path(model.outputs["calibration"]).exists() + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + def test_mohyse_with_no_tags(self): ts = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc" @@ -170,6 +201,9 @@ def test_mohyse_with_no_tags(self): assert Path(model.outputs["calibration"]).exists() + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + def test_hmets_with_no_tags(self): ts = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc" @@ -181,6 +215,9 @@ def test_hmets_with_no_tags(self): model.configure(ost) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + opt_para = model.optimized_parameters opt_func = model.obj_func @@ -247,6 +284,9 @@ def test_hmets_with_no_tags(self): assert Path(model.outputs["calibration"]).exists() + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + def test_hbvec_with_no_tags(self): ts = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc" @@ -258,6 +298,9 @@ def test_hbvec_with_no_tags(self): model.configure(ost) model(ts) + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + opt_para = model.optimized_parameters opt_func = model.obj_func @@ -321,6 +364,9 @@ def test_hbvec_with_no_tags(self): assert Path(model.outputs["calibration"]).exists() + z = zipfile.ZipFile(model.outputs["rv_config"]) + assert len(z.filelist) == 7 + def test_get_diff_level(): fn = Path("/") / "a" / "b" / "c.txt" diff --git a/tests/test_blended.py b/tests/test_blended.py index d9402905..63d867f0 100644 --- a/tests/test_blended.py +++ b/tests/test_blended.py @@ -86,7 +86,7 @@ def test_simple(self): class TestBLENDED_OST: def test_simple(self): - model = BLENDED_OST() + model = BLENDED_OST() # "/tmp/ravenpy_debug/test_blended_ost") params = ( 2.930702e-02, # par_x01 2.211166e00, # par_x02 @@ -223,6 +223,10 @@ def test_simple(self): 1.0, # par_r08 ) + model.configure( + get_local_testdata("ostrich-gr4j-cemaneige/OstRandomNumbers.txt") + ) + model( TS, start_date=dt.datetime(1954, 1, 1), diff --git a/tests/test_cli.py b/tests/test_cli.py index 2022b1c9..ea6037ef 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -287,8 +287,6 @@ def test_aggregate_forcings_to_hrus_with_nodata(self, tmp_path): # # = 0.2/(0.2+0.1)*9 + 0.1/(0.2+0.1)*6 assert abs(val[3, 2] - 4.9) < 1e-04 # = 0.2*2 + 0.1*3 + 0.7*6 - print("val[2, 3] = ", val[2, 3].data) - # aggregated time series for HRU #4 # HRU #3 = [ 40% cell 3 ; 60% cell 4 ] # (cell3 is NODATA at 3rd time step; cell 4 is NODATA for each time step) diff --git a/tests/test_data_assimilation.py b/tests/test_data_assimilation.py index 3f402f1e..6e9d2b72 100644 --- a/tests/test_data_assimilation.py +++ b/tests/test_data_assimilation.py @@ -1,10 +1,10 @@ import datetime as dt -from dataclasses import replace import matplotlib.pyplot as plt import numpy as np import pytest import xarray as xr +from dataclasses import replace from ravenpy.config.commands import BasinIndexCommand, HRUState from ravenpy.config.rvs import RVC @@ -12,8 +12,6 @@ from ravenpy.utilities.data_assimilation import assimilate, perturbation from ravenpy.utilities.testdata import get_local_testdata -# pytestmark = pytest.mark.skip - def test_perturbation(): ts = get_local_testdata( diff --git a/tests/test_emulators.py b/tests/test_emulators.py index c4e97c97..a934c5c7 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -85,9 +85,6 @@ def test_race(): class TestGR4JCN: def test_identifier(self): assert GR4JCN().config.identifier == "gr4jcn" - assert GR4JCN(identifier="toto").config.identifier == "toto" - assert Raven().config.identifier == "raven" - assert Raven(identifier="toto").config.identifier == "toto" def test_simple(self): model = GR4JCN() # "/tmp/ravenpy_debug/test_simple") @@ -103,9 +100,13 @@ def test_simple(self): ) total_area_in_m2 = model.config.rvh.hrus[0].area * 1000 * 1000 - model.rvp.avg_annual_runoff = get_average_annual_runoff(TS, total_area_in_m2) + model.config.rvp.avg_annual_runoff = get_average_annual_runoff( + TS, total_area_in_m2 + ) - np.testing.assert_almost_equal(model.rvp.avg_annual_runoff, 208.4805694844741) + np.testing.assert_almost_equal( + model.config.rvp.avg_annual_runoff, 208.4805694844741 + ) assert model.config.rvi.suppress_output == "" @@ -682,7 +683,7 @@ def test_parallel_basins(self, input2d): assert len(z.filelist) == 10 @pytest.mark.online - def test_dap(self): + def _test_dap(self): """Test Raven with DAP link instead of local netCDF file.""" model = GR4JCN() config = dict( @@ -691,7 +692,7 @@ def test_dap(self): run_name="test", name="Salmon", hrus=(GR4JCN.LandHRU(**salmon_land_hru_1),), - params=model.params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), + params=model.Params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), ) ts = ( @@ -702,12 +703,16 @@ def test_dap(self): class TestGR4JCN_OST: def test_simple(self): - model = GR4JCN_OST() # "/tmp/ravenpy_debug/test_gr4j_ost") + model = GR4JCN_OST() model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) params = (0.529, -3.396, 407.29, 1.072, 16.9, 0.053) low = (0.01, -15.0, 10.0, 0.0, 1.0, 0.0) high = (2.5, 10.0, 700.0, 7.0, 30.0, 1.0) + model.configure( + get_local_testdata("ostrich-gr4j-cemaneige/OstRandomNumbers.txt") + ) + model( TS, start_date=dt.datetime(1954, 1, 1), @@ -816,7 +821,12 @@ def test_simple(self): class TestHMETS_OST: def test_simple(self): - model = HMETS_OST() # "/tmp/ravenpy_debug/test_hmets_ost") + model = HMETS_OST() + + model.configure( + get_local_testdata("ostrich-gr4j-cemaneige/OstRandomNumbers.txt") + ) + params = ( 9.5019, 0.2774, @@ -1029,6 +1039,11 @@ def test_simple(self): class TestMOHYSE_OST: def test_simple(self): model = MOHYSE_OST() + + model.configure( + get_local_testdata("ostrich-gr4j-cemaneige/OstRandomNumbers.txt") + ) + params = ( 1.0, 0.0468, @@ -1219,7 +1234,12 @@ def test_evap(self): class TestHBVEC_OST: def test_simple(self): - model = HBVEC_OST() # "/tmp/ravenpy_debug/test_hbvec_ost") + model = HBVEC_OST() + + model.configure( + get_local_testdata("ostrich-gr4j-cemaneige/OstRandomNumbers.txt") + ) + params = ( 0.05984519, 4.072232, diff --git a/tests/test_routing_lievre_tutorial.py b/tests/test_routing_lievre_tutorial.py index 79b33348..fd00f516 100644 --- a/tests/test_routing_lievre_tutorial.py +++ b/tests/test_routing_lievre_tutorial.py @@ -48,7 +48,9 @@ def test_lievre_tutorial(self): # Model # ######### - model = Raven(identifier="raven-lievre-routing") + model = Raven() + + model.config.identifier = "raven-lievre-routing" ####### # RVI # diff --git a/tests/test_rv.py b/tests/test_rv.py index 6861e692..d31f7951 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -6,14 +6,16 @@ import pytest import ravenpy -from ravenpy.models.commands import ( +from ravenpy.config.commands import ( BaseValueCommand, GriddedForcingCommand, MonthlyAverageCommand, - RainCorrection, + RainCorrectionCommand, ) from ravenpy.utilities.testdata import get_local_testdata +pytestmark = pytest.mark.skip + class TestRVFile: def test_simple_rv(self): From eb2bd4c8b2f26cbf81a0897eed65ceefed3f1ba9 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 10 Apr 2021 08:12:19 -0400 Subject: [PATCH 21/59] test_rv.py now works --- ravenpy/config/importers.py | 4 +- tests/test_ECCC_forecast.py | 2 +- tests/test_blended.py | 2 +- tests/test_emulators.py | 10 +-- tests/test_rv.py | 165 ++++++++---------------------------- 5 files changed, 45 insertions(+), 138 deletions(-) diff --git a/ravenpy/config/importers.py b/ravenpy/config/importers.py index 416684fb..fbe94d1f 100644 --- a/ravenpy/config/importers.py +++ b/ravenpy/config/importers.py @@ -124,8 +124,8 @@ def extract(self): return dict( subbasins=subbasin_recs, - land_subbasins=land_sb_ids, - lake_subbasins=lake_sb_ids, + land_subbasin_ids=land_sb_ids, + lake_subbasin_ids=lake_sb_ids, reservoirs=reservoir_cmds, channel_profiles=channel_profile_cmds, hrus=hru_recs, diff --git a/tests/test_ECCC_forecast.py b/tests/test_ECCC_forecast.py index ac2cc3a5..dab4d61d 100644 --- a/tests/test_ECCC_forecast.py +++ b/tests/test_ECCC_forecast.py @@ -44,7 +44,7 @@ def test_forecasting_GEPS(self): # do not clean, the model will simply add the hindcast file to the list of available # data provided in the testdata above. Then the dates will not work, and the model errors. - model = GR4JCN("/tmp/ravenpy_debug/test_forecasting_GEPS") + model = GR4JCN() model.config.rvc.set_from_solution(rvc.read_text()) diff --git a/tests/test_blended.py b/tests/test_blended.py index 63d867f0..f836c4c1 100644 --- a/tests/test_blended.py +++ b/tests/test_blended.py @@ -86,7 +86,7 @@ def test_simple(self): class TestBLENDED_OST: def test_simple(self): - model = BLENDED_OST() # "/tmp/ravenpy_debug/test_blended_ost") + model = BLENDED_OST() params = ( 2.930702e-02, # par_x01 2.211166e00, # par_x02 diff --git a/tests/test_emulators.py b/tests/test_emulators.py index a934c5c7..2111454f 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -87,7 +87,7 @@ def test_identifier(self): assert GR4JCN().config.identifier == "gr4jcn" def test_simple(self): - model = GR4JCN() # "/tmp/ravenpy_debug/test_simple") + model = GR4JCN() model.config.rvi.start_date = dt.datetime(2000, 1, 1) model.config.rvi.end_date = dt.datetime(2002, 1, 1) @@ -167,7 +167,7 @@ def test_simple(self): def test_routing(self): """We need at least 2 subbasins to activate routing.""" - model = GR4JCN() # "/tmp/ravenpy_debug/new_config_routing") + model = GR4JCN() ts_2d = get_local_testdata( "raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily_2d.nc" @@ -408,7 +408,7 @@ def test_config_update(self): model.config.update("why", "not?") def test_run(self): - model = GR4JCN() # "/tmp/ravenpy_debug/test_run") + model = GR4JCN() model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) @@ -661,7 +661,7 @@ def test_parallel_params(self): def test_parallel_basins(self, input2d): ts = input2d - model = GR4JCN() # "/tmp/ravenpy_debug/test_parallel_basins") + model = GR4JCN() model.config.rvh.hrus = (GR4JCN.LandHRU(**salmon_land_hru_1),) model( @@ -1006,7 +1006,7 @@ def test_simple(self): class TestMOHYSE: def test_simple(self): - model = MOHYSE("/tmp/ravenpy_debug/test_mohyse") + model = MOHYSE() params = ( 1.0, 0.0468, diff --git a/tests/test_rv.py b/tests/test_rv.py index d31f7951..98a4ae05 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -12,117 +12,37 @@ MonthlyAverageCommand, RainCorrectionCommand, ) +from ravenpy.config.importers import ( + RoutingProductGridWeightImporter, + RoutingProductShapefileImporter, +) +from ravenpy.config.rvs import RVC, RVH, RVI, RVP, RVT, Ost from ravenpy.utilities.testdata import get_local_testdata -pytestmark = pytest.mark.skip - - -class TestRVFile: - def test_simple_rv(self): - fn = get_local_testdata("raven-hmets/*.rvp") - rvf = RVFile(fn) - - assert rvf.ext == "rvp" - assert rvf.stem == "raven-hmets-salmon" - assert not rvf.is_tpl - - def test_simple_tpl(self): - fn = get_local_testdata("ostrich-gr4j-cemaneige/*.rvp.tpl") - rvf = RVFile(fn) - - assert rvf.ext == "rvp" - assert rvf.stem == "raven-gr4j-salmon" - assert rvf.is_tpl - - def test_ostIn(self): - fn = get_local_testdata("ostrich-gr4j-cemaneige/ostIn.txt") - rvf = RVFile(fn) - - assert rvf.ext == "txt" - assert rvf.stem == "ostIn" - assert rvf.is_tpl - - def test_tags(self): - rvp = list( - (Path(ravenpy.__file__).parent / "models" / "raven-gr4j-cemaneige").glob( - "*.rvp" - ) - )[0] - rvf = RVFile(rvp) - - assert isinstance(rvf.tags, list) - assert "params.GR4J_X3" in rvf.tags - - def test_fail(self): - fn = Path(ravenpy.__file__).parent - with pytest.raises(ValueError): - RVFile(fn) - class TestRV: def test_end_date(self): - rvi = RVI( - run_name="test", - start_date=dt.datetime(2000, 1, 1), - end_date=dt.datetime(2000, 1, 11), - ) + rvi = RVI(None) + rvi.run_name = "test" + rvi.start_date = dt.datetime(2000, 1, 1) + rvi.end_date = dt.datetime(2000, 1, 11) assert 10 == rvi.duration rvi.duration = 11 assert dt.datetime(2000, 1, 12) == rvi.end_date - def test_params(self): - class RVP(RV): - params = namedtuple("p", "x, y") - - rvp = RVP() - rvp.params = RVP.params(1, 2) - assert rvp.params.x == 1 - - def test_dict_interface(self): - rv = RV(run_name="test") - - assert rv["run_name"] == rv.run_name - - with pytest.raises(AttributeError): - rv["r"] = 6 - def test_evaluation_metrics(self): - rvi = RVI() + rvi = RVI(None) rvi.evaluation_metrics = "LOG_NASH" with pytest.raises(ValueError): rvi.evaluation_metrics = "JIM" - def test_update(self): - rv = RV(a=None, b=None) - rv.update({"a": 1, "b": 2}) - assert rv.a == 1 - - rv.c = 1 - assert rv["c"] == 1 - - def test_namedtuple(self): - class Mod(RV): - params = namedtuple("params", "x1, x2, x3") - - m = Mod(params=Mod.params(1, 2, 3)) - assert m.params.x1 == 1 - - -def compare(a, b): - """ - Compare two base strings, disregarding whitespace - """ - import re - - return re.sub(r"\s*", "", a) == re.sub(r"\s*", "", b) - class TestOst: def test_random(self): - o = Ost() + o = Ost(None) assert o.random_seed == "" o.random_seed = 0 @@ -131,49 +51,47 @@ def test_random(self): class TestRVI: def test_supress_output(self): - rvi = RVI(suppress_output=True) + rvi = RVI(None) + rvi.suppress_output = True assert rvi.suppress_output == ":SuppressOutput\n:DontWriteWatershedStorage" - rvi = RVI(suppress_output=False) + rvi = RVI(None) + rvi.suppress_output = False assert rvi.suppress_output == "" class TestRVC: @classmethod def setup_class(self): - rvc = open(get_local_testdata("gr4j_cemaneige/solution.rvc")).read() - self.r = RVC() - self.r.parse(rvc) + sol = open(get_local_testdata("gr4j_cemaneige/solution.rvc")).read() + self.rvc = RVC(None) + self.rvc.set_from_solution(sol) def test_parse(self): - assert self.r.hru_state.atmosphere == 821.98274 - assert self.r.basin_state.qout == (1, 13.2166, 13.29232) + assert self.rvc.hru_state.atmosphere == 821.98274 + assert self.rvc.basin_state.qout == (1, 13.2166, 13.29232) def test_write(self): - assert "1,0.0,821.98274" in self.r.hru_states_cmd.to_rv() - assert ":BasinIndex 1 watershed" in self.r.basin_states_cmd.to_rv() - - def test_format(self): - rvc_template = Path(ravenpy.models.__file__).parent / "global" / "global.rvc" - params = dict(self.r.items()) - rvc_template.read_text().format(**params) + res = self.rvc.to_rv() + assert "1,0.0,821.98274" in res + assert ":BasinIndex 1 watershed" in res class TestRVH: - importers = pytest.importorskip("ravenpy.models.importers") - @classmethod def setup_class(self): shp = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = self.importers.RoutingProductShapefileImporter(shp) + importer = RoutingProductShapefileImporter(shp) config = importer.extract() - config.pop("channel_profiles") - self.rvh = RVH(**config) + self.rvh = RVH(None) + for k, v in config.items(): + if k != "channel_profiles": + self.rvh.update(k, v) def test_import_process(self): assert len(self.rvh.subbasins) == 46 - assert len(self.rvh.land_subbasins) == 41 - assert len(self.rvh.lake_subbasins) == 5 + assert len(self.rvh.land_subbasin_ids) == 41 + assert len(self.rvh.lake_subbasin_ids) == 5 assert len(self.rvh.reservoirs) == 5 assert len(self.rvh.hrus) == 51 @@ -202,35 +120,31 @@ def test_format(self): class TestRVP: - importers = pytest.importorskip("ravenpy.models.importers") - @classmethod def setup_class(self): shp = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = self.importers.RoutingProductShapefileImporter(shp) + importer = RoutingProductShapefileImporter(shp) config = importer.extract() - self.rvp = RVP(channel_profiles=config["channel_profiles"]) + self.rvp = RVP(None) + self.rvp.tmpl = "{channel_profiles}" + self.rvp.channel_profiles = config["channel_profiles"] def test_import_process(self): assert len(self.rvp.channel_profiles) == 46 def test_format(self): - res = self.rvp.channel_profile_cmd_list + res = self.rvp.to_rv() assert res.count(":ChannelProfile") == 46 assert res.count(":EndChannelProfile") == 46 class TestRVT: - importers = pytest.importorskip("ravenpy.models.importers") - @classmethod def setup_class(self): input_file = get_local_testdata("raven-routing-sample/VIC_streaminputs.nc") routing_file = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = self.importers.RoutingProductGridWeightImporter( - input_file, routing_file - ) + importer = RoutingProductGridWeightImporter(input_file, routing_file) gws = importer.extract() self.gfc = GriddedForcingCommand(grid_weights=gws) @@ -243,13 +157,6 @@ def test_import_process(self): assert len(res.split("\n")) == 226 -def test_isinstance_namedtuple(): - X = namedtuple("params", "x1, x2, x3") - x = X(1, 2, 3) - assert isinstance_namedtuple(x) - assert not isinstance_namedtuple([1, 2, 3]) - - class TestBaseValueCommand: def test_raincorrection(self): rc = RainCorrectionCommand(3) From b99a33f010c50f18f0780fa8b197eec94616eccb Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 10 Apr 2021 08:54:11 -0400 Subject: [PATCH 22/59] Add rvs.RV.set_tmpl --- ravenpy/config/rvs.py | 10 +++-- ravenpy/models/emulators/blended.py | 60 ++++++++++++++++++++------ ravenpy/models/emulators/gr4jcn.py | 41 +++++++++++++++--- ravenpy/models/emulators/hbvec.py | 67 ++++++++++++++++++++++++----- ravenpy/models/emulators/hmets.py | 43 ++++++++++++++---- ravenpy/models/emulators/mohyse.py | 52 ++++++++++++++++++---- 6 files changed, 223 insertions(+), 50 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index bf5ebd2d..ebba16ff 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -42,9 +42,7 @@ class RV(ABC): def __init__(self, config, **kwds): # Each RV has a reference to their parent object in order to access sibling RVs. self._config = config - # TODO: find something better than this! self.is_ostrich_tmpl = False - # There's probably a much better way than this also! self.content = None def update(self, key, value): @@ -73,6 +71,10 @@ def get_extra_attributes(self, d): e[k] = v return e + def set_tmpl(self, tmpl, is_ostrich=False): + self.tmpl = tmpl + self.is_ostrich_tmpl = is_ostrich + @property @abstractmethod def tmpl(self): @@ -791,7 +793,7 @@ def to_rv(self): ######### -class Ost(RV): +class OST(RV): tmpl = """ """ @@ -863,7 +865,7 @@ def __init__(self, **kwargs): self.rvi = RVI(self) self.rvp = RVP(self) self.rvt = RVT(self) - self.ost = Ost(self) + self.ost = OST(self) self.identifier = None self.update(**kwargs) diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 2bf654fb..d3610a0c 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -100,7 +100,11 @@ def __init__(self, *args, **kwds): rain_snow_fraction="RAINSNOW_HBV", ) - self.config.rvp.tmpl = """ + ######### + # R V P # + ######### + + rvp_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "5.421821E-02" and "1.596675E-01" and "2.169724E-01" wouldn't be detectable) @@ -213,8 +217,13 @@ def __init__(self, *args, **kwds): FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 :EndSeasonalRelativeHeight """ + self.config.rvp.set_tmpl(rvp_tmpl) + + ######### + # R V I # + ######### - self.config.rvi.tmpl = """ + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -294,10 +303,15 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_start {start_date} :NetCDFAttribute time_coverage_end {end_date} """ + self.config.rvi.set_tmpl(rvi_tmpl) self.config.rvi.params = self.config.rvp.params - self.config.rvc.tmpl = """ + ######### + # R V C # + ######### + + rvc_tmpl = """ # initialize to 1/2 full # x(29)*1000/2 :UniformInitialConditions SOIL[0] {TOPSOIL_hlf} @@ -311,6 +325,7 @@ def __init__(self, *args, **kwds): # x(29)*1000/2 x(30)*1000/2 :EndHRUStateVariableTable """ + self.config.rvc.set_tmpl(rvc_tmpl) self.config.rvc.soil0 = None self.config.rvc.soil1 = None @@ -373,7 +388,11 @@ def __init__(self, *args, **kwds): suppress_output=True, ) - self.config.rvc.tmpl = """ + #################### + # R V C (OST TMPL) # + #################### + + rvc_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "par_x29" and "par_x30" wouldn't be detectable) @@ -390,9 +409,13 @@ def __init__(self, *args, **kwds): 1 half_x29 half_x30 :EndHRUStateVariableTable """ - self.config.rvc.is_ostrich_tmpl = True + self.config.rvc.set_tmpl(rvc_tmpl, is_ostrich=True) - self.config.rvi.tmpl = """ + #################### + # R V I (OST TMPL) # + #################### + + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -453,9 +476,13 @@ def __init__(self, *args, **kwds): :SilentMode :DontWriteWatershedStorage """ - self.config.rvi.is_ostrich_tmpl = True + self.config.rvi.set_tmpl(rvi_tmpl, is_ostrich=True) + + #################### + # R V P (OST TMPL) # + #################### - self.config.rvp.tmpl = """ + rvp_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "par_x25" and "par_x14" and "par_x10" wouldn't be detectable) @@ -572,18 +599,26 @@ def __init__(self, *args, **kwds): FOREST, 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 :EndSeasonalRelativeHeight """ - self.config.rvp.is_ostrich_tmpl = True + self.config.rvp.set_tmpl(rvp_tmpl, is_ostrich=True) - self.config.rvt.tmpl = """ + #################### + # R V T (OST TMPL) # + #################### + + rvt_tmpl = """ {gauge} {forcing_list} {observed_data} """ - self.config.rvt.is_ostrich_tmpl = True + self.config.rvt.set_tmpl(rvt_tmpl, is_ostrich=True) + + ########## + # O S T # + ########## - self.config.ost.tmpl = """ + ost_tmpl = """ ProgramType {algorithm} ObjectiveFunction GCOP ModelExecutable ./ostrich-runs-raven.sh @@ -767,6 +802,7 @@ def __init__(self, *args, **kwds): # above intializes DDS to parameter values IN the initial model input files EndDDSAlg """ + self.config.ost.set_tmpl(ost_tmpl) def derived_parameters(self): """Derived parameters are computed by Ostrich.""" diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index b53e6f3d..a0785c2d 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -72,7 +72,11 @@ def __init__(self, *args, **kwds): derived_params=GR4JCN.DerivedParams(), ) - self.config.rvp.tmpl = """ + ######### + # R V P # + ######### + + rvp_tmpl = """ # -Global snow parameters------------------------------------- :RainSnowTransition 0 1.0 :AirSnowCoeff {derived_params.one_minus_CEMANEIGE_X2} # [1/d] = 1.0 - CEMANEIGE_X2 = 1.0 - x6 @@ -132,8 +136,13 @@ def __init__(self, *args, **kwds): # List of channel profiles {channel_profiles} """ + self.config.rvp.set_tmpl(rvp_tmpl) + + ######### + # R V I # + ######### - self.config.rvi.tmpl = """ + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -202,10 +211,15 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_start {start_date} :NetCDFAttribute time_coverage_end {end_date} """ + self.config.rvi.set_tmpl(rvi_tmpl) self.config.rvi.rain_snow_fraction = "RAINSNOW_DINGMAN" self.config.rvi.evaporation = "PET_OUDIN" + ######### + # R V C # + ######### + # Initialize the stores to 1/2 full. Declare the parameters that can be user-modified self.config.rvc.soil0 = None self.config.rvc.soil1 = 15 @@ -284,7 +298,11 @@ def __init__(self, *args, **kwds): suppress_output=True, ) - self.config.rvc.tmpl = """ + #################### + # R V C (OST TMPL) # + #################### + + rvc_tmpl = """ # Tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "para_x1" wouldn't be detectable) @@ -303,9 +321,13 @@ def __init__(self, *args, **kwds): 1 par_half_x1 15.0 :EndHRUStateVariableTable """ - self.config.rvc.is_ostrich_tmpl = True + self.config.rvc.set_tmpl(rvc_tmpl, is_ostrich=True) + + #################### + # R V P (OST TMPL) # + #################### - self.config.rvp.tmpl = """ + rvp_tmpl = """ ######################################################################### :FileType rvp ASCII Raven 2.8.2 :WrittenBy Juliane Mai & James Craig @@ -369,9 +391,13 @@ def __init__(self, *args, **kwds): [DEFAULT], par_x4, 7.73 :EndLandUseParameterList """ - self.config.rvp.is_ostrich_tmpl = True + self.config.rvp.set_tmpl(rvp_tmpl, is_ostrich=True) + + ########## + # O S T # + ########## - self.config.ost.tmpl = """ + ost_tmpl = """ ProgramType {algorithm} ObjectiveFunction GCOP ModelExecutable ./ostrich-runs-raven.sh @@ -450,6 +476,7 @@ def __init__(self, *args, **kwds): # above intializes DDS to parameter values IN the initial model input files EndDDSAlg """ + self.config.ost.set_tmpl(ost_tmpl) def derived_parameters(self): """Derived parameters are computed by Ostrich.""" diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index 0759c98b..f535d352 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -59,7 +59,11 @@ def __init__(self, *args, **kwds): derived_params=HBVEC.DerivedParams(), ) - self.config.rvp.tmpl = """ + ######### + # R V P # + ######### + + rvp_tmpl = """ #------------------------------------------------------------------------ # Global parameters # @@ -140,8 +144,13 @@ def __init__(self, *args, **kwds): [DEFAULT], 1.64, 0.05, {params.par_x19}, 0.05 :EndLandUseParameterList """ + self.config.rvp.set_tmpl(rvp_tmpl) + + ######### + # R V I # + ######### - self.config.rvi.tmpl = """ + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -229,8 +238,13 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_start {start_date} :NetCDFAttribute time_coverage_end {end_date} """ + self.config.rvi.set_tmpl(rvi_tmpl) + + ######### + # R V H # + ######### - self.config.rvh.tmpl = """ + rvh_tmpl = """ {subbasins} {hrus} @@ -243,11 +257,20 @@ def __init__(self, *args, **kwds): 1, {par_x11}, {par_x11_half}, :EndSubBasinProperties """ + self.config.rvh.set_tmpl(rvh_tmpl) + + ######### + # R V I # + ######### self.config.rvi.evaporation = "PET_FROMMONTHLY" self.config.rvi.ow_evaporation = "PET_FROMMONTHLY" self.config.rvi.rain_snow_fraction = "RAINSNOW_HBV" + ######### + # R V C # + ######### + self.config.rvc.soil2 = 0.50657 def derived_parameters(self): @@ -325,7 +348,11 @@ def __init__(self, *args, **kwds): suppress_output=True, ) - self.config.rvc.tmpl = """ + ######### + # R V C # + ######### + + rvc_tmpl = """ :BasinInitialConditions :Attributes, ID, Q :Units, none, m3/s @@ -341,8 +368,13 @@ def __init__(self, *args, **kwds): 0.50657 :EndInitialConditions """ + self.config.rvc.set_tmpl(rvc_tmpl) + + #################### + # R V H (OST TMPL) # + #################### - self.config.rvh.tmpl = """ + rvh_tmpl = """ :SubBasins :Attributes NAME DOWNSTREAM_ID PROFILE REACH_LENGTH GAUGED :Units none none none km none @@ -363,9 +395,13 @@ def __init__(self, *args, **kwds): 1, par_x11, par_half_x11, :EndSubBasinProperties """ - self.config.rvh.is_ostrich_tmpl = True + self.config.rvh.set_tmpl(rvh_tmpl, is_ostrich=True) + + #################### + # R V P (OST TMPL) # + #################### - self.config.rvp.tmpl = """ + rvp_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "para_x05" and "para_x15" wouldn't be detectable) @@ -452,18 +488,26 @@ def __init__(self, *args, **kwds): [DEFAULT], 1.64, 0.05, par_x19, 0.05 :EndLandUseParameterList """ - self.config.rvp.is_ostrich_tmpl = True + self.config.rvp.set_tmpl(rvp_tmpl, is_ostrich=True) - self.config.rvt.tmpl = """ + #################### + # R V T (OST TMPL) # + #################### + + rvt_tmpl = """ {gauge} {forcing_list} {observed_data} """ - self.config.rvt.is_ostrich_tmpl = True + self.config.rvt.set_tmpl(rvt_tmpl, is_ostrich=True) + + ######### + # O S T # + ######### - self.config.ost.tmpl = """ + ost_tmpl = """ ProgramType {algorithm} ObjectiveFunction GCOP ModelExecutable ./ostrich-runs-raven.sh @@ -558,6 +602,7 @@ def __init__(self, *args, **kwds): # above intializes DDS to parameter values IN the initial model input files EndDDSAlg """ + self.config.ost.set_tmpl(ost_tmpl) # TODO: Support index specification and unit changes. def derived_parameters(self): diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 8faa8a35..44426ecf 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -68,7 +68,11 @@ def __init__(self, *args, **kwds): derived_params=HMETS.DerivedParams(), ) - self.config.rvp.tmpl = """ + ######### + # R V P # + ######### + + rvp_tmpl = """ #----------------------------------------------------------------- # Soil Classes #----------------------------------------------------------------- @@ -151,8 +155,13 @@ def __init__(self, *args, **kwds): [DEFAULT], 0.0, 0.0, :EndVegetationParameterList """ + self.config.rvp.set_tmpl(rvp_tmpl) + + ######### + # R V I # + ######### - self.config.rvi.tmpl = """ + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -208,10 +217,15 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_start {start_date} :NetCDFAttribute time_coverage_end {end_date} """ + self.config.rvi.set_tmpl(rvi_tmpl) self.config.rvi.evaporation = "PET_OUDIN" self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + ######### + # R V C # + ######### + self.config.rvc.soil0 = None self.config.rvc.soil1 = None @@ -266,7 +280,11 @@ def __init__(self, *args, **kwds): suppress_output=True, ) - self.config.rvc.tmpl = """ + #################### + # R V C (OST TMPL) # + #################### + + rvc_tmpl = """ # Tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "par_x20" and "par_x21" wouldn't be detectable) @@ -284,9 +302,13 @@ def __init__(self, *args, **kwds): 1 par_half_x20 par_half_x21 :EndHRUStateVariableTable """ - self.config.rvc.is_ostrich_tmpl = True + self.config.rvc.set_tmpl(rvc_tmpl, is_ostrich=True) + + #################### + # R V P (OST TMPL) # + #################### - self.config.rvp.tmpl = """ + rvp_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "par_x06" and "par_x10" wouldn't be detectable) @@ -375,9 +397,13 @@ def __init__(self, *args, **kwds): [DEFAULT], 0.0, 0.0, :EndVegetationParameterList """ - self.config.rvp.is_ostrich_tmpl = True + self.config.rvp.set_tmpl(rvp_tmpl, is_ostrich=True) + + ######### + # O S T # + ######### - self.config.ost.tmpl = """ + ost_tmpl = """ ProgramType {algorithm} ObjectiveFunction GCOP ModelExecutable ./ostrich-runs-raven.sh @@ -489,12 +515,13 @@ def __init__(self, *args, **kwds): # above intializes DDS to parameter values IN the initial model input files EndDDSAlg """ + self.config.ost.set_tmpl(ost_tmpl) def derived_parameters(self): """Derived parameters are computed by Ostrich.""" pass - def ost2raven(self, ops): + def ost2raven(self, ops: dict) -> HMETS.Params: """Return a list of parameter names calibrated by Ostrich that match Raven's parameters. Parameters diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 7116250a..44997aa3 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -46,7 +46,11 @@ def __init__(self, *args, **kwds): derived_params=MOHYSE.DerivedParams(), ) - self.config.rvp.tmpl = """ + ######### + # R V P # + ######### + + rvp_tmpl = """ #----------------------------------------------------------------- # Soil Classes #----------------------------------------------------------------- @@ -124,8 +128,13 @@ def __init__(self, *args, **kwds): [DEFAULT], 0.0, 0.0, 0.0, :EndVegetationParameterList """ + self.config.rvp.set_tmpl(rvp_tmpl) + + ######### + # R V I # + ######### - self.config.rvi.tmpl = """ + rvi_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -186,8 +195,13 @@ def __init__(self, *args, **kwds): :NetCDFAttribute time_coverage_start {start_date} :NetCDFAttribute time_coverage_end {end_date} """ + self.config.rvi.set_tmpl(rvi_tmpl) - self.config.rvh.tmpl = """ + ######### + # R V H # + ######### + + rvh_tmpl = """ {subbasins} {hrus} @@ -199,10 +213,19 @@ def __init__(self, *args, **kwds): 1, {par_rezi_x10}, {par_x09} :EndSubBasinProperties """ + self.config.rvh.set_tmpl(rvh_tmpl) + + ######### + # R V I # + ######### self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" self.config.rvi.evaporation = "PET_MOHYSE" + ######### + # R V C # + ######### + # This is not stricly necessary it seems self.config.rvc.hru_states[1] = HRUState() self.config.rvc.basin_states[1] = BasinIndexCommand() @@ -233,7 +256,11 @@ def __init__(self, *args, **kwds): suppress_output=True, ) - self.config.rvp.tmpl = """ + #################### + # R V P (OST TMPL) # + #################### + + rvp_tmpl = """ #----------------------------------------------------------------- # Soil Classes #----------------------------------------------------------------- @@ -311,9 +338,13 @@ def __init__(self, *args, **kwds): [DEFAULT], 0.0, 0.0, 0.0, :EndVegetationParameterList """ - self.config.rvp.is_ostrich_tmpl = True + self.config.rvp.set_tmpl(rvp_tmpl, is_ostrich=True) - self.config.rvh.tmpl = """ + #################### + # R V H (OST TMPL) # + #################### + + rvh_tmpl = """ # tied parameters: # (it is important for OSTRICH to find every parameter place holder somewhere in this file) # (without this "par_x11" wouldn't be detectable) @@ -339,9 +370,13 @@ def __init__(self, *args, **kwds): 1, par_rezi_x10, par_x09 :EndSubBasinProperties """ - self.config.rvh.is_ostrich_tmpl = True + self.config.rvh.set_tmpl(rvh_tmpl, is_ostrich=True) + + ######### + # O S T # + ######### - self.config.ost.tmpl = """ + ost_tmpl = """ ProgramType {algorithm} ObjectiveFunction GCOP ModelExecutable ./ostrich-runs-raven.sh @@ -418,6 +453,7 @@ def __init__(self, *args, **kwds): # above intializes DDS to parameter values IN the initial model input files EndDDSAlg """ + self.config.ost.set_tmpl(ost_tmpl) def derived_parameters(self): """ Derived parameters are computed by Ostrich. """ From 2ad2cc812e588230672c60984b6881e71778636c Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 10 Apr 2021 10:02:13 -0400 Subject: [PATCH 23/59] Use pydantic dataclasses --- environment.yml | 1 + ravenpy/config/commands.py | 198 ++++++++++++++++++++----------------- setup.py | 1 + tests/test_rv.py | 51 ++++++++-- 4 files changed, 152 insertions(+), 99 deletions(-) diff --git a/environment.yml b/environment.yml index 25e05558..54e47ea0 100644 --- a/environment.yml +++ b/environment.yml @@ -22,6 +22,7 @@ dependencies: - pandas - pip - proj + - pydantic - pyparsing - pyproj>=3.0.0 - rasterio diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index 1fd98054..4ea42524 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -1,52 +1,30 @@ import itertools import re -from dataclasses import asdict, dataclass, field +from abc import ABC, abstractmethod +from pathlib import Path from textwrap import dedent from typing import Any, Dict, Optional, Tuple, Union +from dataclasses import asdict, field +from pydantic.dataclasses import dataclass + INDENT = " " * 4 VALUE_PADDING = 10 -class RavenConfig: +class RavenCommand(ABC): def __str__(self): return self.to_rv() - -@dataclass -class BaseValueCommand(RavenConfig): - """BaseValueCommand.""" - - value: Any = None - tag: str = "" - - template = ":{tag} {value}" - - # Overloading init to freeze the tag. - def __init__(self, value): - self.value = value - + @abstractmethod def to_rv(self): - if self.value is None: - return "" - return self.template.format(**asdict(self)) + pass @dataclass -class BaseBooleanCommand(RavenConfig): - tag: str = "" - value: bool = False - - template = ":{tag}" - - def to_rv(self): - return self.template.format(tag=self.tag) if self.value else "" - - -@dataclass -class LinearTransform(RavenConfig): - scale: float = 1 - offset: float = 0 +class LinearTransform(RavenCommand): + scale: Optional[float] = 1 + offset: Optional[float] = 0 template = ":LinearTransform {scale:.15f} {offset:.15f}" @@ -57,9 +35,9 @@ def to_rv(self): @dataclass -class MonthlyAverageCommand(RavenConfig): +class MonthlyAverageCommand(RavenCommand): var_name: str = "" - data: Tuple[float] = () + data: Optional[Tuple[float, ...]] = () template = ":MonthlyAve{var_name} {data}" @@ -74,11 +52,11 @@ def to_rv(self): @dataclass -class SubBasinsCommand(RavenConfig): +class SubBasinsCommand(RavenCommand): """SubBasins command (RVH).""" @dataclass - class Record(RavenConfig): + class Record(RavenCommand): """Record to populate RVH :SubBasins command internal table.""" subbasin_id: int = 0 @@ -94,7 +72,7 @@ def to_rv(self): d["gauged"] = int(d["gauged"]) return " ".join(f"{v: <{VALUE_PADDING}}" for v in d.values()) - subbasins: Tuple[Record] = () + subbasins: Tuple[Record, ...] = () template = """ :SubBasins @@ -114,11 +92,11 @@ def to_rv(self): @dataclass -class HRUsCommand(RavenConfig): +class HRUsCommand(RavenCommand): """HRUs command (RVH).""" @dataclass - class Record(RavenConfig): + class Record(RavenCommand): """Record to populate :HRUs command internal table (RVH).""" hru_id: int = 1 @@ -141,7 +119,7 @@ def to_rv(self): d = asdict(self) return " ".join(f"{v: <{VALUE_PADDING * 2}}" for v in d.values()) - hrus: Tuple[Record] = () + hrus: Tuple[Record, ...] = () template = """ :HRUs @@ -161,7 +139,7 @@ def to_rv(self): @dataclass -class ReservoirCommand(RavenConfig): +class ReservoirCommand(RavenCommand): """Reservoir command (RVH).""" subbasin_id: int = 0 @@ -190,11 +168,11 @@ def to_rv(self): @dataclass -class SubBasinGroupCommand(RavenConfig): +class SubBasinGroupCommand(RavenCommand): """SubBasinGroup command (RVH).""" name: str = "" - subbasin_ids: Tuple[int] = () + subbasin_ids: Tuple[int, ...] = () template = """ :SubBasinGroup {name} @@ -215,7 +193,7 @@ def to_rv(self): @dataclass -class SBGroupPropertyMultiplierCommand(RavenConfig): +class SBGroupPropertyMultiplierCommand(RavenCommand): group_name: str = "" parameter_name: str = "" @@ -228,13 +206,13 @@ def to_rv(self): @dataclass -class ChannelProfileCommand(RavenConfig): +class ChannelProfileCommand(RavenCommand): """ChannelProfile command (RVP).""" name: str = "chn_XXX" bed_slope: float = 0 - survey_points: Tuple[Tuple[float, float]] = () - roughness_zones: Tuple[Tuple[float, float]] = () + survey_points: Tuple[Tuple[float, float], ...] = () + roughness_zones: Tuple[Tuple[float, float], ...] = () template = """ :ChannelProfile {name} @@ -260,15 +238,15 @@ def to_rv(self): @dataclass -class BaseDataCommand(RavenConfig): +class BaseDataCommand(RavenCommand): """Do not use directly. Subclass.""" name: Optional[str] = "" units: Optional[str] = "" data_type: str = "" - file_name_nc: str = "" + file_name_nc: Path = "" var_name_nc: str = "" - dim_names_nc: Tuple[str] = ("time",) + dim_names_nc: Tuple[str, ...] = ("time",) time_shift: Optional[int] = None # in days scale: Optional[float] = None offset: Optional[float] = None @@ -327,18 +305,19 @@ def to_rv(self): @dataclass -class GaugeCommand(RavenConfig): - data: Tuple[DataCommand] = () +class GaugeCommand(RavenCommand): latitude: float = 0 longitude: float = 0 elevation: float = 0 # Accept strings to embed parameter names into Ostrich templates - rain_correction: Union[float, str] = 1 - snow_correction: Union[float, str] = 1 + rain_correction: Optional[Union[float, str]] = 1 + snow_correction: Optional[Union[float, str]] = 1 + + monthly_ave_evaporation: Optional[Tuple[float, ...]] = () + monthly_ave_temperature: Optional[Tuple[float, ...]] = () - monthly_ave_evaporation: Tuple[float] = () - monthly_ave_temperature: Tuple[float] = () + data: Optional[Tuple[DataCommand, ...]] = () template = """ :Gauge @@ -399,7 +378,7 @@ class ObservationDataCommand(DataCommand): @dataclass -class GridWeightsCommand(RavenConfig): +class GridWeightsCommand(RavenCommand): """GridWeights command. Important note: this command can be embedded in both a `GriddedForcingCommand` @@ -411,7 +390,7 @@ class GridWeightsCommand(RavenConfig): number_hrus: int = 1 number_grid_cells: int = 1 - data: Tuple[Tuple[int, int, float]] = ((1, 0, 1.0),) + data: Tuple[Tuple[int, int, float], ...] = ((1, 0, 1.0),) template = """ {indent}:GridWeights @@ -499,11 +478,11 @@ def to_rv(self): @dataclass -class HRUStateVariableTableCommand(RavenConfig): +class HRUStateVariableTableCommand(RavenCommand): """Initial condition for a given HRU.""" @dataclass - class Record(RavenConfig): + class Record(RavenCommand): index: int = 1 surface_water: float = 0 atmosphere: float = 0 @@ -643,16 +622,16 @@ def to_rv(self): @dataclass -class BasinIndexCommand(RavenConfig): +class BasinIndexCommand(RavenCommand): """Initial conditions for a flow segment.""" index: int = 1 name: str = "watershed" channelstorage: float = 0 rivuletstorage: float = 0 - qout: Tuple[float] = (1, 0, 0) - qin: Optional[Tuple[float]] = None - qlat: Optional[Tuple[float]] = None + qout: Tuple[float, ...] = (1, 0, 0) + qin: Optional[Tuple[float, ...]] = None + qlat: Optional[Tuple[float, ...]] = None template = """ :BasinIndex {index} {name} @@ -676,7 +655,7 @@ def to_rv(self): @dataclass -class BasinStateVariablesCommand(RavenConfig): +class BasinStateVariablesCommand(RavenCommand): basin_states: Dict[int, BasinIndexCommand] = field(default_factory=dict) @@ -693,15 +672,15 @@ def to_rv(self): @dataclass -class SoilClassesCommand(RavenConfig): +class SoilClassesCommand(RavenCommand): @dataclass - class Record(RavenConfig): + class Record(RavenCommand): name: str = "" def to_rv(self): return " ".join(map(str, asdict(self).values())) - soil_classes: Tuple[Record] = () + soil_classes: Tuple[Record, ...] = () template = """ :SoilClasses @@ -716,12 +695,12 @@ def to_rv(self): @dataclass -class SoilProfilesCommand(RavenConfig): +class SoilProfilesCommand(RavenCommand): @dataclass - class Record(RavenConfig): + class Record(RavenCommand): profile_name: str = "" - soil_class_names: Tuple[str] = () - thicknesses: Tuple[float] = () + soil_class_names: Tuple[str, ...] = () + thicknesses: Tuple[float, ...] = () def to_rv(self): # From the Raven manual: {profile_name,#horizons,{soil_class_name,thick.}x{#horizons}}x[NP] @@ -732,7 +711,7 @@ def to_rv(self): horizon_data = ", ".join(map(str, horizon_data)) return f"{self.profile_name}, {n_horizons}, {horizon_data}" - soil_profiles: Tuple[Record] = () + soil_profiles: Tuple[Record, ...] = () template = """ :SoilProfiles @@ -747,9 +726,9 @@ def to_rv(self): @dataclass -class VegetationClassesCommand(RavenConfig): +class VegetationClassesCommand(RavenCommand): @dataclass - class Record(RavenConfig): + class Record(RavenCommand): name: str = "" max_ht: float = 0 max_lai: float = 0 @@ -758,7 +737,7 @@ class Record(RavenConfig): def to_rv(self): return " ".join(map(str, asdict(self).values())) - vegetation_classes: Tuple[Record] = () + vegetation_classes: Tuple[Record, ...] = () template = """ :VegetationClasses @@ -775,9 +754,9 @@ def to_rv(self): @dataclass -class LandUseClassesCommand(RavenConfig): +class LandUseClassesCommand(RavenCommand): @dataclass - class Record(RavenConfig): + class Record(RavenCommand): name: str = "" impermeable_frac: float = 0 forest_coverage: float = 0 @@ -785,7 +764,7 @@ class Record(RavenConfig): def to_rv(self): return " ".join(map(str, asdict(self).values())) - land_use_classes: Tuple[Record] = () + land_use_classes: Tuple[Record, ...] = () template = """ :LandUseClasses @@ -806,31 +785,64 @@ def to_rv(self): @dataclass -class RainCorrectionCommand(BaseValueCommand): - tag: str = "RainCorrection" - value: Union[float, str] = 1.0 +class RainCorrectionCommand(RavenCommand): + + value: Optional[Union[float, str]] = 1.0 + + template = ":RainCorrection {value}" + + def to_rv(self): + if self.value is None: + return "" + return self.template.format(**asdict(self)) @dataclass -class SnowCorrectionCommand(BaseValueCommand): - tag: str = "SnowCorrection" - value: Union[float, str] = 1.0 +class SnowCorrectionCommand(RavenCommand): + + value: Optional[Union[float, str]] = 1.0 + + template = ":SnowCorrection {value}" + + def to_rv(self): + if self.value is None: + return "" + return self.template.format(**asdict(self)) @dataclass -class RoutingCommand(BaseValueCommand): +class RoutingCommand(RavenCommand): """ROUTE_NONE, ROUTE_DIFFUSIVE_WAVE""" - tag: str = "Routing" value: str = "ROUTE_NONE" + template = ":Routing {value}" + + def to_rv(self): + if self.value is None: + return "" + return self.template.format(**asdict(self)) + @dataclass -class DeaccumulateCommand(BaseBooleanCommand): - tag: str = "Deaccumulate" +class DeaccumulateCommand(RavenCommand): + + value: bool = False + + template = ":Deaccumulate" + + def to_rv(self): + return self.template if self.value else "" @dataclass -class AvgAnnualRunoffCommand(BaseValueCommand): - tag: str = "AvgAnnualRunoff" - value: float = None +class AvgAnnualRunoffCommand(RavenCommand): + + value: Optional[float] = 1.0 + + template = ":AvgAnnualRunoff {value}" + + def to_rv(self): + if self.value is None: + return "" + return self.template.format(**asdict(self)) diff --git a/setup.py b/setup.py index 284a5da1..0d8c5127 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "netCDF4", "numpy", "pandas", + "pydantic", "requests", "scipy", "statsmodels", diff --git a/tests/test_rv.py b/tests/test_rv.py index 98a4ae05..ffb724e1 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -7,16 +7,17 @@ import ravenpy from ravenpy.config.commands import ( - BaseValueCommand, + DeaccumulateCommand, GriddedForcingCommand, MonthlyAverageCommand, RainCorrectionCommand, + SnowCorrectionCommand, ) from ravenpy.config.importers import ( RoutingProductGridWeightImporter, RoutingProductShapefileImporter, ) -from ravenpy.config.rvs import RVC, RVH, RVI, RVP, RVT, Ost +from ravenpy.config.rvs import OST, RVC, RVH, RVI, RVP, RVT from ravenpy.utilities.testdata import get_local_testdata @@ -42,7 +43,7 @@ def test_evaluation_metrics(self): class TestOst: def test_random(self): - o = Ost(None) + o = OST(None) assert o.random_seed == "" o.random_seed = 0 @@ -157,7 +158,45 @@ def test_import_process(self): assert len(res.split("\n")) == 226 -class TestBaseValueCommand: - def test_raincorrection(self): +class TestCommands: + def test_rain_correction(self): rc = RainCorrectionCommand(3) - assert f"{rc}" == ":RainCorrection 3" + assert f"{rc}" == ":RainCorrection 3.0" + + rc = RainCorrectionCommand("3") + assert f"{rc}" == ":RainCorrection 3.0" + + rc = RainCorrectionCommand(3.1) + assert f"{rc}" == ":RainCorrection 3.1" + + rc = RainCorrectionCommand() + assert f"{rc}" == ":RainCorrection 1.0" + + rc = RainCorrectionCommand(None) + assert f"{rc}" == "" + + def test_snow_correction(self): + sc = SnowCorrectionCommand(3) + assert f"{sc}" == ":SnowCorrection 3.0" + + sc = SnowCorrectionCommand("3") + assert f"{sc}" == ":SnowCorrection 3.0" + + sc = SnowCorrectionCommand(3.1) + assert f"{sc}" == ":SnowCorrection 3.1" + + sc = SnowCorrectionCommand() + assert f"{sc}" == ":SnowCorrection 1.0" + + sc = SnowCorrectionCommand(None) + assert f"{sc}" == "" + + def test_deaccumulate(self): + dc = DeaccumulateCommand() + assert f"{dc}" == "" + + dc = DeaccumulateCommand(False) + assert f"{dc}" == "" + + dc = DeaccumulateCommand(True) + assert f"{dc}" == ":Deaccumulate" From fda8729a6ccc3387d795804041cf9317e34db9d3 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sat, 10 Apr 2021 10:06:32 -0400 Subject: [PATCH 24/59] Use pydantic.dataclasses for emulators --- ravenpy/models/emulators/blended.py | 2 +- ravenpy/models/emulators/gr4jcn.py | 2 +- ravenpy/models/emulators/hbvec.py | 2 +- ravenpy/models/emulators/hmets.py | 2 +- ravenpy/models/emulators/mohyse.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index d3610a0c..3814a3b5 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -1,7 +1,7 @@ from collections import defaultdict from pathlib import Path -from dataclasses import dataclass +from pydantic.dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index a0785c2d..5713c2fc 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -1,7 +1,7 @@ from collections import defaultdict from pathlib import Path -from dataclasses import dataclass +from pydantic.dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index f535d352..1d3c9397 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -2,7 +2,7 @@ from pathlib import Path import xarray as xr -from dataclasses import dataclass +from pydantic.dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 44426ecf..e4f8238a 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -1,6 +1,6 @@ from pathlib import Path -from dataclasses import dataclass +from pydantic.dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 44997aa3..44c2e218 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -1,7 +1,7 @@ from collections import defaultdict from pathlib import Path -from dataclasses import dataclass +from pydantic.dataclasses import dataclass from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub from ravenpy.models.base import Ostrich, Raven From ec055c30d46a23cd2a89e0d5e8f2b7c3b5f23327 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Sun, 11 Apr 2021 20:59:23 -0400 Subject: [PATCH 25/59] Fix some typing annotations in config.rvs --- ravenpy/config/rvs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index ebba16ff..5a5180ba 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from pathlib import Path from textwrap import dedent -from typing import Tuple +from typing import Optional, Tuple import cf_xarray import cftime @@ -560,12 +560,12 @@ def __init__(self, config): self.params = None self.derived_params = None - self.soil_classes: Tuple[SoilClassesCommand.Record] = () - self.soil_profiles: Tuple[SoilProfilesCommand.Record] = () - self.vegetation_classes: Tuple[VegetationClassesCommand.Record] = () - self.land_use_classes: Tuple[LandUseClassesCommand.Record] = () - self.channel_profiles: Tuple[ChannelProfileCommand] = () - self.avg_annual_runoff: float = None + self.soil_classes: Tuple[SoilClassesCommand.Record, ...] = () + self.soil_profiles: Tuple[SoilProfilesCommand.Record, ...] = () + self.vegetation_classes: Tuple[VegetationClassesCommand.Record, ...] = () + self.land_use_classes: Tuple[LandUseClassesCommand.Record, ...] = () + self.channel_profiles: Tuple[ChannelProfileCommand, ...] = () + self.avg_annual_runoff: Optional[float] = None def to_rv(self): d = { From b1c823ad6d072235693b11a7b0bea1714ccdbf03 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 14 Apr 2021 09:50:49 -0400 Subject: [PATCH 26/59] WIP - Add _fields to the docs --- docs/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 9506e35a..12adcb86 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,6 +44,14 @@ autosummary_generate = True nbsphinx_execute = "auto" +# To ensure that underlined fields (e.g. `_field`) are shown in the docs. +autodoc_default_options = { + "members": True, + "undoc-members": True, + "private-members": True, + "special-members": True, +} + # To avoid having to install these and burst memory limit on ReadTheDocs. autodoc_mock_imports = [ "affine", From 8d3384d961e31846ddc14e19ad72a99fab7ae932 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 21 Apr 2021 12:47:56 -0400 Subject: [PATCH 27/59] Refactor RVC/solution parsing --- ravenpy/config/commands.py | 65 ++++++++++++++++++++-- ravenpy/config/rvs.py | 106 ++++-------------------------------- ravenpy/models/base.py | 16 ++++-- tests/test_ECCC_forecast.py | 2 +- tests/test_emulators.py | 4 +- tests/test_hindcasting.py | 2 +- tests/test_rv.py | 21 ++++--- 7 files changed, 99 insertions(+), 117 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index 23a8beda..c79b241f 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -614,6 +614,26 @@ def to_rv(self): """ hru_states: Dict[int, Record] = field(default_factory=dict) + @classmethod + def parse(cls, sol): + pat = r""" + :HRUStateVariableTable + \s*:Attributes.*? + \s*:Units.*? + (.+) + :EndHRUStateVariableTable + """ + m = re.search(dedent(pat).strip(), sol, re.DOTALL) + lines = m.group(1).strip().splitlines() + lines = [re.split(r",|\s+", line.strip()) for line in lines] + hru_states = {} + for line in lines: + idx, *values = line + idx = int(idx) + values = list(map(float, values)) + hru_states[idx] = cls.Record(*([idx] + values)) + return cls(hru_states) + def to_rv(self): return dedent(self.template).format( hru_states="\n ".join(map(str, self.hru_states.values())) @@ -630,21 +650,43 @@ class BasinIndexCommand(RavenCommand): index: int = 1 name: str = "watershed" - channelstorage: float = 0 - rivuletstorage: float = 0 + channel_storage: float = 0 + rivulet_storage: float = 0 qout: Tuple[float, ...] = (1, 0, 0) qin: Optional[Tuple[float, ...]] = None qlat: Optional[Tuple[float, ...]] = None template = """ :BasinIndex {index} {name} - :ChannelStorage {channelstorage} - :RivuletStorage {rivuletstorage} + :ChannelStorage {channel_storage} + :RivuletStorage {rivulet_storage} {qout} {qin} {qlat} """ + @classmethod + def parse(cls, s): + pat = r""" + :BasinIndex (.+?) + (.+) + """ + m = re.search(dedent(pat).strip(), s, re.DOTALL) + index_name = re.split(r",|\s+", m.group(1).strip()) + rec_values = {"index": index_name[0], "name": index_name[1]} + for line in m.group(2).strip().splitlines(): + values = filter(None, re.split(r",|\s+", line.strip())) + cmd, *values = values + if cmd == ":ChannelStorage": + assert len(values) == 1 + rec_values["channel_storage"] = float(values[0]) + elif cmd == ":RivuletStorage": + assert len(values) == 1 + rec_values["rivulet_storage"] = float(values[0]) + else: + rec_values[cmd[1:].lower()] = tuple(values) + return cls(**rec_values) + def to_rv(self): d = asdict(self) for k in ["qout", "qin", "qlat"]: @@ -668,6 +710,21 @@ class BasinStateVariablesCommand(RavenCommand): :EndBasinStateVariables """ + @classmethod + def parse(cls, sol): + pat = r""" + :BasinStateVariables + (.+) + :EndBasinStateVariables + """ + m = re.search(dedent(pat).strip(), sol, re.DOTALL) + bi_strings = filter(None, m.group(1).strip().split(":BasinIndex")) + basin_states = {} + for bi_string in bi_strings: + bi = BasinIndexCommand.parse(f":BasinIndex {bi_string}") + basin_states[bi.index] = bi + return cls(basin_states) + def to_rv(self): return dedent(self.template).format( basin_states_list="\n".join(map(str, self.basin_states.values())) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index c02f8855..3b47bf12 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -4,7 +4,7 @@ from dataclasses import is_dataclass, replace from pathlib import Path from textwrap import dedent -from typing import Optional, Tuple +from typing import Dict, Optional, Tuple import cf_xarray import cftime @@ -100,8 +100,8 @@ class RVC(RV): def __init__(self, config): super().__init__(config) - self.hru_states = {} - self.basin_states = {} + self.hru_states: Dict[int, HRUState] = {} + self.basin_states: Dict[int, BasinIndexCommand] = {} def reset(self, **kwargs): self.hru_states = {} @@ -123,99 +123,15 @@ def basin_state(self): def basin_state(self, value): self.basin_states[1] = value - @staticmethod - def parse_solution(solution_str): - def _parser(lines, indent="", fmt=str): - import itertools - import re - - header_pat = re.compile(r"(\s*):(\w+)\s?,?\s*(.*)") - - out = collections.defaultdict(dict) - old_key = None - for line in lines: - header = header_pat.match(line) - if header: - new_indent, key, value = header.groups() - if new_indent > indent: - out[old_key] = _parser( - itertools.chain([line], lines), new_indent - ) - elif new_indent < indent: - return out - else: - if key == "BasinIndex": - i, name = value.split(",") - i = int(i) - out[key][i] = dict( - index=i, - name=name, - **_parser(lines, new_indent + " ", float), - ) - # elif key in ["Qlat", "Qout"]: - # n, *values, last = value.split(",") - # out[key] = list(map(float, values)) - # out[key + "Last"] = float(last) - elif key in ["Qin", "Qout", "Qlat"]: - n, *values = value.split(",") - out[key] = (int(n),) + tuple(map(float, values)) - else: - out[key] = ( - list(map(fmt, value.split(","))) - if "," in value - else fmt(value) - ) - - old_key = key - else: - data = line.split(",") - i = int(data.pop(0)) - out["data"][i] = [i] + list(map(float, data)) - - return out - - lines = iter(solution_str.splitlines()) - return _parser(lines) - - @staticmethod - def get_states(solution, hru_index=None, basin_index=None): - """Return state variables. - Parameters - ---------- - solution : dict - `solution.rvc` parsed content. - """ - hru_state = {} - basin_state = {} - - for index, params in solution["HRUStateVariableTable"]["data"].items(): - hru_state[index] = HRUState(*params) - - for index, raw in solution["BasinStateVariables"]["BasinIndex"].items(): - params = {k.lower(): v for (k, v) in raw.items()} - basin_state[index] = BasinIndexCommand(**params) - - if hru_index is not None: - hru_state = hru_state[hru_index] - - if basin_index is not None: - basin_state = basin_state[basin_index] - - return hru_state, basin_state - - def set_from_solution(self, solution_str): - - solution_objs = RVC.parse_solution(solution_str) - - self.hru_states = {} - self.basin_states = {} - - for index, params in solution_objs["HRUStateVariableTable"]["data"].items(): - self.hru_states[index] = HRUStateVariableTableCommand.Record(*params) + @classmethod + def create_solution(cls, solution_str): + rvc = RVC(None) + rvc.parse_solution(solution_str) + return rvc - for index, raw in solution_objs["BasinStateVariables"]["BasinIndex"].items(): - params = {k.lower(): v for (k, v) in raw.items()} - self.basin_states[index] = BasinIndexCommand(**params) + def parse_solution(self, solution_str): + self.hru_states = HRUStateVariableTableCommand.parse(solution_str).hru_states + self.basin_states = BasinStateVariablesCommand.parse(solution_str).basin_states def to_rv(self): d = { diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index f80d8ec7..e7f647f2 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -434,7 +434,7 @@ def resume(self, solution=None): else: fn = solution - self.config.rvc.set_from_solution(Path(fn).read_text()) + self.config.rvc.parse_solution(Path(fn).read_text()) def parse_results(self, path=None, run_name=None): """Store output files in the self.outputs dictionary.""" @@ -626,10 +626,10 @@ def storage(self): @property def solution(self): if self.outputs["solution"].suffix == ".rvc": - return RVC.parse_solution(self.outputs["solution"].read_text()) + return RVC.create_solution(self.outputs["solution"].read_text()) elif self.outputs["solution"].suffix == ".zip": return [ - RVC.parse_solution(fn.read_text()) + RVC.create_solution(fn.read_text()) for fn in self.ind_outputs["solution"] ] @@ -644,10 +644,14 @@ def get_final_state(self, hru_index=1, basin_index=1): Set index value or None to get all basin states. """ solution = self.solution - if isinstance(solution, dict): - return RVC.get_states(solution, hru_index, basin_index) + if isinstance(solution, RVC): + return solution.hru_states[hru_index], solution.basin_states[basin_index] else: - return zip(*[RVC.get_states(s, hru_index, basin_index) for s in solution]) + states = [ + (sol.hru_states[hru_index], sol.basin_states[basin_index]) + for sol in solution + ] + return zip(*states) @property def diagnostics(self): diff --git a/tests/test_ECCC_forecast.py b/tests/test_ECCC_forecast.py index dab4d61d..b241b8b3 100644 --- a/tests/test_ECCC_forecast.py +++ b/tests/test_ECCC_forecast.py @@ -46,7 +46,7 @@ def test_forecasting_GEPS(self): model = GR4JCN() - model.config.rvc.set_from_solution(rvc.read_text()) + model.config.rvc.parse_solution(rvc.read_text()) model( ts=(ts20,), diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 39a8f5c4..8ece2e31 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -169,7 +169,7 @@ def test_simple(self): # ------------ # Check saved HRU states saved in RVC # ------------ - assert 1 in model.solution["HRUStateVariableTable"]["data"] + assert 1 in model.solution.hru_states # ------------ # Check attributes @@ -597,7 +597,7 @@ def test_resume_earlier(self): # 2. Replace variable in RVC class by parsed values: model.rvc.parse(rvc.read_text()) # I think in many cases option 2 will prove simpler. - model.config.rvc.set_from_solution(rvc.read_text()) + model.config.rvc.parse_solution(rvc.read_text()) model( TS, diff --git a/tests/test_hindcasting.py b/tests/test_hindcasting.py index 4097ed5c..f58825fe 100644 --- a/tests/test_hindcasting.py +++ b/tests/test_hindcasting.py @@ -46,7 +46,7 @@ def test_hindcasting_GEPS(self): # data provided in the testdata above. Then the dates will not work, and the model errors. model = GR4JCN() - model.config.rvc.set_from_solution(rvc.read_text()) + model.config.rvc.parse_solution(rvc.read_text()) # And run the model with the forecast data. model( diff --git a/tests/test_rv.py b/tests/test_rv.py index ffb724e1..0af5e4ed 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -7,8 +7,10 @@ import ravenpy from ravenpy.config.commands import ( + BasinStateVariablesCommand, DeaccumulateCommand, GriddedForcingCommand, + HRUStateVariableTableCommand, MonthlyAverageCommand, RainCorrectionCommand, SnowCorrectionCommand, @@ -65,17 +67,20 @@ class TestRVC: @classmethod def setup_class(self): sol = open(get_local_testdata("gr4j_cemaneige/solution.rvc")).read() - self.rvc = RVC(None) - self.rvc.set_from_solution(sol) + self.rvc = RVC.create_solution(sol) def test_parse(self): - assert self.rvc.hru_state.atmosphere == 821.98274 - assert self.rvc.basin_state.qout == (1, 13.2166, 13.29232) + assert len(self.rvc.hru_states) == 1 + assert self.rvc.hru_states[1].atmosphere == 821.98274 + assert self.rvc.hru_states[1].atmos_precip == -1233.16 - def test_write(self): - res = self.rvc.to_rv() - assert "1,0.0,821.98274" in res - assert ":BasinIndex 1 watershed" in res + assert len(self.rvc.basin_states) == 1 + assert self.rvc.basin_states[1].channel_storage == 0 + assert self.rvc.basin_states[1].qout == (1, 13.21660, 13.29232) + + def test_format(self): + rv = self.rvc.to_rv() + assert ":BasinIndex 1 watershed" in rv class TestRVH: From 6c24808eb3bd5e46418206d79204b0d260bc73a3 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 21 Apr 2021 13:59:37 -0400 Subject: [PATCH 28/59] Replace the RVC state properties by setter methods --- ravenpy/config/rvs.py | 18 ++++-------------- ravenpy/models/base.py | 7 ++++++- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 3b47bf12..efad2f02 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -107,21 +107,11 @@ def reset(self, **kwargs): self.hru_states = {} self.basin_states = {} - @property - def hru_state(self): - return self.hru_states.get(1, None) - - @hru_state.setter - def hru_state(self, value): - self.hru_states[1] = value - - @property - def basin_state(self): - return self.basin_states.get(1, None) + def set_hru_state(self, hru_state: HRUState): + self.hru_states[hru_state.index] = hru_state - @basin_state.setter - def basin_state(self, value): - self.basin_states[1] = value + def set_basin_state(self, basin_state: BasinIndexCommand): + self.basin_states[basin_state.index] = basin_state @classmethod def create_solution(cls, solution_str): diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index e7f647f2..ef4f4184 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -385,7 +385,12 @@ def run(self, ts, overwrite=False, **kwds): for self.psim in range(nloops): for key, val in pdict.items(): if val[self.psim] is not None: - self.config.update(key, val[self.psim]) + if key == "hru_state": + self.config.rvc.set_hru_state(val[self.psim]) + elif key == "basin_state": + self.config.rvc.set_basin_state(val[self.psim]) + else: + self.config.update(key, val[self.psim]) cmd = self.setup_model_run(tuple(map(Path, ts))) From 1a2c23b04e02a0d368b05d89fc58213557197a14 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 15:32:06 -0400 Subject: [PATCH 29/59] Move importers.py to extractors/routing_product.py --- ravenpy/cli/aggregate_forcings_to_hrus.py | 4 +- ravenpy/cli/generate_grid_weights.py | 18 +++--- ravenpy/extractors/__init__.py | 1 + .../routing_product.py} | 55 ++++++++----------- tests/test_routing_lievre_tutorial.py | 18 +++--- tests/test_rv.py | 20 +++---- 6 files changed, 54 insertions(+), 62 deletions(-) create mode 100644 ravenpy/extractors/__init__.py rename ravenpy/{config/importers.py => extractors/routing_product.py} (95%) diff --git a/ravenpy/cli/aggregate_forcings_to_hrus.py b/ravenpy/cli/aggregate_forcings_to_hrus.py index 870fe6c1..8a235839 100644 --- a/ravenpy/cli/aggregate_forcings_to_hrus.py +++ b/ravenpy/cli/aggregate_forcings_to_hrus.py @@ -3,7 +3,7 @@ import click from ravenpy.config.commands import GridWeightsCommand -from ravenpy.config.importers import grid_weight_importer_params +from ravenpy.extractors.routing_product import RoutingProductGridWeightExtractor @click.command() @@ -14,7 +14,7 @@ "--dim-names", nargs=2, type=click.Tuple([str, str]), - default=grid_weight_importer_params["DIM_NAMES"], + default=RoutingProductGridWeightExtractor.DIM_NAMES, show_default=True, help="Ordered dimension names of longitude (x) and latitude (y) in the NetCDF INPUT_NC_FILE.", ) diff --git a/ravenpy/cli/generate_grid_weights.py b/ravenpy/cli/generate_grid_weights.py index bfa60489..003a5ad2 100644 --- a/ravenpy/cli/generate_grid_weights.py +++ b/ravenpy/cli/generate_grid_weights.py @@ -4,7 +4,7 @@ import click -from ravenpy.config.importers import grid_weight_importer_params +from ravenpy.extractors.routing_product import RoutingProductGridWeightExtractor @click.command() @@ -15,7 +15,7 @@ "--dim-names", nargs=2, type=click.Tuple([str, str]), - default=grid_weight_importer_params["DIM_NAMES"], + default=RoutingProductGridWeightExtractor.DIM_NAMES, show_default=True, help="Ordered dimension names of longitude (x) and latitude (y) in the NetCDF INPUT_FILE.", ) @@ -24,7 +24,7 @@ "--var-names", nargs=2, type=click.Tuple([str, str]), - default=grid_weight_importer_params["VAR_NAMES"], + default=RoutingProductGridWeightExtractor.VAR_NAMES, show_default=True, help="Variable name of 1D or 2D longitude and latitude variables in the NetCDF INPUT_FILE (in this order).", ) @@ -32,7 +32,7 @@ "-c", # legacy script short option "--routing-id-field", type=str, - default=grid_weight_importer_params["ROUTING_ID_FIELD"], + default=RoutingProductGridWeightExtractor.ROUTING_ID_FIELD, show_default=True, help="Name of column in routing information shapefile (ROUTING_FILE) containing a unique key for each dataset.", ) @@ -40,7 +40,7 @@ "-f", # legacy script short option "--netcdf-input-field", type=str, - default=grid_weight_importer_params["NETCDF_INPUT_FIELD"], + default=RoutingProductGridWeightExtractor.NETCDF_INPUT_FIELD, show_default=True, help="Attribute name in INPUT_FILE shapefile that defines the index of the shape in NetCDF model output file (numbering needs to be [0 ... N-1]).", ) @@ -66,7 +66,7 @@ "-e", # legacy script short option "--area-error-threshold", type=float, - default=grid_weight_importer_params["AREA_ERROR_THRESHOLD"], + default=RoutingProductGridWeightExtractor.AREA_ERROR_THRESHOLD, show_default=True, help="Threshold (as fraction) of allowed mismatch in areas between subbasins from routing information (ROUTING_FILE) and overlay with grid-cells or subbasins (INPUT_FILE). If error is smaller than this threshold the weights will be adjusted such that they sum up to exactly 1. Raven will exit gracefully in case weights do not sum up to at least 0.95.", ) @@ -109,9 +109,9 @@ def generate_grid_weights( is then free to embed or reference, in her own config context). """ # NOTE: This is in order to make sphinx-click happy. Magic. Do not touch. - from ravenpy.config.importers import RoutingProductGridWeightImporter + from ravenpy.extractors import RoutingProductGridWeightExtractor - importer = RoutingProductGridWeightImporter( + extractor = RoutingProductGridWeightExtractor( input_file, routing_file, dim_names, @@ -122,7 +122,7 @@ def generate_grid_weights( sub_ids, area_error_threshold, ) - gw_cmd = importer.extract() + gw_cmd = extractor.extract() if not output: input_file_path = Path(input_file) diff --git a/ravenpy/extractors/__init__.py b/ravenpy/extractors/__init__.py new file mode 100644 index 00000000..a93c4cee --- /dev/null +++ b/ravenpy/extractors/__init__.py @@ -0,0 +1 @@ +from .routing_product import * diff --git a/ravenpy/config/importers.py b/ravenpy/extractors/routing_product.py similarity index 95% rename from ravenpy/config/importers.py rename to ravenpy/extractors/routing_product.py index 73207d31..3069f2f4 100644 --- a/ravenpy/config/importers.py +++ b/ravenpy/extractors/routing_product.py @@ -21,29 +21,14 @@ from ravenpy.config.commands import ( ChannelProfileCommand, - DataCommand, - GriddedForcingCommand, GridWeightsCommand, HRUsCommand, - ObservationDataCommand, ReservoirCommand, - StationForcingCommand, SubBasinsCommand, ) -grid_weight_importer_params = dict( - DIM_NAMES=("lon_dim", "lat_dim"), - VAR_NAMES=("lon", "lat"), - ROUTING_ID_FIELD="HRU_ID", - NETCDF_INPUT_FIELD="NetCDF_col", - AREA_ERROR_THRESHOLD=0.05, -) - - -HRU_ASPECT_CONVENTION = "GRASS" # GRASS | ArcGIS - -class RoutingProductShapefileImporter: +class RoutingProductShapefileExtractor: """ This is a class to encapsulate the logic of converting the Routing @@ -57,6 +42,7 @@ class RoutingProductShapefileImporter: USE_LAND_AS_GAUGE = False USE_MANNING_COEFF = False MANNING_DEFAULT = 0.035 + HRU_ASPECT_CONVENTION = "GRASS" # GRASS | ArcGIS def __init__(self, shapefile_path, hru_aspect_convention=HRU_ASPECT_CONVENTION): if isinstance(shapefile_path, (Path, str)): @@ -146,7 +132,7 @@ def _extract_subbasin(self, row, is_lake, subbasin_ids) -> SubBasinsCommand.Reco # is_lake = row["HRU_IsLake"] >= 0 river_length_in_kms = 0 if is_lake else round(row["Rivlen"] / 1000, 5) # river_slope = max( - # row["RivSlope"], RoutingProductShapefileImporter.MAX_RIVER_SLOPE + # row["RivSlope"], RoutingProductShapefileExtractor.MAX_RIVER_SLOPE # ) # downstream_id downstream_id = int(row["DowSubId"]) @@ -155,7 +141,7 @@ def _extract_subbasin(self, row, is_lake, subbasin_ids) -> SubBasinsCommand.Reco elif downstream_id not in subbasin_ids: downstream_id = -1 gauged = row["IsObs"] > 0 or ( - is_lake and RoutingProductShapefileImporter.USE_LAKE_AS_GAUGE + is_lake and RoutingProductShapefileExtractor.USE_LAKE_AS_GAUGE ) rec = SubBasinsCommand.Record( subbasin_id=subbasin_id, @@ -175,7 +161,7 @@ def _extract_reservoir(self, row) -> ReservoirCommand: subbasin_id=int(row["SubId"]), hru_id=int(row["HRU_ID"]), name=f"Lake_{lake_id}", - weir_coefficient=RoutingProductShapefileImporter.WEIR_COEFFICIENT, + weir_coefficient=RoutingProductShapefileExtractor.WEIR_COEFFICIENT, crest_width=row["BkfWidth"], max_depth=row["LakeDepth"], lake_area=row["HRU_Area"], @@ -183,7 +169,7 @@ def _extract_reservoir(self, row) -> ReservoirCommand: def _extract_channel_profile(self, row) -> ChannelProfileCommand: subbasin_id = int(row["SubId"]) - slope = max(row["RivSlope"], RoutingProductShapefileImporter.MAX_RIVER_SLOPE) + slope = max(row["RivSlope"], RoutingProductShapefileExtractor.MAX_RIVER_SLOPE) # SWAT: top width of channel when filled with water; bankfull width W_bnkfull channel_width = max(row["BkfWidth"], 1) @@ -230,10 +216,10 @@ def _extract_channel_profile(self, row) -> ChannelProfileCommand: (2 * sidwdfp + 4 * channel_width + 2 * sidwd + botwd, zfld), ] - if RoutingProductShapefileImporter.USE_MANNING_COEFF: + if RoutingProductShapefileExtractor.USE_MANNING_COEFF: mann = channeln else: - mann = RoutingProductShapefileImporter.MANNING_DEFAULT + mann = RoutingProductShapefileExtractor.MANNING_DEFAULT # roughness zones of channel and floodplain roughness_zones = [ @@ -292,12 +278,17 @@ def _extract_hru(self, row) -> HRUsCommand.Record: ) -class RoutingProductGridWeightImporter: +class RoutingProductGridWeightExtractor: """ The original version of this algorithm can be found at: https://github.com/julemai/GridWeightsGenerator """ + DIM_NAMES = ("lon_dim", "lat_dim") + VAR_NAMES = ("lon", "lat") + ROUTING_ID_FIELD = "HRU_ID" + NETCDF_INPUT_FIELD = "NetCDF_col" + AREA_ERROR_THRESHOLD = 0.05 CRS_LLDEG = 4326 # EPSG id of lat/lon (deg) coordinate reference system (CRS) CRS_CAEA = 3573 # EPSG id of equal-area coordinate reference system (CRS) @@ -305,13 +296,13 @@ def __init__( self, input_file_path, routing_file_path, - dim_names=grid_weight_importer_params["DIM_NAMES"], - var_names=grid_weight_importer_params["VAR_NAMES"], - routing_id_field=grid_weight_importer_params["ROUTING_ID_FIELD"], - netcdf_input_field=grid_weight_importer_params["NETCDF_INPUT_FIELD"], + dim_names=DIM_NAMES, + var_names=VAR_NAMES, + routing_id_field=ROUTING_ID_FIELD, + netcdf_input_field=NETCDF_INPUT_FIELD, gauge_ids=None, sub_ids=None, - area_error_threshold=grid_weight_importer_params["AREA_ERROR_THRESHOLD"], + area_error_threshold=AREA_ERROR_THRESHOLD, ): self._dim_names = tuple(dim_names) self._var_names = tuple(var_names) @@ -355,7 +346,7 @@ def extract(self) -> GridWeightsCommand: # WGS 84 / North Pole LAEA Canada self._routing_data = self._routing_data.to_crs( - epsg=RoutingProductGridWeightImporter.CRS_CAEA + epsg=RoutingProductGridWeightExtractor.CRS_CAEA ) def keep_only_valid_downsubid_and_obs_nm(g): @@ -568,7 +559,7 @@ def _prepare_input_data(self): # input data is a shapefile self._input_data = self._input_data.to_crs( - epsg=RoutingProductGridWeightImporter.CRS_CAEA + epsg=RoutingProductGridWeightExtractor.CRS_CAEA ) self._nlon = 1 # only for consistency @@ -635,7 +626,7 @@ def _compute_grid_cell_polygons(self): ] tmp = self._shape_to_geometry( - gridcell_edges, epsg=RoutingProductGridWeightImporter.CRS_CAEA + gridcell_edges, epsg=RoutingProductGridWeightExtractor.CRS_CAEA ) grid_cell_geom_gpd_wkt[ilat][ilon] = tmp @@ -730,7 +721,7 @@ def _shape_to_geometry(self, shape_from_jsonfile, epsg=None): if epsg: source = osr.SpatialReference() # usual lat/lon projection - source.ImportFromEPSG(RoutingProductGridWeightImporter.CRS_LLDEG) + source.ImportFromEPSG(RoutingProductGridWeightExtractor.CRS_LLDEG) target = osr.SpatialReference() target.ImportFromEPSG(epsg) # any projection to convert to diff --git a/tests/test_routing_lievre_tutorial.py b/tests/test_routing_lievre_tutorial.py index fd00f516..455e54f8 100644 --- a/tests/test_routing_lievre_tutorial.py +++ b/tests/test_routing_lievre_tutorial.py @@ -8,9 +8,9 @@ SoilProfilesCommand, VegetationClassesCommand, ) -from ravenpy.config.importers import ( - RoutingProductGridWeightImporter, - RoutingProductShapefileImporter, +from ravenpy.extractors.routing_product import ( + RoutingProductGridWeightExtractor, + RoutingProductShapefileExtractor, ) from ravenpy.models import Raven from ravenpy.utilities.testdata import get_local_testdata @@ -116,10 +116,10 @@ def test_lievre_tutorial(self): # RVH # ####### - rvh_importer = RoutingProductShapefileImporter( + rvh_extractor = RoutingProductShapefileExtractor( routing_product_shp_path, hru_aspect_convention="ArcGIS" ) - rvh_config = rvh_importer.extract() + rvh_config = rvh_extractor.extract() channel_profiles = rvh_config.pop("channel_profiles") gauge = [sb for sb in rvh_config["subbasins"] if sb.gauged] @@ -182,11 +182,11 @@ def test_lievre_tutorial(self): # RVT # ####### - streaminputs_importer = RoutingProductGridWeightImporter( + streaminputs_extractor = RoutingProductGridWeightExtractor( vic_streaminputs_nc_path, routing_product_shp_path ) - temperatures_importer = RoutingProductGridWeightImporter( + temperatures_extractor = RoutingProductGridWeightExtractor( vic_temperatures_nc_path, routing_product_shp_path ) @@ -198,7 +198,7 @@ def test_lievre_tutorial(self): dim_names_nc=("lon_dim", "lat_dim", "time"), scale=4.0, offset=0, - grid_weights=streaminputs_importer.extract(), + grid_weights=streaminputs_extractor.extract(), ) model.config.rvt.add_nc_variable( @@ -207,7 +207,7 @@ def test_lievre_tutorial(self): file_name_nc=vic_temperatures_nc_path.name, var_name_nc="Avg_temp", dim_names_nc=("lon_dim", "lat_dim", "time"), - grid_weights=temperatures_importer.extract(), + grid_weights=temperatures_extractor.extract(), ) model.config.rvt.add_nc_variable( diff --git a/tests/test_rv.py b/tests/test_rv.py index 0af5e4ed..1b4ec2b9 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -15,11 +15,11 @@ RainCorrectionCommand, SnowCorrectionCommand, ) -from ravenpy.config.importers import ( - RoutingProductGridWeightImporter, - RoutingProductShapefileImporter, -) from ravenpy.config.rvs import OST, RVC, RVH, RVI, RVP, RVT +from ravenpy.extractors import ( + RoutingProductGridWeightExtractor, + RoutingProductShapefileExtractor, +) from ravenpy.utilities.testdata import get_local_testdata @@ -87,8 +87,8 @@ class TestRVH: @classmethod def setup_class(self): shp = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = RoutingProductShapefileImporter(shp) - config = importer.extract() + extractor = RoutingProductShapefileExtractor(shp) + config = extractor.extract() self.rvh = RVH(None) for k, v in config.items(): if k != "channel_profiles": @@ -129,8 +129,8 @@ class TestRVP: @classmethod def setup_class(self): shp = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = RoutingProductShapefileImporter(shp) - config = importer.extract() + extractor = RoutingProductShapefileExtractor(shp) + config = extractor.extract() self.rvp = RVP(None) self.rvp.tmpl = "{channel_profiles}" self.rvp.channel_profiles = config["channel_profiles"] @@ -150,8 +150,8 @@ class TestRVT: def setup_class(self): input_file = get_local_testdata("raven-routing-sample/VIC_streaminputs.nc") routing_file = get_local_testdata("raven-routing-sample/finalcat_hru_info.zip") - importer = RoutingProductGridWeightImporter(input_file, routing_file) - gws = importer.extract() + extractor = RoutingProductGridWeightExtractor(input_file, routing_file) + gws = extractor.extract() self.gfc = GriddedForcingCommand(grid_weights=gws) def test_import_process(self): From 7bdb8f9ba8effb432d86588c6d48278ec4152f1a Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 15:32:35 -0400 Subject: [PATCH 30/59] Update docs --- Makefile | 2 +- docs/conf.py | 7 +++++-- docs/modules.rst | 2 +- docs/ravenpy.models.rst | 40 ++++++++------------------------------ docs/ravenpy.rst | 4 +++- docs/ravenpy.utilities.rst | 8 ++++++++ docs/user_api.rst | 21 +++++++------------- environment-rtd.yml | 1 + 8 files changed, 34 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index 1d5635c8..a1200559 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ coverage: ## check code coverage quickly with the default Python docs: ## generate Sphinx HTML documentation, including API docs # Warning: as the sphinx-apidoc is NOT being run on the RTD server the workaround we have # is to commit the (currently 5) rst files it generates. - sphinx-apidoc -o docs/ ravenpy + sphinx-apidoc -d 10 -o docs/ ravenpy $(MAKE) -C docs clean $(MAKE) -C docs html $(BROWSER) docs/_build/html/index.html diff --git a/docs/conf.py b/docs/conf.py index 12adcb86..387856b5 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,8 +48,8 @@ autodoc_default_options = { "members": True, "undoc-members": True, - "private-members": True, - "special-members": True, + "private-members": False, + "special-members": False, } # To avoid having to install these and burst memory limit on ReadTheDocs. @@ -65,9 +65,12 @@ "netCDF4", "osgeo", "geopandas", + "holoviews", + "hvplot", "lxml", "owslib", "pandas", + # "pydantic", "pyproj", "rasterio", "rioxarray", diff --git a/docs/modules.rst b/docs/modules.rst index 3e7efcdc..2b83f28f 100644 --- a/docs/modules.rst +++ b/docs/modules.rst @@ -2,6 +2,6 @@ ravenpy ======= .. toctree:: - :maxdepth: 4 + :maxdepth: 10 ravenpy diff --git a/docs/ravenpy.models.rst b/docs/ravenpy.models.rst index 17973813..e5c91e83 100644 --- a/docs/ravenpy.models.rst +++ b/docs/ravenpy.models.rst @@ -1,6 +1,14 @@ ravenpy.models package ====================== +Subpackages +----------- + +.. toctree:: + :maxdepth: 10 + + ravenpy.models.emulators + Submodules ---------- @@ -12,30 +20,6 @@ ravenpy.models.base module :undoc-members: :show-inheritance: -ravenpy.models.commands module ------------------------------- - -.. automodule:: ravenpy.models.commands - :members: - :undoc-members: - :show-inheritance: - -ravenpy.models.emulators module -------------------------------- - -.. automodule:: ravenpy.models.emulators - :members: - :undoc-members: - :show-inheritance: - -ravenpy.models.importers module -------------------------------- - -.. automodule:: ravenpy.models.importers - :members: - :undoc-members: - :show-inheritance: - ravenpy.models.multimodel module -------------------------------- @@ -44,14 +28,6 @@ ravenpy.models.multimodel module :undoc-members: :show-inheritance: -ravenpy.models.rv module ------------------------- - -.. automodule:: ravenpy.models.rv - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/docs/ravenpy.rst b/docs/ravenpy.rst index 43d8f314..ea5f5b3c 100644 --- a/docs/ravenpy.rst +++ b/docs/ravenpy.rst @@ -5,9 +5,11 @@ Subpackages ----------- .. toctree:: - :maxdepth: 4 + :maxdepth: 10 ravenpy.cli + ravenpy.config + ravenpy.extractors ravenpy.models ravenpy.utilities diff --git a/docs/ravenpy.utilities.rst b/docs/ravenpy.utilities.rst index e131ae15..df136edb 100644 --- a/docs/ravenpy.utilities.rst +++ b/docs/ravenpy.utilities.rst @@ -84,6 +84,14 @@ ravenpy.utilities.mk\_test module :undoc-members: :show-inheritance: +ravenpy.utilities.nb\_graphs module +----------------------------------- + +.. automodule:: ravenpy.utilities.nb_graphs + :members: + :undoc-members: + :show-inheritance: + ravenpy.utilities.ravenio module -------------------------------- diff --git a/docs/user_api.rst b/docs/user_api.rst index 3a3b9060..41780778 100644 --- a/docs/user_api.rst +++ b/docs/user_api.rst @@ -2,7 +2,7 @@ User API ======== -Base models +Base Models =========== .. autoclass:: ravenpy.models.base.Raven @@ -24,27 +24,20 @@ Emulators :members: :noindex: +Configuration +============= -Configuration options -===================== - -.. automodule:: ravenpy.models.rv - :members: - :noindex: - -.. automodule:: ravenpy.models.commands +.. automodule:: ravenpy.config :members: :noindex: +Extractors +========== -Importers -========= - -.. automodule:: ravenpy.models.importers +.. automodule:: ravenpy.extractors :members: :noindex: - Utilities ========= diff --git a/environment-rtd.yml b/environment-rtd.yml index 1ff59f0e..1422dfd3 100644 --- a/environment-rtd.yml +++ b/environment-rtd.yml @@ -15,6 +15,7 @@ dependencies: - ipython - ipykernel - jupyter_client + - pydantic - sphinx-click - sphinx_rtd_theme - sphinx-autoapi From 8b724660e5a630ce17bb681a05de92d9e0a9ce6e Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 15:35:41 -0400 Subject: [PATCH 31/59] Add missing rst files --- docs/ravenpy.config.rst | 29 +++++++++++++++++ docs/ravenpy.extractors.rst | 21 ++++++++++++ docs/ravenpy.models.emulators.rst | 53 +++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 docs/ravenpy.config.rst create mode 100644 docs/ravenpy.extractors.rst create mode 100644 docs/ravenpy.models.emulators.rst diff --git a/docs/ravenpy.config.rst b/docs/ravenpy.config.rst new file mode 100644 index 00000000..4122158a --- /dev/null +++ b/docs/ravenpy.config.rst @@ -0,0 +1,29 @@ +ravenpy.config package +====================== + +Submodules +---------- + +ravenpy.config.commands module +------------------------------ + +.. automodule:: ravenpy.config.commands + :members: + :undoc-members: + :show-inheritance: + +ravenpy.config.rvs module +------------------------- + +.. automodule:: ravenpy.config.rvs + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: ravenpy.config + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/ravenpy.extractors.rst b/docs/ravenpy.extractors.rst new file mode 100644 index 00000000..4e8cd2c1 --- /dev/null +++ b/docs/ravenpy.extractors.rst @@ -0,0 +1,21 @@ +ravenpy.extractors package +========================== + +Submodules +---------- + +ravenpy.extractors.routing\_product module +------------------------------------------ + +.. automodule:: ravenpy.extractors.routing_product + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: ravenpy.extractors + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/ravenpy.models.emulators.rst b/docs/ravenpy.models.emulators.rst new file mode 100644 index 00000000..3da5cc3b --- /dev/null +++ b/docs/ravenpy.models.emulators.rst @@ -0,0 +1,53 @@ +ravenpy.models.emulators package +================================ + +Submodules +---------- + +ravenpy.models.emulators.blended module +--------------------------------------- + +.. automodule:: ravenpy.models.emulators.blended + :members: + :undoc-members: + :show-inheritance: + +ravenpy.models.emulators.gr4jcn module +-------------------------------------- + +.. automodule:: ravenpy.models.emulators.gr4jcn + :members: + :undoc-members: + :show-inheritance: + +ravenpy.models.emulators.hbvec module +------------------------------------- + +.. automodule:: ravenpy.models.emulators.hbvec + :members: + :undoc-members: + :show-inheritance: + +ravenpy.models.emulators.hmets module +------------------------------------- + +.. automodule:: ravenpy.models.emulators.hmets + :members: + :undoc-members: + :show-inheritance: + +ravenpy.models.emulators.mohyse module +-------------------------------------- + +.. automodule:: ravenpy.models.emulators.mohyse + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: ravenpy.models.emulators + :members: + :undoc-members: + :show-inheritance: From 9a9c73f56bd877b0391f184538ac9722499e91c2 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 15:52:35 -0400 Subject: [PATCH 32/59] Update user_api.rst --- docs/user_api.rst | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/user_api.rst b/docs/user_api.rst index 41780778..a0d129de 100644 --- a/docs/user_api.rst +++ b/docs/user_api.rst @@ -20,21 +20,41 @@ Base Models Emulators ========= -.. automodule:: ravenpy.models.emulators +.. automodule:: ravenpy.models.emulators.blended + :members: + :noindex: + +.. automodule:: ravenpy.models.emulators.gr4jcn + :members: + :noindex: + +.. automodule:: ravenpy.models.emulators.hbvec + :members: + :noindex: + +.. automodule:: ravenpy.models.emulators.hmets + :members: + :noindex: + +.. automodule:: ravenpy.models.emulators.mohyse :members: :noindex: Configuration ============= -.. automodule:: ravenpy.config +.. automodule:: ravenpy.config.commands + :members: + :noindex: + +.. automodule:: ravenpy.config.rvs :members: :noindex: Extractors ========== -.. automodule:: ravenpy.extractors +.. automodule:: ravenpy.extractors.routing_product :members: :noindex: From bdf6c45ed554499b7602695eadd154d51eb405c5 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 17:27:25 -0400 Subject: [PATCH 33/59] Remove _hru_type field from HRUsCommand.Record --- ravenpy/config/commands.py | 2 -- ravenpy/models/emulators/gr4jcn.py | 8 +++----- ravenpy/models/emulators/hmets.py | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index c79b241f..ab0edc98 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -112,8 +112,6 @@ class Record(RavenCommand): terrain_class: str = "" slope: float = 0.0 aspect: float = 0.0 - # This can be used instead of sub-typing in serialization contexts - _hru_type: Optional[str] = "land" # land | lake def to_rv(self): d = asdict(self) diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index 5713c2fc..69f981e2 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -42,7 +42,6 @@ class LandHRU(HRU): soil_profile: str = "DEFAULT_P" aquifer_profile: str = "[NONE]" terrain_class: str = "[NONE]" - _hru_type: str = "land" @dataclass class LakeHRU(HRU): @@ -51,7 +50,6 @@ class LakeHRU(HRU): soil_profile: str = "LAKE" aquifer_profile: str = "[NONE]" terrain_class: str = "[NONE]" - _hru_type: str = "lake" def __init__(self, *args, **kwds): super().__init__(*args, **kwds) @@ -249,16 +247,16 @@ def derived_parameters(self): # If self.rvc.hru_states is set, it means that we are using `resume()` and we don't # want to interfere for hru in self.config.rvh.hrus: - if isinstance(hru, GR4JCN.LandHRU) or hru._hru_type == "land": + if isinstance(hru, GR4JCN.LandHRU): self.config.rvc.hru_states[hru.hru_id] = HRUState( index=hru.hru_id, soil0=soil0, soil1=soil1 ) - elif isinstance(hru, GR4JCN.LakeHRU) or hru._hru_type == "lake": + elif isinstance(hru, GR4JCN.LakeHRU): self.config.rvc.hru_states[hru.hru_id] = HRUState(index=hru.hru_id) sb_contains_lake[hru.subbasin_id] = True else: raise Exception( - "Type of HRU must be either `GR4JCN.LandHRU` or `GR4JCN.LakeHRU` (or its `_hru_type` must be either 'land' or 'lake')" + "Type of HRU must be either `GR4JCN.LandHRU` or `GR4JCN.LakeHRU`" ) if not self.config.rvc.basin_states: diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index e4f8238a..61239ab9 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -47,7 +47,6 @@ class ForestHRU(HRU): soil_profile: str = "DEFAULT_P" aquifer_profile: str = "[NONE]" terrain_class: str = "[NONE]" - # _hru_type: str = "land" def __init__(self, *args, **kwds): super().__init__(*args, **kwds) From eb657e568d040632dddfca10326ffa0b92fb97c5 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 17:36:07 -0400 Subject: [PATCH 34/59] Correct number of generated autodoc files in Makefile comment --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a1200559..0bb98c53 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ coverage: ## check code coverage quickly with the default Python docs: ## generate Sphinx HTML documentation, including API docs # Warning: as the sphinx-apidoc is NOT being run on the RTD server the workaround we have - # is to commit the (currently 5) rst files it generates. + # is to commit the (currently 8) rst files it generates. sphinx-apidoc -d 10 -o docs/ ravenpy $(MAKE) -C docs clean $(MAKE) -C docs html From 617d9a4ac521e831f61466aa892096a04acf225b Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 18:37:12 -0400 Subject: [PATCH 35/59] Update notebooks --- docs/notebooks/climatological_ESP_forecasting.ipynb | 3 ++- docs/notebooks/hydro_routing_product_example.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/notebooks/climatological_ESP_forecasting.ipynb b/docs/notebooks/climatological_ESP_forecasting.ipynb index 348085a7..cb5a3a6a 100644 --- a/docs/notebooks/climatological_ESP_forecasting.ipynb +++ b/docs/notebooks/climatological_ESP_forecasting.ipynb @@ -42,7 +42,8 @@ "import datetime as dt\n", "from ravenpy.utilities import forecasting\n", "from ravenpy.utilities.testdata import get_file\n", - "from ravenpy.models import HRU, GR4JCN\n", + "from ravenpy.models import GR4JCN\n", + "from ravenpy.config.commands import HRU\n", "\n", "hru = GR4JCN.LandHRU(area=4523.5, longitude=-72.55, latitude=48.39, elevation=300.0)\n", "\n", diff --git a/docs/notebooks/hydro_routing_product_example.ipynb b/docs/notebooks/hydro_routing_product_example.ipynb index 383deda6..6ba90499 100644 --- a/docs/notebooks/hydro_routing_product_example.ipynb +++ b/docs/notebooks/hydro_routing_product_example.ipynb @@ -1227,8 +1227,8 @@ "outputs": [], "source": [ "from ravenpy.models import GR4JCN, get_average_annual_runoff\n", - "from ravenpy.models.importers import RoutingProductShapefileImporter\n", - "from ravenpy.models.commands import SBGroupPropertyMultiplierCommand\n", + "from ravenpy.extractors import RoutingProductShapefileExtractor\n", + "from ravenpy.config.commands import SBGroupPropertyMultiplierCommand\n", "from ravenpy.utilities.testdata import get_local_testdata\n", "import datetime as dt" ] From 5090b7b9b16d83c0d5d2eaa7789dbd38fca8f140 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 19:48:54 -0400 Subject: [PATCH 36/59] Add RainSnowFraction command and Enum values --- ravenpy/config/commands.py | 22 ++++++++++++++++++ ravenpy/config/rvs.py | 35 +++++------------------------ ravenpy/models/emulators/blended.py | 15 +++++++++---- ravenpy/models/emulators/gr4jcn.py | 14 +++++++++--- ravenpy/models/emulators/hbvec.py | 2 +- ravenpy/models/emulators/hmets.py | 13 ++++++++--- ravenpy/models/emulators/mohyse.py | 13 ++++++++--- 7 files changed, 71 insertions(+), 43 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index ab0edc98..aa51f4cd 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -2,6 +2,7 @@ import re from abc import ABC, abstractmethod from dataclasses import asdict, field +from enum import Enum from pathlib import Path from textwrap import dedent from typing import Any, Dict, Optional, Tuple, Union @@ -904,3 +905,24 @@ def to_rv(self): if self.value is None: return "" return self.template.format(**asdict(self)) + + +@dataclass +class RainSnowFractionCommand(RavenCommand): + class Values(Enum): + DATA = "RAINSNOW_DATA" + DINGMAN = "RAINSNOW_DINGMAN" + UBC = "RAINSNOW_UBC" + HBV = "RAINSNOW_HBV" + HARDER = "RAINSNOW_HARDER" + HSPF = "RAINSNOW_HSPF" + + value: Values = Values.DATA + + template = ":RainSnowFraction {value.value}" + + def to_rv(self): + return self.template.format(**asdict(self)) + + +RainSnowFraction = RainSnowFractionCommand.Values diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index efad2f02..0028fafa 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -27,6 +27,8 @@ MonthlyAverageCommand, ObservationDataCommand, RainCorrectionCommand, + RainSnowFraction, + RainSnowFractionCommand, RoutingCommand, SnowCorrectionCommand, SoilClassesCommand, @@ -197,15 +199,6 @@ class RVI(RV): tmpl = """ """ - RAIN_SNOW_FRACTION_OPTIONS = ( - "RAINSNOW_DATA", - "RAINSNOW_DINGMAN", - "RAINSNOW_UBC", - "RAINSNOW_HBV", - "RAINSNOW_HARDER", - "RAINSNOW_HSPF", - ) - EVAPORATION_OPTIONS = ( "PET_CONSTANT", "PET_PENMAN_MONTEITH", @@ -250,7 +243,7 @@ def __init__(self, config): self._start_date = None self._end_date = None self._now = None - self._rain_snow_fraction = "RAINSNOW_DATA" + self._rain_snow_fraction = RainSnowFraction.DATA self._evaporation = None self._ow_evaporation = None self._duration = 1 @@ -367,27 +360,11 @@ def routing(self, value): @property def rain_snow_fraction(self): """Rain snow partitioning.""" - return self._rain_snow_fraction + return RainSnowFractionCommand(self._rain_snow_fraction) @rain_snow_fraction.setter - def rain_snow_fraction(self, value): - """Can be one of - - - RAINSNOW_DATA - - RAINSNOW_DINGMAN - - RAINSNOW_UBC - - RAINSNOW_HBV - - RAINSNOW_HARDER - - RAINSNOW_HSPF - """ - v = value.upper() - - if v in RVI.RAIN_SNOW_FRACTION_OPTIONS: - self._rain_snow_fraction = v - else: - raise ValueError( - f"Value should be one of {RVI.RAIN_SNOW_FRACTION_OPTIONS}." - ) + def rain_snow_fraction(self, value: RainSnowFraction): + self._rain_snow_fraction = value @property def evaporation(self): diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 3814a3b5..0367b52e 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -3,7 +3,14 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.commands import ( + HRU, + LU, + BasinIndexCommand, + HRUState, + RainSnowFraction, + Sub, +) from ravenpy.models.base import Ostrich, Raven from .gr4jcn import GR4JCN @@ -97,7 +104,7 @@ def __init__(self, *args, **kwds): LU("FOREST", impermeable_frac=0.0, forest_coverage=0.02345), ), evaporation="PET_OUDIN", - rain_snow_fraction="RAINSNOW_HBV", + rain_snow_fraction=RainSnowFraction.HBV, ) ######### @@ -232,7 +239,7 @@ def __init__(self, *args, **kwds): :Method ORDERED_SERIES :PotentialMeltMethod POTMELT_HMETS - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE @@ -424,7 +431,7 @@ def __init__(self, *args, **kwds): :Method ORDERED_SERIES :PotentialMeltMethod POTMELT_HMETS - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index 69f981e2..ee0d99fe 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -3,7 +3,14 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.commands import ( + HRU, + LU, + BasinIndexCommand, + HRUState, + RainSnowFraction, + Sub, +) from ravenpy.models.base import Ostrich, Raven @@ -152,7 +159,8 @@ def __init__(self, *args, **kwds): {routing} :CatchmentRoute ROUTE_DUMP :Evaporation {evaporation} # PET_OUDIN - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_DINGMAN + {rain_snow_fraction} + :PotentialMeltMethod POTMELT_DEGREE_DAY :OroTempCorrect OROCORR_SIMPLELAPSE :OroPrecipCorrect OROCORR_SIMPLELAPSE @@ -211,7 +219,7 @@ def __init__(self, *args, **kwds): """ self.config.rvi.set_tmpl(rvi_tmpl) - self.config.rvi.rain_snow_fraction = "RAINSNOW_DINGMAN" + self.config.rvi.rain_snow_fraction = RainSnowFraction.DINGMAN self.config.rvi.evaporation = "PET_OUDIN" ######### diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index 1d3c9397..23bcb811 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -173,7 +173,7 @@ def __init__(self, *args, **kwds): :SWCloudCorrect SW_CLOUD_CORR_NONE :SWCanopyCorrect SW_CANOPY_CORR_NONE :LWRadiationMethod LW_RAD_DEFAULT - :RainSnowFraction {rain_snow_fraction} # RAINSNOW_HBV + {rain_snow_fraction} :PotentialMeltMethod POTMELT_HBV :OroTempCorrect OROCORR_HBV :OroPrecipCorrect OROCORR_HBV diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 61239ab9..90e009da 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -2,7 +2,14 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.commands import ( + HRU, + LU, + BasinIndexCommand, + HRUState, + RainSnowFraction, + Sub, +) from ravenpy.models.base import Ostrich, Raven @@ -169,7 +176,7 @@ def __init__(self, *args, **kwds): :Method ORDERED_SERIES :PotentialMeltMethod POTMELT_HMETS - :RainSnowFraction {rain_snow_fraction} + {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE @@ -219,7 +226,7 @@ def __init__(self, *args, **kwds): self.config.rvi.set_tmpl(rvi_tmpl) self.config.rvi.evaporation = "PET_OUDIN" - self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + self.config.rvi.rain_snow_fraction = RainSnowFraction.DATA ######### # R V C # diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 44c2e218..9535b154 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -3,7 +3,14 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.commands import ( + HRU, + LU, + BasinIndexCommand, + HRUState, + RainSnowFraction, + Sub, +) from ravenpy.models.base import Ostrich, Raven from .gr4jcn import GR4JCN @@ -148,7 +155,7 @@ def __init__(self, *args, **kwds): :CatchmentRoute ROUTE_GAMMA_CONVOLUTION :Evaporation {evaporation} # PET_MOHYSE :DirectEvaporation - :RainSnowFraction {rain_snow_fraction} + {rain_snow_fraction} :HydrologicProcesses :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE @@ -219,7 +226,7 @@ def __init__(self, *args, **kwds): # R V I # ######### - self.config.rvi.rain_snow_fraction = "RAINSNOW_DATA" + self.config.rvi.rain_snow_fraction = RainSnowFraction.DATA self.config.rvi.evaporation = "PET_MOHYSE" ######### From 2ea3ac9338d69e45c2e558d57d344b991a7f9601 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 22 Apr 2021 22:49:49 -0400 Subject: [PATCH 37/59] Implement RainSnowFractionCommand with Enum --- ravenpy/config/commands.py | 49 +++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index aa51f4cd..195fd188 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -14,13 +14,33 @@ class RavenCommand(ABC): - def __str__(self): - return self.to_rv() + """ + This base class must be used for all Raven commands that are dataclasses + which must implement some specialized rendering logic. + """ @abstractmethod def to_rv(self): pass + def __str__(self): + return self.to_rv() + + +class RavenOptionCommand(Enum): + """ + This alternate base class allows to create Raven commands that are based on + a simple set of Enum options. + """ + + def to_rv(self): + cmd = f":{self.__class__.__name__}" + cmd = cmd.replace("Command", "") + return f"{cmd} {self.value}" + + def __str__(self): + return self.to_rv() + @dataclass class LinearTransform(RavenCommand): @@ -907,22 +927,13 @@ def to_rv(self): return self.template.format(**asdict(self)) -@dataclass -class RainSnowFractionCommand(RavenCommand): - class Values(Enum): - DATA = "RAINSNOW_DATA" - DINGMAN = "RAINSNOW_DINGMAN" - UBC = "RAINSNOW_UBC" - HBV = "RAINSNOW_HBV" - HARDER = "RAINSNOW_HARDER" - HSPF = "RAINSNOW_HSPF" - - value: Values = Values.DATA - - template = ":RainSnowFraction {value.value}" - - def to_rv(self): - return self.template.format(**asdict(self)) +class RainSnowFractionCommand(RavenOptionCommand): + DATA = "RAINSNOW_DATA" + DINGMAN = "RAINSNOW_DINGMAN" + UBC = "RAINSNOW_UBC" + HBV = "RAINSNOW_HBV" + HARDER = "RAINSNOW_HARDER" + HSPF = "RAINSNOW_HSPF" -RainSnowFraction = RainSnowFractionCommand.Values +RainSnowFraction = RainSnowFractionCommand From 9117beb7fd0a05fc4e4da095bf75baf4adee9c5b Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Mon, 26 Apr 2021 12:26:25 -0400 Subject: [PATCH 38/59] Simplify BLENDED emulator --- ravenpy/models/emulators/blended.py | 56 +++-------------------------- 1 file changed, 4 insertions(+), 52 deletions(-) diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 0367b52e..50920c88 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -65,10 +65,6 @@ class Params: @dataclass class DerivedParams: - TOPSOIL_mm: float = None - PHREATIC_mm: float = None - TOPSOIL_hlf: float = None - PHREATIC_hlf: float = None POW_X04: float = None POW_X11: float = None SUM_X09_X10: float = None @@ -314,43 +310,7 @@ def __init__(self, *args, **kwds): self.config.rvi.params = self.config.rvp.params - ######### - # R V C # - ######### - - rvc_tmpl = """ - # initialize to 1/2 full - # x(29)*1000/2 - :UniformInitialConditions SOIL[0] {TOPSOIL_hlf} - # x(30)*1000/2 - :UniformInitialConditions SOIL[1] {PHREATIC_hlf} - - :HRUStateVariableTable (formerly :InitialConditionsTable) - :Attributes SOIL[0] SOIL[1] - :Units mm mm - 1 {TOPSOIL_hlf} {PHREATIC_hlf} - # x(29)*1000/2 x(30)*1000/2 - :EndHRUStateVariableTable - """ - self.config.rvc.set_tmpl(rvc_tmpl) - - self.config.rvc.soil0 = None - self.config.rvc.soil1 = None - self.config.rvc.basin_states[1] = BasinIndexCommand() - def derived_parameters(self): - self.config.rvp.derived_params.TOPSOIL_hlf = ( - self.config.rvp.params.par_x29 * 0.5 * 1000.0 - ) - self.config.rvp.derived_params.PHREATIC_hlf = ( - self.config.rvp.params.par_x30 * 0.5 * 1000.0 - ) - self.config.rvp.derived_params.TOPSOIL_mm = ( - self.config.rvp.params.par_x29 * 1000.0 - ) - self.config.rvp.derived_params.PHREATIC_mm = ( - self.config.rvp.params.par_x30 * 1000.0 - ) self.config.rvp.derived_params.SUM_X09_X10 = ( self.config.rvp.params.par_x10 ) # + self.config.rvp.params.par_x09 @@ -365,18 +325,10 @@ def derived_parameters(self): # 10.0**self.config.rvp.params.par_x11 # self.config.rvp.derived_params.POW_X11 = self.config.rvp.params.par_x11 - self.config.rvc.TOPSOIL_hlf = self.config.rvp.derived_params.TOPSOIL_hlf - self.config.rvc.PHREATIC_hlf = self.config.rvp.derived_params.PHREATIC_hlf - - # Default initial conditions if none are given - # if not self.config.rvc.hru_states: - # soil0 = ( - # self.config.rvp.derived_params.TOPSOIL_hlf if self.config.rvc.soil0 is None else self.config.rvc.soil0 - # ) - # soil1 = ( - # self.config.rvp.derived_params.PHREATIC_hlf if self.config.rvc.soil1 is None else self.config.rvc.soil1 - # ) - # self.config.rvc.hru_states[1] = HRUState(soil0=soil0, soil1=soil1) + topsoil_hlf = self.config.rvp.params.par_x29 * 0.5 * 1000 + phreatic_hlf = self.config.rvp.params.par_x30 * 0.5 * 1000 + hru_state = HRUState(soil0=topsoil_hlf, soil1=phreatic_hlf) + self.config.rvc.set_hru_state(hru_state) self.config.rvt.rain_correction = self.config.rvp.params.par_x33 self.config.rvt.snow_correction = self.config.rvp.params.par_x34 From a7d7f113906a45f8e6cbbb59fde9f0a7aeb3987d Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Mon, 26 Apr 2021 18:36:36 -0400 Subject: [PATCH 39/59] Add base template with common commands to RVI --- ravenpy/config/rvs.py | 11 ++++++++++- ravenpy/models/emulators/blended.py | 7 ------- ravenpy/models/emulators/gr4jcn.py | 7 ------- ravenpy/models/emulators/hbvec.py | 13 ------------- ravenpy/models/emulators/hmets.py | 7 ------- ravenpy/models/emulators/mohyse.py | 7 ------- 6 files changed, 10 insertions(+), 42 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 0028fafa..01cd1f5a 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -196,6 +196,15 @@ def to_rv(self): class RVI(RV): + _base_tmpl = """ + :Calendar {calendar} + :RunName {run_name}-{run_index} + :StartDate {start_date} + :EndDate {end_date} + :TimeStep {time_step} + :Method ORDERED_SERIES + """ + tmpl = """ """ @@ -423,7 +432,7 @@ def to_rv(self): d = {attr: getattr(self, attr) for attr in a + p} - return dedent(self.tmpl).format(**d) + return dedent(self._base_tmpl + self.tmpl).format(**d) ########## diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 50920c88..216d3a9b 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -227,13 +227,6 @@ def __init__(self, *args, **kwds): ######### rvi_tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - :PotentialMeltMethod POTMELT_HMETS {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index ee0d99fe..f1a1a4f0 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -148,13 +148,6 @@ def __init__(self, *args, **kwds): ######### rvi_tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - :SoilModel SOIL_MULTILAYER 4 {routing} :CatchmentRoute ROUTE_DUMP diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index 23bcb811..8d222701 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -151,19 +151,6 @@ def __init__(self, *args, **kwds): ######### rvi_tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - - #------------------------------------------------------------------------ - # Model options - # - :Method ORDERED_SERIES - #:Interpolation INTERP_NEAREST_NEIGHBOR - :Routing ROUTE_NONE :CatchmentRoute TRIANGULAR_UH diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 90e009da..a182ff90 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -168,13 +168,6 @@ def __init__(self, *args, **kwds): ######### rvi_tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - :PotentialMeltMethod POTMELT_HMETS {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 9535b154..658ceafc 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -142,13 +142,6 @@ def __init__(self, *args, **kwds): ######### rvi_tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES - :SoilModel SOIL_TWO_LAYER :PotentialMeltMethod POTMELT_DEGREE_DAY :Routing ROUTE_NONE From ca693f43efc2f89501f0e84990151d0901c9b48c Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 27 Apr 2021 11:08:39 -0400 Subject: [PATCH 40/59] Fix black, once and for all --- .pre-commit-config.yaml | 2 +- ravenpy/models/emulators/mohyse.py | 2 +- tests/test_data_assimilation.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 848822b1..10cdc417 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: debug-statements language_version: python3 - repo: https://github.com/ambv/black - rev: 21.4b0 + rev: 21.4b1 hooks: - id: black language_version: python3 diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 658ceafc..c5e49e93 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -456,5 +456,5 @@ def __init__(self, *args, **kwds): self.config.ost.set_tmpl(ost_tmpl) def derived_parameters(self): - """ Derived parameters are computed by Ostrich. """ + """Derived parameters are computed by Ostrich.""" pass diff --git a/tests/test_data_assimilation.py b/tests/test_data_assimilation.py index 6e9d2b72..33a834b9 100644 --- a/tests/test_data_assimilation.py +++ b/tests/test_data_assimilation.py @@ -1,10 +1,10 @@ import datetime as dt +from dataclasses import replace import matplotlib.pyplot as plt import numpy as np import pytest import xarray as xr -from dataclasses import replace from ravenpy.config.commands import BasinIndexCommand, HRUState from ravenpy.config.rvs import RVC From 32f83fef0ac44877d071049a0613452882df2cab Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Tue, 27 Apr 2021 15:19:37 -0400 Subject: [PATCH 41/59] Factor out the ending part of the RVI --- ravenpy/config/rvs.py | 27 ++++++++++++++++++++++-- ravenpy/models/emulators/blended.py | 24 --------------------- ravenpy/models/emulators/gr4jcn.py | 23 -------------------- ravenpy/models/emulators/hbvec.py | 22 -------------------- ravenpy/models/emulators/hmets.py | 24 --------------------- ravenpy/models/emulators/mohyse.py | 22 -------------------- tests/test_routing_lievre_tutorial.py | 30 --------------------------- 7 files changed, 25 insertions(+), 147 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 01cd1f5a..aad3665d 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -196,7 +196,7 @@ def to_rv(self): class RVI(RV): - _base_tmpl = """ + _pre_tmpl = """ :Calendar {calendar} :RunName {run_name}-{run_index} :StartDate {start_date} @@ -208,6 +208,26 @@ class RVI(RV): tmpl = """ """ + # This part must be at the end of the file in particular because `:EvaluationMetrics` must + # come after `:SoilModel` + _post_tmpl = """ + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes + #:WriteForcingFunctions + :SilentMode + :PavicsMode + {suppress_output} + + :NetCDFAttribute title Simulated river discharge + :NetCDFAttribute history Created on {now} by Raven + :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). + :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} + :NetCDFAttribute model_id {identifier} + :NetCDFAttribute time_frequency day + :NetCDFAttribute time_coverage_start {start_date} + :NetCDFAttribute time_coverage_end {end_date} + """ + EVAPORATION_OPTIONS = ( "PET_CONSTANT", "PET_PENMAN_MONTEITH", @@ -419,6 +439,8 @@ def _dt2cf(self, date): def to_rv(self): + self.identifier = self._config.identifier + # Attributes a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) @@ -432,7 +454,8 @@ def to_rv(self): d = {attr: getattr(self, attr) for attr in a + p} - return dedent(self._base_tmpl + self.tmpl).format(**d) + t = dedent(self._pre_tmpl) + dedent(self.tmpl) + dedent(self._post_tmpl) + return t.format(**d) ########## diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 216d3a9b..105cd1ee 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -274,30 +274,6 @@ def __init__(self, *args, **kwds): :EndProcessGroup CALCULATE_WTS {params.par_r07} {params.par_r08} # para_r07 para_r08 :EndHydrologicProcesses - - #:CreateRVPTemplate - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hmets - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ self.config.rvi.set_tmpl(rvi_tmpl) diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index f1a1a4f0..be3cedc6 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -186,29 +186,6 @@ def __init__(self, *args, **kwds): :Flush RAVEN_DEFAULT TEMP_STORE SURFACE_WATER # Qd :Baseflow BASE_GR4J ROUTING_STORE SURFACE_WATER # Qr :EndHydrologicProcesses - #------------------------------------------------------------------------ - - #--------------------------------------------------------- - # Output Options - # - :WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id gr4jcn - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ self.config.rvi.set_tmpl(rvi_tmpl) diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index 8d222701..0a2783da 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -202,28 +202,6 @@ def __init__(self, *args, **kwds): :Baseflow BASE_POWER_LAW FAST_RESERVOIR SURFACE_WATER :Baseflow BASE_LINEAR SLOW_RESERVOIR SURFACE_WATER :EndHydrologicProcesses - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hbvec - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ self.config.rvi.set_tmpl(rvi_tmpl) diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index a182ff90..6018d10b 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -191,30 +191,6 @@ def __init__(self, *args, **kwds): :Convolve CONVOL_GAMMA_2 DELAYED_RUNOFF SURFACE_WATER #'delayed runoff' :Baseflow BASE_LINEAR SOIL[1] SURFACE_WATER :EndHydrologicProcesses - - #:CreateRVPTemplate - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id hmets - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ self.config.rvi.set_tmpl(rvi_tmpl) diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index c5e49e93..8fc21d78 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -172,28 +172,6 @@ def __init__(self, *args, **kwds): # :Alias MOHYSE_PARA_8 0.0132 # SoilParameterList --> BASEFLOW_COEFF (GWSOIL) # :Alias MOHYSE_PARA_9 1.0474 # :SubBasinProperties --> GAMMA_SHAPE # :Alias MOHYSE_PARA_10 7.9628 # :SubBasinProperties --> TIME_CONC = MOHYSE_PARA_10 / 0.3 = 26.542666666 - - #--------------------------------------------------------- - # Output Options - # - #:WriteForcingFunctions - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id mohyse - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ self.config.rvi.set_tmpl(rvi_tmpl) diff --git a/tests/test_routing_lievre_tutorial.py b/tests/test_routing_lievre_tutorial.py index 455e54f8..6671df33 100644 --- a/tests/test_routing_lievre_tutorial.py +++ b/tests/test_routing_lievre_tutorial.py @@ -57,13 +57,6 @@ def test_lievre_tutorial(self): ####### model.config.rvi.tmpl = """ - :Calendar {calendar} - :RunName {run_name}-{run_index} - :StartDate {start_date} - :EndDate {end_date} - :TimeStep {time_step} - :Method ORDERED_SERIES # Numerical method used for simulation - :CatchmentRoute ROUTE_DUMP # Catchment routing method, used to convey water from the catchment tributaries and rivulets to the subbasin outlets. DEFAULT ROUTE_DUMP, which instantly ‘dumps’ all water in the subbasin stream reach. :Routing ROUTE_DIFFUSIVE_WAVE # Channel routing method which is used to transport water from upstream to downstream within the main subbasin channels. DEFAULT ROUTE_DIFFUSIVE_WAVE, which analytically solves the diffusive wave equation along the reach using a constant reference celerity. :PrecipIceptFract PRECIP_ICEPT_NONE # Estimation of the precipitation interception fraction. In this routing model, stream input(s) are "pretending" to be precipitation going into Raven, thus using DEFAULT PRECIP_ICEPT_NONE to indicate no interception processes are adopted. @@ -74,29 +67,6 @@ def test_lievre_tutorial(self): :Precipitation PRECIP_RAVEN ATMOS_PRECIP PONDED_WATER # Moves stream input(s) from ATMOS_PRECIP to PONDED_WATER storage (waiting for runoff). Use DEFAULT PRECIP_RAVEN method. :Flush RAVEN_DEFAULT PONDED_WATER SURFACE_WATER # Moves water from PONDED_WATER to SURFACE_WATER (routed to outlet). Use DEFAULT RAVEN_DEFAULT method. :EndHydrologicProcesses - - - # Output Options - # - #:WriteForcingFunctions - # Defines the hydrograph performance metrics output by Raven. Either one or multiple is acceptable. - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes - #:NoisyMode - :SilentMode - :PavicsMode - {suppress_output} - - :NetCDFAttribute title Simulated river discharge - :NetCDFAttribute history Created on {now} by Raven - :NetCDFAttribute references Craig, J.R., and the Raven Development Team, Raven user's and developer's manual (Version 2.8), URL: http://raven.uwaterloo.ca/ (2018). - :NetCDFAttribute comment Raven Hydrological Framework version {raven_version} - - :NetCDFAttribute model_id routing - - :NetCDFAttribute time_frequency day - :NetCDFAttribute time_coverage_start {start_date} - :NetCDFAttribute time_coverage_end {end_date} """ streaminputs = xr.open_dataset(vic_streaminputs_nc_path) From fc8f531d660d3699d9ee18a44eefa1eacb219e48 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 28 Apr 2021 10:08:39 -0400 Subject: [PATCH 42/59] use urljoin to evade double-slashes, skip failing opendap test --- setup.py | 12 ++++++++---- tests/test_testdata.py | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 94fc6037..aab8748f 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ import urllib.request import zipfile from pathlib import Path +from urllib.parse import urljoin from setuptools import Distribution, find_packages, setup from setuptools.command.develop import develop @@ -117,10 +118,12 @@ def install_binary_dep( self, url, name, rev_name, binary_name, make_target="", src_folder=None ): print(f"Downloading {name} source code..") - print(f"{url}/{rev_name}.zip", self.external_deps_path / f"{name}.zip") + print( + f"{urljoin(url, rev_name)}.zip", self.external_deps_path / f"{name}.zip" + ) urllib.request.urlretrieve( - f"{url}/{rev_name}.zip", self.external_deps_path / f"{name}.zip" + f"{urljoin(url, rev_name)}.zip", self.external_deps_path / f"{name}.zip" ) print(f"Extracting {name} source code..") @@ -170,7 +173,7 @@ def run(self): self.external_deps_path = Path("./external_deps") self.external_deps_path.mkdir(exist_ok=True) - url = "http://www.civil.uwaterloo.ca/jmai/raven/" + url = "https://www.civil.uwaterloo.ca/jmai/raven/" self.install_binary_dep(url, "raven", "Raven-rev318", "Raven.exe") url = "https://github.com/usbr/ostrich/archive/refs/tags/" @@ -184,7 +187,8 @@ def run(self): ) # This works with python setup.py install, but produces this error with pip install: - # ERROR: ravenpy==0.1.0 did not indicate that it installed an .egg-info directory. Only setup.py projects generating .egg-info directories are supported. + # ERROR: ravenpy==0.1.0 did not indicate that it installed an .egg-info directory. + # Only setup.py projects generating .egg-info directories are supported. # super().do_egg_install() # This works with pip install, but has the problem that it ignores install_requires diff --git a/tests/test_testdata.py b/tests/test_testdata.py index 78527dd9..f6a2fdb8 100644 --- a/tests/test_testdata.py +++ b/tests/test_testdata.py @@ -1,5 +1,6 @@ from pathlib import Path +import pytest import xarray from ravenpy.utilities.testdata import ( @@ -58,6 +59,7 @@ def test_open_dataset_no_cache(self): ) assert isinstance(ds, xarray.Dataset) + @pytest.mark.xfail(reason="test.opendap.org is offline") def test_dap_access(self): ds = open_dataset( name="20070917-MODIS_A-JPL-L2P-A2007260000000.L2_LAC_GHRSST-v01.nc", From c6e5d85dab6bb238e5a8a3303140a1595fd3fe04 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 28 Apr 2021 10:37:26 -0400 Subject: [PATCH 43/59] Fix tox call --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2a8db0ae..3725c3fe 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,7 @@ commands = python -m pip install --no-user --verbose . --install-option="--with-binaries" # Clone the testing support data git clone https://github.com/Ouranosinc/raven-testdata {envtmpdir}/raven-testdata - env RAVENPY_TESTDATA_PATH={envtmpdir}/raven-testdata pytest --cov ravenpy + env RAVENPY_TESTDATA_PATH={envtmpdir}/raven-testdata pytest --cov tests - coveralls allowlist_externals = make From f33b93e156136b5319ef7fdd04b8ffe7c072f929 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 11:41:43 -0400 Subject: [PATCH 44/59] Refactor by getting rid of simple key-value pair commands --- ravenpy/config/commands.py | 154 +++----------------- ravenpy/config/rvs.py | 200 +++++++++++++------------- ravenpy/models/base.py | 3 +- ravenpy/models/emulators/blended.py | 16 +-- ravenpy/models/emulators/gr4jcn.py | 16 +-- ravenpy/models/emulators/hbvec.py | 2 +- ravenpy/models/emulators/hmets.py | 14 +- ravenpy/models/emulators/mohyse.py | 14 +- tests/test_ERA5.py | 1 - tests/test_NRCAN_daily.py | 1 - tests/test_emulators.py | 31 ++-- tests/test_routing_lievre_tutorial.py | 6 +- tests/test_rv.py | 48 ------- 13 files changed, 166 insertions(+), 340 deletions(-) diff --git a/ravenpy/config/commands.py b/ravenpy/config/commands.py index 195fd188..bbbf8ba2 100644 --- a/ravenpy/config/commands.py +++ b/ravenpy/config/commands.py @@ -27,21 +27,6 @@ def __str__(self): return self.to_rv() -class RavenOptionCommand(Enum): - """ - This alternate base class allows to create Raven commands that are based on - a simple set of Enum options. - """ - - def to_rv(self): - cmd = f":{self.__class__.__name__}" - cmd = cmd.replace("Command", "") - return f"{cmd} {self.value}" - - def __str__(self): - return self.to_rv() - - @dataclass class LinearTransform(RavenCommand): scale: Optional[float] = 1 @@ -55,23 +40,6 @@ def to_rv(self): return "" -@dataclass -class MonthlyAverageCommand(RavenCommand): - var_name: str = "" - data: Optional[Tuple[float, ...]] = () - - template = ":MonthlyAve{var_name} {data}" - - def to_rv(self): - if self.data: - d = asdict(self) - d["var_name"] = self.var_name.lower().capitalize() - d["data"] = " ".join(map(str, self.data)) - return self.template.format(**d) - else: - return "" - - @dataclass class SubBasinsCommand(RavenCommand): """SubBasins command (RVH).""" @@ -295,7 +263,7 @@ def asdict(self): d = asdict(self) d["dimensions"] = self.dimensions d["linear_transform"] = self.linear_transform - d["deaccumulate"] = DeaccumulateCommand(self.deaccumulate) + d["deaccumulate"] = ":Deaccumulate" if self.deaccumulate else "" d["time_shift"] = f":TimeShift {self.time_shift}" if self.time_shift else "" return d @@ -346,36 +314,32 @@ class GaugeCommand(RavenCommand): :Latitude {latitude} :Longitude {longitude} :Elevation {elevation} - {rain_correction_cmd} - {snow_correction_cmd} - {monthly_ave_evaporation_cmd} - {monthly_ave_temperature_cmd} + {rain_correction} + {snow_correction} + {monthly_ave_evaporation} + {monthly_ave_temperature} {data_list} :EndGauge """ - @property - def rain_correction_cmd(self): - return RainCorrectionCommand(self.rain_correction) - - @property - def snow_correction_cmd(self): - return SnowCorrectionCommand(self.snow_correction) - - @property - def monthly_ave_evaporation_cmd(self): - return MonthlyAverageCommand("evaporation", self.monthly_ave_evaporation) - - @property - def monthly_ave_temperature_cmd(self): - return MonthlyAverageCommand("temperature", self.monthly_ave_temperature) - def to_rv(self): d = asdict(self) - d["rain_correction_cmd"] = self.rain_correction_cmd - d["snow_correction_cmd"] = self.snow_correction_cmd - d["monthly_ave_evaporation_cmd"] = self.monthly_ave_evaporation_cmd - d["monthly_ave_temperature_cmd"] = self.monthly_ave_temperature_cmd + d["rain_correction"] = ( + f":RainCorrection {self.rain_correction}" if self.rain_correction else "" + ) + d["snow_correction"] = ( + f":SnowCorrection {self.snow_correction}" if self.snow_correction else "" + ) + if self.monthly_ave_evaporation: + evap_data = " ".join(map(str, self.monthly_ave_evaporation)) + d["monthly_ave_evaporation"] = f":MonthlyAveEvaporation {evap_data}" + else: + d["monthly_ave_evaporation"] = "" + if self.monthly_ave_temperature: + temp_data = " ".join(map(str, self.monthly_ave_temperature)) + d["monthly_ave_temperature"] = f":MonthlyAveTemperature {temp_data}" + else: + d["monthly_ave_temperature"] = "" d["data_list"] = "\n\n".join(map(str, self.data)) return dedent(self.template).format(**d) @@ -861,79 +825,3 @@ def to_rv(self): # For convenience LU = LandUseClassesCommand.Record - - -@dataclass -class RainCorrectionCommand(RavenCommand): - - value: Optional[Union[float, str]] = 1.0 - - template = ":RainCorrection {value}" - - def to_rv(self): - if self.value is None: - return "" - return self.template.format(**asdict(self)) - - -@dataclass -class SnowCorrectionCommand(RavenCommand): - - value: Optional[Union[float, str]] = 1.0 - - template = ":SnowCorrection {value}" - - def to_rv(self): - if self.value is None: - return "" - return self.template.format(**asdict(self)) - - -@dataclass -class RoutingCommand(RavenCommand): - """ROUTE_NONE, ROUTE_DIFFUSIVE_WAVE""" - - value: str = "ROUTE_NONE" - - template = ":Routing {value}" - - def to_rv(self): - if self.value is None: - return "" - return self.template.format(**asdict(self)) - - -@dataclass -class DeaccumulateCommand(RavenCommand): - - value: bool = False - - template = ":Deaccumulate" - - def to_rv(self): - return self.template if self.value else "" - - -@dataclass -class AvgAnnualRunoffCommand(RavenCommand): - - value: Optional[float] = 1.0 - - template = ":AvgAnnualRunoff {value}" - - def to_rv(self): - if self.value is None: - return "" - return self.template.format(**asdict(self)) - - -class RainSnowFractionCommand(RavenOptionCommand): - DATA = "RAINSNOW_DATA" - DINGMAN = "RAINSNOW_DINGMAN" - UBC = "RAINSNOW_UBC" - HBV = "RAINSNOW_HBV" - HARDER = "RAINSNOW_HARDER" - HSPF = "RAINSNOW_HSPF" - - -RainSnowFraction = RainSnowFractionCommand diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index aad3665d..0f97bfb3 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -2,6 +2,7 @@ import datetime as dt from abc import ABC, abstractmethod from dataclasses import is_dataclass, replace +from enum import Enum from pathlib import Path from textwrap import dedent from typing import Dict, Optional, Tuple @@ -12,7 +13,6 @@ import xarray as xr from ravenpy.config.commands import ( - AvgAnnualRunoffCommand, BasinIndexCommand, BasinStateVariablesCommand, ChannelProfileCommand, @@ -24,13 +24,7 @@ HRUState, HRUStateVariableTableCommand, LandUseClassesCommand, - MonthlyAverageCommand, ObservationDataCommand, - RainCorrectionCommand, - RainSnowFraction, - RainSnowFractionCommand, - RoutingCommand, - SnowCorrectionCommand, SoilClassesCommand, SoilProfilesCommand, StationForcingCommand, @@ -211,8 +205,8 @@ class RVI(RV): # This part must be at the end of the file in particular because `:EvaluationMetrics` must # come after `:SoilModel` _post_tmpl = """ - :EvaluationMetrics {evaluation_metrics} - :WriteNetcdfFormat yes + :EvaluationMetrics {evaluation_metrics} + :WriteNetcdfFormat yes #:WriteForcingFunctions :SilentMode :PavicsMode @@ -228,57 +222,81 @@ class RVI(RV): :NetCDFAttribute time_coverage_end {end_date} """ - EVAPORATION_OPTIONS = ( - "PET_CONSTANT", - "PET_PENMAN_MONTEITH", - "PET_PENMAN_COMBINATION", - "PET_PRIESTLEY_TAYLOR", - "PET_HARGREAVES", - "PET_HARGREAVES_1985", - "PET_FROMMONTHLY", - "PET_DATA", - "PET_HAMON_1961", - "PET_TURC_1961", - "PET_MAKKINK_1957", - "PET_MONTHLY_FACTOR", - "PET_MOHYSE", - "PET_OUDIN", - ) - - CALENDAR_OPTIONS = ( - "PROLEPTIC_GREGORIAN", - "JULIAN", - "GREGORIAN", - "STANDARD", - "NOLEAP", - "365_DAY", - "ALL_LEAP", - "366_DAY", - ) + class EvaporationOptions(Enum): + PET_CONSTANT = "PET_CONSTANT" + PET_PENMAN_MONTEITH = "PET_PENMAN_MONTEITH" + PET_PENMAN_COMBINATION = "PET_PENMAN_COMBINATION" + PET_PRIESTLEY_TAYLOR = "PET_PRIESTLEY_TAYLOR" + PET_HARGREAVES = "PET_HARGREAVES" + PET_HARGREAVES_1985 = "PET_HARGREAVES_1985" + PET_FROMMONTHLY = "PET_FROMMONTHLY" + PET_DATA = "PET_DATA" + PET_HAMON_1961 = "PET_HAMON_1961" + PET_TURC_1961 = "PET_TURC_1961" + PET_MAKKINK_1957 = "PET_MAKKINK_1957" + PET_MONTHLY_FACTOR = "PET_MONTHLY_FACTOR" + PET_MOHYSE = "PET_MOHYSE" + PET_OUDIN = "PET_OUDIN" + + class CalendarOptions(Enum): + PROLEPTIC_GREGORIAN = "PROLEPTIC_GREGORIAN" + JULIAN = "JULIAN" + GREGORIAN = "GREGORIAN" + STANDARD = "STANDARD" + NOLEAP = "NOLEAP" + _365_DAY = "365_DAY" + ALL_LEAP = "ALL_LEAP" + _366_DAY = "366_DAY" + + class EvaluationMetrics(Enum): + NASH_SUTCLIFFE = "NASH_SUTCLIFFE" + LOG_NASH = "LOG_NASH" + RMSE = "RMSE" + PCT_BIAS = "PCT_BIAS" + ABSERR = "ABSERR" + ABSMAX = "ABSMAX" + PDIFF = "PDIFF" + TMVOL = "TMVOL" + RCOEFF = "RCOEFF" + NSC = "NSC" + KLING_GUPTA = "KLING_GUPTA" + + class RainSnowFractionOptions(Enum): + DATA = "RAINSNOW_DATA" + DINGMAN = "RAINSNOW_DINGMAN" + UBC = "RAINSNOW_UBC" + HBV = "RAINSNOW_HBV" + HARDER = "RAINSNOW_HARDER" + HSPF = "RAINSNOW_HSPF" + + class RoutingOptions(Enum): + DIFFUSIVE_WAVE = "ROUTE_DIFFUSIVE_WAVE" + HYDROLOGIC = "ROUTE_HYDROLOGIC" + NONE = "ROUTE_NONE" + STORAGE_COEFF = "ROUTE_STORAGE_COEFF" + PLUG_FLOW = "ROUTE_PLUG_FLOW" + MUSKINGUM = "MUSKINGUM" def __init__(self, config): super().__init__(config) - self.name = None - self.area = None - self.elevation = None - self.latitude = None - self.longitude = None self.run_name = "run" self.run_index = 0 self.raven_version = "3.0.1 rev#275" self.time_step = 1.0 - self._routing = "ROUTE_NONE" + self._calendar = RVI.CalendarOptions.STANDARD + self._routing = RVI.RoutingOptions.NONE self._start_date = None self._end_date = None - self._now = None - self._rain_snow_fraction = RainSnowFraction.DATA + self._rain_snow_fraction = RVI.RainSnowFractionOptions.DATA self._evaporation = None self._ow_evaporation = None self._duration = 1 - self._evaluation_metrics = "NASH_SUTCLIFFE RMSE" + self._evaluation_metrics = [ + RVI.EvaluationMetrics.NASH_SUTCLIFFE, + RVI.EvaluationMetrics.RMSE, + ] self._suppress_output = False - self._calendar = "standard" @property def start_date(self): @@ -330,30 +348,19 @@ def duration(self, x): @property def evaluation_metrics(self): - return self._evaluation_metrics + if self._evaluation_metrics: + return ",".join(m.value for m in self._evaluation_metrics) + return None @evaluation_metrics.setter - def evaluation_metrics(self, x): - if not isinstance(x, str): - raise ValueError("Evaluation metrics must be string.") - - for metric in x.split(): - if metric not in { - "NASH_SUTCLIFFE", - "LOG_NASH", - "RMSE", - "PCT_BIAS", - "ABSERR", - "ABSMAX", - "PDIFF", - "TMVOL", - "RCOEFF", - "NSC", - "KLING_GUPTA", - }: - raise ValueError("{} is not a metric recognized by Raven.") - - self._evaluation_metrics = x + def evaluation_metrics(self, values): + if not isinstance(values, (list, set, tuple)): + values = [values] + ms = [] + for v in values: + v = v.upper() if isinstance(v, str) else v.value + ms.append(RVI.EvaluationMetrics(v)) + self._evaluation_metrics = ms def _update_duration(self): if self.end_date is not None and self.start_date is not None: @@ -363,10 +370,6 @@ def _update_end_date(self): if self.start_date is not None and self.duration is not None: self._end_date = self.start_date + dt.timedelta(days=self.duration) - @property - def now(self): - return dt.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - @property def suppress_output(self): tag = ":SuppressOutput\n:DontWriteWatershedStorage" @@ -380,71 +383,63 @@ def suppress_output(self, value): @property def routing(self): - return RoutingCommand(value=self._routing) + return self._routing.value @routing.setter def routing(self, value): - self._routing = value + v = value.upper() if isinstance(value, str) else value.value + self._routing = RVI.RoutingOptions(v) @property def rain_snow_fraction(self): """Rain snow partitioning.""" - return RainSnowFractionCommand(self._rain_snow_fraction) + return self._rain_snow_fraction.value @rain_snow_fraction.setter - def rain_snow_fraction(self, value: RainSnowFraction): - self._rain_snow_fraction = value + def rain_snow_fraction(self, value): + v = value.upper() if isinstance(value, str) else value.value + self._rain_snow_fraction = RVI.RainSnowFractionOptions(v) @property def evaporation(self): """Evaporation scheme""" - return self._evaporation + return self._evaporation.value if self._evaporation else None @evaporation.setter def evaporation(self, value): - v = value.upper() - if v in RVI.EVAPORATION_OPTIONS: - self._evaporation = v - else: - raise ValueError(f"Value {v} should be one of {RVI.EVAPORATION_OPTIONS}.") + v = value.upper() if isinstance(value, str) else value.value + self._evaporation = RVI.EvaporationOptions(v) @property def ow_evaporation(self): """Open-water evaporation scheme""" - return self._ow_evaporation + return self._ow_evaporation.value if self._ow_evaporation else None @ow_evaporation.setter def ow_evaporation(self, value): - v = value.upper() - if v in RVI.EVAPORATION_OPTIONS: - self._ow_evaporation = v - else: - raise ValueError(f"Value {v} should be one of {RVI.EVAPORATION_OPTIONS}.") + v = value.upper() if isinstance(value, str) else value.value + self._ow_evaporation = RVI.EvaporationOptions(v) @property def calendar(self): """Calendar""" - return self._calendar.upper() + return self._calendar.value @calendar.setter def calendar(self, value): - if value.upper() in RVI.CALENDAR_OPTIONS: - self._calendar = value - else: - raise ValueError(f"Value should be one of {RVI.CALENDAR_OPTIONS}.") + v = value.upper() if isinstance(value, str) else value.value + self._calendar = RVI.CalendarOptions(v) def _dt2cf(self, date): """Convert datetime to cftime datetime.""" - return cftime._cftime.DATE_TYPES[self._calendar.lower()](*date.timetuple()[:6]) + return cftime._cftime.DATE_TYPES[self.calendar.lower()](*date.timetuple()[:6]) def to_rv(self): - self.identifier = self._config.identifier - - # Attributes + # Attributes (not starting with "_") a = list(filter(lambda x: not x.startswith("_"), self.__dict__)) - # Properties + # Properties (computing values corresponding to attributes starting with "_') p = list( filter( lambda x: isinstance(getattr(self.__class__, x, None), property), @@ -454,6 +449,9 @@ def to_rv(self): d = {attr: getattr(self, attr) for attr in a + p} + d["identifier"] = self._config.identifier + d["now"] = dt.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + t = dedent(self._pre_tmpl) + dedent(self.tmpl) + dedent(self._post_tmpl) return t.format(**d) @@ -491,7 +489,9 @@ def to_rv(self): "vegetation_classes": VegetationClassesCommand(self.vegetation_classes), "land_use_classes": LandUseClassesCommand(self.land_use_classes), "channel_profiles": "\n\n".join(map(str, self.channel_profiles)), - "avg_annual_runoff": AvgAnnualRunoffCommand(self.avg_annual_runoff), + "avg_annual_runoff": f":AvgAnnualRunoff {self.avg_annual_runoff}" + if self.avg_annual_runoff + else "", } return dedent(self.tmpl).format(**d) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index ef4f4184..08e79852 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -576,7 +576,8 @@ def start_end_date(fns): def get_calendar(fns): """Return the calendar.""" ds = xr.open_mfdataset(fns, combine="by_coords") - return ds.time.encoding.get("calendar", "standard") + cal = ds.time.encoding.get("calendar", "standard") + return RVI.CalendarOptions(cal.upper()) def set_calendar(self, ts): """Set the calendar in the RVI configuration.""" diff --git a/ravenpy/models/emulators/blended.py b/ravenpy/models/emulators/blended.py index 105cd1ee..1b48484e 100644 --- a/ravenpy/models/emulators/blended.py +++ b/ravenpy/models/emulators/blended.py @@ -3,14 +3,8 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import ( - HRU, - LU, - BasinIndexCommand, - HRUState, - RainSnowFraction, - Sub, -) +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.rvs import RVI from ravenpy.models.base import Ostrich, Raven from .gr4jcn import GR4JCN @@ -100,7 +94,7 @@ def __init__(self, *args, **kwds): LU("FOREST", impermeable_frac=0.0, forest_coverage=0.02345), ), evaporation="PET_OUDIN", - rain_snow_fraction=RainSnowFraction.HBV, + rain_snow_fraction=RVI.RainSnowFractionOptions.HBV, ) ######### @@ -228,7 +222,7 @@ def __init__(self, *args, **kwds): rvi_tmpl = """ :PotentialMeltMethod POTMELT_HMETS - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE @@ -352,7 +346,7 @@ def __init__(self, *args, **kwds): :Method ORDERED_SERIES :PotentialMeltMethod POTMELT_HMETS - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE diff --git a/ravenpy/models/emulators/gr4jcn.py b/ravenpy/models/emulators/gr4jcn.py index be3cedc6..a425df8d 100644 --- a/ravenpy/models/emulators/gr4jcn.py +++ b/ravenpy/models/emulators/gr4jcn.py @@ -3,14 +3,8 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import ( - HRU, - LU, - BasinIndexCommand, - HRUState, - RainSnowFraction, - Sub, -) +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.rvs import RVI from ravenpy.models.base import Ostrich, Raven @@ -149,10 +143,10 @@ def __init__(self, *args, **kwds): rvi_tmpl = """ :SoilModel SOIL_MULTILAYER 4 - {routing} + :Routing {routing} :CatchmentRoute ROUTE_DUMP :Evaporation {evaporation} # PET_OUDIN - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :PotentialMeltMethod POTMELT_DEGREE_DAY :OroTempCorrect OROCORR_SIMPLELAPSE @@ -189,7 +183,7 @@ def __init__(self, *args, **kwds): """ self.config.rvi.set_tmpl(rvi_tmpl) - self.config.rvi.rain_snow_fraction = RainSnowFraction.DINGMAN + self.config.rvi.rain_snow_fraction = RVI.RainSnowFractionOptions.DINGMAN self.config.rvi.evaporation = "PET_OUDIN" ######### diff --git a/ravenpy/models/emulators/hbvec.py b/ravenpy/models/emulators/hbvec.py index 0a2783da..795d0617 100644 --- a/ravenpy/models/emulators/hbvec.py +++ b/ravenpy/models/emulators/hbvec.py @@ -160,7 +160,7 @@ def __init__(self, *args, **kwds): :SWCloudCorrect SW_CLOUD_CORR_NONE :SWCanopyCorrect SW_CANOPY_CORR_NONE :LWRadiationMethod LW_RAD_DEFAULT - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :PotentialMeltMethod POTMELT_HBV :OroTempCorrect OROCORR_HBV :OroPrecipCorrect OROCORR_HBV diff --git a/ravenpy/models/emulators/hmets.py b/ravenpy/models/emulators/hmets.py index 6018d10b..4d66e480 100644 --- a/ravenpy/models/emulators/hmets.py +++ b/ravenpy/models/emulators/hmets.py @@ -2,14 +2,8 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import ( - HRU, - LU, - BasinIndexCommand, - HRUState, - RainSnowFraction, - Sub, -) +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.rvs import RVI from ravenpy.models.base import Ostrich, Raven @@ -169,7 +163,7 @@ def __init__(self, *args, **kwds): rvi_tmpl = """ :PotentialMeltMethod POTMELT_HMETS - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :Evaporation {evaporation} # PET_OUDIN :CatchmentRoute ROUTE_DUMP :Routing ROUTE_NONE @@ -195,7 +189,7 @@ def __init__(self, *args, **kwds): self.config.rvi.set_tmpl(rvi_tmpl) self.config.rvi.evaporation = "PET_OUDIN" - self.config.rvi.rain_snow_fraction = RainSnowFraction.DATA + self.config.rvi.rain_snow_fraction = RVI.RainSnowFractionOptions.DATA ######### # R V C # diff --git a/ravenpy/models/emulators/mohyse.py b/ravenpy/models/emulators/mohyse.py index 8fc21d78..dbaabd12 100644 --- a/ravenpy/models/emulators/mohyse.py +++ b/ravenpy/models/emulators/mohyse.py @@ -3,14 +3,8 @@ from pydantic.dataclasses import dataclass -from ravenpy.config.commands import ( - HRU, - LU, - BasinIndexCommand, - HRUState, - RainSnowFraction, - Sub, -) +from ravenpy.config.commands import HRU, LU, BasinIndexCommand, HRUState, Sub +from ravenpy.config.rvs import RVI from ravenpy.models.base import Ostrich, Raven from .gr4jcn import GR4JCN @@ -148,7 +142,7 @@ def __init__(self, *args, **kwds): :CatchmentRoute ROUTE_GAMMA_CONVOLUTION :Evaporation {evaporation} # PET_MOHYSE :DirectEvaporation - {rain_snow_fraction} + :RainSnowFraction {rain_snow_fraction} :HydrologicProcesses :SoilEvaporation SOILEVAP_LINEAR SOIL[0] ATMOSPHERE @@ -197,7 +191,7 @@ def __init__(self, *args, **kwds): # R V I # ######### - self.config.rvi.rain_snow_fraction = RainSnowFraction.DATA + self.config.rvi.rain_snow_fraction = RVI.RainSnowFractionOptions.DATA self.config.rvi.evaporation = "PET_MOHYSE" ######### diff --git a/tests/test_ERA5.py b/tests/test_ERA5.py index 5ac7e8d2..4e9d3f74 100644 --- a/tests/test_ERA5.py +++ b/tests/test_ERA5.py @@ -40,7 +40,6 @@ def test_simple(self): params=params, start_date=dt.datetime(2018, 1, 1), end_date=dt.datetime(2018, 1, 3), - name="Salmon", run_name="test-hmets-era5", area=4250.6, elevation=843.0, diff --git a/tests/test_NRCAN_daily.py b/tests/test_NRCAN_daily.py index 1e5f833e..8d2d862f 100644 --- a/tests/test_NRCAN_daily.py +++ b/tests/test_NRCAN_daily.py @@ -41,7 +41,6 @@ def test_simple(self): params=params, start_date=start_date, end_date=end_date, - name="Salmon", run_name="test-hmets-NRCAN", area=4250.6, elevation=843.0, diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 8ece2e31..5b0db07b 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -22,6 +22,7 @@ Sub, VegetationClassesCommand, ) +from ravenpy.config.rvs import RVI from ravenpy.models import ( GR4JCN, GR4JCN_OST, @@ -164,7 +165,8 @@ def test_simple(self): # ------------ # Check parser # ------------ - assert model.config.rvi.calendar == "GREGORIAN" + + assert model.config.rvi.calendar == RVI.CalendarOptions.GREGORIAN.value # ------------ # Check saved HRU states saved in RVC @@ -396,14 +398,24 @@ def _test_rvobjs(self): def test_config_update(self): model = GR4JCN() - # This is a regular member - model.config.update("area", 123) - assert model.config.rvi.area == 123 - - # This is a property + # This is a regular attribute member model.config.update("run_name", "test") assert model.config.rvi.run_name == "test" + # This is a computed property + model.config.update("evaporation", "PET_FROMMONTHLY") + assert model.config.rvi.evaporation == "PET_FROMMONTHLY" + + # Existing property but wrong value (the enum cast should throw an error) + with pytest.raises(ValueError): + model.config.update("routing", "WRONG") + + # Non-existing attribute + with pytest.raises(AttributeError): + model.config.update("why", "not?") + + # Params + model.config.update( "params", np.array([0.529, -3.396, 407.29, 1.072, 16.9, 0.947]) ) @@ -415,9 +427,6 @@ def test_config_update(self): model.config.update("params", (0.529, -3.396, 407.29, 1.072, 16.9, 0.947)) assert model.config.rvp.params.GR4J_X1 == 0.529 - with pytest.raises(AttributeError): - model.config.update("why", "not?") - def test_run(self): model = GR4JCN() @@ -694,14 +703,13 @@ def test_parallel_basins(self, input2d): assert len(z.filelist) == 10 @pytest.mark.online - def _test_dap(self): + def test_dap(self): """Test Raven with DAP link instead of local netCDF file.""" model = GR4JCN() config = dict( start_date=dt.datetime(2000, 6, 1), end_date=dt.datetime(2000, 6, 10), run_name="test", - name="Salmon", hrus=(GR4JCN.LandHRU(**salmon_land_hru_1),), params=model.Params(0.529, -3.396, 407.29, 1.072, 16.9, 0.947), ) @@ -719,7 +727,6 @@ def test_canopex(self): ) model = GR4JCN() config = dict( - name="WHITEMOUTH RIVER NEAR WHITEMOUTH", start_date=dt.datetime(2010, 6, 1), end_date=dt.datetime(2010, 6, 10), nc_index=5600, diff --git a/tests/test_routing_lievre_tutorial.py b/tests/test_routing_lievre_tutorial.py index 6671df33..e79c6527 100644 --- a/tests/test_routing_lievre_tutorial.py +++ b/tests/test_routing_lievre_tutorial.py @@ -80,7 +80,11 @@ def test_lievre_tutorial(self): # Raven will use 24h even though the NC inputs are 6h model.config.rvi.time_step = "24:00:00" - model.config.rvi.evaluation_metrics = "NASH_SUTCLIFFE PCT_BIAS KLING_GUPTA" + model.config.rvi.evaluation_metrics = [ + "NASH_SUTCLIFFE", + "PCT_BIAS", + "KLING_GUPTA", + ] ####### # RVH # diff --git a/tests/test_rv.py b/tests/test_rv.py index 1b4ec2b9..501a0ae1 100644 --- a/tests/test_rv.py +++ b/tests/test_rv.py @@ -8,12 +8,8 @@ import ravenpy from ravenpy.config.commands import ( BasinStateVariablesCommand, - DeaccumulateCommand, GriddedForcingCommand, HRUStateVariableTableCommand, - MonthlyAverageCommand, - RainCorrectionCommand, - SnowCorrectionCommand, ) from ravenpy.config.rvs import OST, RVC, RVH, RVI, RVP, RVT from ravenpy.extractors import ( @@ -161,47 +157,3 @@ def test_import_process(self): assert ":NumberGridCells 100" in res # FIXME: This test is not superb. assert len(res.split("\n")) == 226 - - -class TestCommands: - def test_rain_correction(self): - rc = RainCorrectionCommand(3) - assert f"{rc}" == ":RainCorrection 3.0" - - rc = RainCorrectionCommand("3") - assert f"{rc}" == ":RainCorrection 3.0" - - rc = RainCorrectionCommand(3.1) - assert f"{rc}" == ":RainCorrection 3.1" - - rc = RainCorrectionCommand() - assert f"{rc}" == ":RainCorrection 1.0" - - rc = RainCorrectionCommand(None) - assert f"{rc}" == "" - - def test_snow_correction(self): - sc = SnowCorrectionCommand(3) - assert f"{sc}" == ":SnowCorrection 3.0" - - sc = SnowCorrectionCommand("3") - assert f"{sc}" == ":SnowCorrection 3.0" - - sc = SnowCorrectionCommand(3.1) - assert f"{sc}" == ":SnowCorrection 3.1" - - sc = SnowCorrectionCommand() - assert f"{sc}" == ":SnowCorrection 1.0" - - sc = SnowCorrectionCommand(None) - assert f"{sc}" == "" - - def test_deaccumulate(self): - dc = DeaccumulateCommand() - assert f"{dc}" == "" - - dc = DeaccumulateCommand(False) - assert f"{dc}" == "" - - dc = DeaccumulateCommand(True) - assert f"{dc}" == ":Deaccumulate" From 27bb2a538f29f26e65fcb65458f98c9e43d6a4ad Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 12:20:42 -0400 Subject: [PATCH 45/59] Add comment to justify the emptiness of the RVP template --- ravenpy/config/rvs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 0f97bfb3..80e62b2a 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -463,6 +463,7 @@ def to_rv(self): class RVP(RV): + # This is expected to be defined by the emulators. tmpl = """ """ From fc434b2592295a6c4ec5303a6de99fa6703492e7 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 16:55:36 -0400 Subject: [PATCH 46/59] Refactor RVT.NC_VARS --- ravenpy/config/rvs.py | 53 ++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 80e62b2a..1fd00af9 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -512,22 +512,23 @@ class RVT(RV): {observed_data} """ + # Keys are standard names NC_VARS = { - "tasmin": {"name": "TEMP_MIN", "alts": ["tasmin", "tmin"]}, - "tasmax": {"name": "TEMP_MAX", "alts": ["tasmax", "tmax"]}, - "tas": {"name": "TEMP_AVE", "alts": ["tas", "t2m"]}, - "rainfall": {"name": "RAINFALL", "alts": ["rainfall", "rain"]}, + "tasmin": {"raven": "TEMP_MIN", "alts": ["tmin"]}, + "tasmax": {"raven": "TEMP_MAX", "alts": ["tmax"]}, + "tas": {"raven": "TEMP_AVE", "alts": ["t2m"]}, + "rainfall": {"raven": "RAINFALL", "alts": ["rain"]}, "pr": { - "name": "PRECIP", - "alts": ["pr", "precip", "prec", "precipitation", "tp"], + "raven": "PRECIP", + "alts": ["precip", "prec", "precipitation", "tp"], }, "prsn": { - "name": "SNOWFALL", - "alts": ["prsn", "snow", "snowfall", "solid_precip"], + "raven": "SNOWFALL", + "alts": ["snow", "snowfall", "solid_precip"], }, - "evspsbl": {"name": "PET", "alts": ["pet", "evap", "evapotranspiration"]}, + "evspsbl": {"raven": "PET", "alts": ["pet", "evap", "evapotranspiration"]}, "water_volume_transport_in_river_channel": { - "name": "HYDROGRAPH", + "raven": "HYDROGRAPH", "alts": [ "qobs", "discharge", @@ -555,35 +556,35 @@ def __init__(self, config): self._number_grid_cells = 0 def add_nc_variable(self, **kwargs): - var_name = kwargs.get("name", kwargs["var_name_nc"]) + std_name = kwargs.get("name", kwargs["var_name_nc"]) is_obs_var = kwargs.pop("is_observation", False) if len(kwargs["dim_names_nc"]) == 1: - if var_name == "water_volume_transport_in_river_channel" or is_obs_var: + if std_name == "water_volume_transport_in_river_channel" or is_obs_var: cmd = ObservationDataCommand(**kwargs) else: cmd = DataCommand(**kwargs) elif len(kwargs["dim_names_nc"]) == 2: - if var_name == "water_volume_transport_in_river_channel" or is_obs_var: + if std_name == "water_volume_transport_in_river_channel" or is_obs_var: cmd = ObservationDataCommand(**kwargs) else: cmd = StationForcingCommand(**kwargs) else: cmd = GriddedForcingCommand(**kwargs) - if isinstance(self._var_cmds.get(var_name, None), dict): - self._var_cmds[var_name] = replace(cmd, **self._var_cmds[var_name]) + if isinstance(self._var_cmds.get(std_name, None), dict): + self._var_cmds[std_name] = replace(cmd, **self._var_cmds[std_name]) else: - self._var_cmds[var_name] = cmd + self._var_cmds[std_name] = cmd def configure_from_nc_data(self, fns): # Important note: if the object at key `k` is a dict (as opposed to a `Command`), # don't reset it because it contains initial user-defined config (for the future Command # object at that particular key) - for k in RVT.NC_VARS: - v = self._var_cmds[k] + for std_name in RVT.NC_VARS: + v = self._var_cmds[std_name] if not isinstance(v, dict): - self._var_cmds[k] = {} + self._var_cmds[std_name] = {} for fn in fns: with xr.open_dataset(fn) as ds: @@ -596,16 +597,16 @@ def configure_from_nc_data(self, fns): pass # Check if any alternate variable name is in the file. - for var_name in RVT.NC_VARS: - for alt_name in RVT.NC_VARS[var_name]["alts"]: - if alt_name not in ds.data_vars: + for std_name in RVT.NC_VARS: + for var_name in [std_name] + RVT.NC_VARS[std_name]["alts"]: + if var_name not in ds.data_vars: continue - nc_var = ds[alt_name] + nc_var = ds[var_name] self.add_nc_variable( - name=var_name, + name=std_name, file_name_nc=fn, - data_type=RVT.NC_VARS[var_name]["name"], - var_name_nc=alt_name, + data_type=RVT.NC_VARS[std_name]["raven"], + var_name_nc=var_name, dim_names_nc=nc_var.dims, units=nc_var.attrs.get("units"), ) From bf91d4a65e97e023838c4fb516f231801eed0b79 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 16:55:58 -0400 Subject: [PATCH 47/59] Rmove methods in base.Raven --- ravenpy/models/base.py | 45 ------------------------------------------ 1 file changed, 45 deletions(-) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 08e79852..f44ce801 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -678,51 +678,6 @@ def diagnostics(self): return diag if len(diag) > 1 else diag[0] - # @property - # def tags(self): - # """Return a list of tags within the templates.""" - # out = [] - # for rvf in self.rvfiles.values(): - # out.extend(rvf.tags) - - # return out - - @staticmethod - def split_ext(fn): - """Return the name and rv key of the configuration file.""" - if isinstance(fn, str): - fn = Path(fn) - - return fn.stem, fn.suffix[1:] - - def check_units(self): - """Check that the input file units match expectations.""" - # TODO: make compliant with the new RVT implementation - pass - # for var, nc in self.rvt.items(): - # if isinstance(nc, RavenNcData) and nc.var is not None: - # nc._check_units() - - def check_inputs(self): - """Check that necessary variables are defined.""" - has_file = {key for key, val in self.rvt.items() if val is not None} - vars = list(self.rvt.keys()) - - for var in vars: - if var not in has_file and var != "nc_index": - if var in ["tasmin", "tasmax"] and "tas" in has_file: - pass # This is OK - if var == "tas" and has_file.issuperset(["tasmin", "tasmax"]): - pass - elif var in ["prsn"]: - pass # Ok, can be guessed from temp ? - elif var in ["evspsbl"]: - pass # Ok, can be computed by Oudin ? - elif var in ["water_volume_transport_in_river_channel"]: - pass # Ok, not strictly necessary for simulations ? - else: - raise ValueError("{} not found in files.".format(var)) - class Ostrich(Raven): """Wrapper for OSTRICH calibration of RAVEN hydrological model. From b9e3f6fbc9c83e5a28cc73603565e3a7ae4ee216 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 16:56:12 -0400 Subject: [PATCH 48/59] Rmove unused tests --- tests/test_emulators.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/test_emulators.py b/tests/test_emulators.py index 5b0db07b..0ca657f7 100644 --- a/tests/test_emulators.py +++ b/tests/test_emulators.py @@ -384,17 +384,6 @@ def test_routing(self): d = model.diagnostics np.testing.assert_almost_equal(d["DIAG_NASH_SUTCLIFFE"], -0.0141168, 4) - def _test_tags(self): - model = GR4JCN(tempfile.mkdtemp()) - - tags = model.tags - assert "run_name" in tags - - def _test_rvobjs(self): - model = GR4JCN(tempfile.mkdtemp()) - a = model.rvobjs - assert a - def test_config_update(self): model = GR4JCN() From 448d945465e89edcdb5a1a04c50e2793be662100 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 16:59:42 -0400 Subject: [PATCH 49/59] Remove commented pydantic line in conf.py --- docs/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 387856b5..52e35841 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -70,7 +70,6 @@ "lxml", "owslib", "pandas", - # "pydantic", "pyproj", "rasterio", "rioxarray", From 32a347c378129750a88f586ea4e097397f8dda97 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 17:40:41 -0400 Subject: [PATCH 50/59] Add comments for RVI members --- ravenpy/config/rvs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index 1fd00af9..f7cfb0e3 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -279,11 +279,16 @@ class RoutingOptions(Enum): def __init__(self, config): super().__init__(config) + + # These are attributes that can be modified/set directly self.run_name = "run" self.run_index = 0 self.raven_version = "3.0.1 rev#275" self.time_step = 1.0 + # These correspond to properties whose setters will pass their value through + # an Enum cast (triggering a ValueError at runtime for unknown values) and + # getters will be used when rendering the template in the `to_rv` method self._calendar = RVI.CalendarOptions.STANDARD self._routing = RVI.RoutingOptions.NONE self._start_date = None From 059ec7c458279e6ccbb3d341e525bc4cc751dd45 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Wed, 28 Apr 2021 17:46:33 -0400 Subject: [PATCH 51/59] Set raven version in RVI --- ravenpy/config/rvs.py | 2 +- ravenpy/models/base.py | 3 +-- tests/test_base.py | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ravenpy/config/rvs.py b/ravenpy/config/rvs.py index f7cfb0e3..7dddfac0 100644 --- a/ravenpy/config/rvs.py +++ b/ravenpy/config/rvs.py @@ -283,7 +283,7 @@ def __init__(self, config): # These are attributes that can be modified/set directly self.run_name = "run" self.run_index = 0 - self.raven_version = "3.0.1 rev#275" + self.raven_version = "3.X.X" self.time_step = 1.0 # These correspond to properties whose setters will pass their value through diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index f44ce801..f3304c78 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -114,8 +114,7 @@ def __init__(self, workdir: Union[str, Path] = None): # , identifier: str = Non self._psim = 0 self._pdim = None # Parallel dimension (either initparam, params or region) - # or self.__class__.__name__.lower()) - self.config = Config() + self.config = Config(raven_version=self.version) @property def output_path(self): diff --git a/tests/test_base.py b/tests/test_base.py index b695731a..e4b0e623 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -50,6 +50,11 @@ def test_raven_error(self): assert "Unrecognized command in .rvh file" in str(exc.value) + def test_raven_version(self): + model = Raven() + + assert model.config.rvi.raven_version == model.version + def test_gr4j(self): rvs = get_local_testdata("raven-gr4j-cemaneige/raven-gr4j-salmon.rv?") ts = get_local_testdata( From 08b21ee0f9bb53d93a0bbf85753a8aac497b316e Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 29 Apr 2021 10:53:59 -0400 Subject: [PATCH 52/59] Fix a bug causing a warning with same file in zip --- ravenpy/models/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index f3304c78..8c4c0045 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -101,7 +101,7 @@ def __init__(self, workdir: Union[str, Path] = None): # , identifier: str = Non # self._name = None self._defaults = {} - self._rv_paths = [] + self._rv_paths = set() # Directory logic # Top directory inside workdir. This is where Ostrich and its config and templates are stored. @@ -210,7 +210,7 @@ def _dump_rv(self): else: fn = self.model_path / f"{identifier}.{rvx}" with open(fn, "w") as f: - self._rv_paths.append(fn) + self._rv_paths.add(fn) content = rvo.content or rvo.to_rv() assert content.strip(), f"{rvx} has no content!" f.write(content) @@ -501,7 +501,6 @@ def _merge_output(self, files, name): # Try to create a zip file with zipfile.ZipFile(outfn, "w") as f: for fn in files: - len(fn.parts) f.write(fn, arcname=fn.relative_to(Path(*fn.parts[:i]))) return outfn @@ -760,14 +759,14 @@ def _dump_rv(self): # ostIn.txt fn = self.exec_path / "ostIn.txt" with open(fn, "w") as f: - self._rv_paths.append(fn) + self._rv_paths.add(fn) f.write(self.config.ost.content or self.config.ost.to_rv()) # OstRandomNumbers.txt if self.config.ost.random_numbers_path: fn = self.exec_path / "OstRandomNumbers.txt" with open(fn, "w") as f: - self._rv_paths.append(fn) + self._rv_paths.add(fn) f.write(self.config.ost.random_numbers_path.read_text()) def parse_results(self): From f3efa552ab388858f253e967fab5a51500bce5a3 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Thu, 29 Apr 2021 10:59:56 -0400 Subject: [PATCH 53/59] Fix forecasting notebook --- .../climatological_ESP_forecasting.ipynb | 113 +++++------------- 1 file changed, 30 insertions(+), 83 deletions(-) diff --git a/docs/notebooks/climatological_ESP_forecasting.ipynb b/docs/notebooks/climatological_ESP_forecasting.ipynb index cb5a3a6a..8d400d13 100644 --- a/docs/notebooks/climatological_ESP_forecasting.ipynb +++ b/docs/notebooks/climatological_ESP_forecasting.ipynb @@ -19,24 +19,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvp'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvh'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvt'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvc'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvi'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n" - ] - } - ], + "outputs": [], "source": [ "# Define some of the catchment properties. Could also be replaced by a call to the properties WPS.\n", "import datetime as dt\n", @@ -48,7 +31,7 @@ "hru = GR4JCN.LandHRU(area=4523.5, longitude=-72.55, latitude=48.39, elevation=300.0)\n", "\n", "# Choose a hydrological model to use. We have 'HMETS', 'GR4JCN','MOHYSE', 'HBVEC' and 'BLENDED'.\n", - "hydromodel = 'GR4JCN'\n", + "hydromodel = \"GR4JCN\"\n", "\n", "# Since we've used GR4JCN, we need to provide that model's parameters.\n", "model_parameters = (0.529, -3.396, 407.29, 1.072, 16.9, 0.947)\n", @@ -63,13 +46,14 @@ "duration = 30 # Length in days of the climatological ESP forecast\n", "\n", "# Launch the climatology ESP on the remote server\n", - "qsims = forecasting.perform_climatology_esp(model_name=\"GR4JCN\",\n", - " forecast_date=dt.datetime(2005, 9, 13), \n", - " forecast_duration=30,\n", - " params=model_parameters,\n", - " hrus=[hru,],\n", - " ts=ts,\n", - " name=\"Salmon_ESP\")" + "qsims = forecasting.perform_climatology_esp(\n", + " model_name=\"GR4JCN\",\n", + " forecast_date=dt.datetime(2005, 9, 13),\n", + " forecast_duration=30,\n", + " params=model_parameters,\n", + " hrus=[hru],\n", + " ts=ts,\n", + ")" ] }, { @@ -472,7 +456,7 @@ "
<xarray.DataArray ()>\n",
        "array(5.90491053)\n",
        "Coordinates:\n",
-       "    basin_name  object 'sub_001'
" + " basin_name object 'sub_001'" ], "text/plain": [ "\n", @@ -510,44 +494,17 @@ "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvp'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvh'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvt'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvc'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvi'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvp'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvh'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvt'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvc'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", - "/home/david/.conda/envs/ravenpy/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvi'\n", - " return self._open_to_write(zinfo, force_zip64=force_zip64)\n" - ] - } - ], + "outputs": [], "source": [ "hindcasts, qobs = forecasting.make_ESP_hindcast_dataset(\n", - " model_name=hydromodel,\n", - " forecast_date=dt.datetime(1955, 6, 30),\n", - " included_years=list(range(1957, 1959)),\n", - " forecast_duration=3,\n", - " ts=ts,\n", - " hrus=(hru, ),\n", - " params=model_parameters,\n", - " )" + " model_name=hydromodel,\n", + " forecast_date=dt.datetime(1955, 6, 30),\n", + " included_years=list(range(1957, 1959)),\n", + " forecast_duration=3,\n", + " ts=ts,\n", + " hrus=(hru,),\n", + " params=model_parameters,\n", + ")" ] }, { @@ -568,19 +525,19 @@ "name": "stdout", "output_type": "stream", "text": [ - "2021-04-14 16:42:35,176 - root - INFO - initialized | lead: 01 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-01 00:00:00-1958-07-01 00:00:00\n", - "2021-04-14 16:42:35,189 - root - INFO - initialized | lead: 02 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-02 00:00:00-1958-07-02 00:00:00\n", - "2021-04-14 16:42:35,199 - root - INFO - initialized | lead: 03 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-03 00:00:00-1958-07-03 00:00:00\n" + "2021-04-29 10:59:11,974 - root - INFO - initialized | lead: 01 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-01 00:00:00-1958-07-01 00:00:00\n", + "2021-04-29 10:59:11,980 - root - INFO - initialized | lead: 02 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-02 00:00:00-1958-07-02 00:00:00\n", + "2021-04-29 10:59:11,986 - root - INFO - initialized | lead: 03 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-03 00:00:00-1958-07-03 00:00:00\n" ] } ], "source": [ "verif = hindcast_object.verify(\n", - " metric=\"crps\",\n", - " comparison=\"m2o\",\n", - " dim=[\"member\", \"init\"],\n", - " alignment=\"same_inits\",\n", - " )" + " metric=\"crps\",\n", + " comparison=\"m2o\",\n", + " dim=[\"member\", \"init\"],\n", + " alignment=\"same_inits\",\n", + ")" ] }, { @@ -588,16 +545,6 @@ "execution_count": 7, "metadata": {}, "outputs": [ - { - "data": { - "text/plain": [ - "[]" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA38ElEQVR4nO3dd3hUBdbH8e8hBEIPJfRQpZeEJFLXgusqYAeluxYUCWBbV193Xdu6rl3XQrGA4NIRsLKIrgWVmtC7gJQQIAFCbyE57x/3so5xEgLMzE05n+eZJ5Nb5v4yucmZ284VVcUYY4zJqYTXAYwxxhRMViCMMcb4ZQXCGGOMX1YgjDHG+GUFwhhjjF9WIIwxxvhlBcIYY4xfViA8JCJbReTKAL/mABGZG8jXLK5E5HYR+cHrHIGQ17omImtE5HL3+VMiMsF93kBEVERKBjjLERFpFIhpfbPn47VURC5yn48WkcfzM19+FaX15QwrEEWMqk5U1au8zlGciUhpERkrIodEZLeI/CnH+FgRSRaRY+7XWJ9xrUXkCxHZKyIhuYpVVVup6rehWJa7vPKquuVcpxWRcSLyjxzjzyu7qg5R1WfOdb7ixgqEMYH3FNAEqA90BR4RkW4AIlIK+BiYAFQGxgMfu8MBMoFpwKAQZzbmN6xAeO9iEVkrIhki8r6IRACISGUR+UxE0t1xn4lI3TMzuZuzW0TksIj8LCIDfIb/4DOdisgQEfnJfZ0RIiJ5BTrzGiLysjvPzyLS3Wf8HSKyzl32FhG5x2fc5SKSIiKPiEiaiOwSkRtFpIeIbBSR/SLyV5/pS4jIoyKyWUT2icg0EakSmLf2f8u4SES+E5GD7ifzqe7w3+xCEZFvReSuX88ub7rzrheR3+djkX8EnlHVDFVdB7wL3O6OuxwoCfxLVU+q6huAAFcAqOoGVR0DrDmPn7Oau54ccN/n70XkN3/jItLc/Z32db8P+K7Os+T03dUzzl0nP3fXp0Ui0jjntCIyGBiAU2yPiMinObOLSHsRWeD+/LtE5C2fwpszw/+2RkTkU/c1zzyyReR2d1xzEfnSfT83iEhvn9eoKiKfiLOluBho7G9ZhZkVCO8NAK7GWbmaAn9zh5cA3sf5FFoPOA68BSAi5YA3gO6qWgHoDCzPYxnXAhcDMUBvd3ln0wHYAFQDXgTG+BSWNPc1KwJ3AK+JSJzPvDWBCKAO8ATOP8iBQDxwCfCE/LJf+T7gRuAyoDaQAYzwF0hE6rl//Lk9+ufyszwDzMX5xF4XeDMfP7/v+7DFfR+eBGbmVcBEpLL7c6zwGbwCaOU+bwWs1F83QVvpM/5CPASkAFFADeCvwK92U7m/p7nAvao65UIW5lOM/D0+O4eX6gc8jfP72QQ8m3MCVX0HmAi86O52us7P62QBD+L8rjoBvweGnm3hqnqd+5rlgZuB3cB/3b+zL4FJQHU350gROfO7GgGcAGoBd7qPIsUKhPfeUtUdqrof5w+jH4Cq7lPVGap6TFUPu+Mu85kvG2gtImVUdZeq5vWJ83lVPaCq24FvgNh85Nqmqu+qahbObpBaOP90UNXPVXWzOr7D+Ydzic+8mcCzqpoJTMH5g31dVQ+7OdcAbd1p7wEeU9UUVT2Js3vmZvFzYFRVt6tqZB6PSbn8LJk4hba2qp5Q1XM5kJiG82k/U1Wn4hTNa/KYvrz79aDPsINABZ/xB/k13/EXIhPn91Tfzft9jkJ0CfAJcJuqnss/cL9U9do8fhfXnsNLzVTVxap6GqcIxJ5nnmRVXaiqp1V1K/A2v/6byZOINAU+APqo6g6cD0FbVfV99zWXAjNw1s8woBfwhKoeVdXVOH8nRYoVCO/t8Hm+DefTJyJSVkTeFpFtInIImAdEikiYqh4F+gBDgF3u5nnzPJax2+f5MX75J5aX/82jqsfcp+XdbN1FZKG72X0A6IFTBM7Y5xYWcLZ8APb4jD/uk6E+MOvMJ09gHc4nwRr5yJhfj+Dsxlkszlkv5/JJb2eOf7L/+x3l4oj7taLPsIrAYZ/xFfk13/EX4iWcT+Bzxdn192iO8UOA+ar6TQCWFUjns37+hog0dbdqdrt/M//k1+tlXvNWwjk29Liqfu8Org908N0ywtnir4mzlVaS3/79FilWILwX7fO8HpDqPn8IaAZ0UNWKwKXucAFQ1S9U9Q84nxjX4+zGCToRKY3zKeploIaqRgKzz+Q6DztwdpX5fvqMUNWdfpZdL8e+4pyPAf4WoKq7VfVuVa2Ns8Uy0t0HftSdpKzP5DVzzF7HZ9ca/Pp35G9ZGcAunN15Z8TwyzGFNUDbHK/ZlvM45uBn2YdV9SFVbQRcB/wpxzGTIUA9EXntQpcFICL/yeN38Z9ALCOHs53VNQrnb6GJ+zfzV/KxXrrHaSYB36jq2z6jdgDf5Vg3y6tqIpAOnOa3f79FihUI7w0Tkbrufu2/AlPd4RVwPmkfcMc9eWYGEakhIte7+0hP4nwqzSI0SgGlcf9AxDl4fSGn1Y4GnhWR+gAiEiUiN/ib0N3FVD6Px0R/84nILfLLAf4MnH80WaqaDuwEBopImLtlkfNAY3XgPhEJF5FbgBY4BTEvHwB/E+dEg+bA3cA4d9y3OL+r+8Q5HXa4O/xrN6uIc6JCKff7CLcon/lZxonImdfK+XNeK84BXQEOucvxXS8OA92AS0Xk+bP8DGelqt3z+F10P/srnLM9QF7XT1TA+bmPuO97Yj5f91mgHHB/juGfAU1F5Fb39x8uIheLSAt3C3km8JS7td8SuO2cfppCwAqE9ybh7MPf4j7OnOf9L6AMsBdYCMzxmacEzhZGKrAfZz/rWQ/GBYJ7POQ+nFMxM4D+OPu1z9fr7vxzReQwzs/a4UJz5nAxsEhEjrjLul9Vf3bH3Q08DOzDOVA8P8e8i3BOWd2L84/kZlXdd5blPQlsxtnl8B3wkqrOAVDVUzgH5f8IHMA5sHmjOxyc3RrH+WWL4jjOcY8zooEfc1luE+ArnA8MC4CRmuMaAVU9APwB6C4ihe06gDFAS3d3z0d+xv8ZZ308jLNFPdXPNP70AzoCGb5bo+66fhXQF+dvbTfwAs4HJIDhOLvDduN8AHj/fH6ogkzU7ihnTKEgzimbK4C27gkAxgSVFQhjjDF+2S6mYkqcXjT+Di6O9jpbYZDHwdlLzj63MYWDbUEYY4zxK6BdGr1WrVo1bdCggdcxjDGm0EhOTt6rqlH+xhWpAtGgQQOSkpK8jmGMMYWGiOR6gZ8dgzDGGOOXFQhjjDF+WYEwxhjjlxUIY4wxflmBMMYY45cVCGOMMX5ZgTDGGOOXFQhjguz7n9JJ2rrf6xjGnDMrEMYEiary9nebuXXMYm4ds5iNewJx0zhjQscKhDFBkJWtPP3pWp77z3q6tapJudIlGTIhmSMnT3sdzZh8swJhTICdyMxi6MRkxs3fyt2XNGTkgDje7NeOrXuP8n8zVmINMk1hYQXCmADKOHqKAe8tYu7aPTxxbUseu6YlJUoInRpX5eGrm/P5yl2Mm7/V65jG5EuRatZnjJd27D/Gbe8vJiXjOCP6x9GjTa1fjR9yWSOSt2Xw7OfraFs3kvj6lT1Kakz+2BaEMQGwKuUgN42cz74jp5gwqMNvigOAiPBK7xhqR5Zh+KSl7Dty0oOkxuRf0AqEiIwVkTQRWe0zLFZEForIchFJEpH2ucy7VURWnZkuWBmNCYRvN6TR550FlC5ZghmJnWjfsEqu01YqE87IAXHsO3qK+6csJyvbjkeYgiuYWxDjgG45hr0IPK2qscAT7ve56aqqsaqaEJx4xly4aUk7GDQ+iQZVyzFraGcuql7hrPO0rlOJZ25oxQ+b9vL6VxtDkNKY8xO0AqGq84CcVwcpUNF9XglIDdbyjQkmVeX1r37ikQ9X0rlxVabe05HqFSPyPX+fi+txS3xd3vh6E9+sTwtiUmPOX6iPQTwAvCQiO4CXgb/kMp0Cc0UkWUQG5/WCIjLY3V2VlJ6eHti0xvhxOiubv8xcxWtfbaRnXB3G3n4xFSLCz/l1nrmxNS1qVeSBqcvZsf9YEJIac2FCXSASgQdVNRp4EBiTy3RdVDUO6A4ME5FLc3tBVX1HVRNUNSEqyu9tVY0JmKMnT3P3B0lMWbKDe6+4iFduiSE87Pz+jCLCwxg1II7sbGXYpKWcPJ0V4LTGXJhQF4jbgJnu8+mA34PUqprqfk0DZuU2nTGhlH74JP3eXch3G9N59qbWPHRVM0Tkgl6zQbVyvNw7hpUpB/n7p2sDlNSYwAh1gUgFLnOfXwH8lHMCESknIhXOPAeuAlbnnM6YUNqSfoReo+azcc9h3rk1gQEd6gfsta9uVZN7Lm3ExEXbmbUsJWCva8yFCtqFciIyGbgcqCYiKcCTwN3A6yJSEjgBDHanrQ28p6o9gBrALPeTWUlgkqrOCVZOY85m6fYMBo1bgogwZXAnYqMjA76Mh69uxrIdB/jLzFW0rFWJZjXPfjaUMcEmRakvTEJCgiYl2WUTJnDmrtnNvZOXUbNSBOPvaE+DauWCtqy0Qyfo8cYPVIwoycfDu5zXgW9jzpWIJOd2OYFdSW1MLv69cBtDJiTTvFZFZiZ2DmpxAKheMYIR/duxbf8xa+pnCgQrEMbkoKq8MGc9j3+0mq7NqjP57g5ULV86JMvu0Kgqj1zdjNmrdjP2x60hWaYxubFmfcb4OHU6m/+bsZJZy3bSv0M9/n59K0qe52ms52vwpU5Tv+dmryOmbiUSGuTeusOYYLItCGNch05kcse4xcxatpOHr27Gsze2DnlxAKep30u3xFCnchmGTVrKXmvqZzxiBcIYYPfBE/QevYBFW/bzyi0xDOt60QVf43AhKpUJZ9SAeA4cy+T+KcusqZ/xhBUIU+xt3HOYniN/ZMf+Y4y9/WJ6xdf1OhIALWtX5JkbW/Pjpn289qU19TOhZ8cgTLG2cMs+Bn+QROnwMKYN6USr2pW8jvQrvROiSd6awVvfbKJdvUh+36KG15FMMWJbEKbY+nRFKn8cs5jqFSOYNbRzgSsOZzx9Qyta1qrIg9bUz4SYFQhTLL33/RbunbyM2OhIPhzSibqVy3odKVcR4WGMHhiPAokTkzmRaU39TGhYgTDFSna28vdP1/KPz9fRo01NPhjUnsiypbyOdVb1qpbl1d6xrN55iKetqZ8JESsQptg4kZnF8MlLGfvjz9zRpQFv9YsjIjzM61j59oeWNRhyWWMmL97OjGRr6meCzw5Sm2LhwLFT3P1BEku2ZvC3a1pw1yWNvI50Xv58VVOW78jgsY9W0apORZrXrHj2mYw5T7YFYYq8lIxj3Dx6ASt2HOSt/u0KbXEAKBlWgjf6taNiRDiJE5Zy6ESm15FMEWYFwhRpa1IPctPI+aQdOsEHg9pzbdvaXke6YNUrRPBW/zi27z/GI9OtqZ8JHisQpsiatzGd3qMXEF5C+DCxMx0bVfU6UsC0b1iFR7s1Z86a3Yz54Wev45giygqEKZI+TE7hznFLiK5SlplDu9C0RtG7Ac9dlzSkW6uaPPef9SzZut/rOKYIClqBEJGxIpImIqt9hsWKyEIRWS4iSSLi917TItJNRDaIyCYReTRYGU3Ro6q89fVP/Hn6Cjo0qsL0IZ2oWSnC61hBISK8eEtboiuXYdjEpaQftqZ+JrCCuQUxDuiWY9iLwNOqGgs84X7/KyISBowAugMtgX4i0jKIOU0RcTorm8c+Ws3LczdyU7s6vH97+yJ/V7aKEeGMGhjPoROZ3Dd5Gaezsr2OZIqQoBUIVZ0H5NzuVeDMeXmVgFQ/s7YHNqnqFlU9BUwBbghWTlM0HDt1miETkpm0aDuJlzfm1d4xlCpZPPagtqhVkX/c2IYFW/bxqjX1MwEU6usgHgC+EJGXcYpTZz/T1AF2+HyfAnQIfjRTWO09cpJB45NYlXKAZ25oxa2dGngdKeRujq9L8rb9jPx2M+3qVeYPLa2pn7lwof6IlQg8qKrRwIPAGD/T+GvCn+t5fCIy2D2ekZSenh6gmKaw2Lr3KL1GzWfD7kOMHhhfLIvDGU9e14rWdSryp2nL2b7PmvqZCxfqAnEbMNN9Ph1nd1JOKUC0z/d18b8rCgBVfUdVE1Q1ISoqKmBBTcG3fMcBeo2az6HjmUy6uyNXtarpdSRPRYSHMWpAPII19TOBEeoCkQpc5j6/AvjJzzRLgCYi0lBESgF9gU9ClM8UEl+t3UPfdxZQtnQYMxI7E1evsteRCoToKmV5rU8sa1IP8dQna7yOYwq5YJ7mOhlYADQTkRQRGQTcDbwiIiuAfwKD3Wlri8hsAFU9DQwHvgDWAdNU1dZ08z8TF21j8L+TaFqjAjMTu9AoqrzXkQqU37eowdDLGzNlyQ6mJ+04+wzG5EKK0mX6CQkJmpSU5HUMEySqyitzN/LWN5vo2iyKt/rHUa609Zv053RWNn8cu5jkbRnMGtqFlrWtqZ/xT0SSVTXB37jicR6gKfQys7L58/SVvPXNJvpeHM27f0yw4pCHM039IsuGM3RisjX1M+fFCoQp8A6fyOTOcUuYsTSFB69synM921AyzFbds6lWvjQj+seRknGcP09bYU39zDmzvzJToO05dII+by9k/uZ9vHhzW+6/sgki/s6ENv4kNKjCo92bM3ftHt79fovXcUwhY9vopsDalHaY28YuIePYKcbclsDlzap7HalQGvS7hizdnsELczYQUzeSDkWoq60JLtuCMAXSkq376TVqASdPZzPtnk5WHC6AiPBCr7bUr1KW4ZOXkXb4hNeRTCFhBcIUOLNX7WLAe4uoWr4Us4Z2pnWdSl5HKvQqRIQzcmAch09kcu8ka+pn8scKhClQxvzwM8MmLaVNnUrMGNKZ6CplvY5UZDSvWZF/3tSGRT/v56W5G7yOYwoBOwZhCoTsbOWfs9fx3g8/c3WrGrzetx0R4WFexypyesbVJWlbBm9/t4X4epWLfXsSkzfbgjCeO3k6i/umLOO9H37m9s4NGDkg3opDED1xbUva1KnEQ9NXsG3fUa/jmALMCoTx1MFjmfxxzGI+W7mLv3RvzpPXtSSshJ3GGkwR4WGMHBBHCRGGTFhqTf1MrqxAGM/sPHCcm0fPZ+n2DF7vG8s9lzW2axxCxGnqF8O6XYd44uPVZ5/BFEtWIIwn1qYeoufIH9l98ATj72zPDbF1vI5U7FzRvAb3XnER05JSmLbEmvqZ37ICYULux0176f32AgRhemInOjeu5nWkYuuBK5vyu4uq8fjHq1mTetDrOKaAsQJhQmrWshRuf38xdSLLMGtYZ5rXtC6jXgorIbzeN5bKZUuROGEpB49bUz/zCysQJiRUlZHfbuLBqSuIr1+ZaUM6UatSGa9jGaBq+dKMGBBH6oHj/Hm6NfUzv7ACYYIuK1t5/OPVvDhnA9fH1Gb8ne2pVCbc61jGR3z9yvy1Rwu+XLuHt+dZUz/jsAvlTFAdP+Vc4/Dl2j3cc1kj/u/q5pSw01gLpDu6NCB5ewYvzllPbHQkHa2pX7EXzFuOjhWRNBFZ7TNsqogsdx9bRWR5LvNuFZFV7nR2i7hCav/RU/R/byFfrdvD09e34i/dW1hxKMDONPVrUK0cwyctI+2QNfUr7oK5i2kc0M13gKr2UdVYVY0FZgAz85i/qzut31vhmYJt276j9Bo1n7Wphxg1II7bOjfwOpLJh/KlSzJ6YDxHT55m+KRlZFpTv2ItaAVCVecB+/2NE+dqqN7A5GAt33hnxY4D9Bo1n4xjp5h4Vwe6ta7ldSRzDprWqMBzPduweOt+XvrCmvoVZ14dpL4E2KOqP+UyXoG5IpIsIoPzeiERGSwiSSKSlJ6eHvCg5tx8sz6Nvu8sJCI8jBmJnUloUMXrSOY83NiuDgM71uOdeVuYs3q313GMR7wqEP3Ie+uhi6rGAd2BYSJyaW4Tquo7qpqgqglRUVGBzmnOwZTF27nrgyQaVy/HzKGdaRxV3utI5gI8fm1LYupW4uHpK/h5rzX1K45CXiBEpCTQE5ia2zSqmup+TQNmAe1Dk86cD1Xl1S838ujMVXS5qBpTBneieoUIr2OZC1S6ZBgjBsQRFiYkTkjm+Clr6lfceLEFcSWwXlVT/I0UkXIiUuHMc+AqwLqJFVCZWdk88uFK3vjvT9wSX5cxtyVQvrSdPV1U1K1cln/1iWXDnsM8/vFqu4iumAnmaa6TgQVAMxFJEZFB7qi+5Ni9JCK1RWS2+20N4AcRWQEsBj5X1TnBymnO39GTp7lrfBLTk1O4//dNePHmtoSH2bWXRc3lzapz7xVN+DA5hanW1K9YCdpHPVXtl8vw2/0MSwV6uM+3ADHBymUCI+3wCe4ct4R1uw7zfM829G1fz+tIJoju/30Tlm3P4IlP1tC6TiW7T3gxYR/3zDnbnH6EniPnszntKO/9McGKQzHgNPVrR9VypUicmMzBY9bUrziwAmHOSdLW/fQaNZ/jp7KYMrgjXZtX9zqSCZEq5UoxYkAcuw+e4KHpy8nOtuMRRZ0VCJNvc1bvZsB7i6hcthQzh3YmJjrS60gmxOLqVeaxHi34al0ao+dt9jqOCTIrECZfxs/fSuLEZFrWrsiMxM7Ur1rO60jGI7d1bsB1MbV5+YsNzN+81+s4JoisQJg8ZWcrz81ex5OfrOHKFjWYdFdHqpQr5XUs4yER4fmebWhYrRz3TV7GHmvqV2RZgTC5Onk6iwemLufteVsY2LEeowfGU6ZUmNexTAFQzm3qd+xUFsMmLrWmfkWUFQjj18Hjmdw+dgmfrEjlkW7NeOaG1oRZq27jo4nb1C9pWwYv/Ge913FMENglr+Y3Ug8c5473l7Bl7xFe6xPDTe3qeh3JFFA3xNYheVsG7/3wM/H1K9O9jXXuLUpsC8L8yvrdh+g5cj47Dxxn3B3trTiYs3rsmhbEREfy8Icr2ZJ+xOs4JoCsQJj/mb95L7eMWoCiTLunE10uquZ1JFMIlC4ZxsgBcYSHCUMnLrWmfkWIFQgDwMfLd3Lb2MXUrBTBzKFdaFm7oteRTCFSJ7IM/+rbjg17DvPYR6usqV8RYQWimFNV3v5uM/dPWU5cvcp8OKQzdSLLeB3LFEKXNY3i/t83YebSnUxebE39igI7SF2MZWUrf/90DeMXbOOatrV4tXcMpUvaaazm/N13RROWbj/AU5+soU2dSrSpa039CjPbgiimTmRmMXRiMuMXbOOu3zXkzb7trDiYC1aihPCvPrFUK+809Ttw7JTXkcwFsAJRDGUcPcWA9xYxd+0eHr+2JX+7tiUl7BoHEyBVypVi5MB49hw6wZ+mrbCmfoWYFYhiZsf+Y/QaPZ9VOw8yon8cg37X0OtIpgiKjY7k8Wtb8vX6NEZ9Z039Cis7BlGMrEo5yB3jlpCZlc2EQR1o37CK15FMEXZrx/okbc3glbkbiI2OtNOmC6Fg3nJ0rIikichqn2FTRWS5+9gqIstzmbebiGwQkU0i8miwMhYn325Io887CyhdsgQzEjtZcTBBJyI817MNjaLKc9/kZew+aE39Cptg7mIaB3TzHaCqfVQ1VlVjgRnAzJwziUgYMALoDrQE+olIyyDmLPKmJe1g0PgkGlQtx8yhnbmoegWvI5liwmnqF8fxzCyGTbKmfoVN0AqEqs4D9vsbJyIC9AYm+xndHtikqltU9RQwBbghWDmLMlXl9a9+4pEPV9K5cVWm3tORGhUjvI5lipmLqlfghV5tSd6WwXOzralfYeLVMYhLgD2q+pOfcXUA36tsUoAOub2QiAwGBgPUq2f3Rj7jdFY2f/toNVOW7KBnXB1e6NWW8DA7J8F447qY2iRvy2Dsj05Tv2vaWlO/wsCr/xj98L/1AODvfMtcz5NT1XdUNUFVE6KiogISrrA7evI0d3+QxJQlOxje9SJeuSXGioPx3F97tKBdvUge+XAFm62pX6EQ8v8aIlIS6AlMzWWSFCDa5/u6QGqwcxUV6YdP0u/dhXy3MZ1nb2rNn69uhrNHzxhvlSpZghH94ygdHkbihGSOnTrtdSRzFl58rLwSWK+qKbmMXwI0EZGGIlIK6At8ErJ0hdiW9CP0GjWfjXsO886tCQzoUN/rSMb8Su3IMrzeN5af0o7w2KzV1tSvgAvmaa6TgQVAMxFJEZFB7qi+5Ni9JCK1RWQ2gKqeBoYDXwDrgGmquiZYOYuK5G0Z9Bo1nyMnTzNlcCeubFnD60jG+HVJkygevLIps5btZOKi7V7HMXmQs1VwEWmkqltClOeCJCQkaFJSktcxQm7umt3cO3kZNStFMP6O9jSoVs7rSMbkKTtbuXP8EuZv2seHiZ1oWzfS60jFlogkq2qCv3H52YIYJyKbRWSKiAwVkTYBzmcuwL8XbmPIhGSa16zAjMTOVhxMoVCihPBa71iiKpQmccJSMo5aU7+C6KwFQlUvBVoAbwKVgc9FxO/1DSZ0srOVF+as5/GPVtO1WXUmD+5ItfKlvY5lTL5VLleKkQPiSD98kgenLbemfgXQWQuEiPwOeAh4DLgG+AwYFuRcJg+nTmfzp2nLGfXtZvp3qMfbt8ZTtpS11TKFT0x0JI9f15JvN6Qz4ptNXscxOeTnv8p3QBLwHDDbvbrZeOTQiUwSJyTz46Z9/PmqpgzrepGdxmoKtYEd6pG8dT+vfrWR2HqRXNLErmcqKPJzDKIq8HegEzBHRL4SkWeCG8v4s/vgCXqPXsCiLft5+ZYYhl/RxIqDKfREhH/2bEOT6uW5f8pyUg8c9zqSceXnGMQBYAvwM7ALaAxcGtxYJqeNew7Tc+SP7Nh/jLG3X8zN8XW9jmRMwJQtVZJRA+M56Tb1O3XamvoVBPk5BrEZeAWoAowGmqnqZcEOZn6xcMs+eo2aT2a2Mm1IJy5tapvgpuhpHFWeF2+OYdn2A/xz9jqv4xjydwyiiapaOffIpytSeWjaCqKrlGH8ne2pW7ms15GMCZpr2tYiaVsD3v9xK/H1K3NdTG2vIxVr+TkGUVtEZrk3/9kjIjNExPZvhMB732/h3snLiImuxIzEzlYcTLHwl+4tiK9fmUdnrGRTmjX181J+CsT7OL2QauO04v7UHWaCJCtbefrTNfzj83V0b12Tfw/qQGTZUl7HMiYkzjT1i3Cb+h09aU39vJKfAhGlqu+r6mn3MQ6wneBBciIzi+GTlvL+j1u5o0uD//2hGFOc1KwUwRv92rE5/Qh/nbXKmvp5JD8FYq+IDBSRMPcxENgX7GDF0YFjp7h1zCL+s3o3f7umBU9e14oSJew0VlM8dbmoGn/6Q1M+Xp7KhIXbvI5TLOWnQNyJc3vQ3Tinud7sDjMBlJJxjJtHL2DFjoO82a8dd13SyOtIxnhu6OUXcUXz6vz9s7Us33HA6zjFTn6ug9iuqterapSqVlfVG1XVynkArd55kJtGzift0Ak+GNTeztwwxlWihPBq7xhqVIxg2ERr6hdquZ7mKiJv5DWjqt4X+DjFz7yN6SROSKZSmXAmJnamaY0KXkcypkCJLOs09bt51AIemLqc92+/2Ha9hkheWxA9gWScq6iT/TzMBfowOYU7xy0hukpZZg7tYsXBmFy0rRvJk9e35LuN6bz5tTX1C5W8LpQ7BHyLc4pr15CkKSZUlRHfbOLluRvpclFVRg2Mp2JEuNexjCnQ+revR/LWDP71X6ep32XWUSDo8tqCGA3MAZrjdHM980h2v+ZJRMa6F9etzjH8XhHZICJrROTFXObdKiKrRGS5iBSpW8SdzsrmsY9W8/LcjdwYW5v3b29vxcGYfBARnr2pDU2rV+CBKcvYaU39gi7XAqGqb6hqC2CsqjbyeTRU1fycYjMO6OY7QES6AjcAbVW1FfByHvN3VdXY3G6FVxgdO3Wae/6dzKRF20m8vDGv9YmlVMmg3RbcmCKnTKkwRg2MIzNLGTbRmvoFW37OYko8nxdW1XlAzjvPJQLPq+pJd5q083ntwmjvkZP0e3cR32xI45kbWvF/3Zpbq25jzkOjqPK8eHNblu84wLOfr/U6TpEW6o+vTYFLRGSRiHwnIhfnMp0Cc0UkWUQG5/WCIjJYRJJEJCk9PT3ggQNh696j9Bo1n/W7DjF6YDy3dmrgdSRjCrUebWpx1+8aMn7BNj5Zkep1nCIr1PepLIlzX+uOwMXANBFppL+9jr6LqqaKSHXgSxFZ726R/IaqvgO8A5CQkFDgrsdftj2DQeOTUFUm3d2R+PqVvY5kTJHwf92bsyLlAI/OWEmLmhVoYmcBBlyotyBSgJnqWAxkA9VyTqSqqe7XNGAW0D6kKQPkq7V76PfuQsqVDmNGYmcrDsYEUHhYCd7qH0fZUmEkTlxqTf2CINQF4iPgCgARaQqUAvb6TiAi5USkwpnnwFXAagqZiYu2MfjfSTStUYGZiV1oFFXe60jGFDk1KjpN/bakH+HRmdbUL9CCViBEZDKwAGgmIikiMggYCzRyT32dAtymqioitUVktjtrDeAHEVkBLAY+V9U5wcoZaKrKy19s4LFZq7msaRST7+5IVIXSXscypsjq3LgaD13VjE9XpPLBAusCFEhBOwahqv1yGTXQz7SpQA/3+RYgJli5gunU6WwenbmSmUt30ichmmdvak3JMDuN1ZhgS7ysMUu3ZfCPz9fSpm4l4urZ7txAsP9eAXL4RCaDxi9h5tKdPHhlU57v1caKgzEh4jT1i6VmpQiGT1zKfmvqFxD2HywA9hw6QZ+3FzJ/8z5evLkt91/ZxK5xMCbEKpUNZ9SAePYePcX9U5aRlW3HIy6UFYgLtCntMD1HzmfrvqOMuS2B3gnRXkcypthqXacST1/fiu9/2ssb//3J6ziFXqivgyhSFv+8n7s/SCI8rARTB3eiTd1KXkcyptjre3E0SVszeOPrn2hXL5LLm1X3OlKhZVsQ52n2ql0MHLOIquVLMWtoZysOxhQQIsI/bmxNsxoVeGDqclIyjnkdqdCyAnEexvzwM8MmLaVNnUrMGNKZ6CplvY5kjPHhNPWLJ8tt6nfydJbXkQolKxDnIDtb+cdna3nms7Vc1bIGE+/qQOVypbyOZYzxo2G1crx0SwwrUg7yj8/WeR2nULICkU8nMrO4d8oy3vvhZ27rVJ+RA+KJCA/zOpYxJg/dWtdk8KWN+PfCbXy8fKfXcQodO0idDwePZXL3v5NY/PN+/tK9OYMvbWSnsRpTSDxydTOWbz/AozNW0aJWRbu17zmwLYiz2HngODePns+y7Rm83jeWey5rbMXBmEKkZFgJ3urfjnKlSzJkQjJHrKlfvlmByMPa1EP0HPkjuw+eYPyd7bkhto7XkYwx56F6xQje7NeOrXuP8n8zVlpTv3yyApGLHzftpffbCxCE6Ymd6Nz4N13JjTGFSKfGVXn46uZ8vnIX4+Zv9TpOoWAFwo9Zy1K4bexi6kSWYdawzjSvWdHrSMaYABhyWSOubFGDZz9fR/K2DK/jFHhWIHyoKiO/3cSDU1eQ0KAy04Z0olalMl7HMsYEiIjwSu8YakeWYfikpew7ctLrSAWaFQhXVrby+MereXHOBq6Lqc34O9tTqUy417GMMQFWqUw4IwfEse/oKe6fstya+uXBCgRw/FQWQyYkM2Hhdu65tBGv94mldEm7xsGYoqp1nUo8c0Mrfti0l399tdHrOAVWsb8O4uDxTG5/fzHLdxzgqetacnuXhl5HMsaEQJ+L65G0NYM3v95EXL3KdG1uTf1yCuYtR8eKSJp7e1Hf4feKyAYRWSMiL+Yybzd3mk0i8miwMgKUKxVG7cgyjBoQZ8XBmGLmmRtb06JWRR6Yupwd+62pX07B3MU0DujmO0BEugI3AG1VtRXwcs6ZRCQMGAF0B1oC/USkZbBClgwrwYj+cXRrXStYizDGFFAR4WGMGhBHtirDJllTv5yCViBUdR6wP8fgROB5VT3pTpPmZ9b2wCZV3aKqp4ApOEXFGGMCrkG1crxySwwrUw7y90/Xeh2nQAn1QeqmwCUiskhEvhORi/1MUwfY4fN9ijvMLxEZLCJJIpKUnp4e4LjGmOLgqlY1ueeyRkxctJ1Zy1K8jlNghLpAlAQqAx2Bh4Fp8tvGRv4aHeV6HpqqvqOqCaqaEBUVFbikxphi5eGrmtGhYRX+MnMVG3Yf9jpOgRDqApECzFTHYiAbyNnDIgXwvbFzXSA1RPmMMcVUybASvNm/HRUiwkmckMzhE5leR/JcqAvER8AVACLSFCgF7M0xzRKgiYg0FJFSQF/gk1CGNMYUT9UrRPBWv3Zs23/MmvoR3NNcJwMLgGYikiIig4CxQCP31NcpwG2qqiJSW0RmA6jqaWA48AWwDpimqmuCldMYY3x1aFSVR65uxuxVuxn741av43hKilKFTEhI0KSkJK9jGGMKOVXlnn8n8/X6NKYM7khCgypeRwoaEUlW1QR/46zVhjHG5CAivHRLDHUql2HYpKXsLaZN/axAGGOMH5XKhDNqQDwHjmVy3+RlxbKpnxUIY4zJRcvaFXnmxtbM37yPV7/c4HWckLMCYYwxeeidEE2fhGhGfLOZ/67b43WckLICYYwxZ/H0Da1oVbsiDxazpn5WIIwx5iycpn7xACROTOZEZvFo6mcFwhhj8qFe1bK82juW1TsP8XQxaepnBcIYY/LpypY1SLy8MZMXb2dGctFv6mcFwhhjzsFDf2hKp0ZVeeyjVazffcjrOEFlBcIYY85BybASvNGvHRUjwkmcsJRDRbipnxUIY4w5R1EVSvNW/zi27z/GI9OLblM/KxDGGHMe2jeswqPdmjNnzW7G/PCz13GCwgqEMcacp7suaUi3VjV57j/rWbI15x2WCz8rEMYYc55EhBdvaUt05TIMm7iU9MNFq6mfFQhjjLkAFSPCGTUwnkMnMrl38lJOZ2V7HSlgrEAYY8wFalGrIv+4sQ0Lt+znlS83eh0nYKxAGGNMANwcX5d+7esx6tvNfLm2aDT1C+YtR8eKSJp7e9Ezw54SkZ0istx99Mhl3q0issqdxm4RZ4wpFJ68riWt61TkT9OWs31f4W/qF8wtiHFANz/DX1PVWPcxO4/5u7rT+L0VnjHGFDRnmvqVECkSTf2CViBUdR5Q9M77MsaYPERXKctrfWJYk3qIpz5Z43WcC+LFMYjhIrLS3QVVOZdpFJgrIskiMjivFxORwSKSJCJJ6enpgU9rjDHn6IrmNRjWtTFTluxgetIOr+Oct1AXiFFAYyAW2AW8kst0XVQ1DugODBORS3N7QVV9R1UTVDUhKioq0HmNMea8/OkPzejcuCp/+2g1a1MLZ1O/kBYIVd2jqlmqmg28C7TPZbpU92saMCu36YwxpqAKKyG80a8dkWXDGToxuVA29QtpgRCRWj7f3gSs9jNNORGpcOY5cJW/6YwxpqCrVr40I/rHkZJxnD9PW1HomvoF8zTXycACoJmIpIjIIOBF9/TVlUBX4EF32toicuaMphrADyKyAlgMfK6qc4KV0xhjgimhQRUe7d6cuWv38O73W7yOc05KBuuFVbWfn8Fjcpk2FejhPt8CxAQrlzHGhNqg3zVk6fYMXpizgZi6kXRoVNXrSPliV1IbY0yQiQgv9GpL/SplGT55GWmHT3gdKV+sQBhjTAhUiAhn5MA4Dp/IZPikZYWiqZ8VCGOMCZHmNSvyXM82LP55Py/N3eB1nLOyAmGMMSF0U7u6DOhQj7e/28LcNbu9jpMnKxDGGBNiT1zXkrZ1K/HQ9BVs23fU6zi5sgJhjDEhVrpkGCP6x1FChCETlhbYpn5WIIwxxgPRVcryrz6xrNt1iCc+LpjXAluBMMYYj3RtXp17r7iIaUkpTFtS8Jr6WYEwxhgPPXBlU353UTUe/3g1a1IPeh3nV6xAGGOMh8JKCK/3jaVy2VIkTljKweMFp6mfFQhjjPFY1fKlGTEgjtQDx/nz9ILT1M8KhDHGFADx9Svz1x4t+HLtHt6eVzCa+lmBMMaYAuKOLg24pm0tXpyzngWb93kdxwqEMcYUFGea+jWoVo57Jy8j7ZC3Tf2sQBhjTAFSvnRJRg+M5+jJ0wyftIxMD5v6WYEwxpgCpmmNCjzfqw2Lt+7npS+8a+pnBcIYYwqgG2LrcGvH+rwzbwtzVnvT1C+YtxwdKyJpIrLaZ9hTIrJTRJa7jx65zNtNRDaIyCYReTRYGY0xpiD727UtiImO5OHpK/h5b+ib+gVzC2Ic0M3P8NdUNdZ9zM45UkTCgBFAd6Al0E9EWgYxpzHGFEhOU792hIUJiROSOX4qtE39glYgVHUesP88Zm0PbFLVLap6CpgC3BDQcMYYU0jUrew09duw5zCPf7w6pBfReXEMYriIrHR3QVX2M74O4Nu1KsUd5peIDBaRJBFJSk9PD3RWY4zx3OXNqnPvFU34MDmFqSFs6hfqAjEKaAzEAruAV/xMI36G5VoyVfUdVU1Q1YSoqKiAhDTGmILm/t834ZIm1XjikzWs3hmapn4hLRCqukdVs1Q1G3gXZ3dSTilAtM/3dYHUUOQzxpiCymnq146q5UqRODGZg8eC39QvpAVCRGr5fHsT4O8uGUuAJiLSUERKAX2BT0KRzxhjCrIq5UoxYkAcuw+e4KHpy8nODu7xiGCe5joZWAA0E5EUERkEvCgiq0RkJdAVeNCdtraIzAZQ1dPAcOALYB0wTVXXBCunMcYUJnH1KvNYjxZ8tS6N0fM2B3VZJYP1wqraz8/gMblMmwr08Pl+NvCbU2CNMcbAbZ0bkLz9AC9/sYHY6Eg6N64WlOXYldTGGFPIiAjP92xDw2rluG/yMnYfDE5TPysQxhhTCJVzm/odO5XF8ElLg9LUzwqEMcYUUk1qVOD5Xm1pUqMC2UG4gC5oxyCMMcYE3/Uxtbk+pnZQXtu2IIwxxvhlBcIYY4xfViCMMcb4ZQXCGGOMX1YgjDHG+GUFwhhjjF9WIIwxxvhlBcIYY4xfEsrb1wWbiKQD285z9mrA3gDGCRTLdW4s17mxXOemKOaqr6p+77ZWpArEhRCRJFVN8DpHTpbr3Fiuc2O5zk1xy2W7mIwxxvhlBcIYY4xfViB+8Y7XAXJhuc6N5To3luvcFKtcdgzCGGOMX7YFYYwxxi8rEMYYY/wq8gVCRMaKSJqIrM5lvIjIGyKySURWikicz7huIrLBHfdoiHMNcPOsFJH5IhLjM26riKwSkeUikhTiXJeLyEF32ctF5AmfcV6+Xw/7ZFotIlkiUsUdF8z3K1pEvhGRdSKyRkTu9zNNyNexfOYK+TqWz1whX8fymSvk65iIRIjIYhFZ4eZ62s80wVu/VLVIP4BLgThgdS7jewD/AQToCCxyh4cBm4FGQClgBdAyhLk6A5Xd593P5HK/3wpU8+j9uhz4zM9wT9+vHNNeB3wdoverFhDnPq8AbMz5c3uxjuUzV8jXsXzmCvk6lp9cXqxj7jpT3n0eDiwCOoZq/SryWxCqOg/Yn8ckNwAfqGMhECkitYD2wCZV3aKqp4Ap7rQhyaWq81U1w/12IVA3UMu+kFx58PT9yqEfMDlQy86Lqu5S1aXu88PAOqBOjslCvo7lJ5cX61g+36/cePp+5RCSdcxdZ46434a7j5xnFgVt/SryBSIf6gA7fL5PcYflNtwLg3A+IZyhwFwRSRaRwR7k6eRu8v5HRFq5wwrE+yUiZYFuwAyfwSF5v0SkAdAO51OeL0/XsTxy+Qr5OnaWXJ6tY2d7v0K9jolImIgsB9KAL1U1ZOtXyXNOW/SIn2Gax/CQEpGuOH+8v/MZ3EVVU0WkOvCliKx3P2GHwlKc3i1HRKQH8BHQhALyfuFs+v+oqr5bG0F/v0SkPM4/jAdU9VDO0X5mCck6dpZcZ6YJ+Tp2llyerWP5eb8I8TqmqllArIhEArNEpLWq+h6LC9r6ZVsQTlWN9vm+LpCax/CQEZG2wHvADaq678xwVU11v6YBs3A2JUNCVQ+d2eRV1dlAuIhUowC8X66+5Nj0D/b7JSLhOP9UJqrqTD+TeLKO5SOXJ+vY2XJ5tY7l5/1yhXwdc1/7APAtztaLr+CtX4E6mFKQH0ADcj/oeg2/PsCz2B1eEtgCNOSXAzytQpirHrAJ6JxjeDmggs/z+UC3EOaqyS8XWLYHtrvvnafvlzu+Es5xinKher/cn/0D4F95TBPydSyfuUK+juUzV8jXsfzk8mIdA6KASPd5GeB74NpQrV9FfheTiEzGOSuimoikAE/iHOhBVUcDs3HOAtgEHAPucMedFpHhwBc4ZwOMVdU1Icz1BFAVGCkiAKfV6dZYA2czE5wVYJKqzglhrpuBRBE5DRwH+qqzNnr9fgHcBMxV1aM+swb1/QK6ALcCq9z9xAB/xfnn6+U6lp9cXqxj+cnlxTqWn1wQ+nWsFjBeRMJw9vhMU9XPRGSIT66grV/WasMYY4xfdgzCGGOMX1YgjDHG+GUFwhhjjF9WIIwxxvhlBcIYY4xfViBMsSUiR84+Vb5e53YRecvP8KdEZKeI/D2X+ba6F4AFhIhMFJH9InJzoF7TFG9WIIwJrtdU9YmzT3bhVHUA8EkolmWKBysQxvC/Xv9L3H76T/sM/8htwLbGtwmbiNwhIhtF5Duci6zys4yqIjJXRJaJyNv49MrxtxwRGSQir/lMc7eIvCoi5UTkc7eZ3WoR6ROI98CYnKxAmGJPRK7CaQbXHogF4kXkUnf0naoaDyQA97n/5GsBT+MUhj8ALfO5qCeBH1S1Hc4n/Xo+436zHJz2zNe7PYLAuUL2fZxePKmqGqOqrYFAXhluzP9YgTAGrnIfy3A6iTbHKRjg/LNegXO/hGh3eAfgW1VNV6fP/tR8LudSYAKAqn4OZPiM+81y3HYOXwPXikhzIFxVVwGrgCtF5AURuURVD57vD25MXop8LyZj8kGA51T17V8NFLkcuBLopKrHRORbIMIdfb49an4z31mW8x5OT6D1OFsPqOpGEYnH6b/znIjMVVW/B8KNuRC2BWGM08zsTvdeAIhIHbevfyUgw/2n3RynUyY4N5K53N3dFA7cks/lzAMGuMvoDlR2h+e2HNS5OUw00B+3xbSI1AaOqeoE4GWcW7EaE3C2BWGKPVWdKyItgAVuR84jwECcfftDRGQlsAFn9w+quktEngIWALtwdkuF5WNRTwOTRWQp8B1OG2tyW46PaUCs/nJ70DbASyKSDWQCief8QxuTD9bN1ZggcYvIEVV9+QJf5zOc02X/m49pxwGfqeqHF7JMY8B2MRkTTEeAwbldKHc2IhIpIhuB4/ksDhOBy4AT57M8Y3KyLQhjjDF+2RaEMcYYv6xAGGOM8csKhDHGGL+sQBhjjPHLCoQxxhi//h96cIAMturhIwAAAABJRU5ErkJggg==\n", @@ -612,7 +559,7 @@ } ], "source": [ - "verif.flow.plot()" + "verif.flow.plot();" ] } ], @@ -632,7 +579,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.8" + "version": "3.9.2" } }, "nbformat": 4, From 16194327c3324c5de683b4201bbabcd69ca6d0d0 Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 30 Apr 2021 10:33:44 -0400 Subject: [PATCH 54/59] Revert "Fix a bug causing a warning with same file in zip" This reverts commit 08b21ee0f9bb53d93a0bbf85753a8aac497b316e. --- ravenpy/models/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 8c4c0045..f3304c78 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -101,7 +101,7 @@ def __init__(self, workdir: Union[str, Path] = None): # , identifier: str = Non # self._name = None self._defaults = {} - self._rv_paths = set() + self._rv_paths = [] # Directory logic # Top directory inside workdir. This is where Ostrich and its config and templates are stored. @@ -210,7 +210,7 @@ def _dump_rv(self): else: fn = self.model_path / f"{identifier}.{rvx}" with open(fn, "w") as f: - self._rv_paths.add(fn) + self._rv_paths.append(fn) content = rvo.content or rvo.to_rv() assert content.strip(), f"{rvx} has no content!" f.write(content) @@ -501,6 +501,7 @@ def _merge_output(self, files, name): # Try to create a zip file with zipfile.ZipFile(outfn, "w") as f: for fn in files: + len(fn.parts) f.write(fn, arcname=fn.relative_to(Path(*fn.parts[:i]))) return outfn @@ -759,14 +760,14 @@ def _dump_rv(self): # ostIn.txt fn = self.exec_path / "ostIn.txt" with open(fn, "w") as f: - self._rv_paths.add(fn) + self._rv_paths.append(fn) f.write(self.config.ost.content or self.config.ost.to_rv()) # OstRandomNumbers.txt if self.config.ost.random_numbers_path: fn = self.exec_path / "OstRandomNumbers.txt" with open(fn, "w") as f: - self._rv_paths.add(fn) + self._rv_paths.append(fn) f.write(self.config.ost.random_numbers_path.read_text()) def parse_results(self): From d35dfae2fb9008d0e0af92fcb413fff3a5fb6c2e Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 30 Apr 2021 10:36:05 -0400 Subject: [PATCH 55/59] Fix notebook --- .../climatological_ESP_forecasting.ipynb | 56 +++++++++++++++++-- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/docs/notebooks/climatological_ESP_forecasting.ipynb b/docs/notebooks/climatological_ESP_forecasting.ipynb index 8d400d13..a4893cd2 100644 --- a/docs/notebooks/climatological_ESP_forecasting.ipynb +++ b/docs/notebooks/climatological_ESP_forecasting.ipynb @@ -19,7 +19,24 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvt'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvh'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvp'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvc'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvi'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n" + ] + } + ], "source": [ "# Define some of the catchment properties. Could also be replaced by a call to the properties WPS.\n", "import datetime as dt\n", @@ -456,7 +473,7 @@ "
<xarray.DataArray ()>\n",
        "array(5.90491053)\n",
        "Coordinates:\n",
-       "    basin_name  object 'sub_001'
" + " basin_name object 'sub_001'" ], "text/plain": [ "\n", @@ -494,7 +511,34 @@ "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvt'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvh'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvp'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvc'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvi'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvt'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvh'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvp'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvc'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n", + "/home/christian/anaconda3/envs/ravenpy/lib/python3.9/zipfile.py:1505: UserWarning: Duplicate name: 'gr4jcn.rvi'\n", + " return self._open_to_write(zinfo, force_zip64=force_zip64)\n" + ] + } + ], "source": [ "hindcasts, qobs = forecasting.make_ESP_hindcast_dataset(\n", " model_name=hydromodel,\n", @@ -525,9 +569,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "2021-04-29 10:59:11,974 - root - INFO - initialized | lead: 01 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-01 00:00:00-1958-07-01 00:00:00\n", - "2021-04-29 10:59:11,980 - root - INFO - initialized | lead: 02 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-02 00:00:00-1958-07-02 00:00:00\n", - "2021-04-29 10:59:11,986 - root - INFO - initialized | lead: 03 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-03 00:00:00-1958-07-03 00:00:00\n" + "2021-04-30 10:35:25,345 - root - INFO - initialized | lead: 01 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-01 00:00:00-1958-07-01 00:00:00\n", + "2021-04-30 10:35:25,350 - root - INFO - initialized | lead: 02 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-02 00:00:00-1958-07-02 00:00:00\n", + "2021-04-30 10:35:25,355 - root - INFO - initialized | lead: 03 | inits: 1957-06-30 00:00:00-1958-06-30 00:00:00 | verifs: 1957-07-03 00:00:00-1958-07-03 00:00:00\n" ] } ], From 71f5fbd911bc032d94cc13bdc104141cf078804e Mon Sep 17 00:00:00 2001 From: Christian Jauvin Date: Fri, 30 Apr 2021 10:44:14 -0400 Subject: [PATCH 56/59] Fix notebooks --- docs/notebooks/RavenPy.ipynb | 258 ++++++++++-------- .../Running_Raven_with_CANOPEX_data.ipynb | 52 ++-- .../hydro_routing_product_example.ipynb | 79 +++--- 3 files changed, 202 insertions(+), 187 deletions(-) diff --git a/docs/notebooks/RavenPy.ipynb b/docs/notebooks/RavenPy.ipynb index 975f453a..34178f3d 100644 --- a/docs/notebooks/RavenPy.ipynb +++ b/docs/notebooks/RavenPy.ipynb @@ -21,11 +21,11 @@ { "data": { "text/plain": [ - "(PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvt'),\n", - " PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvc'),\n", - " PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvi'),\n", - " PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvh'),\n", - " PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvp'))" + "(PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvt'),\n", + " PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvc'),\n", + " PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvi'),\n", + " PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvh'),\n", + " PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/raven-gr4j-salmon.rvp'))" ] }, "metadata": {}, @@ -34,7 +34,7 @@ { "data": { "text/plain": [ - "PosixPath('/home/david/.raven_testing_data/master/raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc')" + "PosixPath('/home/christian/.raven_testing_data/master/raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc')" ] }, "metadata": {}, @@ -44,8 +44,13 @@ "source": [ "from ravenpy.utilities.testdata import get_file\n", "\n", - "config = [get_file(f\"raven-gr4j-cemaneige/raven-gr4j-salmon.{ext}\") for ext in ['rvt', 'rvc', 'rvi', 'rvh', 'rvp']]\n", - "forcing = get_file(\"raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc\")\n", + "config = [\n", + " get_file(f\"raven-gr4j-cemaneige/raven-gr4j-salmon.{ext}\")\n", + " for ext in [\"rvt\", \"rvc\", \"rvi\", \"rvh\", \"rvp\"]\n", + "]\n", + "forcing = get_file(\n", + " \"raven-gr4j-cemaneige/Salmon-River-Near-Prince-George_meteo_daily.nc\"\n", + ")\n", "\n", "display(tuple(config), forcing)" ] @@ -57,6 +62,7 @@ "outputs": [], "source": [ "from ravenpy.models import Raven\n", + "\n", "model = Raven()\n", "model.configure(config)\n", "model(forcing)" @@ -436,28 +442,28 @@ " Conventions: CF-1.6\n", " featureType: timeSeries\n", " history: Created by Raven\n", - " description: Standard Output
  • Conventions :
    CF-1.6
    featureType :
    timeSeries
    history :
    Created by Raven
    description :
    Standard Output
  • " ], "text/plain": [ "\n", @@ -492,16 +498,6 @@ "execution_count": 4, "metadata": {}, "outputs": [ - { - "data": { - "text/plain": [ - "[]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEqCAYAAAALYhf+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA4bElEQVR4nO3dd5xb5ZX/8c9X0hT3Ou42Bmx6McSQEHoNqZBkISENAruEJMsSUiFl0zdkd5NfGknwhhAT0uglgdBNh2BTbYxjY4N7wW1cpqic3x/3akaj0WhkWxpJo/N+vfSSdHV1debOzD16nvPc58rMcM4553oSKXcAzjnnKpsnCuecc3l5onDOOZeXJwrnnHN5eaJwzjmXlycK55xzeXmicLtE0uuSTivyNj8q6b5ibtN1JWmKpO2SokXe7rck3VDMbbrK44nClZ2Z/cHMzih3HP2FpJGSNkh6PL3MzJab2WAzS5YzNledPFE4V+UUyPxf/iGwsFzxuP7HE4XbHUdJekXSZknXSWoEkDRC0l/Db7Obw8eT0m+SdIGkpZK2SVom6aMZyx/PWM8kXSJpcbidqyUpX0DpbUj63/A9yyS9M+P1T0paGH72UkmfynjtJEkrJX1Z0npJaySdLeldkv4paZOkr2asH5F0haTXJG2UdKOkkcXZtR2fEZX0I0lvhj/Lv4f7JRa+PkfS9yU9AewE9gmXHwMcAlyXtb2pme/P8XnTJD0iaWv4mX/JeO2nklZIapY0T9LxPWwj/RmfDNffHP4ej5L0kqQtkn6RsX5E0tclvRHu9+slDcva1vmSlocxfW3P9qrbbWbmN78VfANeB+YDk4GRwBPA98LXRgEfBAYCQ4CbgNvD1wYBzcD+4fPxwMHh4wuAxzM+w4C/AsOBKcAG4Mxe4roAiAP/BkSBTwOrAYWvvxvYFxBwIsHB9cjwtZOABPCfQF24jQ3AH8Of42CgFdgnXP9zwNPAJKABuAb4Uw9xTQG25Ll9pIf3XQK8En7GCOCBcL/EwtfnAMvD2GJh3FHgOeAtOfbp1Mz35/i8PwFfI/jy2Agcl/Hax8LfbQz4ArAWaAxf+xZwQ9Zn/DrcxhnhfrsdGANMBNYDJ4brXwgsIUhyg4Fbgd9nbev/gAHA4UAbcGC5/wdq8Vb2APxWXTeCRHFJxvN3Aa/1sO4MYHP4eFB4YPwgMCBrveyDmmUdqG4EruglrguAJRnPB4bbGdfD+rcDl4WPTwJagGj4fEj43rdmrD8PODt8vBA4NeO18QRJKudBeDf380PApzKen0b3RPGdrPdcDvyqh33aW6K4HpgFTCogts3A4eHjXIliYsa6G4EPZTy/Bfhc+PhB4DMZr+2f3o8Z25qU8fo/gA+X+3+gFm/e9eR2x4qMx28AEwAkDZR0TdiV0Aw8CgyXFDWzHcCHCL4pr5H0N0kH5PmMtRmPdxJ84+xNx3vMbGf4cHAY2zslPR12I20hSHCjM9670ToLvS3h/bqM11syYtgLuC3sStlCkDiSwNgCYizUBLru5xU51ulYJmkC8B8ErYK8JB2vYATUdkkLwsVfJmht/UPSAkkXZqz/hbDbbmv48w6j677Llr3fetqPEwj+ftLeIEgSmftxd/4OXJHl7K90rheTMx5PIejigaBbYn+Cb+JrJc0Anic4AGFm9wL3ShoAfI+gWyFnf3cxSWog+Cb7CeAOM4tLuj0d125YAVxoZk8U8NlTCLqQevIpM/tDjuVrCLqd0ibnWCdz6uejCVo2r4TlnAHAAElrCbp8Ot9k9hhZB1wzW0vQ5Yak44AHJD0abvMrwKnAAjNLSdrM7u+7TKsJkm7aFIIuwHV0/dldmXmLwu2Oz0qaFBZwvwqkC59DCL4xbglf+2b6DZLGSnqfpEEEfc3bCb6F94V6glrCBiARFrn3ZDjur4HvS9oLQFKTpLNyrWidw1J7uuVKEhB0t10maaKk4QQH63zuIeiumRHe/pMgSc+wAobESjpHnQMPNhMkoSTB7zRBsO9ikv4TGNrb9gr0J+BySXtLGgz8F/AXM0sUafuuSDxRuN3xR+A+YGl4+164/CcE32TfJCj2/j3jPRGCFsdqYBNBQfkzfRGsmW0j6Ja5keAg+BHgzj3Y5E/D998naRvBz/rWPY0zy/8R7OOXCA74dxMcsHMe9M2szczWpm/AViAePi7EUcAzkrYT/GyXmdky4F6CJPRPgq6hVnJ3g+2O3wK/J+iiXBZu+9IibdsVUXpEiHOugoWtoF+b2V69rpz7/fsAiwmK2f5P73aJtyicq0CSBoTnccQkTSToxrttDzZ5CPC6Jwm3OzxRuKoh6dcZo3Uyb78ud2wlIODbBF1lzxOMrPrP3dqQ9HmCoa9XFC06V1O868k551xe3qJwzjmXlycK55xzefXLE+5Gjx5tU6dOLXcYzjlXNebNm/emmTXleq1fJoqpU6cyd+7ccofhnHNVQ9IbPb3mXU/OOefy8kThnHMuL08Uzjnn8vJE4ZxzLi9PFM455/LyROGccy4vTxTOuZzSl8F0zhOFcy6ns69+gl88tKTcYbgK4InCOZfTG5t28vrGnb2v6Po9TxTOuZwSSaM10VdXq3WVzBOFcy6n9mSKtniq3GG4CuCJwjnXjZkRT6Zo8xaFwxOFcy6HZMoww1sUDvBE4ZzLIZ4MhsV6jcKBJwrnXA7tyaAl4S0KB54onHM5JMJE4S0KB54onHM5pLuevEXhwBOFcy6HuLcoXAZPFM65brxG4TJ5onDOdZPZovCJAZ0nCudcN/FEkBzMOusVrnZVVKKQNFzSzZJelbRQ0jGSRkq6X9Li8H5EueN0rr+Lpzq7nLxO4SoqUQA/Bf5uZgcAhwMLgSuAB81sOvBg+Nw5V0LxRGei8DqFq5hEIWkocAJwLYCZtZvZFuAsYHa42mzg7HLE51wtyexuao17i6LWVUyiAPYBNgDXSXpe0m8kDQLGmtkagPB+TDmDdK4WpIvZAG0Jb1HUukpKFDHgSOBXZnYEsINd6GaSdLGkuZLmbtiwoVQxOlcT2jMShbcoXCUlipXASjN7Jnx+M0HiWCdpPEB4vz7Xm81slpnNNLOZTU1NfRKwc/2VtyhcpopJFGa2Flghaf9w0anAK8CdwPnhsvOBO8oQnnM1JZFRo2jzFkXNi5U7gCyXAn+QVA8sBT5JkMxulHQRsBw4p4zxOVcT2r1F4TJUVKIwsxeAmTleOrWPQ3GupsW9RuEyVEzXk3OucmSeR+En3DlPFM65buJdahTe9VTrPFE457rx4bEukycK51w3XUY9eTG75nmicM51E0+mkILHrd71VPM8UTjnuoknUzTEIsQios2L2TWvoobHOucqQ3syRV00QiziLQrnicI5l0M8TBQCb1E4TxTOue7iCaMuKmKRiLconCcK51x38VTQoqiPRrxF4byY7ZzrLp406qMRGuqi3qJwniicc93FE0GLoiHmLQrnicI5l0M8maIuJhrrIj6Fh/NE4Zzrrj2ZIhaJ0BCLeovC5U8Ukg6QdI+kv0naV9LvJG2R9A9JB/ZVkM65vhVPpqiPRmis81FPrvcWxSzgl8ANwEPA34ERwHeBX5Q2NOdcuSSSRl1M3qJwQO+JYoiZ3WVmfwLiZvZnC9xFkDCcc/1Q+oQ7b1E46D1RRDMe/zjrtfoix+KcqxDtSQtHPXmLwvWeKK6WNBjAzH6ZXihpGvBAKQNzzpWP1yhcpryJwsyuAeIAkhoyli8xs8+VNjTnXLnEkyli0c4ahZn1/ibXbxUyPPbXkhoJitrOuRqQPuGusS5CyrpeGtXVnt6Gx54IzAUeA+ZJOqGUwUh6XdLLkl6QNDdcNlLS/ZIWh/deRHeuxOKpzhoFQKvXKWpaoSfcqaRRdHWymc0ws5nh8yuAB81sOvBg+Nw5V0JBjULEosG/ftJbFDWttxrFI8BRwPHATDN7tE+i6uosYHb4eDZwdhlicK6mpLueYpEgUSRSnihqWSEtikvMrAX4TKmDAQy4T9I8SReHy8aa2RqA8H5MH8ThXE2LJ426WIRoJDhEpLyYXdMKSRS/CovZV5c6GOBYMzsSeCfw2V2piUi6WNJcSXM3bNhQugid6+fMLLgUakTeonBA78XsE+jDYraZrQ7v1wO3AUcD6ySND+MZD6zv4b2zzGymmc1samoqZZjO9WvppFAXjRCNeI3C9d6iUNZ9yUgaJGlI+jFwBjAfuBM4P1ztfOCOUsfiXC1LhEmhLhbpKGYnUn7SXS2rpGL2WOBxSS8C/wD+ZmZ/B64CTpe0GDg9fO6cK5H2ZJAU6qIRIgpbFN71VNMKuWb2JWbWKqmkxWwzWwocnmP5RuDUUn62c65TPEwU9dHOGkXSi9k1rddEESaJvYFLJU3NfI+Zva+EsTnnyiCe0aJI1ygSXqOoaYW0KABuB64F7gK8s9K5fiyeCJJCLNpZo/Cup9pWaKJoNbOflTQS51xF6KxRqOM8Ch8eW9sKTRQ/lfRN4D6gLb3QzJ4rSVTOubJJj3Cqj0aIejHbUXiiOBT4OHAKnV1PFj53zvUj6a6nLjUKHx5b0wpNFO8H9jGz9lIG45wrv46up4zzKDxP1LZCZ499ERhewjiccxUi3qVG4S0KV3iLYizwqqRn6Vqj8OGxzvUzmcNjO86j8BpFTSs0UXyzpFE45ypGzvMoPFHUtIISRTiVh3OuBqQve5rZ9eQtitrW2+yxf+1tA4Ws45yrHp1TeHjXkwv01qI4TtKdeV4XcFAR43HOlVk6UcSind8jPVHUtt4SxVkFbMOHzDrXj6TndUq3JsBrFLUub6Lw2oRztSedFGJRkZ40NunDY2taoaOenHM1Ip0oopHOROEtitrmicI510UyXaOIREiFmcJrFLWt0DOzO0gaIemwUgTjnCu/zBaFj3pyUGCikDRH0lBJIwmm87hO0o9LG5pzrhzSScHPo3BphbYohplZM/AB4DozewtwWunCcs6VS9cWhV+PwhWeKGKSxgPnAn6CnXP9WLr1EItEvEXhgMITxXeAe4ElZvaspH2AxaULyzlXLunWQ0T4NbMdUHiiuMvMDjOzzwCY2VIz+2Cxg5EUlfR8eloQSSMl3S9pcXg/otif6ZzrKplKEYsISaTPuUuaJ4paVmiimC/pCUlXSXqXpGEliucyYGHG8yuAB81sOvBg+Nw5V0KJlHW0JKRg5JOfcFfbCkoUZjYNOA94GXgP8KKkF4oZiKRJwLuB32QsPguYHT6eDZxdzM90znWXTFqX6TuiEXkxu8YVdMJdeBA/FjgeOBxYADxe5Fh+AnwZGJKxbKyZrQEwszWSxhT5M51zWTJbFBDM+ZT0GkVNK/TM7OXAs8B/mdklxQ5C0nuA9WY2T9JJu7mNi4GLAaZMmVK84JyrMcmUdZk5NuItippXaI3iCOB64COSnpJ0vaSLihjHscD7JL0O/Bk4RdINwLpwWC7h/fqeNmBms8xsppnNbGpqKmJoztWWnC0KTxQ1rdAaxYsENYLrgIeAE4FvFCsIM7vSzCaZ2VTgw8BDZvYx4E7g/HC184E7ivWZzrnc0qOe0qKRiI96qnGF1ijmAg3AkwS1iRPM7I1SBha6CrgxbL0sB87pg890rqZ5jcJlK7RG8U4z21DSSEJmNgeYEz7eCJzaF5/rnAskUz7qyXVVaI2iXdKPJc0Nbz8q4bkUzrky6taiiPp5FLWu0ETxW2AbwVxP5wLNBPUK51w/E5xH0XloiMpbFLWu0K6nfbOm7Ph2sU+4c85VhuwWRTSijgsYudpUaIuiRdJx6SeSjgVaShOSc66ckqkUsWhWjcKL2TWt0BbFp4HZYV1CwCbgguyVJH2ggG21mtndBUfonOtTuWsUnihqWUGJwsxeAA6XNDR83tzDqv9HcK6Dengd4ATAE4VzFar7qKeI1yhqXN5EIenzPSwHwMyyL4d6j5ld2Ms2b9iVAJ1zfatbjUJ+4aJa11uLYkgvr3cRnk29x+s458onmTLq66Idz2ORCAkfHlvTeksUA83sK5LOMbOb9uSDJJ1uZvfvyTacc6WXa9STtyhqW2+jnt4lqQ64sgifdW0RtuGcK7HsuZ5iUXmLosb11qL4O/AmMEhSZgFbgJnZ0MyVJd3Zw3YEjNrtKJ1zfSaR9BaF6ypvojCzLwFfknSHmZ1VwPaOBz4GbM9aLuDo3QvROdeXEinrch5FzOd6qnmFnkfxavYCST80s69kLX4a2Glmj+RYf9FuxOec62PJlBHNmMIjIm9R1LpCz8w+Pceyd2YvMLN3mtnDuTZgZifsSmDOufJI5KhReKKobXkThaRPS3oZOEDSSxm3ZcBLhXxAeJlT51yVSHarUUQ8UdS43rqe/gjcA/wAuCJj+TYz21TgZ3wH+OtuxOacK4NE1pnZXqNwvRWztwJbJWXXIgZLGmxmywv4jHzTeTjnKkwyq5jto55cocXsvwFGcNBvBPYGFgEHF/DeT+1eaM65cghaFNnXo/DzKGpZQcVsMzvUzA4L76cTDHV9PNe6kr4X3n8nfO8/ihWsc670ktlnZnsxu+YVOuqpCzN7Djiqh5eflXQ1MHe3o3LOlU23UU/e9VTzCup6yppFNgIcCWzIsd43gZHAeUBC0gwz+04xAnXO9Y1uLQovZte8QlsUQzJuDQQ1i25napvZt8OHx4TPC04Skhol/UPSi5IWSPp2uHykpPslLQ7vRxS6Tefcrss16slbFLWt0AsXpQ/aQ4Knlj1FR6bfmtkiSb/dxVjagFPMbHs4EeHjku4BPgA8aGZXSbqCYJhu9igs51wRpFKGGV3OzPYLF7mCWhSSDpH0PDAfWCBpnqRDelj9nPD+g7sSiAXSCaguvBlBy2V2uHw2cPaubNc5V7h0Qug6PNYvXFTrCu16mgV83sz2MrO9gC+Ey3LZ7WK2pKikF4D1wP1m9gww1szWAIT3Y3Z1u865wqQTQq4zs808WdSqQs+jGJQ5h5OZzZE0KHulPS1mm1kSmCFpOHBbnlZLN5IuBi4GmDJlSqFvc85lSJ8vkV2jAEhZcFlUV3sKbVEslfQNSVPD29eBZdkr7UkxO2s7W4A5wJnAOknjAcL79T28Z5aZzTSzmU1NTbvzsc7VvNwtiuCxn3RXuwpNFBcCTcCt4W008Mke1r0OOAy4BUDS1yXdKunIfB8gqSlsSSBpAHAawfTmdwLnh6udD9xRYMzOuV3UUaPI0aLwOkXtKnTU02bgPwpc9wVJ15vZYZKOA94B/C/wK+Cted46HpgtKUqQwG40s79Kegq4UdJFwHI6i+XOuSLrbFFkjnpKtyg8UdSqQmsUuyoZ3r8b+JWZ3SHpW/neYGYvAUfkWL4ROLXoETrnusnVokgnimTSE0Wt2q0pPAqwStI1wLnA3ZIaSvhZzrkiSSeDaK6uJx/1VLNKdfA+F7gXODMsTI8EvlSiz3LOFUnHqKdo1+Gx4DWKWpa360nSzwlOesvJzHLWLcxsJ0HRO/18DbBmN2N0zvWRXKOeYl6jqHm9tSjmAvMIrkFxJLA4vM2gsw7hnOsnvEbhcuntCnezASRdAJxsZvHw+a+B+0oenXOuT+Uf9eTnUdSqQmsUEwhmjk0bHC5zzvUj+VoUKS9m16xCh8deBTwvKT2Nx4nAt0oSkXOubJJhq8FrFC5ToSfcXRdO+Z0+Ye4KM1tburCcc+WQSPbcokh4jaJmFTrNuAim1DjczO4A6iUdXdLInHN9Lueop6hP4VHrCq1R/JJgor/zwufbgKtLEpFzrmziOa5HEZF3PdW6QmsUbzWzI8OLF2FmmyXVlzAu51wZdNYoOr9DxvyEu5pXaIsiHk7WZxDM9Ar4WDnn+pl8NQpPFLWr0ETxM+A2YIyk7wOPAz8oWVTOubLwGoXLpdBRT3+QNI9gFlcBZ5vZwpJG5pzrc/nOo/AT7mpXQYlC0u/N7OMEFxLKXuac6yfyzfXkLYraVWjX08GZT8J6xVuKH45zrpzSLYq6aOehwUc9ubyJQtKVkrYBh0lqlrQtfL4evySpc/1OzjOzvUZR8/ImCjP7gZkNAf7HzIaa2ZDwNsrMruyjGJ1zfcSvme1yKbSYfaWkEcB0ginH08sfLVVgzrm+l6tG4RcucoUWs/8VuAyYBLwAvA14CjilZJE55/pc53kUmSfceY2i1hVazL4MOAp4w8xOBo4ANpQsKudcWXS0KDKn8OjoevLhsbWq0ETRamatAJIazOxVYP/SheWcK4d8NQpvUdSuQhPFSknDgduB+yXdAawuZiCSJkt6WNJCSQskXRYuHynpfkmLw/sRxfxc51ynXKOeOi5c5ImiZhWUKMzs/Wa2xcy+BXwDuBY4u8ixJIAvmNmBBDWQz0o6CLgCeNDMpgMPhs+dcyWQbjVE5S0K1ylvMVvSyByLXw7vBwObihWIma0B1oSPt0laCEwEzgJOClebDcwBvlKsz3XOdUqmjIg66xLgkwK63kc9zSOYMVY5XjNgn6JHBEiaSlAwfwYYGyYRzGyNpDE9vOdi4GKAKVOmlCIs5/q9RMq6jHiCzhFQ3qKoXXkThZnt3VeBpEkaDNwCfM7MmqVcOao7M5sFzAKYOXOm/0U7txuSKetSnwBI5w1vUdSuQs+jOCHX8mKfcCepjiBJ/MHMbg0Xr5M0PmxNjCeYPsQ5VwKJpHUZ8QQZLQq/ZnbNKvQKd1/KeNwIHE3QLVW0E+7C63JfCyw0sx9nvHQncD5wVXjvc0w5VyLJVKrLORQA6byRNE8UtarQKTzem/lc0mTgv4scy7HAx4GXJb0QLvsqQYK4UdJFwHLgnCJ/rnMuFNQouiYKScQiIpH0E+5qVaEtimwrgUOKGYiZPU7uojkEF0xyzpVYrhoFQH0sQnvCE0WtKrRG8XPC62UTnHsxA3ixRDE558ok16gngIZYhHZvUdSsQlsUczMeJ4A/mdkTJYjHOVdGPbUoGmJR2uKeKGpVoTWK2aUOxDlXfrlqFAANdRHaEskyROQqQUFTeEh6j6TnJW3KuNJdc6mDc871rWQqlbtGEY3Q5jWKmlVo19NPgA8AL5v5GDnn+qtEsoeupzpPFLWs0NljVwDzPUk4178lU9ZxjexMDbGodz3VsEJbFF8G7pb0CNCWXph1YpxzrsolUtZx6dNMDT48tqYV2qL4PrCT4KzsIRk351w/kkilchezY971VOmeem0jd7ywqiTbLrRFMdLMzihJBM65itFjjcKHx1a8m+au4JllmzhrxsSib7vQFsUDkjxRONfPJX14bNVqbo0zbEBdSbZdaKL4LPB3SS0+PNa5/ivR0xQePjy24m1tKV2iKPSEO69HOFcD8rcoPFFUsq0tcfYZPbgk2+7tUqgHmNmrko7M9bqZPVeSqJxzZZFIGbForlFPUdri3vVUyZpbEgwdsLvzvObX21Y/T3B50R/leM0o4vUonHPll0yliOa4qqRPClj5ytb1ZGYXh/cnl+TTnXMVpTWeorEud4sinrQeJw105dWeSNEST5anmC3pKEnjMp5/QtIdkn4maWRJInLOlU1LPMmA+mi35Q1h8vCT7irT1pY4AEPLNOrpGqAdOq6bfRVwPbAVmFWSiJxzZdPanqSxrnuiqA/rFj5EtjI1twaJolyjnqJmtil8/CFglpndAtyScblS51w/0RJPMiBHoki3KHzkU2Uqd4siKimdTE4FHsp4rTTldedcWcSTKRIpy50oYsEyPzu7MqUTRblaFH8CHpH0JtACPAYgaRpB95Nzrp9oCYe/5qxRxMIaRdK7nipRc7pF0VieUU/fl/QgMB64L2Oa8QhwaUkics6VRWt774mi1VsUFam5xC2KXqfwMLOnzew2M9uRseyfxT7ZTtJvJa2XND9j2UhJ90taHN6PKOZnOuc6dbQoctYowq6nXaxRrNi0k8v+/Dwt7d4SKaVSdz0VOtdTX/gdcGbWsiuAB81sOvBg+Nw5VwL5EsXujnp6YOE67nhhNS+t3LLH8bmebW2JM6AuSn2sNIf0ikkUZvYosClr8VnA7PDxbODsvozJuVqS/tbfmOc8il1tUSx7c0eXe1capZy+AyooUfRgrJmtAQjvx/S0oqSLJc2VNHfDhg19FqBz/UXerqfwm+qujnrq74nij88s5/qnXi93GCWdvgMqP1EUzMxmmdlMM5vZ1NRU7nCcqzqteRNFukaxa11PSzcECWJpP00UNzz9BrMeXVruMGo+UayTNB4gvF9f5nic67da2oPWQt7hsbvQ9dQaT7J6awvQf1sUKzfvZOXmlo4zo8uluTVesqGxUPmJ4k7g/PDx+cAdZYzFuX4t/6inXa9RvL5xB2YwcfgAlm/cSTJlvb+pijS3xmluTQCwaO22ssZSMy0KSX8CngL2l7RS0kUEc0udLmkxcHr43DlXAulEkWuup86up8ITxbKw2+m0A8fQnkyxektLEaKsHKs2d/48r64p7wU/t7bESzZ9B1TQNBxmdl4PL53ap4E4V6MKOeFuV2oU6brEyQeMYfZTb7D0zR1MHjmwCJEWZsHqrazYtJMzDxlfku1nJopX1pSvRZFMGdtaE7XRonDOlVdHiyLHWPyO8yh2YdTTsjd3MHZoA4dMHBY837C9CFEW7r/uXsgXb3qJzgklimvl5p0ATB8zmIVlbFFsay3thIDgicI5F2qJJ6mPRnJeCjUSEfXRXbtu9rI3dzB11CBGDapnSGOsT0c+7WhL8OyyzWxvS7C2ubUkn7FqSwuNdRGOnTaaRWu3kSpTDWbDtjYAmoY0lOwzPFE454DghLtcV7dLa4hFdqnraeXmnUwZORBJTB4xsEtXTak9vXRjx6Vbl6wvTUtm5eYWJg4fwEHjh9IST/LGpp0l+ZzerNkaJMJxQxtL9hmeKJxzQJAoctUn0hrqIgUPj21PpFi/rY3xwwcAMGF4I6v6sJg9Z9EG6qLBJVsXrytNoli1pYWJIwYybexgAJb2cddaWrrFNH6YJwrnXIn1dNGitIZYtOCup3XNreHQ2ODgNWH4gI5vvqVmZsz553pOmN7EsAF1LCnRAXzl5hYmjRjAlLBAv7xMLYp14X4dM9S7npxzJdYSz30Z1LT6WOE1inRSGD8s3aIYwNaWONvbEnseaC/WNreyYlMLx00fzfQxg0vS9bSzPcGmHe1MHD6AUYPqGVgfLVuiWNPcyshB9R1DmEvBE4VzDgjOpM7b9RSL0BYvrEaRPmdiQtiiSHeLrOmD7qd0V9OB44cybQ8TxY62BGf94nEeenVdl+XpesukEQOQxJSRA1lRxhZFKesT4InCORdqaU8ysLdEUWCLIj11R7pFMTGsVazO0f307OubuPrhJbsabo8Wh4lh+pjBTBszmE072tm0o323tnXHC6t5ceVW/vjM8i7LXwtPJpw6ahAAU0YO5I2NfZMoVmzaye+ffqNj2O/a5lbGlbA+AZ4onHOhwmoUhbcohg2oY1BDcE5vuqid6+zsqx9ewv/cu4jF64pz0tqS9dsYNaieUYMbmDZmcLiss1Xx6tpm5q/q/UrOZtYxM+yji99kR0a32Wth3WPfcPtTRg5k+aadJTtnI9P/u/+ffOP2+dy7IGjlrN3aylhvUTjn+kJvNYpdGfW0ZksrE8LkADB2SAMRde96ao0neXrpRgD+8uyKLq/95IHggLirFq/b3pEg9hs7BIBFa4MT4syMT9/wHGdd/QSzn3w973aeW76ZV9du432HT6A9keKxxZ2XL1iyfjvjhzUyOEyEU0YNpC2R6jinoVR2tCW4Z/5aIDihcHtbgo072ks64gk8UTjnQq3tvbUodqXrqZUJGQevWDTC2KGNrNrStetp7uubaY2naBrSwK3Pr+pIRK3xJL95bBm/f/qNgr79p5kZi9dvZ3o4ZHX8sEZGDKxjweogUby2YTvL3tzBuKGNfPPOBcx7I/taaZ1ufW4VA+ujfO/9hzBiYF3HN3gIEkU6GQF9NvLp7/PX0hJP8h+nTmf5pp38v/v/CZT2HArwROGcC7X0WswufHjs6i0tXVoUEIx8yu56emxxcL7Dt957MJt2tHcUjecsWs/2tgQRwS/nFF6/2LC9ja0tcaaPCVoSkjhk4jDmrw6Szf2vBFcqmH3h0dTHIvztpbU5t2NmzFm0geOmjWZoYx2nHjiWBxeuI55MkUoZr23Yzr5NfZ8obn1+JVNGDuTy06ZzxJTh/P7pNwAY6y0K51xf6K1GUV/gmdk72hJsbYkzfnjXg9f4YY2s2do1UTzyzw3M3Gsk7zh4LEMbYzy4MDiQ3/niakYPbuBTJ+7LPfPXdtQEerNkXWchO+2gCUNZtHYb7YkU97+ylkMnDmPamMGcMH009y5Ym7OusHj9dlZtaeHkA4KLap5x0FiaWxM8s3QTa5pb2dme7Gi1AEwcMQCJkha056/ayhNLNnLuzElI4ryjpnS0wLzryTlXcqmU0RpP5a9RxCIFTQqYTgYTs1oUE4cPYPXW1o45kd7YuINX127jxP2biEUjHDd9NI8u3sC21jgPLlzPuw8dxyePnYqAO55fVdDPkR7xNC3jIH7IhGHEk8aTr73J8yu2cPpBYwF4x8HjWLWlhfmruk/oN2dRkLBO2j+4Wubx05torItw3ytrOwrj0zJaFA2xKOOHNnLP/DXc9vxKdrYX/3yRH923iOED6/jE26cC8O7DxnfUSEpdzK6Yacadc+WT7lLq9TyKArqe0vWASSO6JorJIwfSnkjx4sotHDFlBDfNXUlEcPaMiQCcML2Ju19ey7fveoW2RIr3HzmJMUMaeds+o7jrpTVcfvp+SOrxcxPJFDfOXcHE4QNoGtx5lnJ69tqv3z4fERxgAU47cCzRiLjluZUcOmlYl209/OoGDhg3pGN474D6KCfu18R9C9Z1dDNl1igALjxub655dCmX/+VFhjQsYP9xQ2isi9JYF6GhLkpUojWepC4aobEuyoD6CI2xKNGoSCSNRDJFPBXcJ5JGe3ifSKVoS6R4bPGbfOXMAzquZDeoIcYHjpzI3S+vYWhjaQ/lniicc3mvbpfWUBelNZ4knkxRl2OGWQj69q99fBl7jx7EjMkjurx21owJ/OSBxXz3r69w46eO4eZ5Kzlxv6aOcwBO2C/49n7zvJUcO20UMyYPB+C9h0/gyltfZsHq5o6Dfi6/e/J1Fqxu5pcfPbJLQtlr5EAGN8RYubmFc2dO6qgtjBhUz/uPmMjvnnydhroIx09rYkhjjPteWctTSzdy6SnTumz/jIPGce+CdfzmsWWMGFjHqMFdp8z41+P34cJj92buG5u5ae4KVm1pCc/gTtGWSJJMGY11URIpo6U9SWs8SUs8SSJl1EVELBqhLhqhLipiUVEXiRCLilgkQl0swvsOn8D5b9+ry2d+7d0H8tmTp+VNoMXgicI5V1CiGDWonrZEipnfe4ADxg1h4vABTAhv44c3MmZIA6s2t/DSyq18//2HEI10PXgNaazjy2fuz5dvfolzr3mKtc2tfPO9B3W8PmH4gI4zqS89ZXrH8jMPHsc3bp/PVfe8yqkHjmH8sEbGDRvA2KENjBhYz4LVW/nLsyu49blVnLx/E+88ZFyXz41ExEHjh/Liyi1cfvp+XV676gOHYgbXPLKUax5Z2rH8w0dN5t+zEsVpB43l0InDkOBdh+a+GFIkIo7eeyRH7z2yx/1YTA2xKGOHlm7qjjRPFM45WsKr2zXm6Xq66Li92Xv0IB5YuI7X39zJM8s2sba5tdu1sEcNqueDR07KuY1/OXISzy/fwjNLNzJj8nBOPXBsl9cvePtUXl65lbdmHGhHDKrn3KMmc/PclTy+5M2c222IRfjY2/bislOn5/x2/dV3H8iWne0dXUlpsWiE/z3nMD590j5s2hGnuSXO4MYYb9tnVLdtDBtQx12XHpd75/Rz6oszCfvazJkzbe7cueUOoyzaEykeXrSeE/dryluYLJaW9iSvrGnmyCnDS978daUzf9VW3vPzx/m/T8zsKPYWIpEMphNfs7WF9c1trGtu5dBJw3jLXsX/Rm1mbNrRzpqtrazd2sra5lY272hn6uhBnLBfU0kvBVoLJM0zs5m5XvMWRT/S3Brnkt/P48nXNnLctNHM+sRbGFhful9xeyLFv17/LE8s2ch5R0/mW+87uKQzWLrSKaTrKZdYNNLR/VRqkhg1uIFRgxvy1ipc8fnw2H5i9ZYWzvnVU/xj2SY++tYpPPnam3z82n+wtSVeks9rSyS5/MYXeGLJRt5x8Fj+9I8VfOaG50gkC79UZm/mLFrPh655ii/e9OIunZ3bH2xvS/CXZ5fz4ootfTJ/0Nadwd/JgHo/JLjuqqJFIelM4KdAFPiNmV1V6s9csWkn1z6+jLnhKf5CSKAgICLhY0nhfdbjcP2Ignsy1o1krQvh9jLe13V7netGwsdkrLutNc7c1zfTnkgx+8KjOXbaaI6dNprL/vw8H/zVkxw+aTiR8L2RSLC9aPpnkILlCgpxmZ/RJR46gkXAo4s38PzyLXz1XQdw8Qn78vunXucbdyzgkhvmccC4oUSUuZ/S2w1/lnBZ9s+c3keJZIp75q/lhRVbmDh8AC+v2srN81Zy1owJHDF5eMY2um4vvSwSPsi577r9LjK3lfm7yPy9do0RoMuh2zIfdj7JPL5nPm5NJFm+aScRiTFDGmga0sCYIY2MGFRHPGnc/dIarnl0KW9uD+YNmjF5OF858wAOHD+ESCT43UXD31Xn493v9muNJ/mfexcxalA908Izmp3LVPE1CklR4J/A6cBK4FngPDN7paf37GmN4pZ5K7nytpcxM962zyjqohHMjJQFx4T0PjODlBlmwQHCwtdJLw/XtXDdjueZ64fr0rFO53ZS4YPs7aQ/k3D5gPoo08YM5nOn7ceB44d2/BxzFq3ne39bSEt7kpRZeKPjZ0mZkUpZxzY7lpl1jZeuBzqAIY0xfvjBw7qM/vjpA4u5+uElxFOpbuvvqn2aBnH+MVM57+gptCWSXPPIUmY9trTgSemq3dF7j+Ty0/ZjyfptXP3wax2Xu+xJOmmkvwxEpSCpRNJfBEQ0Y3lEwRDM+miEne1B4pp94dGcGA5RdbUnX42iGhLFMcC3zOwd4fMrAczsBz29Z3cSRWs8yR0vrOKuF9fw+JI3OWafUfzo3MP7pO+1mlhGkopE8n+LtayEk8pKkEZn4upIRuHyYQPqun1Lbo0naWlPdtteZzLNStBhnNmJLxVmc8t+X0Z8Pb0vM6TM6DJj7bo8c/3gSSyqjgverG9uZcO2NtZva2NLSxzMOGrvkRwwrjPht7Qn+etLq9nWmuhI5MkU4X1wMzOSvS1PBY9TqWAb6ZO72hMpTj9oHB9565S8v0/Xv1V7MXsikDn/8ErgrdkrSboYuBhgypRd/4OX4Ht/W8jIQfV88Yz9+NSJ+/Z4UlEtk7p2wRS+7p6PiArOcu1fxfLBTYPZp2lw3nUG1Ec5Z+bkPorIue6qIVHkOsJ0awaZ2SxgFgQtil39kIZYlL9/7gQmDGv0YZ7OOZehGhLFSiDz69QkYHUpPih7EjPnnHPVMTz2WWC6pL0l1QMfBu4sc0zOOVczKr5FYWYJSf8O3EswPPa3ZragzGE551zNqPhEAWBmdwN3lzsO55yrRdXQ9eScc66MPFE455zLyxOFc865vDxROOecy6vip/DYHZI2AG/s5ttHA7mvjlK5qiHmaogxW7XFXG3xplVb3NUWLxQW815mlnOyr36ZKPaEpLk9zXdSqaoh5mqIMVu1xVxt8aZVW9zVFi/secze9eSccy4vTxTOOefy8kTR3axyB7AbqiHmaogxW7XFXG3xplVb3NUWL+xhzF6jcM45l5e3KJxzzuXlicI551xeniiccy6D/Mpl3XiicK6KSKordwy7Q9Kg8L4aDsLDoGpi7aYUcddUopB0mKSx5Y5jV0g6RdKFkqaVO5aeSDpd0qWSZpQ7lkJJOlrS9ZKGlzuWQkh6h6RrgUPKHcuukPQeSfcDHwWwCh49E/6vLQL+AJUdayZJ75L0fUnvh9LEXROJQtJwSbcDzwHvltRY5pB6JWmspNuA7wIzgF9JOiN8rSK+6UgaJ+kW4JsE38KulnRmmcMq1OnAe4HjJFXsdVkkjZZ0J/A14E4ze77cMRVK0mnAd4Crw2vaVyRJkyX9GfgWcBewTNLo8kbVO0kNkn4DXEkwZdGPJf1LKT6rYv9BimwS8DDwGHAwcCBQ6f9wZwAvmNm3ASR9BjgbuK+Cvum8HZhjZj+Hju6FZHlDyk+Swv3XRvD38AngFWBpWQPr2dEE8/R80cyelFRnZvFyB1Wgk4Brzez2sMuszsx2ljmmXD4CPGlmP5N0CPATYHN5QyrIwPD+I2a2Imwdt5big/pti0LSqZIODJ8uIjjh5BfAUIJvkSPKFlwPwpgPCp/eA1yb8XIUWBuuV7bfW1aMt2ckiU8BnwYOlHRquKwi/r7CmA+AoFkeHrSGA58nSBinhOtVxBenrH38NHAT8E5JnwVukfR1SR8M162IfQxd93NoHdAq6aPAM8AsSV8rT3RdhbEeDGBmPzSzn4WP5wN7ASeH61VE6z0tax+PBSYDp0u6jKBFdKKkfyv251bEP0YxSZoM3EnwjSAVNilvNrMt4eu3AucC8yXNCQ8cKue39B5ivsnM3sz4BjmAIMlhZqkKifFmYEtYm9gH+BjB39QNkg4zsw19HWemHmK+zcw2ht++Ggm6zW4JW2yfBZ6qsHj/CDwC/BSIAz8gOJDNkvSImZV9FtMe4r4BSAFHEXwhPYfgG/CvJT1lZg+V4/+uh1hvMbPNkuoJ9vEtBPu4YuoUPcR9HfDfwLuAdwDHE+zj30t61MwWSYoU43hRMd9GiugA4EEzO4Xgn2p/4PL0i2Z2D7AROCZMEo3pZFGecIHcMX8hfC3dlXMSQSsDSUPC+76MOV+ML5vZV8zsr2Z2O0GXzkV9GFtPcsX8ufC1VoK6yteBCcAGMytbkghlx3sg8Hkzew643MxOMbP7zew3wH3AJ8sYa6ZccV8KzAamA03ASjN7mSDpfQzKdhDu8W/CzNrDmEYBIwEkRcsQYy659vE3zOxBgr+FX5jZPDN7DHgA+Hco3pfK/pgoDgPSI4QeJ/h28BZJmVPs/pCgi+RvwKuSxpX5m0OumI+UNNPMUpKGEjTjn5X0DeA2SaP6OOZcMR4RxphMd4GE3TctwEN9GFtPevpb2Iug5fMYsAyYCYwKm/Xl/MKQHe9NwDGSjjSzuVn7OEll7GPIHfcpwBjgl8AGID3IoR54sq8DzFDI8eFu4DwAM6uUmluufXxU2A01luDvJJ3U4gQ12aKp+kSR8c+T/ge/Hhgf/nO1AQsJdto5GW87iqCAtRk43szW9mHIuxNzA0HR9WlgKvAJM9tYYTGOlvRxgj/iOEGBuE8VGPMc4EKClsRYM/uuma0Avg3M68vkW2C8DwEfCl8fGPb3P0nQIlrUV7Fm2oW4LzCzW4DbgfdLegLYl+DgXEmxZh8fVgNLJO3dV3Fm24W/5Q8BfyEYsHOdpOcIWsoPFjOeqkwUkg6V9AXobFpl/INvAW4jKKwCNANrAJNUJ6mBoGl5hpl9LDxIVGzM4fPDgPsJEsRFZra6AmOcStBH+iUz+1cz216KGIsQ8yqCxBs3sw1hYRszuytdx6qweDP38TTgGOALfbmPdzPuVUCjpKiZ3Q18ETjfzN5vZiUdUbQHx4eGcNkq4EozW1bKOLPt5j4eEiaO8wgG7FxiZh8xs61FDc7Mqu5GUNRpBU4Kn0eBWMbr+xI0Hy8On78H+F0Vxjy7CmKsxv16XZXFW9Z9XG1xV9vfRDXs46qaZlxSzMwSkr5I0P95jJkdn7XO+cByoB34OfAsQf/od8zs2r4eaVGkmIsycqHEMVbjfu2zmKst3mLG7bHmVxVxlzuLFpBlTwdOy3gugm6Y6cCtwEXh8qHAywSn348Pl00F/gWY7jFXX4zVHnO1xVuNcVdTrNUcd5/unF3ckQcDfyYoNM0Ml8XC+/8hGAN/JEFB75Zwhx7sMVd/jNUec7XFW41xV1Os/SHuiipmpyv8kkYCjwKbzOxkM5sLYEHzbCAwniCrfoRgaNgYM2smHGmjPjxbtRpiroYYqz3maou3GuOuplj7Q9yZKipREGRTzGwTQXZtAJB0gaQzJE2zzrlingWGEIzXniTpUAvTsvXtmcvVEHM1xFjtMVdbvNUYdzXF2h/i7lARxWxJpwNfJmhuPW5mf5Y0gGB+mCaCaRVWACcCHyao/i82s3+G7/848IiZLfeYqyvGao+52uKtxrirKdb+EHdO5ez3CpPUNIIddxZwBEHR5qvha+8lGHudXvc6gip/+nkEiHjM1RljtcdcbfFWY9zVFGt/iLvHn6dMO7FjRxBc0OSXGa9dSHByyZjM9cP7D2au6zFXX4zVHnO1xVuNcVdTrP0h7kJufV6jkPRJYCXBBXkgGPp1nqSp4fM64DXgf9PvsWC+o/MJZvq8t++iDVRDzNUQY7Zqi7na4k2rprirKdZM1Rp3wfo44w4mmPflMoKrzR0QLv8J8CfgCYLpiQ8F/kZw8skoggLQHOCoMnxLqPiYqyHGao+52uKtxrirKdb+EPcu/Yxl2KlTwvurgL+Ej6ME0/oeFz6fDPyOYIbPGLBXWXdSFcRcDTFWe8zVFm81xl1NsfaHuAu99XnXk3VW8H8C7C3pHRZM5bvVzB4PX7sE2BmunzCzN/o6zkzVEHM1xJit2mKutnjTqinuaoo1U7XGXbAyZ+FPEQz/Sj8/GriDYOKrceXOotUaczXEWO0xV1u81Rh3NcXaH+LOdyvbeRQKJ7qTdDPBNL9tBFdmWmxmr5UlqF5UQ8zVEGO2aou52uJNq6a4qynWTNUad2/KdmZ2uDMHEhR2zgOWm9nfK3lnVkPM1RBjtmqLudriTaumuKsp1kzVGndvYmX+/M8QjBI43YKLb1SDaoi5GmLMVm0xV1u8adUUdzXFmqla4+5RWafwUImvs1AK1RBzNcSYrdpirrZ406op7mqKNVO1xp1PRcz15JxzrnJV2uyxzjnnKownCuecc3l5onDOOZeXJwrn9pCk4ZI+Ez6eEI6hd67f8GK2c3sonCH0r2Z2SLljca4Uyn0ehXP9wVXAvpJeABYDB5rZIZIuAM4mmBzuEOBHQD3wcYIzdt9lZpsk7QtcTXDVs53Av5nZq339QzjXE+96cm7PXQG8ZmYzgC9lvXYI8BGC+X6+D+w0syMILoP5iXCdWcClZvYW4IvAL/siaOcK5S0K50rrYTPbBmyTtBW4K1z+MnCYpMHA24GbJKXf09D3YTrXM08UzpVW5hQOqYznKYL/vwiwJWyNOFeRvOvJuT23DRiyO280s2ZgmaRzABQ4vJjBObenPFE4t4fMbCPwhKT5BJe33FUfBS6S9CKwADirmPE5t6d8eKxzzrm8vEXhnHMuL08Uzjnn8vJE4ZxzLi9PFM455/LyROGccy4vTxTOOefy8kThnHMuL08Uzjnn8vr/HJ0J1lxqrwwAAAAASUVORK5CYII=\n", @@ -516,7 +512,7 @@ } ], "source": [ - "model.q_sim.plot()" + "model.q_sim.plot();" ] }, { @@ -536,6 +532,7 @@ "source": [ "import datetime as dt\n", "from ravenpy.models import GR4JCN, HMETS, MOHYSE, HBVEC\n", + "\n", "model = GR4JCN()\n", "model(\n", " forcing,\n", @@ -546,7 +543,6 @@ " latitude=54.4848,\n", " longitude=-123.3659,\n", " params=(0.529, -3.396, 407.29, 1.072, 16.9, 0.947),\n", - " name=\"Salmon\",\n", ")" ] }, @@ -688,22 +684,22 @@ " var css_urls = [\"https://unpkg.com/tabulator-tables@4.9.3/dist/css/tabulator_simple.min.css\"];\n", " var inline_js = [\n", " function(Bokeh) {\n", - " inject_raw_css(\".bk.alert {\\n padding: 0.75rem 1.25rem;\\n border: 1px solid transparent;\\n border-radius: 0.25rem;\\n /* Don't set margin because that will not render correctly! */\\n /* margin-bottom: 1rem; */\\n margin-top: 15px;\\n margin-bottom: 15px;\\n}\\n.bk.alert a {\\n color: rgb(11, 46, 19); /* #002752; */\\n font-weight: 700;\\n text-decoration: rgb(11, 46, 19);\\n text-decoration-color: rgb(11, 46, 19);\\n text-decoration-line: none;\\n text-decoration-style: solid;\\n text-decoration-thickness: auto;\\n }\\n.bk.alert a:hover {\\n color: rgb(11, 46, 19);\\n font-weight: 700;\\n text-decoration: underline;\\n}\\n\\n.bk.alert-primary {\\n color: #004085;\\n background-color: #cce5ff;\\n border-color: #b8daff;\\n}\\n.bk.alert-primary hr {\\n border-top-color: #9fcdff;\\n}\\n\\n.bk.alert-secondary {\\n color: #383d41;\\n background-color: #e2e3e5;\\n border-color: #d6d8db;\\n }\\n.bk.alert-secondary hr {\\n border-top-color: #c8cbcf;\\n}\\n\\n.bk.alert-success {\\n color: #155724;\\n background-color: #d4edda;\\n border-color: #c3e6cb;\\n }\\n\\n.bk.alert-success hr {\\n border-top-color: #b1dfbb;\\n}\\n\\n.bk.alert-info {\\n color: #0c5460;\\n background-color: #d1ecf1;\\n border-color: #bee5eb;\\n }\\n.bk.alert-info hr {\\n border-top-color: #abdde5;\\n}\\n\\n.bk.alert-warning {\\n color: #856404;\\n background-color: #fff3cd;\\n border-color: #ffeeba;\\n }\\n\\n.bk.alert-warning hr {\\n border-top-color: #ffe8a1;\\n}\\n\\n.bk.alert-danger {\\n color: #721c24;\\n background-color: #f8d7da;\\n border-color: #f5c6cb;\\n}\\n.bk.alert-danger hr {\\n border-top-color: #f1b0b7;\\n}\\n\\n.bk.alert-light {\\n color: #818182;\\n background-color: #fefefe;\\n border-color: #fdfdfe;\\n }\\n.bk.alert-light hr {\\n border-top-color: #ececf6;\\n}\\n\\n.bk.alert-dark {\\n color: #1b1e21;\\n background-color: #d6d8d9;\\n border-color: #c6c8ca;\\n }\\n.bk.alert-dark hr {\\n border-top-color: #b9bbbe;\\n}\\n\\n\\n/* adjf\\u00e6l */\\n\\n.bk.alert-primary a {\\n color: #002752;\\n}\\n\\n.bk.alert-secondary a {\\n color: #202326;\\n}\\n\\n\\n.bk.alert-success a {\\n color: #0b2e13;\\n}\\n\\n\\n.bk.alert-info a {\\n color: #062c33;\\n}\\n\\n\\n.bk.alert-warning a {\\n color: #533f03;\\n}\\n\\n\\n.bk.alert-danger a {\\n color: #491217;\\n}\\n\\n.bk.alert-light a {\\n color: #686868;\\n}\\n\\n.bk.alert-dark a {\\n color: #040505;\\n}\");\n", + " inject_raw_css(\"table.panel-df {\\n margin-left: auto;\\n margin-right: auto;\\n border: none;\\n border-collapse: collapse;\\n border-spacing: 0;\\n color: black;\\n font-size: 12px;\\n table-layout: fixed;\\n width: 100%;\\n}\\n\\n.panel-df tr, .panel-df th, .panel-df td {\\n text-align: right;\\n vertical-align: middle;\\n padding: 0.5em 0.5em !important;\\n line-height: normal;\\n white-space: normal;\\n max-width: none;\\n border: none;\\n}\\n\\n.panel-df tbody {\\n display: table-row-group;\\n vertical-align: middle;\\n border-color: inherit;\\n}\\n\\n.panel-df tbody tr:nth-child(odd) {\\n background: #f5f5f5;\\n}\\n\\n.panel-df thead {\\n border-bottom: 1px solid black;\\n vertical-align: bottom;\\n}\\n\\n.panel-df tr:hover {\\n background: lightblue !important;\\n cursor: pointer;\\n}\\n\");\n", " },\n", " function(Bokeh) {\n", " inject_raw_css(\".bk.panel-widget-box {\\n min-height: 20px;\\n background-color: #f5f5f5;\\n border: 1px solid #e3e3e3;\\n border-radius: 4px;\\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n overflow-x: hidden;\\n overflow-y: hidden;\\n}\\n\\n.scrollable {\\n overflow: scroll;\\n}\\n\\nprogress {\\n appearance: none;\\n -moz-appearance: none;\\n -webkit-appearance: none;\\n border: none;\\n height: 20px;\\n background-color: whiteSmoke;\\n border-radius: 3px;\\n box-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n color: royalblue;\\n position: relative;\\n margin: 0 0 1.5em;\\n}\\n\\nprogress[value]::-webkit-progress-bar {\\n background-color: whiteSmoke;\\n border-radius: 3px;\\n box-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n}\\n\\nprogress[value]::-webkit-progress-value {\\n position: relative;\\n background-size: 35px 20px, 100% 100%, 100% 100%;\\n border-radius:3px;\\n}\\n\\nprogress.active:not([value])::before {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress[value]::-moz-progress-bar {\\n background-size: 35px 20px, 100% 100%, 100% 100%;\\n border-radius:3px;\\n}\\n\\nprogress:not([value])::-moz-progress-bar {\\n border-radius:3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\n\\nprogress.active:not([value])::-moz-progress-bar {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress.active:not([value])::-webkit-progress-bar {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress.primary[value]::-webkit-progress-value { background-color: #007bff; }\\nprogress.primary:not([value])::before { background-color: #007bff; }\\nprogress.primary:not([value])::-webkit-progress-bar { background-color: #007bff; }\\nprogress.primary::-moz-progress-bar { background-color: #007bff; }\\n\\nprogress.secondary[value]::-webkit-progress-value { background-color: #6c757d; }\\nprogress.secondary:not([value])::before { background-color: #6c757d; }\\nprogress.secondary:not([value])::-webkit-progress-bar { background-color: #6c757d; }\\nprogress.secondary::-moz-progress-bar { background-color: #6c757d; }\\n\\nprogress.success[value]::-webkit-progress-value { background-color: #28a745; }\\nprogress.success:not([value])::before { background-color: #28a745; }\\nprogress.success:not([value])::-webkit-progress-bar { background-color: #28a745; }\\nprogress.success::-moz-progress-bar { background-color: #28a745; }\\n\\nprogress.danger[value]::-webkit-progress-value { background-color: #dc3545; }\\nprogress.danger:not([value])::before { background-color: #dc3545; }\\nprogress.danger:not([value])::-webkit-progress-bar { background-color: #dc3545; }\\nprogress.danger::-moz-progress-bar { background-color: #dc3545; }\\n\\nprogress.warning[value]::-webkit-progress-value { background-color: #ffc107; }\\nprogress.warning:not([value])::before { background-color: #ffc107; }\\nprogress.warning:not([value])::-webkit-progress-bar { background-color: #ffc107; }\\nprogress.warning::-moz-progress-bar { background-color: #ffc107; }\\n\\nprogress.info[value]::-webkit-progress-value { background-color: #17a2b8; }\\nprogress.info:not([value])::before { background-color: #17a2b8; }\\nprogress.info:not([value])::-webkit-progress-bar { background-color: #17a2b8; }\\nprogress.info::-moz-progress-bar { background-color: #17a2b8; }\\n\\nprogress.light[value]::-webkit-progress-value { background-color: #f8f9fa; }\\nprogress.light:not([value])::before { background-color: #f8f9fa; }\\nprogress.light:not([value])::-webkit-progress-bar { background-color: #f8f9fa; }\\nprogress.light::-moz-progress-bar { background-color: #f8f9fa; }\\n\\nprogress.dark[value]::-webkit-progress-value { background-color: #343a40; }\\nprogress.dark:not([value])::-webkit-progress-bar { background-color: #343a40; }\\nprogress.dark:not([value])::before { background-color: #343a40; }\\nprogress.dark::-moz-progress-bar { background-color: #343a40; }\\n\\nprogress:not([value])::-webkit-progress-bar {\\n border-radius: 3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\nprogress:not([value])::before {\\n content:\\\" \\\";\\n position:absolute;\\n height: 20px;\\n top:0;\\n left:0;\\n right:0;\\n bottom:0;\\n border-radius: 3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\n\\n@keyframes stripes {\\n from {background-position: 0%}\\n to {background-position: 100%}\\n}\\n\\n.bk-root .bk.loader {\\n overflow: hidden;\\n}\\n\\n.bk.loader::after {\\n content: \\\"\\\";\\n border-radius: 50%;\\n -webkit-mask-image: radial-gradient(transparent 50%, rgba(0, 0, 0, 1) 54%);\\n width: 100%;\\n height: 100%;\\n left: 0;\\n top: 0;\\n position: absolute;\\n}\\n\\n.bk-root .bk.loader.dark::after {\\n background: #0f0f0f;\\n}\\n\\n.bk-root .bk.loader.light::after {\\n background: #f0f0f0;\\n}\\n\\n.bk-root .bk.loader.spin::after {\\n animation: spin 2s linear infinite;\\n}\\n\\n.bk-root div.bk.loader.spin.primary-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #007bff 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.secondary-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #6c757d 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.success-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #28a745 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.danger-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #dc3545 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.warning-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #ffc107 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.info-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #17a2b8 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.light-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #f8f9fa 50%);\\n}\\n\\n.bk-root div.bk.loader.dark-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #343a40 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.primary-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #007bff 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.secondary-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #6c757d 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.success-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #28a745 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.danger-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #dc3545 50%)\\n}\\n\\n.bk-root div.bk.loader.spin.warning-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #ffc107 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.info-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #17a2b8 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.light-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #f8f9fa 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.dark-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #343a40 50%);\\n}\\n\\n/* Safari */\\n@-webkit-keyframes spin {\\n 0% { -webkit-transform: rotate(0deg); }\\n 100% { -webkit-transform: rotate(360deg); }\\n}\\n\\n@keyframes spin {\\n 0% { transform: rotate(0deg); }\\n 100% { transform: rotate(360deg); }\\n}\\n\\n.dot div {\\n height: 100%;\\n width: 100%;\\n border: 1px solid #000 !important;\\n background-color: #fff;\\n border-radius: 50%;\\n display: inline-block;\\n}\\n\\n.dot-filled div {\\n height: 100%;\\n width: 100%;\\n border: 1px solid #000 !important;\\n border-radius: 50%;\\n display: inline-block;\\n}\\n\\n.dot-filled.primary div {\\n background-color: #007bff;\\n}\\n\\n.dot-filled.secondary div {\\n background-color: #6c757d;\\n}\\n\\n.dot-filled.success div {\\n background-color: #28a745;\\n}\\n\\n.dot-filled.danger div {\\n background-color: #dc3545;\\n}\\n\\n.dot-filled.warning div {\\n background-color: #ffc107;\\n}\\n\\n.dot-filled.info div {\\n background-color: #17a2b8;\\n}\\n\\n.dot-filled.dark div {\\n background-color: #343a40;\\n}\\n\\n.dot-filled.light div {\\n background-color: #f8f9fa;\\n}\\n\");\n", " },\n", " function(Bokeh) {\n", - " inject_raw_css(\".bk.card {\\n border: 1px solid rgba(0,0,0,.125);\\n border-radius: 0.25rem;\\n}\\n.bk.accordion {\\n border: 1px solid rgba(0,0,0,.125);\\n}\\n.bk.card-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0.25rem;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\n.bk.accordion-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\np.bk.card-button {\\n background-color: transparent;\\n font-size: 1.25rem;\\n font-weight: 700;\\n margin: 0;\\n margin-left: -15px;\\n}\\n.bk.card-header-row {\\n position: relative !important;\\n}\\n.bk.card-title {\\n align-items: center;\\n display: flex !important;\\n font-size: 1.4em;\\n font-weight: bold;\\n padding: 0.25em;\\n position: relative !important;\\n}\\n\");\n", + " inject_raw_css(\".bk.pn-loading:before {\\n position: absolute;\\n height: 100%;\\n width: 100%;\\n content: '';\\n z-index: 1000;\\n background-color: rgb(255,255,255,0.50);\\n border-color: lightgray;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: auto 50%;\\n border-width: 1px;\\n cursor: progress;\\n}\\n.bk.pn-loading.arcs:hover:before {\\n cursor: progress;\\n}\\n\");\n", " },\n", " function(Bokeh) {\n", - " inject_raw_css(\".json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n\");\n", + " inject_raw_css(\".bk.card {\\n border: 1px solid rgba(0,0,0,.125);\\n border-radius: 0.25rem;\\n}\\n.bk.accordion {\\n border: 1px solid rgba(0,0,0,.125);\\n}\\n.bk.card-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0.25rem;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\n.bk.accordion-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\np.bk.card-button {\\n background-color: transparent;\\n font-size: 1.25rem;\\n font-weight: 700;\\n margin: 0;\\n margin-left: -15px;\\n}\\n.bk.card-header-row {\\n position: relative !important;\\n}\\n.bk.card-title {\\n align-items: center;\\n display: flex !important;\\n font-size: 1.4em;\\n font-weight: bold;\\n padding: 0.25em;\\n position: relative !important;\\n}\\n\");\n", " },\n", " function(Bokeh) {\n", - " inject_raw_css(\".bk.pn-loading:before {\\n position: absolute;\\n height: 100%;\\n width: 100%;\\n content: '';\\n z-index: 1000;\\n background-color: rgb(255,255,255,0.50);\\n border-color: lightgray;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: auto 50%;\\n border-width: 1px;\\n cursor: progress;\\n}\\n.bk.pn-loading.arcs:hover:before {\\n cursor: progress;\\n}\\n\");\n", + " inject_raw_css(\".json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n\");\n", " },\n", " function(Bokeh) {\n", - " inject_raw_css(\"table.panel-df {\\n margin-left: auto;\\n margin-right: auto;\\n border: none;\\n border-collapse: collapse;\\n border-spacing: 0;\\n color: black;\\n font-size: 12px;\\n table-layout: fixed;\\n width: 100%;\\n}\\n\\n.panel-df tr, .panel-df th, .panel-df td {\\n text-align: right;\\n vertical-align: middle;\\n padding: 0.5em 0.5em !important;\\n line-height: normal;\\n white-space: normal;\\n max-width: none;\\n border: none;\\n}\\n\\n.panel-df tbody {\\n display: table-row-group;\\n vertical-align: middle;\\n border-color: inherit;\\n}\\n\\n.panel-df tbody tr:nth-child(odd) {\\n background: #f5f5f5;\\n}\\n\\n.panel-df thead {\\n border-bottom: 1px solid black;\\n vertical-align: bottom;\\n}\\n\\n.panel-df tr:hover {\\n background: lightblue !important;\\n cursor: pointer;\\n}\\n\");\n", + " inject_raw_css(\".bk.alert {\\n padding: 0.75rem 1.25rem;\\n border: 1px solid transparent;\\n border-radius: 0.25rem;\\n /* Don't set margin because that will not render correctly! */\\n /* margin-bottom: 1rem; */\\n margin-top: 15px;\\n margin-bottom: 15px;\\n}\\n.bk.alert a {\\n color: rgb(11, 46, 19); /* #002752; */\\n font-weight: 700;\\n text-decoration: rgb(11, 46, 19);\\n text-decoration-color: rgb(11, 46, 19);\\n text-decoration-line: none;\\n text-decoration-style: solid;\\n text-decoration-thickness: auto;\\n }\\n.bk.alert a:hover {\\n color: rgb(11, 46, 19);\\n font-weight: 700;\\n text-decoration: underline;\\n}\\n\\n.bk.alert-primary {\\n color: #004085;\\n background-color: #cce5ff;\\n border-color: #b8daff;\\n}\\n.bk.alert-primary hr {\\n border-top-color: #9fcdff;\\n}\\n\\n.bk.alert-secondary {\\n color: #383d41;\\n background-color: #e2e3e5;\\n border-color: #d6d8db;\\n }\\n.bk.alert-secondary hr {\\n border-top-color: #c8cbcf;\\n}\\n\\n.bk.alert-success {\\n color: #155724;\\n background-color: #d4edda;\\n border-color: #c3e6cb;\\n }\\n\\n.bk.alert-success hr {\\n border-top-color: #b1dfbb;\\n}\\n\\n.bk.alert-info {\\n color: #0c5460;\\n background-color: #d1ecf1;\\n border-color: #bee5eb;\\n }\\n.bk.alert-info hr {\\n border-top-color: #abdde5;\\n}\\n\\n.bk.alert-warning {\\n color: #856404;\\n background-color: #fff3cd;\\n border-color: #ffeeba;\\n }\\n\\n.bk.alert-warning hr {\\n border-top-color: #ffe8a1;\\n}\\n\\n.bk.alert-danger {\\n color: #721c24;\\n background-color: #f8d7da;\\n border-color: #f5c6cb;\\n}\\n.bk.alert-danger hr {\\n border-top-color: #f1b0b7;\\n}\\n\\n.bk.alert-light {\\n color: #818182;\\n background-color: #fefefe;\\n border-color: #fdfdfe;\\n }\\n.bk.alert-light hr {\\n border-top-color: #ececf6;\\n}\\n\\n.bk.alert-dark {\\n color: #1b1e21;\\n background-color: #d6d8d9;\\n border-color: #c6c8ca;\\n }\\n.bk.alert-dark hr {\\n border-top-color: #b9bbbe;\\n}\\n\\n\\n/* adjf\\u00e6l */\\n\\n.bk.alert-primary a {\\n color: #002752;\\n}\\n\\n.bk.alert-secondary a {\\n color: #202326;\\n}\\n\\n\\n.bk.alert-success a {\\n color: #0b2e13;\\n}\\n\\n\\n.bk.alert-info a {\\n color: #062c33;\\n}\\n\\n\\n.bk.alert-warning a {\\n color: #533f03;\\n}\\n\\n\\n.bk.alert-danger a {\\n color: #491217;\\n}\\n\\n.bk.alert-light a {\\n color: #686868;\\n}\\n\\n.bk.alert-dark a {\\n color: #040505;\\n}\");\n", " },\n", " function(Bokeh) {\n", " inject_raw_css(\".codehilite .hll { background-color: #ffffcc }\\n.codehilite { background: #f8f8f8; }\\n.codehilite .c { color: #408080; font-style: italic } /* Comment */\\n.codehilite .err { border: 1px solid #FF0000 } /* Error */\\n.codehilite .k { color: #008000; font-weight: bold } /* Keyword */\\n.codehilite .o { color: #666666 } /* Operator */\\n.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */\\n.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */\\n.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */\\n.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */\\n.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */\\n.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */\\n.codehilite .gd { color: #A00000 } /* Generic.Deleted */\\n.codehilite .ge { font-style: italic } /* Generic.Emph */\\n.codehilite .gr { color: #FF0000 } /* Generic.Error */\\n.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */\\n.codehilite .gi { color: #00A000 } /* Generic.Inserted */\\n.codehilite .go { color: #888888 } /* Generic.Output */\\n.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\\n.codehilite .gs { font-weight: bold } /* Generic.Strong */\\n.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\\n.codehilite .gt { color: #0044DD } /* Generic.Traceback */\\n.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\\n.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\\n.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\\n.codehilite .kp { color: #008000 } /* Keyword.Pseudo */\\n.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\\n.codehilite .kt { color: #B00040 } /* Keyword.Type */\\n.codehilite .m { color: #666666 } /* Literal.Number */\\n.codehilite .s { color: #BA2121 } /* Literal.String */\\n.codehilite .na { color: #7D9029 } /* Name.Attribute */\\n.codehilite .nb { color: #008000 } /* Name.Builtin */\\n.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */\\n.codehilite .no { color: #880000 } /* Name.Constant */\\n.codehilite .nd { color: #AA22FF } /* Name.Decorator */\\n.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */\\n.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */\\n.codehilite .nf { color: #0000FF } /* Name.Function */\\n.codehilite .nl { color: #A0A000 } /* Name.Label */\\n.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\\n.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */\\n.codehilite .nv { color: #19177C } /* Name.Variable */\\n.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\\n.codehilite .w { color: #bbbbbb } /* Text.Whitespace */\\n.codehilite .mb { color: #666666 } /* Literal.Number.Bin */\\n.codehilite .mf { color: #666666 } /* Literal.Number.Float */\\n.codehilite .mh { color: #666666 } /* Literal.Number.Hex */\\n.codehilite .mi { color: #666666 } /* Literal.Number.Integer */\\n.codehilite .mo { color: #666666 } /* Literal.Number.Oct */\\n.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */\\n.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */\\n.codehilite .sc { color: #BA2121 } /* Literal.String.Char */\\n.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */\\n.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\\n.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */\\n.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */\\n.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */\\n.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */\\n.codehilite .sx { color: #008000 } /* Literal.String.Other */\\n.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */\\n.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */\\n.codehilite .ss { color: #19177C } /* Literal.String.Symbol */\\n.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */\\n.codehilite .fm { color: #0000FF } /* Name.Function.Magic */\\n.codehilite .vc { color: #19177C } /* Name.Variable.Class */\\n.codehilite .vg { color: #19177C } /* Name.Variable.Global */\\n.codehilite .vi { color: #19177C } /* Name.Variable.Instance */\\n.codehilite .vm { color: #19177C } /* Name.Variable.Magic */\\n.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */\\n\\n.markdown h1 { margin-block-start: 0.34em }\\n.markdown h2 { margin-block-start: 0.42em }\\n.markdown h3 { margin-block-start: 0.5em }\\n.markdown h4 { margin-block-start: 0.67em }\\n.markdown h5 { margin-block-start: 0.84em }\\n.markdown h6 { margin-block-start: 1.17em }\\n.markdown ul { padding-inline-start: 2em }\\n.markdown ol { padding-inline-start: 2em }\\n.markdown strong { font-weight: 600 }\\n.markdown a { color: -webkit-link }\\n.markdown a { color: -moz-hyperlinkText }\\n\");\n", @@ -874,11 +870,11 @@ " function _(t,_,n,o,r){o();t(1).__exportStar(t(2),n)},\n", " function _(t,e,n,r,o){r();var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};n.__extends=function(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)};function i(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}function c(t,e){var n=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function u(t){return this instanceof u?(this.v=t,this):new u(t)}n.__assign=function(){return n.__assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;c--)(o=t[c])&&(i=(a<3?o(i):a>3?o(e,n,i):o(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},n.__param=function(t,e){return function(n,r){e(n,r,t)}},n.__metadata=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},n.__awaiter=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},n.__generator=function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError(\"Generator is already executing.\");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]1||c(t,e)}))})}function c(t,e){try{(n=o[t](e)).value instanceof u?Promise.resolve(n.value.v).then(f,l):s(a[0][2],n)}catch(t){s(a[0][3],t)}var n}function f(t){c(\"next\",t)}function l(t){c(\"throw\",t)}function s(t,e){t(e),a.shift(),a.length&&c(a[0][0],a[0][1])}},n.__asyncDelegator=function(t){var e,n;return e={},r(\"next\"),r(\"throw\",(function(t){throw t})),r(\"return\"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:u(t[r](e)),done:\"return\"===r}:o?o(e):e}:o}},n.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=i(t),e={},r(\"next\"),r(\"throw\"),r(\"return\"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}},n.__makeTemplateObject=function(t,e){return Object.defineProperty?Object.defineProperty(t,\"raw\",{value:e}):t.raw=e,t};var f=Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e};n.__importStar=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)\"default\"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n.__createBinding(e,t,r);return f(e,t),e},n.__importDefault=function(t){return t&&t.__esModule?t:{default:t}},n.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError(\"attempted to get private field on non-instance\");return e.get(t)},n.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError(\"attempted to set private field on non-instance\");return e.set(t,n),n}},\n", " function _(e,t,o,s,l){s();const n=e(1);l(\"version\",e(3).version),l(\"index\",e(4).index),o.embed=n.__importStar(e(4)),o.protocol=n.__importStar(e(404)),o._testing=n.__importStar(e(405));var r=e(19);l(\"logger\",r.logger),l(\"set_log_level\",r.set_log_level),l(\"settings\",e(28).settings),l(\"Models\",e(7).Models),l(\"documents\",e(5).documents),l(\"safely\",e(406).safely)},\n", - " function _(n,i,o,c,e){c(),o.version=\"2.3.0\"},\n", + " function _(n,i,o,c,e){c(),o.version=\"2.3.1\"},\n", " function _(e,o,t,n,s){n();const d=e(5),r=e(19),_=e(34),c=e(13),i=e(8),a=e(16),u=e(395),l=e(397),m=e(396);var f=e(395);s(\"add_document_standalone\",f.add_document_standalone),s(\"index\",f.index),s(\"add_document_from_session\",e(397).add_document_from_session);var g=e(402);async function w(e,o,t,n){i.isString(e)&&(e=JSON.parse(_.unescape(e)));const s={};for(const[o,t]of c.entries(e))s[o]=d.Document.from_json(t);const a=[];for(const e of o){const o=m._resolve_element(e),d=m._resolve_root_elements(e);if(null!=e.docid)a.push(await u.add_document_standalone(s[e.docid],o,d,e.use_for_title));else{if(null==e.token)throw new Error(\"Error rendering Bokeh items: either 'docid' or 'token' was expected.\");{const s=l._get_ws_url(t,n);r.logger.debug(`embed: computed ws url: ${s}`);try{a.push(await l.add_document_from_session(s,e.token,o,d,e.use_for_title)),console.log(\"Bokeh items were rendered successfully\")}catch(e){console.log(\"Error rendering Bokeh items:\",e)}}}}return a}s(\"embed_items_notebook\",g.embed_items_notebook),s(\"kernels\",g.kernels),s(\"BOKEH_ROOT\",e(396).BOKEH_ROOT),t.embed_item=async function(e,o){const t={},n=_.uuid4();t[n]=e.doc,null==o&&(o=e.target_id);const s=document.getElementById(o);null!=s&&s.classList.add(m.BOKEH_ROOT);const d={roots:{[e.root_id]:o},root_ids:[e.root_id],docid:n};await a.defer();const[r]=await w(t,[d]);return r},t.embed_items=async function(e,o,t,n){return await a.defer(),w(e,o,t,n)}},\n", " function _(t,_,o,r,n){r();const a=t(1);a.__exportStar(t(6),o),a.__exportStar(t(35),o)},\n", - " function _(e,t,s,o,n){o();const i=e(1),r=e(7),a=e(3),_=e(19),l=e(264),c=e(14),d=e(30),h=e(15),f=e(17),u=e(31),m=e(9),g=e(13),w=i.__importStar(e(132)),p=e(26),v=e(8),b=e(319),y=e(130),k=e(53),j=e(394),M=e(35);class S{constructor(e){this.document=e,this.session=null,this.subscribed_models=new Set}send_event(e){const t=new M.MessageSentEvent(this.document,\"bokeh_event\",e.to_json());this.document._trigger_on_change(t)}trigger(e){for(const t of this.subscribed_models)null!=e.origin&&e.origin!=t||t._process_event(e)}}s.EventManager=S,S.__name__=\"EventManager\",s.documents=[],s.DEFAULT_TITLE=\"Bokeh Application\";class E{constructor(){s.documents.push(this),this._init_timestamp=Date.now(),this._title=s.DEFAULT_TITLE,this._roots=[],this._all_models=new Map,this._all_models_freeze_count=0,this._callbacks=new Map,this._message_callbacks=new Map,this.event_manager=new S(this),this.idle=new h.Signal0(this,\"idle\"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}get layoutables(){return this._roots.filter((e=>e instanceof b.LayoutDOM))}get is_idle(){for(const e of this.layoutables)if(!this._idle_roots.has(e))return!1;return!0}notify_idle(e){this._idle_roots.set(e,!0),this.is_idle&&(_.logger.info(`document idle at ${Date.now()-this._init_timestamp} ms`),this.event_manager.send_event(new l.DocumentReady),this.idle.emit())}clear(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}}interactive_start(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new l.LODStart)),this._interactive_timestamp=Date.now()}interactive_stop(){null!=this._interactive_plot&&this._interactive_plot.trigger_event(new l.LODEnd),this._interactive_plot=null,this._interactive_timestamp=null}interactive_duration(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp}destructively_move(e){if(e===this)throw new Error(\"Attempted to overwrite a document with itself\");e.clear();const t=m.copy(this._roots);this.clear();for(const e of t)if(null!=e.document)throw new Error(`Somehow we didn't detach ${e}`);if(0!=this._all_models.size)throw new Error(`this._all_models still had stuff in it: ${this._all_models}`);for(const s of t)e.add_root(s);e.set_title(this._title)}_push_all_models_freeze(){this._all_models_freeze_count+=1}_pop_all_models_freeze(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()}_invalidate_all_models(){_.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count&&this._recompute_all_models()}_recompute_all_models(){let e=new Set;for(const t of this._roots)e=w.union(e,t.references());const t=new Set(this._all_models.values()),s=w.difference(t,e),o=w.difference(e,t),n=new Map;for(const t of e)n.set(t.id,t);for(const e of s)e.detach_document();for(const e of o)e.attach_document(this);this._all_models=n}roots(){return this._roots}add_root(e,t){if(_.logger.debug(`Adding root: ${e}`),!m.includes(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new M.RootAddedEvent(this,e,t))}}remove_root(e,t){const s=this._roots.indexOf(e);if(!(s<0)){this._push_all_models_freeze();try{this._roots.splice(s,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new M.RootRemovedEvent(this,e,t))}}title(){return this._title}set_title(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new M.TitleChangedEvent(this,e,t)))}get_model_by_id(e){var t;return null!==(t=this._all_models.get(e))&&void 0!==t?t:null}get_model_by_name(e){const t=[];for(const s of this._all_models.values())s instanceof k.Model&&s.name==e&&t.push(s);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(`Multiple models are named '${e}'`)}}on_message(e,t){const s=this._message_callbacks.get(e);null==s?this._message_callbacks.set(e,new Set([t])):s.add(t)}remove_on_message(e,t){var s;null===(s=this._message_callbacks.get(e))||void 0===s||s.delete(t)}_trigger_on_message(e,t){const s=this._message_callbacks.get(e);if(null!=s)for(const e of s)e(t)}on_change(e,t=!1){this._callbacks.has(e)||this._callbacks.set(e,t)}remove_on_change(e){this._callbacks.delete(e)}_trigger_on_change(e){for(const[t,s]of this._callbacks)if(!s&&e instanceof M.DocumentEventBatch)for(const s of e.events)t(s);else t(e)}_notify_change(e,t,s,o,n){this._trigger_on_change(new M.ModelChangedEvent(this,e,t,s,o,null==n?void 0:n.setter_id,null==n?void 0:n.hint))}static _instantiate_object(e,t,s){const o=Object.assign(Object.assign({},s),{id:e,__deferred__:!0});return new(r.Models(t))(o)}static _instantiate_references_json(e,t){var s;const o=new Map;for(const n of e){const e=n.id,i=n.type,r=null!==(s=n.attributes)&&void 0!==s?s:{};let a=t.get(e);null==a&&(a=E._instantiate_object(e,i,r),null!=n.subtype&&a.set_subtype(n.subtype)),o.set(a.id,a)}return o}static _resolve_refs(e,t,s,o){function n(e){if(f.is_ref(e)){if(t.has(e.id))return t.get(e.id);if(s.has(e.id))return s.get(e.id);throw new Error(`reference ${JSON.stringify(e)} isn't known (not in Document?)`)}return u.is_NDArray_ref(e)?u.decode_NDArray(e,o):v.isArray(e)?function(e){const t=[];for(const s of e)t.push(n(s));return t}(e):v.isPlainObject(e)?function(e){const t={};for(const[s,o]of g.entries(e))t[s]=n(o);return t}(e):e}return n(e)}static _initialize_references_json(e,t,s,o){const n=new Map;for(const{id:i,attributes:r}of e){const e=!t.has(i),a=e?s.get(i):t.get(i),_=E._resolve_refs(r,t,s,o);a.setv(_,{silent:!0}),n.set(i,{instance:a,is_new:e})}const i=[],r=new Set;function a(e){if(e instanceof c.HasProps){if(n.has(e.id)&&!r.has(e.id)){r.add(e.id);const{instance:t,is_new:s}=n.get(e.id),{attributes:o}=t;for(const e of g.values(o))a(e);s&&(t.finalize(),i.push(t))}}else if(v.isArray(e))for(const t of e)a(t);else if(v.isPlainObject(e))for(const t of g.values(e))a(t)}for(const e of n.values())a(e.instance);for(const e of i)e.connect_signals()}static _event_for_attribute_change(e,t,s,o,n){if(o.get_model_by_id(e.id).property(t).syncable){const i={kind:\"ModelChanged\",model:{id:e.id},attr:t,new:s};return c.HasProps._json_record_references(o,s,n,{recursive:!0}),i}return null}static _events_to_sync_objects(e,t,s,o){const n=Object.keys(e.attributes),i=Object.keys(t.attributes),r=m.difference(n,i),a=m.difference(i,n),l=m.intersection(n,i),c=[];for(const e of r)_.logger.warn(`Server sent key ${e} but we don't seem to have it in our JSON`);for(const n of a){const i=t.attributes[n];c.push(E._event_for_attribute_change(e,n,i,s,o))}for(const n of l){const i=e.attributes[n],r=t.attributes[n];null==i&&null==r||(null==i||null==r?c.push(E._event_for_attribute_change(e,n,r,s,o)):p.is_equal(i,r)||c.push(E._event_for_attribute_change(e,n,r,s,o)))}return c.filter((e=>null!=e))}static _compute_patch_since_json(e,t){const s=t.to_json(!1);function o(e){const t=new Map;for(const s of e.roots.references)t.set(s.id,s);return t}const n=o(e),i=new Map,r=[];for(const t of e.roots.root_ids)i.set(t,n.get(t)),r.push(t);const a=o(s),_=new Map,l=[];for(const e of s.roots.root_ids)_.set(e,a.get(e)),l.push(e);if(r.sort(),l.sort(),m.difference(r,l).length>0||m.difference(l,r).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");const c=new Set;let h=[];for(const e of t._all_models.keys())if(n.has(e)){const s=E._events_to_sync_objects(n.get(e),a.get(e),t,c);h=h.concat(s)}const f=new d.Serializer({include_defaults:!1});return f.to_serializable([...c]),{references:[...f.definitions],events:h}}to_json_string(e=!0){return JSON.stringify(this.to_json(e))}to_json(e=!0){const t=new d.Serializer({include_defaults:e}),s=t.to_serializable(this._roots);return{version:a.version,title:this._title,roots:{root_ids:s.map((e=>e.id)),references:[...t.definitions]}}}static from_json_string(e){const t=JSON.parse(e);return E.from_json(t)}static from_json(e){_.logger.debug(\"Creating Document from JSON\");const t=e.version,s=-1!==t.indexOf(\"+\")||-1!==t.indexOf(\"-\"),o=`Library versions: JS (${a.version}) / Python (${t})`;s||a.version.replace(/-(dev|rc)\\./,\"$1\")==t?_.logger.debug(o):(_.logger.warn(\"JS/Python version mismatch\"),_.logger.warn(o)),null!=e.defs&&j.resolve_defs(e.defs);const n=e.roots,i=n.root_ids,r=n.references,l=E._instantiate_references_json(r,new Map);E._initialize_references_json(r,new Map,l,new Map);const c=new E;for(const e of i){const t=l.get(e);null!=t&&c.add_root(t)}return c.set_title(e.title),c}replace_with_json(e){E.from_json(e).destructively_move(this)}create_json_patch_string(e){return JSON.stringify(this.create_json_patch(e))}create_json_patch(e){for(const t of e)if(t.document!=this)throw new Error(\"Cannot create a patch using events from a different document\");const t=new d.Serializer;return{events:t.to_serializable(e),references:[...t.definitions]}}apply_json_patch(e,t=new Map,s){const o=e.references,n=e.events,i=E._instantiate_references_json(o,this._all_models);t instanceof Map||(t=new Map(t));for(const e of n)switch(e.kind){case\"RootAdded\":case\"RootRemoved\":case\"ModelChanged\":{const t=e.model.id,s=this._all_models.get(t);if(null!=s)i.set(t,s);else if(!i.has(t))throw _.logger.warn(`Got an event for unknown model ${e.model}\"`),new Error(\"event model wasn't known\");break}}const r=new Map,a=new Map;for(const[e,t]of i)this._all_models.has(e)?r.set(e,t):a.set(e,t);E._initialize_references_json(o,r,a,t);for(const e of n)switch(e.kind){case\"MessageSent\":{const{msg_type:s,msg_data:o}=e;let n;if(void 0===o){if(1!=t.size)throw new Error(\"expected exactly one buffer\");{const[[,e]]=t;n=e}}else n=E._resolve_refs(o,r,a,t);this._trigger_on_message(s,n);break}case\"ModelChanged\":{const o=e.model.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot apply patch to ${o} which is not in the document`);const i=e.attr,_=E._resolve_refs(e.new,r,a,t);n.setv({[i]:_},{setter_id:s});break}case\"ColumnDataChanged\":{const o=e.column_source.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot stream to ${o} which is not in the document`);const i=E._resolve_refs(e.new,new Map,new Map,t);if(null!=e.cols)for(const e in n.data)e in i||(i[e]=n.data[e]);n.setv({data:i},{setter_id:s,check_eq:!1});break}case\"ColumnsStreamed\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot stream to ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");const n=e.data,i=e.rollover;o.stream(n,i,s);break}case\"ColumnsPatched\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot patch ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");const n=e.patches;o.patch(n,s);break}case\"RootAdded\":{const t=e.model.id,o=i.get(t);this.add_root(o,s);break}case\"RootRemoved\":{const t=e.model.id,o=i.get(t);this.remove_root(o,s);break}case\"TitleChanged\":this.set_title(e.title,s);break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(e))}}}s.Document=E,E.__name__=\"Document\"},\n", - " function _(e,s,r,o,t){o();const d=e(1),i=e(8),l=e(13),n=e(14);r.overrides={};const a=new Map;r.Models=e=>{const s=r.Models.get(e);if(null!=s)return s;throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`)},r.Models.get=e=>{var s;return null!==(s=r.overrides[e])&&void 0!==s?s:a.get(e)},r.Models.register=(e,s)=>{r.overrides[e]=s},r.Models.unregister=e=>{delete r.overrides[e]},r.Models.register_models=(e,s=!1,r)=>{var o;if(null!=e)for(const t of i.isArray(e)?e:l.values(e))if(o=t,i.isObject(o)&&o.prototype instanceof n.HasProps){const e=t.__qualified__;s||!a.has(e)?a.set(e,t):null!=r?r(e):console.warn(`Model '${e}' was already registered`)}},r.register_models=r.Models.register_models,r.Models.registered_names=()=>[...a.keys()];const g=d.__importStar(e(38));r.register_models(g)},\n", + " function _(e,t,s,o,n){o();const r=e(1),i=e(7),l=e(3),_=e(19),a=e(264),c=e(14),d=e(30),h=e(15),f=e(17),u=e(31),m=e(9),g=e(13),v=r.__importStar(e(132)),w=e(26),p=e(8),b=e(319),y=e(130),k=e(53),M=e(394),j=e(35);class S{constructor(e){this.document=e,this.session=null,this.subscribed_models=new Set}send_event(e){const t=new j.MessageSentEvent(this.document,\"bokeh_event\",e.to_json());this.document._trigger_on_change(t)}trigger(e){for(const t of this.subscribed_models)null!=e.origin&&e.origin!=t||t._process_event(e)}}s.EventManager=S,S.__name__=\"EventManager\",s.documents=[],s.DEFAULT_TITLE=\"Bokeh Application\";class E{constructor(e){var t;s.documents.push(this),this._init_timestamp=Date.now(),this._resolver=null!==(t=null==e?void 0:e.resolver)&&void 0!==t?t:new i.ModelResolver,this._title=s.DEFAULT_TITLE,this._roots=[],this._all_models=new Map,this._all_models_freeze_count=0,this._callbacks=new Map,this._message_callbacks=new Map,this.event_manager=new S(this),this.idle=new h.Signal0(this,\"idle\"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}get layoutables(){return this._roots.filter((e=>e instanceof b.LayoutDOM))}get is_idle(){for(const e of this.layoutables)if(!this._idle_roots.has(e))return!1;return!0}notify_idle(e){this._idle_roots.set(e,!0),this.is_idle&&(_.logger.info(`document idle at ${Date.now()-this._init_timestamp} ms`),this.event_manager.send_event(new a.DocumentReady),this.idle.emit())}clear(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}}interactive_start(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new a.LODStart)),this._interactive_timestamp=Date.now()}interactive_stop(){null!=this._interactive_plot&&this._interactive_plot.trigger_event(new a.LODEnd),this._interactive_plot=null,this._interactive_timestamp=null}interactive_duration(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp}destructively_move(e){if(e===this)throw new Error(\"Attempted to overwrite a document with itself\");e.clear();const t=m.copy(this._roots);this.clear();for(const e of t)if(null!=e.document)throw new Error(`Somehow we didn't detach ${e}`);if(0!=this._all_models.size)throw new Error(`this._all_models still had stuff in it: ${this._all_models}`);for(const s of t)e.add_root(s);e.set_title(this._title)}_push_all_models_freeze(){this._all_models_freeze_count+=1}_pop_all_models_freeze(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()}_invalidate_all_models(){_.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count&&this._recompute_all_models()}_recompute_all_models(){let e=new Set;for(const t of this._roots)e=v.union(e,t.references());const t=new Set(this._all_models.values()),s=v.difference(t,e),o=v.difference(e,t),n=new Map;for(const t of e)n.set(t.id,t);for(const e of s)e.detach_document();for(const e of o)e.attach_document(this);this._all_models=n}roots(){return this._roots}add_root(e,t){if(_.logger.debug(`Adding root: ${e}`),!m.includes(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new j.RootAddedEvent(this,e,t))}}remove_root(e,t){const s=this._roots.indexOf(e);if(!(s<0)){this._push_all_models_freeze();try{this._roots.splice(s,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new j.RootRemovedEvent(this,e,t))}}title(){return this._title}set_title(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new j.TitleChangedEvent(this,e,t)))}get_model_by_id(e){var t;return null!==(t=this._all_models.get(e))&&void 0!==t?t:null}get_model_by_name(e){const t=[];for(const s of this._all_models.values())s instanceof k.Model&&s.name==e&&t.push(s);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(`Multiple models are named '${e}'`)}}on_message(e,t){const s=this._message_callbacks.get(e);null==s?this._message_callbacks.set(e,new Set([t])):s.add(t)}remove_on_message(e,t){var s;null===(s=this._message_callbacks.get(e))||void 0===s||s.delete(t)}_trigger_on_message(e,t){const s=this._message_callbacks.get(e);if(null!=s)for(const e of s)e(t)}on_change(e,t=!1){this._callbacks.has(e)||this._callbacks.set(e,t)}remove_on_change(e){this._callbacks.delete(e)}_trigger_on_change(e){for(const[t,s]of this._callbacks)if(!s&&e instanceof j.DocumentEventBatch)for(const s of e.events)t(s);else t(e)}_notify_change(e,t,s,o,n){this._trigger_on_change(new j.ModelChangedEvent(this,e,t,s,o,null==n?void 0:n.setter_id,null==n?void 0:n.hint))}static _instantiate_object(e,t,s,o){const n=Object.assign(Object.assign({},s),{id:e,__deferred__:!0});return new(o.get(t))(n)}static _instantiate_references_json(e,t,s){var o;const n=new Map;for(const r of e){const e=r.id,i=r.type,l=null!==(o=r.attributes)&&void 0!==o?o:{};let _=t.get(e);null==_&&(_=E._instantiate_object(e,i,l,s),null!=r.subtype&&_.set_subtype(r.subtype)),n.set(_.id,_)}return n}static _resolve_refs(e,t,s,o){function n(e){var r;if(f.is_ref(e)){const o=null!==(r=t.get(e.id))&&void 0!==r?r:s.get(e.id);if(null!=o)return o;throw new Error(`reference ${JSON.stringify(e)} isn't known (not in Document?)`)}return u.is_NDArray_ref(e)?u.decode_NDArray(e,o):p.isArray(e)?function(e){const t=[];for(const s of e)t.push(n(s));return t}(e):p.isPlainObject(e)?function(e){const t={};for(const[s,o]of g.entries(e))t[s]=n(o);return t}(e):e}return n(e)}static _initialize_references_json(e,t,s,o){const n=new Map;for(const{id:r,attributes:i}of e){const e=!t.has(r),l=e?s.get(r):t.get(r),_=E._resolve_refs(i,t,s,o);l.setv(_,{silent:!0}),n.set(r,{instance:l,is_new:e})}const r=[],i=new Set;function l(e){if(e instanceof c.HasProps){if(n.has(e.id)&&!i.has(e.id)){i.add(e.id);const{instance:t,is_new:s}=n.get(e.id),{attributes:o}=t;for(const e of g.values(o))l(e);s&&(t.finalize(),r.push(t))}}else if(p.isArray(e))for(const t of e)l(t);else if(p.isPlainObject(e))for(const t of g.values(e))l(t)}for(const e of n.values())l(e.instance);for(const e of r)e.connect_signals()}static _event_for_attribute_change(e,t,s,o,n){if(o.get_model_by_id(e.id).property(t).syncable){const r={kind:\"ModelChanged\",model:{id:e.id},attr:t,new:s};return c.HasProps._json_record_references(o,s,n,{recursive:!0}),r}return null}static _events_to_sync_objects(e,t,s,o){const n=Object.keys(e.attributes),r=Object.keys(t.attributes),i=m.difference(n,r),l=m.difference(r,n),a=m.intersection(n,r),c=[];for(const e of i)_.logger.warn(`Server sent key ${e} but we don't seem to have it in our JSON`);for(const n of l){const r=t.attributes[n];c.push(E._event_for_attribute_change(e,n,r,s,o))}for(const n of a){const r=e.attributes[n],i=t.attributes[n];null==r&&null==i||(null==r||null==i?c.push(E._event_for_attribute_change(e,n,i,s,o)):w.is_equal(r,i)||c.push(E._event_for_attribute_change(e,n,i,s,o)))}return c.filter((e=>null!=e))}static _compute_patch_since_json(e,t){const s=t.to_json(!1);function o(e){const t=new Map;for(const s of e.roots.references)t.set(s.id,s);return t}const n=o(e),r=new Map,i=[];for(const t of e.roots.root_ids)r.set(t,n.get(t)),i.push(t);const l=o(s),_=new Map,a=[];for(const e of s.roots.root_ids)_.set(e,l.get(e)),a.push(e);if(i.sort(),a.sort(),m.difference(i,a).length>0||m.difference(a,i).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");const c=new Set;let h=[];for(const e of t._all_models.keys())if(n.has(e)){const s=E._events_to_sync_objects(n.get(e),l.get(e),t,c);h=h.concat(s)}const f=new d.Serializer({include_defaults:!1});return f.to_serializable([...c]),{references:[...f.definitions],events:h}}to_json_string(e=!0){return JSON.stringify(this.to_json(e))}to_json(e=!0){const t=new d.Serializer({include_defaults:e}),s=t.to_serializable(this._roots);return{version:l.version,title:this._title,roots:{root_ids:s.map((e=>e.id)),references:[...t.definitions]}}}static from_json_string(e){const t=JSON.parse(e);return E.from_json(t)}static from_json(e){_.logger.debug(\"Creating Document from JSON\");const t=e.version,s=-1!==t.indexOf(\"+\")||-1!==t.indexOf(\"-\"),o=`Library versions: JS (${l.version}) / Python (${t})`;s||l.version.replace(/-(dev|rc)\\./,\"$1\")==t?_.logger.debug(o):(_.logger.warn(\"JS/Python version mismatch\"),_.logger.warn(o));const n=new i.ModelResolver;null!=e.defs&&M.resolve_defs(e.defs,n);const r=e.roots,a=r.root_ids,c=r.references,d=E._instantiate_references_json(c,new Map,n);E._initialize_references_json(c,new Map,d,new Map);const h=new E({resolver:n});for(const e of a){const t=d.get(e);null!=t&&h.add_root(t)}return h.set_title(e.title),h}replace_with_json(e){E.from_json(e).destructively_move(this)}create_json_patch_string(e){return JSON.stringify(this.create_json_patch(e))}create_json_patch(e){for(const t of e)if(t.document!=this)throw new Error(\"Cannot create a patch using events from a different document\");const t=new d.Serializer,s=t.to_serializable(e);for(const e of this._all_models.values())t.remove_def(e);return{events:s,references:[...t.definitions]}}apply_json_patch(e,t=new Map,s){const o=e.references,n=e.events,r=E._instantiate_references_json(o,this._all_models,this._resolver);t instanceof Map||(t=new Map(t));for(const e of n)switch(e.kind){case\"RootAdded\":case\"RootRemoved\":case\"ModelChanged\":{const t=e.model.id,s=this._all_models.get(t);if(null!=s)r.set(t,s);else if(!r.has(t))throw _.logger.warn(`Got an event for unknown model ${e.model}\"`),new Error(\"event model wasn't known\");break}}const i=new Map(this._all_models),l=new Map;for(const[e,t]of r)i.has(e)||l.set(e,t);E._initialize_references_json(o,i,l,t);for(const e of n)switch(e.kind){case\"MessageSent\":{const{msg_type:s,msg_data:o}=e;let n;if(void 0===o){if(1!=t.size)throw new Error(\"expected exactly one buffer\");{const[[,e]]=t;n=e}}else n=E._resolve_refs(o,i,l,t);this._trigger_on_message(s,n);break}case\"ModelChanged\":{const o=e.model.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot apply patch to ${o} which is not in the document`);const r=e.attr,_=E._resolve_refs(e.new,i,l,t);n.setv({[r]:_},{setter_id:s});break}case\"ColumnDataChanged\":{const o=e.column_source.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot stream to ${o} which is not in the document`);const r=E._resolve_refs(e.new,new Map,new Map,t);if(null!=e.cols)for(const e in n.data)e in r||(r[e]=n.data[e]);n.setv({data:r},{setter_id:s,check_eq:!1});break}case\"ColumnsStreamed\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot stream to ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");const n=e.data,r=e.rollover;o.stream(n,r,s);break}case\"ColumnsPatched\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot patch ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");const n=e.patches;o.patch(n,s);break}case\"RootAdded\":{const t=e.model.id,o=r.get(t);this.add_root(o,s);break}case\"RootRemoved\":{const t=e.model.id,o=r.get(t);this.remove_root(o,s);break}case\"TitleChanged\":this.set_title(e.title,s);break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(e))}}}s.Document=E,E.__name__=\"Document\"},\n", + " function _(e,o,s,r,t){r();const l=e(1),d=e(8),i=e(13),n=e(14);s.overrides={};const a=new Map;s.Models=e=>{const o=s.Models.get(e);if(null!=o)return o;throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`)},s.Models.get=e=>{var o;return null!==(o=s.overrides[e])&&void 0!==o?o:a.get(e)},s.Models.register=(e,o)=>{s.overrides[e]=o},s.Models.unregister=e=>{delete s.overrides[e]},s.Models.register_models=(e,o=!1,s)=>{var r;if(null!=e)for(const t of d.isArray(e)?e:i.values(e))if(r=t,d.isObject(r)&&r.prototype instanceof n.HasProps){const e=t.__qualified__;o||!a.has(e)?a.set(e,t):null!=s?s(e):console.warn(`Model '${e}' was already registered`)}},s.register_models=s.Models.register_models,s.Models.registered_names=()=>[...a.keys()];class u{constructor(){this._known_models=new Map}get(e,o){var r;const t=null!==(r=s.Models.get(e))&&void 0!==r?r:this._known_models.get(e);if(null!=t)return t;if(void 0!==o)return o;throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`)}register(e){const o=e.__qualified__;null==this.get(o,null)?this._known_models.set(o,e):console.warn(`Model '${o}' was already registered with this resolver`)}}s.ModelResolver=u,u.__name__=\"ModelResolver\";const _=l.__importStar(e(38));s.register_models(_)},\n", " function _(n,r,t,e,i){e();\n", " // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n", " // Underscore may be freely distributed under the MIT license.\n", @@ -899,7 +895,7 @@ " function _(e,l,o,n,t){n();const s=e(8),g=e(13),r={};class i{constructor(e,l){this.name=e,this.level=l}}o.LogLevel=i,i.__name__=\"LogLevel\";class v{constructor(e,l=v.INFO){this._name=e,this.set_level(l)}static get levels(){return Object.keys(v.log_levels)}static get(e,l=v.INFO){if(e.length>0){let o=r[e];return null==o&&(r[e]=o=new v(e,l)),o}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")}get level(){return this.get_level()}get_level(){return this._log_level}set_level(e){if(e instanceof i)this._log_level=e;else{if(!s.isString(e)||null==v.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=v.log_levels[e]}const l=`[${this._name}]`;for(const[e,o]of g.entries(v.log_levels))o.level\",\"*\"),t.HTTPMethod=a.Enum(\"POST\",\"GET\"),t.HexTileOrientation=a.Enum(\"pointytop\",\"flattop\"),t.HoverMode=a.Enum(\"mouse\",\"hline\",\"vline\"),t.LatLon=a.Enum(\"lat\",\"lon\"),t.LegendClickPolicy=a.Enum(\"none\",\"hide\",\"mute\"),t.LegendLocation=t.Anchor,t.LineCap=a.Enum(\"butt\",\"round\",\"square\"),t.LineJoin=a.Enum(\"miter\",\"round\",\"bevel\"),t.LineDash=a.Enum(\"solid\",\"dashed\",\"dotted\",\"dotdash\",\"dashdot\"),t.LinePolicy=a.Enum(\"prev\",\"next\",\"nearest\",\"interp\",\"none\"),t.Location=a.Enum(\"above\",\"below\",\"left\",\"right\"),t.Logo=a.Enum(\"normal\",\"grey\"),t.MarkerType=a.Enum(\"asterisk\",\"circle\",\"circle_cross\",\"circle_dot\",\"circle_x\",\"circle_y\",\"cross\",\"dash\",\"diamond\",\"diamond_cross\",\"diamond_dot\",\"dot\",\"hex\",\"hex_dot\",\"inverted_triangle\",\"plus\",\"square\",\"square_cross\",\"square_dot\",\"square_pin\",\"square_x\",\"star\",\"star_dot\",\"triangle\",\"triangle_dot\",\"triangle_pin\",\"x\",\"y\"),t.MutedPolicy=a.Enum(\"show\",\"ignore\"),t.Orientation=a.Enum(\"vertical\",\"horizontal\"),t.OutputBackend=a.Enum(\"canvas\",\"svg\",\"webgl\"),t.PaddingUnits=a.Enum(\"percent\",\"absolute\"),t.Place=a.Enum(\"above\",\"below\",\"left\",\"right\",\"center\"),t.PointPolicy=a.Enum(\"snap_to_data\",\"follow_mouse\",\"none\"),t.RadiusDimension=a.Enum(\"x\",\"y\",\"max\",\"min\"),t.RenderLevel=a.Enum(\"image\",\"underlay\",\"glyph\",\"guide\",\"annotation\",\"overlay\"),t.RenderMode=a.Enum(\"canvas\",\"css\"),t.ResetPolicy=a.Enum(\"standard\",\"event_only\"),t.RoundingFunction=a.Enum(\"round\",\"nearest\",\"floor\",\"rounddown\",\"ceil\",\"roundup\"),t.SelectionMode=a.Enum(\"replace\",\"append\",\"intersect\",\"subtract\"),t.Side=a.Enum(\"above\",\"below\",\"left\",\"right\"),t.SizingMode=a.Enum(\"stretch_width\",\"stretch_height\",\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"),t.Sort=a.Enum(\"ascending\",\"descending\"),t.SpatialUnits=a.Enum(\"screen\",\"data\"),t.StartEnd=a.Enum(\"start\",\"end\"),t.StepMode=a.Enum(\"after\",\"before\",\"center\"),t.TapBehavior=a.Enum(\"select\",\"inspect\"),t.TextAlign=a.Enum(\"left\",\"right\",\"center\"),t.TextBaseline=a.Enum(\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"),t.TextureRepetition=a.Enum(\"repeat\",\"repeat_x\",\"repeat_y\",\"no_repeat\"),t.TickLabelOrientation=a.Enum(\"vertical\",\"horizontal\",\"parallel\",\"normal\"),t.TooltipAttachment=a.Enum(\"horizontal\",\"vertical\",\"left\",\"right\",\"above\",\"below\"),t.UpdateMode=a.Enum(\"replace\",\"append\"),t.VerticalAlign=a.Enum(\"top\",\"middle\",\"bottom\")},\n", " function _(e,n,t,s,r){s();const i=e(1).__importStar(e(8)),a=e(22),l=e(13),_=window.Map,{hasOwnProperty:u}=Object.prototype;class d{}t.Kind=d,d.__name__=\"Kind\",function(e){class n extends d{valid(e){return!0}}n.__name__=\"Any\",e.Any=n;class t extends d{valid(e){return!0}}t.__name__=\"Unknown\",e.Unknown=t;class s extends d{valid(e){return i.isBoolean(e)}}s.__name__=\"Boolean\",e.Boolean=s;class r extends d{constructor(e){super(),this.obj_type=e}valid(e){return!0}}r.__name__=\"Ref\",e.Ref=r;class c extends d{valid(e){return!0}}c.__name__=\"AnyRef\",e.AnyRef=c;class o extends d{valid(e){return i.isNumber(e)}}o.__name__=\"Number\",e.Number=o;class p extends o{valid(e){return super.valid(e)&&i.isInteger(e)}}p.__name__=\"Int\",e.Int=p;class y extends o{valid(e){return super.valid(e)&&0<=e&&e<=1}}y.__name__=\"Percent\",e.Percent=y;class m extends d{constructor(e){super(),this.types=e,this.types=e}valid(e){return this.types.some((n=>n.valid(e)))}}m.__name__=\"Or\",e.Or=m;class v extends d{constructor(e){super(),this.types=e,this.types=e}valid(e){if(!i.isArray(e))return!1;for(let n=0;nthis.item_type.valid(e)))}}f.__name__=\"Array\",e.Array=f;class K extends d{valid(e){return null===e}}K.__name__=\"Null\",e.Null=K;class b extends d{constructor(e){super(),this.base_type=e}valid(e){return null===e||this.base_type.valid(e)}}b.__name__=\"Nullable\",e.Nullable=b;class A extends d{constructor(e){super(),this.base_type=e}valid(e){return void 0===e||this.base_type.valid(e)}}A.__name__=\"Opt\",e.Opt=A;class x extends d{valid(e){return i.isString(e)}}x.__name__=\"String\",e.String=x;class S extends d{constructor(e){super(),this.values=new Set(e)}valid(e){return this.values.has(e)}*[Symbol.iterator](){yield*this.values}}S.__name__=\"Enum\",e.Enum=S;class N extends d{constructor(e){super(),this.item_type=e}valid(e){if(!i.isPlainObject(e))return!1;for(const n in e)if(u.call(e,n)){const t=e[n];if(!this.item_type.valid(t))return!1}return!0}}N.__name__=\"Dict\",e.Dict=N;class O extends d{constructor(e,n){super(),this.key_type=e,this.item_type=n}valid(e){if(!(e instanceof _))return!1;for(const[n,t]of e.entries())if(!this.key_type.valid(n)||!this.item_type.valid(t))return!1;return!0}}O.__name__=\"Map\",e.Map=O;class g extends d{valid(e){return a.is_Color(e)}}g.__name__=\"Color\",e.Color=g;class P extends d{valid(e){return i.isFunction(e)}}P.__name__=\"Function\",e.Function=P}(t.Kinds||(t.Kinds={})),t.Any=new t.Kinds.Any,t.Unknown=new t.Kinds.Unknown,t.Boolean=new t.Kinds.Boolean,t.Number=new t.Kinds.Number,t.Int=new t.Kinds.Int,t.String=new t.Kinds.String,t.Null=new t.Kinds.Null;t.Nullable=e=>new t.Kinds.Nullable(e);t.Opt=e=>new t.Kinds.Opt(e);t.Or=(...e)=>new t.Kinds.Or(e);t.Tuple=(...e)=>new t.Kinds.Tuple(e);t.Struct=e=>new t.Kinds.Struct(e),t.Arrayable=new t.Kinds.Arrayable;t.Array=e=>new t.Kinds.Array(e);t.Dict=e=>new t.Kinds.Dict(e);t.Map=(e,n)=>new t.Kinds.Map(e,n);t.Enum=(...e)=>new t.Kinds.Enum(e);t.Ref=e=>new t.Kinds.Ref(e);t.AnyRef=()=>new t.Kinds.AnyRef;t.Function=()=>new t.Kinds.Function,t.Percent=new t.Kinds.Percent,t.Alpha=t.Percent,t.Color=new t.Kinds.Color,t.Auto=t.Enum(\"auto\"),t.FontSize=t.String,t.Font=t.String,t.Angle=t.Number},\n", - " function _(n,t,r,e,s){e();const u=n(23),l=n(10),c=n(8),{round:i}=Math;function o(n){return l.clamp(i(n),0,255)}function a(){return[0,0,0,0]}function f(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}function d(n,t){var r;let e,s,u,l;return null==n?[e,s,u,l]=[0,0,0,0]:c.isInteger(n)?[e,s,u,l]=f(n):c.isString(n)?[e,s,u,l]=null!==(r=_(n))&&void 0!==r?r:[0,0,0,0]:([e,s,u,l=1]=n,l=o(255*l)),255==l&&null!=t&&(l=o(255*t)),[e,s,u,l]}r.transparent=a,r.encode_rgba=function([n,t,r,e]){return n<<24|t<<16|r<<8|e},r.decode_rgba=f,r.compose_alpha=function(n,t){return 255==(255&n)?4294967040&n|o(255*t):n},r.color2rgba=d;const h={0:\"0\",1:\"1\",2:\"2\",3:\"3\",4:\"4\",5:\"5\",6:\"6\",7:\"7\",8:\"8\",9:\"9\",10:\"a\",11:\"b\",12:\"c\",13:\"d\",14:\"e\",15:\"f\"};function g(n){return h[n>>4]+h[15&n]}r.color2css=function(n,t){const[r,e,s,u]=d(n,t);return`rgba(${r}, ${e}, ${s}, ${u/255})`},r.color2hex=function(n,t){const[r,e,s,u]=d(n,t),l=`#${g(r)}${g(e)}${g(s)}`;return 255==u?l:`${l}${g(u)}`};const b=/^rgba?\\(\\s*([^\\s,]+?)\\s+([^\\s,]+?)\\s+([^\\s,]+?)(?:\\s*\\/\\s*([^\\s,]+?))?\\s*\\)$/,m=/^rgba?\\(\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)(?:\\s*,\\s*([^\\s,]+?))?\\s*\\)$/,$=(()=>{const n=document.createElement(\"canvas\");n.width=1,n.height=1;const t=n.getContext(\"2d\"),r=t.createLinearGradient(0,0,1,1);return n=>{t.fillStyle=r,t.fillStyle=n;const e=t.fillStyle;return e!=r?e:null}})();function _(n){var t;if(!(n=n.trim().toLowerCase()))return null;if(\"transparent\"==n)return[0,0,0,0];if(u.is_named_color(n))return f(u.named_colors[n]);if(\"#\"==n[0]){const t=Number(\"0x\"+n.substr(1));if(isNaN(t))return null;switch(n.length-1){case 3:{const n=t>>8&15,r=t>>4&15,e=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,255]}case 4:{const n=t>>12&15,r=t>>8&15,e=t>>4&15,s=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,s<<4|s]}case 6:return[t>>16&255,t>>8&255,t>>0&255,255];case 8:return[t>>24&255,t>>16&255,t>>8&255,t>>0&255]}}else if(n.startsWith(\"rgb\")){const r=null!==(t=n.match(b))&&void 0!==t?t:n.match(m);if(null!=r){let[,n,t,e,s=\"1\"]=r;const u=n.endsWith(\"%\"),l=t.endsWith(\"%\"),c=e.endsWith(\"%\"),i=s.endsWith(\"%\");if(!(u&&l&&c)&&(u||l||c))return null;u&&(n=n.slice(0,-1)),l&&(t=t.slice(0,-1)),c&&(e=e.slice(0,-1)),i&&(s=s.slice(0,-1));let a=Number(n),f=Number(t),d=Number(e),h=Number(s);return isNaN(a+f+d+h)?null:(u&&(a=a/100*255),l&&(f=f/100*255),c&&(d=d/100*255),h=255*(i?h/100:h),a=o(a),f=o(f),d=o(d),h=o(h),[a,f,d,h])}}else{const t=$(n);if(null!=t)return _(t)}return null}r.css4_parse=_,r.is_Color=function(n){return!!c.isInteger(n)||(!(!c.isString(n)||null==_(n))||!(!c.isArray(n)||3!=n.length&&4!=n.length))},r.is_dark=function([n,t,r]){return 1-(.299*n+.587*t+.114*r)/255>=.6}},\n", + " function _(n,t,r,e,s){e();const u=n(23),c=n(10),l=n(8),{round:i}=Math;function o(n){return c.clamp(i(n),0,255)}function a(){return[0,0,0,0]}function f(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}function d(n,t){var r;let e,s,u,c;return null==n?[e,s,u,c]=[0,0,0,0]:l.isInteger(n)?[e,s,u,c]=f(n):l.isString(n)?[e,s,u,c]=null!==(r=_(n))&&void 0!==r?r:[0,0,0,0]:([e,s,u,c=1]=n,c=o(255*c)),255==c&&null!=t&&(c=o(255*t)),[e,s,u,c]}r.transparent=a,r.encode_rgba=function([n,t,r,e]){return n<<24|t<<16|r<<8|e},r.decode_rgba=f,r.compose_alpha=function(n,t){return 255==(255&n)?4294967040&n|o(255*t):n},r.color2rgba=d;const h={0:\"0\",1:\"1\",2:\"2\",3:\"3\",4:\"4\",5:\"5\",6:\"6\",7:\"7\",8:\"8\",9:\"9\",10:\"a\",11:\"b\",12:\"c\",13:\"d\",14:\"e\",15:\"f\"};function g(n){return h[n>>4]+h[15&n]}r.color2css=function(n,t){const[r,e,s,u]=d(n,t);return`rgba(${r}, ${e}, ${s}, ${u/255})`},r.color2hex=function(n,t){const[r,e,s,u]=d(n,t),c=`#${g(r)}${g(e)}${g(s)}`;return 255==u?c:`${c}${g(u)}`},r.color2hexrgb=function(n){const[t,r,e]=d(n);return`#${g(t)}${g(r)}${g(e)}`};const b=/^rgba?\\(\\s*([^\\s,]+?)\\s+([^\\s,]+?)\\s+([^\\s,]+?)(?:\\s*\\/\\s*([^\\s,]+?))?\\s*\\)$/,m=/^rgba?\\(\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)(?:\\s*,\\s*([^\\s,]+?))?\\s*\\)$/,$=(()=>{const n=document.createElement(\"canvas\");n.width=1,n.height=1;const t=n.getContext(\"2d\"),r=t.createLinearGradient(0,0,1,1);return n=>{t.fillStyle=r,t.fillStyle=n;const e=t.fillStyle;return e!=r?e:null}})();function _(n){var t;if(!(n=n.trim().toLowerCase()))return null;if(\"transparent\"==n)return[0,0,0,0];if(u.is_named_color(n))return f(u.named_colors[n]);if(\"#\"==n[0]){const t=Number(\"0x\"+n.substr(1));if(isNaN(t))return null;switch(n.length-1){case 3:{const n=t>>8&15,r=t>>4&15,e=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,255]}case 4:{const n=t>>12&15,r=t>>8&15,e=t>>4&15,s=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,s<<4|s]}case 6:return[t>>16&255,t>>8&255,t>>0&255,255];case 8:return[t>>24&255,t>>16&255,t>>8&255,t>>0&255]}}else if(n.startsWith(\"rgb\")){const r=null!==(t=n.match(b))&&void 0!==t?t:n.match(m);if(null!=r){let[,n,t,e,s=\"1\"]=r;const u=n.endsWith(\"%\"),c=t.endsWith(\"%\"),l=e.endsWith(\"%\"),i=s.endsWith(\"%\");if(!(u&&c&&l)&&(u||c||l))return null;u&&(n=n.slice(0,-1)),c&&(t=t.slice(0,-1)),l&&(e=e.slice(0,-1)),i&&(s=s.slice(0,-1));let a=Number(n),f=Number(t),d=Number(e),h=Number(s);return isNaN(a+f+d+h)?null:(u&&(a=a/100*255),c&&(f=f/100*255),l&&(d=d/100*255),h=255*(i?h/100:h),a=o(a),f=o(f),d=o(d),h=o(h),[a,f,d,h])}}else{const t=$(n);if(null!=t)return _(t)}return null}r.css4_parse=_,r.is_Color=function(n){return!!l.isInteger(n)||(!(!l.isString(n)||null==_(n))||!(!l.isArray(n)||3!=n.length&&4!=n.length))},r.is_dark=function([n,t,r]){return 1-(.299*n+.587*t+.114*r)/255>=.6}},\n", " function _(e,r,l,a,i){a();l.named_colors={aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},l.is_named_color=function(e){return e in l.named_colors}},\n", " function _(r,t,n,a,o){a(),n.GeneratorFunction=Object.getPrototypeOf((function*(){})).constructor,n.ColorArray=Uint32Array,n.RGBAArray=Uint8ClampedArray,n.infer_type=function(r,t){return r instanceof Float64Array||r instanceof Array||t instanceof Float64Array||t instanceof Array?Float64Array:Float32Array},n.ScreenArray=Float32Array,n.to_screen=function(r){return r instanceof Float32Array?r:new Float32Array(r)},o(\"Indices\",r(25).BitSet)},\n", " function _(t,s,r,e,i){e();const n=t(26),o=t(11);class a{constructor(t,s=0){this.size=t,this[Symbol.toStringTag]=\"BitSet\",this._count=null,this._nwords=Math.ceil(t/32),0==s||1==s?(this._array=new Uint32Array(this._nwords),1==s&&this._array.fill(4294967295)):(o.assert(s.length==this._nwords,\"Initializer size mismatch\"),this._array=s)}clone(){return new a(this.size,new Uint32Array(this._array))}[n.equals](t,s){if(!s.eq(this.size,t.size))return!1;const{_nwords:r}=this,e=this.size%r,i=0==e?r:r-1;for(let s=0;s>>5,r=31&t;return!!(this._array[s]>>r&1)}set(t,s=!0){this._check_bounds(t),this._count=null;const r=t>>>5,e=31&t;s?this._array[r]|=1<>>t&1&&(e+=1)}return e}*ones(){const{_array:t,_nwords:s,size:r}=this;for(let e=0,i=0;i>>t&1&&(yield e);else e+=32}}*zeros(){const{_array:t,_nwords:s,size:r}=this;for(let e=0,i=0;i>>t&1||(yield e);else e+=32}}_check_size(t){o.assert(this.size==t.size,\"Size mismatch\")}add(t){this._check_size(t);for(let s=0;s({selected:[e(i.Selection),()=>new i.Selection]})))}}c.DataSource=s,s.__name__=\"DataSource\",s.init_DataSource()},\n", " function _(i,e,s,t,n){t();const l=i(53),c=i(9),h=i(13);class d extends l.Model{constructor(i){super(i)}get_view(){return this.view}static init_Selection(){this.define((({Int:i,Array:e,Dict:s})=>({indices:[e(i),[]],line_indices:[e(i),[]],multiline_indices:[s(e(i)),{}]}))),this.internal((({Int:i,Array:e,AnyRef:s,Struct:t,Nullable:n})=>({selected_glyphs:[e(s()),[]],view:[n(s()),null],image_indices:[e(t({index:i,dim1:i,dim2:i,flat_index:i})),[]]})))}get selected_glyph(){return this.selected_glyphs.length>0?this.selected_glyphs[0]:null}add_to_selected_glyphs(i){this.selected_glyphs.push(i)}update(i,e=!0,s=\"replace\"){switch(s){case\"replace\":this.indices=i.indices,this.line_indices=i.line_indices,this.selected_glyphs=i.selected_glyphs,this.view=i.view,this.multiline_indices=i.multiline_indices,this.image_indices=i.image_indices;break;case\"append\":this.update_through_union(i);break;case\"intersect\":this.update_through_intersection(i);break;case\"subtract\":this.update_through_subtraction(i)}}clear(){this.indices=[],this.line_indices=[],this.multiline_indices={},this.view=null,this.selected_glyphs=[]}is_empty(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length}update_through_union(i){this.indices=c.union(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}update_through_intersection(i){this.indices=c.intersection(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}update_through_subtraction(i){this.indices=c.difference(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}}s.Selection=d,d.__name__=\"Selection\",d.init_Selection()},\n", " function _(e,t,s,n,i){n();const o=e(14),c=e(59),r=e(61),l=e(123);class p extends o.HasProps{constructor(e){super(e),this.inspectors=new Map}static init_SelectionManager(){this.internal((({AnyRef:e})=>({source:[e()]})))}select(e,t,s,n=\"replace\"){const i=[],o=[];for(const t of e)t instanceof r.GlyphRendererView?i.push(t):t instanceof l.GraphRendererView&&o.push(t);let c=!1;for(const e of o){const i=e.model.selection_policy.hit_test(t,e);c=c||e.model.selection_policy.do_selection(i,e.model,s,n)}if(i.length>0){const e=this.source.selection_policy.hit_test(t,i);c=c||this.source.selection_policy.do_selection(e,this.source,s,n)}return c}inspect(e,t){let s=!1;if(e instanceof r.GlyphRendererView){const n=e.hit_test(t);if(null!=n){s=!n.is_empty();const i=this.get_or_create_inspector(e.model);i.update(n,!0,\"replace\"),this.source.setv({inspected:i},{silent:!0}),this.source.inspect.emit([e.model,{geometry:t}])}}else if(e instanceof l.GraphRendererView){const n=e.model.inspection_policy.hit_test(t,e);s=s||e.model.inspection_policy.do_inspection(n,t,e,!1,\"replace\")}return s}clear(e){this.source.selected.clear(),null!=e&&this.get_or_create_inspector(e.model).clear()}get_or_create_inspector(e){let t=this.inspectors.get(e);return null==t&&(t=new c.Selection,this.inspectors.set(e,t)),t}}s.SelectionManager=p,p.__name__=\"SelectionManager\",p.init_SelectionManager()},\n", - " function _(e,t,i,s,l){s();const h=e(62),n=e(63),o=e(116),a=e(117),c=e(119),d=e(98),_=e(57),r=e(120),p=e(24),g=e(12),u=e(9),y=e(13),m=e(122),v=e(104),f={fill:{},line:{}},w={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},b={fill:{fill_alpha:.2},line:{}};class V extends h.DataRendererView{get glyph_view(){return this.glyph}async lazy_initialize(){var e,t;await super.lazy_initialize();const i=this.model.glyph;this.glyph=await this.build_glyph_view(i);const s=\"fill\"in this.glyph.visuals,l=\"line\"in this.glyph.visuals,h=Object.assign({},i.attributes);function n(e){const t=y.clone(h);return s&&y.extend(t,e.fill),l&&y.extend(t,e.line),new i.constructor(t)}delete h.id;let{selection_glyph:o}=this.model;null==o?o=n({fill:{},line:{}}):\"auto\"==o&&(o=n(f)),this.selection_glyph=await this.build_glyph_view(o);let{nonselection_glyph:a}=this.model;null==a?a=n({fill:{},line:{}}):\"auto\"==a&&(a=n(b)),this.nonselection_glyph=await this.build_glyph_view(a);const{hover_glyph:c}=this.model;null!=c&&(this.hover_glyph=await this.build_glyph_view(c));const{muted_glyph:d}=this.model;null!=d&&(this.muted_glyph=await this.build_glyph_view(d));const _=n(w);this.decimated_glyph=await this.build_glyph_view(_),this.selection_glyph.set_base(this.glyph),this.nonselection_glyph.set_base(this.glyph),null===(e=this.hover_glyph)||void 0===e||e.set_base(this.glyph),null===(t=this.muted_glyph)||void 0===t||t.set_base(this.glyph),this.decimated_glyph.set_base(this.glyph),this.set_data()}async build_glyph_view(e){return m.build_view(e,{parent:this})}remove(){var e,t;this.glyph.remove(),this.selection_glyph.remove(),this.nonselection_glyph.remove(),null===(e=this.hover_glyph)||void 0===e||e.remove(),null===(t=this.muted_glyph)||void 0===t||t.remove(),this.decimated_glyph.remove(),super.remove()}connect_signals(){super.connect_signals();const e=()=>this.request_render(),t=()=>this.update_data();this.connect(this.model.change,e),this.connect(this.glyph.model.change,t),this.connect(this.selection_glyph.model.change,t),this.connect(this.nonselection_glyph.model.change,t),null!=this.hover_glyph&&this.connect(this.hover_glyph.model.change,t),null!=this.muted_glyph&&this.connect(this.muted_glyph.model.change,t),this.connect(this.decimated_glyph.model.change,t),this.connect(this.model.data_source.change,t),this.connect(this.model.data_source.streaming,t),this.connect(this.model.data_source.patching,(e=>this.update_data(e))),this.connect(this.model.data_source.selected.change,e),this.connect(this.model.data_source._select,e),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,e),this.connect(this.model.properties.view.change,t),this.connect(this.model.view.properties.indices.change,t),this.connect(this.model.view.properties.masked.change,(()=>this.set_visuals())),this.connect(this.model.properties.visible.change,(()=>this.plot_view.invalidate_dataranges=!0));const{x_ranges:i,y_ranges:s}=this.plot_view.frame;for(const[,e]of i)e instanceof v.FactorRange&&this.connect(e.change,t);for(const[,e]of s)e instanceof v.FactorRange&&this.connect(e.change,t);const{transformchange:l,exprchange:h}=this.model.glyph;this.connect(l,t),this.connect(h,t)}_update_masked_indices(){const e=this.glyph.mask_data();return this.model.view.masked=e,e}update_data(e){this.set_data(e),this.request_render()}set_data(e){const t=this.model.data_source;this.all_indices=this.model.view.indices;const{all_indices:i}=this;this.glyph.set_data(t,i,e),this.set_visuals(),this._update_masked_indices();const{lod_factor:s}=this.plot_model,l=this.all_indices.count;this.decimated=new p.Indices(l);for(let e=0;e!d||d.is_empty()?[]:d.selected_glyph?this.model.view.convert_indices_from_subset(i):d.indices.length>0?d.indices:Object.keys(d.multiline_indices).map((e=>parseInt(e))))()),r=g.filter(i,(e=>_.has(t[e]))),{lod_threshold:p}=this.plot_model;let y,m,v;if(null!=this.model.document&&this.model.document.interactive_duration()>0&&!e&&null!=p&&t.length>p?(i=[...this.decimated],y=this.decimated_glyph,m=this.decimated_glyph,v=this.selection_glyph):(y=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,m=this.nonselection_glyph,v=this.selection_glyph),null!=this.hover_glyph&&r.length&&(i=u.difference(i,r)),h.length){const e={};for(const t of h)e[t]=!0;const l=new Array,o=new Array;if(this.glyph instanceof n.LineView)for(const i of t)null!=e[i]?l.push(i):o.push(i);else for(const s of i)null!=e[t[s]]?l.push(s):o.push(s);m.render(s,o),v.render(s,l),null!=this.hover_glyph&&(this.glyph instanceof n.LineView?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):this.hover_glyph.render(s,r))}else if(this.glyph instanceof n.LineView)this.hover_glyph&&r.length?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):y.render(s,t);else if(this.glyph instanceof o.PatchView||this.glyph instanceof a.HAreaView||this.glyph instanceof c.VAreaView)if(0==d.selected_glyphs.length||null==this.hover_glyph)y.render(s,t);else for(const e of d.selected_glyphs)e==this.glyph.model&&this.hover_glyph.render(s,t);else y.render(s,i),this.hover_glyph&&r.length&&this.hover_glyph.render(s,r);s.restore()}draw_legend(e,t,i,s,l,h,n,o){0!=this.glyph.data_size&&(null==o&&(o=this.model.get_reference_point(h,n)),this.glyph.draw_legend_for_index(e,{x0:t,x1:i,y0:s,y1:l},o))}hit_test(e){if(!this.model.visible)return null;const t=this.glyph.hit_test(e);return null==t?null:this.model.view.convert_selection_from_subset(t)}}i.GlyphRendererView=V,V.__name__=\"GlyphRendererView\";class x extends h.DataRenderer{constructor(e){super(e)}static init_GlyphRenderer(){this.prototype.default_view=V,this.define((({Boolean:e,Auto:t,Or:i,Ref:s,Null:l,Nullable:h})=>({data_source:[s(_.ColumnarDataSource)],view:[s(r.CDSView),e=>new r.CDSView({source:e.data_source})],glyph:[s(d.Glyph)],hover_glyph:[h(s(d.Glyph)),null],nonselection_glyph:[i(s(d.Glyph),t,l),\"auto\"],selection_glyph:[i(s(d.Glyph),t,l),\"auto\"],muted_glyph:[h(s(d.Glyph)),null],muted:[e,!1]})))}initialize(){super.initialize(),this.view.source!=this.data_source&&(this.view.source=this.data_source,this.view.compute_indices())}get_reference_point(e,t){let i=0;if(null!=e){const s=this.data_source.get_column(e);if(null!=s)if(null==this.view){const e=g.indexOf(s,t);-1!=e&&(i=e)}else for(const[e,l]of Object.entries(this.view.indices_map))if(s[parseInt(e)]==t){i=l;break}}return i}get_selection_manager(){return this.data_source.selection_manager}}i.GlyphRenderer=x,x.__name__=\"GlyphRenderer\",x.init_GlyphRenderer()},\n", + " function _(e,t,i,s,l){s();const h=e(62),n=e(63),o=e(116),a=e(117),c=e(119),d=e(98),_=e(57),r=e(120),p=e(24),g=e(12),u=e(9),y=e(13),m=e(122),v=e(104),f={fill:{},line:{}},w={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},b={fill:{fill_alpha:.2},line:{}};class V extends h.DataRendererView{get glyph_view(){return this.glyph}async lazy_initialize(){var e,t;await super.lazy_initialize();const i=this.model.glyph;this.glyph=await this.build_glyph_view(i);const s=\"fill\"in this.glyph.visuals,l=\"line\"in this.glyph.visuals,h=Object.assign({},i.attributes);function n(e){const t=y.clone(h);return s&&y.extend(t,e.fill),l&&y.extend(t,e.line),new i.constructor(t)}delete h.id;let{selection_glyph:o}=this.model;null==o?o=n({fill:{},line:{}}):\"auto\"==o&&(o=n(f)),this.selection_glyph=await this.build_glyph_view(o);let{nonselection_glyph:a}=this.model;null==a?a=n({fill:{},line:{}}):\"auto\"==a&&(a=n(b)),this.nonselection_glyph=await this.build_glyph_view(a);const{hover_glyph:c}=this.model;null!=c&&(this.hover_glyph=await this.build_glyph_view(c));const{muted_glyph:d}=this.model;null!=d&&(this.muted_glyph=await this.build_glyph_view(d));const _=n(w);this.decimated_glyph=await this.build_glyph_view(_),this.selection_glyph.set_base(this.glyph),this.nonselection_glyph.set_base(this.glyph),null===(e=this.hover_glyph)||void 0===e||e.set_base(this.glyph),null===(t=this.muted_glyph)||void 0===t||t.set_base(this.glyph),this.decimated_glyph.set_base(this.glyph),this.set_data()}async build_glyph_view(e){return m.build_view(e,{parent:this})}remove(){var e,t;this.glyph.remove(),this.selection_glyph.remove(),this.nonselection_glyph.remove(),null===(e=this.hover_glyph)||void 0===e||e.remove(),null===(t=this.muted_glyph)||void 0===t||t.remove(),this.decimated_glyph.remove(),super.remove()}connect_signals(){super.connect_signals();const e=()=>this.request_render(),t=()=>this.update_data();this.connect(this.model.change,e),this.connect(this.glyph.model.change,t),this.connect(this.selection_glyph.model.change,t),this.connect(this.nonselection_glyph.model.change,t),null!=this.hover_glyph&&this.connect(this.hover_glyph.model.change,t),null!=this.muted_glyph&&this.connect(this.muted_glyph.model.change,t),this.connect(this.decimated_glyph.model.change,t),this.connect(this.model.data_source.change,t),this.connect(this.model.data_source.streaming,t),this.connect(this.model.data_source.patching,(e=>this.update_data(e))),this.connect(this.model.data_source.selected.change,e),this.connect(this.model.data_source._select,e),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,e),this.connect(this.model.properties.view.change,t),this.connect(this.model.view.properties.indices.change,t),this.connect(this.model.view.properties.masked.change,(()=>this.set_visuals())),this.connect(this.model.properties.visible.change,(()=>this.plot_view.invalidate_dataranges=!0));const{x_ranges:i,y_ranges:s}=this.plot_view.frame;for(const[,e]of i)e instanceof v.FactorRange&&this.connect(e.change,t);for(const[,e]of s)e instanceof v.FactorRange&&this.connect(e.change,t);const{transformchange:l,exprchange:h}=this.model.glyph;this.connect(l,t),this.connect(h,t)}_update_masked_indices(){const e=this.glyph.mask_data();return this.model.view.masked=e,e}update_data(e){this.set_data(e),this.request_render()}set_data(e){const t=this.model.data_source;this.all_indices=this.model.view.indices;const{all_indices:i}=this;this.glyph.set_data(t,i,e),this.set_visuals(),this._update_masked_indices();const{lod_factor:s}=this.plot_model,l=this.all_indices.count;this.decimated=new p.Indices(l);for(let e=0;e!d||d.is_empty()?[]:d.selected_glyph?this.model.view.convert_indices_from_subset(i):d.indices.length>0?d.indices:Object.keys(d.multiline_indices).map((e=>parseInt(e))))()),r=g.filter(i,(e=>_.has(t[e]))),{lod_threshold:p}=this.plot_model;let y,m,v;if(null!=this.model.document&&this.model.document.interactive_duration()>0&&!e&&null!=p&&t.length>p?(i=[...this.decimated],y=this.decimated_glyph,m=this.decimated_glyph,v=this.selection_glyph):(y=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,m=this.nonselection_glyph,v=this.selection_glyph),null!=this.hover_glyph&&r.length&&(i=u.difference(i,r)),h.length){const e={};for(const t of h)e[t]=!0;const l=new Array,o=new Array;if(this.glyph instanceof n.LineView)for(const i of t)null!=e[i]?l.push(i):o.push(i);else for(const s of i)null!=e[t[s]]?l.push(s):o.push(s);m.render(s,o),v.render(s,l),null!=this.hover_glyph&&(this.glyph instanceof n.LineView?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):this.hover_glyph.render(s,r))}else if(this.glyph instanceof n.LineView)this.hover_glyph&&r.length?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):y.render(s,t);else if(this.glyph instanceof o.PatchView||this.glyph instanceof a.HAreaView||this.glyph instanceof c.VAreaView)if(0==d.selected_glyphs.length||null==this.hover_glyph)y.render(s,t);else for(const e of d.selected_glyphs)e==this.glyph.model&&this.hover_glyph.render(s,t);else y.render(s,i),this.hover_glyph&&r.length&&this.hover_glyph.render(s,r);s.restore()}draw_legend(e,t,i,s,l,h,n,o){0!=this.glyph.data_size&&(null==o&&(o=this.model.get_reference_point(h,n)),this.glyph.draw_legend_for_index(e,{x0:t,x1:i,y0:s,y1:l},o))}hit_test(e){if(!this.model.visible)return null;const t=this.glyph.hit_test(e);return null==t?null:this.model.view.convert_selection_from_subset(t)}}i.GlyphRendererView=V,V.__name__=\"GlyphRendererView\";class G extends h.DataRenderer{constructor(e){super(e)}static init_GlyphRenderer(){this.prototype.default_view=V,this.define((({Boolean:e,Auto:t,Or:i,Ref:s,Null:l,Nullable:h})=>({data_source:[s(_.ColumnarDataSource)],view:[s(r.CDSView),e=>new r.CDSView({source:e.data_source})],glyph:[s(d.Glyph)],hover_glyph:[h(s(d.Glyph)),null],nonselection_glyph:[i(s(d.Glyph),t,l),\"auto\"],selection_glyph:[i(s(d.Glyph),t,l),\"auto\"],muted_glyph:[h(s(d.Glyph)),null],muted:[e,!1]})))}initialize(){super.initialize(),this.view.source!=this.data_source&&(this.view.source=this.data_source,this.view.compute_indices())}get_reference_point(e,t){if(null!=e){const i=this.data_source.get_column(e);if(null!=i)for(const[e,s]of Object.entries(this.view.indices_map))if(i[parseInt(e)]==t)return s}return 0}get_selection_manager(){return this.data_source.selection_manager}}i.GlyphRenderer=G,G.__name__=\"GlyphRenderer\",G.init_GlyphRenderer()},\n", " function _(e,r,t,a,n){a();const s=e(41);class i extends s.RendererView{get xscale(){return this.coordinates.x_scale}get yscale(){return this.coordinates.y_scale}}t.DataRendererView=i,i.__name__=\"DataRendererView\";class _ extends s.Renderer{constructor(e){super(e)}static init_DataRenderer(){this.override({level:\"glyph\"})}get selection_manager(){return this.get_selection_manager()}}t.DataRenderer=_,_.__name__=\"DataRenderer\",_.init_DataRenderer()},\n", - " function _(e,i,t,s,n){s();const l=e(1),_=e(64),r=e(106),o=e(108),h=l.__importStar(e(48)),a=l.__importStar(e(107)),c=e(59);class d extends _.XYGlyphView{initialize(){super.initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;null!=e&&(this.glglyph=new o.LineGL(e.gl,this))}_render(e,i,t){const{sx:s,sy:n}=null!=t?t:this;let l=!1,_=null;this.visuals.line.set_value(e);for(const t of i){const i=s[t],r=n[t];if(l){if(!isFinite(i+r)){e.stroke(),e.beginPath(),l=!1,_=t;continue}null!=_&&t-_>1&&(e.stroke(),l=!1)}l?e.lineTo(i,r):(e.beginPath(),e.moveTo(i,r),l=!0),_=t}l&&e.stroke()}_hit_point(e){const i=new c.Selection,t={x:e.sx,y:e.sy};let s=9999;const n=Math.max(2,this.line_width.value/2);for(let e=0,l=this.sx.length-1;e({x:[p.XCoordinateSpec,{field:\"x\"}],y:[p.YCoordinateSpec,{field:\"y\"}]})))}}i.XYGlyph=d,d.__name__=\"XYGlyph\",d.init_XYGlyph()},\n", " function _(n,t,e,o,r){o();const c=n(1),l=c.__importDefault(n(66)),i=c.__importDefault(n(67)),u=n(24),a=new i.default(\"GOOGLE\"),s=new i.default(\"WGS84\"),f=l.default(s,a);e.wgs84_mercator={compute:(n,t)=>isFinite(n)&&isFinite(t)?f.forward([n,t]):[NaN,NaN],invert:(n,t)=>isFinite(n)&&isFinite(t)?f.inverse([n,t]):[NaN,NaN]};const _={lon:[-20026376.39,20026376.39],lat:[-20048966.1,20048966.1]},p={lon:[-180,180],lat:[-85.06,85.06]},{min:g,max:h}=Math;function m(n,t){const o=g(n.length,t.length),r=u.infer_type(n,t),c=new r(o),l=new r(o);return e.inplace.project_xy(n,t,c,l),[c,l]}e.clip_mercator=function(n,t,e){const[o,r]=_[e];return[h(n,o),g(t,r)]},e.in_bounds=function(n,t){const[e,o]=p[t];return e2?void 0!==e.name&&\"geocent\"===e.name||void 0!==n.name&&\"geocent\"===n.name?\"number\"==typeof r.z?[r.x,r.y,r.z].concat(t.splice(3)):[r.x,r.y,t[2]].concat(t.splice(3)):[r.x,r.y].concat(t.splice(2)):[r.x,r.y]):(o=c.default(e,n,t),2===(a=Object.keys(t)).length||a.forEach((function(r){if(void 0!==e.name&&\"geocent\"===e.name||void 0!==n.name&&\"geocent\"===n.name){if(\"x\"===r||\"y\"===r||\"z\"===r)return}else if(\"x\"===r||\"y\"===r)return;o[r]=t[r]})),o)}function l(e){return e instanceof i.default?e:e.oProj?e.oProj:i.default(e)}t.default=function(e,n,t){e=l(e);var r,o=!1;return void 0===n?(n=e,e=u,o=!0):(void 0!==n.x||Array.isArray(n))&&(t=n,n=e,e=u,o=!0),n=l(n),t?f(e,n,t):(r={forward:function(t){return f(e,n,t)},inverse:function(t){return f(n,e,t)}},o&&(r.oProj=n),r)}},\n", @@ -976,7 +972,7 @@ " function _(n,t,e,u,f){u(),e.default=function(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}},\n", " function _(e,i,n,t,r){function o(e){if(\"function\"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError(\"coordinates must be finite numbers\")}if(\"number\"!=typeof e||e!=e||!isFinite(e))throw new TypeError(\"coordinates must be finite numbers\")}t(),n.default=function(e){o(e.x),o(e.y)}},\n", " function _(e,t,s,i,n){i();const r=e(1),a=r.__importStar(e(18)),o=r.__importStar(e(99)),_=r.__importStar(e(45)),l=e(42),c=e(53),h=e(19),d=e(24),u=e(8),f=e(100),p=e(12),g=e(26),y=e(101),x=e(104),v=e(59),{abs:b,ceil:m}=Math;class w extends l.View{constructor(){super(...arguments),this._index=null,this._data_size=null,this._nohit_warned=new Set}get renderer(){return this.parent}get has_webgl(){return null!=this.glglyph}get index(){const{_index:e}=this;if(null!=e)return e;throw new Error(`${this}.index_data() wasn't called`)}get data_size(){const{_data_size:e}=this;if(null!=e)return e;throw new Error(`${this}.set_data() wasn't called`)}initialize(){super.initialize(),this.visuals=new _.Visuals(this)}request_render(){this.parent.request_render()}get canvas(){return this.renderer.parent.canvas_view}render(e,t,s){var i;null!=this.glglyph&&(this.renderer.needs_webgl_blit=this.glglyph.render(e,t,null!==(i=this.base)&&void 0!==i?i:this),this.renderer.needs_webgl_blit)||(e.beginPath(),this._render(e,t,null!=s?s:this.base))}has_finished(){return!0}notify_finished(){this.renderer.notify_finished()}_bounds(e){return e}bounds(){return this._bounds(this.index.bbox)}log_bounds(){const{x0:e,x1:t}=this.index.bounds(o.positive_x()),{y0:s,y1:i}=this.index.bounds(o.positive_y());return this._bounds({x0:e,y0:s,x1:t,y1:i})}get_anchor_point(e,t,[s,i]){switch(e){case\"center\":case\"center_center\":{const[e,n]=this.scenterxy(t,s,i);return{x:e,y:n}}default:return null}}scenterx(e,t,s){return this.scenterxy(e,t,s)[0]}scentery(e,t,s){return this.scenterxy(e,t,s)[1]}sdist(e,t,s,i=\"edge\",n=!1){const r=t.length,a=new d.ScreenArray(r),o=e.s_compute;if(\"center\"==i)for(let e=0;em(e))),a}draw_legend_for_index(e,t,s){}hit_test(e){switch(e.type){case\"point\":if(null!=this._hit_point)return this._hit_point(e);break;case\"span\":if(null!=this._hit_span)return this._hit_span(e);break;case\"rect\":if(null!=this._hit_rect)return this._hit_rect(e);break;case\"poly\":if(null!=this._hit_poly)return this._hit_poly(e)}return this._nohit_warned.has(e.type)||(h.logger.debug(`'${e.type}' selection not available for ${this.model.type}`),this._nohit_warned.add(e.type)),null}_hit_rect_against_index(e){const{sx0:t,sx1:s,sy0:i,sy1:n}=e,[r,a]=this.renderer.coordinates.x_scale.r_invert(t,s),[o,_]=this.renderer.coordinates.y_scale.r_invert(i,n),l=[...this.index.indices({x0:r,x1:a,y0:o,y1:_})];return new v.Selection({indices:l})}_project_data(){}*_iter_visuals(){for(const e of this.visuals)for(const t of e)(t instanceof a.VectorSpec||t instanceof a.ScalarSpec)&&(yield t)}set_base(e){e!=this&&e instanceof this.constructor&&(this.base=e)}_configure(e,t){Object.defineProperty(this,u.isString(e)?e:e.attr,Object.assign({configurable:!0,enumerable:!0},t))}set_visuals(e,t){var s;for(const s of this._iter_visuals()){const{base:i}=this;if(null!=i){const e=i.model.properties[s.attr];if(null!=e&&g.is_equal(s.get_value(),e.get_value())){this._configure(s,{get:()=>i[`${s.attr}`]});continue}}const n=s.uniform(e).select(t);this._configure(s,{value:n})}for(const e of this.visuals)e.update();null===(s=this.glglyph)||void 0===s||s.set_visuals_changed()}set_data(e,t,s){var i;const{x_range:n,y_range:r}=this.renderer.coordinates,o=new Set(this._iter_visuals());this._data_size=t.count;for(const s of this.model)if((s instanceof a.VectorSpec||s instanceof a.ScalarSpec)&&!o.has(s))if(s instanceof a.BaseCoordinateSpec){const i=s.array(e);let o=t.select(i);const _=\"x\"==s.dimension?n:r;if(_ instanceof x.FactorRange)if(s instanceof a.CoordinateSpec)o=_.v_synthetic(o);else if(s instanceof a.CoordinateSeqSpec)for(let e=0;e=0&&s>=0))throw new Error(`invalid bbox {x: ${i}, y: ${e}, width: ${h}, height: ${s}}`);this.x0=i,this.y0=e,this.x1=i+h,this.y1=e+s}else{let i,e,h,s;if(\"width\"in t)if(\"left\"in t)i=t.left,e=i+t.width;else if(\"right\"in t)e=t.right,i=e-t.width;else{const h=t.width/2;i=t.hcenter-h,e=t.hcenter+h}else i=t.left,e=t.right;if(\"height\"in t)if(\"top\"in t)h=t.top,s=h+t.height;else if(\"bottom\"in t)s=t.bottom,h=s-t.height;else{const i=t.height/2;h=t.vcenter-i,s=t.vcenter+i}else h=t.top,s=t.bottom;if(!(i<=e&&h<=s))throw new Error(`invalid bbox {left: ${i}, top: ${h}, right: ${e}, bottom: ${s}}`);this.x0=i,this.y0=h,this.x1=e,this.y1=s}}equals(t){return this.x0==t.x0&&this.y0==t.y0&&this.x1==t.x1&&this.y1==t.y1}[n.equals](t,i){return i.eq(this.x0,t.x0)&&i.eq(this.y0,t.y0)&&i.eq(this.x1,t.x1)&&i.eq(this.y1,t.y1)}toString(){return`BBox({left: ${this.left}, top: ${this.top}, width: ${this.width}, height: ${this.height}})`}get left(){return this.x0}get top(){return this.y0}get right(){return this.x1}get bottom(){return this.y1}get p0(){return[this.x0,this.y0]}get p1(){return[this.x1,this.y1]}get x(){return this.x0}get y(){return this.y0}get width(){return this.x1-this.x0}get height(){return this.y1-this.y0}get size(){return{width:this.width,height:this.height}}get rect(){const{x0:t,y0:i,x1:e,y1:h}=this;return{p0:{x:t,y:i},p1:{x:e,y:i},p2:{x:e,y:h},p3:{x:t,y:h}}}get box(){const{x:t,y:i,width:e,height:h}=this;return{x:t,y:i,width:e,height:h}}get h_range(){return{start:this.x0,end:this.x1}}get v_range(){return{start:this.y0,end:this.y1}}get ranges(){return[this.h_range,this.v_range]}get aspect(){return this.width/this.height}get hcenter(){return(this.left+this.right)/2}get vcenter(){return(this.top+this.bottom)/2}get area(){return this.width*this.height}relative(){const{width:t,height:i}=this;return new o({x:0,y:0,width:t,height:i})}translate(t,i){const{x:e,y:h,width:s,height:r}=this;return new o({x:t+e,y:i+h,width:s,height:r})}relativize(t,i){return[t-this.x,i-this.y]}contains(t,i){return this.x0<=t&&t<=this.x1&&this.y0<=i&&i<=this.y1}clip(t,i){return tthis.x1&&(t=this.x1),ithis.y1&&(i=this.y1),[t,i]}grow_by(t){return new o({left:this.left-t,right:this.right+t,top:this.top-t,bottom:this.bottom+t})}shrink_by(t){return new o({left:this.left+t,right:this.right-t,top:this.top+t,bottom:this.bottom-t})}union(t){return new o({x0:x(this.x0,t.x0),y0:x(this.y0,t.y0),x1:y(this.x1,t.x1),y1:y(this.y1,t.y1)})}intersection(t){return this.intersects(t)?new o({x0:y(this.x0,t.x0),y0:y(this.y0,t.y0),x1:x(this.x1,t.x1),y1:x(this.y1,t.y1)}):null}intersects(t){return!(t.x1this.x1||t.y1this.y1)}get xview(){return{compute:t=>this.left+t,v_compute:t=>{const i=new r.ScreenArray(t.length),e=this.left;for(let h=0;hthis.bottom-t,v_compute:t=>{const i=new r.ScreenArray(t.length),e=this.bottom;for(let h=0;h=0&&r>=0))throw new Error(`invalid bbox {x: ${i}, y: ${e}, width: ${h}, height: ${r}}`);this.x0=i,this.y0=e,this.x1=i+h,this.y1=e+r}else{let i,e,h,r;if(\"width\"in t)if(\"left\"in t)i=t.left,e=i+t.width;else if(\"right\"in t)e=t.right,i=e-t.width;else{const h=t.width/2;i=t.hcenter-h,e=t.hcenter+h}else i=t.left,e=t.right;if(\"height\"in t)if(\"top\"in t)h=t.top,r=h+t.height;else if(\"bottom\"in t)r=t.bottom,h=r-t.height;else{const i=t.height/2;h=t.vcenter-i,r=t.vcenter+i}else h=t.top,r=t.bottom;if(!(i<=e&&h<=r))throw new Error(`invalid bbox {left: ${i}, top: ${h}, right: ${e}, bottom: ${r}}`);this.x0=i,this.y0=h,this.x1=e,this.y1=r}}static from_rect({left:t,right:i,top:e,bottom:h}){return new o({x0:Math.min(t,i),y0:Math.min(e,h),x1:Math.max(t,i),y1:Math.max(e,h)})}equals(t){return this.x0==t.x0&&this.y0==t.y0&&this.x1==t.x1&&this.y1==t.y1}[n.equals](t,i){return i.eq(this.x0,t.x0)&&i.eq(this.y0,t.y0)&&i.eq(this.x1,t.x1)&&i.eq(this.y1,t.y1)}toString(){return`BBox({left: ${this.left}, top: ${this.top}, width: ${this.width}, height: ${this.height}})`}get left(){return this.x0}get top(){return this.y0}get right(){return this.x1}get bottom(){return this.y1}get p0(){return[this.x0,this.y0]}get p1(){return[this.x1,this.y1]}get x(){return this.x0}get y(){return this.y0}get width(){return this.x1-this.x0}get height(){return this.y1-this.y0}get size(){return{width:this.width,height:this.height}}get rect(){const{x0:t,y0:i,x1:e,y1:h}=this;return{p0:{x:t,y:i},p1:{x:e,y:i},p2:{x:e,y:h},p3:{x:t,y:h}}}get box(){const{x:t,y:i,width:e,height:h}=this;return{x:t,y:i,width:e,height:h}}get h_range(){return{start:this.x0,end:this.x1}}get v_range(){return{start:this.y0,end:this.y1}}get ranges(){return[this.h_range,this.v_range]}get aspect(){return this.width/this.height}get hcenter(){return(this.left+this.right)/2}get vcenter(){return(this.top+this.bottom)/2}get area(){return this.width*this.height}relative(){const{width:t,height:i}=this;return new o({x:0,y:0,width:t,height:i})}translate(t,i){const{x:e,y:h,width:r,height:s}=this;return new o({x:t+e,y:i+h,width:r,height:s})}relativize(t,i){return[t-this.x,i-this.y]}contains(t,i){return this.x0<=t&&t<=this.x1&&this.y0<=i&&i<=this.y1}clip(t,i){return tthis.x1&&(t=this.x1),ithis.y1&&(i=this.y1),[t,i]}grow_by(t){return new o({left:this.left-t,right:this.right+t,top:this.top-t,bottom:this.bottom+t})}shrink_by(t){return new o({left:this.left+t,right:this.right-t,top:this.top+t,bottom:this.bottom-t})}union(t){return new o({x0:x(this.x0,t.x0),y0:x(this.y0,t.y0),x1:y(this.x1,t.x1),y1:y(this.y1,t.y1)})}intersection(t){return this.intersects(t)?new o({x0:y(this.x0,t.x0),y0:y(this.y0,t.y0),x1:x(this.x1,t.x1),y1:x(this.y1,t.y1)}):null}intersects(t){return!(t.x1this.x1||t.y1this.y1)}get xview(){return{compute:t=>this.left+t,v_compute:t=>{const i=new s.ScreenArray(t.length),e=this.left;for(let h=0;hthis.bottom-t,v_compute:t=>{const i=new s.ScreenArray(t.length),e=this.bottom;for(let h=0;h{const s=new Uint32Array(r);for(let n=0;n>1;i[s]>n?e=s:t=s+1}return i[t]}class r extends o.default{search_indices(n,i,t,e){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let s=this._boxes.length-4;const o=[],x=new d.Indices(this.numItems);for(;void 0!==s;){const d=Math.min(s+4*this.nodeSize,h(s,this._levelBounds));for(let h=s;h>2];tthis._boxes[h+2]||i>this._boxes[h+3]||(s<4*this.numItems?x.set(d):o.push(d)))}s=o.pop()}return x}}r.__name__=\"_FlatBush\";class l{constructor(n){this.index=null,n>0&&(this.index=new r(n))}add(n,i,t,e){var s;null===(s=this.index)||void 0===s||s.add(n,i,t,e)}add_empty(){var n;null===(n=this.index)||void 0===n||n.add(1/0,1/0,-1/0,-1/0)}finish(){var n;null===(n=this.index)||void 0===n||n.finish()}_normalize(n){let{x0:i,y0:t,x1:e,y1:s}=n;return i>e&&([i,e]=[e,i]),t>s&&([t,s]=[s,t]),{x0:i,y0:t,x1:e,y1:s}}get bbox(){if(null==this.index)return x.empty();{const{minX:n,minY:i,maxX:t,maxY:e}=this.index;return{x0:n,y0:i,x1:t,y1:e}}}indices(n){if(null==this.index)return new d.Indices(0);{const{x0:i,y0:t,x1:e,y1:s}=this._normalize(n);return this.index.search_indices(i,t,e,s)}}bounds(n){const i=x.empty();for(const t of this.indices(n)){const n=this.index._boxes,e=n[4*t+0],s=n[4*t+1],o=n[4*t+2],d=n[4*t+3];oi.x1&&(i.x1=e),di.y1&&(i.y1=s)}return i}}t.SpatialIndex=l,l.__name__=\"SpatialIndex\"},\n", " function _(t,s,i,e,h){e();const n=t(1).__importDefault(t(103)),o=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class r{static from(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");const[s,i]=new Uint8Array(t,0,2);if(251!==s)throw new Error(\"Data does not appear to be in a Flatbush format.\");if(i>>4!=3)throw new Error(`Got v${i>>4} data when expected v3.`);const[e]=new Uint16Array(t,2,1),[h]=new Uint32Array(t,4,1);return new r(h,e,o[15&i],t)}constructor(t,s=16,i=Float64Array,e){if(void 0===t)throw new Error(\"Missing required argument: numItems.\");if(isNaN(t)||t<=0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+s,2),65535);let h=t,r=h;this._levelBounds=[4*h];do{h=Math.ceil(h/this.nodeSize),r+=h,this._levelBounds.push(4*r)}while(1!==h);this.ArrayType=i||Float64Array,this.IndexArrayType=r<16384?Uint16Array:Uint32Array;const a=o.indexOf(this.ArrayType),_=4*r*this.ArrayType.BYTES_PER_ELEMENT;if(a<0)throw new Error(`Unexpected typed array class: ${i}.`);e&&e instanceof ArrayBuffer?(this.data=e,this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=4*r,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+_+r*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+a]),new Uint16Array(this.data,2,1)[0]=s,new Uint32Array(this.data,4,1)[0]=t),this._queue=new n.default}add(t,s,i,e){const h=this._pos>>2;return this._indices[h]=h,this._boxes[this._pos++]=t,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,tthis.maxX&&(this.maxX=i),e>this.maxY&&(this.maxY=e),h}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);if(this.numItems<=this.nodeSize)return this._boxes[this._pos++]=this.minX,this._boxes[this._pos++]=this.minY,this._boxes[this._pos++]=this.maxX,void(this._boxes[this._pos++]=this.maxY);const t=this.maxX-this.minX,s=this.maxY-this.minY,i=new Uint32Array(this.numItems);for(let e=0;e>2]=t,this._boxes[this._pos++]=e,this._boxes[this._pos++]=h,this._boxes[this._pos++]=n,this._boxes[this._pos++]=o}}}search(t,s,i,e,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const o=[],r=[];for(;void 0!==n;){const a=Math.min(n+4*this.nodeSize,_(n,this._levelBounds));for(let _=n;_>2];ithis._boxes[_+2]||s>this._boxes[_+3]||(n<4*this.numItems?(void 0===h||h(a))&&r.push(a):o.push(a)))}n=o.pop()}return r}neighbors(t,s,i=1/0,e=1/0,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const o=this._queue,r=[],x=e*e;for(;void 0!==n;){const e=Math.min(n+4*this.nodeSize,_(n,this._levelBounds));for(let i=n;i>2],r=a(t,this._boxes[i],this._boxes[i+2]),_=a(s,this._boxes[i+1],this._boxes[i+3]),x=r*r+_*_;n<4*this.numItems?(void 0===h||h(e))&&o.push(-e-1,x):o.push(e,x)}for(;o.length&&o.peek()<0;){if(o.peekValue()>x)return o.clear(),r;if(r.push(-o.pop()-1),r.length===i)return o.clear(),r}n=o.pop()}return o.clear(),r}}function a(t,s,i){return t>1;s[h]>t?e=h:i=h+1}return s[i]}function x(t,s,i,e,h,n){if(Math.floor(e/n)>=Math.floor(h/n))return;const o=t[e+h>>1];let r=e-1,a=h+1;for(;;){do{r++}while(t[r]o);if(r>=a)break;d(t,s,i,r,a)}x(t,s,i,e,a,n),x(t,s,i,a+1,h,n)}function d(t,s,i,e,h){const n=t[e];t[e]=t[h],t[h]=n;const o=4*e,r=4*h,a=s[o],_=s[o+1],x=s[o+2],d=s[o+3];s[o]=s[r],s[o+1]=s[r+1],s[o+2]=s[r+2],s[o+3]=s[r+3],s[r]=a,s[r+1]=_,s[r+2]=x,s[r+3]=d;const m=i[e];i[e]=i[h],i[h]=m}function m(t,s){let i=t^s,e=65535^i,h=65535^(t|s),n=t&(65535^s),o=i|e>>1,r=i>>1^i,a=h>>1^e&n>>1^h,_=i&h>>1^n>>1^n;i=o,e=r,h=a,n=_,o=i&i>>2^e&e>>2,r=i&e>>2^e&(i^e)>>2,a^=i&h>>2^e&n>>2,_^=e&h>>2^(i^e)&n>>2,i=o,e=r,h=a,n=_,o=i&i>>4^e&e>>4,r=i&e>>4^e&(i^e)>>4,a^=i&h>>4^e&n>>4,_^=e&h>>4^(i^e)&n>>4,i=o,e=r,h=a,n=_,a^=i&h>>8^e&n>>8,_^=e&h>>8^(i^e)&n>>8,i=a^a>>1,e=_^_>>1;let x=t^s,d=e|65535^(x|i);return x=16711935&(x|x<<8),x=252645135&(x|x<<4),x=858993459&(x|x<<2),x=1431655765&(x|x<<1),d=16711935&(d|d<<8),d=252645135&(d|d<<4),d=858993459&(d|d<<2),d=1431655765&(d|d<<1),(d<<1|x)>>>0}i.default=r},\n", @@ -1004,7 +1000,7 @@ " function _(e,t,s,n,i){n();const c=e(53);class l extends c.Model{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}v_compute(e){this._connected.has(e)||(this.connect(e.change,(()=>this._result.delete(e))),this.connect(e.patching,(()=>this._result.delete(e))),this.connect(e.streaming,(()=>this._result.delete(e))),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._v_compute(e),this._result.set(e,t)),t}}s.Expression=l,l.__name__=\"Expression\";class h extends c.Model{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}compute(e){this._connected.has(e)||(this.connect(e.change,(()=>this._result.delete(e))),this.connect(e.patching,(()=>this._result.delete(e))),this.connect(e.streaming,(()=>this._result.delete(e))),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._compute(e),this._result.set(e,t)),t}}s.ScalarExpression=h,h.__name__=\"ScalarExpression\"},\n", " function _(o,e,r,t,n){t();const s=o(53);class c extends s.Model{constructor(o){super(o)}}r.LayoutProvider=c,c.__name__=\"LayoutProvider\"},\n", " function _(e,t,d,n,s){n();const o=e(53),r=e(12),_=e(9),i=e(59);class c extends o.Model{constructor(e){super(e)}_hit_test(e,t,d){if(!t.model.visible)return null;const n=d.glyph.hit_test(e);return null==n?null:d.model.view.convert_selection_from_subset(n)}}d.GraphHitTestPolicy=c,c.__name__=\"GraphHitTestPolicy\";class a extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.edge_view)}do_selection(e,t,d,n){if(null==e)return!1;const s=t.edge_renderer.data_source.selected;return s.update(e,d,n),t.edge_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const{edge_renderer:o}=d.model,r=o.get_selection_manager().get_or_create_inspector(d.edge_view.model);return r.update(e,n,s),d.edge_view.model.data_source.setv({inspected:r},{silent:!0}),d.edge_view.model.data_source.inspect.emit([d.edge_view.model,{geometry:t}]),!r.is_empty()}}d.EdgesOnly=a,a.__name__=\"EdgesOnly\";class l extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.node_view)}do_selection(e,t,d,n){if(null==e)return!1;const s=t.node_renderer.data_source.selected;return s.update(e,d,n),t.node_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const{node_renderer:o}=d.model,r=o.get_selection_manager().get_or_create_inspector(d.node_view.model);return r.update(e,n,s),d.node_view.model.data_source.setv({inspected:r},{silent:!0}),d.node_view.model.data_source.inspect.emit([d.node_view.model,{geometry:t}]),!r.is_empty()}}d.NodesOnly=l,l.__name__=\"NodesOnly\";class u extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.node_view)}get_linked_edges(e,t,d){let n=[];\"selection\"==d?n=e.selected.indices.map((t=>e.data.index[t])):\"inspection\"==d&&(n=e.inspected.indices.map((t=>e.data.index[t])));const s=[];for(let e=0;er.indexOf(e.data.index,t)));return new i.Selection({indices:o})}do_selection(e,t,d,n){if(null==e)return!1;const s=t.edge_renderer.data_source.selected;s.update(e,d,n);const o=t.node_renderer.data_source.selected,r=this.get_linked_nodes(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(r,d,n),t.edge_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const o=d.edge_view.model.data_source.selection_manager.get_or_create_inspector(d.edge_view.model);o.update(e,n,s),d.edge_view.model.data_source.setv({inspected:o},{silent:!0});const r=d.node_view.model.data_source.selection_manager.get_or_create_inspector(d.node_view.model),_=this.get_linked_nodes(d.node_view.model.data_source,d.edge_view.model.data_source,\"inspection\");return r.update(_,n,s),d.node_view.model.data_source.setv({inspected:r},{silent:!0}),d.edge_view.model.data_source.inspect.emit([d.edge_view.model,{geometry:t}]),!o.is_empty()}}d.EdgesAndLinkedNodes=m,m.__name__=\"EdgesAndLinkedNodes\"},\n", - " function _(t,e,i,s,n){s();const o=t(1),r=t(65),l=t(48),_=o.__importStar(t(107)),c=o.__importStar(t(18)),h=t(12),a=t(13),d=t(98),x=t(106),y=t(59);class g extends d.GlyphView{_project_data(){r.inplace.project_xy(this._xs.array,this._ys.array)}_index_data(t){const{data_size:e}=this;for(let i=0;i0&&o.set(t,i)}return new y.Selection({indices:[...o.keys()],multiline_indices:a.to_object(o)})}get_interpolation_hit(t,e,i){const s=this._xs.get(t),n=this._ys.get(t),o=s[e],r=n[e],l=s[e+1],_=n[e+1];return x.line_interpolation(this.renderer,i,o,r,l,_)}draw_legend_for_index(t,e,i){x.generic_line_vector_legend(this.visuals,t,e,i)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}i.MultiLineView=g,g.__name__=\"MultiLineView\";class u extends d.Glyph{constructor(t){super(t)}static init_MultiLine(){this.prototype.default_view=g,this.define((({})=>({xs:[c.XCoordinateSeqSpec,{field:\"xs\"}],ys:[c.YCoordinateSeqSpec,{field:\"ys\"}]}))),this.mixins(l.LineVector)}}i.MultiLine=u,u.__name__=\"MultiLine\",u.init_MultiLine()},\n", + " function _(t,e,i,n,s){n();const o=t(1),l=t(65),r=t(48),_=o.__importStar(t(107)),c=o.__importStar(t(18)),h=t(12),a=t(13),d=t(98),x=t(106),y=t(59);class g extends d.GlyphView{_project_data(){l.inplace.project_xy(this._xs.array,this._ys.array)}_index_data(t){const{data_size:e}=this;for(let i=0;i0&&o.set(t,i)}return new y.Selection({indices:[...o.keys()],multiline_indices:a.to_object(o)})}get_interpolation_hit(t,e,i){const n=this._xs.get(t),s=this._ys.get(t),o=n[e],l=s[e],r=n[e+1],_=s[e+1];return x.line_interpolation(this.renderer,i,o,l,r,_)}draw_legend_for_index(t,e,i){x.generic_line_vector_legend(this.visuals,t,e,i)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}i.MultiLineView=g,g.__name__=\"MultiLineView\";class u extends d.Glyph{constructor(t){super(t)}static init_MultiLine(){this.prototype.default_view=g,this.define((({})=>({xs:[c.XCoordinateSeqSpec,{field:\"xs\"}],ys:[c.YCoordinateSeqSpec,{field:\"ys\"}]}))),this.mixins(r.LineVector)}}i.MultiLine=u,u.__name__=\"MultiLine\",u.init_MultiLine()},\n", " function _(e,t,s,i,n){i();const r=e(1),o=e(98),a=e(106),_=e(12),c=e(48),l=r.__importStar(e(107)),h=r.__importStar(e(18)),d=e(59),y=e(11),p=e(65);class x extends o.GlyphView{_project_data(){p.inplace.project_xy(this._xs.array,this._ys.array)}_index_data(e){const{data_size:t}=this;for(let s=0;s({xs:[h.XCoordinateSeqSpec,{field:\"xs\"}],ys:[h.YCoordinateSeqSpec,{field:\"ys\"}]}))),this.mixins([c.LineVector,c.FillVector,c.HatchVector])}}s.Patches=f,f.__name__=\"Patches\",f.init_Patches()},\n", " function _(e,t,n,s,o){s();const r=e(53);class c extends r.Model{do_selection(e,t,n,s){return null!=e&&(t.selected.update(e,n,s),t._select.emit(),!t.selected.is_empty())}}n.SelectionPolicy=c,c.__name__=\"SelectionPolicy\";class l extends c{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!=t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_intersection(t);return e}return null}}n.IntersectRenderers=l,l.__name__=\"IntersectRenderers\";class _ extends c{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!=t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_union(t);return e}return null}}n.UnionRenderers=_,_.__name__=\"UnionRenderers\"},\n", " function _(t,n,e,s,o){s();const r=t(1),i=t(57),l=t(8),c=t(13),a=r.__importStar(t(131)),u=t(132),h=t(35);function d(t,n,e){if(l.isArray(t)){const s=t.concat(n);return null!=e&&s.length>e?s.slice(-e):s}if(l.isTypedArray(t)){const s=t.length+n.length;if(null!=e&&s>e){const o=s-e,r=t.length;let i;t.length({data:[t(n),{}]})))}stream(t,n,e){const{data:s}=this;for(const[e,o]of c.entries(t))s[e]=d(s[e],o,n);if(this.setv({data:s},{silent:!0}),this.streaming.emit(),null!=this.document){const s=new h.ColumnsStreamedEvent(this.document,this.ref(),t,n);this.document._notify_change(this,\"data\",null,null,{setter_id:e,hint:s})}}patch(t,n){const{data:e}=this;let s=new Set;for(const[n,o]of c.entries(t))s=u.union(s,m(e[n],o));if(this.setv({data:e},{silent:!0}),this.patching.emit([...s]),null!=this.document){const e=new h.ColumnsPatchedEvent(this.document,this.ref(),t);this.document._notify_change(this,\"data\",null,null,{setter_id:n,hint:e})}}}e.ColumnDataSource=_,_.__name__=\"ColumnDataSource\",_.init_ColumnDataSource()},\n", @@ -1013,7 +1009,7 @@ " function _(e,i,t,s,o){s();const n=e(1),a=e(53),l=e(42),r=n.__importStar(e(45)),_=e(48),c=n.__importStar(e(18));class d extends l.View{initialize(){super.initialize(),this.visuals=new r.Visuals(this)}request_render(){this.parent.request_render()}get canvas(){return this.parent.canvas}set_data(e){const i=this;for(const t of this.model){if(!(t instanceof c.VectorSpec||t instanceof c.ScalarSpec))continue;const s=t.uniform(e);i[`${t.attr}`]=s}}}t.ArrowHeadView=d,d.__name__=\"ArrowHeadView\";class h extends a.Model{constructor(e){super(e)}static init_ArrowHead(){this.define((()=>({size:[c.NumberSpec,25]})))}}t.ArrowHead=h,h.__name__=\"ArrowHead\",h.init_ArrowHead();class v extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(0,0),e.lineTo(.5*t,t)}render(e,i){if(this.visuals.line.doit){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.stroke()}}}t.OpenHeadView=v,v.__name__=\"OpenHeadView\";class u extends h{constructor(e){super(e)}static init_OpenHead(){this.prototype.default_view=v,this.mixins(_.LineVector)}}t.OpenHead=u,u.__name__=\"OpenHead\",u.init_OpenHead();class m extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(.5*t,t)}render(e,i){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._normal(e,i),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._normal(e,i),e.stroke())}_normal(e,i){const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.closePath()}}t.NormalHeadView=m,m.__name__=\"NormalHeadView\";class T extends h{constructor(e){super(e)}static init_NormalHead(){this.prototype.default_view=m,this.mixins([_.LineVector,_.FillVector]),this.override({fill_color:\"black\"})}}t.NormalHead=T,T.__name__=\"NormalHead\",T.init_NormalHead();class p extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(0,.5*t),e.lineTo(.5*t,t)}render(e,i){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._vee(e,i),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._vee(e,i),e.stroke())}_vee(e,i){const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.lineTo(0,.5*t),e.closePath()}}t.VeeHeadView=p,p.__name__=\"VeeHeadView\";class H extends h{constructor(e){super(e)}static init_VeeHead(){this.prototype.default_view=p,this.mixins([_.LineVector,_.FillVector]),this.override({fill_color:\"black\"})}}t.VeeHead=H,H.__name__=\"VeeHead\",H.init_VeeHead();class V extends d{render(e,i){if(this.visuals.line.doit){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,0),e.lineTo(-.5*t,0),e.stroke()}}clip(e,i){}}t.TeeHeadView=V,V.__name__=\"TeeHeadView\";class f extends h{constructor(e){super(e)}static init_TeeHead(){this.prototype.default_view=V,this.mixins(_.LineVector)}}t.TeeHead=f,f.__name__=\"TeeHead\",f.init_TeeHead()},\n", " function _(s,e,i,t,l){t();const _=s(1),o=s(135),r=_.__importStar(s(48));class h extends o.UpperLowerView{paint(s){s.beginPath(),s.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let e=0,i=this._lower_sx.length;e=0;e--)s.lineTo(this._upper_sx[e],this._upper_sy[e]);s.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(s),s.fill()),s.beginPath(),s.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let e=0,i=this._lower_sx.length;e({dimension:[n.Dimension,\"height\"],lower:[h,{field:\"lower\"}],upper:[h,{field:\"upper\"}],base:[h,{field:\"base\"}]})))}}i.UpperLower=d,d.__name__=\"UpperLower\",d.init_UpperLower()},\n", - " function _(t,i,o,n,e){n();const s=t(1),l=t(40),a=s.__importStar(t(48)),r=t(20),h=t(99);o.EDGE_TOLERANCE=2.5;class u extends l.AnnotationView{constructor(){super(...arguments),this.bbox=new h.BBox}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_render(){const{left:t,right:i,top:o,bottom:n}=this.model;if(null==t&&null==i&&null==o&&null==n)return;const{frame:e}=this.plot_view,s=this.coordinates.x_scale,l=this.coordinates.y_scale,a=(t,i,o,n,e)=>{let s;return s=null!=t?this.model.screen?t:\"data\"==i?o.compute(t):n.compute(t):e,s};this.bbox=new h.BBox({left:a(t,this.model.left_units,s,e.bbox.xview,e.bbox.left),right:a(i,this.model.right_units,s,e.bbox.xview,e.bbox.right),top:a(o,this.model.top_units,l,e.bbox.yview,e.bbox.top),bottom:a(n,this.model.bottom_units,l,e.bbox.yview,e.bbox.bottom)}),this._paint_box()}_paint_box(){const{ctx:t}=this.layer;t.save();const{left:i,top:o,width:n,height:e}=this.bbox;t.beginPath(),t.rect(i,o,n,e),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(t),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.restore()}interactive_bbox(){const t=this.model.line_width+o.EDGE_TOLERANCE;return this.bbox.grow_by(t)}interactive_hit(t,i){if(null==this.model.in_cursor)return!1;return this.interactive_bbox().contains(t,i)}cursor(t,i){const{left:o,right:n,bottom:e,top:s}=this.bbox;return Math.abs(t-o)<3||Math.abs(t-n)<3?this.model.ew_cursor:Math.abs(i-e)<3||Math.abs(i-s)<3?this.model.ns_cursor:this.bbox.contains(t,i)?this.model.in_cursor:null}}o.BoxAnnotationView=u,u.__name__=\"BoxAnnotationView\";class c extends l.Annotation{constructor(t){super(t)}static init_BoxAnnotation(){this.prototype.default_view=u,this.mixins([a.Line,a.Fill,a.Hatch]),this.define((({Number:t,Nullable:i})=>({top:[i(t),null],top_units:[r.SpatialUnits,\"data\"],bottom:[i(t),null],bottom_units:[r.SpatialUnits,\"data\"],left:[i(t),null],left_units:[r.SpatialUnits,\"data\"],right:[i(t),null],right_units:[r.SpatialUnits,\"data\"],render_mode:[r.RenderMode,\"canvas\"]}))),this.internal((({Boolean:t,String:i,Nullable:o})=>({screen:[t,!1],ew_cursor:[o(i),null],ns_cursor:[o(i),null],in_cursor:[o(i),null]}))),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}update({left:t,right:i,top:o,bottom:n}){this.setv({left:t,right:i,top:o,bottom:n,screen:!0})}}o.BoxAnnotation=c,c.__name__=\"BoxAnnotation\",c.init_BoxAnnotation()},\n", + " function _(t,i,o,n,e){n();const s=t(1),l=t(40),a=s.__importStar(t(48)),r=t(20),h=t(99);o.EDGE_TOLERANCE=2.5;class c extends l.AnnotationView{constructor(){super(...arguments),this.bbox=new h.BBox}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_render(){const{left:t,right:i,top:o,bottom:n}=this.model;if(null==t&&null==i&&null==o&&null==n)return;const{frame:e}=this.plot_view,s=this.coordinates.x_scale,l=this.coordinates.y_scale,a=(t,i,o,n,e)=>{let s;return s=null!=t?this.model.screen?t:\"data\"==i?o.compute(t):n.compute(t):e,s};this.bbox=h.BBox.from_rect({left:a(t,this.model.left_units,s,e.bbox.xview,e.bbox.left),right:a(i,this.model.right_units,s,e.bbox.xview,e.bbox.right),top:a(o,this.model.top_units,l,e.bbox.yview,e.bbox.top),bottom:a(n,this.model.bottom_units,l,e.bbox.yview,e.bbox.bottom)}),this._paint_box()}_paint_box(){const{ctx:t}=this.layer;t.save();const{left:i,top:o,width:n,height:e}=this.bbox;t.beginPath(),t.rect(i,o,n,e),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(t),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.restore()}interactive_bbox(){const t=this.model.line_width+o.EDGE_TOLERANCE;return this.bbox.grow_by(t)}interactive_hit(t,i){if(null==this.model.in_cursor)return!1;return this.interactive_bbox().contains(t,i)}cursor(t,i){const{left:o,right:n,bottom:e,top:s}=this.bbox;return Math.abs(t-o)<3||Math.abs(t-n)<3?this.model.ew_cursor:Math.abs(i-e)<3||Math.abs(i-s)<3?this.model.ns_cursor:this.bbox.contains(t,i)?this.model.in_cursor:null}}o.BoxAnnotationView=c,c.__name__=\"BoxAnnotationView\";class u extends l.Annotation{constructor(t){super(t)}static init_BoxAnnotation(){this.prototype.default_view=c,this.mixins([a.Line,a.Fill,a.Hatch]),this.define((({Number:t,Nullable:i})=>({top:[i(t),null],top_units:[r.SpatialUnits,\"data\"],bottom:[i(t),null],bottom_units:[r.SpatialUnits,\"data\"],left:[i(t),null],left_units:[r.SpatialUnits,\"data\"],right:[i(t),null],right_units:[r.SpatialUnits,\"data\"],render_mode:[r.RenderMode,\"canvas\"]}))),this.internal((({Boolean:t,String:i,Nullable:o})=>({screen:[t,!1],ew_cursor:[o(i),null],ns_cursor:[o(i),null],in_cursor:[o(i),null]}))),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}update({left:t,right:i,top:o,bottom:n}){this.setv({left:t,right:i,top:o,bottom:n,screen:!0})}}o.BoxAnnotation=u,u.__name__=\"BoxAnnotation\",u.init_BoxAnnotation()},\n", " function _(t,e,i,a,n){a();const o=t(1),r=t(40),s=t(138),l=t(144),_=t(162),c=t(165),h=t(198),u=t(166),p=t(205),m=t(169),g=t(203),d=t(202),f=t(209),w=t(217),b=t(220),v=t(20),y=o.__importStar(t(48)),k=t(9),x=t(221),C=t(222),j=t(225),z=t(140),L=t(11),S=t(122),M=t(8);class T extends r.AnnotationView{get orientation(){return this._orientation}initialize(){super.initialize();const{ticker:t,formatter:e,color_mapper:i}=this.model;this._ticker=\"auto\"!=t?t:(()=>{switch(!0){case i instanceof f.LogColorMapper:return new h.LogTicker;case i instanceof f.ScanningColorMapper:return new h.BinnedTicker({mapper:i});case i instanceof f.CategoricalColorMapper:return new h.CategoricalTicker;default:return new h.BasicTicker}})(),this._formatter=\"auto\"!=e?e:(()=>{switch(!0){case this._ticker instanceof h.LogTicker:return new p.LogTickFormatter;case i instanceof f.CategoricalColorMapper:return new p.CategoricalTickFormatter;default:return new p.BasicTickFormatter}})(),this._major_range=(()=>{if(i instanceof f.CategoricalColorMapper){const{factors:t}=i;return new b.FactorRange({factors:t})}if(i instanceof d.ContinuousColorMapper){const{min:t,max:e}=i.metrics;return new b.Range1d({start:t,end:e})}L.unreachable()})(),this._major_scale=(()=>{if(i instanceof f.LinearColorMapper)return new w.LinearScale;if(i instanceof f.LogColorMapper)return new w.LogScale;if(i instanceof f.ScanningColorMapper){const{binning:t}=i.metrics;return new w.LinearInterpolationScale({binning:t})}if(i instanceof f.CategoricalColorMapper)return new w.CategoricalScale;L.unreachable()})(),this._minor_range=new b.Range1d({start:0,end:1}),this._minor_scale=new w.LinearScale;const a=y.attrs_of(this.model,\"major_label_\",y.Text,!0),n=y.attrs_of(this.model,\"major_tick_\",y.Line,!0),o=y.attrs_of(this.model,\"minor_tick_\",y.Line,!0),r=y.attrs_of(this.model,\"title_\",y.Text),l=i instanceof f.CategoricalColorMapper?_.CategoricalAxis:i instanceof f.LogColorMapper?_.LogAxis:_.LinearAxis;this._axis=new l(Object.assign(Object.assign(Object.assign({ticker:this._ticker,formatter:this._formatter,major_tick_in:this.model.major_tick_in,major_tick_out:this.model.major_tick_out,minor_tick_in:this.model.minor_tick_in,minor_tick_out:this.model.minor_tick_out,major_label_standoff:this.model.label_standoff,major_label_overrides:this.model.major_label_overrides,major_label_policy:this.model.major_label_policy,axis_line_color:null},a),n),o));const{title:c}=this.model;c&&(this._title=new s.Title(Object.assign({text:c,standoff:this.model.title_standoff},r)))}async lazy_initialize(){await super.lazy_initialize();const t=this,e={get parent(){return t.parent},get root(){return t.root},get frame(){return t._frame},get canvas_view(){return t.parent.canvas_view},request_layout(){t.parent.request_layout()}};this._axis_view=await S.build_view(this._axis,{parent:e}),null!=this._title&&(this._title_view=await S.build_view(this._title,{parent:e}))}remove(){var t;null===(t=this._title_view)||void 0===t||t.remove(),this._axis_view.remove(),super.remove()}connect_signals(){super.connect_signals(),this.connect(this._ticker.change,(()=>this.request_render())),this.connect(this._formatter.change,(()=>this.request_render())),this.connect(this.model.color_mapper.metrics_change,(()=>{const t=this._major_range,e=this._major_scale,{color_mapper:i}=this.model;if(i instanceof d.ContinuousColorMapper&&t instanceof b.Range1d){const{min:e,max:a}=i.metrics;t.setv({start:e,end:a})}if(i instanceof f.ScanningColorMapper&&e instanceof w.LinearInterpolationScale){const{binning:t}=i.metrics;e.binning=t}this._set_canvas_image(),this.plot_view.request_layout()}))}_set_canvas_image(){const{orientation:t}=this,e=(()=>{const{palette:e}=this.model.color_mapper;return\"vertical\"==t?k.reversed(e):e})(),[i,a]=\"vertical\"==t?[1,e.length]:[e.length,1],n=this._image=document.createElement(\"canvas\");n.width=i,n.height=a;const o=n.getContext(\"2d\"),r=o.getImageData(0,0,i,a),s=new f.LinearColorMapper({palette:e}).rgba_mapper.v_compute(k.range(0,e.length));r.data.set(s),o.putImageData(r,0,0)}update_layout(){const{location:t,width:e,height:i,padding:a,margin:n}=this.model,[o,r]=(()=>{if(!M.isString(t))return[\"end\",\"start\"];switch(t){case\"top_left\":return[\"start\",\"start\"];case\"top\":case\"top_center\":return[\"start\",\"center\"];case\"top_right\":return[\"start\",\"end\"];case\"bottom_left\":return[\"end\",\"start\"];case\"bottom\":case\"bottom_center\":return[\"end\",\"center\"];case\"bottom_right\":return[\"end\",\"end\"];case\"left\":case\"center_left\":return[\"center\",\"start\"];case\"center\":case\"center_center\":return[\"center\",\"center\"];case\"right\":case\"center_right\":return[\"center\",\"end\"]}})(),s=this._orientation=(()=>{const{orientation:t}=this.model;return\"auto\"==t?null!=this.panel?this.panel.is_horizontal?\"horizontal\":\"vertical\":\"start\"==r||\"end\"==r||\"center\"==r&&\"center\"==o?\"vertical\":\"horizontal\":t})(),_=new C.NodeLayout,c=new C.VStack,h=new C.VStack,u=new C.HStack,p=new C.HStack;_.absolute=!0,c.absolute=!0,h.absolute=!0,u.absolute=!0,p.absolute=!0;const[m,g,d,f]=(()=>\"horizontal\"==s?[this._major_scale,this._minor_scale,this._major_range,this._minor_range]:[this._minor_scale,this._major_scale,this._minor_range,this._major_range])();this._frame=new l.CartesianFrame(m,g,d,f),_.on_resize((t=>this._frame.set_geometry(t)));const w=new j.BorderLayout;this._inner_layout=w,w.absolute=!0,w.center_panel=_,w.top_panel=c,w.bottom_panel=h,w.left_panel=u,w.right_panel=p;const b={left:a,right:a,top:a,bottom:a},v=(()=>{if(null==this.panel){if(M.isString(t))return{left:n,right:n,top:n,bottom:n};{const[e,i]=t;return{left:e,right:n,top:n,bottom:i}}}if(!M.isString(t)){const[e,i]=t;return{left:e,right:0,top:0,bottom:i}}})();let y,k,L,S;if(w.padding=b,null!=this.panel?(y=\"max\",k=void 0,L=void 0,S=void 0):\"auto\"==(\"horizontal\"==s?e:i)?(y=\"fixed\",k=25*this.model.color_mapper.palette.length,L={percent:.3},S={percent:.8}):(y=\"fit\",k=void 0),\"horizontal\"==s){const t=\"auto\"==e?void 0:e,a=\"auto\"==i?25:i;w.set_sizing({width_policy:y,height_policy:\"min\",width:k,min_width:L,max_width:S,halign:r,valign:o,margin:v}),w.center_panel.set_sizing({width_policy:\"auto\"==e?\"fit\":\"fixed\",height_policy:\"fixed\",width:t,height:a})}else{const t=\"auto\"==e?25:e,a=\"auto\"==i?void 0:i;w.set_sizing({width_policy:\"min\",height_policy:y,height:k,min_height:L,max_height:S,halign:r,valign:o,margin:v}),w.center_panel.set_sizing({width_policy:\"fixed\",height_policy:\"auto\"==i?\"fit\":\"fixed\",width:t,height:a})}c.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),h.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),u.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),p.set_sizing({width_policy:\"min\",height_policy:\"fit\"});const{_title_view:T}=this;null!=T&&(\"horizontal\"==s?(T.panel=new z.Panel(\"above\"),T.update_layout(),c.children.push(T.layout)):(T.panel=new z.Panel(\"left\"),T.update_layout(),u.children.push(T.layout)));const{panel:B}=this,A=null!=B&&s==B.orientation?B.side:\"horizontal\"==s?\"below\":\"right\",O=(()=>{switch(A){case\"above\":return c;case\"below\":return h;case\"left\":return u;case\"right\":return p}})(),{_axis_view:R}=this;if(R.panel=new z.Panel(A),R.update_layout(),O.children.push(R.layout),null!=this.panel){const t=new x.Grid([{layout:w,row:0,col:0}]);t.absolute=!0,\"horizontal\"==s?t.set_sizing({width_policy:\"max\",height_policy:\"min\"}):t.set_sizing({width_policy:\"min\",height_policy:\"max\"}),this.layout=t}else this.layout=this._inner_layout;const{visible:F}=this.model;this.layout.sizing.visible=F,this._set_canvas_image()}_render(){var t;const{ctx:e}=this.layer;e.save(),this._paint_bbox(e,this._inner_layout.bbox),this._paint_image(e,this._inner_layout.center_panel.bbox),null===(t=this._title_view)||void 0===t||t.render(),this._axis_view.render(),e.restore()}_paint_bbox(t,e){const{x:i,y:a}=e;let{width:n,height:o}=e;i+n>=this.parent.canvas_view.bbox.width&&(n-=1),a+o>=this.parent.canvas_view.bbox.height&&(o-=1),t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(i,a,n,o)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(i,a,n,o)),t.restore()}_paint_image(t,e){const{x:i,y:a,width:n,height:o}=e;t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this._image,i,a,n,o),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(i,a,n,o)),t.restore()}serializable_state(){const t=super.serializable_state(),{children:e=[]}=t,i=o.__rest(t,[\"children\"]);return null!=this._title_view&&e.push(this._title_view.serializable_state()),e.push(this._axis_view.serializable_state()),Object.assign(Object.assign({},i),{children:e})}}i.ColorBarView=T,T.__name__=\"ColorBarView\";class B extends r.Annotation{constructor(t){super(t)}static init_ColorBar(){this.prototype.default_view=T,this.mixins([[\"major_label_\",y.Text],[\"title_\",y.Text],[\"major_tick_\",y.Line],[\"minor_tick_\",y.Line],[\"border_\",y.Line],[\"bar_\",y.Line],[\"background_\",y.Fill]]),this.define((({Alpha:t,Number:e,String:i,Tuple:a,Dict:n,Or:o,Ref:r,Auto:s,Nullable:l})=>({location:[o(v.Anchor,a(e,e)),\"top_right\"],orientation:[o(v.Orientation,s),\"auto\"],title:[l(i),null],title_standoff:[e,2],width:[o(e,s),\"auto\"],height:[o(e,s),\"auto\"],scale_alpha:[t,1],ticker:[o(r(c.Ticker),s),\"auto\"],formatter:[o(r(u.TickFormatter),s),\"auto\"],major_label_overrides:[n(i),{}],major_label_policy:[r(m.LabelingPolicy),()=>new m.NoOverlap],color_mapper:[r(g.ColorMapper)],label_standoff:[e,5],margin:[e,30],padding:[e,10],major_tick_in:[e,5],major_tick_out:[e,0],minor_tick_in:[e,0],minor_tick_out:[e,0]}))),this.override({background_fill_color:\"#ffffff\",background_fill_alpha:.95,bar_line_color:null,border_line_color:null,major_label_text_font_size:\"11px\",major_tick_line_color:\"#ffffff\",minor_tick_line_color:null,title_text_font_size:\"13px\",title_text_font_style:\"italic\"})}}i.ColorBar=B,B.__name__=\"ColorBar\",B.init_ColorBar()},\n", " function _(t,e,i,s,l){s();const o=t(1),a=t(139),n=t(20),r=t(143),c=o.__importStar(t(48));class h extends a.TextAnnotationView{_get_location(){const t=this.model.offset,e=this.model.standoff/2;let i,s;const{bbox:l}=this.layout;switch(this.panel.side){case\"above\":case\"below\":switch(this.model.vertical_align){case\"top\":s=l.top+e;break;case\"middle\":s=l.vcenter;break;case\"bottom\":s=l.bottom-e}switch(this.model.align){case\"left\":i=l.left+t;break;case\"center\":i=l.hcenter;break;case\"right\":i=l.right-t}break;case\"left\":switch(this.model.vertical_align){case\"top\":i=l.left+e;break;case\"middle\":i=l.hcenter;break;case\"bottom\":i=l.right-e}switch(this.model.align){case\"left\":s=l.bottom-t;break;case\"center\":s=l.vcenter;break;case\"right\":s=l.top+t}break;case\"right\":switch(this.model.vertical_align){case\"top\":i=l.right-e;break;case\"middle\":i=l.hcenter;break;case\"bottom\":i=l.left+e}switch(this.model.align){case\"left\":s=l.top+t;break;case\"center\":s=l.vcenter;break;case\"right\":s=l.bottom-t}}return[i,s]}_render(){const{text:t}=this.model;if(null==t||0==t.length)return;this.model.text_baseline=this.model.vertical_align,this.model.text_align=this.model.align;const[e,i]=this._get_location(),s=this.panel.get_label_angle_heuristic(\"parallel\");(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,t,e,i,s)}_get_size(){const{text:t}=this.model;if(null==t||0==t.length)return{width:0,height:0};{const{ctx:e}=this.layer;this.visuals.text.set_value(e);const{width:i}=this.layer.ctx.measureText(t),{height:s}=r.font_metrics(e.font);return{width:i,height:2+s*this.model.text_line_height+this.model.standoff}}}}i.TitleView=h,h.__name__=\"TitleView\";class _ extends a.TextAnnotation{constructor(t){super(t)}static init_Title(){this.prototype.default_view=h,this.mixins([c.Text,[\"border_\",c.Line],[\"background_\",c.Fill]]),this.define((({Number:t,String:e})=>({text:[e,\"\"],vertical_align:[n.VerticalAlign,\"bottom\"],align:[n.TextAlign,\"left\"],offset:[t,0],standoff:[t,10]}))),this.prototype._props.text_align.options.internal=!0,this.prototype._props.text_baseline.options.internal=!0,this.override({text_font_size:\"13px\",text_font_style:\"bold\",text_line_height:1,background_fill_color:null,border_line_color:null})}}i.Title=_,_.__name__=\"Title\",_.init_Title()},\n", " function _(e,t,s,i,n){i();const l=e(40),a=e(43),o=e(20),r=e(140),d=e(143),c=e(11);class _ extends l.AnnotationView{update_layout(){const{panel:e}=this;this.layout=null!=e?new r.SideLayout(e,(()=>this.get_size()),!0):void 0}initialize(){super.initialize(),\"css\"==this.model.render_mode&&(this.el=a.div(),this.plot_view.canvas_view.add_overlay(this.el))}remove(){null!=this.el&&a.remove(this.el),super.remove()}connect_signals(){super.connect_signals(),\"css\"==this.model.render_mode?this.connect(this.model.change,(()=>this.render())):this.connect(this.model.change,(()=>this.request_render()))}render(){this.model.visible||\"css\"!=this.model.render_mode||a.undisplay(this.el),super.render()}_calculate_text_dimensions(e,t){const{width:s}=e.measureText(t),{height:i}=d.font_metrics(this.visuals.text.font_value());return[s,i]}_calculate_bounding_box_dimensions(e,t){const[s,i]=this._calculate_text_dimensions(e,t);let n,l;switch(e.textAlign){case\"left\":n=0;break;case\"center\":n=-s/2;break;case\"right\":n=-s;break;default:c.unreachable()}switch(e.textBaseline){case\"top\":l=0;break;case\"middle\":l=-.5*i;break;case\"bottom\":l=-1*i;break;case\"alphabetic\":l=-.8*i;break;case\"hanging\":l=-.17*i;break;case\"ideographic\":l=-.83*i;break;default:c.unreachable()}return[n,l,s,i]}_canvas_text(e,t,s,i,n){this.visuals.text.set_value(e);const l=this._calculate_bounding_box_dimensions(e,t);e.save(),e.beginPath(),e.translate(s,i),n&&e.rotate(n),e.rect(l[0],l[1],l[2],l[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(e),e.fillText(t,0,0)),e.restore()}_css_text(e,t,s,i,n){const{el:l}=this;c.assert(null!=l),a.undisplay(l),this.visuals.text.set_value(e);const[o,r]=this._calculate_bounding_box_dimensions(e,t);l.style.position=\"absolute\",l.style.left=`${s+o}px`,l.style.top=`${i+r}px`,l.style.color=e.fillStyle,l.style.font=e.font,l.style.lineHeight=\"normal\",n&&(l.style.transform=`rotate(${n}rad)`),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),l.style.backgroundColor=e.fillStyle),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),l.style.borderStyle=e.lineDash.length<2?\"solid\":\"dashed\",l.style.borderWidth=`${e.lineWidth}px`,l.style.borderColor=e.strokeStyle),l.textContent=t,a.display(l)}}s.TextAnnotationView=_,_.__name__=\"TextAnnotationView\";class u extends l.Annotation{constructor(e){super(e)}static init_TextAnnotation(){this.define((()=>({render_mode:[o.RenderMode,\"canvas\"]})))}}s.TextAnnotation=u,u.__name__=\"TextAnnotation\",u.init_TextAnnotation()},\n", @@ -1044,7 +1040,7 @@ " function _(e,r,d,i,n){i();const s=e(41);class t extends s.RendererView{}d.GuideRendererView=t,t.__name__=\"GuideRendererView\";class _ extends s.Renderer{constructor(e){super(e)}static init_GuideRenderer(){this.override({level:\"guide\"})}}d.GuideRenderer=_,_.__name__=\"GuideRenderer\",_.init_GuideRenderer()},\n", " function _(c,e,n,s,o){s();const r=c(53);class t extends r.Model{constructor(c){super(c)}}n.Ticker=t,t.__name__=\"Ticker\"},\n", " function _(t,o,r,e,c){e();const n=t(53),a=t(167);class m extends n.Model{constructor(t){super(t)}format_graphics(t,o){return this.doFormat(t,o).map((t=>new a.TextBox({text:t})))}compute(t,o){return this.doFormat([t],null!=o?o:{loc:0})[0]}v_compute(t,o){return this.doFormat(t,null!=o?o:{loc:0})}}r.TickFormatter=m,m.__name__=\"TickFormatter\"},\n", - " function _(t,e,s,i,n){i();const h=t(99),o=t(143),r=t(9),a=t(8),c=t(168),_=t(22);s.text_width=(()=>{const t=document.createElement(\"canvas\").getContext(\"2d\");let e=\"\";return(s,i)=>(i!=e&&(e=i,t.font=i),t.measureText(s).width)})();class l{constructor(){this._position={sx:0,sy:0},this.font_size_scale=1}set position(t){this._position=t}get position(){return this._position}infer_text_height(){return\"ascent_descent\"}bbox(){const{p0:t,p1:e,p2:s,p3:i}=this.rect(),n=Math.min(t.x,e.x,s.x,i.x),o=Math.min(t.y,e.y,s.y,i.y),r=Math.max(t.x,e.x,s.x,i.x),a=Math.max(t.y,e.y,s.y,i.y);return new h.BBox({left:n,right:r,top:o,bottom:a})}size(){const{width:t,height:e}=this._size(),{angle:s}=this;if(s){const i=Math.cos(Math.abs(s)),n=Math.sin(Math.abs(s));return{width:Math.abs(t*i+e*n),height:Math.abs(t*n+e*i)}}return{width:t,height:e}}rect(){const t=this._rect(),{angle:e}=this;if(e){const{sx:s,sy:i}=this.position,n=new c.AffineTransform;return n.translate(s,i),n.rotate(e),n.translate(-s,-i),n.apply_rect(t)}return t}paint_rect(t){const{p0:e,p1:s,p2:i,p3:n}=this.rect();t.save(),t.strokeStyle=\"red\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e.x),h(e.y)),t.lineTo(h(s.x),h(s.y)),t.lineTo(h(i.x),h(i.y)),t.lineTo(h(n.x),h(n.y)),t.closePath(),t.stroke(),t.restore()}paint_bbox(t){const{x:e,y:s,width:i,height:n}=this.bbox();t.save(),t.strokeStyle=\"blue\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e),h(s)),t.lineTo(h(e),h(s+n)),t.lineTo(h(e+i),h(s+n)),t.lineTo(h(e+i),h(s)),t.closePath(),t.stroke(),t.restore()}}s.GraphicsBox=l,l.__name__=\"GraphicsBox\";class x extends l{constructor({text:t}){super(),this.align=\"left\",this.text=t}set visuals(t){const e=t.text_color.get_value(),s=t.text_alpha.get_value(),i=t.text_font_style.get_value();let n=t.text_font_size.get_value();const h=t.text_font.get_value(),{font_size_scale:o}=this;if(1!=o){const t=n.match(/^\\s*(\\d+(\\.\\d+)?)px\\s*$/);if(null!=t){const[,e]=t,s=Number(e);isNaN(s)||(n=s*o+\"px\")}}const r=`${i} ${n} ${h}`;this.font=r,this.color=_.color2css(e,s),this.line_height=t.text_line_height.get_value()}infer_text_height(){if(this.text.includes(\"\\n\"))return\"ascent_descent\";return function(t){for(const e of new Set(t))if(!(\"0\"<=e&&e<=\"9\"))switch(e){case\",\":case\".\":case\"+\":case\"-\":case\"−\":case\"e\":continue;default:return!1}return!0}(this.text)?\"cap\":\"ascent_descent\"}_text_line(t){var e;const s=null!==(e=this.text_height_metric)&&void 0!==e?e:this.infer_text_height(),i=(()=>{switch(s){case\"x\":case\"x_descent\":return t.x_height;case\"cap\":case\"cap_descent\":return t.cap_height;case\"ascent\":case\"ascent_descent\":return t.ascent}})(),n=(()=>{switch(s){case\"x\":case\"cap\":case\"ascent\":return 0;case\"x_descent\":case\"cap_descent\":case\"ascent_descent\":return t.descent}})();return{height:i+n,ascent:i,descent:n}}get nlines(){return this.text.split(\"\\n\").length}_size(){var t,e;const{font:i}=this,n=o.font_metrics(i),h=(this.line_height-1)*n.height,a=\"\"==this.text,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,i))),x=this._text_line(n).height*_,u=\"%\"==(null===(t=this.width)||void 0===t?void 0:t.unit)?this.width.value:1,p=\"%\"==(null===(e=this.height)||void 0===e?void 0:e.unit)?this.height.value:1;return{width:r.max(l)*u,height:a?0:(x+h*(_-1))*p,metrics:n}}_computed_position(t,e,s){const{width:i,height:n}=t,{sx:h,sy:o,x_anchor:r=\"left\",y_anchor:c=\"center\"}=this.position;return{x:h-(()=>{if(a.isNumber(r))return r*i;switch(r){case\"left\":return 0;case\"center\":return.5*i;case\"right\":return i}})(),y:o-(()=>{var t;if(a.isNumber(c))return c*n;switch(c){case\"top\":return 0;case\"center\":return.5*n;case\"bottom\":return n;case\"baseline\":if(1!=s)return.5*n;switch(null!==(t=this.text_height_metric)&&void 0!==t?t:this.infer_text_height()){case\"x\":case\"x_descent\":return e.x_height;case\"cap\":case\"cap_descent\":return e.cap_height;case\"ascent\":case\"ascent_descent\":return e.ascent}}})()}}_rect(){const{width:t,height:e,metrics:s}=this._size(),i=this.text.split(\"\\n\").length,{x:n,y:o}=this._computed_position({width:t,height:e},s,i);return new h.BBox({x:n,y:o,width:t,height:e}).rect}paint(t){var e,i;const{font:n}=this,h=o.font_metrics(n),a=(this.line_height-1)*h.height,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,n))),x=this._text_line(h),u=x.height*_,p=\"%\"==(null===(e=this.width)||void 0===e?void 0:e.unit)?this.width.value:1,g=\"%\"==(null===(i=this.height)||void 0===i?void 0:i.unit)?this.height.value:1,f=r.max(l)*p,d=(u+a*(_-1))*g;t.save(),t.fillStyle=this.color,t.font=this.font,t.textAlign=\"left\",t.textBaseline=\"alphabetic\";const{sx:m,sy:b}=this.position,{align:y}=this,{angle:w}=this;w&&(t.translate(m,b),t.rotate(w),t.translate(-m,-b));let{x:v,y:z}=this._computed_position({width:f,height:d},h,_);if(\"justify\"==y)for(let e=0;e<_;e++){let i=v;const h=c[e].split(\" \"),o=h.length,_=h.map((t=>s.text_width(t,n))),l=(f-r.sum(_))/(o-1);for(let e=0;e{switch(y){case\"left\":return 0;case\"center\":return.5*(f-l[e]);case\"right\":return f-l[e]}})();t.fillStyle=this.color,t.fillText(c[e],s,z+x.ascent),z+=x.height+a}t.restore()}}s.TextBox=x,x.__name__=\"TextBox\";class u extends l{constructor(t,e){super(),this.base=t,this.expo=e}get children(){return[this.base,this.expo]}set position(t){this._position=t;const e=this.base.size(),s=this.expo.size(),i=this._shift_scale()*e.height,n=Math.max(e.height,i+s.height);this.base.position={sx:0,x_anchor:\"left\",sy:n,y_anchor:\"bottom\"},this.expo.position={sx:e.width,x_anchor:\"left\",sy:i,y_anchor:\"bottom\"}}get position(){return this._position}set visuals(t){this.expo.font_size_scale=.7,this.base.visuals=t,this.expo.visuals=t}_shift_scale(){if(this.base instanceof x&&1==this.base.nlines){const{x_height:t,cap_height:e}=o.font_metrics(this.base.font);return t/e}return 2/3}infer_text_height(){return this.base.infer_text_height()}_rect(){const t=this.base.bbox(),e=this.expo.bbox(),s=t.union(e),{x:i,y:n}=this._computed_position();return s.translate(i,n).rect}_size(){const t=this.base.size(),e=this.expo.size();return{width:t.width+e.width,height:Math.max(t.height,this._shift_scale()*t.height+e.height)}}paint(t){t.save();const{angle:e}=this;if(e){const{sx:s,sy:i}=this.position;t.translate(s,i),t.rotate(e),t.translate(-s,-i)}const{x:s,y:i}=this._computed_position();t.translate(s,i),this.base.paint(t),this.expo.paint(t),t.restore()}paint_bbox(t){super.paint_bbox(t);const{x:e,y:s}=this._computed_position();t.save(),t.translate(e,s);for(const e of this.children)e.paint_bbox(t);t.restore()}_computed_position(){const{width:t,height:e}=this._size(),{sx:s,sy:i,x_anchor:n=\"left\",y_anchor:h=\"center\"}=this.position;return{x:s-(()=>{if(a.isNumber(n))return n*t;switch(n){case\"left\":return 0;case\"center\":return.5*t;case\"right\":return t}})(),y:i-(()=>{if(a.isNumber(h))return h*e;switch(h){case\"top\":return 0;case\"center\":return.5*e;case\"bottom\":return e;case\"baseline\":return.5*e}})()}}}s.BaseExpo=u,u.__name__=\"BaseExpo\";class p{constructor(t){this.items=t}get length(){return this.items.length}set visuals(t){for(const e of this.items)e.visuals=t;const e={x:0,cap:1,ascent:2,x_descent:3,cap_descent:4,ascent_descent:5},s=r.max_by(this.items.map((t=>t.infer_text_height())),(t=>e[t]));for(const t of this.items)t.text_height_metric=s}set angle(t){for(const e of this.items)e.angle=t}max_size(){let t=0,e=0;for(const s of this.items){const i=s.size();t=Math.max(t,i.width),e=Math.max(e,i.height)}return{width:t,height:e}}}s.GraphicsBoxes=p,p.__name__=\"GraphicsBoxes\"},\n", + " function _(t,e,s,i,n){i();const h=t(99),o=t(143),r=t(9),a=t(8),c=t(168),_=t(22);s.text_width=(()=>{const t=document.createElement(\"canvas\").getContext(\"2d\");let e=\"\";return(s,i)=>(i!=e&&(e=i,t.font=i),t.measureText(s).width)})();class l{constructor(){this._position={sx:0,sy:0},this.font_size_scale=1}set position(t){this._position=t}get position(){return this._position}infer_text_height(){return\"ascent_descent\"}bbox(){const{p0:t,p1:e,p2:s,p3:i}=this.rect(),n=Math.min(t.x,e.x,s.x,i.x),o=Math.min(t.y,e.y,s.y,i.y),r=Math.max(t.x,e.x,s.x,i.x),a=Math.max(t.y,e.y,s.y,i.y);return new h.BBox({left:n,right:r,top:o,bottom:a})}size(){const{width:t,height:e}=this._size(),{angle:s}=this;if(s){const i=Math.cos(Math.abs(s)),n=Math.sin(Math.abs(s));return{width:Math.abs(t*i+e*n),height:Math.abs(t*n+e*i)}}return{width:t,height:e}}rect(){const t=this._rect(),{angle:e}=this;if(e){const{sx:s,sy:i}=this.position,n=new c.AffineTransform;return n.translate(s,i),n.rotate(e),n.translate(-s,-i),n.apply_rect(t)}return t}paint_rect(t){const{p0:e,p1:s,p2:i,p3:n}=this.rect();t.save(),t.strokeStyle=\"red\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e.x),h(e.y)),t.lineTo(h(s.x),h(s.y)),t.lineTo(h(i.x),h(i.y)),t.lineTo(h(n.x),h(n.y)),t.closePath(),t.stroke(),t.restore()}paint_bbox(t){const{x:e,y:s,width:i,height:n}=this.bbox();t.save(),t.strokeStyle=\"blue\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e),h(s)),t.lineTo(h(e),h(s+n)),t.lineTo(h(e+i),h(s+n)),t.lineTo(h(e+i),h(s)),t.closePath(),t.stroke(),t.restore()}}s.GraphicsBox=l,l.__name__=\"GraphicsBox\";class x extends l{constructor({text:t}){super(),this.align=\"left\",this.text=t}set visuals(t){const e=t.text_color.get_value(),s=t.text_alpha.get_value(),i=t.text_font_style.get_value();let n=t.text_font_size.get_value();const h=t.text_font.get_value(),{font_size_scale:o}=this;if(1!=o){const t=n.match(/^\\s*(\\d+(\\.\\d+)?)(\\w+)\\s*$/);if(null!=t){const[,e,,s]=t,i=Number(e);isNaN(i)||(n=`${i*o}${s}`)}}const r=`${i} ${n} ${h}`;this.font=r,this.color=_.color2css(e,s),this.line_height=t.text_line_height.get_value()}infer_text_height(){if(this.text.includes(\"\\n\"))return\"ascent_descent\";return function(t){for(const e of new Set(t))if(!(\"0\"<=e&&e<=\"9\"))switch(e){case\",\":case\".\":case\"+\":case\"-\":case\"−\":case\"e\":continue;default:return!1}return!0}(this.text)?\"cap\":\"ascent_descent\"}_text_line(t){var e;const s=null!==(e=this.text_height_metric)&&void 0!==e?e:this.infer_text_height(),i=(()=>{switch(s){case\"x\":case\"x_descent\":return t.x_height;case\"cap\":case\"cap_descent\":return t.cap_height;case\"ascent\":case\"ascent_descent\":return t.ascent}})(),n=(()=>{switch(s){case\"x\":case\"cap\":case\"ascent\":return 0;case\"x_descent\":case\"cap_descent\":case\"ascent_descent\":return t.descent}})();return{height:i+n,ascent:i,descent:n}}get nlines(){return this.text.split(\"\\n\").length}_size(){var t,e;const{font:i}=this,n=o.font_metrics(i),h=(this.line_height-1)*n.height,a=\"\"==this.text,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,i))),x=this._text_line(n).height*_,u=\"%\"==(null===(t=this.width)||void 0===t?void 0:t.unit)?this.width.value:1,p=\"%\"==(null===(e=this.height)||void 0===e?void 0:e.unit)?this.height.value:1;return{width:r.max(l)*u,height:a?0:(x+h*(_-1))*p,metrics:n}}_computed_position(t,e,s){const{width:i,height:n}=t,{sx:h,sy:o,x_anchor:r=\"left\",y_anchor:c=\"center\"}=this.position;return{x:h-(()=>{if(a.isNumber(r))return r*i;switch(r){case\"left\":return 0;case\"center\":return.5*i;case\"right\":return i}})(),y:o-(()=>{var t;if(a.isNumber(c))return c*n;switch(c){case\"top\":return 0;case\"center\":return.5*n;case\"bottom\":return n;case\"baseline\":if(1!=s)return.5*n;switch(null!==(t=this.text_height_metric)&&void 0!==t?t:this.infer_text_height()){case\"x\":case\"x_descent\":return e.x_height;case\"cap\":case\"cap_descent\":return e.cap_height;case\"ascent\":case\"ascent_descent\":return e.ascent}}})()}}_rect(){const{width:t,height:e,metrics:s}=this._size(),i=this.text.split(\"\\n\").length,{x:n,y:o}=this._computed_position({width:t,height:e},s,i);return new h.BBox({x:n,y:o,width:t,height:e}).rect}paint(t){var e,i;const{font:n}=this,h=o.font_metrics(n),a=(this.line_height-1)*h.height,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,n))),x=this._text_line(h),u=x.height*_,p=\"%\"==(null===(e=this.width)||void 0===e?void 0:e.unit)?this.width.value:1,g=\"%\"==(null===(i=this.height)||void 0===i?void 0:i.unit)?this.height.value:1,f=r.max(l)*p,d=(u+a*(_-1))*g;t.save(),t.fillStyle=this.color,t.font=this.font,t.textAlign=\"left\",t.textBaseline=\"alphabetic\";const{sx:m,sy:b}=this.position,{align:y}=this,{angle:w}=this;w&&(t.translate(m,b),t.rotate(w),t.translate(-m,-b));let{x:v,y:z}=this._computed_position({width:f,height:d},h,_);if(\"justify\"==y)for(let e=0;e<_;e++){let i=v;const h=c[e].split(\" \"),o=h.length,_=h.map((t=>s.text_width(t,n))),l=(f-r.sum(_))/(o-1);for(let e=0;e{switch(y){case\"left\":return 0;case\"center\":return.5*(f-l[e]);case\"right\":return f-l[e]}})();t.fillStyle=this.color,t.fillText(c[e],s,z+x.ascent),z+=x.height+a}t.restore()}}s.TextBox=x,x.__name__=\"TextBox\";class u extends l{constructor(t,e){super(),this.base=t,this.expo=e}get children(){return[this.base,this.expo]}set position(t){this._position=t;const e=this.base.size(),s=this.expo.size(),i=this._shift_scale()*e.height,n=Math.max(e.height,i+s.height);this.base.position={sx:0,x_anchor:\"left\",sy:n,y_anchor:\"bottom\"},this.expo.position={sx:e.width,x_anchor:\"left\",sy:i,y_anchor:\"bottom\"}}get position(){return this._position}set visuals(t){this.expo.font_size_scale=.7,this.base.visuals=t,this.expo.visuals=t}_shift_scale(){if(this.base instanceof x&&1==this.base.nlines){const{x_height:t,cap_height:e}=o.font_metrics(this.base.font);return t/e}return 2/3}infer_text_height(){return this.base.infer_text_height()}_rect(){const t=this.base.bbox(),e=this.expo.bbox(),s=t.union(e),{x:i,y:n}=this._computed_position();return s.translate(i,n).rect}_size(){const t=this.base.size(),e=this.expo.size();return{width:t.width+e.width,height:Math.max(t.height,this._shift_scale()*t.height+e.height)}}paint(t){t.save();const{angle:e}=this;if(e){const{sx:s,sy:i}=this.position;t.translate(s,i),t.rotate(e),t.translate(-s,-i)}const{x:s,y:i}=this._computed_position();t.translate(s,i),this.base.paint(t),this.expo.paint(t),t.restore()}paint_bbox(t){super.paint_bbox(t);const{x:e,y:s}=this._computed_position();t.save(),t.translate(e,s);for(const e of this.children)e.paint_bbox(t);t.restore()}_computed_position(){const{width:t,height:e}=this._size(),{sx:s,sy:i,x_anchor:n=\"left\",y_anchor:h=\"center\"}=this.position;return{x:s-(()=>{if(a.isNumber(n))return n*t;switch(n){case\"left\":return 0;case\"center\":return.5*t;case\"right\":return t}})(),y:i-(()=>{if(a.isNumber(h))return h*e;switch(h){case\"top\":return 0;case\"center\":return.5*e;case\"bottom\":return e;case\"baseline\":return.5*e}})()}}}s.BaseExpo=u,u.__name__=\"BaseExpo\";class p{constructor(t){this.items=t}get length(){return this.items.length}set visuals(t){for(const e of this.items)e.visuals=t;const e={x:0,cap:1,ascent:2,x_descent:3,cap_descent:4,ascent_descent:5},s=r.max_by(this.items.map((t=>t.infer_text_height())),(t=>e[t]));for(const t of this.items)t.text_height_metric=s}set angle(t){for(const e of this.items)e.angle=t}max_size(){let t=0,e=0;for(const s of this.items){const i=s.size();t=Math.max(t,i.width),e=Math.max(e,i.height)}return{width:t,height:e}}}s.GraphicsBoxes=p,p.__name__=\"GraphicsBoxes\"},\n", " function _(t,s,r,n,i){n();const{sin:e,cos:a}=Math;class h{constructor(t=1,s=0,r=0,n=1,i=0,e=0){this.a=t,this.b=s,this.c=r,this.d=n,this.e=i,this.f=e}toString(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return`matrix(${t}, ${s}, ${r}, ${n}, ${i}, ${e})`}clone(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return new h(t,s,r,n,i,e)}get is_identity(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return 1==t&&0==s&&0==r&&1==n&&0==i&&0==e}apply_point(t){const[s,r]=this.apply(t.x,t.y);return{x:s,y:r}}apply_rect(t){return{p0:this.apply_point(t.p0),p1:this.apply_point(t.p1),p2:this.apply_point(t.p2),p3:this.apply_point(t.p3)}}apply(t,s){const{a:r,b:n,c:i,d:e,e:a,f:h}=this;return[r*t+i*s+a,n*t+e*s+h]}iv_apply(t,s){const{a:r,b:n,c:i,d:e,e:a,f:h}=this,p=t.length;for(let o=0;o({min_distance:[e,5]})))}filter(e,n,s){const{min_distance:t}=this;let i=null;for(const n of e)null!=i&&s(i,n)({args:[s(e),{}],code:[n,\"\"]})))}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}get func(){const e=o.use_strict(this.code);return new a.GeneratorFunction(\"indices\",\"bboxes\",\"distance\",...this.names,e)}filter(e,n,s){const t=Object.create(null),i=this.func.call(t,e,n,s,...this.values);let l=i.next();if(l.done&&void 0!==l.value){const{value:n}=l;return n instanceof a.Indices?n:void 0===n?e:r.isIterable(n)?a.Indices.from_indices(e.size,n):a.Indices.all_unset(e.size)}{const n=[];do{n.push(l.value),l=i.next()}while(!l.done);return a.Indices.from_indices(e.size,n)}}}s.CustomLabelingPolicy=m,m.__name__=\"CustomLabelingPolicy\",m.init_CustomLabelingPolicy()},\n", " function _(t,s,e,o,i){o();const a=t(1),r=t(163),l=t(171),_=t(172),n=a.__importStar(t(48)),c=t(20),p=t(167),h=t(8);class m extends r.AxisView{_paint(t,s,e){this._draw_group_separators(t,s,e)}_draw_group_separators(t,s,e){const[o]=this.ranges,[i,a]=this.computed_bounds;if(!o.tops||o.tops.length<2||!this.visuals.separator_line.doit)return;const r=this.dimension,l=(r+1)%2,_=[[],[]];let n=0;for(let t=0;ti&&cnew p.GraphicsBoxes(t.map((t=>h.isString(t)?new p.TextBox({text:t}):t))),_=t=>l(this.model.formatter.doFormat(t,this));if(1==t.levels){const t=_(i.major);r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text])}else if(2==t.levels){const t=_(i.major.map((t=>t[1])));r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),r.push([l(i.tops),a.tops,this.model.group_label_orientation,this.visuals.group_text])}else if(3==t.levels){const t=_(i.major.map((t=>t[2]))),s=i.mids.map((t=>t[1]));r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),r.push([l(s),a.mids,this.model.subgroup_label_orientation,this.visuals.subgroup_text]),r.push([l(i.tops),a.tops,this.model.group_label_orientation,this.visuals.group_text])}return r}get tick_coords(){const t=this.dimension,s=(t+1)%2,[e]=this.ranges,[o,i]=this.computed_bounds,a=this.model.ticker.get_ticks(o,i,e,this.loc),r={major:[[],[]],mids:[[],[]],tops:[[],[]],minor:[[],[]]};return r.major[t]=a.major,r.major[s]=a.major.map((()=>this.loc)),3==e.levels&&(r.mids[t]=a.mids,r.mids[s]=a.mids.map((()=>this.loc))),e.levels>1&&(r.tops[t]=a.tops,r.tops[s]=a.tops.map((()=>this.loc))),r}}e.CategoricalAxisView=m,m.__name__=\"CategoricalAxisView\";class u extends r.Axis{constructor(t){super(t)}static init_CategoricalAxis(){this.prototype.default_view=m,this.mixins([[\"separator_\",n.Line],[\"group_\",n.Text],[\"subgroup_\",n.Text]]),this.define((({Number:t,Or:s})=>({group_label_orientation:[s(c.TickLabelOrientation,t),\"parallel\"],subgroup_label_orientation:[s(c.TickLabelOrientation,t),\"parallel\"]}))),this.override({ticker:()=>new l.CategoricalTicker,formatter:()=>new _.CategoricalTickFormatter,separator_line_color:\"lightgrey\",separator_line_width:2,group_text_font_style:\"bold\",group_text_font_size:\"11px\",group_text_color:\"grey\",subgroup_text_font_style:\"bold\",subgroup_text_font_size:\"11px\"})}}e.CategoricalAxis=u,u.__name__=\"CategoricalAxis\",u.init_CategoricalAxis()},\n", @@ -1091,7 +1087,7 @@ " function _(t,r,e,n,o){n();const i=t(204),a=t(15),c=t(24),_=t(22),l=t(27);function s(t){return _.encode_rgba(_.color2rgba(t))}function p(t){const r=new Uint32Array(t.length);for(let e=0,n=t.length;e({palette:[r(t)],nan_color:[t,\"gray\"]})))}v_compute(t){const r=new Array(t.length);return this._v_compute(t,r,this.palette,this._colors((t=>t))),r}get rgba_mapper(){const t=this,r=p(this.palette),e=this._colors(s);return{v_compute(n){const o=new c.ColorArray(n.length);return t._v_compute(n,o,r,e),new Uint8ClampedArray(l.to_big_endian(o).buffer)}}}_colors(t){return{nan_color:t(this.nan_color)}}}e.ColorMapper=u,u.__name__=\"ColorMapper\",u.init_ColorMapper()},\n", " function _(r,e,n,s,o){s();const p=r(149);class t extends p.Transform{constructor(r){super(r)}compute(r){throw new Error(\"mapping single values is not supported\")}}n.Mapper=t,t.__name__=\"Mapper\"},\n", " function _(t,r,a,e,c){e(),c(\"BasicTickFormatter\",t(176).BasicTickFormatter),c(\"CategoricalTickFormatter\",t(172).CategoricalTickFormatter),c(\"DatetimeTickFormatter\",t(180).DatetimeTickFormatter),c(\"FuncTickFormatter\",t(206).FuncTickFormatter),c(\"LogTickFormatter\",t(193).LogTickFormatter),c(\"MercatorTickFormatter\",t(196).MercatorTickFormatter),c(\"NumeralTickFormatter\",t(207).NumeralTickFormatter),c(\"PrintfTickFormatter\",t(208).PrintfTickFormatter),c(\"TickFormatter\",t(166).TickFormatter)},\n", - " function _(t,n,e,s,i){s();const r=t(166),c=t(13),a=t(34);class u extends r.TickFormatter{constructor(t){super(t)}static init_FuncTickFormatter(){this.define((({Unknown:t,String:n,Dict:e})=>({args:[e(t),{}],code:[n,\"\"]})))}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}_make_func(){const t=a.use_strict(this.code);return new Function(\"tick\",\"index\",\"ticks\",...this.names,t)}doFormat(t,n){const e=this._make_func().bind({});return t.map(((t,n,s)=>e(t,n,s,...this.values)))}}e.FuncTickFormatter=u,u.__name__=\"FuncTickFormatter\",u.init_FuncTickFormatter()},\n", + " function _(t,n,e,s,i){s();const r=t(166),c=t(13),a=t(34);class u extends r.TickFormatter{constructor(t){super(t)}static init_FuncTickFormatter(){this.define((({Unknown:t,String:n,Dict:e})=>({args:[e(t),{}],code:[n,\"\"]})))}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}_make_func(){const t=a.use_strict(this.code);return new Function(\"tick\",\"index\",\"ticks\",...this.names,t)}doFormat(t,n){const e=this._make_func().bind({});return t.map(((t,n,s)=>`${e(t,n,s,...this.values)}`))}}e.FuncTickFormatter=u,u.__name__=\"FuncTickFormatter\",u.init_FuncTickFormatter()},\n", " function _(r,t,n,e,a){e();const o=r(1).__importStar(r(183)),i=r(166),u=r(20);class c extends i.TickFormatter{constructor(r){super(r)}static init_NumeralTickFormatter(){this.define((({String:r})=>({format:[r,\"0,0\"],language:[r,\"en\"],rounding:[u.RoundingFunction,\"round\"]})))}get _rounding_fn(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}doFormat(r,t){const{format:n,language:e,_rounding_fn:a}=this;return r.map((r=>o.format(r,n,e,a)))}}n.NumeralTickFormatter=c,c.__name__=\"NumeralTickFormatter\",c.init_NumeralTickFormatter()},\n", " function _(t,r,i,n,o){n();const a=t(166),e=t(182);class c extends a.TickFormatter{constructor(t){super(t)}static init_PrintfTickFormatter(){this.define((({String:t})=>({format:[t,\"%s\"]})))}doFormat(t,r){return t.map((t=>e.sprintf(this.format,t)))}}i.PrintfTickFormatter=c,c.__name__=\"PrintfTickFormatter\",c.init_PrintfTickFormatter()},\n", " function _(r,o,a,p,e){p(),e(\"CategoricalColorMapper\",r(210).CategoricalColorMapper),e(\"CategoricalMarkerMapper\",r(212).CategoricalMarkerMapper),e(\"CategoricalPatternMapper\",r(213).CategoricalPatternMapper),e(\"ContinuousColorMapper\",r(202).ContinuousColorMapper),e(\"ColorMapper\",r(203).ColorMapper),e(\"LinearColorMapper\",r(214).LinearColorMapper),e(\"LogColorMapper\",r(215).LogColorMapper),e(\"ScanningColorMapper\",r(201).ScanningColorMapper),e(\"EqHistColorMapper\",r(216).EqHistColorMapper)},\n", @@ -1108,7 +1104,7 @@ " function _(a,n,e,g,R){g(),R(\"DataRange\",a(160).DataRange),R(\"DataRange1d\",a(159).DataRange1d),R(\"FactorRange\",a(104).FactorRange),R(\"Range\",a(105).Range),R(\"Range1d\",a(156).Range1d)},\n", " function _(a,o,i,t,e){t();var n=a(141);e(\"Sizeable\",n.Sizeable),e(\"SizingPolicy\",n.SizingPolicy);var c=a(142);e(\"Layoutable\",c.Layoutable),e(\"LayoutItem\",c.LayoutItem);var r=a(222);e(\"HStack\",r.HStack),e(\"VStack\",r.VStack);var l=a(223);e(\"Grid\",l.Grid),e(\"Row\",l.Row),e(\"Column\",l.Column);var S=a(224);e(\"ContentBox\",S.ContentBox),e(\"VariadicBox\",S.VariadicBox)},\n", " function _(t,e,h,i,r){i();const n=t(142),o=t(99);class s extends n.Layoutable{constructor(){super(...arguments),this.children=[]}*[Symbol.iterator](){yield*this.children}}h.Stack=s,s.__name__=\"Stack\";class c extends s{_measure(t){let e=0,h=0;for(const t of this.children){const i=t.measure({width:0,height:0});e+=i.width,h=Math.max(h,i.height)}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t.top:0;let i=this.absolute?t.left:0;const{height:r}=t;for(const t of this.children){const{width:e}=t.measure({width:0,height:0});t.set_geometry(new o.BBox({left:i,width:e,top:h,height:r})),i+=e}}}h.HStack=c,c.__name__=\"HStack\";class a extends s{_measure(t){let e=0,h=0;for(const t of this.children){const i=t.measure({width:0,height:0});e=Math.max(e,i.width),h+=i.height}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t.left:0;let i=this.absolute?t.top:0;const{width:r}=t;for(const t of this.children){const{height:e}=t.measure({width:0,height:0});t.set_geometry(new o.BBox({top:i,height:e,left:h,width:r})),i+=e}}}h.VStack=a,a.__name__=\"VStack\";class l extends n.Layoutable{constructor(){super(...arguments),this.children=[]}*[Symbol.iterator](){yield*this.children}_measure(t){const{width_policy:e,height_policy:h}=this.sizing,{min:i,max:r}=Math;let n=0,o=0;for(const e of this.children){const{width:h,height:i}=e.measure(t);n=r(n,h),o=r(o,i)}return{width:(()=>{const{width:h}=this.sizing;if(t.width==1/0)return\"fixed\"==e&&null!=h?h:n;switch(e){case\"fixed\":return null!=h?h:n;case\"min\":return n;case\"fit\":return null!=h?i(t.width,h):t.width;case\"max\":return null!=h?r(t.width,h):t.width}})(),height:(()=>{const{height:e}=this.sizing;if(t.height==1/0)return\"fixed\"==h&&null!=e?e:o;switch(h){case\"fixed\":return null!=e?e:o;case\"min\":return o;case\"fit\":return null!=e?i(t.height,e):t.height;case\"max\":return null!=e?r(t.height,e):t.height}})()}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t:t.relative(),{left:i,right:r,top:n,bottom:s}=h,c=Math.round(h.vcenter),a=Math.round(h.hcenter);for(const e of this.children){const{margin:h,halign:l,valign:d}=e.sizing,{width:u,height:g,inner:_}=e.measure(t),w=(()=>{switch(`${d}_${l}`){case\"start_start\":return new o.BBox({left:i+h.left,top:n+h.top,width:u,height:g});case\"start_center\":return new o.BBox({hcenter:a,top:n+h.top,width:u,height:g});case\"start_end\":return new o.BBox({right:r-h.right,top:n+h.top,width:u,height:g});case\"center_start\":return new o.BBox({left:i+h.left,vcenter:c,width:u,height:g});case\"center_center\":return new o.BBox({hcenter:a,vcenter:c,width:u,height:g});case\"center_end\":return new o.BBox({right:r-h.right,vcenter:c,width:u,height:g});case\"end_start\":return new o.BBox({left:i+h.left,bottom:s-h.bottom,width:u,height:g});case\"end_center\":return new o.BBox({hcenter:a,bottom:s-h.bottom,width:u,height:g});case\"end_end\":return new o.BBox({right:r-h.right,bottom:s-h.bottom,width:u,height:g})}})(),m=null==_?w:new o.BBox({left:w.left+_.left,top:w.top+_.top,right:w.right-_.right,bottom:w.bottom-_.bottom});e.set_geometry(w,m)}}}h.NodeLayout=l,l.__name__=\"NodeLayout\"},\n", - " function _(t,i,s,e,o){e();const n=t(141),l=t(142),r=t(8),h=t(99),c=t(9),{max:a,round:g}=Math;class p{constructor(t){this.def=t,this._map=new Map}get(t){let i=this._map.get(t);return void 0===i&&(i=this.def(),this._map.set(t,i)),i}apply(t,i){const s=this.get(t);this._map.set(t,i(s))}}p.__name__=\"DefaultMap\";class f{constructor(){this._items=[],this._nrows=0,this._ncols=0}get nrows(){return this._nrows}get ncols(){return this._ncols}add(t,i){const{r1:s,c1:e}=t;this._nrows=a(this._nrows,s+1),this._ncols=a(this._ncols,e+1),this._items.push({span:t,data:i})}at(t,i){return this._items.filter((({span:s})=>s.r0<=t&&t<=s.r1&&s.c0<=i&&i<=s.c1)).map((({data:t})=>t))}row(t){return this._items.filter((({span:i})=>i.r0<=t&&t<=i.r1)).map((({data:t})=>t))}col(t){return this._items.filter((({span:i})=>i.c0<=t&&t<=i.c1)).map((({data:t})=>t))}foreach(t){for(const{span:i,data:s}of this._items)t(i,s)}map(t){const i=new f;for(const{span:s,data:e}of this._items)i.add(s,t(s,e));return i}}f.__name__=\"Container\";class _ extends l.Layoutable{constructor(t=[]){super(),this.items=t,this.rows=\"auto\",this.cols=\"auto\",this.spacing=0}*[Symbol.iterator](){for(const{layout:t}of this.items)yield t}is_width_expanding(){if(super.is_width_expanding())return!0;if(\"fixed\"==this.sizing.width_policy)return!1;const{cols:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}is_height_expanding(){if(super.is_height_expanding())return!0;if(\"fixed\"==this.sizing.height_policy)return!1;const{rows:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}_init(){var t,i,s,e;super._init();const o=new f;for(const{layout:t,row:i,col:s,row_span:e,col_span:n}of this.items)if(t.sizing.visible){const l=i,r=s,h=i+(null!=e?e:1)-1,c=s+(null!=n?n:1)-1;o.add({r0:l,c0:r,r1:h,c1:c},t)}const{nrows:n,ncols:l}=o,h=new Array(n);for(let s=0;s{var t;const i=r.isPlainObject(this.rows)?null!==(t=this.rows[s])&&void 0!==t?t:this.rows[\"*\"]:this.rows;return null==i?{policy:\"auto\"}:r.isNumber(i)?{policy:\"fixed\",height:i}:r.isString(i)?{policy:i}:i})(),n=null!==(t=e.align)&&void 0!==t?t:\"auto\";if(\"fixed\"==e.policy)h[s]={policy:\"fixed\",height:e.height,align:n};else if(\"min\"==e.policy)h[s]={policy:\"min\",align:n};else if(\"fit\"==e.policy||\"max\"==e.policy)h[s]={policy:e.policy,flex:null!==(i=e.flex)&&void 0!==i?i:1,align:n};else{if(\"auto\"!=e.policy)throw new Error(\"unrechable\");c.some(o.row(s),(t=>t.is_height_expanding()))?h[s]={policy:\"max\",flex:1,align:n}:h[s]={policy:\"min\",align:n}}}const a=new Array(l);for(let t=0;t{var i;const s=r.isPlainObject(this.cols)?null!==(i=this.cols[t])&&void 0!==i?i:this.cols[\"*\"]:this.cols;return null==s?{policy:\"auto\"}:r.isNumber(s)?{policy:\"fixed\",width:s}:r.isString(s)?{policy:s}:s})(),n=null!==(s=i.align)&&void 0!==s?s:\"auto\";if(\"fixed\"==i.policy)a[t]={policy:\"fixed\",width:i.width,align:n};else if(\"min\"==i.policy)a[t]={policy:\"min\",align:n};else if(\"fit\"==i.policy||\"max\"==i.policy)a[t]={policy:i.policy,flex:null!==(e=i.flex)&&void 0!==e?e:1,align:n};else{if(\"auto\"!=i.policy)throw new Error(\"unrechable\");c.some(o.col(t),(t=>t.is_width_expanding()))?a[t]={policy:\"max\",flex:1,align:n}:a[t]={policy:\"min\",align:n}}}const[g,p]=r.isNumber(this.spacing)?[this.spacing,this.spacing]:this.spacing;this._state={items:o,nrows:n,ncols:l,rows:h,cols:a,rspacing:g,cspacing:p}}_measure_totals(t,i){const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state;return{height:c.sum(t)+(s-1)*o,width:c.sum(i)+(e-1)*n}}_measure_cells(t){const{items:i,nrows:s,ncols:e,rows:o,cols:l,rspacing:r,cspacing:h}=this._state,c=new Array(s);for(let t=0;t{const{r0:e,c0:f,r1:d,c1:u}=i,w=(d-e)*r,m=(u-f)*h;let y=0;for(let i=e;i<=d;i++)y+=t(i,f).height;y+=w;let x=0;for(let i=f;i<=u;i++)x+=t(e,i).width;x+=m;const b=s.measure({width:x,height:y});_.add(i,{layout:s,size_hint:b});const z=new n.Sizeable(b).grow_by(s.sizing.margin);z.height-=w,z.width-=m;const v=[];for(let t=e;t<=d;t++){const i=o[t];\"fixed\"==i.policy?z.height-=i.height:v.push(t)}if(z.height>0){const t=g(z.height/v.length);for(const i of v)c[i]=a(c[i],t)}const j=[];for(let t=f;t<=u;t++){const i=l[t];\"fixed\"==i.policy?z.width-=i.width:j.push(t)}if(z.width>0){const t=g(z.width/j.length);for(const i of j)p[i]=a(p[i],t)}}));return{size:this._measure_totals(c,p),row_heights:c,col_widths:p,size_hints:_}}_measure_grid(t){const{nrows:i,ncols:s,rows:e,cols:o,rspacing:n,cspacing:l}=this._state,r=s=>{let o;o=\"fixed\"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:t.height!=1/0&&this.is_height_expanding()?t.height:s.size.height;let l=0;for(let t=0;t0)for(let t=0;ti?i:e,t--}}}},h=i=>{let e;e=\"fixed\"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:t.width!=1/0&&this.is_width_expanding()?t.width:i.size.width;let n=0;for(let t=0;t0)for(let t=0;ts?s:o,t--}}}},c=this._measure_cells(((t,i)=>{const s=e[t],n=o[i];return{width:\"fixed\"==n.policy?n.width:1/0,height:\"fixed\"==s.policy?s.height:1/0}}));r(c),h(c);const p=this._measure_cells(((t,i)=>({width:c.col_widths[i],height:c.row_heights[t]})));r(p),h(p);const{row_heights:f,col_widths:_}=p;return{size:this._measure_totals(f,_),row_heights:f,col_widths:_}}_measure(t){const{size:i}=this._measure_grid(t);return i}_set_geometry(t,i){super._set_geometry(t,i);const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state,{row_heights:l,col_widths:r}=this._measure_grid(t),{size_hints:c}=this._measure_cells(((t,i)=>({width:r[i],height:l[t]}))),f=this._state.rows.map(((t,i)=>Object.assign(Object.assign({},t),{top:0,height:l[i],get bottom(){return this.top+this.height}}))),_=this._state.cols.map(((t,i)=>Object.assign(Object.assign({},t),{left:0,width:r[i],get right(){return this.left+this.width}}))),d=c.map(((t,i)=>Object.assign(Object.assign({},i),{outer:new h.BBox,inner:new h.BBox})));for(let i=0,e=this.absolute?t.top:0;i{const{layout:r,size_hint:c}=l,{sizing:a}=r,{width:p,height:d}=c,u=function(t,i){let s=(i-t)*n;for(let e=t;e<=i;e++)s+=_[e].width;return s}(i,e),w=function(t,i){let s=(i-t)*o;for(let e=t;e<=i;e++)s+=f[e].height;return s}(t,s),m=i==e&&\"auto\"!=_[i].align?_[i].align:a.halign,y=t==s&&\"auto\"!=f[t].align?f[t].align:a.valign;let x=_[i].left;\"start\"==m?x+=a.margin.left:\"center\"==m?x+=g((u-p)/2):\"end\"==m&&(x+=u-a.margin.right-p);let b=f[t].top;\"start\"==y?b+=a.margin.top:\"center\"==y?b+=g((w-d)/2):\"end\"==y&&(b+=w-a.margin.bottom-d),l.outer=new h.BBox({left:x,top:b,width:p,height:d})}));const u=f.map((()=>({start:new p((()=>0)),end:new p((()=>0))}))),w=_.map((()=>({start:new p((()=>0)),end:new p((()=>0))})));d.foreach((({r0:t,c0:i,r1:s,c1:e},{size_hint:o,outer:n})=>{const{inner:l}=o;null!=l&&(u[t].start.apply(n.top,(t=>a(t,l.top))),u[s].end.apply(f[s].bottom-n.bottom,(t=>a(t,l.bottom))),w[i].start.apply(n.left,(t=>a(t,l.left))),w[e].end.apply(_[e].right-n.right,(t=>a(t,l.right))))})),d.foreach((({r0:t,c0:i,r1:s,c1:e},o)=>{const{size_hint:n,outer:l}=o,r=t=>{const i=this.absolute?l:l.relative(),s=i.left+t.left,e=i.top+t.top,o=i.right-t.right,n=i.bottom-t.bottom;return new h.BBox({left:s,top:e,right:o,bottom:n})};if(null!=n.inner){let h=r(n.inner);if(!1!==n.align){const o=u[t].start.get(l.top),n=u[s].end.get(f[s].bottom-l.bottom),c=w[i].start.get(l.left),a=w[e].end.get(_[e].right-l.right);try{h=r({top:o,bottom:n,left:c,right:a})}catch(t){}}o.inner=h}else o.inner=l})),d.foreach(((t,{layout:i,outer:s,inner:e})=>{i.set_geometry(s,e)}))}}s.Grid=_,_.__name__=\"Grid\";class d extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:0,col:i}))),this.rows=\"fit\"}}s.Row=d,d.__name__=\"Row\";class u extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:i,col:0}))),this.cols=\"fit\"}}s.Column=u,u.__name__=\"Column\"},\n", + " function _(t,i,s,e,o){e();const n=t(141),l=t(142),r=t(8),h=t(99),c=t(9),{max:a,round:g}=Math;class p{constructor(t){this.def=t,this._map=new Map}get(t){let i=this._map.get(t);return void 0===i&&(i=this.def(),this._map.set(t,i)),i}apply(t,i){const s=this.get(t);this._map.set(t,i(s))}}p.__name__=\"DefaultMap\";class f{constructor(){this._items=[],this._nrows=0,this._ncols=0}get nrows(){return this._nrows}get ncols(){return this._ncols}add(t,i){const{r1:s,c1:e}=t;this._nrows=a(this._nrows,s+1),this._ncols=a(this._ncols,e+1),this._items.push({span:t,data:i})}at(t,i){return this._items.filter((({span:s})=>s.r0<=t&&t<=s.r1&&s.c0<=i&&i<=s.c1)).map((({data:t})=>t))}row(t){return this._items.filter((({span:i})=>i.r0<=t&&t<=i.r1)).map((({data:t})=>t))}col(t){return this._items.filter((({span:i})=>i.c0<=t&&t<=i.c1)).map((({data:t})=>t))}foreach(t){for(const{span:i,data:s}of this._items)t(i,s)}map(t){const i=new f;for(const{span:s,data:e}of this._items)i.add(s,t(s,e));return i}}f.__name__=\"Container\";class _ extends l.Layoutable{constructor(t=[]){super(),this.items=t,this.rows=\"auto\",this.cols=\"auto\",this.spacing=0}*[Symbol.iterator](){for(const{layout:t}of this.items)yield t}is_width_expanding(){if(super.is_width_expanding())return!0;if(\"fixed\"==this.sizing.width_policy)return!1;const{cols:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}is_height_expanding(){if(super.is_height_expanding())return!0;if(\"fixed\"==this.sizing.height_policy)return!1;const{rows:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}_init(){var t,i,s,e;super._init();const o=new f;for(const{layout:t,row:i,col:s,row_span:e,col_span:n}of this.items)if(t.sizing.visible){const l=i,r=s,h=i+(null!=e?e:1)-1,c=s+(null!=n?n:1)-1;o.add({r0:l,c0:r,r1:h,c1:c},t)}const{nrows:n,ncols:l}=o,h=new Array(n);for(let s=0;s{var t;const i=r.isPlainObject(this.rows)?null!==(t=this.rows[s])&&void 0!==t?t:this.rows[\"*\"]:this.rows;return null==i?{policy:\"auto\"}:r.isNumber(i)?{policy:\"fixed\",height:i}:r.isString(i)?{policy:i}:i})(),n=null!==(t=e.align)&&void 0!==t?t:\"auto\";if(\"fixed\"==e.policy)h[s]={policy:\"fixed\",height:e.height,align:n};else if(\"min\"==e.policy)h[s]={policy:\"min\",align:n};else if(\"fit\"==e.policy||\"max\"==e.policy)h[s]={policy:e.policy,flex:null!==(i=e.flex)&&void 0!==i?i:1,align:n};else{if(\"auto\"!=e.policy)throw new Error(\"unrechable\");c.some(o.row(s),(t=>t.is_height_expanding()))?h[s]={policy:\"max\",flex:1,align:n}:h[s]={policy:\"min\",align:n}}}const a=new Array(l);for(let t=0;t{var i;const s=r.isPlainObject(this.cols)?null!==(i=this.cols[t])&&void 0!==i?i:this.cols[\"*\"]:this.cols;return null==s?{policy:\"auto\"}:r.isNumber(s)?{policy:\"fixed\",width:s}:r.isString(s)?{policy:s}:s})(),n=null!==(s=i.align)&&void 0!==s?s:\"auto\";if(\"fixed\"==i.policy)a[t]={policy:\"fixed\",width:i.width,align:n};else if(\"min\"==i.policy)a[t]={policy:\"min\",align:n};else if(\"fit\"==i.policy||\"max\"==i.policy)a[t]={policy:i.policy,flex:null!==(e=i.flex)&&void 0!==e?e:1,align:n};else{if(\"auto\"!=i.policy)throw new Error(\"unrechable\");c.some(o.col(t),(t=>t.is_width_expanding()))?a[t]={policy:\"max\",flex:1,align:n}:a[t]={policy:\"min\",align:n}}}const[g,p]=r.isNumber(this.spacing)?[this.spacing,this.spacing]:this.spacing;this._state={items:o,nrows:n,ncols:l,rows:h,cols:a,rspacing:g,cspacing:p}}_measure_totals(t,i){const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state;return{height:c.sum(t)+(s-1)*o,width:c.sum(i)+(e-1)*n}}_measure_cells(t){const{items:i,nrows:s,ncols:e,rows:o,cols:l,rspacing:r,cspacing:h}=this._state,c=new Array(s);for(let t=0;t{const{r0:e,c0:f,r1:d,c1:u}=i,w=(d-e)*r,m=(u-f)*h;let y=0;for(let i=e;i<=d;i++)y+=t(i,f).height;y+=w;let x=0;for(let i=f;i<=u;i++)x+=t(e,i).width;x+=m;const b=s.measure({width:x,height:y});_.add(i,{layout:s,size_hint:b});const z=new n.Sizeable(b).grow_by(s.sizing.margin);z.height-=w,z.width-=m;const v=[];for(let t=e;t<=d;t++){const i=o[t];\"fixed\"==i.policy?z.height-=i.height:v.push(t)}if(z.height>0){const t=g(z.height/v.length);for(const i of v)c[i]=a(c[i],t)}const j=[];for(let t=f;t<=u;t++){const i=l[t];\"fixed\"==i.policy?z.width-=i.width:j.push(t)}if(z.width>0){const t=g(z.width/j.length);for(const i of j)p[i]=a(p[i],t)}}));return{size:this._measure_totals(c,p),row_heights:c,col_widths:p,size_hints:_}}_measure_grid(t){const{nrows:i,ncols:s,rows:e,cols:o,rspacing:n,cspacing:l}=this._state,r=s=>{let o;o=\"fixed\"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:t.height!=1/0&&this.is_height_expanding()?Math.max(t.height,s.size.height):s.size.height;let l=0;for(let t=0;t0)for(let t=0;ti?i:e,t--}}}},h=i=>{let e;e=\"fixed\"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:t.width!=1/0&&this.is_width_expanding()?t.width:i.size.width;let n=0;for(let t=0;t0)for(let t=0;ts?s:o,t--}}}},c=this._measure_cells(((t,i)=>{const s=e[t],n=o[i];return{width:\"fixed\"==n.policy?n.width:1/0,height:\"fixed\"==s.policy?s.height:1/0}}));r(c),h(c);const p=this._measure_cells(((t,i)=>({width:c.col_widths[i],height:c.row_heights[t]})));r(p),h(p);const{row_heights:f,col_widths:_}=p;return{size:this._measure_totals(f,_),row_heights:f,col_widths:_}}_measure(t){const{size:i}=this._measure_grid(t);return i}_set_geometry(t,i){super._set_geometry(t,i);const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state,{row_heights:l,col_widths:r}=this._measure_grid(t),{size_hints:c}=this._measure_cells(((t,i)=>({width:r[i],height:l[t]}))),f=this._state.rows.map(((t,i)=>Object.assign(Object.assign({},t),{top:0,height:l[i],get bottom(){return this.top+this.height}}))),_=this._state.cols.map(((t,i)=>Object.assign(Object.assign({},t),{left:0,width:r[i],get right(){return this.left+this.width}}))),d=c.map(((t,i)=>Object.assign(Object.assign({},i),{outer:new h.BBox,inner:new h.BBox})));for(let i=0,e=this.absolute?t.top:0;i{const{layout:r,size_hint:c}=l,{sizing:a}=r,{width:p,height:d}=c,u=function(t,i){let s=(i-t)*n;for(let e=t;e<=i;e++)s+=_[e].width;return s}(i,e),w=function(t,i){let s=(i-t)*o;for(let e=t;e<=i;e++)s+=f[e].height;return s}(t,s),m=i==e&&\"auto\"!=_[i].align?_[i].align:a.halign,y=t==s&&\"auto\"!=f[t].align?f[t].align:a.valign;let x=_[i].left;\"start\"==m?x+=a.margin.left:\"center\"==m?x+=g((u-p)/2):\"end\"==m&&(x+=u-a.margin.right-p);let b=f[t].top;\"start\"==y?b+=a.margin.top:\"center\"==y?b+=g((w-d)/2):\"end\"==y&&(b+=w-a.margin.bottom-d),l.outer=new h.BBox({left:x,top:b,width:p,height:d})}));const u=f.map((()=>({start:new p((()=>0)),end:new p((()=>0))}))),w=_.map((()=>({start:new p((()=>0)),end:new p((()=>0))})));d.foreach((({r0:t,c0:i,r1:s,c1:e},{size_hint:o,outer:n})=>{const{inner:l}=o;null!=l&&(u[t].start.apply(n.top,(t=>a(t,l.top))),u[s].end.apply(f[s].bottom-n.bottom,(t=>a(t,l.bottom))),w[i].start.apply(n.left,(t=>a(t,l.left))),w[e].end.apply(_[e].right-n.right,(t=>a(t,l.right))))})),d.foreach((({r0:t,c0:i,r1:s,c1:e},o)=>{const{size_hint:n,outer:l}=o,r=t=>{const i=this.absolute?l:l.relative(),s=i.left+t.left,e=i.top+t.top,o=i.right-t.right,n=i.bottom-t.bottom;return new h.BBox({left:s,top:e,right:o,bottom:n})};if(null!=n.inner){let h=r(n.inner);if(!1!==n.align){const o=u[t].start.get(l.top),n=u[s].end.get(f[s].bottom-l.bottom),c=w[i].start.get(l.left),a=w[e].end.get(_[e].right-l.right);try{h=r({top:o,bottom:n,left:c,right:a})}catch(t){}}o.inner=h}else o.inner=l})),d.foreach(((t,{layout:i,outer:s,inner:e})=>{i.set_geometry(s,e)}))}}s.Grid=_,_.__name__=\"Grid\";class d extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:0,col:i}))),this.rows=\"fit\"}}s.Row=d,d.__name__=\"Row\";class u extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:i,col:0}))),this.cols=\"fit\"}}s.Column=u,u.__name__=\"Column\"},\n", " function _(e,t,s,n,i){n();const a=e(142),c=e(141),o=e(43);class r extends a.ContentLayoutable{constructor(e){super(),this.content_size=o.unsized(e,(()=>new c.Sizeable(o.size(e))))}_content_size(){return this.content_size}}s.ContentBox=r,r.__name__=\"ContentBox\";class _ extends a.Layoutable{constructor(e){super(),this.el=e}_measure(e){const t=new c.Sizeable(e).bounded_to(this.sizing.size);return o.sized(this.el,t,(()=>{const e=new c.Sizeable(o.content_size(this.el)),{border:t,padding:s}=o.extents(this.el);return e.grow_by(t).grow_by(s).map(Math.ceil)}))}}s.VariadicBox=_,_.__name__=\"VariadicBox\";class h extends _{constructor(e){super(e),this._cache=new Map}_measure(e){const{width:t,height:s}=e,n=`${t},${s}`;let i=this._cache.get(n);return null==i&&(i=super._measure(e),this._cache.set(n,i)),i}invalidate_cache(){this._cache.clear()}}s.CachedVariadicBox=h,h.__name__=\"CachedVariadicBox\"},\n", " function _(t,e,i,h,o){h();const s=t(141),r=t(142),n=t(99);class g extends r.Layoutable{constructor(){super(...arguments),this.min_border={left:0,top:0,right:0,bottom:0},this.padding={left:0,top:0,right:0,bottom:0}}*[Symbol.iterator](){yield this.top_panel,yield this.bottom_panel,yield this.left_panel,yield this.right_panel,yield this.center_panel}_measure(t){t=new s.Sizeable({width:\"fixed\"==this.sizing.width_policy||t.width==1/0?this.sizing.width:t.width,height:\"fixed\"==this.sizing.height_policy||t.height==1/0?this.sizing.height:t.height});const e=this.left_panel.measure({width:0,height:t.height}),i=Math.max(e.width,this.min_border.left)+this.padding.left,h=this.right_panel.measure({width:0,height:t.height}),o=Math.max(h.width,this.min_border.right)+this.padding.right,r=this.top_panel.measure({width:t.width,height:0}),n=Math.max(r.height,this.min_border.top)+this.padding.top,g=this.bottom_panel.measure({width:t.width,height:0}),a=Math.max(g.height,this.min_border.bottom)+this.padding.bottom,d=new s.Sizeable(t).shrink_by({left:i,right:o,top:n,bottom:a}),l=this.center_panel.measure(d);return{width:i+l.width+o,height:n+l.height+a,inner:{left:i,right:o,top:n,bottom:a},align:(()=>{const{width_policy:t,height_policy:e}=this.center_panel.sizing;return\"fixed\"!=t&&\"fixed\"!=e})()}}_set_geometry(t,e){super._set_geometry(t,e),this.center_panel.set_geometry(e);const i=this.left_panel.measure({width:0,height:t.height}),h=this.right_panel.measure({width:0,height:t.height}),o=this.top_panel.measure({width:t.width,height:0}),s=this.bottom_panel.measure({width:t.width,height:0}),{left:r,top:g,right:a,bottom:d}=e;this.top_panel.set_geometry(new n.BBox({left:r,right:a,bottom:g,height:o.height})),this.bottom_panel.set_geometry(new n.BBox({left:r,right:a,top:d,height:s.height})),this.left_panel.set_geometry(new n.BBox({top:g,bottom:d,right:r,width:i.width})),this.right_panel.set_geometry(new n.BBox({top:g,bottom:d,left:a,width:h.width}))}}i.BorderLayout=g,g.__name__=\"BorderLayout\"},\n", " function _(t,e,i,s,n){s();const o=t(1),l=t(139),a=t(10),_=t(143),d=t(20),h=o.__importStar(t(48));class r extends l.TextAnnotationView{_get_size(){const{ctx:t}=this.layer;this.visuals.text.set_value(t);const{width:e}=t.measureText(this.model.text),{height:i}=_.font_metrics(t.font);return{width:e,height:i}}_render(){const{angle:t,angle_units:e}=this.model,i=a.resolve_angle(t,e),s=null!=this.layout?this.layout:this.plot_view.frame,n=this.coordinates.x_scale,o=this.coordinates.y_scale;let l=\"data\"==this.model.x_units?n.compute(this.model.x):s.bbox.xview.compute(this.model.x),_=\"data\"==this.model.y_units?o.compute(this.model.y):s.bbox.yview.compute(this.model.y);l+=this.model.x_offset,_-=this.model.y_offset;(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,this.model.text,l,_,i)}}i.LabelView=r,r.__name__=\"LabelView\";class c extends l.TextAnnotation{constructor(t){super(t)}static init_Label(){this.prototype.default_view=r,this.mixins([h.Text,[\"border_\",h.Line],[\"background_\",h.Fill]]),this.define((({Number:t,String:e,Angle:i})=>({x:[t],x_units:[d.SpatialUnits,\"data\"],y:[t],y_units:[d.SpatialUnits,\"data\"],text:[e,\"\"],angle:[i,0],angle_units:[d.AngleUnits,\"rad\"],x_offset:[t,0],y_offset:[t,0]}))),this.override({background_fill_color:null,border_line_color:null})}}i.Label=c,c.__name__=\"Label\",c.init_Label()},\n", @@ -1218,7 +1214,7 @@ " function _(i,e,t,s,n){s();const r=i(1),o=i(162),d=i(164),l=i(165),_=r.__importStar(i(48)),a=i(8);class h extends d.GuideRendererView{_render(){const i=this.layer.ctx;i.save(),this._draw_regions(i),this._draw_minor_grids(i),this._draw_grids(i),i.restore()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_draw_regions(i){if(!this.visuals.band_fill.doit&&!this.visuals.band_hatch.doit)return;const[e,t]=this.grid_coords(\"major\",!1);for(let s=0;st[1]&&(n=t[1]);else{[s,n]=t;for(const i of this.plot_view.axis_views)i.dimension==this.model.dimension&&i.model.x_range_name==this.model.x_range_name&&i.model.y_range_name==this.model.y_range_name&&([s,n]=i.computed_bounds)}return[s,n]}grid_coords(i,e=!0){const t=this.model.dimension,s=(t+1)%2,[n,r]=this.ranges();let[o,d]=this.computed_bounds();[o,d]=[Math.min(o,d),Math.max(o,d)];const l=[[],[]],_=this.model.get_ticker();if(null==_)return l;const a=_.get_ticks(o,d,n,r.min)[i],h=n.min,u=n.max,c=r.min,m=r.max;e||(a[0]!=h&&a.splice(0,0,h),a[a.length-1]!=u&&a.push(u));for(let i=0;i({bounds:[r(n(i,i),e),\"auto\"],dimension:[t(0,1),0],axis:[d(s(o.Axis)),null],ticker:[d(s(l.Ticker)),null]}))),this.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null})}get_ticker(){return null!=this.ticker?this.ticker:null!=this.axis?this.axis.ticker:null}}t.Grid=u,u.__name__=\"Grid\",u.init_Grid()},\n", " function _(o,a,x,B,e){B(),e(\"Box\",o(318).Box),e(\"Column\",o(320).Column),e(\"GridBox\",o(321).GridBox),e(\"HTMLBox\",o(322).HTMLBox),e(\"LayoutDOM\",o(319).LayoutDOM),e(\"Panel\",o(323).Panel),e(\"Row\",o(324).Row),e(\"Spacer\",o(325).Spacer),e(\"Tabs\",o(326).Tabs),e(\"WidgetBox\",o(329).WidgetBox)},\n", " function _(e,n,i,t,s){t();const o=e(319);class c extends o.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(()=>this.rebuild()))}get child_models(){return this.model.children}}i.BoxView=c,c.__name__=\"BoxView\";class r extends o.LayoutDOM{constructor(e){super(e)}static init_Box(){this.define((({Number:e,Array:n,Ref:i})=>({children:[n(i(o.LayoutDOM)),[]],spacing:[e,0]})))}}i.Box=r,r.__name__=\"Box\",r.init_Box()},\n", - " function _(i,t,e,s,o){s();const l=i(53),n=i(20),h=i(43),a=i(19),r=i(8),_=i(22),d=i(122),c=i(240),u=i(221),m=i(44),p=i(249);class g extends c.DOMView{constructor(){super(...arguments),this._idle_notified=!1,this._offset_parent=null,this._viewport={}}initialize(){super.initialize(),this.el.style.position=this.is_root?\"relative\":\"absolute\",this._child_views=new Map}async lazy_initialize(){await super.lazy_initialize(),await this.build_child_views()}remove(){for(const i of this.child_views)i.remove();this._child_views.clear(),super.remove()}connect_signals(){super.connect_signals(),this.is_root&&(this._on_resize=()=>this.resize_layout(),window.addEventListener(\"resize\",this._on_resize),this._parent_observer=setInterval((()=>{const i=this.el.offsetParent;this._offset_parent!=i&&(this._offset_parent=i,null!=i&&(this.compute_viewport(),this.invalidate_layout()))}),250));const i=this.model.properties;this.on_change([i.width,i.height,i.min_width,i.min_height,i.max_width,i.max_height,i.margin,i.width_policy,i.height_policy,i.sizing_mode,i.aspect_ratio,i.visible],(()=>this.invalidate_layout())),this.on_change([i.background,i.css_classes],(()=>this.invalidate_render()))}disconnect_signals(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener(\"resize\",this._on_resize),super.disconnect_signals()}css_classes(){return super.css_classes().concat(this.model.css_classes)}get child_views(){return this.child_models.map((i=>this._child_views.get(i)))}async build_child_views(){await d.build_views(this._child_views,this.child_models,{parent:this})}render(){super.render(),h.empty(this.el);const{background:i}=this.model;this.el.style.backgroundColor=null!=i?_.color2css(i):\"\",h.classes(this.el).clear().add(...this.css_classes());for(const i of this.child_views)this.el.appendChild(i.el),i.render()}update_layout(){for(const i of this.child_views)i.update_layout();this._update_layout()}update_position(){this.el.style.display=this.model.visible?\"block\":\"none\";const i=this.is_root?this.layout.sizing.margin:void 0;h.position(this.el,this.layout.bbox,i);for(const i of this.child_views)i.update_position()}after_layout(){for(const i of this.child_views)i.after_layout();this._has_finished=!0}compute_viewport(){this._viewport=this._viewport_size()}renderTo(i){i.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()}build(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this}async rebuild(){await this.build_child_views(),this.invalidate_render()}compute_layout(){const i=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),a.logger.debug(`layout computed in ${Date.now()-i} ms`),this.notify_finished()}resize_layout(){this.root.compute_viewport(),this.root.compute_layout()}invalidate_layout(){this.root.update_layout(),this.root.compute_layout()}invalidate_render(){this.render(),this.invalidate_layout()}has_finished(){if(!super.has_finished())return!1;for(const i of this.child_views)if(!i.has_finished())return!1;return!0}notify_finished(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()}_width_policy(){return null!=this.model.width?\"fixed\":\"fit\"}_height_policy(){return null!=this.model.height?\"fixed\":\"fit\"}box_sizing(){let{width_policy:i,height_policy:t,aspect_ratio:e}=this.model;\"auto\"==i&&(i=this._width_policy()),\"auto\"==t&&(t=this._height_policy());const{sizing_mode:s}=this.model;if(null!=s)if(\"fixed\"==s)i=t=\"fixed\";else if(\"stretch_both\"==s)i=t=\"max\";else if(\"stretch_width\"==s)i=\"max\";else if(\"stretch_height\"==s)t=\"max\";else switch(null==e&&(e=\"auto\"),s){case\"scale_width\":i=\"max\",t=\"min\";break;case\"scale_height\":i=\"min\",t=\"max\";break;case\"scale_both\":i=\"max\",t=\"max\"}const o={width_policy:i,height_policy:t},{min_width:l,min_height:n}=this.model;null!=l&&(o.min_width=l),null!=n&&(o.min_height=n);const{width:h,height:a}=this.model;null!=h&&(o.width=h),null!=a&&(o.height=a);const{max_width:_,max_height:d}=this.model;null!=_&&(o.max_width=_),null!=d&&(o.max_height=d),\"auto\"==e&&null!=h&&null!=a?o.aspect=h/a:r.isNumber(e)&&(o.aspect=e);const{margin:c}=this.model;if(null!=c)if(r.isNumber(c))o.margin={top:c,right:c,bottom:c,left:c};else if(2==c.length){const[i,t]=c;o.margin={top:i,right:t,bottom:i,left:t}}else{const[i,t,e,s]=c;o.margin={top:i,right:t,bottom:e,left:s}}o.visible=this.model.visible;const{align:u}=this.model;return r.isArray(u)?[o.halign,o.valign]=u:o.halign=o.valign=u,o}_viewport_size(){return h.undisplayed(this.el,(()=>{let i=this.el;for(;i=i.parentElement;){if(i.classList.contains(m.root))continue;if(i==document.body){const{margin:{left:i,right:t,top:e,bottom:s}}=h.extents(document.body);return{width:Math.ceil(document.documentElement.clientWidth-i-t),height:Math.ceil(document.documentElement.clientHeight-e-s)}}const{padding:{left:t,right:e,top:s,bottom:o}}=h.extents(i),{width:l,height:n}=i.getBoundingClientRect(),a=Math.ceil(l-t-e),r=Math.ceil(n-s-o);if(a>0||r>0)return{width:a>0?a:void 0,height:r>0?r:void 0}}return{}}))}export(i,t=!0){const e=\"png\"==i?\"canvas\":\"svg\",s=new p.CanvasLayer(e,t),{width:o,height:l}=this.layout.bbox;s.resize(o,l);for(const e of this.child_views){const o=e.export(i,t),{x:l,y:n}=e.layout.bbox;s.ctx.drawImage(o.canvas,l,n)}return s}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box,children:this.child_views.map((i=>i.serializable_state()))})}}e.LayoutDOMView=g,g.__name__=\"LayoutDOMView\";class f extends l.Model{constructor(i){super(i)}static init_LayoutDOM(){this.define((i=>{const{Boolean:t,Number:e,String:s,Auto:o,Color:l,Array:h,Tuple:a,Or:r,Null:_,Nullable:d}=i,c=a(e,e),m=a(e,e,e,e);return{width:[d(e),null],height:[d(e),null],min_width:[d(e),null],min_height:[d(e),null],max_width:[d(e),null],max_height:[d(e),null],margin:[d(r(e,c,m)),[0,0,0,0]],width_policy:[r(u.SizingPolicy,o),\"auto\"],height_policy:[r(u.SizingPolicy,o),\"auto\"],aspect_ratio:[r(e,o,_),null],sizing_mode:[d(n.SizingMode),null],visible:[t,!0],disabled:[t,!1],align:[r(n.Align,a(n.Align,n.Align)),\"start\"],background:[d(l),null],css_classes:[h(s),[]]}}))}}e.LayoutDOM=f,f.__name__=\"LayoutDOM\",f.init_LayoutDOM()},\n", + " function _(t,i,e,s,o){s();const l=t(53),n=t(20),h=t(43),a=t(19),r=t(8),_=t(22),d=t(122),c=t(240),u=t(221),m=t(44),p=t(249);class g extends c.DOMView{constructor(){super(...arguments),this._idle_notified=!1,this._offset_parent=null,this._viewport={}}initialize(){super.initialize(),this.el.style.position=this.is_root?\"relative\":\"absolute\",this._child_views=new Map}async lazy_initialize(){await super.lazy_initialize(),await this.build_child_views()}remove(){for(const t of this.child_views)t.remove();this._child_views.clear(),super.remove()}connect_signals(){super.connect_signals(),this.is_root&&(this._on_resize=()=>this.resize_layout(),window.addEventListener(\"resize\",this._on_resize),this._parent_observer=setInterval((()=>{const t=this.el.offsetParent;this._offset_parent!=t&&(this._offset_parent=t,null!=t&&(this.compute_viewport(),this.invalidate_layout()))}),250));const t=this.model.properties;this.on_change([t.width,t.height,t.min_width,t.min_height,t.max_width,t.max_height,t.margin,t.width_policy,t.height_policy,t.sizing_mode,t.aspect_ratio,t.visible],(()=>this.invalidate_layout())),this.on_change([t.background,t.css_classes],(()=>this.invalidate_render()))}disconnect_signals(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener(\"resize\",this._on_resize),super.disconnect_signals()}css_classes(){return super.css_classes().concat(this.model.css_classes)}get child_views(){return this.child_models.map((t=>this._child_views.get(t)))}async build_child_views(){await d.build_views(this._child_views,this.child_models,{parent:this})}render(){super.render(),h.empty(this.el);const{background:t}=this.model;this.el.style.backgroundColor=null!=t?_.color2css(t):\"\",h.classes(this.el).clear().add(...this.css_classes());for(const t of this.child_views)this.el.appendChild(t.el),t.render()}update_layout(){for(const t of this.child_views)t.update_layout();this._update_layout()}update_position(){this.el.style.display=this.model.visible?\"block\":\"none\";const t=this.is_root?this.layout.sizing.margin:void 0;h.position(this.el,this.layout.bbox,t);for(const t of this.child_views)t.update_position()}after_layout(){for(const t of this.child_views)t.after_layout();this._has_finished=!0}compute_viewport(){this._viewport=this._viewport_size()}renderTo(t){t.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()}build(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this}async rebuild(){await this.build_child_views(),this.invalidate_render()}compute_layout(){const t=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),a.logger.debug(`layout computed in ${Date.now()-t} ms`),this.notify_finished()}resize_layout(){this.root.compute_viewport(),this.root.compute_layout()}invalidate_layout(){this.root.update_layout(),this.root.compute_layout()}invalidate_render(){this.render(),this.invalidate_layout()}has_finished(){if(!super.has_finished())return!1;for(const t of this.child_views)if(!t.has_finished())return!1;return!0}notify_finished(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()}_width_policy(){return null!=this.model.width?\"fixed\":\"fit\"}_height_policy(){return null!=this.model.height?\"fixed\":\"fit\"}box_sizing(){let{width_policy:t,height_policy:i,aspect_ratio:e}=this.model;\"auto\"==t&&(t=this._width_policy()),\"auto\"==i&&(i=this._height_policy());const{sizing_mode:s}=this.model;if(null!=s)if(\"fixed\"==s)t=i=\"fixed\";else if(\"stretch_both\"==s)t=i=\"max\";else if(\"stretch_width\"==s)t=\"max\";else if(\"stretch_height\"==s)i=\"max\";else switch(null==e&&(e=\"auto\"),s){case\"scale_width\":t=\"max\",i=\"min\";break;case\"scale_height\":t=\"min\",i=\"max\";break;case\"scale_both\":t=\"max\",i=\"max\"}const o={width_policy:t,height_policy:i},{min_width:l,min_height:n}=this.model;null!=l&&(o.min_width=l),null!=n&&(o.min_height=n);const{width:h,height:a}=this.model;null!=h&&(o.width=h),null!=a&&(o.height=a);const{max_width:_,max_height:d}=this.model;null!=_&&(o.max_width=_),null!=d&&(o.max_height=d),\"auto\"==e&&null!=h&&null!=a?o.aspect=h/a:r.isNumber(e)&&(o.aspect=e);const{margin:c}=this.model;if(null!=c)if(r.isNumber(c))o.margin={top:c,right:c,bottom:c,left:c};else if(2==c.length){const[t,i]=c;o.margin={top:t,right:i,bottom:t,left:i}}else{const[t,i,e,s]=c;o.margin={top:t,right:i,bottom:e,left:s}}o.visible=this.model.visible;const{align:u}=this.model;return r.isArray(u)?[o.halign,o.valign]=u:o.halign=o.valign=u,o}_viewport_size(){return h.undisplayed(this.el,(()=>{let t=this.el;for(;t=t.parentElement;){if(t.classList.contains(m.root))continue;if(t==document.body){const{margin:{left:t,right:i,top:e,bottom:s}}=h.extents(document.body);return{width:Math.ceil(document.documentElement.clientWidth-t-i),height:Math.ceil(document.documentElement.clientHeight-e-s)}}const{padding:{left:i,right:e,top:s,bottom:o}}=h.extents(t),{width:l,height:n}=t.getBoundingClientRect();let a=0;for(const i of t.children){const{height:t}=i.getBoundingClientRect(),{margin:{top:e,bottom:s}}=h.extents(i);a+=t+e+s}const r=Math.ceil(l-i-e),_=Math.ceil(n-s-o-a);if(r>0||_>0)return{width:r>0?r:void 0,height:_>0?_:void 0}}return{}}))}export(t,i=!0){const e=\"png\"==t?\"canvas\":\"svg\",s=new p.CanvasLayer(e,i),{width:o,height:l}=this.layout.bbox;s.resize(o,l);for(const e of this.child_views){const o=e.export(t,i),{x:l,y:n}=e.layout.bbox;s.ctx.drawImage(o.canvas,l,n)}return s}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box,children:this.child_views.map((t=>t.serializable_state()))})}}e.LayoutDOMView=g,g.__name__=\"LayoutDOMView\";class f extends l.Model{constructor(t){super(t)}static init_LayoutDOM(){this.define((t=>{const{Boolean:i,Number:e,String:s,Auto:o,Color:l,Array:h,Tuple:a,Or:r,Null:_,Nullable:d}=t,c=a(e,e),m=a(e,e,e,e);return{width:[d(e),null],height:[d(e),null],min_width:[d(e),null],min_height:[d(e),null],max_width:[d(e),null],max_height:[d(e),null],margin:[d(r(e,c,m)),[0,0,0,0]],width_policy:[r(u.SizingPolicy,o),\"auto\"],height_policy:[r(u.SizingPolicy,o),\"auto\"],aspect_ratio:[r(e,o,_),null],sizing_mode:[d(n.SizingMode),null],visible:[i,!0],disabled:[i,!1],align:[r(n.Align,a(n.Align,n.Align)),\"start\"],background:[d(l),null],css_classes:[h(s),[]]}}))}}e.LayoutDOM=f,f.__name__=\"LayoutDOM\",f.init_LayoutDOM()},\n", " function _(t,s,i,o,n){o();const e=t(318),l=t(223);class u extends e.BoxView{_update_layout(){const t=this.child_views.map((t=>t.layout));this.layout=new l.Column(t),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}}i.ColumnView=u,u.__name__=\"ColumnView\";class a extends e.Box{constructor(t){super(t)}static init_Column(){this.prototype.default_view=u,this.define((({Any:t})=>({rows:[t,\"auto\"]})))}}i.Column=a,a.__name__=\"Column\",a.init_Column()},\n", " function _(t,s,i,o,e){o();const n=t(319),l=t(223);class a extends n.LayoutDOMView{connect_signals(){super.connect_signals();const{children:t,rows:s,cols:i,spacing:o}=this.model.properties;this.on_change([t,s,i,o],(()=>this.rebuild()))}get child_models(){return this.model.children.map((([t])=>t))}_update_layout(){this.layout=new l.Grid,this.layout.rows=this.model.rows,this.layout.cols=this.model.cols,this.layout.spacing=this.model.spacing;for(const[t,s,i,o,e]of this.model.children){const n=this._child_views.get(t);this.layout.items.push({layout:n.layout,row:s,col:i,row_span:o,col_span:e})}this.layout.set_sizing(this.box_sizing())}}i.GridBoxView=a,a.__name__=\"GridBoxView\";class r extends n.LayoutDOM{constructor(t){super(t)}static init_GridBox(){this.prototype.default_view=a,this.define((({Any:t,Int:s,Number:i,Tuple:o,Array:e,Ref:l,Or:a,Opt:r})=>({children:[e(o(l(n.LayoutDOM),s,s,r(s),r(s))),[]],rows:[t,\"auto\"],cols:[t,\"auto\"],spacing:[a(i,o(i,i)),0]})))}}i.GridBox=r,r.__name__=\"GridBox\",r.init_GridBox()},\n", " function _(t,e,o,s,n){s();const _=t(319),i=t(221);class a extends _.LayoutDOMView{get child_models(){return[]}_update_layout(){this.layout=new i.ContentBox(this.el),this.layout.set_sizing(this.box_sizing())}}o.HTMLBoxView=a,a.__name__=\"HTMLBoxView\";class u extends _.LayoutDOM{constructor(t){super(t)}}o.HTMLBox=u,u.__name__=\"HTMLBox\"},\n", @@ -1251,7 +1247,7 @@ " function _(e,t,r,i,n){i();const l=e(53),s=e(13);class a extends l.Model{constructor(e){super(e)}static init_TileSource(){this.define((({Number:e,String:t,Dict:r,Nullable:i})=>({url:[t,\"\"],tile_size:[e,256],max_zoom:[e,30],min_zoom:[e,0],extra_url_vars:[r(t),{}],attribution:[t,\"\"],x_origin_offset:[e],y_origin_offset:[e],initial_resolution:[i(e),null]})))}initialize(){super.initialize(),this.tiles=new Map,this._normalize_case()}connect_signals(){super.connect_signals(),this.connect(this.change,(()=>this._clear_cache()))}string_lookup_replace(e,t){let r=e;for(const[e,i]of s.entries(t))r=r.replace(`{${e}}`,i);return r}_normalize_case(){const e=this.url.replace(\"{x}\",\"{X}\").replace(\"{y}\",\"{Y}\").replace(\"{z}\",\"{Z}\").replace(\"{q}\",\"{Q}\").replace(\"{xmin}\",\"{XMIN}\").replace(\"{ymin}\",\"{YMIN}\").replace(\"{xmax}\",\"{XMAX}\").replace(\"{ymax}\",\"{YMAX}\");this.url=e}_clear_cache(){this.tiles=new Map}tile_xyz_to_key(e,t,r){return`${e}:${t}:${r}`}key_to_tile_xyz(e){const[t,r,i]=e.split(\":\").map((e=>parseInt(e)));return[t,r,i]}sort_tiles_from_center(e,t){const[r,i,n,l]=t,s=(n-r)/2+r,a=(l-i)/2+i;e.sort((function(e,t){return Math.sqrt((s-e[0])**2+(a-e[1])**2)-Math.sqrt((s-t[0])**2+(a-t[1])**2)}))}get_image_url(e,t,r){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",t.toString()).replace(\"{Z}\",r.toString())}}r.TileSource=a,a.__name__=\"TileSource\",a.init_TileSource()},\n", " function _(t,e,r,n,o){n();const c=t(65);function _(t,e){return c.wgs84_mercator.compute(t,e)}function g(t,e){return c.wgs84_mercator.invert(t,e)}r.geographic_to_meters=_,r.meters_to_geographic=g,r.geographic_extent_to_meters=function(t){const[e,r,n,o]=t,[c,g]=_(e,r),[i,u]=_(n,o);return[c,g,i,u]},r.meters_extent_to_geographic=function(t){const[e,r,n,o]=t,[c,_]=g(e,r),[i,u]=g(n,o);return[c,_,i,u]}},\n", " function _(e,t,r,s,_){s();const o=e(348);class c extends o.MercatorTileSource{constructor(e){super(e)}get_image_url(e,t,r){const s=this.string_lookup_replace(this.url,this.extra_url_vars),[_,o,c]=this.tms_to_wmts(e,t,r),i=this.tile_xyz_to_quadkey(_,o,c);return s.replace(\"{Q}\",i)}}r.QUADKEYTileSource=c,c.__name__=\"QUADKEYTileSource\"},\n", - " function _(t,e,i,s,_){s();const n=t(1),a=t(349),h=t(353),r=t(41),o=t(156),l=t(43),d=t(296),m=t(9),c=t(8),g=n.__importStar(t(354));class p extends r.RendererView{initialize(){this._tiles=[],super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.tile_source.change,(()=>this.request_render()))}styles(){return[...super.styles(),g.default]}get_extent(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]}get map_plot(){return this.plot_model}get map_canvas(){return this.layer.ctx}get map_frame(){return this.plot_view.frame}get x_range(){return this.map_plot.x_range}get y_range(){return this.map_plot.y_range}_set_data(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0}_update_attribution(){null!=this.attribution_el&&l.removeElement(this.attribution_el);const{attribution:t}=this.model.tile_source;if(c.isString(t)&&t.length>0){const{layout:e,frame:i}=this.plot_view,s=e.bbox.width-i.bbox.right,_=e.bbox.height-i.bbox.bottom,n=i.bbox.width;this.attribution_el=l.div({class:g.tile_attribution,style:{position:\"absolute\",right:`${s}px`,bottom:`${_}px`,\"max-width\":n-4+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.5)\",\"font-size\":\"9px\",\"line-height\":\"1.05\",\"white-space\":\"nowrap\",overflow:\"hidden\",\"text-overflow\":\"ellipsis\"}}),this.plot_view.canvas_view.add_event(this.attribution_el),this.attribution_el.innerHTML=t,this.attribution_el.title=this.attribution_el.textContent.replace(/\\s*\\n\\s*/g,\" \")}}_map_data(){this.initial_extent=this.get_extent();const t=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width),e=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width,t);this.x_range.start=e[0],this.y_range.start=e[1],this.x_range.end=e[2],this.y_range.end=e[3],this.x_range instanceof o.Range1d&&(this.x_range.reset_start=e[0],this.x_range.reset_end=e[2]),this.y_range instanceof o.Range1d&&(this.y_range.reset_start=e[1],this.y_range.reset_end=e[3]),this._update_attribution()}_create_tile(t,e,i,s,_=!1){const[n,a,h]=this.model.tile_source.normalize_xyz(t,e,i),r={img:void 0,tile_coords:[t,e,i],normalized_coords:[n,a,h],quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,i),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,i),bounds:s,loaded:!1,finished:!1,x_coord:s[0],y_coord:s[3]},o=this.model.tile_source.get_image_url(n,a,h);new d.ImageLoader(o,{loaded:t=>{Object.assign(r,{img:t,loaded:!0}),_?(r.finished=!0,this.notify_finished()):this.request_render()},failed(){r.finished=!0}}),this.model.tile_source.tiles.set(r.cache_key,r),this._tiles.push(r)}_enforce_aspect_ratio(){if(this._last_height!==this.map_frame.bbox.height||this._last_width!==this.map_frame.bbox.width){const t=this.get_extent(),e=this.model.tile_source.get_level_by_extent(t,this.map_frame.bbox.height,this.map_frame.bbox.width),i=this.model.tile_source.snap_to_zoom_level(t,this.map_frame.bbox.height,this.map_frame.bbox.width,e);this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame.bbox.height,this._last_width=this.map_frame.bbox.width}}has_finished(){if(!super.has_finished())return!1;if(0===this._tiles.length)return!1;for(const t of this._tiles)if(!t.finished)return!1;return!0}_render(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()}_draw_tile(t){const e=this.model.tile_source.tiles.get(t);if(null!=e&&e.loaded){const[[t],[i]]=this.coordinates.map_to_screen([e.bounds[0]],[e.bounds[3]]),[[s],[_]]=this.coordinates.map_to_screen([e.bounds[2]],[e.bounds[1]]),n=s-t,a=_-i,h=t,r=i,o=this.map_canvas.getImageSmoothingEnabled();this.map_canvas.setImageSmoothingEnabled(this.model.smoothing),this.map_canvas.drawImage(e.img,h,r,n,a),this.map_canvas.setImageSmoothingEnabled(o),e.finished=!0}}_set_rect(){const t=this.plot_model.outline_line_width,e=this.map_frame.bbox.left+t/2,i=this.map_frame.bbox.top+t/2,s=this.map_frame.bbox.width-t,_=this.map_frame.bbox.height-t;this.map_canvas.rect(e,i,s,_),this.map_canvas.clip()}_render_tiles(t){this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha;for(const e of t)this._draw_tile(e);this.map_canvas.restore()}_prefetch_tiles(){const{tile_source:t}=this.model,e=this.get_extent(),i=this.map_frame.bbox.height,s=this.map_frame.bbox.width,_=this.model.tile_source.get_level_by_extent(e,i,s),n=this.model.tile_source.get_tiles_by_extent(e,_);for(let e=0,i=Math.min(10,n.length);ei&&(s=this.extent,h=i,r=!0),r&&(this.x_range.setv({x_range:{start:s[0],end:s[2]}}),this.y_range.setv({start:s[1],end:s[3]})),this.extent=s;const o=t.get_tiles_by_extent(s,h),l=[],d=[],c=[],g=[];for(const e of o){const[i,s,n]=e,a=t.tile_xyz_to_key(i,s,n),h=t.tiles.get(a);if(null!=h&&h.loaded)d.push(a);else if(this.model.render_parents){const[e,a,h]=t.get_closest_parent_by_tile_xyz(i,s,n),r=t.tile_xyz_to_key(e,a,h),o=t.tiles.get(r);if(null!=o&&o.loaded&&!m.includes(c,r)&&c.push(r),_){const e=t.children_by_tile_xyz(i,s,n);for(const[i,s,_]of e){const e=t.tile_xyz_to_key(i,s,_);t.tiles.has(e)&&g.push(e)}}}null==h&&l.push(e)}this._render_tiles(c),this._render_tiles(g),this._render_tiles(d),null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout((()=>this._fetch_tiles(l)),65)}}i.TileRendererView=p,p.__name__=\"TileRendererView\";class u extends r.Renderer{constructor(t){super(t)}static init_TileRenderer(){this.prototype.default_view=p,this.define((({Boolean:t,Number:e,Ref:i})=>({alpha:[e,1],smoothing:[t,!0],tile_source:[i(a.TileSource),()=>new h.WMTSTileSource],render_parents:[t,!0]}))),this.override({level:\"image\"})}}i.TileRenderer=u,u.__name__=\"TileRenderer\",u.init_TileRenderer()},\n", + " function _(t,e,i,s,_){s();const n=t(1),a=t(349),h=t(353),r=t(41),o=t(156),l=t(43),d=t(296),m=t(9),c=t(8),p=n.__importStar(t(354));class g extends r.RendererView{initialize(){this._tiles=[],super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.tile_source.change,(()=>this.request_render()))}styles(){return[...super.styles(),p.default]}get_extent(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]}get map_plot(){return this.plot_model}get map_canvas(){return this.layer.ctx}get map_frame(){return this.plot_view.frame}get x_range(){return this.map_plot.x_range}get y_range(){return this.map_plot.y_range}_set_data(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0}_update_attribution(){null!=this.attribution_el&&l.removeElement(this.attribution_el);const{attribution:t}=this.model.tile_source;if(c.isString(t)&&t.length>0){const{layout:e,frame:i}=this.plot_view,s=e.bbox.width-i.bbox.right,_=e.bbox.height-i.bbox.bottom,n=i.bbox.width;this.attribution_el=l.div({class:p.tile_attribution,style:{position:\"absolute\",right:`${s}px`,bottom:`${_}px`,\"max-width\":n-4+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.5)\",\"font-size\":\"9px\",\"line-height\":\"1.05\",\"white-space\":\"nowrap\",overflow:\"hidden\",\"text-overflow\":\"ellipsis\"}}),this.plot_view.canvas_view.add_event(this.attribution_el),this.attribution_el.innerHTML=t,this.attribution_el.title=this.attribution_el.textContent.replace(/\\s*\\n\\s*/g,\" \")}}_map_data(){this.initial_extent=this.get_extent();const t=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width),e=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width,t);this.x_range.start=e[0],this.y_range.start=e[1],this.x_range.end=e[2],this.y_range.end=e[3],this.x_range instanceof o.Range1d&&(this.x_range.reset_start=e[0],this.x_range.reset_end=e[2]),this.y_range instanceof o.Range1d&&(this.y_range.reset_start=e[1],this.y_range.reset_end=e[3]),this._update_attribution()}_create_tile(t,e,i,s,_=!1){const[n,a,h]=this.model.tile_source.normalize_xyz(t,e,i),r={img:void 0,tile_coords:[t,e,i],normalized_coords:[n,a,h],quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,i),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,i),bounds:s,loaded:!1,finished:!1,x_coord:s[0],y_coord:s[3]},o=this.model.tile_source.get_image_url(n,a,h);new d.ImageLoader(o,{loaded:t=>{Object.assign(r,{img:t,loaded:!0}),_?(r.finished=!0,this.notify_finished()):this.request_render()},failed(){r.finished=!0}}),this.model.tile_source.tiles.set(r.cache_key,r),this._tiles.push(r)}_enforce_aspect_ratio(){if(this._last_height!==this.map_frame.bbox.height||this._last_width!==this.map_frame.bbox.width){const t=this.get_extent(),e=this.model.tile_source.get_level_by_extent(t,this.map_frame.bbox.height,this.map_frame.bbox.width),i=this.model.tile_source.snap_to_zoom_level(t,this.map_frame.bbox.height,this.map_frame.bbox.width,e);this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame.bbox.height,this._last_width=this.map_frame.bbox.width}}has_finished(){if(!super.has_finished())return!1;if(0===this._tiles.length)return!1;for(const t of this._tiles)if(!t.finished)return!1;return!0}_render(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()}_draw_tile(t){const e=this.model.tile_source.tiles.get(t);if(null!=e&&e.loaded){const[[t],[i]]=this.coordinates.map_to_screen([e.bounds[0]],[e.bounds[3]]),[[s],[_]]=this.coordinates.map_to_screen([e.bounds[2]],[e.bounds[1]]),n=s-t,a=_-i,h=t,r=i,o=this.map_canvas.getImageSmoothingEnabled();this.map_canvas.setImageSmoothingEnabled(this.model.smoothing),this.map_canvas.drawImage(e.img,h,r,n,a),this.map_canvas.setImageSmoothingEnabled(o),e.finished=!0}}_set_rect(){const t=this.plot_model.outline_line_width,e=this.map_frame.bbox.left+t/2,i=this.map_frame.bbox.top+t/2,s=this.map_frame.bbox.width-t,_=this.map_frame.bbox.height-t;this.map_canvas.rect(e,i,s,_),this.map_canvas.clip()}_render_tiles(t){this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha;for(const e of t)this._draw_tile(e);this.map_canvas.restore()}_prefetch_tiles(){const{tile_source:t}=this.model,e=this.get_extent(),i=this.map_frame.bbox.height,s=this.map_frame.bbox.width,_=this.model.tile_source.get_level_by_extent(e,i,s),n=this.model.tile_source.get_tiles_by_extent(e,_);for(let e=0,i=Math.min(10,n.length);ei&&(s=this.extent,h=i,r=!0),r&&(this.x_range.setv({start:s[0],end:s[2]}),this.y_range.setv({start:s[1],end:s[3]})),this.extent=s;const o=t.get_tiles_by_extent(s,h),l=[],d=[],c=[],p=[];for(const e of o){const[i,s,n]=e,a=t.tile_xyz_to_key(i,s,n),h=t.tiles.get(a);if(null!=h&&h.loaded)d.push(a);else if(this.model.render_parents){const[e,a,h]=t.get_closest_parent_by_tile_xyz(i,s,n),r=t.tile_xyz_to_key(e,a,h),o=t.tiles.get(r);if(null!=o&&o.loaded&&!m.includes(c,r)&&c.push(r),_){const e=t.children_by_tile_xyz(i,s,n);for(const[i,s,_]of e){const e=t.tile_xyz_to_key(i,s,_);t.tiles.has(e)&&p.push(e)}}}null==h&&l.push(e)}this._render_tiles(c),this._render_tiles(p),this._render_tiles(d),null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout((()=>this._fetch_tiles(l)),65)}}i.TileRendererView=g,g.__name__=\"TileRendererView\";class u extends r.Renderer{constructor(t){super(t)}static init_TileRenderer(){this.prototype.default_view=g,this.define((({Boolean:t,Number:e,Ref:i})=>({alpha:[e,1],smoothing:[t,!0],tile_source:[i(a.TileSource),()=>new h.WMTSTileSource],render_parents:[t,!0]}))),this.override({level:\"image\"})}}i.TileRenderer=u,u.__name__=\"TileRenderer\",u.init_TileRenderer()},\n", " function _(t,e,r,o,s){o();const c=t(348);class i extends c.MercatorTileSource{constructor(t){super(t)}get_image_url(t,e,r){const o=this.string_lookup_replace(this.url,this.extra_url_vars),[s,c,i]=this.tms_to_wmts(t,e,r);return o.replace(\"{X}\",s.toString()).replace(\"{Y}\",c.toString()).replace(\"{Z}\",i.toString())}}r.WMTSTileSource=i,i.__name__=\"WMTSTileSource\"},\n", " function _(t,o,i,b,r){b(),i.root=\"bk-root\",i.tile_attribution=\"bk-tile-attribution\",i.default=\".bk-root .bk-tile-attribution a{color:black;}\"},\n", " function _(e,r,t,c,o){c();const i=e(348);class l extends i.MercatorTileSource{constructor(e){super(e)}get_image_url(e,r,t){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",r.toString()).replace(\"{Z}\",t.toString())}}t.TMSTileSource=l,l.__name__=\"TMSTileSource\"},\n", @@ -1269,9 +1265,9 @@ " function _(o,t,e,i,s){i();const n=o(251),l=o(20),a=o(368);class _ extends n.ActionToolView{doit(){var o;const t=this.plot_view.frame,e=this.model.dimensions,i=\"width\"==e||\"both\"==e,s=\"height\"==e||\"both\"==e,n=a.scale_range(t,this.model.sign*this.model.factor,i,s);this.plot_view.state.push(\"zoom_out\",{range:n}),this.plot_view.update_range(n,{scrolling:!0}),null===(o=this.model.document)||void 0===o||o.interactive_start(this.plot_model)}}e.ZoomBaseToolView=_,_.__name__=\"ZoomBaseToolView\";class m extends n.ActionTool{constructor(o){super(o)}static init_ZoomBaseTool(){this.define((({Percent:o})=>({factor:[o,.1],dimensions:[l.Dimensions,\"both\"]})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}e.ZoomBaseTool=m,m.__name__=\"ZoomBaseTool\",m.init_ZoomBaseTool()},\n", " function _(n,t,o,r,s){r();const c=n(10);function e(n,t,o){const[r,s]=[n.start,n.end],c=null!=o?o:(s+r)/2;return[r-(r-c)*t,s-(s-c)*t]}function a(n,[t,o]){const r=new Map;for(const[s,c]of n){const[n,e]=c.r_invert(t,o);r.set(s,{start:n,end:e})}return r}o.scale_highlow=e,o.get_info=a,o.scale_range=function(n,t,o=!0,r=!0,s){t=c.clamp(t,-.9,.9);const l=o?t:0,[u,i]=e(n.bbox.h_range,l,null!=s?s.x:void 0),_=a(n.x_scales,[u,i]),f=r?t:0,[g,x]=e(n.bbox.v_range,f,null!=s?s.y:void 0);return{xrs:_,yrs:a(n.y_scales,[g,x]),factor:t}}},\n", " function _(o,t,i,s,e){s();const n=o(367),_=o(242);class m extends n.ZoomBaseToolView{}i.ZoomOutToolView=m,m.__name__=\"ZoomOutToolView\";class l extends n.ZoomBaseTool{constructor(o){super(o),this.sign=-1,this.tool_name=\"Zoom Out\",this.icon=_.tool_icon_zoom_out}static init_ZoomOutTool(){this.prototype.default_view=m,this.register_alias(\"zoom_out\",(()=>new l({dimensions:\"both\"}))),this.register_alias(\"xzoom_out\",(()=>new l({dimensions:\"width\"}))),this.register_alias(\"yzoom_out\",(()=>new l({dimensions:\"height\"})))}}i.ZoomOutTool=l,l.__name__=\"ZoomOutTool\",l.init_ZoomOutTool()},\n", - " function _(e,t,s,o,n){o();const i=e(9),r=e(8),c=e(11),_=e(61),a=e(237);class l extends a.GestureToolView{constructor(){super(...arguments),this._mouse_in_frame=!0}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void c.unreachable():\"replace\"}_move_enter(e){this._mouse_in_frame=!0}_move_exit(e){this._mouse_in_frame=!1}_map_drag(e,t,s){if(!this.plot_view.frame.bbox.contains(e,t))return null;const o=this.plot_view.renderer_view(s);if(null==o)return null;return[o.coordinates.x_scale.invert(e),o.coordinates.y_scale.invert(t)]}_delete_selected(e){const t=e.data_source,s=t.selected.indices;s.sort();for(const e of t.columns()){const o=t.get_array(e);for(let e=0;e({custom_icon:[t],empty_value:[e],renderers:[s(o(_.GlyphRenderer)),[]]})))}get computed_icon(){var e;return null!==(e=this.custom_icon)&&void 0!==e?e:this.icon}}s.EditTool=d,d.__name__=\"EditTool\",d.init_EditTool()},\n", + " function _(e,t,s,o,n){o();const i=e(9),r=e(8),c=e(11),a=e(61),_=e(237);class l extends _.GestureToolView{constructor(){super(...arguments),this._mouse_in_frame=!0}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void c.unreachable():\"replace\"}_move_enter(e){this._mouse_in_frame=!0}_move_exit(e){this._mouse_in_frame=!1}_map_drag(e,t,s){if(!this.plot_view.frame.bbox.contains(e,t))return null;const o=this.plot_view.renderer_view(s);if(null==o)return null;return[o.coordinates.x_scale.invert(e),o.coordinates.y_scale.invert(t)]}_delete_selected(e){const t=e.data_source,s=t.selected.indices;s.sort();for(const e of t.columns()){const o=t.get_array(e);for(let e=0;e({custom_icon:[n(t),null],empty_value:[e],renderers:[s(o(a.GlyphRenderer)),[]]})))}get computed_icon(){var e;return null!==(e=this.custom_icon)&&void 0!==e?e:this.icon}}s.EditTool=d,d.__name__=\"EditTool\",d.init_EditTool()},\n", " function _(e,t,s,i,_){i();const o=e(43),n=e(20),a=e(370),d=e(242);class l extends a.EditToolView{_tap(e){null==this._draw_basepoint&&null==this._basepoint&&this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)if(e.keyCode===o.Keys.Backspace)this._delete_selected(t);else if(e.keyCode==o.Keys.Esc){t.data_source.selection_manager.clear()}}_set_extent([e,t],[s,i],_,o=!1){const n=this.model.renderers[0],a=this.plot_view.renderer_view(n);if(null==a)return;const d=n.glyph,l=n.data_source,[r,h]=a.coordinates.x_scale.r_invert(e,t),[p,u]=a.coordinates.y_scale.r_invert(s,i),[c,m]=[(r+h)/2,(p+u)/2],[f,b]=[h-r,u-p],[x,y]=[d.x.field,d.y.field],[w,v]=[d.width.field,d.height.field];if(_)this._pop_glyphs(l,this.model.num_objects),x&&l.get_array(x).push(c),y&&l.get_array(y).push(m),w&&l.get_array(w).push(f),v&&l.get_array(v).push(b),this._pad_empty_columns(l,[x,y,w,v]);else{const e=l.data[x].length-1;x&&(l.data[x][e]=c),y&&(l.data[y][e]=m),w&&(l.data[w][e]=f),v&&(l.data[v][e]=b)}this._emit_cds_changes(l,!0,!1,o)}_update_box(e,t=!1,s=!1){if(null==this._draw_basepoint)return;const i=[e.sx,e.sy],_=this.plot_view.frame,o=this.model.dimensions,n=this.model._get_dim_limits(this._draw_basepoint,i,_,o);if(null!=n){const[e,i]=n;this._set_extent(e,i,t,s)}}_doubletap(e){this.model.active&&(null!=this._draw_basepoint?(this._update_box(e,!1,!0),this._draw_basepoint=null):(this._draw_basepoint=[e.sx,e.sy],this._select_event(e,\"append\",this.model.renderers),this._update_box(e,!0,!1)))}_move(e){this._update_box(e,!1,!1)}_pan_start(e){if(e.shiftKey){if(null!=this._draw_basepoint)return;this._draw_basepoint=[e.sx,e.sy],this._update_box(e,!0,!1)}else{if(null!=this._basepoint)return;this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy]}}_pan(e,t=!1,s=!1){if(e.shiftKey){if(null==this._draw_basepoint)return;this._update_box(e,t,s)}else{if(null==this._basepoint)return;this._drag_points(e,this.model.renderers)}}_pan_end(e){if(this._pan(e,!1,!0),e.shiftKey)this._draw_basepoint=null;else{this._basepoint=null;for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0)}}}s.BoxEditToolView=l,l.__name__=\"BoxEditToolView\";class r extends a.EditTool{constructor(e){super(e),this.tool_name=\"Box Edit Tool\",this.icon=d.tool_icon_box_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=1}static init_BoxEditTool(){this.prototype.default_view=l,this.define((({Int:e})=>({dimensions:[n.Dimensions,\"both\"],num_objects:[e,0]})))}}s.BoxEditTool=r,r.__name__=\"BoxEditTool\",r.init_BoxEditTool()},\n", - " function _(e,t,a,s,r){s();const o=e(43),_=e(8),i=e(370),d=e(242);class n extends i.EditToolView{_draw(e,t,a=!1){if(!this.model.active)return;const s=this.model.renderers[0],r=this._map_drag(e.sx,e.sy,s);if(null==r)return;const[o,i]=r,d=s.data_source,n=s.glyph,[h,l]=[n.xs.field,n.ys.field];if(\"new\"==t)this._pop_glyphs(d,this.model.num_objects),h&&d.get_array(h).push([o]),l&&d.get_array(l).push([i]),this._pad_empty_columns(d,[h,l]);else if(\"add\"==t){if(h){const e=d.data[h].length-1;let t=d.get_array(h)[e];_.isArray(t)||(t=Array.from(t),d.data[h][e]=t),t.push(o)}if(l){const e=d.data[l].length-1;let t=d.get_array(l)[e];_.isArray(t)||(t=Array.from(t),d.data[l][e]=t),t.push(i)}}this._emit_cds_changes(d,!0,!0,a)}_pan_start(e){this._draw(e,\"new\")}_pan(e){this._draw(e,\"add\")}_pan_end(e){this._draw(e,\"add\",!0)}_tap(e){this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===o.Keys.Esc?t.data_source.selection_manager.clear():e.keyCode===o.Keys.Backspace&&this._delete_selected(t)}}a.FreehandDrawToolView=n,n.__name__=\"FreehandDrawToolView\";class h extends i.EditTool{constructor(e){super(e),this.tool_name=\"Freehand Draw Tool\",this.icon=d.tool_icon_freehand_draw,this.event_type=[\"pan\",\"tap\"],this.default_order=3}static init_FreehandDrawTool(){this.prototype.default_view=n,this.define((({Int:e})=>({num_objects:[e,0]})))}}a.FreehandDrawTool=h,h.__name__=\"FreehandDrawTool\",h.init_FreehandDrawTool()},\n", + " function _(e,t,a,s,r){s();const _=e(43),i=e(8),o=e(370),d=e(242);class n extends o.EditToolView{_draw(e,t,a=!1){if(!this.model.active)return;const s=this.model.renderers[0],r=this._map_drag(e.sx,e.sy,s);if(null==r)return;const[_,o]=r,d=s.data_source,n=s.glyph,[h,l]=[n.xs.field,n.ys.field];if(\"new\"==t)this._pop_glyphs(d,this.model.num_objects),h&&d.get_array(h).push([_]),l&&d.get_array(l).push([o]),this._pad_empty_columns(d,[h,l]);else if(\"add\"==t){if(h){const e=d.data[h].length-1;let t=d.get_array(h)[e];i.isArray(t)||(t=Array.from(t),d.data[h][e]=t),t.push(_)}if(l){const e=d.data[l].length-1;let t=d.get_array(l)[e];i.isArray(t)||(t=Array.from(t),d.data[l][e]=t),t.push(o)}}this._emit_cds_changes(d,!0,!0,a)}_pan_start(e){this._draw(e,\"new\")}_pan(e){this._draw(e,\"add\")}_pan_end(e){this._draw(e,\"add\",!0)}_tap(e){this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===_.Keys.Esc?t.data_source.selection_manager.clear():e.keyCode===_.Keys.Backspace&&this._delete_selected(t)}}a.FreehandDrawToolView=n,n.__name__=\"FreehandDrawToolView\";class h extends o.EditTool{constructor(e){super(e),this.tool_name=\"Freehand Draw Tool\",this.icon=d.tool_icon_freehand_draw,this.event_type=[\"pan\",\"tap\"],this.default_order=3}static init_FreehandDrawTool(){this.prototype.default_view=n,this.define((({Int:e})=>({num_objects:[e,0]}))),this.register_alias(\"freehand_draw\",(()=>new h))}}a.FreehandDrawTool=h,h.__name__=\"FreehandDrawTool\",h.init_FreehandDrawTool()},\n", " function _(e,t,s,o,i){o();const a=e(43),n=e(370),_=e(242);class r extends n.EditToolView{_tap(e){if(this._select_event(e,this._select_mode(e),this.model.renderers).length||!this.model.add)return;const t=this.model.renderers[0],s=this._map_drag(e.sx,e.sy,t);if(null==s)return;const o=t.glyph,i=t.data_source,[a,n]=[o.x.field,o.y.field],[_,r]=s;this._pop_glyphs(i,this.model.num_objects),a&&i.get_array(a).push(_),n&&i.get_array(n).push(r),this._pad_empty_columns(i,[a,n]),i.change.emit(),i.data=i.data,i.properties.data.change.emit()}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===a.Keys.Backspace?this._delete_selected(t):e.keyCode==a.Keys.Esc&&t.data_source.selection_manager.clear()}_pan_start(e){this.model.drag&&(this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){this.model.drag&&null!=this._basepoint&&this._drag_points(e,this.model.renderers)}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0);this._basepoint=null}}}s.PointDrawToolView=r,r.__name__=\"PointDrawToolView\";class d extends n.EditTool{constructor(e){super(e),this.tool_name=\"Point Draw Tool\",this.icon=_.tool_icon_point_draw,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=2}static init_PointDrawTool(){this.prototype.default_view=r,this.define((({Boolean:e,Int:t})=>({add:[e,!0],drag:[e,!0],num_objects:[t,0]})))}}s.PointDrawTool=d,d.__name__=\"PointDrawTool\",d.init_PointDrawTool()},\n", " function _(e,t,s,i,a){i();const o=e(43),r=e(8),n=e(375),_=e(242);class d extends n.PolyToolView{constructor(){super(...arguments),this._drawing=!1,this._initialized=!1}_tap(e){this._drawing?this._draw(e,\"add\",!0):this._select_event(e,this._select_mode(e),this.model.renderers)}_draw(e,t,s=!1){const i=this.model.renderers[0],a=this._map_drag(e.sx,e.sy,i);if(this._initialized||this.activate(),null==a)return;const[o,n]=this._snap_to_vertex(e,...a),_=i.data_source,d=i.glyph,[l,h]=[d.xs.field,d.ys.field];if(\"new\"==t)this._pop_glyphs(_,this.model.num_objects),l&&_.get_array(l).push([o,o]),h&&_.get_array(h).push([n,n]),this._pad_empty_columns(_,[l,h]);else if(\"edit\"==t){if(l){const e=_.data[l][_.data[l].length-1];e[e.length-1]=o}if(h){const e=_.data[h][_.data[h].length-1];e[e.length-1]=n}}else if(\"add\"==t){if(l){const e=_.data[l].length-1;let t=_.get_array(l)[e];const s=t[t.length-1];t[t.length-1]=o,r.isArray(t)||(t=Array.from(t),_.data[l][e]=t),t.push(s)}if(h){const e=_.data[h].length-1;let t=_.get_array(h)[e];const s=t[t.length-1];t[t.length-1]=n,r.isArray(t)||(t=Array.from(t),_.data[h][e]=t),t.push(s)}}this._emit_cds_changes(_,!0,!1,s)}_show_vertices(){if(!this.model.active)return;const e=[],t=[];for(let s=0;sthis._show_vertices()))}this._initialized=!0}}deactivate(){this._drawing&&(this._remove(),this._drawing=!1),this.model.vertex_renderer&&this._hide_vertices()}}s.PolyDrawToolView=d,d.__name__=\"PolyDrawToolView\";class l extends n.PolyTool{constructor(e){super(e),this.tool_name=\"Polygon Draw Tool\",this.icon=_.tool_icon_poly_draw,this.event_type=[\"pan\",\"tap\",\"move\"],this.default_order=3}static init_PolyDrawTool(){this.prototype.default_view=d,this.define((({Boolean:e,Int:t})=>({drag:[e,!0],num_objects:[t,0]})))}}s.PolyDrawTool=l,l.__name__=\"PolyDrawTool\",l.init_PolyDrawTool()},\n", " function _(e,t,r,o,s){o();const i=e(8),l=e(370);class _ extends l.EditToolView{_set_vertices(e,t){const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[s,l]=[r.x.field,r.y.field];s&&(i.isArray(e)?o.data[s]=e:r.x={value:e}),l&&(i.isArray(t)?o.data[l]=t:r.y={value:t}),this._emit_cds_changes(o,!0,!0,!1)}_hide_vertices(){this._set_vertices([],[])}_snap_to_vertex(e,t,r){if(this.model.vertex_renderer){const o=this._select_event(e,\"replace\",[this.model.vertex_renderer]),s=this.model.vertex_renderer.data_source,i=this.model.vertex_renderer.glyph,[l,_]=[i.x.field,i.y.field];if(o.length){const e=s.selected.indices[0];l&&(t=s.data[l][e]),_&&(r=s.data[_][e]),s.selection_manager.clear()}}return[t,r]}}r.PolyToolView=_,_.__name__=\"PolyToolView\";class d extends l.EditTool{constructor(e){super(e)}static init_PolyTool(){this.define((({AnyRef:e})=>({vertex_renderer:[e()]})))}}r.PolyTool=d,d.__name__=\"PolyTool\",d.init_PolyTool()},\n", @@ -1293,7 +1289,7 @@ " function _(e,t,n,s,o){s();const i=e(1),r=e(247),l=e(390),a=e(254),c=e(61),_=e(123),d=e(62),p=e(63),h=e(127),u=i.__importStar(e(107)),m=e(182),y=e(43),f=e(22),x=e(13),v=e(245),w=e(8),g=e(122),b=e(20),k=e(242),C=e(15),S=e(161),T=i.__importStar(e(255));function $(e,t,n,s,o,i){const r={x:o[e],y:i[e]},l={x:o[e+1],y:i[e+1]};let a,c;if(\"span\"==t.type)\"h\"==t.direction?(a=Math.abs(r.x-n),c=Math.abs(l.x-n)):(a=Math.abs(r.y-s),c=Math.abs(l.y-s));else{const e={x:n,y:s};a=u.dist_2_pts(r,e),c=u.dist_2_pts(l,e)}return adelete this._template_el)),this.on_change([e,t,n],(async()=>await this._update_ttmodels()))}async _update_ttmodels(){const{_ttmodels:e,computed_renderers:t}=this;e.clear();const{tooltips:n}=this.model;if(null!=n)for(const t of this.computed_renderers){const s=new a.Tooltip({custom:w.isString(n)||w.isFunction(n),attachment:this.model.attachment,show_arrow:this.model.show_arrow});t instanceof c.GlyphRenderer?e.set(t,s):t instanceof _.GraphRenderer&&(e.set(t.node_renderer,s),e.set(t.edge_renderer,s))}const s=await g.build_views(this._ttviews,[...e.values()],{parent:this.plot_view});for(const e of s)e.render();const o=[...function*(){for(const e of t)e instanceof c.GlyphRenderer?yield e:e instanceof _.GraphRenderer&&(yield e.node_renderer,yield e.edge_renderer)}()],i=this._slots.get(this._update);if(null!=i){const e=new Set(o.map((e=>e.data_source)));C.Signal.disconnect_receiver(this,i,e)}for(const e of o)this.connect(e.data_source.inspect,this._update)}get computed_renderers(){const{renderers:e,names:t}=this.model,n=this.plot_model.data_renderers;return S.compute_renderers(e,n,t)}get ttmodels(){return this._ttmodels}_clear(){this._inspect(1/0,1/0);for(const[,e]of this.ttmodels)e.clear()}_move(e){if(!this.model.active)return;const{sx:t,sy:n}=e;this.plot_view.frame.bbox.contains(t,n)?this._inspect(t,n):this._clear()}_move_exit(){this._clear()}_inspect(e,t){let n;if(\"mouse\"==this.model.mode)n={type:\"point\",sx:e,sy:t};else{n={type:\"span\",direction:\"vline\"==this.model.mode?\"h\":\"v\",sx:e,sy:t}}for(const e of this.computed_renderers){const t=e.get_selection_manager(),s=this.plot_view.renderer_view(e);null!=s&&t.inspect(s,n)}this._emit_callback(n)}_update([e,{geometry:t}]){var n,s;if(!this.model.active)return;if(\"point\"!=t.type&&\"span\"!=t.type)return;if(!(e instanceof c.GlyphRenderer))return;if(\"ignore\"==this.model.muted_policy&&e.muted)return;const o=this.ttmodels.get(e);if(null==o)return;const i=e.get_selection_manager();let r=i.inspectors.get(e);if(r=e.view.convert_selection_to_subset(r),r.is_empty())return void o.clear();const l=i.source,a=this.plot_view.renderer_view(e);if(null==a)return;const{sx:_,sy:d}=t,u=a.coordinates.x_scale,m=a.coordinates.y_scale,f=u.invert(_),v=m.invert(d),{glyph:w}=a,g=[];if(w instanceof p.LineView)for(const n of r.line_indices){let s,o,i=w._x[n+1],a=w._y[n+1],c=n;switch(this.model.line_policy){case\"interp\":[i,a]=w.get_interpolation_hit(n,t),s=u.compute(i),o=m.compute(a);break;case\"prev\":[[s,o],c]=R(w.sx,w.sy,n);break;case\"next\":[[s,o],c]=R(w.sx,w.sy,n+1);break;case\"nearest\":[[s,o],c]=$(n,t,_,d,w.sx,w.sy),i=w._x[c],a=w._y[c];break;default:[s,o]=[_,d]}const p={index:c,x:f,y:v,sx:_,sy:d,data_x:i,data_y:a,rx:s,ry:o,indices:r.line_indices,name:e.name};g.push([s,o,this._render_tooltips(l,c,p)])}for(const t of r.image_indices){const n={index:t.index,x:f,y:v,sx:_,sy:d,name:e.name},s=this._render_tooltips(l,t,n);g.push([_,d,s])}for(const o of r.indices)if(w instanceof h.MultiLineView&&!x.isEmpty(r.multiline_indices))for(const n of r.multiline_indices[o.toString()]){let s,i,a,p=w._xs.get(o)[n],h=w._ys.get(o)[n],y=n;switch(this.model.line_policy){case\"interp\":[p,h]=w.get_interpolation_hit(o,n,t),s=u.compute(p),i=m.compute(h);break;case\"prev\":[[s,i],y]=R(w.sxs.get(o),w.sys.get(o),n);break;case\"next\":[[s,i],y]=R(w.sxs.get(o),w.sys.get(o),n+1);break;case\"nearest\":[[s,i],y]=$(n,t,_,d,w.sxs.get(o),w.sys.get(o)),p=w._xs.get(o)[y],h=w._ys.get(o)[y];break;default:throw new Error(\"shouldn't have happened\")}a=e instanceof c.GlyphRenderer?e.view.convert_indices_from_subset([o])[0]:o;const x={index:a,x:f,y:v,sx:_,sy:d,data_x:p,data_y:h,segment_index:y,indices:r.multiline_indices,name:e.name};g.push([s,i,this._render_tooltips(l,a,x)])}else{const t=null===(n=w._x)||void 0===n?void 0:n[o],i=null===(s=w._y)||void 0===s?void 0:s[o];let a,p,h;if(\"snap_to_data\"==this.model.point_policy){let e=w.get_anchor_point(this.model.anchor,o,[_,d]);if(null==e&&(e=w.get_anchor_point(\"center\",o,[_,d]),null==e))continue;a=e.x,p=e.y}else[a,p]=[_,d];h=e instanceof c.GlyphRenderer?e.view.convert_indices_from_subset([o])[0]:o;const u={index:h,x:f,y:v,sx:_,sy:d,data_x:t,data_y:i,indices:r.indices,name:e.name};g.push([a,p,this._render_tooltips(l,h,u)])}if(0==g.length)o.clear();else{const{content:e}=o;y.empty(o.content);for(const[,,t]of g)null!=t&&e.appendChild(t);const[t,n]=g[g.length-1];o.setv({position:[t,n]},{check_eq:!1})}}_emit_callback(e){const{callback:t}=this.model;if(null!=t)for(const n of this.computed_renderers){if(!(n instanceof c.GlyphRenderer))continue;const s=this.plot_view.renderer_view(n);if(null==s)continue;const{x_scale:o,y_scale:i}=s.coordinates,r=o.invert(e.sx),l=i.invert(e.sy),a=n.data_source.inspected;t.execute(this.model,{geometry:Object.assign({x:r,y:l},e),renderer:n,index:a})}}_create_template(e){const t=y.div({style:{display:\"table\",borderSpacing:\"2px\"}});for(const[n]of e){const e=y.div({style:{display:\"table-row\"}});t.appendChild(e);const s=y.div({style:{display:\"table-cell\"},class:T.tooltip_row_label},0!=n.length?`${n}: `:\"\");e.appendChild(s);const o=y.span();o.dataset.value=\"\";const i=y.span({class:T.tooltip_color_block},\" \");i.dataset.swatch=\"\",y.undisplay(i);const r=y.div({style:{display:\"table-cell\"},class:T.tooltip_row_value},o,i);e.appendChild(r)}return t}_render_template(e,t,n,s,o){const i=e.cloneNode(!0),r=i.querySelectorAll(\"[data-value]\"),l=i.querySelectorAll(\"[data-swatch]\"),a=/\\$color(\\[.*\\])?:(\\w*)/,c=/\\$swatch:(\\w*)/;for(const[[,e],i]of v.enumerate(t)){const t=e.match(c),_=e.match(a);if(null!=t||null!=_){if(null!=t){const[,e]=t,o=n.get_column(e);if(null==o)r[i].textContent=`${e} unknown`;else{const e=w.isNumber(s)?o[s]:null;null!=e&&(l[i].style.backgroundColor=f.color2css(e),y.display(l[i]))}}if(null!=_){const[,e=\"\",t]=_,o=n.get_column(t);if(null==o){r[i].textContent=`${t} unknown`;continue}const a=e.indexOf(\"hex\")>=0,c=e.indexOf(\"swatch\")>=0,d=w.isNumber(s)?o[s]:null;if(null==d){r[i].textContent=\"(null)\";continue}r[i].textContent=a?f.color2hex(d):f.color2css(d),c&&(l[i].style.backgroundColor=f.color2css(d),y.display(l[i]))}}else{const t=m.replace_placeholders(e.replace(\"$~\",\"$data_\"),n,s,this.model.formatters,o);if(w.isString(t))r[i].textContent=t;else for(const e of t)r[i].appendChild(e)}}return i}_render_tooltips(e,t,n){var s;const{tooltips:o}=this.model;if(w.isString(o)){const s=m.replace_placeholders({html:o},e,t,this.model.formatters,n);return y.div({},s)}if(w.isFunction(o))return o(e,n);if(null!=o){const i=null!==(s=this._template_el)&&void 0!==s?s:this._template_el=this._create_template(o);return this._render_template(i,o,e,t,n)}return null}}n.HoverToolView=H,H.__name__=\"HoverToolView\";class M extends r.InspectTool{constructor(e){super(e),this.tool_name=\"Hover\",this.icon=k.tool_icon_hover}static init_HoverTool(){this.prototype.default_view=H,this.define((({Any:e,Boolean:t,String:n,Array:s,Tuple:o,Dict:i,Or:r,Ref:a,Function:c,Auto:_,Nullable:p})=>({tooltips:[p(r(n,s(o(n,n)),c())),[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"screen (x, y)\",\"($sx, $sy)\"]]],formatters:[i(r(a(l.CustomJSHover),m.FormatterType)),{}],renderers:[r(s(a(d.DataRenderer)),_),\"auto\"],names:[s(n),[]],mode:[b.HoverMode,\"mouse\"],muted_policy:[b.MutedPolicy,\"show\"],point_policy:[b.PointPolicy,\"snap_to_data\"],line_policy:[b.LinePolicy,\"nearest\"],show_arrow:[t,!0],anchor:[b.Anchor,\"center\"],attachment:[b.TooltipAttachment,\"horizontal\"],callback:[p(e)]}))),this.register_alias(\"hover\",(()=>new M))}}n.HoverTool=M,M.__name__=\"HoverTool\",M.init_HoverTool()},\n", " function _(t,o,e,n,i){n();const s=t(15),l=t(53),c=t(238),r=t(247),a=t(245);class u extends l.Model{constructor(t){super(t)}static init_ToolProxy(){this.define((({Boolean:t,Array:o,Ref:e})=>({tools:[o(e(c.ButtonTool)),[]],active:[t,!1],disabled:[t,!1]})))}get button_view(){return this.tools[0].button_view}get event_type(){return this.tools[0].event_type}get tooltip(){return this.tools[0].tooltip}get tool_name(){return this.tools[0].tool_name}get icon(){return this.tools[0].computed_icon}get computed_icon(){return this.icon}get toggleable(){const t=this.tools[0];return t instanceof r.InspectTool&&t.toggleable}initialize(){super.initialize(),this.do=new s.Signal0(this,\"do\")}connect_signals(){super.connect_signals(),this.connect(this.do,(()=>this.doit())),this.connect(this.properties.active.change,(()=>this.set_active()));for(const t of this.tools)this.connect(t.properties.active.change,(()=>{this.active=t.active}))}doit(){for(const t of this.tools)t.do.emit()}set_active(){for(const t of this.tools)t.active=this.active}get menu(){const{menu:t}=this.tools[0];if(null==t)return null;const o=[];for(const[e,n]of a.enumerate(t))if(null==e)o.push(null);else{const t=()=>{var t,o;for(const e of this.tools)null===(o=null===(t=e.menu)||void 0===t?void 0:t[n])||void 0===o||o.handler()};o.push(Object.assign(Object.assign({},e),{handler:t}))}return o}}e.ToolProxy=u,u.__name__=\"ToolProxy\",u.init_ToolProxy()},\n", " function _(o,t,s,i,e){i();const n=o(20),r=o(9),l=o(13),c=o(248),h=o(235),a=o(392),_=o(319),p=o(221);class f extends c.ToolbarBase{constructor(o){super(o)}static init_ProxyToolbar(){this.define((({Array:o,Ref:t})=>({toolbars:[o(t(h.Toolbar)),[]]})))}initialize(){super.initialize(),this._merge_tools()}_merge_tools(){this._proxied_tools=[];const o={},t={},s={},i=[],e=[];for(const o of this.help)r.includes(e,o.redirect)||(i.push(o),e.push(o.redirect));this._proxied_tools.push(...i),this.help=i;for(const[o,t]of l.entries(this.gestures)){o in s||(s[o]={});for(const i of t.tools)i.type in s[o]||(s[o][i.type]=[]),s[o][i.type].push(i)}for(const t of this.inspectors)t.type in o||(o[t.type]=[]),o[t.type].push(t);for(const o of this.actions)o.type in t||(t[o.type]=[]),t[o.type].push(o);const n=(o,t=!1)=>{const s=new a.ToolProxy({tools:o,active:t});return this._proxied_tools.push(s),s};for(const o of l.keys(s)){const t=this.gestures[o];t.tools=[];for(const i of l.keys(s[o])){const e=s[o][i];if(e.length>0)if(\"multi\"==o)for(const o of e){const s=n([o]);t.tools.push(s),this.connect(s.properties.active.change,(()=>this._active_change(s)))}else{const o=n(e);t.tools.push(o),this.connect(o.properties.active.change,(()=>this._active_change(o)))}}}this.actions=[];for(const[o,s]of l.entries(t))if(\"CustomAction\"==o)for(const o of s)this.actions.push(n([o]));else s.length>0&&this.actions.push(n(s));this.inspectors=[];for(const t of l.values(o))t.length>0&&this.inspectors.push(n(t,!0));for(const[o,t]of l.entries(this.gestures))0!=t.tools.length&&(t.tools=r.sort_by(t.tools,(o=>o.default_order)),\"pinch\"!=o&&\"scroll\"!=o&&\"multi\"!=o&&(t.tools[0].active=!0))}}s.ProxyToolbar=f,f.__name__=\"ProxyToolbar\",f.init_ProxyToolbar();class u extends _.LayoutDOMView{initialize(){this.model.toolbar.toolbar_location=this.model.toolbar_location,super.initialize()}get child_models(){return[this.model.toolbar]}_update_layout(){this.layout=new p.ContentBox(this.child_views[0].el);const{toolbar:o}=this.model;o.horizontal?this.layout.set_sizing({width_policy:\"fit\",min_width:100,height_policy:\"fixed\"}):this.layout.set_sizing({width_policy:\"fixed\",height_policy:\"fit\",min_height:100})}}s.ToolbarBoxView=u,u.__name__=\"ToolbarBoxView\";class y extends _.LayoutDOM{constructor(o){super(o)}static init_ToolbarBox(){this.prototype.default_view=u,this.define((({Ref:o})=>({toolbar:[o(c.ToolbarBase)],toolbar_location:[n.Location,\"right\"]})))}}s.ToolbarBox=y,y.__name__=\"ToolbarBox\",y.init_ToolbarBox()},\n", - " function _(e,n,r,t,o){t();const s=e(1),u=e(7),c=e(53),l=s.__importStar(e(21)),a=e(8),i=e(13);r.resolve_defs=function(e){var n,r,t,o;function s(e){return null!=e.module?`${e.module}.${e.name}`:e.name}function d(e){if(a.isString(e))switch(e){case\"Any\":return l.Any;case\"Unknown\":return l.Unknown;case\"Boolean\":return l.Boolean;case\"Number\":return l.Number;case\"Int\":return l.Int;case\"String\":return l.String;case\"Null\":return l.Null}else switch(e[0]){case\"Nullable\":{const[,n]=e;return l.Nullable(d(n))}case\"Or\":{const[,...n]=e;return l.Or(...n.map(d))}case\"Tuple\":{const[,n,...r]=e;return l.Tuple(d(n),...r.map(d))}case\"Array\":{const[,n]=e;return l.Array(d(n))}case\"Struct\":{const[,...n]=e,r=n.map((([e,n])=>[e,d(n)]));return l.Struct(i.to_object(r))}case\"Dict\":{const[,n]=e;return l.Dict(d(n))}case\"Map\":{const[,n,r]=e;return l.Map(d(n),d(r))}case\"Enum\":{const[,...n]=e;return l.Enum(...n)}case\"Ref\":{const[,n]=e,r=u.Models.get(s(n));if(null!=r)return l.Ref(r);throw new Error(`${s(n)} wasn't defined before referencing it`)}case\"AnyRef\":return l.AnyRef()}}for(const l of e){const e=(()=>{if(null==l.extends)return c.Model;{const e=u.Models.get(s(l.extends));if(null!=e)return e;throw new Error(`base model ${s(l.extends)} of ${s(l)} is not defined`)}})(),a=((o=class extends e{}).__name__=l.name,o.__module__=l.module,o);for(const e of null!==(n=l.properties)&&void 0!==n?n:[]){const n=d(null!==(r=e.kind)&&void 0!==r?r:\"Unknown\");a.define({[e.name]:[n,e.default]})}for(const e of null!==(t=l.overrides)&&void 0!==t?t:[])a.override({[e.name]:e.default});u.Models.register_models([a])}}},\n", + " function _(e,n,r,t,o){t();const s=e(1),u=e(53),c=s.__importStar(e(21)),a=e(8),l=e(13);r.resolve_defs=function(e,n){var r,t,o,s;function i(e){return null!=e.module?`${e.module}.${e.name}`:e.name}function f(e){if(a.isString(e))switch(e){case\"Any\":return c.Any;case\"Unknown\":return c.Unknown;case\"Boolean\":return c.Boolean;case\"Number\":return c.Number;case\"Int\":return c.Int;case\"String\":return c.String;case\"Null\":return c.Null}else switch(e[0]){case\"Nullable\":{const[,n]=e;return c.Nullable(f(n))}case\"Or\":{const[,...n]=e;return c.Or(...n.map(f))}case\"Tuple\":{const[,n,...r]=e;return c.Tuple(f(n),...r.map(f))}case\"Array\":{const[,n]=e;return c.Array(f(n))}case\"Struct\":{const[,...n]=e,r=n.map((([e,n])=>[e,f(n)]));return c.Struct(l.to_object(r))}case\"Dict\":{const[,n]=e;return c.Dict(f(n))}case\"Map\":{const[,n,r]=e;return c.Map(f(n),f(r))}case\"Enum\":{const[,...n]=e;return c.Enum(...n)}case\"Ref\":{const[,r]=e,t=n.get(i(r));if(null!=t)return c.Ref(t);throw new Error(`${i(r)} wasn't defined before referencing it`)}case\"AnyRef\":return c.AnyRef()}}for(const c of e){const e=(()=>{if(null==c.extends)return u.Model;{const e=n.get(i(c.extends));if(null!=e)return e;throw new Error(`base model ${i(c.extends)} of ${i(c)} is not defined`)}})(),a=((s=class extends e{}).__name__=c.name,s.__module__=c.module,s);for(const e of null!==(r=c.properties)&&void 0!==r?r:[]){const n=f(null!==(t=e.kind)&&void 0!==t?t:\"Unknown\");a.define({[e.name]:[n,e.default]})}for(const e of null!==(o=c.overrides)&&void 0!==o?o:[])a.override({[e.name]:e.default});n.register(a)}}},\n", " function _(n,e,t,o,i){o();const d=n(5),c=n(240),s=n(122),a=n(43),l=n(396);t.index={},t.add_document_standalone=async function(n,e,o=[],i=!1){const u=new Map;async function f(i){let d;const f=n.roots().indexOf(i),r=o[f];null!=r?d=r:e.classList.contains(l.BOKEH_ROOT)?d=e:(d=a.div({class:l.BOKEH_ROOT}),e.appendChild(d));const w=await s.build_view(i,{parent:null});return w instanceof c.DOMView&&w.renderTo(d),u.set(i,w),t.index[i.id]=w,w}for(const e of n.roots())await f(e);return i&&(window.document.title=n.title()),n.on_change((n=>{n instanceof d.RootAddedEvent?f(n.model):n instanceof d.RootRemovedEvent?function(n){const e=u.get(n);null!=e&&(e.remove(),u.delete(n),delete t.index[n.id])}(n.model):i&&n instanceof d.TitleChangedEvent&&(window.document.title=n.title)})),[...u.values()]}},\n", " function _(o,e,n,t,r){t();const l=o(43),d=o(44);function u(o){let e=document.getElementById(o);if(null==e)throw new Error(`Error rendering Bokeh model: could not find #${o} HTML tag`);if(!document.body.contains(e))throw new Error(`Error rendering Bokeh model: element #${o} must be under `);if(\"SCRIPT\"==e.tagName){const o=l.div({class:n.BOKEH_ROOT});l.replaceWith(e,o),e=o}return e}n.BOKEH_ROOT=d.root,n._resolve_element=function(o){const{elementid:e}=o;return null!=e?u(e):document.body},n._resolve_root_elements=function(o){const e=[];if(null!=o.root_ids&&null!=o.roots)for(const n of o.root_ids)e.push(u(o.roots[n]));return e}},\n", " function _(n,o,t,s,e){s();const c=n(398),r=n(19),a=n(395);t._get_ws_url=function(n,o){let t,s=\"ws:\";return\"https:\"==window.location.protocol&&(s=\"wss:\"),null!=o?(t=document.createElement(\"a\"),t.href=o):t=window.location,null!=n?\"/\"==n&&(n=\"\"):n=t.pathname.replace(/\\/+$/,\"\"),s+\"//\"+t.host+n+\"/ws\"};const i={};t.add_document_from_session=async function(n,o,t,s=[],e=!1){const l=window.location.search.substr(1);let d;try{d=await function(n,o,t){const s=c.parse_token(o).session_id;n in i||(i[n]={});const e=i[n];return s in e||(e[s]=c.pull_session(n,o,t)),e[s]}(n,o,l)}catch(n){const t=c.parse_token(o).session_id;throw r.logger.error(`Failed to load Bokeh session ${t}: ${n}`),n}return a.add_document_standalone(d.document,t,s,e)}},\n", @@ -1344,7 +1340,7 @@ " * THE POSSIBILITY OF SUCH DAMAGE.\n", " */\n", " (function(root, factory) {\n", - " factory(root[\"Bokeh\"], \"2.3.0\");\n", + " factory(root[\"Bokeh\"], \"2.3.1\");\n", " })(this, function(Bokeh, version) {\n", " var define;\n", " return (function(modules, entry, aliases, externals) {\n", @@ -1372,7 +1368,7 @@ " 430: function _(t,e,n,s,i){s();const o=t(1),r=t(420),u=t(20),a=t(43),_=o.__importStar(t(328)),l=_;class c extends r.ControlView{*controls(){yield*this._buttons}connect_signals(){super.connect_signals();const t=this.model.properties;this.on_change(t.button_type,(()=>this.render())),this.on_change(t.labels,(()=>this.render())),this.on_change(t.active,(()=>this._update_active()))}styles(){return[...super.styles(),_.default]}render(){super.render(),this._buttons=this.model.labels.map(((t,e)=>{const n=a.div({class:[l.btn,l[`btn_${this.model.button_type}`]],disabled:this.model.disabled},t);return n.addEventListener(\"click\",(()=>this.change_active(e))),n})),this._update_active();const t=a.div({class:l.btn_group},this._buttons);this.el.appendChild(t)}}n.ButtonGroupView=c,c.__name__=\"ButtonGroupView\";class d extends r.Control{constructor(t){super(t)}static init_ButtonGroup(){this.define((({String:t,Array:e})=>({labels:[e(t),[]],button_type:[u.ButtonType,\"default\"]})))}}n.ButtonGroup=d,d.__name__=\"ButtonGroup\",d.init_ButtonGroup()},\n", " 431: function _(e,t,i,n,s){n();const o=e(1),c=e(432),a=e(43),l=e(9),d=o.__importStar(e(427));class h extends c.InputGroupView{render(){super.render();const e=a.div({class:[d.input_group,this.model.inline?d.inline:null]});this.el.appendChild(e);const{active:t,labels:i}=this.model;this._inputs=[];for(let n=0;nthis.change_active(n))),this._inputs.push(s),this.model.disabled&&(s.disabled=!0),l.includes(t,n)&&(s.checked=!0);const o=a.label({},s,a.span({},i[n]));e.appendChild(o)}}change_active(e){const t=new Set(this.model.active);t.has(e)?t.delete(e):t.add(e),this.model.active=[...t].sort()}}i.CheckboxGroupView=h,h.__name__=\"CheckboxGroupView\";class p extends c.InputGroup{constructor(e){super(e)}static init_CheckboxGroup(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t,String:i,Array:n})=>({active:[n(t),[]],labels:[n(i),[]],inline:[e,!1]})))}}i.CheckboxGroup=p,p.__name__=\"CheckboxGroup\",p.init_CheckboxGroup()},\n", " 432: function _(n,t,e,s,o){s();const r=n(1),u=n(420),c=r.__importDefault(n(427));class _ extends u.ControlView{*controls(){yield*this._inputs}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}styles(){return[...super.styles(),c.default]}}e.InputGroupView=_,_.__name__=\"InputGroupView\";class i extends u.Control{constructor(n){super(n)}}e.InputGroup=i,i.__name__=\"InputGroup\"},\n", - " 433: function _(e,i,t,n,o){n();const s=e(1),l=e(426),r=e(43),c=e(22),a=s.__importStar(e(427));class d extends l.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>{var e;return this.input_el.name=null!==(e=this.model.name)&&void 0!==e?e:\"\"})),this.connect(this.model.properties.color.change,(()=>this.input_el.value=c.color2css(this.model.color))),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled))}render(){super.render(),this.input_el=r.input({type:\"color\",class:a.input,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){this.model.color=this.input_el.value,super.change_input()}}t.ColorPickerView=d,d.__name__=\"ColorPickerView\";class h extends l.InputWidget{constructor(e){super(e)}static init_ColorPicker(){this.prototype.default_view=d,this.define((({Color:e})=>({color:[e,\"#000000\"]})))}}t.ColorPicker=h,h.__name__=\"ColorPicker\",h.init_ColorPicker()},\n", + " 433: function _(e,i,t,n,o){n();const s=e(1),l=e(426),r=e(43),c=e(22),a=s.__importStar(e(427));class d extends l.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>{var e;return this.input_el.name=null!==(e=this.model.name)&&void 0!==e?e:\"\"})),this.connect(this.model.properties.color.change,(()=>this.input_el.value=c.color2hexrgb(this.model.color))),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled))}render(){super.render(),this.input_el=r.input({type:\"color\",class:a.input,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){this.model.color=this.input_el.value,super.change_input()}}t.ColorPickerView=d,d.__name__=\"ColorPickerView\";class h extends l.InputWidget{constructor(e){super(e)}static init_ColorPicker(){this.prototype.default_view=d,this.define((({Color:e})=>({color:[e,\"#000000\"]})))}}t.ColorPicker=h,h.__name__=\"ColorPicker\",h.init_ColorPicker()},\n", " 434: function _(e,t,i,n,s){n();const a=e(1),l=a.__importDefault(e(435)),o=e(426),d=e(43),r=e(20),c=e(8),h=a.__importStar(e(427)),u=a.__importDefault(e(436));function _(e){const t=[];for(const i of e)if(c.isString(i))t.push(i);else{const[e,n]=i;t.push({from:e,to:n})}return t}class p extends o.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:i,disabled_dates:n,enabled_dates:s,position:a,inline:l}=this.model.properties;this.connect(e.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.setDate(this.model.value)})),this.connect(t.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"minDate\",this.model.min_date)})),this.connect(i.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"maxDate\",this.model.max_date)})),this.connect(n.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"disable\",this.model.disabled_dates)})),this.connect(s.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"enable\",this.model.enabled_dates)})),this.connect(a.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"position\",this.model.position)})),this.connect(l.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"inline\",this.model.inline)}))}remove(){var e;null===(e=this._picker)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),u.default]}render(){var e,t;null==this._picker&&(super.render(),this.input_el=d.input({type:\"text\",class:h.input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=l.default(this.input_el,{defaultDate:this.model.value,minDate:null!==(e=this.model.min_date)&&void 0!==e?e:void 0,maxDate:null!==(t=this.model.max_date)&&void 0!==t?t:void 0,inline:this.model.inline,position:this.model.position,disable:_(this.model.disabled_dates),enable:_(this.model.enabled_dates),onChange:(e,t,i)=>this._on_change(e,t,i)}))}_on_change(e,t,i){this.model.value=t,this.change_input()}}i.DatePickerView=p,p.__name__=\"DatePickerView\";class m extends o.InputWidget{constructor(e){super(e)}static init_DatePicker(){this.prototype.default_view=p,this.define((({Boolean:e,String:t,Array:i,Tuple:n,Or:s,Nullable:a})=>{const l=i(s(t,n(t,t)));return{value:[t],min_date:[a(t),null],max_date:[a(t),null],disabled_dates:[l,[]],enabled_dates:[l,[]],position:[r.CalendarPosition,\"auto\"],inline:[e,!1]}}))}}i.DatePicker=m,m.__name__=\"DatePicker\",m.init_DatePicker()},\n", " 435: function _(e,n,t,a,i){\n", " /* flatpickr v4.6.6, @license MIT */var o,r;o=this,r=function(){\"use strict\";\n", @@ -1403,7 +1399,7 @@ " 444: function _(t,e,s,i,a){i();const n=t(1),l=t(224),r=t(43),c=t(488),u=n.__importStar(t(445));class _ extends c.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>{this.layout.invalidate_cache(),this.render(),this.root.compute_layout()}))}styles(){return[...super.styles(),u.default]}_update_layout(){this.layout=new l.CachedVariadicBox(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render();const t=Object.assign(Object.assign({},this.model.style),{display:\"inline-block\"});this.markup_el=r.div({class:u.clearfix,style:t}),this.el.appendChild(this.markup_el)}}s.MarkupView=_,_.__name__=\"MarkupView\";class o extends c.Widget{constructor(t){super(t)}static init_Markup(){this.define((({String:t,Dict:e})=>({text:[t,\"\"],style:[e(t),{}]})))}}s.Markup=o,o.__name__=\"Markup\",o.init_Markup()},\n", " 445: function _(o,r,e,t,a){t(),e.root=\"bk-root\",e.clearfix=\"bk-clearfix\",e.default='.bk-root .bk-clearfix:before,.bk-root .bk-clearfix:after{content:\"\";display:table;}.bk-root .bk-clearfix:after{clear:both;}'},\n", " 446: function _(e,t,i,n,s){n();const o=e(1),r=e(419),l=e(264),d=e(43),_=e(8),u=o.__importStar(e(328)),c=o.__importStar(e(243)),h=c;class p extends r.AbstractButtonView{constructor(){super(...arguments),this._open=!1}styles(){return[...super.styles(),c.default]}render(){super.render();const e=d.div({class:[h.caret,h.down]});if(this.model.is_split){const t=this._render_button(e);t.classList.add(u.dropdown_toggle),t.addEventListener(\"click\",(()=>this._toggle_menu())),this.group_el.appendChild(t)}else this.button_el.appendChild(e);const t=this.model.menu.map(((e,t)=>{if(null==e)return d.div({class:h.divider});{const i=_.isString(e)?e:e[0],n=d.div({},i);return n.addEventListener(\"click\",(()=>this._item_click(t))),n}}));this.menu=d.div({class:[h.menu,h.below]},t),this.el.appendChild(this.menu),d.undisplay(this.menu)}_show_menu(){if(!this._open){this._open=!0,d.display(this.menu);const e=t=>{const{target:i}=t;i instanceof HTMLElement&&!this.el.contains(i)&&(document.removeEventListener(\"click\",e),this._hide_menu())};document.addEventListener(\"click\",e)}}_hide_menu(){this._open&&(this._open=!1,d.undisplay(this.menu))}_toggle_menu(){this._open?this._hide_menu():this._show_menu()}click(){this.model.is_split?(this._hide_menu(),this.model.trigger_event(new l.ButtonClick),super.click()):this._toggle_menu()}_item_click(e){this._hide_menu();const t=this.model.menu[e];if(null!=t){const i=_.isString(t)?t:t[1];_.isString(i)?this.model.trigger_event(new l.MenuItemClick(i)):i.execute(this.model,{index:e})}}}i.DropdownView=p,p.__name__=\"DropdownView\";class m extends r.AbstractButton{constructor(e){super(e)}static init_Dropdown(){this.prototype.default_view=p,this.define((({Null:e,Boolean:t,String:i,Array:n,Tuple:s,Or:o})=>({split:[t,!1],menu:[n(o(i,s(i,o(i)),e)),[]]}))),this.override({label:\"Dropdown\"})}get is_split(){return this.split}}i.Dropdown=m,m.__name__=\"Dropdown\",m.init_Dropdown()},\n", - " 447: function _(e,i,t,l,s){l();const n=e(488);class a extends n.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.properties.width.change,(()=>this.render()))}render(){null==this.dialogEl&&(this.dialogEl=document.createElement(\"input\"),this.dialogEl.type=\"file\",this.dialogEl.multiple=this.model.multiple,this.dialogEl.onchange=()=>{const{files:e}=this.dialogEl;null!=e&&this.load_files(e)},this.el.appendChild(this.dialogEl)),null!=this.model.accept&&\"\"!=this.model.accept&&(this.dialogEl.accept=this.model.accept),this.dialogEl.style.width=\"{this.model.width}px\",this.dialogEl.disabled=this.model.disabled}async load_files(e){const i=[],t=[],l=[];let s;for(s=0;s{const l=new FileReader;l.onload=()=>{var s;const{result:n}=l;null!=n?i(n):t(null!==(s=l.error)&&void 0!==s?s:new Error(`unable to read '${e.name}'`))},l.readAsDataURL(e)}))}}t.FileInputView=a,a.__name__=\"FileInputView\";class o extends n.Widget{constructor(e){super(e)}static init_FileInput(){this.prototype.default_view=a,this.define((({Boolean:e,String:i,Array:t,Or:l})=>({value:[l(i,t(i)),\"\"],mime_type:[l(i,t(i)),\"\"],filename:[l(i,t(i)),\"\"],accept:[i,\"\"],multiple:[e,!1]})))}}t.FileInput=o,o.__name__=\"FileInput\",o.init_FileInput()},\n", + " 447: function _(e,i,l,t,s){t();const n=e(43),a=e(488);class o extends a.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}render(){const{multiple:e,accept:i,disabled:l,width:t}=this.model;null==this.dialog_el&&(this.dialog_el=n.input({type:\"file\",multiple:e}),this.dialog_el.onchange=()=>{const{files:e}=this.dialog_el;null!=e&&this.load_files(e)},this.el.appendChild(this.dialog_el)),null!=i&&\"\"!=i&&(this.dialog_el.accept=i),this.dialog_el.style.width=`${t}px`,this.dialog_el.disabled=l}async load_files(e){const i=[],l=[],t=[];for(const s of e){const e=await this._read_file(s),[,n=\"\",,a=\"\"]=e.split(/[:;,]/,4);i.push(a),l.push(s.name),t.push(n)}this.model.multiple?(this.model.value=i,this.model.filename=l,this.model.mime_type=t):(this.model.value=i[0],this.model.filename=l[0],this.model.mime_type=t[0])}_read_file(e){return new Promise(((i,l)=>{const t=new FileReader;t.onload=()=>{var s;const{result:n}=t;null!=n?i(n):l(null!==(s=t.error)&&void 0!==s?s:new Error(`unable to read '${e.name}'`))},t.readAsDataURL(e)}))}}l.FileInputView=o,o.__name__=\"FileInputView\";class d extends a.Widget{constructor(e){super(e)}static init_FileInput(){this.prototype.default_view=o,this.define((({Boolean:e,String:i,Array:l,Or:t})=>({value:[t(i,l(i)),\"\"],mime_type:[t(i,l(i)),\"\"],filename:[t(i,l(i)),\"\"],accept:[i,\"\"],multiple:[e,!1]})))}}l.FileInput=d,d.__name__=\"FileInput\",d.init_FileInput()},\n", " 448: function _(e,t,i,s,n){s();const l=e(1),o=e(43),r=e(8),c=e(426),h=l.__importStar(e(427));class p extends c.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,(()=>this.render_selection())),this.connect(this.model.properties.options.change,(()=>this.render())),this.connect(this.model.properties.name.change,(()=>this.render())),this.connect(this.model.properties.title.change,(()=>this.render())),this.connect(this.model.properties.size.change,(()=>this.render())),this.connect(this.model.properties.disabled.change,(()=>this.render()))}render(){super.render();const e=this.model.options.map((e=>{let t,i;return r.isString(e)?t=i=e:[t,i]=e,o.option({value:t},i)}));this.input_el=o.select({multiple:!0,class:h.input,name:this.model.name,disabled:this.model.disabled},e),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el),this.render_selection()}render_selection(){const e=new Set(this.model.value);for(const t of this.el.querySelectorAll(\"option\"))t.selected=e.has(t.value);this.input_el.size=this.model.size}change_input(){const e=null!=this.el.querySelector(\"select:focus\"),t=[];for(const e of this.el.querySelectorAll(\"option\"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.input_el.focus()}}i.MultiSelectView=p,p.__name__=\"MultiSelectView\";class u extends c.InputWidget{constructor(e){super(e)}static init_MultiSelect(){this.prototype.default_view=p,this.define((({Int:e,String:t,Array:i,Tuple:s,Or:n})=>({value:[i(t),[]],options:[i(n(t,s(t,t))),[]],size:[e,4]})))}}i.MultiSelect=u,u.__name__=\"MultiSelect\",u.init_MultiSelect()},\n", " 449: function _(a,r,e,t,p){t();const s=a(444),i=a(43);class n extends s.MarkupView{render(){super.render();const a=i.p({style:{margin:0}},this.model.text);this.markup_el.appendChild(a)}}e.ParagraphView=n,n.__name__=\"ParagraphView\";class _ extends s.Markup{constructor(a){super(a)}static init_Paragraph(){this.prototype.default_view=n}}e.Paragraph=_,_.__name__=\"Paragraph\",_.init_Paragraph()},\n", " 450: function _(s,t,e,n,r){n();const p=s(424);class u extends p.TextInputView{render(){super.render(),this.input_el.type=\"password\"}}e.PasswordInputView=u,u.__name__=\"PasswordInputView\";class a extends p.TextInput{constructor(s){super(s)}static init_PasswordInput(){this.prototype.default_view=u}}e.PasswordInput=a,a.__name__=\"PasswordInput\",a.init_PasswordInput()},\n", @@ -1469,7 +1465,7 @@ " * THE POSSIBILITY OF SUCH DAMAGE.\n", " */\n", " (function(root, factory) {\n", - " factory(root[\"Bokeh\"], \"2.3.0\");\n", + " factory(root[\"Bokeh\"], \"2.3.1\");\n", " })(this, function(Bokeh, version) {\n", " var define;\n", " return (function(modules, entry, aliases, externals) {\n", @@ -1623,15 +1619,32 @@ " }\n", " })\n", " ({\n", - " \"4e90918c0a\": function _(e,s,t,o,i){o();const n=e(\"tslib\").__importStar(e(\"480618c798\"));t.Panel=n;e(\"@bokehjs/base\").register_models(n)},\n", - " \"480618c798\": function _(e,a,t,o,c){o();const d=e(\"tslib\");c(\"AcePlot\",e(\"c2edc6955b\").AcePlot),c(\"Audio\",e(\"339f84d639\").Audio),c(\"Card\",e(\"b85e13a3ba\").Card),c(\"CommManager\",e(\"e552778259\").CommManager),c(\"DataTabulator\",e(\"99baa24a1a\").DataTabulator),c(\"DeckGLPlot\",e(\"df2378664f\").DeckGLPlot),c(\"ECharts\",e(\"9d046c4720\").ECharts),c(\"HTML\",e(\"ed08037ce5\").HTML),c(\"IDOM\",e(\"7d45bd3bc4\").IDOM),c(\"IPyWidget\",e(\"0eae77d68f\").IPyWidget),c(\"JSON\",e(\"5284fdbb37\").JSON),c(\"FileDownload\",e(\"1767172ffa\").FileDownload),c(\"KaTeX\",e(\"7b859fb3cf\").KaTeX),c(\"Location\",e(\"642aa56b24\").Location),c(\"MathJax\",e(\"0c21036737\").MathJax),c(\"Perspective\",e(\"545156b57b\").Perspective),c(\"Player\",e(\"ed9bae6d87\").Player),c(\"PlotlyPlot\",e(\"47b5ae5c43\").PlotlyPlot),c(\"Progress\",e(\"9f787650b9\").Progress),c(\"SingleSelect\",e(\"3b85956787\").SingleSelect),c(\"SpeechToText\",e(\"aaa48703af\").SpeechToText),c(\"State\",e(\"bfa46a5f19\").State),c(\"TextToSpeech\",e(\"33cd2c254e\").TextToSpeech),c(\"TrendIndicator\",e(\"2efaffc12a\").TrendIndicator),c(\"VegaPlot\",e(\"4feb5fa522\").VegaPlot),c(\"Video\",e(\"ffe54b53c3\").Video),c(\"VideoStream\",e(\"9ff7f7b5e9\").VideoStream),d.__exportStar(e(\"c51f25e2a7\"),t)},\n", - " \"c2edc6955b\": function _(e,t,i,o,s){o();const n=e(\"@bokehjs/models/layouts/html_box\"),a=e(\"@bokehjs/core/dom\"),d=e(\"7116a7a602\");class h extends d.PanelHTMLBoxView{initialize(){super.initialize(),this._ace=window.ace,this._container=a.div({id:\"_\"+Math.random().toString(36).substr(2,9),style:{width:\"100%\",height:\"100%\"}})}connect_signals(){super.connect_signals(),this.connect(this.model.properties.code.change,(()=>this._update_code_from_model())),this.connect(this.model.properties.theme.change,(()=>this._update_theme())),this.connect(this.model.properties.language.change,(()=>this._update_language())),this.connect(this.model.properties.filename.change,(()=>this._update_filename())),this.connect(this.model.properties.print_margin.change,(()=>this._update_print_margin())),this.connect(this.model.properties.annotations.change,(()=>this._add_annotations())),this.connect(this.model.properties.readonly.change,(()=>{this._editor.setReadOnly(this.model.readonly)}))}render(){super.render(),this._container!==this.el.childNodes[0]&&this.el.appendChild(this._container),this._container.textContent=this.model.code,this._editor=this._ace.edit(this._container.id),this._langTools=this._ace.require(\"ace/ext/language_tools\"),this._modelist=this._ace.require(\"ace/ext/modelist\"),this._editor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,fontFamily:\"monospace\"}),this._update_theme(),this._update_filename(),this._update_language(),this._editor.setReadOnly(this.model.readonly),this._editor.setShowPrintMargin(this.model.print_margin),this._editor.on(\"change\",(()=>this._update_code_from_editor()))}_update_code_from_model(){this._editor&&this._editor.getValue()!=this.model.code&&this._editor.setValue(this.model.code)}_update_print_margin(){this._editor.setShowPrintMargin(this.model.print_margin)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_theme(){this._editor.setTheme(`ace/theme/${this.model.theme}`)}_update_filename(){if(this.model.filename){const e=this._modelist.getModeForPath(this.model.filename).mode;this.model.language=e.slice(9)}}_update_language(){null!=this.model.language&&this._editor.session.setMode(`ace/mode/${this.model.language}`)}_add_annotations(){this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),this._editor.resize()}}i.AcePlotView=h,h.__name__=\"AcePlotView\";class _ extends n.HTMLBox{constructor(e){super(e)}static init_AcePlot(){this.prototype.default_view=h,this.define((({Any:e,Array:t,Boolean:i,String:o})=>({code:[o,\"\"],filename:[o],language:[o],theme:[o,\"chrome\"],annotations:[t(e),[]],readonly:[i,!1],print_margin:[i,!1]}))),this.override({height:300,width:300})}}i.AcePlot=_,_.__name__=\"AcePlot\",_.__module__=\"panel.models.ace\",_.init_AcePlot()},\n", + " \"4e90918c0a\": function _(e,s,t,o,b){o();const i=e(\"tslib\").__importStar(e(\"b51d785f31\"));t.Panel=i;e(\"@bokehjs/base\").register_models(i)},\n", + " \"b51d785f31\": function _(e,a,t,o,c){o();const f=e(\"tslib\");c(\"AcePlot\",e(\"be520eff91\").AcePlot),c(\"Audio\",e(\"339f84d639\").Audio),c(\"Card\",e(\"b85e13a3ba\").Card),c(\"CommManager\",e(\"e552778259\").CommManager),c(\"DataTabulator\",e(\"4fa5b314a9\").DataTabulator),c(\"DatetimePicker\",e(\"6e11b2cfe2\").DatetimePicker),c(\"DeckGLPlot\",e(\"df2378664f\").DeckGLPlot),c(\"ECharts\",e(\"9d046c4720\").ECharts),c(\"HTML\",e(\"ed08037ce5\").HTML),c(\"IDOM\",e(\"7d45bd3bc4\").IDOM),c(\"IPyWidget\",e(\"0eae77d68f\").IPyWidget),c(\"JSON\",e(\"0d30bea0c8\").JSON),c(\"FileDownload\",e(\"1767172ffa\").FileDownload),c(\"KaTeX\",e(\"7b859fb3cf\").KaTeX),c(\"Location\",e(\"642aa56b24\").Location),c(\"MathJax\",e(\"0c21036737\").MathJax),c(\"Perspective\",e(\"84a772681d\").Perspective),c(\"Player\",e(\"bacb3ef65c\").Player),c(\"PlotlyPlot\",e(\"47b5ae5c43\").PlotlyPlot),c(\"Progress\",e(\"9f787650b9\").Progress),c(\"SingleSelect\",e(\"3b85956787\").SingleSelect),c(\"SpeechToText\",e(\"aaa48703af\").SpeechToText),c(\"State\",e(\"bfa46a5f19\").State),c(\"TextToSpeech\",e(\"33cd2c254e\").TextToSpeech),c(\"TrendIndicator\",e(\"2efaffc12a\").TrendIndicator),c(\"VegaPlot\",e(\"4feb5fa522\").VegaPlot),c(\"Video\",e(\"ffe54b53c3\").Video),c(\"VideoStream\",e(\"9ff7f7b5e9\").VideoStream),f.__exportStar(e(\"c51f25e2a7\"),t)},\n", + " \"be520eff91\": function _(e,t,i,o,s){o();const n=e(\"@bokehjs/models/layouts/html_box\"),a=e(\"@bokehjs/core/dom\"),d=e(\"7116a7a602\");class h extends d.PanelHTMLBoxView{initialize(){super.initialize(),this._ace=window.ace,this._container=a.div({id:\"_\"+Math.random().toString(36).substr(2,9),style:{width:\"100%\",height:\"100%\",zIndex:0}})}connect_signals(){super.connect_signals(),this.connect(this.model.properties.code.change,(()=>this._update_code_from_model())),this.connect(this.model.properties.theme.change,(()=>this._update_theme())),this.connect(this.model.properties.language.change,(()=>this._update_language())),this.connect(this.model.properties.filename.change,(()=>this._update_filename())),this.connect(this.model.properties.print_margin.change,(()=>this._update_print_margin())),this.connect(this.model.properties.annotations.change,(()=>this._add_annotations())),this.connect(this.model.properties.readonly.change,(()=>{this._editor.setReadOnly(this.model.readonly)}))}render(){super.render(),this._container!==this.el.childNodes[0]&&this.el.appendChild(this._container),this._container.textContent=this.model.code,this._editor=this._ace.edit(this._container.id),this._langTools=this._ace.require(\"ace/ext/language_tools\"),this._modelist=this._ace.require(\"ace/ext/modelist\"),this._editor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,fontFamily:\"monospace\"}),this._update_theme(),this._update_filename(),this._update_language(),this._editor.setReadOnly(this.model.readonly),this._editor.setShowPrintMargin(this.model.print_margin),this._editor.on(\"change\",(()=>this._update_code_from_editor()))}_update_code_from_model(){this._editor&&this._editor.getValue()!=this.model.code&&this._editor.setValue(this.model.code)}_update_print_margin(){this._editor.setShowPrintMargin(this.model.print_margin)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_theme(){this._editor.setTheme(`ace/theme/${this.model.theme}`)}_update_filename(){if(this.model.filename){const e=this._modelist.getModeForPath(this.model.filename).mode;this.model.language=e.slice(9)}}_update_language(){null!=this.model.language&&this._editor.session.setMode(`ace/mode/${this.model.language}`)}_add_annotations(){this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),this._editor.resize()}}i.AcePlotView=h,h.__name__=\"AcePlotView\";class _ extends n.HTMLBox{constructor(e){super(e)}static init_AcePlot(){this.prototype.default_view=h,this.define((({Any:e,Array:t,Boolean:i,String:o})=>({code:[o,\"\"],filename:[o],language:[o],theme:[o,\"chrome\"],annotations:[t(e),[]],readonly:[i,!1],print_margin:[i,!1]}))),this.override({height:300,width:300})}}i.AcePlot=_,_.__name__=\"AcePlot\",_.__module__=\"panel.models.ace\",_.init_AcePlot()},\n", " \"7116a7a602\": function _(e,i,t,s,h){s();const o=e(\"@bokehjs/core/layout/html\"),n=e(\"@bokehjs/core/layout/types\"),_=e(\"@bokehjs/core/dom\"),a=e(\"@bokehjs/models/widgets/markup\"),d=e(\"@bokehjs/models/layouts/html_box\");function l(e,i){let t=null!=i.width?\"fixed\":\"fit\",s=null!=i.height?\"fixed\":\"fit\";const{sizing_mode:h}=i;if(null!=h)if(\"fixed\"==h)t=s=\"fixed\";else if(\"stretch_both\"==h)t=s=\"max\";else if(\"stretch_width\"==h)t=\"max\";else if(\"stretch_height\"==h)s=\"max\";else switch(h){case\"scale_width\":t=\"max\",s=\"min\";break;case\"scale_height\":t=\"min\",s=\"max\";break;case\"scale_both\":t=\"max\",s=\"max\";break;default:throw new Error(\"unreachable\")}\"fixed\"==t&&i.width?e.style.width=i.width+\"px\":\"max\"==t&&(e.style.width=\"100%\"),\"fixed\"==s&&i.height?e.style.height=i.height+\"px\":\"max\"==s&&(e.style.height=\"100%\")}t.set_size=l;class c extends o.VariadicBox{constructor(e,i,t){super(e),this.el=e,this.sizing_mode=i,this.changed=t,this._cache=new Map,this._cache_count=new Map}_measure(e){const i=[e.width,e.height,this.sizing_mode].toString(),t=this.changed&&\"fixed\"!=this.sizing_mode&&null!=this.sizing_mode?1:0,s=this._cache.get(i),h=this._cache_count.get(i);if(null!=s&&null!=h&&h>=t)return this._cache_count.set(i,h+1),s;const o=new n.Sizeable(e).bounded_to(this.sizing.size),a=_.sized(this.el,o,(()=>{const e=new n.Sizeable(_.content_size(this.el)),{border:i,padding:t}=_.extents(this.el);return e.grow_by(i).grow_by(t).map(Math.ceil)}));return this._cache.set(i,a),this._cache_count.set(i,0),a}invalidate_cache(){}}t.CachedVariadicBox=c,c.__name__=\"CachedVariadicBox\";class r extends a.MarkupView{_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new c(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),l(this.markup_el,this.model)}}t.PanelMarkupView=r,r.__name__=\"PanelMarkupView\";class m extends d.HTMLBoxView{_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new c(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),l(this.el,this.model)}}t.PanelHTMLBoxView=m,m.__name__=\"PanelHTMLBoxView\"},\n", " \"339f84d639\": function _(e,t,i,o,s){o();const l=e(\"@bokehjs/models/layouts/html_box\"),d=e(\"7116a7a602\");class u extends d.PanelHTMLBoxView{initialize(){super.initialize(),this._blocked=!1,this._setting=!1,this._time=Date.now()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.loop.change,(()=>this.set_loop())),this.connect(this.model.properties.paused.change,(()=>this.set_paused())),this.connect(this.model.properties.time.change,(()=>this.set_time())),this.connect(this.model.properties.value.change,(()=>this.set_value())),this.connect(this.model.properties.volume.change,(()=>this.set_volume()))}render(){super.render(),this.audioEl=document.createElement(\"audio\"),this.audioEl.controls=!0,this.audioEl.src=this.model.value,this.audioEl.currentTime=this.model.time,this.audioEl.loop=this.model.loop,null!=this.model.volume?this.audioEl.volume=this.model.volume/100:this.model.volume=100*this.audioEl.volume,this.audioEl.onpause=()=>this.model.paused=!0,this.audioEl.onplay=()=>this.model.paused=!1,this.audioEl.ontimeupdate=()=>this.update_time(this),this.audioEl.onvolumechange=()=>this.update_volume(this),this.el.appendChild(this.audioEl),this.model.paused||this.audioEl.play()}update_time(e){e._setting?e._setting=!1:Date.now()-e._time({loop:[t,!1],paused:[t,!0],time:[o,0],throttle:[o,250],value:[e,\"\"],volume:[i]})))}}i.Audio=h,h.__name__=\"Audio\",h.__module__=\"panel.models.widgets\",h.init_Audio()},\n", " \"b85e13a3ba\": function _(e,s,l,t,o){t();const a=e(\"tslib\"),i=e(\"@bokehjs/models/layouts/column\"),c=a.__importStar(e(\"@bokehjs/core/dom\")),n=e(\"@bokehjs/core/dom\"),d=e(\"@bokehjs/core/layout/grid\"),r=e(\"@bokehjs/core/util/color\");class h extends i.ColumnView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.collapsed.change,(()=>this._collapse()));const{active_header_background:e,header_background:s,header_color:l}=this.model.properties;this.on_change([e,s,l],(()=>this.render()))}_update_layout(){const e=(this.model.collapsed?this.child_views.slice(0,1):this.child_views).map((e=>e.layout));this.layout=new d.Column(e),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}render(){n.empty(this.el);const{background:e,button_css_classes:s,header_color:l,header_tag:t,header_css_classes:o}=this.model;this.el.style.backgroundColor=null!=e?r.color2css(e):\"\",n.classes(this.el).clear().add(...this.css_classes());let a=this.model.header_background;!this.model.collapsed&&this.model.active_header_background&&(a=this.model.active_header_background);const i=this.child_views[0];let d;if(this.model.collapsible){this.button_el=c.createElement(\"button\",{type:\"button\",class:o}),this.button_el.style.backgroundColor=null!=a?a:\"\",i.el.style.backgroundColor=null!=a?a:\"\",this.button_el.appendChild(i.el);const e=c.createElement(\"p\",{class:s});e.innerHTML=this.model.collapsed?\"+\":\"−\",this.button_el.appendChild(e),this.button_el.onclick=()=>this._toggle_button(),d=this.button_el}else d=c.createElement(t,{class:o}),d.style.backgroundColor=null!=a?a:\"\",d.appendChild(i.el);d.style.color=null!=l?l:\"\",this.el.appendChild(d),i.render();for(const e of this.child_views.slice(1))this.model.collapsed||this.el.appendChild(e.el),e.render()}_toggle_button(){this.model.collapsed=!this.model.collapsed}_collapse(){this.invalidate_render()}_createElement(){return c.createElement(this.model.tag,{class:this.css_classes()})}}l.CardView=h,h.__name__=\"CardView\";class _ extends i.Column{constructor(e){super(e)}static init_Card(){this.prototype.default_view=h,this.define((({Array:e,Boolean:s,Nullable:l,String:t})=>({active_header_background:[l(t),null],button_css_classes:[e(t),[]],collapsed:[s,!0],collapsible:[s,!0],header_background:[l(t),null],header_color:[l(t),null],header_css_classes:[e(t),[]],header_tag:[t,\"div\"],tag:[t,\"div\"]})))}}l.Card=_,_.__name__=\"Card\",_.__module__=\"panel.models.layout\",_.init_Card()},\n", " \"e552778259\": function _(e,t,n,o,i){o();const s=e(\"@bokehjs/document\"),c=e(\"@bokehjs/core/view\"),_=e(\"@bokehjs/model\"),l=e(\"@bokehjs/protocol/message\"),a=e(\"@bokehjs/protocol/receiver\");class h extends c.View{renderTo(){}}n.CommManagerView=h,h.__name__=\"CommManagerView\";class m extends _.Model{constructor(e){super(e),this._document_listener=e=>this._document_changed(e),this._receiver=new a.Receiver,this._event_buffer=[],this._blocked=!1,this._timeout=Date.now(),null!=window.PyViz&&window.PyViz.comm_manager?(this.ns=window.PyViz,this.ns.comm_manager.register_target(this.plot_id,this.comm_id,(e=>this.msg_handler(e))),this._client_comm=this.ns.comm_manager.get_client_comm(this.plot_id,this.client_comm_id,(e=>this.on_ack(e)))):console.log(\"Could not find comm manager on window.PyViz, ensure the extension is loaded.\")}_doc_attached(){super._doc_attached(),null!=this.document&&this.document.on_change(this._document_listener)}_document_changed(e){e.setter_id!==this.id&&(e instanceof s.ModelChangedEvent&&!(e.attr in e.model.serializable_attributes())||(this._event_buffer.push(e),(!this._blocked||Date.now()>this._timeout)&&(setTimeout((()=>this.process_events()),this.debounce),this._blocked=!0,this._timeout=Date.now()+this.timeout)))}process_events(){if(null==this.document||null==this._client_comm)return;const e=this.document.create_json_patch(this._event_buffer);this._event_buffer=[];const t=l.Message.create(\"PATCH-DOC\",{},e);this._client_comm.send(t)}on_ack(e){const t=e.metadata;this._event_buffer.length?(this._blocked=!0,this._timeout=Date.now()+this.timeout,this.process_events()):this._blocked=!1,\"Ready\"==t.msg_type&&t.content?console.log(\"Python callback returned following output:\",t.content):\"Error\"==t.msg_type&&console.log(\"Python failed with the following traceback:\",t.traceback)}msg_handler(e){const t=e.metadata,n=e.buffers,o=e.content.data,i=this.plot_id;if(\"Ready\"==t.msg_type)t.content?console.log(\"Python callback returned following output:\",t.content):\"Error\"==t.msg_type&&console.log(\"Python failed with the following traceback:\",t.traceback);else if(null!=i){let e=null;if(i in this.ns.plot_index&&null!=this.ns.plot_index[i]?e=this.ns.plot_index[i]:void 0!==window.Bokeh&&i in window.Bokeh.index&&(e=window.Bokeh.index[i]),null==e)return;null!=n&&n.length>0?this._receiver.consume(n[0].buffer):this._receiver.consume(o);const t=this._receiver.message;null!=t&&Object.keys(t.content).length>0&&null!=this.document&&this.document.apply_json_patch(t.content,t.buffers,this.id)}}static init_CommManager(){this.prototype.default_view=h,this.define((({Int:e,String:t})=>({plot_id:[t],comm_id:[t],client_comm_id:[t],timeout:[e,5e3],debounce:[e,50]})))}}n.CommManager=m,m.__name__=\"CommManager\",m.__module__=\"panel.models.comm_manager\",m.init_CommManager()},\n", - " \"99baa24a1a\": function _(t,e,s,o,i){o();const a=t(\"@bokehjs/models/layouts/html_box\"),l=t(\"@bokehjs/core/dom\"),n=t(\"@bokehjs/core/kinds\"),r=t(\"@bokehjs/models/sources/column_data_source\"),d=t(\"@bokehjs/models/widgets/tables\"),u=t(\"7e38aee5d7\"),h=t(\"7116a7a602\");class c extends h.PanelHTMLBoxView{constructor(){super(...arguments),this._tabulator_cell_updating=!1,this._selection_updating=!1,this._styled_cells=[]}connect_signals(){super.connect_signals();const{configuration:t,layout:e,columns:s,theme:o,theme_url:i,groupby:a}=this.model.properties;this.on_change([t,e,s,a],(()=>this.render_and_resize())),this.on_change([o,i],(()=>this.setCSS())),this.connect(this.model.properties.download.change,(()=>{const t=this.model.filename.endsWith(\".json\")?\"json\":\"csv\";this.tabulator.download(t,this.model.filename)})),this.connect(this.model.properties.hidden_columns.change,(()=>{this.hideColumns()})),this.connect(this.model.properties.page_size.change,(()=>{this.setPageSize()})),this.connect(this.model.properties.page.change,(()=>{this.setPage()})),this.connect(this.model.properties.max_page.change,(()=>{this.setMaxPage()})),this.connect(this.model.properties.frozen_rows.change,(()=>{this.freezeRows()})),this.connect(this.model.properties.styles.change,(()=>{this.updateStyles()})),this.connect(this.model.source.properties.data.change,(()=>{this.setData()})),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>this.updateOrAddData())),this.connect(this.model.source.selected.change,(()=>this.updateSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.updateSelection()))}render_and_resize(){this.render(),this.update_layout(),this.compute_layout(),this.root!==this&&this.invalidate_layout()}render(){super.render();if(this.setCSS())return;this._initializing=!0;const t=l.div({class:\"pnx-tabulator\"});h.set_size(t,this.model);let e=this.getConfiguration();this.tabulator=new Tabulator(t,e),this.tabulator.modules=Object.assign({},this.tabulator.modules);const s=this.tabulator.modules.ajax;this.tabulator.modules.ajax.sendRequest=()=>{this.requestPage(s.params.page,s.params.sorters)},\"remote\"===this.model.pagination&&(this.tabulator.options.pagination=this.model.pagination,this.tabulator.modules.page.mode=\"remote\"),this.setGroupBy(),this.hideColumns(),this.model.pagination?(this.setMaxPage(),this.tabulator.setPage(this.model.page),this.setData()):this.freezeRows(),this.el.appendChild(t)}requestPage(t,e){return new Promise(((s,o)=>{try{this.model.page=t||1,this.model.sorters=e,s({data:[],last_page:this.model.max_page})}catch(t){o(t)}}))}renderComplete(){this._initializing&&(this.updateStyles(),this.updateSelection()),this._initializing=!1}freezeRows(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}getLayout(){switch(this.model.layout){case\"fit_data\":return\"fitData\";case\"fit_data_fill\":return\"fitDataFill\";case\"fit_data_stretch\":return\"fitDataStretch\";case\"fit_data_table\":return\"fitDataTable\";case\"fit_columns\":return\"fitColumns\"}}getConfiguration(){let t=Object.assign(Object.assign({},this.model.configuration),{index:\"_index\",renderComplete:()=>this.renderComplete(),rowSelectionChanged:(t,e)=>this.rowSelectionChanged(t,e),cellEdited:t=>this.cellEdited(t),columns:this.getColumns(),layout:this.getLayout(),ajaxURL:\"http://panel.pyviz.org\",ajaxSorting:!0,pagination:\"remote\"==this.model.pagination?\"local\":this.model.pagination,paginationSize:this.model.page_size,paginationInitialPage:1}),e=this.model.source;return null===e||0===Object.keys(e.data).length?t:(e=u.transform_cds_to_records(e,!0),Object.assign(Object.assign({},t),{data:e}))}getColumns(){var t;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let s=[];if(null!=e)for(const t of e)if(null!=t.columns){const e=[];for(const s of t.columns)e.push(Object.assign({},s));s.push(Object.assign(Object.assign({},t),{columns:e}))}else s.push(Object.assign({},t));for(const t of this.model.columns){let o=null;if(null!=e)for(const e of s)if(null!=e.columns){for(const s of e.columns)if(t.field===s.field){o=s;break}if(null!=o)break}else if(t.field===e.field){o=e;break}if(null==o&&(o={field:t.field}),null==o.title&&(o.title=t.title),null==o.width&&null!=t.width&&0!=t.width&&(o.width=t.width),null==o.formatter&&null!=t.formatter){const e=t.formatter.type;o.formatter=\"BooleanFormatter\"===e?\"tickCross\":e=>t.formatter.doFormat(e.getRow(),e,e.getValue(),null,null)}o.editable=()=>this.model.editable;const i=t.editor,a=i.type;null!=o.editor||(\"StringEditor\"===a?i.completions.length>0?(o.editor=\"autocomplete\",o.editorParams={values:i.completions}):o.editor=\"input\":\"TextEditor\"===a?o.editor=\"textarea\":\"IntEditor\"===a||\"NumberEditor\"===a?(o.editor=\"number\",o.editorParams={step:i.step}):\"CheckboxEditor\"===a?o.editor=\"tickCross\":\"SelectEditor\"===a?(o.editor=\"select\",o.editorParams={values:i.options}):o.editor=(e,s,o,i)=>this.renderEditor(t,e,s,o,i)),null==e&&s.push(o)}return s}renderEditor(t,e,s,o,i){const a=t.editor,l=new a.default_view({column:t,model:a,parent:this,container:e._cell.element});return l.initialize(),l.connect_signals(),s((()=>{l.setValue(e.getValue())})),l.inputEl.addEventListener(\"change\",(()=>{const t=l.serializeValue(),s=e.getValue(),a=l.validate();a.valid||i(a.msg),null!=s&&typeof t!=typeof s?i(\"Mismatching type\"):o(l.serializeValue())})),l.inputEl}after_layout(){super.after_layout(),null!=this.tabulator&&this.tabulator.redraw(!0),this.updateStyles()}setData(){const t=u.transform_cds_to_records(this.model.source,!0);null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t),this.freezeRows(),this.updateSelection()}setGroupBy(){if(0==this.model.groupby.length)return void this.tabulator.setGroupBy(!1);this.tabulator.setGroupBy((t=>{const e=[];for(const s of this.model.groupby){const o=s+\": \"+t[s];e.push(o)}return e.join(\", \")}))}setCSS(){let t;t=\"default\"==this.model.theme?\"tabulator\":\"tabulator_\"+this.model.theme;const e=this.model.theme_url+t+\".min.css\";let s=null;const o=document.getElementsByTagName(\"link\"),i=this.model.theme_url.indexOf(\"dist/\");for(const t of o)if(t.href.startsWith(this.model.theme_url.slice(0,i))){s=t;break}let a=document.getElementsByTagName(\"head\")[0];if(null!=s){if(s.href==e)return!1;null!=s.parentNode&&(a=s.parentNode)}const l=document.createElement(\"link\");return l.type=\"text/css\",l.rel=\"stylesheet\",l.media=\"screen\",l.href=e,l.onload=()=>{null!=s&&null!=s.parentNode&&(a=s.parentNode,a.removeChild(s)),this.render_and_resize()},a.appendChild(l),!0}updateStyles(){for(const t of this._styled_cells)t.cssText=\"\";if(this._styled_cells=[],null!=this.model.styles&&0!=this.tabulator.getDataCount())for(const t in this.model.styles){const e=this.model.styles[t],s=this.tabulator.getRow(t);if(!s)continue;const o=s._row.cells;for(const t in e){const s=e[t],i=o[t];if(null==i||!s.length)continue;const a=i.element;this._styled_cells.push(a),a.cssText=\"\";for(const t of s){if(!t.includes(\":\"))continue;const[e,s]=t.split(\":\");a.style.setProperty(e,s.trimLeft())}}}}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1];let s=u.transform_cds_to_records(this.model.source,!0);this.tabulator.setData(s),this.model.follow&&this.tabulator.scrollToRow(e.data._index||0,\"top\",!1),this.freezeRows(),this.updateSelection()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=u.transform_cds_to_records(this.model.source,!0);this.tabulator.setData(t),this.freezeRows(),this.updateSelection()}hideColumns(){for(const t of this.tabulator.getColumns())this.model.hidden_columns.indexOf(t._column.field)>-1?t.hide():t.show()}setMaxPage(){this.tabulator.setMaxPage(Math.max(this.model.page,this.model.max_page)),this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(this.model.page)}setPageSize(){this.tabulator.setPageSize(this.model.page_size)}updateSelection(){if(null==this.tabulator||this._selection_updating)return;const t=this.model.source.selected.indices;this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t),this._selection_updating=!1}rowSelectionChanged(t,e){if(this._selection_updating||this._initializing)return;this._selection_updating=!0;const s=t.map((t=>t._index));this.model.source.selected.indices=s,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,s=t._cell.row.data._index,o=t._cell.value;this._tabulator_cell_updating=!0,this.model.source.patch({[e]:[[s,o]]}),this._tabulator_cell_updating=!1}}s.DataTabulatorView=c,c.__name__=\"DataTabulatorView\",s.TableLayout=n.Enum(\"fit_data\",\"fit_data_fill\",\"fit_data_stretch\",\"fit_data_table\",\"fit_columns\");class m extends a.HTMLBox{constructor(t){super(t)}static init_DataTabulator(){this.prototype.default_view=c,this.define((({Any:t,Array:e,Boolean:o,Nullable:i,Number:a,Ref:l,String:n})=>({configuration:[t,{}],columns:[e(l(d.TableColumn)),[]],download:[o,!0],editable:[o,!0],filename:[n,\"table.csv\"],follow:[o,!0],frozen_rows:[e(a),[]],groupby:[e(n),[]],hidden_columns:[e(n),[]],layout:[s.TableLayout,\"fit_data\"],max_page:[a,0],pagination:[i(n),null],page:[a,0],page_size:[a,0],source:[l(r.ColumnDataSource)],sorters:[e(t),[]],styles:[t,{}],theme:[n,\"simple\"],theme_url:[n,\"https://unpkg.com/tabulator-tables@4.9.3/dist/css/\"]})))}}s.DataTabulator=m,m.__name__=\"DataTabulator\",m.__module__=\"panel.models.tabulator\",m.init_DataTabulator()},\n", + " \"4fa5b314a9\": function _(t,e,s,o,i){o();const a=t(\"@bokehjs/models/layouts/html_box\"),l=t(\"@bokehjs/core/dom\"),n=t(\"@bokehjs/core/kinds\"),r=t(\"@bokehjs/models/sources/column_data_source\"),d=t(\"@bokehjs/models/widgets/tables\"),u=t(\"7e38aee5d7\"),h=t(\"7116a7a602\");class c extends h.PanelHTMLBoxView{constructor(){super(...arguments),this._tabulator_cell_updating=!1,this._selection_updating=!1,this._styled_cells=[]}connect_signals(){super.connect_signals();const{configuration:t,layout:e,columns:s,theme:o,theme_url:i,groupby:a}=this.model.properties;this.on_change([t,e,s,a],(()=>this.render_and_resize())),this.on_change([o,i],(()=>this.setCSS())),this.connect(this.model.properties.download.change,(()=>{const t=this.model.filename.endsWith(\".json\")?\"json\":\"csv\";this.tabulator.download(t,this.model.filename)})),this.connect(this.model.properties.hidden_columns.change,(()=>{this.hideColumns()})),this.connect(this.model.properties.page_size.change,(()=>{this.setPageSize()})),this.connect(this.model.properties.page.change,(()=>{this.setPage()})),this.connect(this.model.properties.max_page.change,(()=>{this.setMaxPage()})),this.connect(this.model.properties.frozen_rows.change,(()=>{this.freezeRows()})),this.connect(this.model.properties.styles.change,(()=>{this.updateStyles()})),this.connect(this.model.source.properties.data.change,(()=>{this.setData()})),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>this.updateOrAddData())),this.connect(this.model.source.selected.change,(()=>this.updateSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.updateSelection()))}render_and_resize(){this.render(),this.update_layout(),this.compute_layout(),this.root!==this&&this.invalidate_layout()}render(){super.render();if(this.setCSS())return;this._initializing=!0;const t=l.div({class:\"pnx-tabulator\"});h.set_size(t,this.model);let e=this.getConfiguration();this.tabulator=new Tabulator(t,e),this.tabulator.modules=Object.assign({},this.tabulator.modules);const s=this.tabulator.modules.ajax;this.tabulator.modules.ajax.sendRequest=()=>{this.requestPage(s.params.page,s.params.sorters)},\"remote\"===this.model.pagination&&(this.tabulator.options.pagination=this.model.pagination,this.tabulator.modules.page.mode=\"remote\"),this.setGroupBy(),this.hideColumns(),this.model.pagination?(this.setMaxPage(),this.tabulator.setPage(this.model.page),this.setData()):this.freezeRows(),this.el.appendChild(t)}requestPage(t,e){return new Promise(((s,o)=>{try{this.model.page=t||1,this.model.sorters=e,s({data:[],last_page:this.model.max_page})}catch(t){o(t)}}))}renderComplete(){this._initializing&&(this.updateStyles(),this.updateSelection()),this._initializing=!1}freezeRows(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}getLayout(){switch(this.model.layout){case\"fit_data\":return\"fitData\";case\"fit_data_fill\":return\"fitDataFill\";case\"fit_data_stretch\":return\"fitDataStretch\";case\"fit_data_table\":return\"fitDataTable\";case\"fit_columns\":return\"fitColumns\"}}getConfiguration(){const t=\"remote\"==this.model.pagination?\"local\":this.model.pagination||!1;let e=Object.assign(Object.assign({},this.model.configuration),{index:\"_index\",renderComplete:()=>this.renderComplete(),rowSelectionChanged:(t,e)=>this.rowSelectionChanged(t,e),cellEdited:t=>this.cellEdited(t),columns:this.getColumns(),layout:this.getLayout(),pagination:t,paginationSize:this.model.page_size,paginationInitialPage:1});t&&(e.ajaxURL=\"http://panel.pyviz.org\",e.ajaxSorting=!0);const s=this.model.source;let o;return o=null===s||0===s.columns().length?[]:u.transform_cds_to_records(s,!0),Object.assign(Object.assign({},e),{data:o})}getColumns(){var t;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let s=[];if(null!=e)for(const t of e)if(null!=t.columns){const e=[];for(const s of t.columns)e.push(Object.assign({},s));s.push(Object.assign(Object.assign({},t),{columns:e}))}else s.push(Object.assign({},t));for(const t of this.model.columns){let o=null;if(null!=e)for(const e of s)if(null!=e.columns){for(const s of e.columns)if(t.field===s.field){o=s;break}if(null!=o)break}else if(t.field===e.field){o=e;break}if(null==o&&(o={field:t.field}),null==o.title&&(o.title=t.title),null==o.width&&null!=t.width&&0!=t.width&&(o.width=t.width),null==o.formatter&&null!=t.formatter){const e=t.formatter.type;o.formatter=\"BooleanFormatter\"===e?\"tickCross\":e=>t.formatter.doFormat(e.getRow(),e,e.getValue(),null,null)}o.editable=()=>this.model.editable;const i=t.editor,a=i.type;null!=o.editor||(\"StringEditor\"===a?i.completions.length>0?(o.editor=\"autocomplete\",o.editorParams={values:i.completions}):o.editor=\"input\":\"TextEditor\"===a?o.editor=\"textarea\":\"IntEditor\"===a||\"NumberEditor\"===a?(o.editor=\"number\",o.editorParams={step:i.step}):\"CheckboxEditor\"===a?o.editor=\"tickCross\":\"SelectEditor\"===a?(o.editor=\"select\",o.editorParams={values:i.options}):o.editor=(e,s,o,i)=>this.renderEditor(t,e,s,o,i)),null==e&&s.push(o)}return s}renderEditor(t,e,s,o,i){const a=t.editor,l=new a.default_view({column:t,model:a,parent:this,container:e._cell.element});return l.initialize(),l.connect_signals(),s((()=>{l.setValue(e.getValue())})),l.inputEl.addEventListener(\"change\",(()=>{const t=l.serializeValue(),s=e.getValue(),a=l.validate();a.valid||i(a.msg),null!=s&&typeof t!=typeof s?i(\"Mismatching type\"):o(l.serializeValue())})),l.inputEl}after_layout(){super.after_layout(),null!=this.tabulator&&this.tabulator.redraw(!0),this.updateStyles()}setData(){const t=u.transform_cds_to_records(this.model.source,!0);null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t),this.freezeRows(),this.updateSelection()}setGroupBy(){if(0==this.model.groupby.length)return void this.tabulator.setGroupBy(!1);this.tabulator.setGroupBy((t=>{const e=[];for(const s of this.model.groupby){const o=s+\": \"+t[s];e.push(o)}return e.join(\", \")}))}setCSS(){let t;t=\"default\"==this.model.theme?\"tabulator\":\"tabulator_\"+this.model.theme;const e=this.model.theme_url+t+\".min.css\";let s=null;const o=document.getElementsByTagName(\"link\"),i=this.model.theme_url.indexOf(\"dist/\");for(const t of o)if(t.href.startsWith(this.model.theme_url.slice(0,i))){s=t;break}let a=document.getElementsByTagName(\"head\")[0];if(null!=s){if(s.href==e)return!1;null!=s.parentNode&&(a=s.parentNode)}const l=document.createElement(\"link\");return l.type=\"text/css\",l.rel=\"stylesheet\",l.media=\"screen\",l.href=e,l.onload=()=>{null!=s&&null!=s.parentNode&&(a=s.parentNode,a.removeChild(s)),this.render_and_resize()},a.appendChild(l),!0}updateStyles(){for(const t of this._styled_cells)t.cssText=\"\";if(this._styled_cells=[],null!=this.model.styles&&0!=this.tabulator.getDataCount())for(const t in this.model.styles){const e=this.model.styles[t],s=this.tabulator.getRow(t);if(!s)continue;const o=s._row.cells;for(const t in e){const s=e[t],i=o[t];if(null==i||!s.length)continue;const a=i.element;this._styled_cells.push(a),a.cssText=\"\";for(const t of s){if(!t.includes(\":\"))continue;const[e,s]=t.split(\":\");a.style.setProperty(e,s.trimLeft())}}}}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1];let s=u.transform_cds_to_records(this.model.source,!0);this.tabulator.setData(s),this.model.follow&&this.tabulator.scrollToRow(e.data._index||0,\"top\",!1),this.freezeRows(),this.updateSelection()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=u.transform_cds_to_records(this.model.source,!0);this.tabulator.setData(t),this.freezeRows(),this.updateSelection()}hideColumns(){for(const t of this.tabulator.getColumns())this.model.hidden_columns.indexOf(t._column.field)>-1?t.hide():t.show()}setMaxPage(){this.tabulator.setMaxPage(Math.max(this.model.page,this.model.max_page)),this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(this.model.page)}setPageSize(){this.tabulator.setPageSize(this.model.page_size)}updateSelection(){if(null==this.tabulator||this._selection_updating)return;const t=this.model.source.selected.indices;this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t),this._selection_updating=!1}rowSelectionChanged(t,e){if(this._selection_updating||this._initializing)return;this._selection_updating=!0;const s=t.map((t=>t._index));this.model.source.selected.indices=s,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,s=t._cell.row.data._index,o=t._cell.value;this._tabulator_cell_updating=!0,this.model.source.patch({[e]:[[s,o]]}),this._tabulator_cell_updating=!1}}s.DataTabulatorView=c,c.__name__=\"DataTabulatorView\",s.TableLayout=n.Enum(\"fit_data\",\"fit_data_fill\",\"fit_data_stretch\",\"fit_data_table\",\"fit_columns\");class m extends a.HTMLBox{constructor(t){super(t)}static init_DataTabulator(){this.prototype.default_view=c,this.define((({Any:t,Array:e,Boolean:o,Nullable:i,Number:a,Ref:l,String:n})=>({configuration:[t,{}],columns:[e(l(d.TableColumn)),[]],download:[o,!0],editable:[o,!0],filename:[n,\"table.csv\"],follow:[o,!0],frozen_rows:[e(a),[]],groupby:[e(n),[]],hidden_columns:[e(n),[]],layout:[s.TableLayout,\"fit_data\"],max_page:[a,0],pagination:[i(n),null],page:[a,0],page_size:[a,0],source:[l(r.ColumnDataSource)],sorters:[e(t),[]],styles:[t,{}],theme:[n,\"simple\"],theme_url:[n,\"https://unpkg.com/tabulator-tables@4.9.3/dist/css/\"]})))}}s.DataTabulator=m,m.__name__=\"DataTabulator\",m.__module__=\"panel.models.tabulator\",m.init_DataTabulator()},\n", " \"7e38aee5d7\": function _(n,t,e,l,o){l(),e.transform_cds_to_records=function(n,t=!1){const e=[],l=n.columns(),o=n.get_length();if(0===l.length||null===o)return[];for(let r=0;r1&&\"number\"==typeof l[0]?o[t]=e.slice(r*l[1],r*l[1]+l[1]):o[t]=e[r]}t&&(o._index=r),e.push(o)}return e}},\n", + " \"6e11b2cfe2\": function _(e,t,i,s,n){s();const o=e(\"tslib\"),l=o.__importDefault(e(\"50d3473f3f\")),d=e(\"@bokehjs/models/widgets/input_widget\"),a=e(\"@bokehjs/core/dom\"),r=e(\"@bokehjs/core/enums\"),c=e(\"@bokehjs/core/util/types\"),m=o.__importStar(e(\"@bokehjs/styles/widgets/inputs.css\")),h=o.__importDefault(e(\"@bokehjs/styles/widgets/flatpickr.css\"));function _(e){const t=[];for(const i of e)if(c.isString(i))t.push(i);else{const[e,s]=i;t.push({from:e,to:s})}return t}class u extends d.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:i,disabled_dates:s,enabled_dates:n,position:o,inline:l,enable_time:d,enable_seconds:a,military_time:r,date_format:c,mode:m}=this.model.properties;this.connect(e.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.setDate(this.model.value)})),this.connect(t.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"minDate\",this.model.min_date)})),this.connect(i.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"maxDate\",this.model.max_date)})),this.connect(s.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"disable\",this.model.disabled_dates)})),this.connect(n.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"enable\",this.model.enabled_dates)})),this.connect(o.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"position\",this.model.position)})),this.connect(l.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"inline\",this.model.inline)})),this.connect(d.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"enableTime\",this.model.enable_time)})),this.connect(a.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"enableSeconds\",this.model.enable_seconds)})),this.connect(r.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"time_24hr\",this.model.military_time)})),this.connect(m.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"mode\",this.model.mode)})),this.connect(c.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"dateFormat\",this.model.date_format)}))}remove(){var e;null===(e=this._picker)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),h.default]}render(){var e,t;null==this._picker&&(super.render(),this.input_el=a.input({type:\"text\",class:m.input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=l.default(this.input_el,{defaultDate:this.model.value,minDate:null!==(e=this.model.min_date)&&void 0!==e?e:void 0,maxDate:null!==(t=this.model.max_date)&&void 0!==t?t:void 0,inline:this.model.inline,position:this.model.position,disable:_(this.model.disabled_dates),enable:_(this.model.enabled_dates),enableTime:this.model.enable_time,enableSeconds:this.model.enable_seconds,time_24hr:this.model.military_time,dateFormat:this.model.date_format,mode:this.model.mode,onClose:(e,t,i)=>this._on_close(e,t,i)}))}_on_close(e,t,i){(\"range\"!=this.model.mode||t.includes(\"to\"))&&(this.model.value=t,this.change_input())}}i.DatetimePickerView=u,u.__name__=\"DatetimePickerView\";class p extends d.InputWidget{constructor(e){super(e)}static init_DatetimePicker(){this.prototype.default_view=u,this.define((({Boolean:e,String:t,Array:i,Tuple:s,Or:n,Nullable:o})=>{const l=i(n(t,s(t,t)));return{value:[t],min_date:[o(t),null],max_date:[o(t),null],disabled_dates:[l,[]],enabled_dates:[l,[]],position:[r.CalendarPosition,\"auto\"],inline:[e,!1],enable_time:[e,!0],enable_seconds:[e,!0],military_time:[e,!0],date_format:[t,\"Y-m-d H:i:S\"],mode:[t,\"single\"]}}))}}i.DatetimePicker=p,p.__name__=\"DatetimePicker\",p.__module__=\"panel.models.datetime_picker\",p.init_DatetimePicker()},\n", + " \"50d3473f3f\": function _(e,n,t,a,i){\n", + " /* flatpickr v4.6.6, @license MIT */var o,r;o=this,r=function(){\"use strict\";\n", + " /*! *****************************************************************************\n", + " Copyright (c) Microsoft Corporation.\n", + " \n", + " Permission to use, copy, modify, and/or distribute this software for any\n", + " purpose with or without fee is hereby granted.\n", + " \n", + " THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n", + " REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n", + " AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n", + " INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n", + " LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n", + " OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n", + " PERFORMANCE OF THIS SOFTWARE.\n", + " ***************************************************************************** */var e=function(){return(e=Object.assign||function(e){for(var n,t=1,a=arguments.length;t\",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:\"auto\",positionElement:void 0,prevArrow:\"\",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],longhand:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],longhand:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return\"th\";switch(n%10){case 1:return\"st\";case 2:return\"nd\";case 3:return\"rd\";default:return\"th\"}},rangeSeparator:\" to \",weekAbbreviation:\"Wk\",scrollTitle:\"Scroll to increment\",toggleTitle:\"Click to toggle\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"Year\",monthAriaLabel:\"Month\",hourAriaLabel:\"Hour\",minuteAriaLabel:\"Minute\",time_24hr:!1},o=function(e,n){return void 0===n&&(n=2),(\"000\"+e).slice(-1*n)},r=function(e){return!0===e?1:0};function l(e,n,t){var a;return void 0===t&&(t=!1),function(){var i=this,o=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,t||e.apply(i,o)}),n),t&&!a&&e.apply(i,o)}}var c=function(e){return e instanceof Array?e:[e]};function d(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function s(e,n,t){var a=window.document.createElement(e);return n=n||\"\",t=t||\"\",a.className=n,void 0!==t&&(a.textContent=t),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,n){return n(e)?e:e.parentNode?f(e.parentNode,n):void 0}function m(e,n){var t=s(\"div\",\"numInputWrapper\"),a=s(\"input\",\"numInput \"+e),i=s(\"span\",\"arrowUp\"),o=s(\"span\",\"arrowDown\");if(-1===navigator.userAgent.indexOf(\"MSIE 9.0\")?a.type=\"number\":(a.type=\"text\",a.pattern=\"\\\\d*\"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function g(e){try{return\"function\"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var p=function(){},h=function(e,n,t){return t.months[n?\"shorthand\":\"longhand\"][e]},v={D:p,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours(parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*r(new RegExp(t.amPM[1],\"i\").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours(parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:p,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:p,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},D={D:\"(\\\\w+)\",F:\"(\\\\w+)\",G:\"(\\\\d\\\\d|\\\\d)\",H:\"(\\\\d\\\\d|\\\\d)\",J:\"(\\\\d\\\\d|\\\\d)\\\\w+\",K:\"\",M:\"(\\\\w+)\",S:\"(\\\\d\\\\d|\\\\d)\",U:\"(.+)\",W:\"(\\\\d\\\\d|\\\\d)\",Y:\"(\\\\d{4})\",Z:\"(.+)\",d:\"(\\\\d\\\\d|\\\\d)\",h:\"(\\\\d\\\\d|\\\\d)\",i:\"(\\\\d\\\\d|\\\\d)\",j:\"(\\\\d\\\\d|\\\\d)\",l:\"(\\\\w+)\",m:\"(\\\\d\\\\d|\\\\d)\",n:\"(\\\\d\\\\d|\\\\d)\",s:\"(\\\\d\\\\d|\\\\d)\",u:\"(.+)\",w:\"(\\\\d\\\\d|\\\\d)\",y:\"(\\\\d{2})\"},w={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[w.w(e,n,t)]},F:function(e,n,t){return h(w.n(e,n,t)-1,!1,n)},G:function(e,n,t){return o(w.h(e,n,t))},H:function(e){return o(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[r(e.getHours()>11)]},M:function(e,n){return h(e.getMonth(),!0,n)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},b=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,a){var i=a||r;return void 0===t.formatDate||c?n.split(\"\").map((function(n,a,o){return w[n]&&\"\\\\\"!==o[a-1]?w[n](e,i,t):\"\\\\\"!==n?n:\"\"})).join(\"\"):t.formatDate(e,n,i)}},C=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o;return function(e,n,i,o){if(0===e||e){var l,c=o||r,d=e;if(e instanceof Date)l=new Date(e.getTime());else if(\"string\"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if(\"string\"==typeof e){var s=n||(t||a).dateFormat,u=String(e).trim();if(\"today\"===u)l=new Date,i=!0;else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else if(t&&t.parseDate)l=t.parseDate(e,s);else{l=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],g=0,p=0,h=\"\";gl&&(u=a===w.hourElement?u-l-r(!w.amPM):i,m&&H(void 0,1,w.hourElement)),w.amPM&&f&&(1===c?u+d===23:Math.abs(u-d)>c)&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]),a.value=o(u)}}(e);var c=w._input.value;I(),be(),w._input.value!==c&&w._debouncedChange()}function I(){if(void 0!==w.hourElement&&void 0!==w.minuteElement){var e,n,t=(parseInt(w.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(w.minuteElement.value,10)||0)%60,i=void 0!==w.secondElement?(parseInt(w.secondElement.value,10)||0)%60:0;void 0!==w.amPM&&(e=t,n=w.amPM.textContent,t=e%12+12*r(n===w.l10n.amPM[1]));var o=void 0!==w.config.minTime||w.config.minDate&&w.minDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.minDate,!0);if(void 0!==w.config.maxTime||w.config.maxDate&&w.maxDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.maxDate,!0)){var l=void 0!==w.config.maxTime?w.config.maxTime:w.config.maxDate;(t=Math.min(t,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(o){var c=void 0!==w.config.minTime?w.config.minTime:w.config.minDate;(t=Math.max(t,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}O(t,a,i)}}function S(e){var n=e||w.latestSelectedDateObj;n&&O(n.getHours(),n.getMinutes(),n.getSeconds())}function _(){var e=w.config.defaultHour,n=w.config.defaultMinute,t=w.config.defaultSeconds;if(void 0!==w.config.minDate){var a=w.config.minDate.getHours(),i=w.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(n=Math.max(i,n)),e===a&&n===i&&(t=w.config.minDate.getSeconds())}if(void 0!==w.config.maxDate){var o=w.config.maxDate.getHours(),r=w.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(n=Math.min(r,n)),e===o&&n===r&&(t=w.config.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:t}}function O(e,n,t){void 0!==w.latestSelectedDateObj&&w.latestSelectedDateObj.setHours(e%24,n,t||0,0),w.hourElement&&w.minuteElement&&!w.isMobile&&(w.hourElement.value=o(w.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),w.minuteElement.value=o(n),void 0!==w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(e>=12)]),void 0!==w.secondElement&&(w.secondElement.value=o(t)))}function F(e){var n=g(e),t=parseInt(n.value)+(e.delta||0);(t/1e3>1||\"Enter\"===e.key&&!/[^\\d]/.test(t.toString()))&&Q(t)}function N(e,n,t,a){return n instanceof Array?n.forEach((function(n){return N(e,n,t,a)})):e instanceof Array?e.forEach((function(e){return N(e,n,t,a)})):(e.addEventListener(n,t,a),void w._handlers.push({element:e,event:n,handler:t,options:a}))}function A(){pe(\"onChange\")}function P(e,n){var t=void 0!==e?w.parseDate(e):w.latestSelectedDateObj||(w.config.minDate&&w.config.minDate>w.now?w.config.minDate:w.config.maxDate&&w.config.maxDate=0&&M(e,w.selectedDates[1])<=0}(n)&&!ve(n)&&o.classList.add(\"inRange\"),w.weekNumbers&&1===w.config.showMonths&&\"prevMonthDay\"!==e&&t%7==1&&w.weekNumbers.insertAdjacentHTML(\"beforeend\",\"\"+w.config.getWeek(n)+\"\"),pe(\"onDayCreate\",o),o}function L(e){e.focus(),\"range\"===w.config.mode&&ae(e)}function W(e){for(var n=e>0?0:w.config.showMonths-1,t=e>0?w.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=w.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf(\"hidden\")&&X(c.dateObj))return c}}function R(e,n){var t=ee(document.activeElement||document.body),a=void 0!==e?e:t?document.activeElement:void 0!==w.selectedDateElem&&ee(w.selectedDateElem)?w.selectedDateElem:void 0!==w.todayDateElem&&ee(w.todayDateElem)?w.todayDateElem:W(n>0?1:-1);void 0===a?w._input.focus():t?function(e,n){for(var t=-1===e.className.indexOf(\"Month\")?e.dateObj.getMonth():w.currentMonth,a=n>0?w.config.showMonths:-1,i=n>0?1:-1,o=t-w.currentMonth;o!=a;o+=i)for(var r=w.daysContainer.children[o],l=t-w.currentMonth===o?e.$i+n:n<0?r.children.length-1:0,c=r.children.length,d=l;d>=0&&d0?c:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf(\"hidden\")&&X(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(n))return L(s)}w.changeMonth(i),R(W(i),0)}(a,n):L(a)}function B(e,n){for(var t=(new Date(e,n,1).getDay()-w.l10n.firstDayOfWeek+7)%7,a=w.utils.getDaysInMonth((n-1+12)%12,e),i=w.utils.getDaysInMonth(n,e),o=window.document.createDocumentFragment(),r=w.config.showMonths>1,l=r?\"prevMonthDay hidden\":\"prevMonthDay\",c=r?\"nextMonthDay hidden\":\"nextMonthDay\",d=a+1-t,u=0;d<=a;d++,u++)o.appendChild(j(l,new Date(e,n-1,d),d,u));for(d=1;d<=i;d++,u++)o.appendChild(j(\"\",new Date(e,n,d),d,u));for(var f=i+1;f<=42-t&&(1===w.config.showMonths||u%7!=0);f++,u++)o.appendChild(j(c,new Date(e,n+1,f%i),f,u));var m=s(\"div\",\"dayContainer\");return m.appendChild(o),m}function J(){if(void 0!==w.daysContainer){u(w.daysContainer),w.weekNumbers&&u(w.weekNumbers);for(var e=document.createDocumentFragment(),n=0;n1||\"dropdown\"!==w.config.monthSelectorType)){var e=function(e){return!(void 0!==w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&ew.config.maxDate.getMonth())};w.monthsDropdownContainer.tabIndex=-1,w.monthsDropdownContainer.innerHTML=\"\";for(var n=0;n<12;n++)if(e(n)){var t=s(\"option\",\"flatpickr-monthDropdown-month\");t.value=new Date(w.currentYear,n).getMonth().toString(),t.textContent=h(n,w.config.shorthandCurrentMonth,w.l10n),t.tabIndex=-1,w.currentMonth===n&&(t.selected=!0),w.monthsDropdownContainer.appendChild(t)}}}function U(){var e,n=s(\"div\",\"flatpickr-month\"),t=window.document.createDocumentFragment();w.config.showMonths>1||\"static\"===w.config.monthSelectorType?e=s(\"span\",\"cur-month\"):(w.monthsDropdownContainer=s(\"select\",\"flatpickr-monthDropdown-months\"),w.monthsDropdownContainer.setAttribute(\"aria-label\",w.l10n.monthAriaLabel),N(w.monthsDropdownContainer,\"change\",(function(e){var n=g(e),t=parseInt(n.value,10);w.changeMonth(t-w.currentMonth),pe(\"onMonthChange\")})),K(),e=w.monthsDropdownContainer);var a=m(\"cur-year\",{tabindex:\"-1\"}),i=a.getElementsByTagName(\"input\")[0];i.setAttribute(\"aria-label\",w.l10n.yearAriaLabel),w.config.minDate&&i.setAttribute(\"min\",w.config.minDate.getFullYear().toString()),w.config.maxDate&&(i.setAttribute(\"max\",w.config.maxDate.getFullYear().toString()),i.disabled=!!w.config.minDate&&w.config.minDate.getFullYear()===w.config.maxDate.getFullYear());var o=s(\"div\",\"flatpickr-current-month\");return o.appendChild(e),o.appendChild(a),t.appendChild(o),n.appendChild(t),{container:n,yearElement:i,monthElement:e}}function q(){u(w.monthNav),w.monthNav.appendChild(w.prevMonthNav),w.config.showMonths&&(w.yearElements=[],w.monthElements=[]);for(var e=w.config.showMonths;e--;){var n=U();w.yearElements.push(n.yearElement),w.monthElements.push(n.monthElement),w.monthNav.appendChild(n.container)}w.monthNav.appendChild(w.nextMonthNav)}function $(){w.weekdayContainer?u(w.weekdayContainer):w.weekdayContainer=s(\"div\",\"flatpickr-weekdays\");for(var e=w.config.showMonths;e--;){var n=s(\"div\",\"flatpickr-weekdaycontainer\");w.weekdayContainer.appendChild(n)}return z(),w.weekdayContainer}function z(){if(w.weekdayContainer){var e=w.l10n.firstDayOfWeek,t=n(w.l10n.weekdays.shorthand);e>0&&e\\n \"+t.join(\"\")+\"\\n \\n \"}}function G(e,n){void 0===n&&(n=!0);var t=n?e:e-w.currentMonth;t<0&&!0===w._hidePrevMonthArrow||t>0&&!0===w._hideNextMonthArrow||(w.currentMonth+=t,(w.currentMonth<0||w.currentMonth>11)&&(w.currentYear+=w.currentMonth>11?1:-1,w.currentMonth=(w.currentMonth+12)%12,pe(\"onYearChange\"),K()),J(),pe(\"onMonthChange\"),De())}function V(e){return!(!w.config.appendTo||!w.config.appendTo.contains(e))||w.calendarContainer.contains(e)}function Z(e){if(w.isOpen&&!w.config.inline){var n=g(e),t=V(n),a=n===w.input||n===w.altInput||w.element.contains(n)||e.path&&e.path.indexOf&&(~e.path.indexOf(w.input)||~e.path.indexOf(w.altInput)),i=\"blur\"===e.type?a&&e.relatedTarget&&!V(e.relatedTarget):!a&&!t&&!V(e.relatedTarget),o=!w.config.ignoredFocusElements.some((function(e){return e.contains(n)}));i&&o&&(void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement&&\"\"!==w.input.value&&void 0!==w.input.value&&T(),w.close(),w.config&&\"range\"===w.config.mode&&1===w.selectedDates.length&&(w.clear(!1),w.redraw()))}}function Q(e){if(!(!e||w.config.minDate&&ew.config.maxDate.getFullYear())){var n=e,t=w.currentYear!==n;w.currentYear=n||w.currentYear,w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth=Math.min(w.config.maxDate.getMonth(),w.currentMonth):w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&(w.currentMonth=Math.max(w.config.minDate.getMonth(),w.currentMonth)),t&&(w.redraw(),pe(\"onYearChange\"),K())}}function X(e,n){void 0===n&&(n=!0);var t=w.parseDate(e,void 0,n);if(w.config.minDate&&t&&M(t,w.config.minDate,void 0!==n?n:!w.minDateHasTime)<0||w.config.maxDate&&t&&M(t,w.config.maxDate,void 0!==n?n:!w.maxDateHasTime)>0)return!1;if(0===w.config.enable.length&&0===w.config.disable.length)return!0;if(void 0===t)return!1;for(var a=w.config.enable.length>0,i=a?w.config.enable:w.config.disable,o=0,r=void 0;o=r.from.getTime()&&t.getTime()<=r.to.getTime())return a}return!a}function ee(e){return void 0!==w.daysContainer&&-1===e.className.indexOf(\"hidden\")&&-1===e.className.indexOf(\"flatpickr-disabled\")&&w.daysContainer.contains(e)}function ne(e){e.target!==w._input||e.relatedTarget&&V(e.relatedTarget)||w.setDate(w._input.value,!0,e.target===w.altInput?w.config.altFormat:w.config.dateFormat)}function te(e){var n=g(e),t=w.config.wrap?p.contains(n):n===w._input,a=w.config.allowInput,i=w.isOpen&&(!a||!t),o=w.config.inline&&t&&!a;if(13===e.keyCode&&t){if(a)return w.setDate(w._input.value,!0,n===w.altInput?w.config.altFormat:w.config.dateFormat),n.blur();w.open()}else if(V(n)||i||o){var r=!!w.timeContainer&&w.timeContainer.contains(n);switch(e.keyCode){case 13:r?(e.preventDefault(),T(),se()):ue(e);break;case 27:e.preventDefault(),se();break;case 8:case 46:t&&!w.config.allowInput&&(e.preventDefault(),w.clear());break;case 37:case 39:if(r||t)w.hourElement&&w.hourElement.focus();else if(e.preventDefault(),void 0!==w.daysContainer&&(!1===a||document.activeElement&&ee(document.activeElement))){var l=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(l),R(W(1),0)):R(void 0,l)}break;case 38:case 40:e.preventDefault();var c=40===e.keyCode?1:-1;w.daysContainer&&void 0!==n.$i||n===w.input||n===w.altInput?e.ctrlKey?(e.stopPropagation(),Q(w.currentYear-c),R(W(1),0)):r||R(void 0,7*c):n===w.currentYearElement?Q(w.currentYear-c):w.config.enableTime&&(!r&&w.hourElement&&w.hourElement.focus(),T(e),w._debouncedChange());break;case 9:if(r){var d=[w.hourElement,w.minuteElement,w.secondElement,w.amPM].concat(w.pluginElements).filter((function(e){return e})),s=d.indexOf(n);if(-1!==s){var u=d[s+(e.shiftKey?-1:1)];e.preventDefault(),(u||w._input).focus()}}else!w.config.noCalendar&&w.daysContainer&&w.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),w._input.focus())}}if(void 0!==w.amPM&&n===w.amPM)switch(e.key){case w.l10n.amPM[0].charAt(0):case w.l10n.amPM[0].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[0],I(),be();break;case w.l10n.amPM[1].charAt(0):case w.l10n.amPM[1].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[1],I(),be()}(t||V(n))&&pe(\"onKeyDown\",e)}function ae(e){if(1===w.selectedDates.length&&(!e||e.classList.contains(\"flatpickr-day\")&&!e.classList.contains(\"flatpickr-disabled\"))){for(var n=e?e.dateObj.getTime():w.days.firstElementChild.dateObj.getTime(),t=w.parseDate(w.selectedDates[0],void 0,!0).getTime(),a=Math.min(n,w.selectedDates[0].getTime()),i=Math.max(n,w.selectedDates[0].getTime()),o=!1,r=0,l=0,c=a;ca&&cr)?r=c:c>t&&(!l||c0&&m0&&m>l;return g?(f.classList.add(\"notAllowed\"),[\"inRange\",\"startRange\",\"endRange\"].forEach((function(e){f.classList.remove(e)})),\"continue\"):o&&!g?\"continue\":([\"startRange\",\"inRange\",\"endRange\",\"notAllowed\"].forEach((function(e){f.classList.remove(e)})),void(void 0!==e&&(e.classList.add(n<=w.selectedDates[0].getTime()?\"startRange\":\"endRange\"),tn&&m===t&&f.classList.add(\"endRange\"),m>=r&&(0===l||m<=l)&&(d=t,u=n,(c=m)>Math.min(d,u)&&c0||t.getMinutes()>0||t.getSeconds()>0),w.selectedDates&&(w.selectedDates=w.selectedDates.filter((function(e){return X(e)})),w.selectedDates.length||\"min\"!==e||S(t),be()),w.daysContainer&&(de(),void 0!==t?w.currentYearElement[e]=t.getFullYear().toString():w.currentYearElement.removeAttribute(e),w.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear())}}function re(){return w.config.wrap?p.querySelector(\"[data-input]\"):p}function le(){\"object\"!=typeof w.config.locale&&void 0===k.l10ns[w.config.locale]&&w.config.errorHandler(new Error(\"flatpickr: invalid locale \"+w.config.locale)),w.l10n=e(e({},k.l10ns.default),\"object\"==typeof w.config.locale?w.config.locale:\"default\"!==w.config.locale?k.l10ns[w.config.locale]:void 0),D.K=\"(\"+w.l10n.amPM[0]+\"|\"+w.l10n.amPM[1]+\"|\"+w.l10n.amPM[0].toLowerCase()+\"|\"+w.l10n.amPM[1].toLowerCase()+\")\",void 0===e(e({},v),JSON.parse(JSON.stringify(p.dataset||{}))).time_24hr&&void 0===k.defaultConfig.time_24hr&&(w.config.time_24hr=w.l10n.time_24hr),w.formatDate=b(w),w.parseDate=C({config:w.config,l10n:w.l10n})}function ce(e){if(void 0!==w.calendarContainer){pe(\"onPreCalendarPosition\");var n=e||w._positionElement,t=Array.prototype.reduce.call(w.calendarContainer.children,(function(e,n){return e+n.offsetHeight}),0),a=w.calendarContainer.offsetWidth,i=w.config.position.split(\" \"),o=i[0],r=i.length>1?i[1]:null,l=n.getBoundingClientRect(),c=window.innerHeight-l.bottom,s=\"above\"===o||\"below\"!==o&&ct,u=window.pageYOffset+l.top+(s?-t-2:n.offsetHeight+2);if(d(w.calendarContainer,\"arrowTop\",!s),d(w.calendarContainer,\"arrowBottom\",s),!w.config.inline){var f=window.pageXOffset+l.left,m=!1,g=!1;\"center\"===r?(f-=(a-l.width)/2,m=!0):\"right\"===r&&(f-=a-l.width,g=!0),d(w.calendarContainer,\"arrowLeft\",!m&&!g),d(w.calendarContainer,\"arrowCenter\",m),d(w.calendarContainer,\"arrowRight\",g);var p=window.document.body.offsetWidth-(window.pageXOffset+l.right),h=f+a>window.document.body.offsetWidth,v=p+a>window.document.body.offsetWidth;if(d(w.calendarContainer,\"rightMost\",h),!w.config.static)if(w.calendarContainer.style.top=u+\"px\",h)if(v){var D=function(){for(var e=null,n=0;nw.currentMonth+w.config.showMonths-1)&&\"range\"!==w.config.mode;if(w.selectedDateElem=t,\"single\"===w.config.mode)w.selectedDates=[a];else if(\"multiple\"===w.config.mode){var o=ve(a);o?w.selectedDates.splice(parseInt(o),1):w.selectedDates.push(a)}else\"range\"===w.config.mode&&(2===w.selectedDates.length&&w.clear(!1,!1),w.latestSelectedDateObj=a,w.selectedDates.push(a),0!==M(a,w.selectedDates[0],!0)&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()})));if(I(),i){var r=w.currentYear!==a.getFullYear();w.currentYear=a.getFullYear(),w.currentMonth=a.getMonth(),r&&(pe(\"onYearChange\"),K()),pe(\"onMonthChange\")}if(De(),J(),be(),i||\"range\"===w.config.mode||1!==w.config.showMonths?void 0!==w.selectedDateElem&&void 0===w.hourElement&&w.selectedDateElem&&w.selectedDateElem.focus():L(t),void 0!==w.hourElement&&void 0!==w.hourElement&&w.hourElement.focus(),w.config.closeOnSelect){var l=\"single\"===w.config.mode&&!w.config.enableTime,c=\"range\"===w.config.mode&&2===w.selectedDates.length&&!w.config.enableTime;(l||c)&&se()}A()}}w.parseDate=C({config:w.config,l10n:w.l10n}),w._handlers=[],w.pluginElements=[],w.loadedPlugins=[],w._bind=N,w._setHoursFromDate=S,w._positionCalendar=ce,w.changeMonth=G,w.changeYear=Q,w.clear=function(e,n){if(void 0===e&&(e=!0),void 0===n&&(n=!0),w.input.value=\"\",void 0!==w.altInput&&(w.altInput.value=\"\"),void 0!==w.mobileInput&&(w.mobileInput.value=\"\"),w.selectedDates=[],w.latestSelectedDateObj=void 0,!0===n&&(w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth()),!0===w.config.enableTime){var t=_(),a=t.hours,i=t.minutes,o=t.seconds;O(a,i,o)}w.redraw(),e&&pe(\"onChange\")},w.close=function(){w.isOpen=!1,w.isMobile||(void 0!==w.calendarContainer&&w.calendarContainer.classList.remove(\"open\"),void 0!==w._input&&w._input.classList.remove(\"active\")),pe(\"onClose\")},w._createElement=s,w.destroy=function(){void 0!==w.config&&pe(\"onDestroy\");for(var e=w._handlers.length;e--;){var n=w._handlers[e];n.element.removeEventListener(n.event,n.handler,n.options)}if(w._handlers=[],w.mobileInput)w.mobileInput.parentNode&&w.mobileInput.parentNode.removeChild(w.mobileInput),w.mobileInput=void 0;else if(w.calendarContainer&&w.calendarContainer.parentNode)if(w.config.static&&w.calendarContainer.parentNode){var t=w.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else w.calendarContainer.parentNode.removeChild(w.calendarContainer);w.altInput&&(w.input.type=\"text\",w.altInput.parentNode&&w.altInput.parentNode.removeChild(w.altInput),delete w.altInput),w.input&&(w.input.type=w.input._type,w.input.classList.remove(\"flatpickr-input\"),w.input.removeAttribute(\"readonly\")),[\"_showTimeInput\",\"latestSelectedDateObj\",\"_hideNextMonthArrow\",\"_hidePrevMonthArrow\",\"__hideNextMonthArrow\",\"__hidePrevMonthArrow\",\"isMobile\",\"isOpen\",\"selectedDateElem\",\"minDateHasTime\",\"maxDateHasTime\",\"days\",\"daysContainer\",\"_input\",\"_positionElement\",\"innerContainer\",\"rContainer\",\"monthNav\",\"todayDateElem\",\"calendarContainer\",\"weekdayContainer\",\"prevMonthNav\",\"nextMonthNav\",\"monthsDropdownContainer\",\"currentMonthElement\",\"currentYearElement\",\"navigationCurrentMonth\",\"selectedDateElem\",\"config\"].forEach((function(e){try{delete w[e]}catch(e){}}))},w.isEnabled=X,w.jumpToDate=P,w.open=function(e,n){if(void 0===n&&(n=w._positionElement),!0===w.isMobile){if(e){e.preventDefault();var t=g(e);t&&t.blur()}return void 0!==w.mobileInput&&(w.mobileInput.focus(),w.mobileInput.click()),void pe(\"onOpen\")}if(!w._input.disabled&&!w.config.inline){var a=w.isOpen;w.isOpen=!0,a||(w.calendarContainer.classList.add(\"open\"),w._input.classList.add(\"active\"),pe(\"onOpen\"),ce(n)),!0===w.config.enableTime&&!0===w.config.noCalendar&&(!1!==w.config.allowInput||void 0!==e&&w.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return w.hourElement.select()}),50))}},w.redraw=de,w.set=function(e,n){if(null!==e&&\"object\"==typeof e)for(var a in Object.assign(w.config,e),e)void 0!==fe[a]&&fe[a].forEach((function(e){return e()}));else w.config[e]=n,void 0!==fe[e]?fe[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(w.config[e]=c(n));w.redraw(),be(!0)},w.setDate=function(e,n,t){if(void 0===n&&(n=!1),void 0===t&&(t=w.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return w.clear(n);me(e,t),w.latestSelectedDateObj=w.selectedDates[w.selectedDates.length-1],w.redraw(),P(void 0,n),S(),0===w.selectedDates.length&&w.clear(!1),be(n),n&&pe(\"onChange\")},w.toggle=function(e){if(!0===w.isOpen)return w.close();w.open(e)};var fe={locale:[le,z],showMonths:[q,E,$],minDate:[P],maxDate:[P]};function me(e,n){var t=[];if(e instanceof Array)t=e.map((function(e){return w.parseDate(e,n)}));else if(e instanceof Date||\"number\"==typeof e)t=[w.parseDate(e,n)];else if(\"string\"==typeof e)switch(w.config.mode){case\"single\":case\"time\":t=[w.parseDate(e,n)];break;case\"multiple\":t=e.split(w.config.conjunction).map((function(e){return w.parseDate(e,n)}));break;case\"range\":t=e.split(w.l10n.rangeSeparator).map((function(e){return w.parseDate(e,n)}))}else w.config.errorHandler(new Error(\"Invalid date supplied: \"+JSON.stringify(e)));w.selectedDates=w.config.allowInvalidPreload?t:t.filter((function(e){return e instanceof Date&&X(e,!1)})),\"range\"===w.config.mode&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()}))}function ge(e){return e.slice().map((function(e){return\"string\"==typeof e||\"number\"==typeof e||e instanceof Date?w.parseDate(e,void 0,!0):e&&\"object\"==typeof e&&e.from&&e.to?{from:w.parseDate(e.from,void 0),to:w.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function pe(e,n){if(void 0!==w.config){var t=w.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a1||\"static\"===w.config.monthSelectorType?w.monthElements[n].textContent=h(t.getMonth(),w.config.shorthandCurrentMonth,w.l10n)+\" \":w.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()})),w._hidePrevMonthArrow=void 0!==w.config.minDate&&(w.currentYear===w.config.minDate.getFullYear()?w.currentMonth<=w.config.minDate.getMonth():w.currentYearw.config.maxDate.getMonth():w.currentYear>w.config.maxDate.getFullYear()))}function we(e){return w.selectedDates.map((function(n){return w.formatDate(n,e)})).filter((function(e,n,t){return\"range\"!==w.config.mode||w.config.enableTime||t.indexOf(e)===n})).join(\"range\"!==w.config.mode?w.config.conjunction:w.l10n.rangeSeparator)}function be(e){void 0===e&&(e=!0),void 0!==w.mobileInput&&w.mobileFormatStr&&(w.mobileInput.value=void 0!==w.latestSelectedDateObj?w.formatDate(w.latestSelectedDateObj,w.mobileFormatStr):\"\"),w.input.value=we(w.config.dateFormat),void 0!==w.altInput&&(w.altInput.value=we(w.config.altFormat)),!1!==e&&pe(\"onValueUpdate\")}function Ce(e){var n=g(e),t=w.prevMonthNav.contains(n),a=w.nextMonthNav.contains(n);t||a?G(t?-1:1):w.yearElements.indexOf(n)>=0?n.select():n.classList.contains(\"arrowUp\")?w.changeYear(w.currentYear+1):n.classList.contains(\"arrowDown\")&&w.changeYear(w.currentYear-1)}return function(){w.element=w.input=p,w.isOpen=!1,function(){var n=[\"wrap\",\"weekNumbers\",\"allowInput\",\"allowInvalidPreload\",\"clickOpens\",\"time_24hr\",\"enableTime\",\"noCalendar\",\"altInput\",\"shorthandCurrentMonth\",\"inline\",\"static\",\"enableSeconds\",\"disableMobile\"],i=e(e({},JSON.parse(JSON.stringify(p.dataset||{}))),v),o={};w.config.parseDate=i.parseDate,w.config.formatDate=i.formatDate,Object.defineProperty(w.config,\"enable\",{get:function(){return w.config._enable},set:function(e){w.config._enable=ge(e)}}),Object.defineProperty(w.config,\"disable\",{get:function(){return w.config._disable},set:function(e){w.config._disable=ge(e)}});var r=\"time\"===i.mode;if(!i.dateFormat&&(i.enableTime||r)){var l=k.defaultConfig.dateFormat||a.dateFormat;o.dateFormat=i.noCalendar||r?\"H:i\"+(i.enableSeconds?\":S\":\"\"):l+\" H:i\"+(i.enableSeconds?\":S\":\"\")}if(i.altInput&&(i.enableTime||r)&&!i.altFormat){var d=k.defaultConfig.altFormat||a.altFormat;o.altFormat=i.noCalendar||r?\"h:i\"+(i.enableSeconds?\":S K\":\" K\"):d+\" h:i\"+(i.enableSeconds?\":S\":\"\")+\" K\"}Object.defineProperty(w.config,\"minDate\",{get:function(){return w.config._minDate},set:oe(\"min\")}),Object.defineProperty(w.config,\"maxDate\",{get:function(){return w.config._maxDate},set:oe(\"max\")});var s=function(e){return function(n){w.config[\"min\"===e?\"_minTime\":\"_maxTime\"]=w.parseDate(n,\"H:i:S\")}};Object.defineProperty(w.config,\"minTime\",{get:function(){return w.config._minTime},set:s(\"min\")}),Object.defineProperty(w.config,\"maxTime\",{get:function(){return w.config._maxTime},set:s(\"max\")}),\"time\"===i.mode&&(w.config.noCalendar=!0,w.config.enableTime=!0),Object.assign(w.config,o,i);for(var u=0;u-1?w.config[m]=c(f[m]).map(x).concat(w.config[m]):void 0===i[m]&&(w.config[m]=f[m])}i.altInputClass||(w.config.altInputClass=re().className+\" \"+w.config.altInputClass),pe(\"onParseConfig\")}(),le(),w.input=re(),w.input?(w.input._type=w.input.type,w.input.type=\"text\",w.input.classList.add(\"flatpickr-input\"),w._input=w.input,w.config.altInput&&(w.altInput=s(w.input.nodeName,w.config.altInputClass),w._input=w.altInput,w.altInput.placeholder=w.input.placeholder,w.altInput.disabled=w.input.disabled,w.altInput.required=w.input.required,w.altInput.tabIndex=w.input.tabIndex,w.altInput.type=\"text\",w.input.setAttribute(\"type\",\"hidden\"),!w.config.static&&w.input.parentNode&&w.input.parentNode.insertBefore(w.altInput,w.input.nextSibling)),w.config.allowInput||w._input.setAttribute(\"readonly\",\"readonly\"),w._positionElement=w.config.positionElement||w._input):w.config.errorHandler(new Error(\"Invalid input element specified\")),function(){w.selectedDates=[],w.now=w.parseDate(w.config.now)||new Date;var e=w.config.defaultDate||(\"INPUT\"!==w.input.nodeName&&\"TEXTAREA\"!==w.input.nodeName||!w.input.placeholder||w.input.value!==w.input.placeholder?w.input.value:null);e&&me(e,w.config.dateFormat),w._initialDate=w.selectedDates.length>0?w.selectedDates[0]:w.config.minDate&&w.config.minDate.getTime()>w.now.getTime()?w.config.minDate:w.config.maxDate&&w.config.maxDate.getTime()0&&(w.latestSelectedDateObj=w.selectedDates[0]),void 0!==w.config.minTime&&(w.config.minTime=w.parseDate(w.config.minTime,\"H:i\")),void 0!==w.config.maxTime&&(w.config.maxTime=w.parseDate(w.config.maxTime,\"H:i\")),w.minDateHasTime=!!w.config.minDate&&(w.config.minDate.getHours()>0||w.config.minDate.getMinutes()>0||w.config.minDate.getSeconds()>0),w.maxDateHasTime=!!w.config.maxDate&&(w.config.maxDate.getHours()>0||w.config.maxDate.getMinutes()>0||w.config.maxDate.getSeconds()>0)}(),w.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=w.currentMonth),void 0===n&&(n=w.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:w.l10n.daysInMonth[e]}},w.isMobile||function(){var e=window.document.createDocumentFragment();if(w.calendarContainer=s(\"div\",\"flatpickr-calendar\"),w.calendarContainer.tabIndex=-1,!w.config.noCalendar){if(e.appendChild((w.monthNav=s(\"div\",\"flatpickr-months\"),w.yearElements=[],w.monthElements=[],w.prevMonthNav=s(\"span\",\"flatpickr-prev-month\"),w.prevMonthNav.innerHTML=w.config.prevArrow,w.nextMonthNav=s(\"span\",\"flatpickr-next-month\"),w.nextMonthNav.innerHTML=w.config.nextArrow,q(),Object.defineProperty(w,\"_hidePrevMonthArrow\",{get:function(){return w.__hidePrevMonthArrow},set:function(e){w.__hidePrevMonthArrow!==e&&(d(w.prevMonthNav,\"flatpickr-disabled\",e),w.__hidePrevMonthArrow=e)}}),Object.defineProperty(w,\"_hideNextMonthArrow\",{get:function(){return w.__hideNextMonthArrow},set:function(e){w.__hideNextMonthArrow!==e&&(d(w.nextMonthNav,\"flatpickr-disabled\",e),w.__hideNextMonthArrow=e)}}),w.currentYearElement=w.yearElements[0],De(),w.monthNav)),w.innerContainer=s(\"div\",\"flatpickr-innerContainer\"),w.config.weekNumbers){var n=function(){w.calendarContainer.classList.add(\"hasWeeks\");var e=s(\"div\",\"flatpickr-weekwrapper\");e.appendChild(s(\"span\",\"flatpickr-weekday\",w.l10n.weekAbbreviation));var n=s(\"div\",\"flatpickr-weeks\");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,a=n.weekNumbers;w.innerContainer.appendChild(t),w.weekNumbers=a,w.weekWrapper=t}w.rContainer=s(\"div\",\"flatpickr-rContainer\"),w.rContainer.appendChild($()),w.daysContainer||(w.daysContainer=s(\"div\",\"flatpickr-days\"),w.daysContainer.tabIndex=-1),J(),w.rContainer.appendChild(w.daysContainer),w.innerContainer.appendChild(w.rContainer),e.appendChild(w.innerContainer)}w.config.enableTime&&e.appendChild(function(){w.calendarContainer.classList.add(\"hasTime\"),w.config.noCalendar&&w.calendarContainer.classList.add(\"noCalendar\"),w.timeContainer=s(\"div\",\"flatpickr-time\"),w.timeContainer.tabIndex=-1;var e=s(\"span\",\"flatpickr-time-separator\",\":\"),n=m(\"flatpickr-hour\",{\"aria-label\":w.l10n.hourAriaLabel});w.hourElement=n.getElementsByTagName(\"input\")[0];var t=m(\"flatpickr-minute\",{\"aria-label\":w.l10n.minuteAriaLabel});if(w.minuteElement=t.getElementsByTagName(\"input\")[0],w.hourElement.tabIndex=w.minuteElement.tabIndex=-1,w.hourElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getHours():w.config.time_24hr?w.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(w.config.defaultHour)),w.minuteElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getMinutes():w.config.defaultMinute),w.hourElement.setAttribute(\"step\",w.config.hourIncrement.toString()),w.minuteElement.setAttribute(\"step\",w.config.minuteIncrement.toString()),w.hourElement.setAttribute(\"min\",w.config.time_24hr?\"0\":\"1\"),w.hourElement.setAttribute(\"max\",w.config.time_24hr?\"23\":\"12\"),w.minuteElement.setAttribute(\"min\",\"0\"),w.minuteElement.setAttribute(\"max\",\"59\"),w.timeContainer.appendChild(n),w.timeContainer.appendChild(e),w.timeContainer.appendChild(t),w.config.time_24hr&&w.timeContainer.classList.add(\"time24hr\"),w.config.enableSeconds){w.timeContainer.classList.add(\"hasSeconds\");var a=m(\"flatpickr-second\");w.secondElement=a.getElementsByTagName(\"input\")[0],w.secondElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getSeconds():w.config.defaultSeconds),w.secondElement.setAttribute(\"step\",w.minuteElement.getAttribute(\"step\")),w.secondElement.setAttribute(\"min\",\"0\"),w.secondElement.setAttribute(\"max\",\"59\"),w.timeContainer.appendChild(s(\"span\",\"flatpickr-time-separator\",\":\")),w.timeContainer.appendChild(a)}return w.config.time_24hr||(w.amPM=s(\"span\",\"flatpickr-am-pm\",w.l10n.amPM[r((w.latestSelectedDateObj?w.hourElement.value:w.config.defaultHour)>11)]),w.amPM.title=w.l10n.toggleTitle,w.amPM.tabIndex=-1,w.timeContainer.appendChild(w.amPM)),w.timeContainer}()),d(w.calendarContainer,\"rangeMode\",\"range\"===w.config.mode),d(w.calendarContainer,\"animate\",!0===w.config.animate),d(w.calendarContainer,\"multiMonth\",w.config.showMonths>1),w.calendarContainer.appendChild(e);var i=void 0!==w.config.appendTo&&void 0!==w.config.appendTo.nodeType;if((w.config.inline||w.config.static)&&(w.calendarContainer.classList.add(w.config.inline?\"inline\":\"static\"),w.config.inline&&(!i&&w.element.parentNode?w.element.parentNode.insertBefore(w.calendarContainer,w._input.nextSibling):void 0!==w.config.appendTo&&w.config.appendTo.appendChild(w.calendarContainer)),w.config.static)){var l=s(\"div\",\"flatpickr-wrapper\");w.element.parentNode&&w.element.parentNode.insertBefore(l,w.element),l.appendChild(w.element),w.altInput&&l.appendChild(w.altInput),l.appendChild(w.calendarContainer)}w.config.static||w.config.inline||(void 0!==w.config.appendTo?w.config.appendTo:window.document.body).appendChild(w.calendarContainer)}(),function(){if(w.config.wrap&&[\"open\",\"close\",\"toggle\",\"clear\"].forEach((function(e){Array.prototype.forEach.call(w.element.querySelectorAll(\"[data-\"+e+\"]\"),(function(n){return N(n,\"click\",w[e])}))})),w.isMobile)!function(){var e=w.config.enableTime?w.config.noCalendar?\"time\":\"datetime-local\":\"date\";w.mobileInput=s(\"input\",w.input.className+\" flatpickr-mobile\"),w.mobileInput.tabIndex=1,w.mobileInput.type=e,w.mobileInput.disabled=w.input.disabled,w.mobileInput.required=w.input.required,w.mobileInput.placeholder=w.input.placeholder,w.mobileFormatStr=\"datetime-local\"===e?\"Y-m-d\\\\TH:i:S\":\"date\"===e?\"Y-m-d\":\"H:i:S\",w.selectedDates.length>0&&(w.mobileInput.defaultValue=w.mobileInput.value=w.formatDate(w.selectedDates[0],w.mobileFormatStr)),w.config.minDate&&(w.mobileInput.min=w.formatDate(w.config.minDate,\"Y-m-d\")),w.config.maxDate&&(w.mobileInput.max=w.formatDate(w.config.maxDate,\"Y-m-d\")),w.input.getAttribute(\"step\")&&(w.mobileInput.step=String(w.input.getAttribute(\"step\"))),w.input.type=\"hidden\",void 0!==w.altInput&&(w.altInput.type=\"hidden\");try{w.input.parentNode&&w.input.parentNode.insertBefore(w.mobileInput,w.input.nextSibling)}catch(e){}N(w.mobileInput,\"change\",(function(e){w.setDate(g(e).value,!1,w.mobileFormatStr),pe(\"onChange\"),pe(\"onClose\")}))}();else{var e=l(ie,50);if(w._debouncedChange=l(A,300),w.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&N(w.daysContainer,\"mouseover\",(function(e){\"range\"===w.config.mode&&ae(g(e))})),N(window.document.body,\"keydown\",te),w.config.inline||w.config.static||N(window,\"resize\",e),void 0!==window.ontouchstart?N(window.document,\"touchstart\",Z):N(window.document,\"click\",Z),N(window.document,\"focus\",Z,{capture:!0}),!0===w.config.clickOpens&&(N(w._input,\"focus\",w.open),N(w._input,\"click\",w.open)),void 0!==w.daysContainer&&(N(w.monthNav,\"click\",Ce),N(w.monthNav,[\"keyup\",\"increment\"],F),N(w.daysContainer,\"click\",ue)),void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement){var n=function(e){return g(e).select()};N(w.timeContainer,[\"increment\"],T),N(w.timeContainer,\"blur\",T,{capture:!0}),N(w.timeContainer,\"click\",Y),N([w.hourElement,w.minuteElement],[\"focus\",\"click\"],n),void 0!==w.secondElement&&N(w.secondElement,\"focus\",(function(){return w.secondElement&&w.secondElement.select()})),void 0!==w.amPM&&N(w.amPM,\"click\",(function(e){T(e),A()}))}w.config.allowInput&&N(w._input,\"blur\",ne)}}(),(w.selectedDates.length||w.config.noCalendar)&&(w.config.enableTime&&S(w.config.noCalendar?w.latestSelectedDateObj||w.config.minDate:void 0),be(!1)),E();var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!w.isMobile&&n&&ce(),pe(\"onReady\")}(),w}function E(e,n){for(var t=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],i=0;ie.charAt(0)===e.charAt(0).toUpperCase()));for(const i of o)e[i]=t[i];return e}class u extends l.PanelHTMLBoxView{connect_signals(){super.connect_signals();const{data:e,mapbox_api_key:t,tooltip:o,layers:i,initialViewState:a,data_sources:n}=this.model.properties;this.on_change([t,o],(()=>this.render())),this.on_change([e,a],(()=>this.updateDeck())),this.on_change([i],(()=>this._update_layers())),this.on_change([n],(()=>this._connect_sources(!0))),this._layer_map={},this._connected=[],this._connect_sources()}_update_layers(){this._layer_map={},this._update_data(!0)}_connect_sources(e=!1){for(const e of this.model.data_sources)this._connected.indexOf(e)<0&&(this.connect(e.properties.data.change,(()=>this._update_data(!0))),this._connected.push(e));this._update_data(e)}initialize(){if(super.initialize(),window.deck.JSONConverter){const{CSVLoader:e,Tile3DLoader:t}=window.loaders;window.loaders.registerLoaders([t,e]);const o={classes:p(),enumerations:{COORDINATE_SYSTEM:window.deck.COORDINATE_SYSTEM,GL:h.default},constants:{Tile3DLoader:t}};this.jsonConverter=new window.deck.JSONConverter({configuration:o})}}_update_data(e=!0){let t=0;for(const e of this.model.layers){let o;if(t+=1,t-1 in this._layer_map)o=this.model.data_sources[this._layer_map[t-1]];else{if(\"number\"!=typeof e.data)continue;this._layer_map[t-1]=e.data,o=this.model.data_sources[e.data]}e.data=d.transform_cds_to_records(o)}e&&this.updateDeck()}_on_click_event(e){const t={coordinate:e.coordinate,lngLat:e.lngLat,index:e.index};this.model.clickState=t}_on_hover_event(e){if(null==e.coordinate)return;const t={coordinate:e.coordinate,lngLat:e.lngLat,index:e.index};this.model.hoverState=t}_on_viewState_event(e){this.model.viewState=e.viewState}getData(){return Object.assign(Object.assign({},this.model.data),{layers:this.model.layers,initialViewState:this.model.initialViewState,onViewStateChange:e=>this._on_viewState_event(e),onClick:e=>this._on_click_event(e),onHover:e=>this._on_hover_event(e)})}updateDeck(){if(!this.deckGL)return void this.render();const e=this.getData();if(window.deck.updateDeck)window.deck.updateDeck(e,this.deckGL);else{const t=this.jsonConverter.convert(e);this.deckGL.setProps(t)}}createDeck({mapboxApiKey:e,container:t,jsonInput:o,tooltip:i}){let a;try{const n=this.jsonConverter.convert(o),s=_.makeTooltip(i,n.layers);a=new window.deck.DeckGL(Object.assign(Object.assign({},n),{map:window.mapboxgl,mapboxApiAccessToken:e,container:t,getTooltip:s}))}catch(e){console.error(e)}return a}render(){super.render();const e=s.div({class:\"deckgl\"});l.set_size(e,this.model);const t=this.model.mapbox_api_key,o=this.model.tooltip,i=this.getData();window.deck.createDeck?this.deckGL=window.deck.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}):this.deckGL=this.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}),this.el.appendChild(e)}}o.DeckGLPlotView=u,u.__name__=\"DeckGLPlotView\";class k extends c.HTMLBox{constructor(e){super(e)}static init_DeckGLPlot(){this.prototype.default_view=u,this.define((({Any:e,Array:t,String:o,Ref:i})=>({data:[e],data_sources:[t(i(r.ColumnDataSource)),[]],clickState:[e,{}],hoverState:[e,{}],initialViewState:[e,{}],layers:[t(e),[]],mapbox_api_key:[o,\"\"],tooltip:[e,{}],viewState:[e,{}]}))),this.override({height:400,width:600})}}o.DeckGLPlot=k,k.__name__=\"DeckGLPlot\",k.__module__=\"panel.models.deckgl\",k.init_DeckGLPlot()},\n", " \"6e04fbe567\": function _(t,e,n,i,l){\n", " /*\n", @@ -1697,14 +1710,14 @@ " \"0c8122087b\": function _(r,t,e,n,f){var i=Array.isArray,o=Object.keys,u=Object.prototype.hasOwnProperty;t.exports=function r(t,e){if(t===e)return!0;if(t&&e&&\"object\"==typeof t&&\"object\"==typeof e){var n,f,a,c=i(t),g=i(e);if(c&&g){if((f=t.length)!=e.length)return!1;for(n=f;0!=n--;)if(!r(t[n],e[n]))return!1;return!0}if(c!=g)return!1;var p=t instanceof Date,s=e instanceof Date;if(p!=s)return!1;if(p&&s)return t.getTime()==e.getTime();var y=t instanceof RegExp,l=e instanceof RegExp;if(y!=l)return!1;if(y&&l)return t.toString()==e.toString();var h=o(t);if((f=h.length)!==o(e).length)return!1;for(n=f;0!=n--;)if(!u.call(e,h[n]))return!1;for(n=f;0!=n--;)if(!r(t[a=h[n]],e[a]))return!1;return!0}return t!=t&&e!=e}},\n", " \"3329d4aa5b\": function _(e,t,o,a,i){function n(e){const t={type:e.type};return\"value\"in e.target&&(t.value=e.target.value),e.type in c&&Object.assign(t,c[e.type](e)),t}a(),o.serializeEvent=n;const r={clipboard:e=>({clipboardData:e.clipboardData}),composition:e=>({data:e.data}),keyboard:e=>({altKey:e.altKey,charCode:e.charCode,ctrlKey:e.ctrlKey,key:e.key,keyCode:e.keyCode,locale:e.locale||null,location:e.location,metaKey:e.metaKey,repeat:e.repeat,shiftKey:e.shiftKey,which:e.which}),mouse:e=>({altKey:e.altKey,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,metaKey:e.metaKey,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey}),pointer:e=>({pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary}),touch:e=>({altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),ui:e=>({detail:e.detail}),wheel:e=>({deltaMode:e.deltaMode,deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ}),animation:e=>({animationName:e.animationName,pseudoElement:e.pseudoElement,elapsedTime:e.elapsedTime}),transition:e=>({propertyName:e.propertyName,pseudoElement:e.pseudoElement,elapsedTime:e.elapsedTime})},l={clipboard:[\"copy\",\"cut\",\"paste\"],composition:[\"compositionend\",\"compositionstart\",\"compositionupdate\"],keyboard:[\"keydown\",\"keypress\",\"keyup\"],mouse:[\"click\",\"contextmenu\",\"doubleclick\",\"drag\",\"dragend\",\"dragenter\",\"dragexit\",\"dragleave\",\"dragover\",\"dragstart\",\"drop\",\"mousedown\",\"mouseenter\",\"mouseleave\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\"],pointer:[\"pointerdown\",\"pointermove\",\"pointerup\",\"pointercancel\",\"gotpointercapture\",\"lostpointercapture\",\"pointerenter\",\"pointerleave\",\"pointerover\",\"pointerout\"],selection:[\"select\"],touch:[\"touchcancel\",\"touchend\",\"touchmove\",\"touchstart\"],ui:[\"scroll\"],wheel:[\"wheel\"],animation:[\"animationstart\",\"animationend\",\"animationiteration\"],transition:[\"transitionend\"]},c={};Object.keys(l).forEach((e=>{l[e].forEach((t=>{c[t]=r[e]}))})),o.default=n},\n", " \"0eae77d68f\": function _(e,i,t,n,d){n();const s=e(\"@bokehjs/models/layouts/html_box\"),l=e(\"7116a7a602\"),o=window.Jupyter;class a extends l.PanelHTMLBoxView{constructor(){super(...arguments),this.rendered=!1}render(){super.render(),this._render().then((()=>{this.rendered=!0,this.invalidate_layout(),this.notify_finished()}))}has_finished(){return this.rendered&&super.has_finished()}async _render(){const{spec:e,state:i}=this.model.bundle;let t;if(null!=o&&null!=o.notebook?t=o.notebook.kernel.widget_manager:null!=window.PyViz.widget_manager&&(t=window.PyViz.widget_manager),t)if(null==this.ipyview){const n=(await t.set_state(i)).find((i=>i.model_id==e.model_id));if(null!=n){const e=await t.create_view(n,{el:this.el});if(this.ipyview=e,e.children_views)for(const i of e.children_views.views)await i;this.el.appendChild(e.el),e.trigger(\"displayed\",e)}}else this.el.appendChild(this.ipyview.el);else console.log(\"Panel IPyWidget model could not find a WidgetManager\")}}t.IPyWidgetView=a,a.__name__=\"IPyWidgetView\";class r extends s.HTMLBox{constructor(e){super(e)}static init_IPyWidget(){this.prototype.default_view=a,this.define((({Any:e})=>({bundle:[e,{}]})))}}t.IPyWidget=r,r.__name__=\"IPyWidget\",r.__module__=\"panel.models.ipywidget\",r.init_IPyWidget()},\n", - " \"5284fdbb37\": function _(e,t,r,s,n){s();const i=e(\"tslib\"),o=e(\"@bokehjs/core/kinds\"),d=e(\"@bokehjs/models/widgets/markup\"),l=i.__importDefault(e(\"18bba7b7e1\")),a=e(\"7116a7a602\");class h extends a.PanelMarkupView{connect_signals(){super.connect_signals();const{depth:e,hover_preview:t,theme:r}=this.model.properties;this.on_change([e,t,r],(()=>this.render()))}render(){super.render();const e=this.model.text.replace(/(\\r\\n|\\n|\\r)/gm,\"\").replace(\"'\",'\"');let t;try{t=window.JSON.parse(e)}catch(e){return void(this.markup_el.innerHTML=\"Invalid JSON: \"+e.toString())}const r={hoverPreviewEnabled:this.model.hover_preview,theme:this.model.theme},s=null==this.model.depth?1/0:this.model.depth,n=new l.default(t,s,r).render();let i=\"border-radius: 5px; padding: 10px;\";\"dark\"==this.model.theme?n.style.cssText=\"background-color: rgb(30, 30, 30);\"+i:n.style.cssText=i,this.markup_el.append(n)}}r.JSONView=h,h.__name__=\"JSONView\",r.JSONTheme=o.Enum(\"dark\",\"light\");class p extends d.Markup{constructor(e){super(e)}static init_JSON(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t,Nullable:s})=>({depth:[s(t),1],hover_preview:[e,!1],theme:[r.JSONTheme,\"dark\"]})))}}r.JSON=p,p.__name__=\"JSON\",p.__module__=\"panel.models.markup\",p.init_JSON()},\n", + " \"0d30bea0c8\": function _(e,t,r,s,n){s();const i=e(\"tslib\"),o=e(\"@bokehjs/core/kinds\"),d=e(\"@bokehjs/models/widgets/markup\"),l=i.__importDefault(e(\"18bba7b7e1\")),a=e(\"7116a7a602\");class h extends a.PanelMarkupView{connect_signals(){super.connect_signals();const{depth:e,hover_preview:t,theme:r}=this.model.properties;this.on_change([e,t,r],(()=>this.render()))}render(){super.render();const e=this.model.text.replace(/(\\r\\n|\\n|\\r)/gm,\"\");let t;try{t=window.JSON.parse(e)}catch(e){return void(this.markup_el.innerHTML=\"Invalid JSON: \"+e.toString())}const r={hoverPreviewEnabled:this.model.hover_preview,theme:this.model.theme},s=null==this.model.depth?1/0:this.model.depth,n=new l.default(t,s,r).render();let i=\"border-radius: 5px; padding: 10px;\";\"dark\"==this.model.theme?n.style.cssText=\"background-color: rgb(30, 30, 30);\"+i:n.style.cssText=i,this.markup_el.append(n)}}r.JSONView=h,h.__name__=\"JSONView\",r.JSONTheme=o.Enum(\"dark\",\"light\");class p extends d.Markup{constructor(e){super(e)}static init_JSON(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t,Nullable:s})=>({depth:[s(t),1],hover_preview:[e,!1],theme:[r.JSONTheme,\"dark\"]})))}}r.JSON=p,p.__name__=\"JSON\",p.__module__=\"panel.models.markup\",p.init_JSON()},\n", " \"18bba7b7e1\": function _(t,e,r,n,o){function i(t){return null===t?\"null\":typeof t}function s(t){return!!t&&\"object\"==typeof t}function a(t){if(void 0===t)return\"\";if(null===t)return\"Object\";if(\"object\"==typeof t&&!t.constructor)return\"Object\";var e=/function ([^(]*)/.exec(t.constructor.toString());return e&&e.length>1?e[1]:\"\"}function f(t,e,r){return\"null\"===t||\"undefined\"===t?t:(\"string\"!==t&&\"stringifiable\"!==t||(r='\"'+r.replace(/\"/g,'\\\\\"')+'\"'),\"function\"===t?e.toString().replace(/[\\r\\n]/g,\"\").replace(/\\{.*\\}/,\"\")+\"{…}\":r)}function m(t){var e=\"\";return s(t)?(e=a(t),Array.isArray(t)&&(e+=\"[\"+t.length+\"]\")):e=f(i(t),t,t),e}function l(t){return\"json-formatter-\"+t}function d(t,e,r){var n=document.createElement(t);return e&&n.classList.add(l(e)),void 0!==r&&(r instanceof Node?n.appendChild(r):n.appendChild(document.createTextNode(String(r)))),n}n(),function(t){if(\"undefined\"!=typeof window){var e=document.createElement(\"style\");e.setAttribute(\"media\",\"screen\"),e.innerHTML=t,document.head.appendChild(e)}}('.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n');var c=/(^\\d{1,4}[\\.|\\\\/|-]\\d{1,2}[\\.|\\\\/|-]\\d{1,4})(\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\d:[0-5])\\d\\s*[ap]m)?$/,p=/\\d{2}:\\d{2}:\\d{2} GMT-\\d{4}/,j=/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/,h=window.requestAnimationFrame||function(t){return t(),0},u={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null},g=function(){function t(t,e,r,n){void 0===e&&(e=1),void 0===r&&(r=u),this.json=t,this.open=e,this.config=r,this.key=n,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=u.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=u.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=u.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=u.useToJSON),\"\"===this.key&&(this.key='\"\"')}return Object.defineProperty(t.prototype,\"isOpen\",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isDate\",{get:function(){return this.json instanceof Date||\"string\"===this.type&&(c.test(this.json)||j.test(this.json)||p.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isUrl\",{get:function(){return\"string\"===this.type&&0===this.json.indexOf(\"http\")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isArray\",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isObject\",{get:function(){return s(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isEmptyObject\",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isEmpty\",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"useToJSON\",{get:function(){return this.config.useToJSON&&\"stringifiable\"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"hasKey\",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"constructorName\",{get:function(){return a(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"type\",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?\"stringifiable\":i(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"keys\",{get:function(){if(this.isObject){var t=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!0,configurable:!0}),t.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(l(\"open\")))},t.prototype.openAtDepth=function(t){void 0===t&&(t=1),t<0||(this.open=t,this.isOpen=0!==t,this.element&&(this.removeChildren(!1),0===t?this.element.classList.remove(l(\"open\")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(l(\"open\")))))},t.prototype.getInlinepreview=function(){var t=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?\"Array[\"+this.json.length+\"]\":\"[\"+this.json.map(m).join(\", \")+\"]\";var e=this.keys,r=e.slice(0,this.config.hoverPreviewFieldCount).map((function(e){return e+\":\"+m(t.json[e])})),n=e.length>=this.config.hoverPreviewFieldCount?\"…\":\"\";return\"{\"+r.join(\", \")+n+\"}\"},t.prototype.render=function(){this.element=d(\"div\",\"row\");var t=this.isObject?d(\"a\",\"toggler-link\"):d(\"span\");if(this.isObject&&!this.useToJSON&&t.appendChild(d(\"span\",\"toggler\")),this.hasKey&&t.appendChild(d(\"span\",\"key\",this.key+\":\")),this.isObject&&!this.useToJSON){var e=d(\"span\",\"value\"),r=d(\"span\"),n=d(\"span\",\"constructor-name\",this.constructorName);if(r.appendChild(n),this.isArray){var o=d(\"span\");o.appendChild(d(\"span\",\"bracket\",\"[\")),o.appendChild(d(\"span\",\"number\",this.json.length)),o.appendChild(d(\"span\",\"bracket\",\"]\")),r.appendChild(o)}e.appendChild(r),t.appendChild(e)}else{(e=this.isUrl?d(\"a\"):d(\"span\")).classList.add(l(this.type)),this.isDate&&e.classList.add(l(\"date\")),this.isUrl&&(e.classList.add(l(\"url\")),e.setAttribute(\"href\",this.json));var i=f(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(i)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var s=d(\"span\",\"preview-text\");s.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(s)}var a=d(\"div\",\"children\");return this.isObject&&a.classList.add(l(\"object\")),this.isArray&&a.classList.add(l(\"array\")),this.isEmpty&&a.classList.add(l(\"empty\")),this.config&&this.config.theme&&this.element.classList.add(l(this.config.theme)),this.isOpen&&this.element.classList.add(l(\"open\")),this.element.appendChild(t),this.element.appendChild(a),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener(\"click\",this.toggleOpen.bind(this)),this.element},t.prototype.appendChildren=function(e){var r=this;void 0===e&&(e=!1);var n=this.element.querySelector(\"div.\"+l(\"children\"));if(n&&!this.isEmpty)if(e){var o=0,i=function(){var e=r.keys[o],s=new t(r.json[e],r.open-1,r.config,e);n.appendChild(s.render()),(o+=1)10?i():h(i))};h(i)}else this.keys.forEach((function(e){var o=new t(r.json[e],r.open-1,r.config,e);n.appendChild(o.render())}))},t.prototype.removeChildren=function(t){void 0===t&&(t=!1);var e=this.element.querySelector(\"div.\"+l(\"children\"));if(t){var r=0,n=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(r+=1)>10?n():h(n))};h(n)}else e&&(e.innerHTML=\"\")},t}();r.default=g},\n", " \"1767172ffa\": function _(e,t,i,s,l){s();const n=e(\"tslib\"),o=e(\"@bokehjs/models/widgets/input_widget\"),a=n.__importStar(e(\"@bokehjs/styles/buttons.css\")),h=a,d=e(\"@bokehjs/core/dom\"),_=e(\"@bokehjs/core/enums\");class r extends o.InputWidgetView{constructor(){super(...arguments),this._downloadable=!1,this._embed=!1,this._prev_href=\"\",this._prev_download=\"\"}initialize(){super.initialize(),this.model.data&&this.model.filename&&(this._embed=!0)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.button_type.change,(()=>this._update_button_style())),this.connect(this.model.properties.filename.change,(()=>this._update_download())),this.connect(this.model.properties._transfers.change,(()=>this._handle_click())),this.connect(this.model.properties.label.change,(()=>this._update_label())),this.connect(this.model.properties.disabled.change,(()=>this.set_disabled()))}render(){super.render(),this.group_el.style.display=\"flex\",this.group_el.style.alignItems=\"stretch\",this.anchor_el=document.createElement(\"a\"),this._update_button_style(),this._update_label(),this.model.disabled?(this.anchor_el.setAttribute(\"disabled\",\"\"),this._downloadable=!1):(this.anchor_el.removeAttribute(\"disabled\"),this._prev_download&&(this.anchor_el.download=this._prev_download),this._prev_href&&(this.anchor_el.href=this._prev_href),this.anchor_el.download&&this.anchor_el.download&&(this._downloadable=!0)),this._embed?this._make_link_downloadable():(this._click_listener=this._increment_clicks.bind(this),this.anchor_el.addEventListener(\"click\",this._click_listener)),this.group_el.appendChild(this.anchor_el),this.input_el=d.input({type:\"bk_btn, bk_btn_type\"}),this.input_el.addEventListener(\"change\",(()=>this.change_input()))}styles(){return[...super.styles(),a.default]}_increment_clicks(){this.model.clicks=this.model.clicks+1}_handle_click(){!this.model.auto&&this._downloadable||(this._make_link_downloadable(),!this._embed&&this.model.auto&&(this.anchor_el.removeEventListener(\"click\",this._click_listener),this.anchor_el.click(),this.anchor_el.removeAttribute(\"href\"),this.anchor_el.removeAttribute(\"download\"),this.anchor_el.addEventListener(\"click\",this._click_listener)),this._prev_href=this.anchor_el.getAttribute(\"href\"),this._prev_download=this.anchor_el.getAttribute(\"download\"))}_make_link_downloadable(){this._update_href(),this._update_download(),this.anchor_el.download&&this.anchor_el.href&&(this._downloadable=!0)}_update_href(){if(this.model.data){const e=function(e){const t=atob(e.split(\",\")[1]),i=e.split(\",\")[0].split(\":\")[1].split(\";\")[0],s=new ArrayBuffer(t.length),l=new Uint8Array(s);for(let e=0;e({auto:[e,!1],clicks:[t,0],data:[i(s),null],label:[s,\"Download\"],filename:[i(s),null],button_type:[_.ButtonType,\"default\"],_transfers:[t,0]}))),this.override({title:\"\"})}}i.FileDownload=c,c.__name__=\"FileDownload\",c.__module__=\"panel.models.widgets\",c.init_FileDownload()},\n", " \"7b859fb3cf\": function _(e,t,i,a,n){a();const s=e(\"@bokehjs/models/widgets/markup\"),r=e(\"7116a7a602\");class l extends r.PanelMarkupView{render(){super.render(),this.markup_el.innerHTML=this.model.text,window.renderMathInElement&&window.renderMathInElement(this.el,{delimiters:[{left:\"$$\",right:\"$$\",display:!0},{left:\"\\\\[\",right:\"\\\\]\",display:!0},{left:\"$\",right:\"$\",display:!1},{left:\"\\\\(\",right:\"\\\\)\",display:!1}]})}}i.KaTeXView=l,l.__name__=\"KaTeXView\";class d extends s.Markup{constructor(e){super(e)}static init_KaTeX(){this.prototype.default_view=l}}i.KaTeX=d,d.__name__=\"KaTeX\",d.__module__=\"panel.models.katex\",d.init_KaTeX()},\n", " \"642aa56b24\": function _(o,e,t,i,a){i();const h=o(\"@bokehjs/core/view\"),n=o(\"@bokehjs/model\");class s extends h.View{initialize(){super.initialize(),this.model.pathname=window.location.pathname,this.model.search=window.location.search,this.model.hash=window.location.hash,this.model.href=window.location.href,this.model.hostname=window.location.hostname,this.model.protocol=window.location.protocol,this.model.port=window.location.port}connect_signals(){super.connect_signals(),this.connect(this.model.properties.pathname.change,(()=>this.update(\"pathname\"))),this.connect(this.model.properties.search.change,(()=>this.update(\"search\"))),this.connect(this.model.properties.hash.change,(()=>this.update(\"hash\"))),this.connect(this.model.properties.reload.change,(()=>this.update(\"reload\")))}update(o){this.model.reload&&\"reload\"!==o?(\"pathname\"==o&&(window.location.pathname=this.model.pathname),\"search\"==o&&(window.location.search=this.model.search),\"hash\"==o&&(window.location.hash=this.model.hash)):(window.history.pushState({},\"\",`${this.model.pathname}${this.model.search}${this.model.hash}`),this.model.href=window.location.href,\"reload\"===o&&window.location.reload())}}t.LocationView=s,s.__name__=\"LocationView\";class c extends n.Model{constructor(o){super(o)}static init_Location(){this.prototype.default_view=s,this.define((({Boolean:o,String:e})=>({href:[e,\"\"],hostname:[e,\"\"],pathname:[e,\"\"],protocol:[e,\"\"],port:[e,\"\"],search:[e,\"\"],hash:[e,\"\"],reload:[o,!1]})))}}t.Location=c,c.__name__=\"Location\",c.__module__=\"panel.models.location\",c.init_Location()},\n", " \"0c21036737\": function _(e,t,a,i,s){i();const h=e(\"@bokehjs/models/widgets/markup\"),_=e(\"7116a7a602\");class n extends _.PanelMarkupView{initialize(){super.initialize(),this._hub=window.MathJax.Hub,this._hub.Config({tex2jax:{inlineMath:[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]]}})}render(){super.render(),this._hub&&(this.markup_el.innerHTML=this.model.text,this._hub.Queue([\"Typeset\",this._hub,this.markup_el]))}}a.MathJaxView=n,n.__name__=\"MathJaxView\";class u extends h.Markup{constructor(e){super(e)}static init_MathJax(){this.prototype.default_view=n}}a.MathJax=u,u.__name__=\"MathJax\",u.__module__=\"panel.models.mathjax\",u.init_MathJax()},\n", - " \"545156b57b\": function _(e,t,i,s,n){s();const o=e(\"@bokehjs/models/layouts/html_box\"),l=e(\"@bokehjs/core/dom\"),r=e(\"@bokehjs/models/sources/column_data_source\"),c=e(\"7116a7a602\"),h=[\"perspective-viewer-material\",\"perspective-viewer-material-dark\",\"perspective-viewer-material-dense\",\"perspective-viewer-material-dense-dark\",\"perspective-viewer-vaporwave\"];function p(e){return!h.includes(e)}function a(e){return\"perspective-viewer-\"+e}class u extends c.PanelHTMLBoxView{constructor(){super(...arguments),this._updating=!1,this._config_listener=null,this._event_listener=null,this._loaded=!1}connect_signals(){super.connect_signals(),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.properties.toggle_config.change,(()=>{this.perspective_element.toggleConfig(),this.fix_layout()})),this.connect(this.model.properties.columns.change,(()=>{this.updateAttribute(\"columns\",this.model.columns,!0)})),this.connect(this.model.properties.computed_columns.change,(()=>{this.updateAttribute(\"computed-columns\",this.model.computed_columns,!0)})),this.connect(this.model.properties.column_pivots.change,(()=>{this.updateAttribute(\"column-pivots\",this.model.column_pivots,!0)})),this.connect(this.model.properties.row_pivots.change,(()=>{this.updateAttribute(\"row-pivots\",this.model.row_pivots,!0)})),this.connect(this.model.properties.aggregates.change,(()=>{this.updateAttribute(\"aggregates\",this.model.aggregates,!0)})),this.connect(this.model.properties.filters.change,(()=>{this.updateAttribute(\"filters\",this.model.filters,!0)})),this.connect(this.model.properties.sort.change,(()=>{this.updateAttribute(\"sort\",this.model.sort,!0)})),this.connect(this.model.properties.plugin.change,(()=>{this.updateAttribute(\"plugin\",this.model.plugin,!1)})),this.connect(this.model.properties.selectable.change,(()=>{this.updateAttribute(\"selectable\",this.model.selectable,!0)})),this.connect(this.model.properties.editable.change,(()=>{this.updateAttribute(\"editable\",this.model.editable,!0)})),this.connect(this.model.properties.theme.change,(()=>this.updateTheme())),null!=this.model.document&&(this._event_listener=e=>this.on_event(e),this.model.document.on_change(this._event_listener))}disconnect_signals(){null!=this._config_listener&&this.perspective_element.removeEventListener(\"perspective-config-update\",this._config_listener),this._config_listener=null,null!=this.model.document&&null!=this._event_listener&&this.model.document.remove_on_change(this._event_listener),this._event_listener=null,super.disconnect_signals()}render(){super.render(),this.worker=window.perspective.worker(),this.table=this.worker.table(this.data);const e=l.div({class:\"pnx-perspective-viewer\"});c.set_size(e,this.model),e.innerHTML=this.getInnerHTML(),this.perspective_element=e.children[0],c.set_size(this.perspective_element,this.model),this.el.appendChild(e),this.perspective_element.load(this.table).then((()=>{this.update_config(),this._config_listener=()=>this.sync_config(),this.model.toggle_config&&this.perspective_element.toggleConfig(),this.perspective_element.addEventListener(\"perspective-config-update\",this._config_listener),this._loaded=!0}))}fix_layout(){this.update_layout(),this.compute_layout(),this.invalidate_layout()}sync_config(){if(this._updating)return;const e=this.perspective_element.save(),t={};for(const i in e){const s=i.replace(\"-\",\"_\"),n=e[i];void 0===n||\"plugin\"==s&&\"debug\"===n||(t[s]=n)}this._updating=!0,this.model.setv(t),this._updating=!1}update_config(){if(this._updating)return;const e=this.perspective_element.save();for(const t in e){const i=t.replace(\"-\",\"_\");let s=this.model.property(i).get_value();e[t]!==s&&(this._updating=!0,\"plugin\"!==i&&(s=JSON.stringify(s)),this.perspective_element.setAttribute(t,s),this._updating=!1)}}on_event(e){null!=(e=e.hint)&&null!=e.column_source&&e.column_source.id==this.model.source.id&&(void 0!==e.rollover?this.stream(e.data,e.rollover):void 0!==e.patches&&this.patch(e.patches))}get data(){const e={};for(const t of this.model.source.columns())e[t]=this.model.source.get_array(t);return e}stream(e,t){this._loaded&&(null==t?this.table.update(e):this.table.replace(this.data))}patch(e){this.table.replace(this.data)}getInnerHTML(){let e=\"\",e}setData(){this._loaded&&this.table.load(this.data)}updateAttribute(e,t,i){if(this._updating)return;t!=this.perspective_element.save()[e]&&(i&&(t=JSON.stringify(t)),this._updating=!0,this.perspective_element.setAttribute(e,t),this._updating=!1)}updateTheme(){let e=this.perspective_element.getAttribute(\"class\"),t=this.toNewClassAttribute(e,this.model.theme);this.perspective_element.setAttribute(\"class\",t)}toNewClassAttribute(e,t){let i=[];return null!=e&&(i=e.split(\" \").filter(p)),i.push(a(t)),i.join(\" \")}}i.PerspectiveView=u,u.__name__=\"PerspectiveView\";class d extends o.HTMLBox{constructor(e){super(e)}static init_Perspective(){this.prototype.default_view=u,this.define((({Any:e,Array:t,Boolean:i,Ref:s,Nullable:n,String:o})=>({aggregates:[e],column_pivots:[n(t(o))],columns:[t(o)],computed_columns:[n(t(o))],editable:[n(i)],filters:[n(t(e))],plugin:[o],plugin_config:[e],row_pivots:[n(t(o))],selectable:[n(i)],toggle_config:[i,!0],sort:[n(t(t(o)))],source:[s(r.ColumnDataSource)],theme:[o]})))}}i.Perspective=d,d.__name__=\"Perspective\",d.__module__=\"panel.models.perspective\",d.init_Perspective()},\n", - " \"ed9bae6d87\": function _(e,t,i,s,o){s();const l=e(\"@bokehjs/core/kinds\"),n=e(\"@bokehjs/core/dom\"),a=e(\"@bokehjs/models/widgets/widget\");function r(e){e.forEach((e=>e.style.borderStyle=\"inset\"))}function d(e){e.forEach((e=>e.style.borderStyle=\"outset\"))}class h extends a.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.properties.value.change,(()=>this.render())),this.connect(this.model.properties.loop_policy.change,(()=>this.set_loop_state(this.model.loop_policy))),this.connect(this.model.properties.show_loop_controls.change,(()=>{this.model.show_loop_controls&&this.loop_state.parentNode!=this.groupEl?this.groupEl.appendChild(this.loop_state):this.model.show_loop_controls||this.loop_state.parentNode!=this.groupEl||this.el.removeChild(this.loop_state)}))}get_height(){return 250}render(){if(null!=this.sliderEl)return this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),void(this.sliderEl.value=String(this.model.value));super.render(),this.groupEl=n.div(),this.groupEl.style.display=\"flex\",this.groupEl.style.flexDirection=\"column\",this.groupEl.style.alignItems=\"center\",this.sliderEl=document.createElement(\"input\"),this.sliderEl.style.width=\"100%\",this.sliderEl.setAttribute(\"type\",\"range\"),this.sliderEl.value=String(this.model.value),this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),this.sliderEl.onchange=e=>this.set_frame(parseInt(e.target.value));const e=n.div();e.style.cssText=\"margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;\";const t=\"text-align: center; min-width: 20px; flex-grow: 1; margin: 2px\",i=\"text-align: center; min-width: 40px; flex-grow: 2; margin: 2px\",s=document.createElement(\"button\");s.style.cssText=t,s.appendChild(document.createTextNode(\"–\")),s.onclick=()=>this.slower(),e.appendChild(s);const o=document.createElement(\"button\");o.style.cssText=i,o.appendChild(document.createTextNode(\"❚◀◀\")),o.onclick=()=>this.first_frame(),e.appendChild(o);const l=document.createElement(\"button\");l.style.cssText=i,l.appendChild(document.createTextNode(\"❚◀\")),l.onclick=()=>this.previous_frame(),e.appendChild(l);const a=document.createElement(\"button\");a.style.cssText=i,a.appendChild(document.createTextNode(\"◀\")),a.onclick=()=>this.reverse_animation(),e.appendChild(a);const h=document.createElement(\"button\");h.style.cssText=i,h.appendChild(document.createTextNode(\"❚❚\")),h.onclick=()=>this.pause_animation(),e.appendChild(h);const c=document.createElement(\"button\");c.style.cssText=i,c.appendChild(document.createTextNode(\"▶\")),c.onclick=()=>this.play_animation(),e.appendChild(c);const p=document.createElement(\"button\");p.style.cssText=i,p.appendChild(document.createTextNode(\"▶❚\")),p.onclick=()=>this.next_frame(),e.appendChild(p);const m=document.createElement(\"button\");m.style.cssText=i,m.appendChild(document.createTextNode(\"▶▶❚\")),m.onclick=()=>this.last_frame(),e.appendChild(m);const _=document.createElement(\"button\");_.style.cssText=t,_.appendChild(document.createTextNode(\"+\")),_.onclick=()=>this.faster(),e.appendChild(_),this._toggle_reverse=()=>{d([h,c]),r([a])},this._toogle_pause=()=>{d([a,c]),r([h])},this._toggle_play=()=>{d([a,h]),r([c])},this.loop_state=document.createElement(\"form\"),this.loop_state.style.cssText=\"margin: 0 auto; display: table\";const u=document.createElement(\"input\");u.type=\"radio\",u.value=\"once\",u.name=\"state\";const g=document.createElement(\"label\");g.innerHTML=\"Once\",g.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\";const f=document.createElement(\"input\");f.setAttribute(\"type\",\"radio\"),f.setAttribute(\"value\",\"loop\"),f.setAttribute(\"name\",\"state\");const v=document.createElement(\"label\");v.innerHTML=\"Loop\",v.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\";const y=document.createElement(\"input\");y.setAttribute(\"type\",\"radio\"),y.setAttribute(\"value\",\"reflect\"),y.setAttribute(\"name\",\"state\");const x=document.createElement(\"label\");x.innerHTML=\"Reflect\",x.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\",\"once\"==this.model.loop_policy?u.checked=!0:\"loop\"==this.model.loop_policy?f.checked=!0:y.checked=!0,this.loop_state.appendChild(u),this.loop_state.appendChild(g),this.loop_state.appendChild(f),this.loop_state.appendChild(v),this.loop_state.appendChild(y),this.loop_state.appendChild(x),this.groupEl.appendChild(this.sliderEl),this.groupEl.appendChild(e),this.model.show_loop_controls&&this.groupEl.appendChild(this.loop_state),this.el.appendChild(this.groupEl)}set_frame(e){this.model.value!=e&&(this.model.value=e),this.sliderEl.value!=String(e)&&(this.sliderEl.value=String(e))}get_loop_state(){for(var e=this.loop_state.state,t=0;t0?this.play_animation():this.model.direction<0&&this.reverse_animation()}faster(){this.model.interval=Math.round(.7*this.model.interval),this.model.direction>0?this.play_animation():this.model.direction<0&&this.reverse_animation()}anim_step_forward(){if(this.model.valuethis.model.start)this.previous_frame();else{var e=this.get_loop_state();\"loop\"==e?this.last_frame():\"reflect\"==e?(this.first_frame(),this.play_animation()):(this.pause_animation(),this.first_frame())}}pause_animation(){this._toogle_pause(),this.model.direction=0,this.timer&&(clearInterval(this.timer),this.timer=null)}play_animation(){this.pause_animation(),this._toggle_play(),this.model.direction=1,this.timer||(this.timer=setInterval((()=>this.anim_step_forward()),this.model.interval))}reverse_animation(){this.pause_animation(),this._toggle_reverse(),this.model.direction=-1,this.timer||(this.timer=setInterval((()=>this.anim_step_reverse()),this.model.interval))}}i.PlayerView=h,h.__name__=\"PlayerView\",i.LoopPolicy=l.Enum(\"once\",\"loop\",\"reflect\");class c extends a.Widget{constructor(e){super(e)}static init_Player(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t})=>({direction:[t,0],interval:[t,500],start:[t],end:[t],step:[t,1],loop_policy:[i.LoopPolicy,\"once\"],value:[t,0],show_loop_controls:[e,!0]}))),this.override({width:400})}}i.Player=c,c.__name__=\"Player\",c.__module__=\"panel.models.widgets\",c.init_Player()},\n", + " \"84a772681d\": function _(e,t,i,s,n){s();const o=e(\"@bokehjs/models/layouts/html_box\"),l=e(\"@bokehjs/core/dom\"),r=e(\"@bokehjs/models/sources/column_data_source\"),c=e(\"7116a7a602\"),h=[\"perspective-viewer-material\",\"perspective-viewer-material-dark\",\"perspective-viewer-material-dense\",\"perspective-viewer-material-dense-dark\",\"perspective-viewer-vaporwave\"];function a(e){return!h.includes(e)}function p(e){return\"perspective-viewer-\"+e}class u extends c.PanelHTMLBoxView{constructor(){super(...arguments),this._updating=!1,this._config_listener=null,this._event_listener=null,this._loaded=!1}connect_signals(){super.connect_signals(),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.properties.toggle_config.change,(()=>{this.perspective_element.toggleConfig(),this.fix_layout()})),this.connect(this.model.properties.columns.change,(()=>{this.updateAttribute(\"columns\",this.model.columns,!0)})),this.connect(this.model.properties.computed_columns.change,(()=>{this.updateAttribute(\"computed-columns\",this.model.computed_columns,!0)})),this.connect(this.model.properties.column_pivots.change,(()=>{this.updateAttribute(\"column-pivots\",this.model.column_pivots,!0)})),this.connect(this.model.properties.row_pivots.change,(()=>{this.updateAttribute(\"row-pivots\",this.model.row_pivots,!0)})),this.connect(this.model.properties.aggregates.change,(()=>{this.updateAttribute(\"aggregates\",this.model.aggregates,!0)})),this.connect(this.model.properties.filters.change,(()=>{this.updateAttribute(\"filters\",this.model.filters,!0)})),this.connect(this.model.properties.sort.change,(()=>{this.updateAttribute(\"sort\",this.model.sort,!0)})),this.connect(this.model.properties.plugin.change,(()=>{this.updateAttribute(\"plugin\",this.model.plugin,!1)})),this.connect(this.model.properties.selectable.change,(()=>{this.updateAttribute(\"selectable\",this.model.selectable,!0)})),this.connect(this.model.properties.editable.change,(()=>{this.updateAttribute(\"editable\",this.model.editable,!0)})),this.connect(this.model.properties.theme.change,(()=>this.updateTheme())),null!=this.model.document&&(this._event_listener=e=>this.on_event(e),this.model.document.on_change(this._event_listener))}disconnect_signals(){null!=this._config_listener&&this.perspective_element.removeEventListener(\"perspective-config-update\",this._config_listener),this._config_listener=null,null!=this.model.document&&null!=this._event_listener&&this.model.document.remove_on_change(this._event_listener),this._event_listener=null,super.disconnect_signals()}render(){super.render(),this.worker=window.perspective.worker(),this.table=this.worker.table(this.model.schema),this.table.update(this.data);const e=l.div({class:\"pnx-perspective-viewer\",style:{zIndex:0}});c.set_size(e,this.model),e.innerHTML=this.getInnerHTML(),this.perspective_element=e.children[0],c.set_size(this.perspective_element,this.model),this.el.appendChild(e),this.perspective_element.load(this.table).then((()=>{this.update_config(),this._config_listener=()=>this.sync_config(),this.model.toggle_config&&this.perspective_element.toggleConfig(),this.perspective_element.addEventListener(\"perspective-config-update\",this._config_listener),this._loaded=!0}))}fix_layout(){this.update_layout(),this.compute_layout(),this.invalidate_layout()}sync_config(){if(this._updating)return;const e=this.perspective_element.save(),t={};for(const i in e){const s=i.replace(\"-\",\"_\"),n=e[i];void 0===n||\"plugin\"==s&&\"debug\"===n||(t[s]=n)}this._updating=!0,this.model.setv(t),this._updating=!1}update_config(){if(this._updating)return;const e=this.perspective_element.save();for(const t in e){const i=t.replace(\"-\",\"_\");let s=this.model.property(i).get_value();e[t]!==s&&(this._updating=!0,\"plugin\"!==i&&(s=JSON.stringify(s)),this.perspective_element.setAttribute(t,s),this._updating=!1)}}on_event(e){null!=(e=e.hint)&&null!=e.column_source&&e.column_source.id==this.model.source.id&&(void 0!==e.rollover?this.stream(e.data,e.rollover):void 0!==e.patches&&this.patch(e.patches))}get data(){const e={};for(const t of this.model.source.columns())e[t]=this.model.source.get_array(t);return e}stream(e,t){this._loaded&&(null==t?this.table.update(e):this.table.replace(this.data))}patch(e){this.table.replace(this.data)}getInnerHTML(){let e=\"\",e}setData(){this._loaded&&this.table.load(this.data)}updateAttribute(e,t,i){if(this._updating)return;t!=this.perspective_element.save()[e]&&(i&&(t=JSON.stringify(t)),this._updating=!0,this.perspective_element.setAttribute(e,t),this._updating=!1)}updateTheme(){let e=this.perspective_element.getAttribute(\"class\"),t=this.toNewClassAttribute(e,this.model.theme);this.perspective_element.setAttribute(\"class\",t)}toNewClassAttribute(e,t){let i=[];return null!=e&&(i=e.split(\" \").filter(a)),i.push(p(t)),i.join(\" \")}}i.PerspectiveView=u,u.__name__=\"PerspectiveView\";class d extends o.HTMLBox{constructor(e){super(e)}static init_Perspective(){this.prototype.default_view=u,this.define((({Any:e,Array:t,Boolean:i,Ref:s,Nullable:n,String:o})=>({aggregates:[e],column_pivots:[n(t(o))],columns:[t(o)],computed_columns:[n(t(o))],editable:[n(i)],filters:[n(t(e))],plugin:[o],plugin_config:[e],row_pivots:[n(t(o))],selectable:[n(i)],schema:[e,{}],toggle_config:[i,!0],sort:[n(t(t(o)))],source:[s(r.ColumnDataSource)],theme:[o]})))}}i.Perspective=d,d.__name__=\"Perspective\",d.__module__=\"panel.models.perspective\",d.init_Perspective()},\n", + " \"bacb3ef65c\": function _(e,t,i,s,o){s();const l=e(\"@bokehjs/core/kinds\"),n=e(\"@bokehjs/core/dom\"),a=e(\"@bokehjs/models/widgets/widget\");function r(e){e.forEach((e=>e.style.borderStyle=\"inset\"))}function d(e){e.forEach((e=>e.style.borderStyle=\"outset\"))}class h extends a.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.properties.value.change,(()=>this.render())),this.connect(this.model.properties.loop_policy.change,(()=>this.set_loop_state(this.model.loop_policy))),this.connect(this.model.properties.show_loop_controls.change,(()=>{this.model.show_loop_controls&&this.loop_state.parentNode!=this.groupEl?this.groupEl.appendChild(this.loop_state):this.model.show_loop_controls||this.loop_state.parentNode!=this.groupEl||this.el.removeChild(this.loop_state)}))}get_height(){return 250}render(){if(null!=this.sliderEl)return this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),void(this.sliderEl.value=String(this.model.value));super.render(),this.groupEl=n.div(),this.groupEl.style.display=\"flex\",this.groupEl.style.flexDirection=\"column\",this.groupEl.style.alignItems=\"center\",this.sliderEl=document.createElement(\"input\"),this.sliderEl.style.width=\"100%\",this.sliderEl.setAttribute(\"type\",\"range\"),this.sliderEl.value=String(this.model.value),this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),this.sliderEl.onchange=e=>this.set_frame(parseInt(e.target.value));const e=n.div();e.style.cssText=\"margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;\";const t=\"text-align: center; min-width: 20px; flex-grow: 1; margin: 2px\",i=\"text-align: center; min-width: 40px; flex-grow: 2; margin: 2px\",s=document.createElement(\"button\");s.style.cssText=t,s.appendChild(document.createTextNode(\"–\")),s.onclick=()=>this.slower(),e.appendChild(s);const o=document.createElement(\"button\");o.style.cssText=i,o.appendChild(document.createTextNode(\"❚◀◀\")),o.onclick=()=>this.first_frame(),e.appendChild(o);const l=document.createElement(\"button\");l.style.cssText=i,l.appendChild(document.createTextNode(\"❚◀\")),l.onclick=()=>this.previous_frame(),e.appendChild(l);const a=document.createElement(\"button\");a.style.cssText=i,a.appendChild(document.createTextNode(\"◀\")),a.onclick=()=>this.reverse_animation(),e.appendChild(a);const h=document.createElement(\"button\");h.style.cssText=i,h.appendChild(document.createTextNode(\"❚❚\")),h.onclick=()=>this.pause_animation(),e.appendChild(h);const c=document.createElement(\"button\");c.style.cssText=i,c.appendChild(document.createTextNode(\"▶\")),c.onclick=()=>this.play_animation(),e.appendChild(c);const p=document.createElement(\"button\");p.style.cssText=i,p.appendChild(document.createTextNode(\"▶❚\")),p.onclick=()=>this.next_frame(),e.appendChild(p);const m=document.createElement(\"button\");m.style.cssText=i,m.appendChild(document.createTextNode(\"▶▶❚\")),m.onclick=()=>this.last_frame(),e.appendChild(m);const _=document.createElement(\"button\");_.style.cssText=t,_.appendChild(document.createTextNode(\"+\")),_.onclick=()=>this.faster(),e.appendChild(_),this._toggle_reverse=()=>{d([h,c]),r([a])},this._toogle_pause=()=>{d([a,c]),r([h])},this._toggle_play=()=>{d([a,h]),r([c])},this.loop_state=document.createElement(\"form\"),this.loop_state.style.cssText=\"margin: 0 auto; display: table\";const u=document.createElement(\"input\");u.type=\"radio\",u.value=\"once\",u.name=\"state\";const g=document.createElement(\"label\");g.innerHTML=\"Once\",g.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\";const f=document.createElement(\"input\");f.setAttribute(\"type\",\"radio\"),f.setAttribute(\"value\",\"loop\"),f.setAttribute(\"name\",\"state\");const v=document.createElement(\"label\");v.innerHTML=\"Loop\",v.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\";const y=document.createElement(\"input\");y.setAttribute(\"type\",\"radio\"),y.setAttribute(\"value\",\"reflect\"),y.setAttribute(\"name\",\"state\");const x=document.createElement(\"label\");x.innerHTML=\"Reflect\",x.style.cssText=\"padding: 0 10px 0 5px; user-select:none;\",\"once\"==this.model.loop_policy?u.checked=!0:\"loop\"==this.model.loop_policy?f.checked=!0:y.checked=!0,this.loop_state.appendChild(u),this.loop_state.appendChild(g),this.loop_state.appendChild(f),this.loop_state.appendChild(v),this.loop_state.appendChild(y),this.loop_state.appendChild(x),this.groupEl.appendChild(this.sliderEl),this.groupEl.appendChild(e),this.model.show_loop_controls&&this.groupEl.appendChild(this.loop_state),this.el.appendChild(this.groupEl)}set_frame(e){this.model.value!=e&&(this.model.value=e),this.sliderEl.value!=String(e)&&(this.sliderEl.value=String(e))}get_loop_state(){for(var e=this.loop_state.state,t=0;t0?this.play_animation():this.model.direction<0&&this.reverse_animation()}faster(){this.model.interval=Math.round(.7*this.model.interval),this.model.direction>0?this.play_animation():this.model.direction<0&&this.reverse_animation()}anim_step_forward(){if(this.model.valuethis.model.start)this.previous_frame();else{var e=this.get_loop_state();\"loop\"==e?this.last_frame():\"reflect\"==e?(this.first_frame(),this.play_animation()):(this.pause_animation(),this.first_frame())}}pause_animation(){this._toogle_pause(),this.model.direction=0,this.timer&&(clearInterval(this.timer),this.timer=null)}play_animation(){this.pause_animation(),this._toggle_play(),this.model.direction=1,this.timer||(this.timer=setInterval((()=>this.anim_step_forward()),this.model.interval))}reverse_animation(){this.pause_animation(),this._toggle_reverse(),this.model.direction=-1,this.timer||(this.timer=setInterval((()=>this.anim_step_reverse()),this.model.interval))}}i.PlayerView=h,h.__name__=\"PlayerView\",i.LoopPolicy=l.Enum(\"once\",\"loop\",\"reflect\");class c extends a.Widget{constructor(e){super(e)}static init_Player(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t})=>({direction:[t,0],interval:[t,500],start:[t,0],end:[t,10],step:[t,1],loop_policy:[i.LoopPolicy,\"once\"],value:[t,0],show_loop_controls:[e,!0]}))),this.override({width:400})}}i.Player=c,c.__name__=\"Player\",c.__module__=\"panel.models.widgets\",c.init_Player()},\n", " \"47b5ae5c43\": function _(t,e,o,i,r){i();const l=t(\"tslib\").__importStar(t(\"@bokehjs/core/properties\")),s=t(\"@bokehjs/core/dom\"),a=t(\"@bokehjs/core/util/object\"),p=t(\"@bokehjs/core/util/eq\"),n=t(\"@bokehjs/models/layouts/html_box\"),_=t(\"99a25e6992\"),h=t(\"990b5dd5c7\"),u=t(\"7116a7a602\"),d=(t,e,o)=>{let i=Array.isArray(e)?[]:{};if(\"click\"===o||\"hover\"===o||\"selected\"===o){const o=[];if(null==e)return null;const r=t.data;for(let t=0;t{this._relayouting=!1}),2e3,!1)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.viewport_update_policy.change,this._updateSetViewportFunction),this.connect(this.model.properties.viewport_update_throttle.change,this._updateSetViewportFunction),this.connect(this.model.properties._render_count.change,this.plot),this.connect(this.model.properties.viewport.change,this._updateViewportFromProperty)}render(){super.render(),this._layout_wrapper=s.div({style:\"height: 100%; width: 100%\"}),this.el.appendChild(this._layout_wrapper),window.Plotly&&this.plot()}plot(){if(!window.Plotly)return;const t=[];for(let e=0;e{\"axis\"===o.slice(1,5)&&\"range\"in t&&(e[o].range=t.range)}),{})}this._reacting=!0,window.Plotly.react(this._layout_wrapper,t,e,this.model.config).then((()=>{var t,e;this._updateSetViewportFunction(),this._updateViewportProperty(),this._plotInitialized||(this._layout_wrapper.on(\"plotly_relayout\",(t=>{!0!==t._update_from_property&&(this.model.relayout_data=d(this._layout_wrapper,t,\"relayout\"),this._updateViewportProperty(),this._end_relayouting())})),this._layout_wrapper.on(\"plotly_relayouting\",(()=>{\"mouseup\"!==this.model.viewport_update_policy&&(this._relayouting=!0,this._updateViewportProperty())})),this._layout_wrapper.on(\"plotly_restyle\",(t=>{this.model.restyle_data=d(this._layout_wrapper,t,\"restyle\"),this._updateViewportProperty()})),this._layout_wrapper.on(\"plotly_click\",(t=>{this.model.click_data=d(this._layout_wrapper,t,\"click\")})),this._layout_wrapper.on(\"plotly_hover\",(t=>{this.model.hover_data=d(this._layout_wrapper,t,\"hover\")})),this._layout_wrapper.on(\"plotly_selected\",(t=>{this.model.selected_data=d(this._layout_wrapper,t,\"selected\")})),this._layout_wrapper.on(\"plotly_clickannotation\",(t=>{delete t.event,delete t.fullAnnotation,this.model.clickannotation_data=t})),this._layout_wrapper.on(\"plotly_deselect\",(()=>{this.model.selected_data=null})),this._layout_wrapper.on(\"plotly_unhover\",(()=>{this.model.hover_data=null}))),this._plotInitialized=!0,this._reacting=!1,t=this._layout_wrapper,(e=window.getComputedStyle(t).display)&&\"none\"!==e&&window.Plotly.Plots.resize(this._layout_wrapper)}))}_get_trace(t,e){const o=a.clone(this.model.data[t]),i=this.model.data_sources[t];for(const t of i.columns()){let r=i.get_array(t)[0];if(null!=r.shape&&r.shape.length>1){const t=[],e=r.shape;for(let o=0;o{if(p.isEqual(h.get(t,o),e))return!0;{let t=h.deepCopy(this.model.viewport);return t._update_from_property=!0,window.Plotly.relayout(this.el,t),!1}}),{})}_updateViewportProperty(){const t=this._layout_wrapper._fullLayout;let e={};for(let o in t){if(!t.hasOwnProperty(o))continue;let i=o.slice(0,5);\"xaxis\"!==i&&\"yaxis\"!==i||(e[o+\".range\"]=h.deepCopy(t[o].range))}p.isEqual(e,this.model.viewport)||this._setViewport(e)}_updateSetViewportFunction(){\"continuous\"===this.model.viewport_update_policy||\"mouseup\"===this.model.viewport_update_policy?this._setViewport=t=>{this._settingViewport||(this._settingViewport=!0,this.model.viewport=t,this._settingViewport=!1)}:this._setViewport=h.throttle((t=>{this._settingViewport||(this._settingViewport=!0,this.model.viewport=t,this._settingViewport=!1)}),this.model.viewport_update_throttle)}}o.PlotlyPlotView=y,y.__name__=\"PlotlyPlotView\";class c extends n.HTMLBox{constructor(t){super(t)}static init_PlotlyPlot(){this.prototype.default_view=y,this.define({data:[l.Array,[]],layout:[l.Any,{}],config:[l.Any,{}],data_sources:[l.Array,[]],relayout_data:[l.Any,{}],restyle_data:[l.Array,[]],click_data:[l.Any,{}],hover_data:[l.Any,{}],clickannotation_data:[l.Any,{}],selected_data:[l.Any,{}],viewport:[l.Any,{}],viewport_update_policy:[l.String,\"mouseup\"],viewport_update_throttle:[l.Number,200],_render_count:[l.Number,0]})}}o.PlotlyPlot=c,c.__name__=\"PlotlyPlot\",c.__module__=\"panel.models.plotly\",c.init_PlotlyPlot()},\n", " \"99a25e6992\": function _(n,l,u,t,e){function o(n,l,u){var t,e,o,a,r;function i(){var c=Date.now()-a;c=0?t=setTimeout(i,l-c):(t=null,u||(r=n.apply(o,e),o=e=null))}null==l&&(l=100);var c=function(){o=this,e=arguments,a=Date.now();var c=u&&!t;return t||(t=setTimeout(i,l)),c&&(r=n.apply(o,e),o=e=null),r};return c.clear=function(){t&&(clearTimeout(t),t=null)},c.flush=function(){t&&(r=n.apply(o,e),o=e=null,clearTimeout(t),t=null)},c}o.debounce=o,l.exports=o},\n", " \"990b5dd5c7\": function _(t,n,r,e,o){e();r.get=(t,n,r)=>{const e=r=>String.prototype.split.call(n,r).filter(Boolean).reduce(((t,n)=>null!=t?t[n]:t),t),o=e(/[,[\\]]+?/)||e(/[,[\\].]+?/);return void 0===o||o===t?r:o},r.throttle=function(t,n){var r=0;return function(){var e=Number(new Date);e-r>=n&&(t(),r=e)}},r.deepCopy=function t(n){var r;if(null==n||\"object\"!=typeof n)return n;if(n instanceof Array){r=[];for(var e=0,o=n.length;e0&&(u=1/Math.sqrt(u)),n[0]=t[0]*u,n[1]=t[1]*u,n},r.dot=function(n,t){return n[0]*t[0]+n[1]*t[1]},r.cross=function(n,t,r){var a=t[0]*r[1]-t[1]*r[0];return n[0]=n[1]=0,n[2]=a,n},r.lerp=function(n,t,r,a){var u=t[0],e=t[1];return n[0]=u+a*(r[0]-u),n[1]=e+a*(r[1]-e),n},r.random=function(n,t){t=t||1;var r=2*e.RANDOM()*Math.PI;return n[0]=Math.cos(r)*t,n[1]=Math.sin(r)*t,n},r.transformMat2=function(n,t,r){var a=t[0],u=t[1];return n[0]=r[0]*a+r[2]*u,n[1]=r[1]*a+r[3]*u,n},r.transformMat2d=function(n,t,r){var a=t[0],u=t[1];return n[0]=r[0]*a+r[2]*u+r[4],n[1]=r[1]*a+r[3]*u+r[5],n},r.transformMat3=function(n,t,r){var a=t[0],u=t[1];return n[0]=r[0]*a+r[3]*u+r[6],n[1]=r[1]*a+r[4]*u+r[7],n},r.transformMat4=function(n,t,r){var a=t[0],u=t[1];return n[0]=r[0]*a+r[4]*u+r[12],n[1]=r[1]*a+r[5]*u+r[13],n},r.rotate=function(n,t,r,a){var u=t[0]-r[0],e=t[1]-r[1],o=Math.sin(a),c=Math.cos(a);return n[0]=u*c-e*o+r[0],n[1]=u*o+e*c+r[1],n},r.angle=function(n,t){var r=n[0],a=n[1],u=t[0],e=t[1],o=Math.sqrt(r*r+a*a)*Math.sqrt(u*u+e*e),c=o&&(r*u+a*e)/o;return Math.acos(Math.min(Math.max(c,-1),1))},r.zero=function(n){return n[0]=0,n[1]=0,n},r.str=function(n){return\"vec2(\"+n[0]+\", \"+n[1]+\")\"},r.exactEquals=function(n,t){return n[0]===t[0]&&n[1]===t[1]},r.equals=function(n,t){var r=n[0],a=n[1],u=t[0],o=t[1];return Math.abs(r-u)<=e.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(a-o)<=e.EPSILON*Math.max(1,Math.abs(a),Math.abs(o))},r.len=M,r.sub=c,r.mul=i,r.div=f,r.dist=s,r.sqrDist=h,r.sqrLen=l,r.forEach=(v=o(),function(n,t,r,a,u,e){var o,c;for(t||(t=2),r||(r=0),c=a?Math.min(a*t+r,n.length):n.length,o=r;othis._arrays[e]?Promise.resolve(this._arrays[e]):new Promise(((t,n)=>{this._pending_arrays[e]={resolve:t,reject:n}})),this.registerArray=(e,t)=>(this._arrays[e]=t,this._pending_arrays[e]&&this._pending_arrays[e].resolve(t),!0),this._synchronizer_context=a.vtkns.SynchronizableRenderWindow.getSynchronizerContext(c)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.arrays.change,(()=>this._decode_arrays())),this.connect(this.model.properties.scene.change,(()=>{if(this.model.rebuild)this._vtk_renwin=null,this.invalidate_render();else{const e=o.clone(this.model.scene);Promise.all(this._promises).then((()=>{this._sync_plot(e,(()=>{this._on_scene_ready()}))}))}})),this.connect(this.model.properties.one_time_reset.change,(()=>{this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters()}))}init_vtk_renwin(){this._vtk_renwin=h.FullScreenRenderWindowSynchronized.newInstance({rootContainer:this.el,container:this._vtk_container,synchronizerContext:this._synchronizer_context})}plot(){this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters(),this._decode_arrays();const e=o.clone(this.model.scene);Promise.all(this._promises).then((()=>{this._sync_plot(e,(()=>this._on_scene_ready())).then((()=>{this._set_camera_state(),this._get_camera_state()}))}))}_decode_arrays(){const e=new a.vtkns.ThirdParty.JSZip,t=this.model.arrays,n=this.registerArray,s=this.model.arrays_processed,r=this.model;Object.keys(t).forEach((i=>{this._decoded_arrays[i]||(this._decoded_arrays[i]=!0,this._promises.push(function(i){return e.loadAsync(atob(t[i])).then((e=>e.file(\"data/\"+i))).then((e=>e.async(\"arraybuffer\"))).then((e=>n(i,e))).then((()=>{s.push(i),r.properties.arrays_processed.change.emit()}))}(i)))}))}_on_scene_ready(){this._promises.length>0||(this._renderable=!0,this._camera_callbacks.push(this._vtk_renwin.getRenderer().getActiveCamera().onModified((()=>this._vtk_render()))),this._orientationWidget||this._create_orientation_widget(),this._axes||this._set_axes(),this._vtk_renwin.resize(),this._vtk_render())}_sync_plot(e,t){this._renderable=!1,this._promises=[],this._unsubscribe_camera_cb(),this._synchronizer_context.setFetchArrayFunction((e=>Promise.resolve(this._arrays[e])));const n=this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);return n&&!this._vtk_renwin.getRenderer()&&this._vtk_renwin.getRenderWindow().addRenderer(n),this._vtk_renwin.getRenderWindow().synchronize(e).then(t)}}n.VTKSynchronizedPlotView=d,d.__name__=\"VTKSynchronizedPlotView\";class l extends _.AbstractVTKPlot{constructor(e){super(e),this.outline=a.vtkns.OutlineFilter.newInstance();const t=a.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=a.vtkns.Actor.newInstance(),this.outline_actor.setMapper(t)}getActors(e){let t=this.renderer_el.getRenderer().getActors();if(e){const n=this.renderer_el.getSynchronizerContext(c);t=t.filter((t=>{const s=n.getInstanceId(t);return!!s&&s.slice(-16)==e.slice(1,17)}))}return t}static init_VTKSynchronizedPlot(){this.prototype.default_view=d,this.define({arrays:[i.Any,{}],arrays_processed:[i.Array,[]],enable_keybindings:[i.Boolean,!1],one_time_reset:[i.Boolean],rebuild:[i.Boolean,!1],scene:[i.Any,{}]}),this.override({height:300,width:300})}}n.VTKSynchronizedPlot=l,l.__name__=\"VTKSynchronizedPlot\",l.__module__=\"panel.models.vtk\",l.init_VTKSynchronizedPlot()},\n", " \"11e0707a8f\": function _(e,n,o,t,r){t();const i=e(\"4eb45e35aa\");if(i.vtk){const e={containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0,synchronizerContextName:\"default\"},n={position:\"absolute\",left:\"25px\",top:\"25px\",backgroundColor:\"white\",borderRadius:\"5px\",listStyle:\"none\",padding:\"5px 10px\",margin:\"0\",display:\"block\",border:\"solid 1px black\",maxWidth:\"calc(100vw - 70px)\",maxHeight:\"calc(100vh - 60px)\",overflow:\"auto\"};o.FullScreenRenderWindowSynchronized={newInstance:i.vtk.macro.newInstance(((o,t,r={})=>{Object.assign(t,e,r),i.vtk.macro.obj(o,t),i.vtk.macro.get(o,t,[\"renderWindow\",\"openGLRenderWindow\",\"interactor\",\"rootContainer\",\"container\",\"controlContainer\",\"synchronizerContext\"]),function(e,o){o.renderWindow=i.vtkns.SynchronizableRenderWindow.newInstance({synchronizerContext:o.synchronizerContext}),o.openGLRenderWindow=i.vtkns.OpenGLRenderWindow.newInstance(),o.openGLRenderWindow.setContainer(o.container),o.renderWindow.addView(o.openGLRenderWindow),o.interactor=i.vtkns.RenderWindowInteractor.newInstance(),o.interactor.setInteractorStyle(i.vtkns.InteractorStyleTrackballCamera.newInstance()),o.interactor.setView(o.openGLRenderWindow),o.interactor.initialize(),o.interactor.bindEvents(o.container),e.getRenderer=()=>o.renderWindow.getRenderers()[0],e.removeController=()=>{const e=o.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=e=>{o.controllerVisibility=e,o.controlContainer&&(o.controlContainer.style.display=e?\"block\":\"none\")},e.toggleControllerVisibility=()=>{e.setControllerVisibility(!o.controllerVisibility)},e.addController=t=>{o.controlContainer=document.createElement(\"div\"),i.applyStyle(o.controlContainer,o.controlPanelStyle||n),o.rootContainer.appendChild(o.controlContainer),o.controlContainer.innerHTML=t,e.setControllerVisibility(o.controllerVisibility),o.rootContainer.addEventListener(\"keypress\",(n=>{\"c\"===String.fromCharCode(n.charCode)&&e.toggleControllerVisibility()}))},e.delete=i.vtk.macro.chain(e.setContainer,o.openGLRenderWindow.delete,e.delete),e.resize=()=>{const e=o.container.getBoundingClientRect(),n=window.devicePixelRatio||1;o.openGLRenderWindow.setSize(Math.floor(e.width*n),Math.floor(e.height*n)),o.resizeCallback&&o.resizeCallback(e),o.renderWindow.render()},e.setResizeCallback=n=>{o.resizeCallback=n,e.resize()},o.listenWindowResize&&window.addEventListener(\"resize\",e.resize),e.resize()}(o,t)}))}}},\n", - " }, \"4e90918c0a\", {\"index\":\"4e90918c0a\",\"models/index\":\"480618c798\",\"models/ace\":\"c2edc6955b\",\"models/layout\":\"7116a7a602\",\"models/audio\":\"339f84d639\",\"models/card\":\"b85e13a3ba\",\"models/comm_manager\":\"e552778259\",\"models/tabulator\":\"99baa24a1a\",\"models/data\":\"7e38aee5d7\",\"models/deckgl\":\"df2378664f\",\"models/tooltips\":\"6e04fbe567\",\"models/echarts\":\"9d046c4720\",\"models/html\":\"ed08037ce5\",\"models/idom\":\"7d45bd3bc4\",\"models/event-to-object\":\"3329d4aa5b\",\"models/ipywidget\":\"0eae77d68f\",\"models/json\":\"5284fdbb37\",\"models/file_download\":\"1767172ffa\",\"models/katex\":\"7b859fb3cf\",\"models/location\":\"642aa56b24\",\"models/mathjax\":\"0c21036737\",\"models/perspective\":\"545156b57b\",\"models/player\":\"ed9bae6d87\",\"models/plotly\":\"47b5ae5c43\",\"models/util\":\"990b5dd5c7\",\"models/progress\":\"9f787650b9\",\"models/singleselect\":\"3b85956787\",\"models/speech_to_text\":\"aaa48703af\",\"models/state\":\"bfa46a5f19\",\"models/text_to_speech\":\"33cd2c254e\",\"models/trend\":\"2efaffc12a\",\"models/vega\":\"4feb5fa522\",\"models/video\":\"ffe54b53c3\",\"models/videostream\":\"9ff7f7b5e9\",\"models/vtk/index\":\"c51f25e2a7\",\"models/vtk/vtkjs\":\"34fc7779c7\",\"models/vtk/vtklayout\":\"666f1ef4e6\",\"models/vtk/util\":\"4eb45e35aa\",\"models/vtk/vtkcolorbar\":\"c010237f8b\",\"models/vtk/vtkvolume\":\"89262e43a1\",\"models/vtk/vtkaxes\":\"db7a0079c0\",\"models/vtk/vtksynchronized\":\"4baab0b7ce\",\"models/vtk/panel_fullscreen_renwin_sync\":\"11e0707a8f\"}, {});});\n", + " }, \"4e90918c0a\", {\"index\":\"4e90918c0a\",\"models/index\":\"b51d785f31\",\"models/ace\":\"be520eff91\",\"models/layout\":\"7116a7a602\",\"models/audio\":\"339f84d639\",\"models/card\":\"b85e13a3ba\",\"models/comm_manager\":\"e552778259\",\"models/tabulator\":\"4fa5b314a9\",\"models/data\":\"7e38aee5d7\",\"models/datetime_picker\":\"6e11b2cfe2\",\"models/deckgl\":\"df2378664f\",\"models/tooltips\":\"6e04fbe567\",\"models/echarts\":\"9d046c4720\",\"models/html\":\"ed08037ce5\",\"models/idom\":\"7d45bd3bc4\",\"models/event-to-object\":\"3329d4aa5b\",\"models/ipywidget\":\"0eae77d68f\",\"models/json\":\"0d30bea0c8\",\"models/file_download\":\"1767172ffa\",\"models/katex\":\"7b859fb3cf\",\"models/location\":\"642aa56b24\",\"models/mathjax\":\"0c21036737\",\"models/perspective\":\"84a772681d\",\"models/player\":\"bacb3ef65c\",\"models/plotly\":\"47b5ae5c43\",\"models/util\":\"990b5dd5c7\",\"models/progress\":\"9f787650b9\",\"models/singleselect\":\"3b85956787\",\"models/speech_to_text\":\"aaa48703af\",\"models/state\":\"bfa46a5f19\",\"models/text_to_speech\":\"33cd2c254e\",\"models/trend\":\"2efaffc12a\",\"models/vega\":\"4feb5fa522\",\"models/video\":\"ffe54b53c3\",\"models/videostream\":\"9ff7f7b5e9\",\"models/vtk/index\":\"c51f25e2a7\",\"models/vtk/vtkjs\":\"34fc7779c7\",\"models/vtk/vtklayout\":\"666f1ef4e6\",\"models/vtk/util\":\"4eb45e35aa\",\"models/vtk/vtkcolorbar\":\"c010237f8b\",\"models/vtk/vtkvolume\":\"89262e43a1\",\"models/vtk/vtkaxes\":\"db7a0079c0\",\"models/vtk/vtksynchronized\":\"4baab0b7ce\",\"models/vtk/panel_fullscreen_renwin_sync\":\"11e0707a8f\"}, {});});\n", "\n", " /* END panel.min.js */\n", " },\n", @@ -1767,7 +1780,7 @@ " }\n", "}(window));" ], - "application/vnd.holoviews_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'paths': {'tabulator': 'https://unpkg.com/tabulator-tables@4.9.3/dist/js/tabulator'}});\n require([\"tabulator\"], function(Tabulator,) {\n window.Tabulator = Tabulator;\n })\n }\n if (((window['tabulator'] !== undefined) && (!(window['tabulator'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://unpkg.com/tabulator-tables@4.9.3/dist/js/tabulator.js', 'https://unpkg.com/moment@2.27.0/moment.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) >= 0) { on_load(); continue; }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) >= 0) { on_load(); continue; }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://unpkg.com/tabulator-tables@4.9.3/dist/js/tabulator.js\", \"https://unpkg.com/moment@2.27.0/moment.js\"];\n var js_modules = [];\n var css_urls = [\"https://unpkg.com/tabulator-tables@4.9.3/dist/css/tabulator_simple.min.css\"];\n var inline_js = [\n function(Bokeh) {\n inject_raw_css(\".bk.alert {\\n padding: 0.75rem 1.25rem;\\n border: 1px solid transparent;\\n border-radius: 0.25rem;\\n /* Don't set margin because that will not render correctly! */\\n /* margin-bottom: 1rem; */\\n margin-top: 15px;\\n margin-bottom: 15px;\\n}\\n.bk.alert a {\\n color: rgb(11, 46, 19); /* #002752; */\\n font-weight: 700;\\n text-decoration: rgb(11, 46, 19);\\n text-decoration-color: rgb(11, 46, 19);\\n text-decoration-line: none;\\n text-decoration-style: solid;\\n text-decoration-thickness: auto;\\n }\\n.bk.alert a:hover {\\n color: rgb(11, 46, 19);\\n font-weight: 700;\\n text-decoration: underline;\\n}\\n\\n.bk.alert-primary {\\n color: #004085;\\n background-color: #cce5ff;\\n border-color: #b8daff;\\n}\\n.bk.alert-primary hr {\\n border-top-color: #9fcdff;\\n}\\n\\n.bk.alert-secondary {\\n color: #383d41;\\n background-color: #e2e3e5;\\n border-color: #d6d8db;\\n }\\n.bk.alert-secondary hr {\\n border-top-color: #c8cbcf;\\n}\\n\\n.bk.alert-success {\\n color: #155724;\\n background-color: #d4edda;\\n border-color: #c3e6cb;\\n }\\n\\n.bk.alert-success hr {\\n border-top-color: #b1dfbb;\\n}\\n\\n.bk.alert-info {\\n color: #0c5460;\\n background-color: #d1ecf1;\\n border-color: #bee5eb;\\n }\\n.bk.alert-info hr {\\n border-top-color: #abdde5;\\n}\\n\\n.bk.alert-warning {\\n color: #856404;\\n background-color: #fff3cd;\\n border-color: #ffeeba;\\n }\\n\\n.bk.alert-warning hr {\\n border-top-color: #ffe8a1;\\n}\\n\\n.bk.alert-danger {\\n color: #721c24;\\n background-color: #f8d7da;\\n border-color: #f5c6cb;\\n}\\n.bk.alert-danger hr {\\n border-top-color: #f1b0b7;\\n}\\n\\n.bk.alert-light {\\n color: #818182;\\n background-color: #fefefe;\\n border-color: #fdfdfe;\\n }\\n.bk.alert-light hr {\\n border-top-color: #ececf6;\\n}\\n\\n.bk.alert-dark {\\n color: #1b1e21;\\n background-color: #d6d8d9;\\n border-color: #c6c8ca;\\n }\\n.bk.alert-dark hr {\\n border-top-color: #b9bbbe;\\n}\\n\\n\\n/* adjf\\u00e6l */\\n\\n.bk.alert-primary a {\\n color: #002752;\\n}\\n\\n.bk.alert-secondary a {\\n color: #202326;\\n}\\n\\n\\n.bk.alert-success a {\\n color: #0b2e13;\\n}\\n\\n\\n.bk.alert-info a {\\n color: #062c33;\\n}\\n\\n\\n.bk.alert-warning a {\\n color: #533f03;\\n}\\n\\n\\n.bk.alert-danger a {\\n color: #491217;\\n}\\n\\n.bk.alert-light a {\\n color: #686868;\\n}\\n\\n.bk.alert-dark a {\\n color: #040505;\\n}\");\n },\n function(Bokeh) {\n inject_raw_css(\".bk.panel-widget-box {\\n min-height: 20px;\\n background-color: #f5f5f5;\\n border: 1px solid #e3e3e3;\\n border-radius: 4px;\\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n overflow-x: hidden;\\n overflow-y: hidden;\\n}\\n\\n.scrollable {\\n overflow: scroll;\\n}\\n\\nprogress {\\n appearance: none;\\n -moz-appearance: none;\\n -webkit-appearance: none;\\n border: none;\\n height: 20px;\\n background-color: whiteSmoke;\\n border-radius: 3px;\\n box-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n color: royalblue;\\n position: relative;\\n margin: 0 0 1.5em;\\n}\\n\\nprogress[value]::-webkit-progress-bar {\\n background-color: whiteSmoke;\\n border-radius: 3px;\\n box-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n}\\n\\nprogress[value]::-webkit-progress-value {\\n position: relative;\\n background-size: 35px 20px, 100% 100%, 100% 100%;\\n border-radius:3px;\\n}\\n\\nprogress.active:not([value])::before {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress[value]::-moz-progress-bar {\\n background-size: 35px 20px, 100% 100%, 100% 100%;\\n border-radius:3px;\\n}\\n\\nprogress:not([value])::-moz-progress-bar {\\n border-radius:3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\n\\nprogress.active:not([value])::-moz-progress-bar {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress.active:not([value])::-webkit-progress-bar {\\n background-position: 10%;\\n animation-name: stripes;\\n animation-duration: 3s;\\n animation-timing-function: linear;\\n animation-iteration-count: infinite;\\n}\\n\\nprogress.primary[value]::-webkit-progress-value { background-color: #007bff; }\\nprogress.primary:not([value])::before { background-color: #007bff; }\\nprogress.primary:not([value])::-webkit-progress-bar { background-color: #007bff; }\\nprogress.primary::-moz-progress-bar { background-color: #007bff; }\\n\\nprogress.secondary[value]::-webkit-progress-value { background-color: #6c757d; }\\nprogress.secondary:not([value])::before { background-color: #6c757d; }\\nprogress.secondary:not([value])::-webkit-progress-bar { background-color: #6c757d; }\\nprogress.secondary::-moz-progress-bar { background-color: #6c757d; }\\n\\nprogress.success[value]::-webkit-progress-value { background-color: #28a745; }\\nprogress.success:not([value])::before { background-color: #28a745; }\\nprogress.success:not([value])::-webkit-progress-bar { background-color: #28a745; }\\nprogress.success::-moz-progress-bar { background-color: #28a745; }\\n\\nprogress.danger[value]::-webkit-progress-value { background-color: #dc3545; }\\nprogress.danger:not([value])::before { background-color: #dc3545; }\\nprogress.danger:not([value])::-webkit-progress-bar { background-color: #dc3545; }\\nprogress.danger::-moz-progress-bar { background-color: #dc3545; }\\n\\nprogress.warning[value]::-webkit-progress-value { background-color: #ffc107; }\\nprogress.warning:not([value])::before { background-color: #ffc107; }\\nprogress.warning:not([value])::-webkit-progress-bar { background-color: #ffc107; }\\nprogress.warning::-moz-progress-bar { background-color: #ffc107; }\\n\\nprogress.info[value]::-webkit-progress-value { background-color: #17a2b8; }\\nprogress.info:not([value])::before { background-color: #17a2b8; }\\nprogress.info:not([value])::-webkit-progress-bar { background-color: #17a2b8; }\\nprogress.info::-moz-progress-bar { background-color: #17a2b8; }\\n\\nprogress.light[value]::-webkit-progress-value { background-color: #f8f9fa; }\\nprogress.light:not([value])::before { background-color: #f8f9fa; }\\nprogress.light:not([value])::-webkit-progress-bar { background-color: #f8f9fa; }\\nprogress.light::-moz-progress-bar { background-color: #f8f9fa; }\\n\\nprogress.dark[value]::-webkit-progress-value { background-color: #343a40; }\\nprogress.dark:not([value])::-webkit-progress-bar { background-color: #343a40; }\\nprogress.dark:not([value])::before { background-color: #343a40; }\\nprogress.dark::-moz-progress-bar { background-color: #343a40; }\\n\\nprogress:not([value])::-webkit-progress-bar {\\n border-radius: 3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\nprogress:not([value])::before {\\n content:\\\" \\\";\\n position:absolute;\\n height: 20px;\\n top:0;\\n left:0;\\n right:0;\\n bottom:0;\\n border-radius: 3px;\\n background: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\n\\n@keyframes stripes {\\n from {background-position: 0%}\\n to {background-position: 100%}\\n}\\n\\n.bk-root .bk.loader {\\n overflow: hidden;\\n}\\n\\n.bk.loader::after {\\n content: \\\"\\\";\\n border-radius: 50%;\\n -webkit-mask-image: radial-gradient(transparent 50%, rgba(0, 0, 0, 1) 54%);\\n width: 100%;\\n height: 100%;\\n left: 0;\\n top: 0;\\n position: absolute;\\n}\\n\\n.bk-root .bk.loader.dark::after {\\n background: #0f0f0f;\\n}\\n\\n.bk-root .bk.loader.light::after {\\n background: #f0f0f0;\\n}\\n\\n.bk-root .bk.loader.spin::after {\\n animation: spin 2s linear infinite;\\n}\\n\\n.bk-root div.bk.loader.spin.primary-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #007bff 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.secondary-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #6c757d 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.success-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #28a745 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.danger-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #dc3545 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.warning-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #ffc107 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.info-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #17a2b8 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.light-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #f8f9fa 50%);\\n}\\n\\n.bk-root div.bk.loader.dark-light::after {\\n background: linear-gradient(135deg, #f0f0f0 50%, transparent 50%), linear-gradient(45deg, #f0f0f0 50%, #343a40 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.primary-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #007bff 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.secondary-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #6c757d 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.success-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #28a745 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.danger-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #dc3545 50%)\\n}\\n\\n.bk-root div.bk.loader.spin.warning-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #ffc107 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.info-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #17a2b8 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.light-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #f8f9fa 50%);\\n}\\n\\n.bk-root div.bk.loader.spin.dark-dark::after {\\n background: linear-gradient(135deg, #0f0f0f 50%, transparent 50%), linear-gradient(45deg, #0f0f0f 50%, #343a40 50%);\\n}\\n\\n/* Safari */\\n@-webkit-keyframes spin {\\n 0% { -webkit-transform: rotate(0deg); }\\n 100% { -webkit-transform: rotate(360deg); }\\n}\\n\\n@keyframes spin {\\n 0% { transform: rotate(0deg); }\\n 100% { transform: rotate(360deg); }\\n}\\n\\n.dot div {\\n height: 100%;\\n width: 100%;\\n border: 1px solid #000 !important;\\n background-color: #fff;\\n border-radius: 50%;\\n display: inline-block;\\n}\\n\\n.dot-filled div {\\n height: 100%;\\n width: 100%;\\n border: 1px solid #000 !important;\\n border-radius: 50%;\\n display: inline-block;\\n}\\n\\n.dot-filled.primary div {\\n background-color: #007bff;\\n}\\n\\n.dot-filled.secondary div {\\n background-color: #6c757d;\\n}\\n\\n.dot-filled.success div {\\n background-color: #28a745;\\n}\\n\\n.dot-filled.danger div {\\n background-color: #dc3545;\\n}\\n\\n.dot-filled.warning div {\\n background-color: #ffc107;\\n}\\n\\n.dot-filled.info div {\\n background-color: #17a2b8;\\n}\\n\\n.dot-filled.dark div {\\n background-color: #343a40;\\n}\\n\\n.dot-filled.light div {\\n background-color: #f8f9fa;\\n}\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\".bk.card {\\n border: 1px solid rgba(0,0,0,.125);\\n border-radius: 0.25rem;\\n}\\n.bk.accordion {\\n border: 1px solid rgba(0,0,0,.125);\\n}\\n.bk.card-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0.25rem;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\n.bk.accordion-header {\\n align-items: center;\\n background-color: rgba(0, 0, 0, 0.03);\\n border-radius: 0;\\n display: flex;\\n justify-content: space-between;\\n padding: 0 1.25rem 0 0;\\n width: 100%;\\n}\\np.bk.card-button {\\n background-color: transparent;\\n font-size: 1.25rem;\\n font-weight: 700;\\n margin: 0;\\n margin-left: -15px;\\n}\\n.bk.card-header-row {\\n position: relative !important;\\n}\\n.bk.card-title {\\n align-items: center;\\n display: flex !important;\\n font-size: 1.4em;\\n font-weight: bold;\\n padding: 0.25em;\\n position: relative !important;\\n}\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\".json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \\\"No properties\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \\\"[]\\\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \\\"\\\\25BA\\\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\".bk.pn-loading:before {\\n position: absolute;\\n height: 100%;\\n width: 100%;\\n content: '';\\n z-index: 1000;\\n background-color: rgb(255,255,255,0.50);\\n border-color: lightgray;\\n background-repeat: no-repeat;\\n background-position: center;\\n background-size: auto 50%;\\n border-width: 1px;\\n cursor: progress;\\n}\\n.bk.pn-loading.arcs:hover:before {\\n cursor: progress;\\n}\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\"table.panel-df {\\n margin-left: auto;\\n margin-right: auto;\\n border: none;\\n border-collapse: collapse;\\n border-spacing: 0;\\n color: black;\\n font-size: 12px;\\n table-layout: fixed;\\n width: 100%;\\n}\\n\\n.panel-df tr, .panel-df th, .panel-df td {\\n text-align: right;\\n vertical-align: middle;\\n padding: 0.5em 0.5em !important;\\n line-height: normal;\\n white-space: normal;\\n max-width: none;\\n border: none;\\n}\\n\\n.panel-df tbody {\\n display: table-row-group;\\n vertical-align: middle;\\n border-color: inherit;\\n}\\n\\n.panel-df tbody tr:nth-child(odd) {\\n background: #f5f5f5;\\n}\\n\\n.panel-df thead {\\n border-bottom: 1px solid black;\\n vertical-align: bottom;\\n}\\n\\n.panel-df tr:hover {\\n background: lightblue !important;\\n cursor: pointer;\\n}\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\".codehilite .hll { background-color: #ffffcc }\\n.codehilite { background: #f8f8f8; }\\n.codehilite .c { color: #408080; font-style: italic } /* Comment */\\n.codehilite .err { border: 1px solid #FF0000 } /* Error */\\n.codehilite .k { color: #008000; font-weight: bold } /* Keyword */\\n.codehilite .o { color: #666666 } /* Operator */\\n.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */\\n.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */\\n.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */\\n.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */\\n.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */\\n.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */\\n.codehilite .gd { color: #A00000 } /* Generic.Deleted */\\n.codehilite .ge { font-style: italic } /* Generic.Emph */\\n.codehilite .gr { color: #FF0000 } /* Generic.Error */\\n.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */\\n.codehilite .gi { color: #00A000 } /* Generic.Inserted */\\n.codehilite .go { color: #888888 } /* Generic.Output */\\n.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\\n.codehilite .gs { font-weight: bold } /* Generic.Strong */\\n.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\\n.codehilite .gt { color: #0044DD } /* Generic.Traceback */\\n.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\\n.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\\n.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\\n.codehilite .kp { color: #008000 } /* Keyword.Pseudo */\\n.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\\n.codehilite .kt { color: #B00040 } /* Keyword.Type */\\n.codehilite .m { color: #666666 } /* Literal.Number */\\n.codehilite .s { color: #BA2121 } /* Literal.String */\\n.codehilite .na { color: #7D9029 } /* Name.Attribute */\\n.codehilite .nb { color: #008000 } /* Name.Builtin */\\n.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */\\n.codehilite .no { color: #880000 } /* Name.Constant */\\n.codehilite .nd { color: #AA22FF } /* Name.Decorator */\\n.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */\\n.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */\\n.codehilite .nf { color: #0000FF } /* Name.Function */\\n.codehilite .nl { color: #A0A000 } /* Name.Label */\\n.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\\n.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */\\n.codehilite .nv { color: #19177C } /* Name.Variable */\\n.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\\n.codehilite .w { color: #bbbbbb } /* Text.Whitespace */\\n.codehilite .mb { color: #666666 } /* Literal.Number.Bin */\\n.codehilite .mf { color: #666666 } /* Literal.Number.Float */\\n.codehilite .mh { color: #666666 } /* Literal.Number.Hex */\\n.codehilite .mi { color: #666666 } /* Literal.Number.Integer */\\n.codehilite .mo { color: #666666 } /* Literal.Number.Oct */\\n.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */\\n.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */\\n.codehilite .sc { color: #BA2121 } /* Literal.String.Char */\\n.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */\\n.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\\n.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */\\n.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */\\n.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */\\n.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */\\n.codehilite .sx { color: #008000 } /* Literal.String.Other */\\n.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */\\n.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */\\n.codehilite .ss { color: #19177C } /* Literal.String.Symbol */\\n.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */\\n.codehilite .fm { color: #0000FF } /* Name.Function.Magic */\\n.codehilite .vc { color: #19177C } /* Name.Variable.Class */\\n.codehilite .vg { color: #19177C } /* Name.Variable.Global */\\n.codehilite .vi { color: #19177C } /* Name.Variable.Instance */\\n.codehilite .vm { color: #19177C } /* Name.Variable.Magic */\\n.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */\\n\\n.markdown h1 { margin-block-start: 0.34em }\\n.markdown h2 { margin-block-start: 0.42em }\\n.markdown h3 { margin-block-start: 0.5em }\\n.markdown h4 { margin-block-start: 0.67em }\\n.markdown h5 { margin-block-start: 0.84em }\\n.markdown h6 { margin-block-start: 1.17em }\\n.markdown ul { padding-inline-start: 2em }\\n.markdown ol { padding-inline-start: 2em }\\n.markdown strong { font-weight: 600 }\\n.markdown a { color: -webkit-link }\\n.markdown a { color: -moz-hyperlinkText }\\n\");\n },\n function(Bokeh) {\n inject_raw_css(\"\\n .bk.pn-loading.arcs:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ibWFyZ2luOiBhdXRvOyBiYWNrZ3JvdW5kOiBub25lOyBkaXNwbGF5OiBibG9jazsgc2hhcGUtcmVuZGVyaW5nOiBhdXRvOyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4gIDxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjMyIiBzdHJva2Utd2lkdGg9IjgiIHN0cm9rZT0iI2MzYzNjMyIgc3Ryb2tlLWRhc2hhcnJheT0iNTAuMjY1NDgyNDU3NDM2NjkgNTAuMjY1NDgyNDU3NDM2NjkiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCI+ICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxcyIga2V5VGltZXM9IjA7MSIgdmFsdWVzPSIwIDUwIDUwOzM2MCA1MCA1MCI+PC9hbmltYXRlVHJhbnNmb3JtPiAgPC9jaXJjbGU+PC9zdmc+\\\")\\n }\\n \");\n },\n function(Bokeh) {\n /* BEGIN bokeh.min.js */\n /*!\n * Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * \n * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * \n * Neither the name of Anaconda nor the names of any contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n (function(root, factory) {\n const bokeh = factory();\n bokeh.__bokeh__ = true;\n if (typeof root.Bokeh === \"undefined\" || typeof root.Bokeh.__bokeh__ === \"undefined\") {\n root.Bokeh = bokeh;\n }\n const Bokeh = root.Bokeh;\n Bokeh[bokeh.version] = bokeh;\n })(this, function() {\n var define;\n var parent_require = typeof require === \"function\" && require\n return (function(modules, entry, aliases, externals) {\n if (aliases === undefined) aliases = {};\n if (externals === undefined) externals = {};\n\n var cache = {};\n\n var normalize = function(name) {\n if (typeof name === \"number\")\n return name;\n\n if (name === \"bokehjs\")\n return entry;\n\n if (!externals[name]) {\n var prefix = \"@bokehjs/\"\n if (name.slice(0, prefix.length) === prefix)\n name = name.slice(prefix.length)\n }\n\n var alias = aliases[name]\n if (alias != null)\n return alias;\n\n var trailing = name.length > 0 && name[name.lenght-1] === \"/\";\n var index = aliases[name + (trailing ? \"\" : \"/\") + \"index\"];\n if (index != null)\n return index;\n\n return name;\n }\n\n var require = function(name) {\n var mod = cache[name];\n if (!mod) {\n var id = normalize(name);\n\n mod = cache[id];\n if (!mod) {\n if (!modules[id]) {\n if (externals[id] === false || (externals[id] == true && parent_require)) {\n try {\n mod = {exports: externals[id] ? parent_require(id) : {}};\n cache[id] = cache[name] = mod;\n return mod.exports;\n } catch (e) {}\n }\n\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n }\n\n mod = {exports: {}};\n cache[id] = cache[name] = mod;\n\n function __esModule() {\n Object.defineProperty(mod.exports, \"__esModule\", {value: true});\n }\n\n function __esExport(name, value) {\n Object.defineProperty(mod.exports, name, {\n enumerable: true, get: function () { return value; }\n });\n }\n\n modules[id].call(mod.exports, require, mod, mod.exports, __esModule, __esExport);\n } else {\n cache[name] = mod;\n }\n }\n\n return mod.exports;\n }\n require.resolve = function(name) {\n return \"\"\n }\n\n var main = require(entry);\n main.require = require;\n\n if (typeof Proxy !== \"undefined\") {\n // allow Bokeh.loader[\"@bokehjs/module/name\"] syntax\n main.loader = new Proxy({}, {\n get: function(_obj, module) {\n return require(module);\n }\n });\n }\n\n main.register_plugin = function(plugin_modules, plugin_entry, plugin_aliases, plugin_externals) {\n if (plugin_aliases === undefined) plugin_aliases = {};\n if (plugin_externals === undefined) plugin_externals = {};\n\n for (var name in plugin_modules) {\n modules[name] = plugin_modules[name];\n }\n\n for (var name in plugin_aliases) {\n aliases[name] = plugin_aliases[name];\n }\n\n for (var name in plugin_externals) {\n externals[name] = plugin_externals[name];\n }\n\n var plugin = require(plugin_entry);\n\n for (var name in plugin) {\n main[name] = plugin[name];\n }\n\n return plugin;\n }\n\n return main;\n })\n ([\n function _(t,_,n,o,r){o();t(1).__exportStar(t(2),n)},\n function _(t,e,n,r,o){r();var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};n.__extends=function(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)};function i(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}function c(t,e){var n=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function u(t){return this instanceof u?(this.v=t,this):new u(t)}n.__assign=function(){return n.__assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;c--)(o=t[c])&&(i=(a<3?o(i):a>3?o(e,n,i):o(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},n.__param=function(t,e){return function(n,r){e(n,r,t)}},n.__metadata=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},n.__awaiter=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},n.__generator=function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError(\"Generator is already executing.\");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]1||c(t,e)}))})}function c(t,e){try{(n=o[t](e)).value instanceof u?Promise.resolve(n.value.v).then(f,l):s(a[0][2],n)}catch(t){s(a[0][3],t)}var n}function f(t){c(\"next\",t)}function l(t){c(\"throw\",t)}function s(t,e){t(e),a.shift(),a.length&&c(a[0][0],a[0][1])}},n.__asyncDelegator=function(t){var e,n;return e={},r(\"next\"),r(\"throw\",(function(t){throw t})),r(\"return\"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:u(t[r](e)),done:\"return\"===r}:o?o(e):e}:o}},n.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=i(t),e={},r(\"next\"),r(\"throw\"),r(\"return\"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}},n.__makeTemplateObject=function(t,e){return Object.defineProperty?Object.defineProperty(t,\"raw\",{value:e}):t.raw=e,t};var f=Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e};n.__importStar=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)\"default\"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n.__createBinding(e,t,r);return f(e,t),e},n.__importDefault=function(t){return t&&t.__esModule?t:{default:t}},n.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError(\"attempted to get private field on non-instance\");return e.get(t)},n.__classPrivateFieldSet=function(t,e,n){if(!e.has(t))throw new TypeError(\"attempted to set private field on non-instance\");return e.set(t,n),n}},\n function _(e,t,o,s,l){s();const n=e(1);l(\"version\",e(3).version),l(\"index\",e(4).index),o.embed=n.__importStar(e(4)),o.protocol=n.__importStar(e(404)),o._testing=n.__importStar(e(405));var r=e(19);l(\"logger\",r.logger),l(\"set_log_level\",r.set_log_level),l(\"settings\",e(28).settings),l(\"Models\",e(7).Models),l(\"documents\",e(5).documents),l(\"safely\",e(406).safely)},\n function _(n,i,o,c,e){c(),o.version=\"2.3.0\"},\n function _(e,o,t,n,s){n();const d=e(5),r=e(19),_=e(34),c=e(13),i=e(8),a=e(16),u=e(395),l=e(397),m=e(396);var f=e(395);s(\"add_document_standalone\",f.add_document_standalone),s(\"index\",f.index),s(\"add_document_from_session\",e(397).add_document_from_session);var g=e(402);async function w(e,o,t,n){i.isString(e)&&(e=JSON.parse(_.unescape(e)));const s={};for(const[o,t]of c.entries(e))s[o]=d.Document.from_json(t);const a=[];for(const e of o){const o=m._resolve_element(e),d=m._resolve_root_elements(e);if(null!=e.docid)a.push(await u.add_document_standalone(s[e.docid],o,d,e.use_for_title));else{if(null==e.token)throw new Error(\"Error rendering Bokeh items: either 'docid' or 'token' was expected.\");{const s=l._get_ws_url(t,n);r.logger.debug(`embed: computed ws url: ${s}`);try{a.push(await l.add_document_from_session(s,e.token,o,d,e.use_for_title)),console.log(\"Bokeh items were rendered successfully\")}catch(e){console.log(\"Error rendering Bokeh items:\",e)}}}}return a}s(\"embed_items_notebook\",g.embed_items_notebook),s(\"kernels\",g.kernels),s(\"BOKEH_ROOT\",e(396).BOKEH_ROOT),t.embed_item=async function(e,o){const t={},n=_.uuid4();t[n]=e.doc,null==o&&(o=e.target_id);const s=document.getElementById(o);null!=s&&s.classList.add(m.BOKEH_ROOT);const d={roots:{[e.root_id]:o},root_ids:[e.root_id],docid:n};await a.defer();const[r]=await w(t,[d]);return r},t.embed_items=async function(e,o,t,n){return await a.defer(),w(e,o,t,n)}},\n function _(t,_,o,r,n){r();const a=t(1);a.__exportStar(t(6),o),a.__exportStar(t(35),o)},\n function _(e,t,s,o,n){o();const i=e(1),r=e(7),a=e(3),_=e(19),l=e(264),c=e(14),d=e(30),h=e(15),f=e(17),u=e(31),m=e(9),g=e(13),w=i.__importStar(e(132)),p=e(26),v=e(8),b=e(319),y=e(130),k=e(53),j=e(394),M=e(35);class S{constructor(e){this.document=e,this.session=null,this.subscribed_models=new Set}send_event(e){const t=new M.MessageSentEvent(this.document,\"bokeh_event\",e.to_json());this.document._trigger_on_change(t)}trigger(e){for(const t of this.subscribed_models)null!=e.origin&&e.origin!=t||t._process_event(e)}}s.EventManager=S,S.__name__=\"EventManager\",s.documents=[],s.DEFAULT_TITLE=\"Bokeh Application\";class E{constructor(){s.documents.push(this),this._init_timestamp=Date.now(),this._title=s.DEFAULT_TITLE,this._roots=[],this._all_models=new Map,this._all_models_freeze_count=0,this._callbacks=new Map,this._message_callbacks=new Map,this.event_manager=new S(this),this.idle=new h.Signal0(this,\"idle\"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}get layoutables(){return this._roots.filter((e=>e instanceof b.LayoutDOM))}get is_idle(){for(const e of this.layoutables)if(!this._idle_roots.has(e))return!1;return!0}notify_idle(e){this._idle_roots.set(e,!0),this.is_idle&&(_.logger.info(`document idle at ${Date.now()-this._init_timestamp} ms`),this.event_manager.send_event(new l.DocumentReady),this.idle.emit())}clear(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}}interactive_start(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new l.LODStart)),this._interactive_timestamp=Date.now()}interactive_stop(){null!=this._interactive_plot&&this._interactive_plot.trigger_event(new l.LODEnd),this._interactive_plot=null,this._interactive_timestamp=null}interactive_duration(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp}destructively_move(e){if(e===this)throw new Error(\"Attempted to overwrite a document with itself\");e.clear();const t=m.copy(this._roots);this.clear();for(const e of t)if(null!=e.document)throw new Error(`Somehow we didn't detach ${e}`);if(0!=this._all_models.size)throw new Error(`this._all_models still had stuff in it: ${this._all_models}`);for(const s of t)e.add_root(s);e.set_title(this._title)}_push_all_models_freeze(){this._all_models_freeze_count+=1}_pop_all_models_freeze(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()}_invalidate_all_models(){_.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count&&this._recompute_all_models()}_recompute_all_models(){let e=new Set;for(const t of this._roots)e=w.union(e,t.references());const t=new Set(this._all_models.values()),s=w.difference(t,e),o=w.difference(e,t),n=new Map;for(const t of e)n.set(t.id,t);for(const e of s)e.detach_document();for(const e of o)e.attach_document(this);this._all_models=n}roots(){return this._roots}add_root(e,t){if(_.logger.debug(`Adding root: ${e}`),!m.includes(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new M.RootAddedEvent(this,e,t))}}remove_root(e,t){const s=this._roots.indexOf(e);if(!(s<0)){this._push_all_models_freeze();try{this._roots.splice(s,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new M.RootRemovedEvent(this,e,t))}}title(){return this._title}set_title(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new M.TitleChangedEvent(this,e,t)))}get_model_by_id(e){var t;return null!==(t=this._all_models.get(e))&&void 0!==t?t:null}get_model_by_name(e){const t=[];for(const s of this._all_models.values())s instanceof k.Model&&s.name==e&&t.push(s);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(`Multiple models are named '${e}'`)}}on_message(e,t){const s=this._message_callbacks.get(e);null==s?this._message_callbacks.set(e,new Set([t])):s.add(t)}remove_on_message(e,t){var s;null===(s=this._message_callbacks.get(e))||void 0===s||s.delete(t)}_trigger_on_message(e,t){const s=this._message_callbacks.get(e);if(null!=s)for(const e of s)e(t)}on_change(e,t=!1){this._callbacks.has(e)||this._callbacks.set(e,t)}remove_on_change(e){this._callbacks.delete(e)}_trigger_on_change(e){for(const[t,s]of this._callbacks)if(!s&&e instanceof M.DocumentEventBatch)for(const s of e.events)t(s);else t(e)}_notify_change(e,t,s,o,n){this._trigger_on_change(new M.ModelChangedEvent(this,e,t,s,o,null==n?void 0:n.setter_id,null==n?void 0:n.hint))}static _instantiate_object(e,t,s){const o=Object.assign(Object.assign({},s),{id:e,__deferred__:!0});return new(r.Models(t))(o)}static _instantiate_references_json(e,t){var s;const o=new Map;for(const n of e){const e=n.id,i=n.type,r=null!==(s=n.attributes)&&void 0!==s?s:{};let a=t.get(e);null==a&&(a=E._instantiate_object(e,i,r),null!=n.subtype&&a.set_subtype(n.subtype)),o.set(a.id,a)}return o}static _resolve_refs(e,t,s,o){function n(e){if(f.is_ref(e)){if(t.has(e.id))return t.get(e.id);if(s.has(e.id))return s.get(e.id);throw new Error(`reference ${JSON.stringify(e)} isn't known (not in Document?)`)}return u.is_NDArray_ref(e)?u.decode_NDArray(e,o):v.isArray(e)?function(e){const t=[];for(const s of e)t.push(n(s));return t}(e):v.isPlainObject(e)?function(e){const t={};for(const[s,o]of g.entries(e))t[s]=n(o);return t}(e):e}return n(e)}static _initialize_references_json(e,t,s,o){const n=new Map;for(const{id:i,attributes:r}of e){const e=!t.has(i),a=e?s.get(i):t.get(i),_=E._resolve_refs(r,t,s,o);a.setv(_,{silent:!0}),n.set(i,{instance:a,is_new:e})}const i=[],r=new Set;function a(e){if(e instanceof c.HasProps){if(n.has(e.id)&&!r.has(e.id)){r.add(e.id);const{instance:t,is_new:s}=n.get(e.id),{attributes:o}=t;for(const e of g.values(o))a(e);s&&(t.finalize(),i.push(t))}}else if(v.isArray(e))for(const t of e)a(t);else if(v.isPlainObject(e))for(const t of g.values(e))a(t)}for(const e of n.values())a(e.instance);for(const e of i)e.connect_signals()}static _event_for_attribute_change(e,t,s,o,n){if(o.get_model_by_id(e.id).property(t).syncable){const i={kind:\"ModelChanged\",model:{id:e.id},attr:t,new:s};return c.HasProps._json_record_references(o,s,n,{recursive:!0}),i}return null}static _events_to_sync_objects(e,t,s,o){const n=Object.keys(e.attributes),i=Object.keys(t.attributes),r=m.difference(n,i),a=m.difference(i,n),l=m.intersection(n,i),c=[];for(const e of r)_.logger.warn(`Server sent key ${e} but we don't seem to have it in our JSON`);for(const n of a){const i=t.attributes[n];c.push(E._event_for_attribute_change(e,n,i,s,o))}for(const n of l){const i=e.attributes[n],r=t.attributes[n];null==i&&null==r||(null==i||null==r?c.push(E._event_for_attribute_change(e,n,r,s,o)):p.is_equal(i,r)||c.push(E._event_for_attribute_change(e,n,r,s,o)))}return c.filter((e=>null!=e))}static _compute_patch_since_json(e,t){const s=t.to_json(!1);function o(e){const t=new Map;for(const s of e.roots.references)t.set(s.id,s);return t}const n=o(e),i=new Map,r=[];for(const t of e.roots.root_ids)i.set(t,n.get(t)),r.push(t);const a=o(s),_=new Map,l=[];for(const e of s.roots.root_ids)_.set(e,a.get(e)),l.push(e);if(r.sort(),l.sort(),m.difference(r,l).length>0||m.difference(l,r).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");const c=new Set;let h=[];for(const e of t._all_models.keys())if(n.has(e)){const s=E._events_to_sync_objects(n.get(e),a.get(e),t,c);h=h.concat(s)}const f=new d.Serializer({include_defaults:!1});return f.to_serializable([...c]),{references:[...f.definitions],events:h}}to_json_string(e=!0){return JSON.stringify(this.to_json(e))}to_json(e=!0){const t=new d.Serializer({include_defaults:e}),s=t.to_serializable(this._roots);return{version:a.version,title:this._title,roots:{root_ids:s.map((e=>e.id)),references:[...t.definitions]}}}static from_json_string(e){const t=JSON.parse(e);return E.from_json(t)}static from_json(e){_.logger.debug(\"Creating Document from JSON\");const t=e.version,s=-1!==t.indexOf(\"+\")||-1!==t.indexOf(\"-\"),o=`Library versions: JS (${a.version}) / Python (${t})`;s||a.version.replace(/-(dev|rc)\\./,\"$1\")==t?_.logger.debug(o):(_.logger.warn(\"JS/Python version mismatch\"),_.logger.warn(o)),null!=e.defs&&j.resolve_defs(e.defs);const n=e.roots,i=n.root_ids,r=n.references,l=E._instantiate_references_json(r,new Map);E._initialize_references_json(r,new Map,l,new Map);const c=new E;for(const e of i){const t=l.get(e);null!=t&&c.add_root(t)}return c.set_title(e.title),c}replace_with_json(e){E.from_json(e).destructively_move(this)}create_json_patch_string(e){return JSON.stringify(this.create_json_patch(e))}create_json_patch(e){for(const t of e)if(t.document!=this)throw new Error(\"Cannot create a patch using events from a different document\");const t=new d.Serializer;return{events:t.to_serializable(e),references:[...t.definitions]}}apply_json_patch(e,t=new Map,s){const o=e.references,n=e.events,i=E._instantiate_references_json(o,this._all_models);t instanceof Map||(t=new Map(t));for(const e of n)switch(e.kind){case\"RootAdded\":case\"RootRemoved\":case\"ModelChanged\":{const t=e.model.id,s=this._all_models.get(t);if(null!=s)i.set(t,s);else if(!i.has(t))throw _.logger.warn(`Got an event for unknown model ${e.model}\"`),new Error(\"event model wasn't known\");break}}const r=new Map,a=new Map;for(const[e,t]of i)this._all_models.has(e)?r.set(e,t):a.set(e,t);E._initialize_references_json(o,r,a,t);for(const e of n)switch(e.kind){case\"MessageSent\":{const{msg_type:s,msg_data:o}=e;let n;if(void 0===o){if(1!=t.size)throw new Error(\"expected exactly one buffer\");{const[[,e]]=t;n=e}}else n=E._resolve_refs(o,r,a,t);this._trigger_on_message(s,n);break}case\"ModelChanged\":{const o=e.model.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot apply patch to ${o} which is not in the document`);const i=e.attr,_=E._resolve_refs(e.new,r,a,t);n.setv({[i]:_},{setter_id:s});break}case\"ColumnDataChanged\":{const o=e.column_source.id,n=this._all_models.get(o);if(null==n)throw new Error(`Cannot stream to ${o} which is not in the document`);const i=E._resolve_refs(e.new,new Map,new Map,t);if(null!=e.cols)for(const e in n.data)e in i||(i[e]=n.data[e]);n.setv({data:i},{setter_id:s,check_eq:!1});break}case\"ColumnsStreamed\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot stream to ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");const n=e.data,i=e.rollover;o.stream(n,i,s);break}case\"ColumnsPatched\":{const t=e.column_source.id,o=this._all_models.get(t);if(null==o)throw new Error(`Cannot patch ${t} which is not in the document`);if(!(o instanceof y.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");const n=e.patches;o.patch(n,s);break}case\"RootAdded\":{const t=e.model.id,o=i.get(t);this.add_root(o,s);break}case\"RootRemoved\":{const t=e.model.id,o=i.get(t);this.remove_root(o,s);break}case\"TitleChanged\":this.set_title(e.title,s);break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(e))}}}s.Document=E,E.__name__=\"Document\"},\n function _(e,s,r,o,t){o();const d=e(1),i=e(8),l=e(13),n=e(14);r.overrides={};const a=new Map;r.Models=e=>{const s=r.Models.get(e);if(null!=s)return s;throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`)},r.Models.get=e=>{var s;return null!==(s=r.overrides[e])&&void 0!==s?s:a.get(e)},r.Models.register=(e,s)=>{r.overrides[e]=s},r.Models.unregister=e=>{delete r.overrides[e]},r.Models.register_models=(e,s=!1,r)=>{var o;if(null!=e)for(const t of i.isArray(e)?e:l.values(e))if(o=t,i.isObject(o)&&o.prototype instanceof n.HasProps){const e=t.__qualified__;s||!a.has(e)?a.set(e,t):null!=r?r(e):console.warn(`Model '${e}' was already registered`)}},r.register_models=r.Models.register_models,r.Models.registered_names=()=>[...a.keys()];const g=d.__importStar(e(38));r.register_models(g)},\n function _(n,r,t,e,i){e();\n // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n // Underscore may be freely distributed under the MIT license.\n const o=n(9),u=Object.prototype.toString;function c(n){return!0===n||!1===n||\"[object Boolean]\"===u.call(n)}function f(n){return\"[object Number]\"===u.call(n)}function a(n){return\"[object String]\"===u.call(n)}function l(n){const r=typeof n;return\"function\"===r||\"object\"===r&&!!n}function s(n){return l(n)&&void 0!==n[Symbol.iterator]}t.isBoolean=c,t.isNumber=f,t.isInteger=function(n){return f(n)&&Number.isInteger(n)},t.isString=a,t.isPrimitive=function(n){return null===n||c(n)||f(n)||a(n)},t.isFunction=function(n){return\"[object Function]\"===u.call(n)},t.isArray=function(n){return Array.isArray(n)},t.isArrayOf=function(n,r){return o.every(n,r)},t.isArrayableOf=function(n,r){for(let t=0,e=n.length;t0,\"'step' must be a positive number\"),null==t&&(t=n,n=0);const{max:r,ceil:o,abs:i}=Math,c=n<=t?e:-e,f=r(o(i(t-n)/e),0),s=new Array(f);for(let t=0;t=0?t:n.length+t]},e.zip=function(...n){if(0==n.length)return[];const t=c.min(n.map((n=>n.length))),e=n.length,r=new Array(t);for(let o=0;on.length))),r=Array(e);for(let n=0;nn[t]))},e.argmax=function(n){return c.max_by(m(n.length),(t=>n[t]))},e.sort_by=function(n,t){const e=n.map(((n,e)=>({value:n,index:e,key:t(n)})));return e.sort(((n,t)=>{const e=n.key,r=t.key;if(e!==r){if(e>r||void 0===e)return 1;if(en.value))},e.uniq=function(n){const t=new Set;for(const e of n)t.add(e);return[...t]},e.uniq_by=function(n,t){const e=[],r=[];for(const o of n){const n=t(o);l(r,n)||(r.push(n),e.push(o))}return e},e.union=function(...n){const t=new Set;for(const e of n)for(const n of e)t.add(n);return[...t]},e.intersection=function(n,...t){const e=[];n:for(const r of n)if(!l(e,r)){for(const n of t)if(!l(n,r))continue n;e.push(r)}return e},e.difference=function(n,...t){const e=a(t);return n.filter((n=>!l(e,n)))},e.remove_at=function(n,t){const e=s(n);return e.splice(t,1),e},e.remove_by=function(n,t){for(let e=0;e2*u;)n-=2*u;return n}function c(n,r){return a(n-r)}function f(){return Math.random()}function i(n){switch(n){case\"deg\":return u/180;case\"rad\":return 1;case\"grad\":return u/200;case\"turn\":return 2*u}}t.angle_norm=a,t.angle_dist=c,t.angle_between=function(n,r,t,e=!1){const o=c(r,t);if(0==o)return!1;if(o==2*u)return!0;const f=a(n),i=c(r,f)<=o&&c(f,t)<=o;return e?!i:i},t.random=f,t.randomIn=function(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))},t.atan2=function(n,r){return Math.atan2(r[1]-n[1],r[0]-n[0])},t.radians=function(n){return n*(u/180)},t.degrees=function(n){return n/(u/180)},t.resolve_angle=function(n,r){return-i(r)*n},t.to_radians_coeff=i,t.rnorm=function(n,r){let t,e;for(;t=f(),e=f(),e=(2*e-1)*Math.sqrt(1/Math.E*2),!(-4*t*t*Math.log(t)>=e*e););let o=e/t;return o=n+r*o,o},t.clamp=function(n,r,t){return nt?t:n},t.log=function(n,r=Math.E){return Math.log(n)/Math.log(r)}},\n function _(r,n,e,o,s){o();class t extends Error{}e.AssertionError=t,t.__name__=\"AssertionError\",e.assert=function(r,n){if(!(!0===r||!1!==r&&r()))throw new t(null!=n?n:\"Assertion failed\")},e.unreachable=function(){throw new Error(\"unreachable code\")}},\n function _(n,t,e,r,o){r();const i=n(10);function l(n,t,e,...r){const o=n.length;t<0&&(t+=o),t<0?t=0:t>o&&(t=o),null==e||e>o-t?e=o-t:e<0&&(e=0);const i=o-e+r.length,l=new n.constructor(i);let u=0;for(;u0?0:r-1;for(;o>=0&&ot[t.length-1])return t.length;let e=0,r=t.length-1;for(;r-e!=1;){const o=e+Math.floor((r-e)/2);n>=t[o]?e=o:r=o}return e}e.is_empty=function(n){return 0==n.length},e.copy=function(n){return Array.isArray(n)?n.slice():new n.constructor(n)},e.splice=l,e.head=u,e.insert=function(n,t,e){return l(n,e,0,t)},e.append=function(n,t){return l(n,n.length,0,t)},e.prepend=function(n,t){return l(n,0,0,t)},e.indexOf=function(n,t){for(let e=0,r=n.length;ee&&(e=t);return e},e.minmax=function(n){let t,e=1/0,r=-1/0;for(let o=0,i=n.length;or&&(r=t));return[e,r]},e.min_by=function(n,t){if(0==n.length)throw new Error(\"min_by() called with an empty array\");let e=n[0],r=t(e);for(let o=1,i=n.length;or&&(e=i,r=l)}return e},e.sum=function(n){let t=0;for(let e=0,r=n.length;et[r]=n+e),0),t},e.every=function(n,t){for(let e=0,r=n.length;e(n-t)/r))}},\n function _(t,e,n,c,o){c();const s=t(9),{hasOwnProperty:r}=Object.prototype;function u(t){return Object.keys(t).length}n.keys=Object.keys,n.values=Object.values,n.entries=Object.entries,n.extend=Object.assign,n.clone=function(t){return Object.assign({},t)},n.merge=function(t,e){const n=Object.create(Object.prototype),c=s.concat([Object.keys(t),Object.keys(e)]);for(const o of c){const c=r.call(t,o)?t[o]:[],u=r.call(e,o)?e[o]:[];n[o]=s.union(c,u)}return n},n.size=u,n.isEmpty=function(t){return 0==u(t)},n.to_object=function(t){const e={};for(const[n,c]of t)e[n]=c;return e}},\n function _(t,e,s,n,r){n();const i=t(1),o=t(15),c=t(17),a=i.__importStar(t(18)),_=i.__importStar(t(21)),h=t(34),u=t(13),l=t(8),f=t(26),p=t(30),d=t(35),g=t(26),y=t(36),v=t(37),m=i.__importStar(t(21));class b extends(o.Signalable()){constructor(t={}){var e,s;super(),this._subtype=void 0,this.document=null,this.destroyed=new o.Signal0(this,\"destroyed\"),this.change=new o.Signal0(this,\"change\"),this.transformchange=new o.Signal0(this,\"transformchange\"),this.exprchange=new o.Signal0(this,\"exprchange\"),this.properties={},this._pending=!1,this._changing=!1;const n=t instanceof Map?t.get.bind(t):e=>t[e];this.id=null!==(e=n(\"id\"))&&void 0!==e?e:h.uniqueId();for(const[t,{type:e,default_value:s,options:r}]of u.entries(this._props)){let i;e instanceof a.PropertyAlias?Object.defineProperty(this.properties,t,{get:()=>this.properties[e.attr],configurable:!1,enumerable:!1}):(i=e instanceof _.Kind?new a.PrimitiveProperty(this,t,e,s,n(t),r):new e(this,t,_.Any,s,n(t),r),this.properties[t]=i)}null!==(s=n(\"__deferred__\"))&&void 0!==s&&s||(this.finalize(),this.connect_signals())}get is_syncable(){return!0}set type(t){console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\"),this.constructor.__name__=t}get type(){return this.constructor.__qualified__}static get __qualified__(){const{__module__:t,__name__:e}=this;return null!=t?`${t}.${e}`:e}static get[Symbol.toStringTag](){return this.__name__}static init_HasProps(){this.prototype._props={},this.prototype._mixins=[]}static _fix_default(t,e){if(void 0===t||l.isFunction(t))return t;if(l.isPrimitive(t))return()=>t;{const e=new v.Cloner;return()=>e.clone(t)}}static define(t){for(const[e,s]of u.entries(l.isFunction(t)?t(m):t)){if(null!=this.prototype._props[e])throw new Error(`attempted to redefine property '${this.prototype.type}.${e}'`);if(null!=this.prototype[e])throw new Error(`attempted to redefine attribute '${this.prototype.type}.${e}'`);Object.defineProperty(this.prototype,e,{get(){return this.properties[e].get_value()},set(t){return this.setv({[e]:t}),this},configurable:!1,enumerable:!0});const[t,n,r={}]=s,i={type:t,default_value:this._fix_default(n,e),options:r},o=Object.assign({},this.prototype._props);o[e]=i,this.prototype._props=o}}static internal(t){const e={};for(const[s,n]of u.entries(l.isFunction(t)?t(m):t)){const[t,r,i={}]=n;e[s]=[t,r,Object.assign(Object.assign({},i),{internal:!0})]}this.define(e)}static mixins(t){function e(t,e){const s={};for(const[n,r]of u.entries(e))s[t+n]=r;return s}const s={},n=[];for(const r of l.isArray(t)?t:[t])if(l.isArray(r)){const[t,i]=r;u.extend(s,e(t,i)),n.push([t,i])}else{const t=r;u.extend(s,t),n.push([\"\",t])}this.define(s),this.prototype._mixins=[...this.prototype._mixins,...n]}static override(t){for(const[e,s]of u.entries(t)){const t=this._fix_default(s,e),n=this.prototype._props[e];if(null==n)throw new Error(`attempted to override nonexistent '${this.prototype.type}.${e}'`);const r=Object.assign({},this.prototype._props);r[e]=Object.assign(Object.assign({},n),{default_value:t}),this.prototype._props=r}}toString(){return`${this.type}(${this.id})`}property(t){const e=this.properties[t];if(null!=e)return e;throw new Error(`unknown property ${this.type}.${t}`)}get attributes(){const t={};for(const e of this)t[e.attr]=e.get_value();return t}[v.clone](t){const e=new Map;for(const s of this)s.dirty&&e.set(s.attr,t.clone(s.get_value()));return new this.constructor(e)}[g.equals](t,e){for(const s of this){const n=t.property(s.attr);if(e.eq(s.get_value(),n.get_value()))return!1}return!0}[y.pretty](t){const e=t.token,s=[];for(const n of this)if(n.dirty){const r=n.get_value();s.push(`${n.attr}${e(\":\")} ${t.to_string(r)}`)}return`${this.constructor.__qualified__}${e(\"(\")}${e(\"{\")}${s.join(`${e(\",\")} `)}${e(\"}\")}${e(\")\")}`}[p.serialize](t){const e=this.ref();t.add_ref(this,e);const s=this.struct();for(const e of this)e.syncable&&(t.include_defaults||e.dirty)&&(s.attributes[e.attr]=t.to_serializable(e.get_value()));return t.add_def(this,s),e}finalize(){for(const t of this){if(!(t instanceof a.VectorSpec||t instanceof a.ScalarSpec))continue;const e=t.get_value();if(null!=e){const{transform:t,expr:s}=e;null!=t&&this.connect(t.change,(()=>this.transformchange.emit())),null!=s&&this.connect(s.change,(()=>this.exprchange.emit()))}}this.initialize()}initialize(){}connect_signals(){}disconnect_signals(){o.Signal.disconnectReceiver(this)}destroy(){this.disconnect_signals(),this.destroyed.emit()}clone(){return(new v.Cloner).clone(this)}_setv(t,e){const s=e.check_eq,n=[],r=this._changing;this._changing=!0;for(const[e,r]of t)!1!==s&&f.is_equal(e.get_value(),r)||(e.set_value(r),n.push(e));n.length>0&&(this._pending=!0);for(const t of n)t.change.emit();if(!r){if(!e.no_change)for(;this._pending;)this._pending=!1,this.change.emit();this._pending=!1,this._changing=!1}}setv(t,e={}){const s=u.entries(t);if(0==s.length)return;if(!0===e.silent){for(const[t,e]of s)this.properties[t].set_value(e);return}const n=new Map,r=new Map;for(const[t,e]of s){const s=this.properties[t];n.set(s,e),r.set(s,s.get_value())}this._setv(n,e);const{document:i}=this;if(null!=i){const t=[];for(const[e,s]of r)t.push([e,s,e.get_value()]);for(const[,e,s]of t)if(this._needs_invalidate(e,s)){i._invalidate_all_models();break}this._push_changes(t,e)}}getv(t){return this.property(t).get_value()}ref(){return{id:this.id}}struct(){const t={type:this.type,id:this.id,attributes:{}};return null!=this._subtype&&(t.subtype=this._subtype),t}set_subtype(t){this._subtype=t}*[Symbol.iterator](){yield*u.values(this.properties)}*syncable_properties(){for(const t of this)t.syncable&&(yield t)}serializable_attributes(){const t={};for(const e of this.syncable_properties())t[e.attr]=e.get_value();return t}static _json_record_references(t,e,s,n){const{recursive:r}=n;if(c.is_ref(e)){const n=t.get_model_by_id(e.id);null==n||s.has(n)||b._value_record_references(n,s,{recursive:r})}else if(l.isArray(e))for(const n of e)b._json_record_references(t,n,s,{recursive:r});else if(l.isPlainObject(e))for(const n of u.values(e))b._json_record_references(t,n,s,{recursive:r})}static _value_record_references(t,e,s){const{recursive:n}=s;if(t instanceof b){if(!e.has(t)&&(e.add(t),n))for(const s of t.syncable_properties()){const t=s.get_value();b._value_record_references(t,e,{recursive:n})}}else if(l.isArray(t))for(const s of t)b._value_record_references(s,e,{recursive:n});else if(l.isPlainObject(t))for(const s of u.values(t))b._value_record_references(s,e,{recursive:n})}references(){const t=new Set;return b._value_record_references(this,t,{recursive:!0}),t}_doc_attached(){}_doc_detached(){}attach_document(t){if(null!=this.document&&this.document!=t)throw new Error(\"models must be owned by only a single document\");this.document=t,this._doc_attached()}detach_document(){this._doc_detached(),this.document=null}_needs_invalidate(t,e){const s=new Set;b._value_record_references(e,s,{recursive:!1});const n=new Set;b._value_record_references(t,n,{recursive:!1});for(const t of s)if(!n.has(t))return!0;for(const t of n)if(!s.has(t))return!0;return!1}_push_changes(t,e={}){if(!this.is_syncable)return;const{document:s}=this;if(null==s)return;const{setter_id:n}=e,r=[];for(const[e,i,o]of t)e.syncable&&r.push(new d.ModelChangedEvent(s,this,e.attr,i,o,n));if(0!=r.length){let t;1==r.length?[t]=r:t=new d.DocumentEventBatch(s,r,n),s._trigger_on_change(t)}}on_change(t,e){for(const s of l.isArray(t)?t:[t])this.connect(s.change,e)}}s.HasProps=b,b.init_HasProps()},\n function _(n,t,e,l,s){l();const i=n(16),o=n(9);class c{constructor(n,t){this.sender=n,this.name=t}connect(n,t=null){u.has(this.sender)||u.set(this.sender,[]);const e=u.get(this.sender);if(null!=g(e,this,n,t))return!1;const l=null!=t?t:n;a.has(l)||a.set(l,[]);const s=a.get(l),i={signal:this,slot:n,context:t};return e.push(i),s.push(i),!0}disconnect(n,t=null){const e=u.get(this.sender);if(null==e||0===e.length)return!1;const l=g(e,this,n,t);if(null==l)return!1;const s=null!=t?t:n,i=a.get(s);return l.signal=null,d(e),d(i),!0}emit(n){var t;const e=null!==(t=u.get(this.sender))&&void 0!==t?t:[];for(const{signal:t,slot:l,context:s}of e)t===this&&l.call(s,n,this.sender)}}e.Signal=c,c.__name__=\"Signal\";class r extends c{emit(){super.emit(void 0)}}e.Signal0=r,r.__name__=\"Signal0\",function(n){function t(n,t){const e=u.get(n);if(null==e||0===e.length)return;const l=a.get(t);if(null!=l&&0!==l.length){for(const t of l){if(null==t.signal)return;t.signal.sender===n&&(t.signal=null)}d(e),d(l)}}function e(n){var t;const e=u.get(n);if(null!=e&&0!==e.length){for(const n of e){if(null==n.signal)return;const e=null!==(t=n.context)&&void 0!==t?t:n.slot;n.signal=null,d(a.get(e))}d(e)}}function l(n,t,e){const l=a.get(n);if(null!=l&&0!==l.length){for(const n of l){if(null==n.signal)return;if(null!=t&&n.slot!=t)continue;const l=n.signal.sender;null!=e&&e.has(l)||(n.signal=null,d(u.get(l)))}d(l)}}function s(n){const t=u.get(n);if(null!=t&&0!==t.length){for(const n of t)n.signal=null;d(t)}const e=a.get(n);if(null!=e&&0!==e.length){for(const n of e)n.signal=null;d(e)}}n.disconnect_between=t,n.disconnect_sender=e,n.disconnect_receiver=l,n.disconnect_all=s,n.disconnectBetween=t,n.disconnectSender=e,n.disconnectReceiver=l,n.disconnectAll=s}(c||(e.Signal=c={})),e.Signalable=function(){return class{connect(n,t){return n.connect(t,this)}disconnect(n,t){return n.disconnect(t,this)}}};const u=new WeakMap,a=new WeakMap;function g(n,t,e,l){return o.find(n,(n=>n.signal===t&&n.slot===e&&n.context===l))}const f=new Set;function d(n){0===f.size&&(async()=>{await i.defer(),function(){for(const n of f)o.remove_by(n,(n=>null==n.signal));f.clear()}()})(),f.add(n)}},\n function _(e,n,t,s,o){s();const a=new MessageChannel,l=new Map;a.port1.onmessage=e=>{const n=e.data,t=l.get(n);if(null!=t)try{t()}finally{l.delete(n)}};let r=1;t.defer=function(){return new Promise((e=>{const n=r++;l.set(n,e),a.port2.postMessage(n)}))}},\n function _(n,t,i,e,c){e();const r=n(8),s=n(13);i.is_ref=function(n){if(r.isPlainObject(n)){const t=s.keys(n);return 1==t.length&&\"id\"==t[0]}return!1}},\n function _(e,t,n,a,r){a(),n.YCoordinateSeqSeqSeqSpec=n.XCoordinateSeqSeqSeqSpec=n.YCoordinateSeqSpec=n.XCoordinateSeqSpec=n.YCoordinateSpec=n.XCoordinateSpec=n.CoordinateSeqSeqSeqSpec=n.CoordinateSeqSpec=n.CoordinateSpec=n.BaseCoordinateSpec=n.NumberUnitsSpec=n.UnitsSpec=n.DataSpec=n.VectorSpec=n.TextBaselineScalar=n.TextAlignScalar=n.FontStyleScalar=n.FontSizeScalar=n.FontScalar=n.LineDashScalar=n.LineCapScalar=n.LineJoinScalar=n.ArrayScalar=n.NullStringScalar=n.StringScalar=n.NumberScalar=n.ColorScalar=n.AnyScalar=n.ScalarSpec=n.VerticalAlign=n.UpdateMode=n.TooltipAttachment=n.TickLabelOrientation=n.TextureRepetition=n.TextBaseline=n.TextAlign=n.TapBehavior=n.StepMode=n.StartEnd=n.SpatialUnits=n.Sort=n.SizingMode=n.Side=n.RoundingFunction=n.ResetPolicy=n.RenderMode=n.RenderLevel=n.RadiusDimension=n.PointPolicy=n.Place=void 0,n.TextBaselineSpec=n.TextAlignSpec=n.FontStyleSpec=n.FontSizeSpec=n.FontSpec=n.LineDashSpec=n.LineCapSpec=n.LineJoinSpec=n.MarkerSpec=n.ArraySpec=n.NullStringSpec=n.StringSpec=n.AnySpec=n.NDArraySpec=n.ColorSpec=n.NumberSpec=n.BooleanSpec=n.ScreenDistanceSpec=n.NullDistanceSpec=n.DistanceSpec=n.AngleSpec=void 0;const i=e(1),s=e(15),l=e(19),o=i.__importStar(e(20)),c=e(24),_=e(9),u=e(12),d=e(10),S=e(22),p=e(27),m=e(8),h=e(28),v=e(29),y=e(33);function x(e){try{return JSON.stringify(e)}catch(t){return e.toString()}}function g(e){return m.isPlainObject(e)&&(void 0===e.value?0:1)+(void 0===e.field?0:1)+(void 0===e.expr?0:1)==1}r(\"Uniform\",y.Uniform),r(\"UniformScalar\",y.UniformScalar),r(\"UniformVector\",y.UniformVector),n.isSpec=g;class f{constructor(e,t,n,a,r,i={}){var l;let o;if(this.obj=e,this.attr=t,this.kind=n,this.default_value=a,this._dirty=!1,this.change=new s.Signal0(this.obj,\"change\"),this.internal=null!==(l=i.internal)&&void 0!==l&&l,this.on_update=i.on_update,void 0!==r)o=r,this._dirty=!0;else{const t=this._default_override();if(void 0!==t)o=t;else{if(void 0===a)return void(this.spec={value:null});o=a(e)}}this._update(o)}get is_value(){return void 0!==this.spec.value}get syncable(){return!this.internal}get_value(){return this.spec.value}set_value(e){this._update(e),this._dirty=!0}_default_override(){}get dirty(){return this._dirty}_update(e){var t;this.validate(e),this.spec={value:e},null===(t=this.on_update)||void 0===t||t.call(this,e,this.obj)}toString(){return`Prop(${this.obj}.${this.attr}, spec: ${x(this.spec)})`}normalize(e){return e}validate(e){if(!this.valid(e))throw new Error(`${this.obj}.${this.attr} given invalid value: ${x(e)}`)}valid(e){return this.kind.valid(e)}_value(e=!0){if(!this.is_value)throw new Error(\"attempted to retrieve property value for property without value specification\");let t=this.normalize([this.spec.value])[0];return null!=this.spec.transform&&e&&(t=this.spec.transform.compute(t)),t}}n.Property=f,f.__name__=\"Property\";class A{constructor(e){this.attr=e}}n.PropertyAlias=A,A.__name__=\"PropertyAlias\",n.Alias=function(e){return new A(e)};class C extends f{}n.PrimitiveProperty=C,C.__name__=\"PrimitiveProperty\";class L extends f{}n.Any=L,L.__name__=\"Any\";class T extends f{valid(e){return m.isArray(e)||m.isTypedArray(e)}}n.Array=T,T.__name__=\"Array\";class P extends f{valid(e){return m.isBoolean(e)}}n.Boolean=P,P.__name__=\"Boolean\";class b extends f{valid(e){return S.is_Color(e)}}n.Color=b,b.__name__=\"Color\";class w extends f{}n.Instance=w,w.__name__=\"Instance\";class q extends f{valid(e){return m.isNumber(e)}}n.Number=q,q.__name__=\"Number\";class N extends q{valid(e){return m.isNumber(e)&&(0|e)==e}}n.Int=N,N.__name__=\"Int\";class B extends q{}n.Angle=B,B.__name__=\"Angle\";class D extends q{valid(e){return m.isNumber(e)&&0<=e&&e<=1}}n.Percent=D,D.__name__=\"Percent\";class F extends f{valid(e){return m.isString(e)}}n.String=F,F.__name__=\"String\";class z extends f{valid(e){return null===e||m.isString(e)}}n.NullString=z,z.__name__=\"NullString\";class U extends F{}n.FontSize=U,U.__name__=\"FontSize\";class M extends F{_default_override(){return h.settings.dev?\"Bokeh\":void 0}}n.Font=M,M.__name__=\"Font\";class R extends f{valid(e){return m.isString(e)&&_.includes(this.enum_values,e)}}function k(e){return class extends R{get enum_values(){return[...e]}}}n.EnumProperty=R,R.__name__=\"EnumProperty\",n.Enum=k;class O extends R{get enum_values(){return[...o.Direction]}normalize(e){const t=new Uint8Array(e.length);for(let n=0;n0){let o=r[e];return null==o&&(r[e]=o=new v(e,l)),o}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")}get level(){return this.get_level()}get_level(){return this._log_level}set_level(e){if(e instanceof i)this._log_level=e;else{if(!s.isString(e)||null==v.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=v.log_levels[e]}const l=`[${this._name}]`;for(const[e,o]of g.entries(v.log_levels))o.level\",\"*\"),t.HTTPMethod=a.Enum(\"POST\",\"GET\"),t.HexTileOrientation=a.Enum(\"pointytop\",\"flattop\"),t.HoverMode=a.Enum(\"mouse\",\"hline\",\"vline\"),t.LatLon=a.Enum(\"lat\",\"lon\"),t.LegendClickPolicy=a.Enum(\"none\",\"hide\",\"mute\"),t.LegendLocation=t.Anchor,t.LineCap=a.Enum(\"butt\",\"round\",\"square\"),t.LineJoin=a.Enum(\"miter\",\"round\",\"bevel\"),t.LineDash=a.Enum(\"solid\",\"dashed\",\"dotted\",\"dotdash\",\"dashdot\"),t.LinePolicy=a.Enum(\"prev\",\"next\",\"nearest\",\"interp\",\"none\"),t.Location=a.Enum(\"above\",\"below\",\"left\",\"right\"),t.Logo=a.Enum(\"normal\",\"grey\"),t.MarkerType=a.Enum(\"asterisk\",\"circle\",\"circle_cross\",\"circle_dot\",\"circle_x\",\"circle_y\",\"cross\",\"dash\",\"diamond\",\"diamond_cross\",\"diamond_dot\",\"dot\",\"hex\",\"hex_dot\",\"inverted_triangle\",\"plus\",\"square\",\"square_cross\",\"square_dot\",\"square_pin\",\"square_x\",\"star\",\"star_dot\",\"triangle\",\"triangle_dot\",\"triangle_pin\",\"x\",\"y\"),t.MutedPolicy=a.Enum(\"show\",\"ignore\"),t.Orientation=a.Enum(\"vertical\",\"horizontal\"),t.OutputBackend=a.Enum(\"canvas\",\"svg\",\"webgl\"),t.PaddingUnits=a.Enum(\"percent\",\"absolute\"),t.Place=a.Enum(\"above\",\"below\",\"left\",\"right\",\"center\"),t.PointPolicy=a.Enum(\"snap_to_data\",\"follow_mouse\",\"none\"),t.RadiusDimension=a.Enum(\"x\",\"y\",\"max\",\"min\"),t.RenderLevel=a.Enum(\"image\",\"underlay\",\"glyph\",\"guide\",\"annotation\",\"overlay\"),t.RenderMode=a.Enum(\"canvas\",\"css\"),t.ResetPolicy=a.Enum(\"standard\",\"event_only\"),t.RoundingFunction=a.Enum(\"round\",\"nearest\",\"floor\",\"rounddown\",\"ceil\",\"roundup\"),t.SelectionMode=a.Enum(\"replace\",\"append\",\"intersect\",\"subtract\"),t.Side=a.Enum(\"above\",\"below\",\"left\",\"right\"),t.SizingMode=a.Enum(\"stretch_width\",\"stretch_height\",\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"),t.Sort=a.Enum(\"ascending\",\"descending\"),t.SpatialUnits=a.Enum(\"screen\",\"data\"),t.StartEnd=a.Enum(\"start\",\"end\"),t.StepMode=a.Enum(\"after\",\"before\",\"center\"),t.TapBehavior=a.Enum(\"select\",\"inspect\"),t.TextAlign=a.Enum(\"left\",\"right\",\"center\"),t.TextBaseline=a.Enum(\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"),t.TextureRepetition=a.Enum(\"repeat\",\"repeat_x\",\"repeat_y\",\"no_repeat\"),t.TickLabelOrientation=a.Enum(\"vertical\",\"horizontal\",\"parallel\",\"normal\"),t.TooltipAttachment=a.Enum(\"horizontal\",\"vertical\",\"left\",\"right\",\"above\",\"below\"),t.UpdateMode=a.Enum(\"replace\",\"append\"),t.VerticalAlign=a.Enum(\"top\",\"middle\",\"bottom\")},\n function _(e,n,t,s,r){s();const i=e(1).__importStar(e(8)),a=e(22),l=e(13),_=window.Map,{hasOwnProperty:u}=Object.prototype;class d{}t.Kind=d,d.__name__=\"Kind\",function(e){class n extends d{valid(e){return!0}}n.__name__=\"Any\",e.Any=n;class t extends d{valid(e){return!0}}t.__name__=\"Unknown\",e.Unknown=t;class s extends d{valid(e){return i.isBoolean(e)}}s.__name__=\"Boolean\",e.Boolean=s;class r extends d{constructor(e){super(),this.obj_type=e}valid(e){return!0}}r.__name__=\"Ref\",e.Ref=r;class c extends d{valid(e){return!0}}c.__name__=\"AnyRef\",e.AnyRef=c;class o extends d{valid(e){return i.isNumber(e)}}o.__name__=\"Number\",e.Number=o;class p extends o{valid(e){return super.valid(e)&&i.isInteger(e)}}p.__name__=\"Int\",e.Int=p;class y extends o{valid(e){return super.valid(e)&&0<=e&&e<=1}}y.__name__=\"Percent\",e.Percent=y;class m extends d{constructor(e){super(),this.types=e,this.types=e}valid(e){return this.types.some((n=>n.valid(e)))}}m.__name__=\"Or\",e.Or=m;class v extends d{constructor(e){super(),this.types=e,this.types=e}valid(e){if(!i.isArray(e))return!1;for(let n=0;nthis.item_type.valid(e)))}}f.__name__=\"Array\",e.Array=f;class K extends d{valid(e){return null===e}}K.__name__=\"Null\",e.Null=K;class b extends d{constructor(e){super(),this.base_type=e}valid(e){return null===e||this.base_type.valid(e)}}b.__name__=\"Nullable\",e.Nullable=b;class A extends d{constructor(e){super(),this.base_type=e}valid(e){return void 0===e||this.base_type.valid(e)}}A.__name__=\"Opt\",e.Opt=A;class x extends d{valid(e){return i.isString(e)}}x.__name__=\"String\",e.String=x;class S extends d{constructor(e){super(),this.values=new Set(e)}valid(e){return this.values.has(e)}*[Symbol.iterator](){yield*this.values}}S.__name__=\"Enum\",e.Enum=S;class N extends d{constructor(e){super(),this.item_type=e}valid(e){if(!i.isPlainObject(e))return!1;for(const n in e)if(u.call(e,n)){const t=e[n];if(!this.item_type.valid(t))return!1}return!0}}N.__name__=\"Dict\",e.Dict=N;class O extends d{constructor(e,n){super(),this.key_type=e,this.item_type=n}valid(e){if(!(e instanceof _))return!1;for(const[n,t]of e.entries())if(!this.key_type.valid(n)||!this.item_type.valid(t))return!1;return!0}}O.__name__=\"Map\",e.Map=O;class g extends d{valid(e){return a.is_Color(e)}}g.__name__=\"Color\",e.Color=g;class P extends d{valid(e){return i.isFunction(e)}}P.__name__=\"Function\",e.Function=P}(t.Kinds||(t.Kinds={})),t.Any=new t.Kinds.Any,t.Unknown=new t.Kinds.Unknown,t.Boolean=new t.Kinds.Boolean,t.Number=new t.Kinds.Number,t.Int=new t.Kinds.Int,t.String=new t.Kinds.String,t.Null=new t.Kinds.Null;t.Nullable=e=>new t.Kinds.Nullable(e);t.Opt=e=>new t.Kinds.Opt(e);t.Or=(...e)=>new t.Kinds.Or(e);t.Tuple=(...e)=>new t.Kinds.Tuple(e);t.Struct=e=>new t.Kinds.Struct(e),t.Arrayable=new t.Kinds.Arrayable;t.Array=e=>new t.Kinds.Array(e);t.Dict=e=>new t.Kinds.Dict(e);t.Map=(e,n)=>new t.Kinds.Map(e,n);t.Enum=(...e)=>new t.Kinds.Enum(e);t.Ref=e=>new t.Kinds.Ref(e);t.AnyRef=()=>new t.Kinds.AnyRef;t.Function=()=>new t.Kinds.Function,t.Percent=new t.Kinds.Percent,t.Alpha=t.Percent,t.Color=new t.Kinds.Color,t.Auto=t.Enum(\"auto\"),t.FontSize=t.String,t.Font=t.String,t.Angle=t.Number},\n function _(n,t,r,e,s){e();const u=n(23),l=n(10),c=n(8),{round:i}=Math;function o(n){return l.clamp(i(n),0,255)}function a(){return[0,0,0,0]}function f(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}function d(n,t){var r;let e,s,u,l;return null==n?[e,s,u,l]=[0,0,0,0]:c.isInteger(n)?[e,s,u,l]=f(n):c.isString(n)?[e,s,u,l]=null!==(r=_(n))&&void 0!==r?r:[0,0,0,0]:([e,s,u,l=1]=n,l=o(255*l)),255==l&&null!=t&&(l=o(255*t)),[e,s,u,l]}r.transparent=a,r.encode_rgba=function([n,t,r,e]){return n<<24|t<<16|r<<8|e},r.decode_rgba=f,r.compose_alpha=function(n,t){return 255==(255&n)?4294967040&n|o(255*t):n},r.color2rgba=d;const h={0:\"0\",1:\"1\",2:\"2\",3:\"3\",4:\"4\",5:\"5\",6:\"6\",7:\"7\",8:\"8\",9:\"9\",10:\"a\",11:\"b\",12:\"c\",13:\"d\",14:\"e\",15:\"f\"};function g(n){return h[n>>4]+h[15&n]}r.color2css=function(n,t){const[r,e,s,u]=d(n,t);return`rgba(${r}, ${e}, ${s}, ${u/255})`},r.color2hex=function(n,t){const[r,e,s,u]=d(n,t),l=`#${g(r)}${g(e)}${g(s)}`;return 255==u?l:`${l}${g(u)}`};const b=/^rgba?\\(\\s*([^\\s,]+?)\\s+([^\\s,]+?)\\s+([^\\s,]+?)(?:\\s*\\/\\s*([^\\s,]+?))?\\s*\\)$/,m=/^rgba?\\(\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)\\s*,\\s*([^\\s,]+?)(?:\\s*,\\s*([^\\s,]+?))?\\s*\\)$/,$=(()=>{const n=document.createElement(\"canvas\");n.width=1,n.height=1;const t=n.getContext(\"2d\"),r=t.createLinearGradient(0,0,1,1);return n=>{t.fillStyle=r,t.fillStyle=n;const e=t.fillStyle;return e!=r?e:null}})();function _(n){var t;if(!(n=n.trim().toLowerCase()))return null;if(\"transparent\"==n)return[0,0,0,0];if(u.is_named_color(n))return f(u.named_colors[n]);if(\"#\"==n[0]){const t=Number(\"0x\"+n.substr(1));if(isNaN(t))return null;switch(n.length-1){case 3:{const n=t>>8&15,r=t>>4&15,e=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,255]}case 4:{const n=t>>12&15,r=t>>8&15,e=t>>4&15,s=t>>0&15;return[n<<4|n,r<<4|r,e<<4|e,s<<4|s]}case 6:return[t>>16&255,t>>8&255,t>>0&255,255];case 8:return[t>>24&255,t>>16&255,t>>8&255,t>>0&255]}}else if(n.startsWith(\"rgb\")){const r=null!==(t=n.match(b))&&void 0!==t?t:n.match(m);if(null!=r){let[,n,t,e,s=\"1\"]=r;const u=n.endsWith(\"%\"),l=t.endsWith(\"%\"),c=e.endsWith(\"%\"),i=s.endsWith(\"%\");if(!(u&&l&&c)&&(u||l||c))return null;u&&(n=n.slice(0,-1)),l&&(t=t.slice(0,-1)),c&&(e=e.slice(0,-1)),i&&(s=s.slice(0,-1));let a=Number(n),f=Number(t),d=Number(e),h=Number(s);return isNaN(a+f+d+h)?null:(u&&(a=a/100*255),l&&(f=f/100*255),c&&(d=d/100*255),h=255*(i?h/100:h),a=o(a),f=o(f),d=o(d),h=o(h),[a,f,d,h])}}else{const t=$(n);if(null!=t)return _(t)}return null}r.css4_parse=_,r.is_Color=function(n){return!!c.isInteger(n)||(!(!c.isString(n)||null==_(n))||!(!c.isArray(n)||3!=n.length&&4!=n.length))},r.is_dark=function([n,t,r]){return 1-(.299*n+.587*t+.114*r)/255>=.6}},\n function _(e,r,l,a,i){a();l.named_colors={aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},l.is_named_color=function(e){return e in l.named_colors}},\n function _(r,t,n,a,o){a(),n.GeneratorFunction=Object.getPrototypeOf((function*(){})).constructor,n.ColorArray=Uint32Array,n.RGBAArray=Uint8ClampedArray,n.infer_type=function(r,t){return r instanceof Float64Array||r instanceof Array||t instanceof Float64Array||t instanceof Array?Float64Array:Float32Array},n.ScreenArray=Float32Array,n.to_screen=function(r){return r instanceof Float32Array?r:new Float32Array(r)},o(\"Indices\",r(25).BitSet)},\n function _(t,s,r,e,i){e();const n=t(26),o=t(11);class a{constructor(t,s=0){this.size=t,this[Symbol.toStringTag]=\"BitSet\",this._count=null,this._nwords=Math.ceil(t/32),0==s||1==s?(this._array=new Uint32Array(this._nwords),1==s&&this._array.fill(4294967295)):(o.assert(s.length==this._nwords,\"Initializer size mismatch\"),this._array=s)}clone(){return new a(this.size,new Uint32Array(this._array))}[n.equals](t,s){if(!s.eq(this.size,t.size))return!1;const{_nwords:r}=this,e=this.size%r,i=0==e?r:r-1;for(let s=0;s>>5,r=31&t;return!!(this._array[s]>>r&1)}set(t,s=!0){this._check_bounds(t),this._count=null;const r=t>>>5,e=31&t;s?this._array[r]|=1<>>t&1&&(e+=1)}return e}*ones(){const{_array:t,_nwords:s,size:r}=this;for(let e=0,i=0;i>>t&1&&(yield e);else e+=32}}*zeros(){const{_array:t,_nwords:s,size:r}=this;for(let e=0,i=0;i>>t&1||(yield e);else e+=32}}_check_size(t){o.assert(this.size==t.size,\"Size mismatch\")}add(t){this._check_size(t);for(let s=0;s{if(a(t)&&a(e))return t[r.equals](e,this);switch(n){case\"[object Array]\":case\"[object Uint8Array]\":case\"[object Int8Array]\":case\"[object Uint16Array]\":case\"[object Int16Array]\":case\"[object Uint32Array]\":case\"[object Int32Array]\":case\"[object Float32Array]\":case\"[object Float64Array]\":return this.arrays(t,e);case\"[object Map]\":return this.maps(t,e);case\"[object Set]\":return this.sets(t,e);case\"[object Object]\":if(t.constructor==e.constructor&&(null==t.constructor||t.constructor===Object))return this.objects(t,e);case\"[object Function]\":if(t.constructor==e.constructor&&t.constructor===Function)return this.eq(`${t}`,`${e}`)}if(t instanceof Node)return this.nodes(t,e);throw Error(`can't compare objects of type ${n}`)})();return s.pop(),o.pop(),u}numbers(t,e){return Object.is(t,e)}arrays(t,e){const{length:r}=t;if(r!=e.length)return!1;for(let n=0;n{const n=navigator.userAgent;return n.includes(\"MSIE\")||n.includes(\"Trident\")||n.includes(\"Edge\")})(),e.is_mobile=\"undefined\"!=typeof window&&(\"ontouchstart\"in window||navigator.maxTouchPoints>0),e.is_little_endian=(()=>{const n=new ArrayBuffer(4),i=new Uint8Array(n);new Uint32Array(n)[1]=168496141;let e=!0;return 10==i[4]&&11==i[5]&&12==i[6]&&13==i[7]&&(e=!1),e})(),e.BYTE_ORDER=e.is_little_endian?\"little\":\"big\",e.to_big_endian=function(n){if(e.is_little_endian){const i=new Uint32Array(n.length),e=new DataView(i.buffer);let t=0;for(const i of n)e.setUint32(t,i),t+=4;return i}return n}},\n function _(e,t,r,i,s){i();class _{constructor(){this._dev=!1,this._wireframe=!1}set dev(e){this._dev=e}get dev(){return this._dev}set wireframe(e){this._wireframe=e}get wireframe(){return this._wireframe}}r.Settings=_,_.__name__=\"Settings\",r.settings=new _},\n function _(t,e,s,r,n){var a,i,h,u,l,c,o,y;r();const p=t(8),_=t(11),A=t(26),d=t(30),D=t(31),N=Symbol(\"__ndarray__\");class f extends Uint8Array{constructor(t,e){super(t),this[a]=!0,this.dtype=\"uint8\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(a=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Uint8NDArray=f,f.__name__=\"Uint8NDArray\";class m extends Int8Array{constructor(t,e){super(t),this[i]=!0,this.dtype=\"int8\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(i=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Int8NDArray=m,m.__name__=\"Int8NDArray\";class g extends Uint16Array{constructor(t,e){super(t),this[h]=!0,this.dtype=\"uint16\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(h=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Uint16NDArray=g,g.__name__=\"Uint16NDArray\";class q extends Int16Array{constructor(t,e){super(t),this[u]=!0,this.dtype=\"int16\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(u=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Int16NDArray=q,q.__name__=\"Int16NDArray\";class I extends Uint32Array{constructor(t,e){super(t),this[l]=!0,this.dtype=\"uint32\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(l=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Uint32NDArray=I,I.__name__=\"Uint32NDArray\";class U extends Int32Array{constructor(t,e){super(t),this[c]=!0,this.dtype=\"int32\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(c=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Int32NDArray=U,U.__name__=\"Int32NDArray\";class w extends Float32Array{constructor(t,e){super(t),this[o]=!0,this.dtype=\"float32\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(o=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}s.Float32NDArray=w,w.__name__=\"Float32NDArray\";class x extends Float64Array{constructor(t,e){super(t),this[y]=!0,this.dtype=\"float64\",this.shape=null!=e?e:z(t)?t.shape:[this.length],this.dimension=this.shape.length}[(y=N,A.equals)](t,e){return e.eq(this.shape,t.shape)&&e.arrays(this,t)}[d.serialize](t){return D.encode_NDArray(this)}}function z(t){return p.isObject(t)&&void 0!==t[N]}s.Float64NDArray=x,x.__name__=\"Float64NDArray\",s.is_NDArray=z,s.ndarray=function(t,e={}){let{dtype:s}=e;null==s&&(s=t instanceof ArrayBuffer||p.isArray(t)?\"float64\":(()=>{switch(!0){case t instanceof Uint8Array:return\"uint8\";case t instanceof Int8Array:return\"int8\";case t instanceof Uint16Array:return\"uint16\";case t instanceof Int16Array:return\"int16\";case t instanceof Uint32Array:return\"uint32\";case t instanceof Int32Array:return\"int32\";case t instanceof Float32Array:return\"float32\";case t instanceof Float64Array:return\"float64\";default:_.unreachable()}})());const{shape:r}=e;switch(s){case\"uint8\":return new f(t,r);case\"int8\":return new m(t,r);case\"uint16\":return new g(t,r);case\"int16\":return new q(t,r);case\"uint32\":return new I(t,r);case\"int32\":return new U(t,r);case\"float32\":return new w(t,r);case\"float64\":return new x(t,r)}}},\n function _(e,r,t,i,s){i();const n=e(11),a=e(13),l=e(8);t.serialize=Symbol(\"serialize\");class o extends Error{}t.SerializationError=o,o.__name__=\"SerializationError\";class f{constructor(e){var r;this._references=new Map,this._definitions=new Map,this._refmap=new Map,this.include_defaults=null===(r=null==e?void 0:e.include_defaults)||void 0===r||r}get_ref(e){return this._references.get(e)}add_ref(e,r){n.assert(!this._references.has(e)),this._references.set(e,r)}add_def(e,r){const t=this.get_ref(e);n.assert(null!=t),this._definitions.set(e,r),this._refmap.set(t,r)}get objects(){return new Set(this._references.keys())}get references(){return new Set(this._references.values())}get definitions(){return new Set(this._definitions.values())}resolve_ref(e){return this._refmap.get(e)}remove_ref(e){return this._references.delete(e)}remove_def(e){return this._definitions.delete(e)}to_serializable(e){const r=this.get_ref(e);if(null!=r)return r;if(function(e){return l.isObject(e)&&void 0!==e[t.serialize]}(e))return e[t.serialize](this);if(l.isArray(e)||l.isTypedArray(e)){const r=e.length,t=new Array(r);for(let i=0;i{switch(t){case\"uint8\":return new u.Uint8NDArray(a,n);case\"int8\":return new u.Int8NDArray(a,n);case\"uint16\":return new u.Uint16NDArray(a,n);case\"int16\":return new u.Int16NDArray(a,n);case\"uint32\":return new u.Uint32NDArray(a,n);case\"int32\":return new u.Int32NDArray(a,n);case\"float32\":return new u.Float32NDArray(a,n);case\"float64\":return new u.Float64NDArray(a,n)}})();return _!==s.BYTE_ORDER&&i.swap(f),f},n.encode_NDArray=function(r,e){const n={order:s.BYTE_ORDER,dtype:r.dtype,shape:r.shape};if(null!=e){const t=`${e.size}`;return e.set(t,r.buffer),Object.assign({__buffer__:t},n)}{const e=i.buffer_to_base64(r.buffer);return Object.assign({__ndarray__:e},n)}}},\n function _(t,e,n,r,f){r(),n.buffer_to_base64=function(t){const e=new Uint8Array(t),n=Array.from(e).map((t=>String.fromCharCode(t)));return btoa(n.join(\"\"))},n.base64_to_buffer=function(t){const e=atob(t),n=e.length,r=new Uint8Array(n);for(let t=0,f=n;t\"'`])/g,(t=>{switch(t){case\"&\":return\"&\";case\"<\":return\"<\";case\">\":return\">\";case'\"':return\""\";case\"'\":return\"'\";case\"`\":return\"`\";default:return t}}))},r.unescape=function(t){return t.replace(/&(amp|lt|gt|quot|#x27|#x60);/g,((t,e)=>{switch(e){case\"amp\":return\"&\";case\"lt\":return\"<\";case\"gt\":return\">\";case\"quot\":return'\"';case\"#x27\":return\"'\";case\"#x60\":return\"`\";default:return e}}))},r.use_strict=function(t){return`'use strict';\\n${t}`},r.to_fixed=function(t,e){return t.toFixed(e).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\")}},\n function _(e,t,s,n,o){n();const i=e(30);class r{constructor(e){this.document=e}}s.DocumentEvent=r,r.__name__=\"DocumentEvent\";class a extends r{constructor(e,t,s){super(e),this.events=t,this.setter_id=s}}s.DocumentEventBatch=a,a.__name__=\"DocumentEventBatch\";class d extends r{}s.DocumentChangedEvent=d,d.__name__=\"DocumentChangedEvent\";class l extends d{constructor(e,t,s){super(e),this.msg_type=t,this.msg_data=s}[i.serialize](e){const t=this.msg_data,s=e.to_serializable(t);return{kind:\"MessageSent\",msg_type:this.msg_type,msg_data:s}}}s.MessageSentEvent=l,l.__name__=\"MessageSentEvent\";class _ extends d{constructor(e,t,s,n,o,i,r){super(e),this.model=t,this.attr=s,this.old=n,this.new_=o,this.setter_id=i,this.hint=r}[i.serialize](e){if(null!=this.hint)return e.to_serializable(this.hint);const t=this.new_,s=e.to_serializable(t);return this.model!=t&&e.remove_def(this.model),{kind:\"ModelChanged\",model:this.model.ref(),attr:this.attr,new:s}}}s.ModelChangedEvent=_,_.__name__=\"ModelChangedEvent\";class c extends d{constructor(e,t,s){super(e),this.column_source=t,this.patches=s}[i.serialize](e){return{kind:\"ColumnsPatched\",column_source:this.column_source,patches:this.patches}}}s.ColumnsPatchedEvent=c,c.__name__=\"ColumnsPatchedEvent\";class h extends d{constructor(e,t,s,n){super(e),this.column_source=t,this.data=s,this.rollover=n}[i.serialize](e){return{kind:\"ColumnsStreamed\",column_source:this.column_source,data:this.data,rollover:this.rollover}}}s.ColumnsStreamedEvent=h,h.__name__=\"ColumnsStreamedEvent\";class m extends d{constructor(e,t,s){super(e),this.title=t,this.setter_id=s}[i.serialize](e){return{kind:\"TitleChanged\",title:this.title}}}s.TitleChangedEvent=m,m.__name__=\"TitleChangedEvent\";class u extends d{constructor(e,t,s){super(e),this.model=t,this.setter_id=s}[i.serialize](e){return{kind:\"RootAdded\",model:e.to_serializable(this.model)}}}s.RootAddedEvent=u,u.__name__=\"RootAddedEvent\";class v extends d{constructor(e,t,s){super(e),this.model=t,this.setter_id=s}[i.serialize](e){return{kind:\"RootRemoved\",model:this.model.ref()}}}s.RootRemovedEvent=v,v.__name__=\"RootRemovedEvent\"},\n function _(t,r,n,i,e){i();const s=t(8),o=t(13);n.pretty=Symbol(\"pretty\");class c{constructor(t){this.precision=null==t?void 0:t.precision}to_string(t){return function(t){return s.isObject(t)&&void 0!==t[n.pretty]}(t)?t[n.pretty](this):s.isBoolean(t)?this.boolean(t):s.isNumber(t)?this.number(t):s.isString(t)?this.string(t):s.isArray(t)?this.array(t):s.isIterable(t)?this.iterable(t):s.isPlainObject(t)?this.object(t):`${t}`}token(t){return t}boolean(t){return`${t}`}number(t){return null!=this.precision?t.toFixed(this.precision):`${t}`}string(t){return`\"${t.replace(/'/g,\"\\\\'\")}\"`}array(t){const r=this.token,n=[];for(const r of t)n.push(this.to_string(r));return`${r(\"[\")}${n.join(`${r(\",\")} `)}${r(\"]\")}`}iterable(t){var r;const n=this.token,i=null!==(r=Object(t)[Symbol.toStringTag])&&void 0!==r?r:\"Object\",e=this.array(t);return`${i}${n(\"(\")}${e}${n(\")\")}`}object(t){const r=this.token,n=[];for(const[i,e]of o.entries(t))n.push(`${i}${r(\":\")} ${this.to_string(e)}`);return`${r(\"{\")}${n.join(`${r(\",\")} `)}${r(\"}\")}`}}n.Printer=c,c.__name__=\"Printer\",n.to_string=function(t,r){return new c(r).to_string(t)}},\n function _(n,o,r,e,t){e();const l=n(13),i=n(8);function c(n){return i.isObject(n)&&void 0!==n[r.clone]}r.clone=Symbol(\"clone\"),r.is_Cloneable=c;class s extends Error{}r.CloningError=s,s.__name__=\"CloningError\";class a{constructor(){}clone(n){if(c(n))return n[r.clone](this);if(i.isArray(n)){const o=n.length,r=new Array(o);for(let e=0;e{null!=this.layout&&(this.layout.visible=this.model.visible,this.plot_view.request_layout())}))}get needs_clip(){return null==this.layout}serializable_state(){const t=super.serializable_state();return null==this.layout?t:Object.assign(Object.assign({},t),{bbox:this.layout.bbox.box})}}i.AnnotationView=a,a.__name__=\"AnnotationView\";class l extends o.Renderer{constructor(t){super(t)}static init_Annotation(){this.override({level:\"annotation\"})}}i.Annotation=l,l.__name__=\"Annotation\",l.init_Annotation()},\n function _(e,i,t,n,s){n();const r=e(1),a=e(42),_=r.__importStar(e(45)),o=e(20),l=e(53),d=e(54);class h extends a.View{get coordinates(){const{_coordinates:e}=this;return null!=e?e:this._coordinates=this._initialize_coordinates()}initialize(){super.initialize(),this.visuals=new _.Visuals(this),this.needs_webgl_blit=!1}connect_signals(){super.connect_signals();const{x_range_name:e,y_range_name:i}=this.model.properties;this.on_change([e,i],(()=>this._initialize_coordinates()))}_initialize_coordinates(){const{x_range_name:e,y_range_name:i}=this.model,{frame:t}=this.plot_view,n=t.x_scales.get(e),s=t.y_scales.get(i);return new d.CoordinateTransform(n,s)}get plot_view(){return this.parent}get plot_model(){return this.parent.model}get layer(){const{overlays:e,primary:i}=this.canvas;return\"overlay\"==this.model.level?e:i}get canvas(){return this.plot_view.canvas_view}request_render(){this.request_paint()}request_paint(){this.plot_view.request_paint(this)}notify_finished(){this.plot_view.notify_finished()}get needs_clip(){return!1}get has_webgl(){return!1}render(){this.model.visible&&this._render(),this._has_finished=!0}renderer_view(e){}}t.RendererView=h,h.__name__=\"RendererView\";class c extends l.Model{constructor(e){super(e)}static init_Renderer(){this.define((({Boolean:e,String:i})=>({level:[o.RenderLevel,\"image\"],visible:[e,!0],x_range_name:[i,\"default\"],y_range_name:[i,\"default\"]})))}}t.Renderer=c,c.__name__=\"Renderer\",c.init_Renderer()},\n function _(t,e,s,i,n){i();const r=t(1),o=t(15),h=t(43),l=t(8),a=r.__importDefault(t(44));class _{constructor(t){this.removed=new o.Signal0(this,\"removed\"),this._ready=Promise.resolve(void 0),this._slots=new WeakMap;const{model:e,parent:s}=t;this.model=e,this.parent=s,this.root=null==s?this:s.root,this.removed.emit()}get ready(){return this._ready}connect(t,e){let s=this._slots.get(e);return null==s&&(s=(t,s)=>{const i=Promise.resolve(e.call(this,t,s));this._ready=this._ready.then((()=>i))},this._slots.set(e,s)),t.connect(s,this)}disconnect(t,e){return t.disconnect(e,this)}initialize(){this._has_finished=!1,this.is_root&&(this._stylesheet=h.stylesheet);for(const t of this.styles())this.stylesheet.append(t)}async lazy_initialize(){}remove(){this.disconnect_signals(),this.removed.emit()}toString(){return`${this.model.type}View(${this.model.id})`}serializable_state(){return{type:this.model.type}}get is_root(){return null==this.parent}assert_root(){if(!this.is_root)throw new Error(`${this.toString()} is not a root layout`)}has_finished(){return this._has_finished}get is_idle(){return this.has_finished()}connect_signals(){}disconnect_signals(){o.Signal.disconnect_receiver(this)}on_change(t,e){for(const s of l.isArray(t)?t:[t])this.connect(s.change,e)}cursor(t,e){return null}get stylesheet(){return this.is_root?this._stylesheet:this.root.stylesheet}styles(){return[a.default]}}s.View=_,_.__name__=\"View\"},\n function _(t,e,n,i,o){i();const s=t(8),l=t(13),r=t=>(e={},...n)=>{const i=document.createElement(t);i.classList.add(\"bk\");for(let[t,n]of l.entries(e))if(null!=n&&(!s.isBoolean(n)||n))if(\"class\"===t&&(s.isString(n)&&(n=n.split(/\\s+/)),s.isArray(n)))for(const t of n)null!=t&&i.classList.add(t);else if(\"style\"===t&&s.isPlainObject(n))for(const[t,e]of l.entries(n))i.style[t]=e;else if(\"data\"===t&&s.isPlainObject(n))for(const[t,e]of l.entries(n))i.dataset[t]=e;else i.setAttribute(t,n);function o(t){if(s.isString(t))i.appendChild(document.createTextNode(t));else if(t instanceof Node)i.appendChild(t);else if(t instanceof NodeList||t instanceof HTMLCollection)for(const e of t)i.appendChild(e);else if(null!=t&&!1!==t)throw new Error(`expected a DOM element, string, false or null, got ${JSON.stringify(t)}`)}for(const t of n)if(s.isArray(t))for(const e of t)o(e);else o(t);return i};function a(t){const e=t.parentNode;null!=e&&e.removeChild(t)}function c(t,...e){const n=t.firstChild;for(const i of e)t.insertBefore(i,n)}function d(t,e){var n,i,o;const s=Element.prototype;return(null!==(o=null!==(i=null!==(n=s.matches)&&void 0!==n?n:s.webkitMatchesSelector)&&void 0!==i?i:s.mozMatchesSelector)&&void 0!==o?o:s.msMatchesSelector).call(t,e)}function h(t){return parseFloat(t)||0}function u(t){const e=getComputedStyle(t);return{border:{top:h(e.borderTopWidth),bottom:h(e.borderBottomWidth),left:h(e.borderLeftWidth),right:h(e.borderRightWidth)},margin:{top:h(e.marginTop),bottom:h(e.marginBottom),left:h(e.marginLeft),right:h(e.marginRight)},padding:{top:h(e.paddingTop),bottom:h(e.paddingBottom),left:h(e.paddingLeft),right:h(e.paddingRight)}}}function f(t){const e=t.getBoundingClientRect();return{width:Math.ceil(e.width),height:Math.ceil(e.height)}}n.createElement=function(t,e,...n){return r(t)(e,...n)},n.div=r(\"div\"),n.span=r(\"span\"),n.canvas=r(\"canvas\"),n.link=r(\"link\"),n.style=r(\"style\"),n.a=r(\"a\"),n.p=r(\"p\"),n.i=r(\"i\"),n.pre=r(\"pre\"),n.button=r(\"button\"),n.label=r(\"label\"),n.input=r(\"input\"),n.select=r(\"select\"),n.option=r(\"option\"),n.optgroup=r(\"optgroup\"),n.textarea=r(\"textarea\"),n.nbsp=function(){return document.createTextNode(\" \")},n.append=function(t,...e){for(const n of e)t.appendChild(n)},n.remove=a,n.removeElement=a,n.replaceWith=function(t,e){const n=t.parentNode;null!=n&&n.replaceChild(e,t)},n.prepend=c,n.empty=function(t,e=!1){let n;for(;n=t.firstChild;)t.removeChild(n);if(e&&t instanceof Element)for(const e of t.attributes)t.removeAttributeNode(e)},n.display=function(t){t.style.display=\"\"},n.undisplay=function(t){t.style.display=\"none\"},n.show=function(t){t.style.visibility=\"\"},n.hide=function(t){t.style.visibility=\"hidden\"},n.offset=function(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},n.matches=d,n.parent=function(t,e){let n=t;for(;n=n.parentElement;)if(d(n,e))return n;return null},n.extents=u,n.size=f,n.scroll_size=function(t){return{width:Math.ceil(t.scrollWidth),height:Math.ceil(t.scrollHeight)}},n.outer_size=function(t){const{margin:{left:e,right:n,top:i,bottom:o}}=u(t),{width:s,height:l}=f(t);return{width:Math.ceil(s+e+n),height:Math.ceil(l+i+o)}},n.content_size=function(t){const{left:e,top:n}=t.getBoundingClientRect(),{padding:i}=u(t);let o=0,s=0;for(const l of t.children){const t=l.getBoundingClientRect();o=Math.max(o,Math.ceil(t.left-e-i.left+t.width)),s=Math.max(s,Math.ceil(t.top-n-i.top+t.height))}return{width:o,height:s}},n.position=function(t,e,n){const{style:i}=t;if(i.left=`${e.x}px`,i.top=`${e.y}px`,i.width=`${e.width}px`,i.height=`${e.height}px`,null==n)i.margin=\"\";else{const{top:t,right:e,bottom:o,left:s}=n;i.margin=`${t}px ${e}px ${o}px ${s}px`}},n.children=function(t){return Array.from(t.children)};class p{constructor(t){this.el=t,this.classList=t.classList}get values(){const t=[];for(let e=0;e{document.addEventListener(\"DOMContentLoaded\",(()=>t()),{once:!0})}))}},\n function _(o,i,t,e,r){e(),t.root=\"bk-root\",t.default=\".bk-root{position:relative;width:auto;height:auto;z-index:0;box-sizing:border-box;font-family:Helvetica, Arial, sans-serif;font-size:13px;}.bk-root .bk,.bk-root .bk:before,.bk-root .bk:after{box-sizing:inherit;margin:0;border:0;padding:0;background-image:none;font-family:inherit;font-size:100%;line-height:1.42857143;}.bk-root pre.bk{font-family:Courier, monospace;}\"},\n function _(e,t,r,a,c){a();const l=e(1),n=e(46);c(\"Line\",n.Line),c(\"LineScalar\",n.LineScalar),c(\"LineVector\",n.LineVector);const i=e(49);c(\"Fill\",i.Fill),c(\"FillScalar\",i.FillScalar),c(\"FillVector\",i.FillVector);const s=e(50);c(\"Text\",s.Text),c(\"TextScalar\",s.TextScalar),c(\"TextVector\",s.TextVector);const o=e(51);c(\"Hatch\",o.Hatch),c(\"HatchScalar\",o.HatchScalar),c(\"HatchVector\",o.HatchVector);const u=l.__importStar(e(48)),V=e(47);c(\"VisualProperties\",V.VisualProperties),c(\"VisualUniforms\",V.VisualUniforms);class h{constructor(e){this._visuals=[];for(const[t,r]of e.model._mixins){const a=(()=>{switch(r){case u.Line:return new n.Line(e,t);case u.LineScalar:return new n.LineScalar(e,t);case u.LineVector:return new n.LineVector(e,t);case u.Fill:return new i.Fill(e,t);case u.FillScalar:return new i.FillScalar(e,t);case u.FillVector:return new i.FillVector(e,t);case u.Text:return new s.Text(e,t);case u.TextScalar:return new s.TextScalar(e,t);case u.TextVector:return new s.TextVector(e,t);case u.Hatch:return new o.Hatch(e,t);case u.HatchScalar:return new o.HatchScalar(e,t);case u.HatchVector:return new o.HatchVector(e,t);default:throw new Error(\"unknown visual\")}})();this._visuals.push(a),Object.defineProperty(this,t+a.type,{get:()=>a,configurable:!1,enumerable:!0})}}*[Symbol.iterator](){yield*this._visuals}}r.Visuals=h,h.__name__=\"Visuals\"},\n function _(e,t,i,l,s){l();const n=e(1),a=e(47),o=n.__importStar(e(48)),r=e(22),_=e(8);function h(e){if(_.isArray(e))return e;switch(e){case\"solid\":return[];case\"dashed\":return[6];case\"dotted\":return[2,4];case\"dotdash\":return[2,4,6,4];case\"dashdot\":return[6,4,2,4];default:return e.split(\" \").map(Number).filter(_.isInteger)}}i.resolve_line_dash=h;class c extends a.VisualProperties{get doit(){const e=this.line_color.get_value(),t=this.line_alpha.get_value(),i=this.line_width.get_value();return!(null==e||0==t||0==i)}set_value(e){const t=this.line_color.get_value(),i=this.line_alpha.get_value();e.strokeStyle=r.color2css(t,i),e.lineWidth=this.line_width.get_value(),e.lineJoin=this.line_join.get_value(),e.lineCap=this.line_cap.get_value(),e.lineDash=h(this.line_dash.get_value()),e.lineDashOffset=this.line_dash_offset.get_value()}}i.Line=c,c.__name__=\"Line\";class u extends a.VisualUniforms{get doit(){const e=this.line_color.value,t=this.line_alpha.value,i=this.line_width.value;return!(0==e||0==t||0==i)}set_value(e){const t=this.line_color.value,i=this.line_alpha.value;e.strokeStyle=r.color2css(t,i),e.lineWidth=this.line_width.value,e.lineJoin=this.line_join.value,e.lineCap=this.line_cap.value,e.lineDash=h(this.line_dash.value),e.lineDashOffset=this.line_dash_offset.value}}i.LineScalar=u,u.__name__=\"LineScalar\";class d extends a.VisualUniforms{get doit(){const{line_color:e}=this;if(e.is_Scalar()&&0==e.value)return!1;const{line_alpha:t}=this;if(t.is_Scalar()&&0==t.value)return!1;const{line_width:i}=this;return!i.is_Scalar()||0!=i.value}set_vectorize(e,t){const i=this.line_color.get(t),l=this.line_alpha.get(t),s=this.line_width.get(t),n=this.line_join.get(t),a=this.line_cap.get(t),o=this.line_dash.get(t),_=this.line_dash_offset.get(t);e.strokeStyle=r.color2css(i,l),e.lineWidth=s,e.lineJoin=n,e.lineCap=a,e.lineDash=h(o),e.lineDashOffset=_}}i.LineVector=d,d.__name__=\"LineVector\",c.prototype.type=\"line\",c.prototype.attrs=Object.keys(o.Line),u.prototype.type=\"line\",u.prototype.attrs=Object.keys(o.LineScalar),d.prototype.type=\"line\",d.prototype.attrs=Object.keys(o.LineVector)},\n function _(t,s,o,i,r){i();class e{constructor(t,s=\"\"){this.obj=t,this.prefix=s;const o=this;this._props=[];for(const i of this.attrs){const r=t.model.properties[s+i];r.change.connect((()=>this.update())),o[i]=r,this._props.push(r)}this.update()}*[Symbol.iterator](){yield*this._props}update(){}}o.VisualProperties=e,e.__name__=\"VisualProperties\";class p{constructor(t,s=\"\"){this.obj=t,this.prefix=s;for(const o of this.attrs)Object.defineProperty(this,o,{get:()=>t[s+o]})}*[Symbol.iterator](){for(const t of this.attrs)yield this.obj.model.properties[this.prefix+t]}update(){}}o.VisualUniforms=p,p.__name__=\"VisualUniforms\"},\n function _(e,l,t,a,c){a();const r=e(1),o=r.__importStar(e(18)),n=e(20),i=r.__importStar(e(21)),_=e(13);t.Line={line_color:[i.Nullable(i.Color),\"black\"],line_alpha:[i.Alpha,1],line_width:[i.Number,1],line_join:[n.LineJoin,\"bevel\"],line_cap:[n.LineCap,\"butt\"],line_dash:[i.Or(n.LineDash,i.Array(i.Number)),[]],line_dash_offset:[i.Number,0]},t.Fill={fill_color:[i.Nullable(i.Color),\"gray\"],fill_alpha:[i.Alpha,1]},t.Hatch={hatch_color:[i.Nullable(i.Color),\"black\"],hatch_alpha:[i.Alpha,1],hatch_scale:[i.Number,12],hatch_pattern:[i.Nullable(i.Or(n.HatchPatternType,i.String)),null],hatch_weight:[i.Number,1],hatch_extra:[i.Dict(i.AnyRef()),{}]},t.Text={text_color:[i.Nullable(i.Color),\"#444444\"],text_alpha:[i.Alpha,1],text_font:[o.Font,\"helvetica\"],text_font_size:[i.FontSize,\"16px\"],text_font_style:[n.FontStyle,\"normal\"],text_align:[n.TextAlign,\"left\"],text_baseline:[n.TextBaseline,\"bottom\"],text_line_height:[i.Number,1.2]},t.LineScalar={line_color:[o.ColorScalar,\"black\"],line_alpha:[o.NumberScalar,1],line_width:[o.NumberScalar,1],line_join:[o.LineJoinScalar,\"bevel\"],line_cap:[o.LineCapScalar,\"butt\"],line_dash:[o.LineDashScalar,[]],line_dash_offset:[o.NumberScalar,0]},t.FillScalar={fill_color:[o.ColorScalar,\"gray\"],fill_alpha:[o.NumberScalar,1]},t.HatchScalar={hatch_color:[o.ColorScalar,\"black\"],hatch_alpha:[o.NumberScalar,1],hatch_scale:[o.NumberScalar,12],hatch_pattern:[o.NullStringScalar,null],hatch_weight:[o.NumberScalar,1],hatch_extra:[o.AnyScalar,{}]},t.TextScalar={text_color:[o.ColorScalar,\"#444444\"],text_alpha:[o.NumberScalar,1],text_font:[o.FontScalar,\"helvetica\"],text_font_size:[o.FontSizeScalar,\"16px\"],text_font_style:[o.FontStyleScalar,\"normal\"],text_align:[o.TextAlignScalar,\"left\"],text_baseline:[o.TextBaselineScalar,\"bottom\"],text_line_height:[o.NumberScalar,1.2]},t.LineVector={line_color:[o.ColorSpec,\"black\"],line_alpha:[o.NumberSpec,1],line_width:[o.NumberSpec,1],line_join:[o.LineJoinSpec,\"bevel\"],line_cap:[o.LineCapSpec,\"butt\"],line_dash:[o.LineDashSpec,[]],line_dash_offset:[o.NumberSpec,0]},t.FillVector={fill_color:[o.ColorSpec,\"gray\"],fill_alpha:[o.NumberSpec,1]},t.HatchVector={hatch_color:[o.ColorSpec,\"black\"],hatch_alpha:[o.NumberSpec,1],hatch_scale:[o.NumberSpec,12],hatch_pattern:[o.NullStringSpec,null],hatch_weight:[o.NumberSpec,1],hatch_extra:[o.AnyScalar,{}]},t.TextVector={text_color:[o.ColorSpec,\"#444444\"],text_alpha:[o.NumberSpec,1],text_font:[o.FontSpec,\"helvetica\"],text_font_size:[o.FontSizeSpec,\"16px\"],text_font_style:[o.FontStyleSpec,\"normal\"],text_align:[o.TextAlignSpec,\"left\"],text_baseline:[o.TextBaselineSpec,\"bottom\"],text_line_height:[o.NumberSpec,1.2]},t.attrs_of=function(e,l,t,a=!1){const c={};for(const r of _.keys(t)){const t=`${l}${r}`,o=e[t];c[a?t:r]=o}return c}},\n function _(l,t,e,i,s){i();const o=l(1),a=l(47),r=o.__importStar(l(48)),c=l(22);class _ extends a.VisualProperties{get doit(){const l=this.fill_color.get_value(),t=this.fill_alpha.get_value();return!(null==l||0==t)}set_value(l){const t=this.fill_color.get_value(),e=this.fill_alpha.get_value();l.fillStyle=c.color2css(t,e)}}e.Fill=_,_.__name__=\"Fill\";class n extends a.VisualUniforms{get doit(){const l=this.fill_color.value,t=this.fill_alpha.value;return!(0==l||0==t)}set_value(l){const t=this.fill_color.value,e=this.fill_alpha.value;l.fillStyle=c.color2css(t,e)}}e.FillScalar=n,n.__name__=\"FillScalar\";class p extends a.VisualUniforms{get doit(){const{fill_color:l}=this;if(l.is_Scalar()&&0==l.value)return!1;const{fill_alpha:t}=this;return!t.is_Scalar()||0!=t.value}set_vectorize(l,t){const e=this.fill_color.get(t),i=this.fill_alpha.get(t);l.fillStyle=c.color2css(e,i)}}e.FillVector=p,p.__name__=\"FillVector\",_.prototype.type=\"fill\",_.prototype.attrs=Object.keys(r.Fill),n.prototype.type=\"fill\",n.prototype.attrs=Object.keys(r.FillScalar),p.prototype.type=\"fill\",p.prototype.attrs=Object.keys(r.FillVector)},\n function _(t,e,s,l,a){l();const o=t(1),_=t(47),i=o.__importStar(t(48)),n=t(22);class x extends _.VisualProperties{get doit(){const t=this.text_color.get_value(),e=this.text_alpha.get_value();return!(null==t||0==e)}set_value(t){const e=this.text_color.get_value(),s=this.text_alpha.get_value();t.fillStyle=n.color2css(e,s),t.font=this.font_value(),t.textAlign=this.text_align.get_value(),t.textBaseline=this.text_baseline.get_value()}font_value(){return`${this.text_font_style.get_value()} ${this.text_font_size.get_value()} ${this.text_font.get_value()}`}}s.Text=x,x.__name__=\"Text\";class r extends _.VisualUniforms{get doit(){const t=this.text_color.value,e=this.text_alpha.value;return!(0==t||0==e)}set_value(t){const e=this.text_color.value,s=this.text_alpha.value,l=this.font_value(),a=this.text_align.value,o=this.text_baseline.value;t.fillStyle=n.color2css(e,s),t.font=l,t.textAlign=a,t.textBaseline=o}font_value(){return`${this.text_font_style.value} ${this.text_font_size.value} ${this.text_font.value}`}}s.TextScalar=r,r.__name__=\"TextScalar\";class u extends _.VisualUniforms{get doit(){const{text_color:t}=this;if(t.is_Scalar()&&0==t.value)return!1;const{text_alpha:e}=this;return!e.is_Scalar()||0!=e.value}set_vectorize(t,e){const s=this.text_color.get(e),l=this.text_alpha.get(e),a=this.font_value(e),o=this.text_align.get(e),_=this.text_baseline.get(e);t.fillStyle=n.color2css(s,l),t.font=a,t.textAlign=o,t.textBaseline=_}font_value(t){return`${this.text_font_style.get(t)} ${this.text_font_size.get(t)} ${this.text_font.get(t)}`}}s.TextVector=u,u.__name__=\"TextVector\",x.prototype.type=\"text\",x.prototype.attrs=Object.keys(i.Text),r.prototype.type=\"text\",r.prototype.attrs=Object.keys(i.TextScalar),u.prototype.type=\"text\",u.prototype.attrs=Object.keys(i.TextVector)},\n function _(t,e,a,h,r){h();const i=t(1),s=t(47),c=t(52),n=i.__importStar(t(18)),_=i.__importStar(t(48));class l extends s.VisualProperties{constructor(){super(...arguments),this._update_iteration=0}update(){if(this._update_iteration++,this._hatch_image=null,!this.doit)return;const t=this.hatch_color.get_value(),e=this.hatch_alpha.get_value(),a=this.hatch_scale.get_value(),h=this.hatch_pattern.get_value(),r=this.hatch_weight.get_value(),i=t=>{this._hatch_image=t},s=this.hatch_extra.get_value()[h];if(null!=s){const h=s.get_pattern(t,e,a,r);if(h instanceof Promise){const{_update_iteration:t}=this;h.then((e=>{this._update_iteration==t&&(i(e),this.obj.request_render())}))}else i(h)}else{const s=this.obj.canvas.create_layer(),n=c.get_pattern(s,h,t,e,a,r);i(n)}}get doit(){const t=this.hatch_color.get_value(),e=this.hatch_alpha.get_value(),a=this.hatch_pattern.get_value();return!(null==t||0==e||\" \"==a||\"blank\"==a||null==a)}set_value(t){const e=this.pattern(t);t.fillStyle=null!=e?e:\"transparent\"}pattern(t){const e=this._hatch_image;return null==e?null:t.createPattern(e,this.repetition())}repetition(){const t=this.hatch_pattern.get_value(),e=this.hatch_extra.get_value()[t];if(null==e)return\"repeat\";switch(e.repetition){case\"repeat\":return\"repeat\";case\"repeat_x\":return\"repeat-x\";case\"repeat_y\":return\"repeat-y\";case\"no_repeat\":return\"no-repeat\"}}}a.Hatch=l,l.__name__=\"Hatch\";class o extends s.VisualUniforms{constructor(){super(...arguments),this._static_doit=!1,this._update_iteration=0}_compute_static_doit(){const t=this.hatch_color.value,e=this.hatch_alpha.value,a=this.hatch_pattern.value;return!(null==t||0==e||\" \"==a||\"blank\"==a||null==a)}update(){this._update_iteration++;const t=this.hatch_color.length;if(this._hatch_image=new n.UniformScalar(null,t),this._static_doit=this._compute_static_doit(),!this._static_doit)return;const e=this.hatch_color.value,a=this.hatch_alpha.value,h=this.hatch_scale.value,r=this.hatch_pattern.value,i=this.hatch_weight.value,s=e=>{this._hatch_image=new n.UniformScalar(e,t)},_=this.hatch_extra.value[r];if(null!=_){const t=_.get_pattern(e,a,h,i);if(t instanceof Promise){const{_update_iteration:e}=this;t.then((t=>{this._update_iteration==e&&(s(t),this.obj.request_render())}))}else s(t)}else{const t=this.obj.canvas.create_layer(),n=c.get_pattern(t,r,e,a,h,i);s(n)}}get doit(){return this._static_doit}set_value(t){var e;t.fillStyle=null!==(e=this.pattern(t))&&void 0!==e?e:\"transparent\"}pattern(t){const e=this._hatch_image.value;return null==e?null:t.createPattern(e,this.repetition())}repetition(){const t=this.hatch_pattern.value,e=this.hatch_extra.value[t];if(null==e)return\"repeat\";switch(e.repetition){case\"repeat\":return\"repeat\";case\"repeat_x\":return\"repeat-x\";case\"repeat_y\":return\"repeat-y\";case\"no_repeat\":return\"no-repeat\"}}}a.HatchScalar=o,o.__name__=\"HatchScalar\";class u extends s.VisualUniforms{constructor(){super(...arguments),this._static_doit=!1,this._update_iteration=0}_compute_static_doit(){const{hatch_color:t}=this;if(t.is_Scalar()&&0==t.value)return!1;const{hatch_alpha:e}=this;if(e.is_Scalar()&&0==e.value)return!1;const{hatch_pattern:a}=this;if(a.is_Scalar()){const t=a.value;if(\" \"==t||\"blank\"==t||null==t)return!1}return!0}update(){this._update_iteration++;const t=this.hatch_color.length;if(this._hatch_image=new n.UniformScalar(null,t),this._static_doit=this._compute_static_doit(),!this._static_doit)return;const e=(t,e,a,h,r,i)=>{const s=this.hatch_extra.value[t];if(null!=s){const t=s.get_pattern(e,a,h,r);if(t instanceof Promise){const{_update_iteration:e}=this;t.then((t=>{this._update_iteration==e&&(i(t),this.obj.request_render())}))}else i(t)}else{const s=this.obj.canvas.create_layer(),n=c.get_pattern(s,t,e,a,h,r);i(n)}};if(this.hatch_color.is_Scalar()&&this.hatch_alpha.is_Scalar()&&this.hatch_scale.is_Scalar()&&this.hatch_pattern.is_Scalar()&&this.hatch_weight.is_Scalar()){const a=this.hatch_color.value,h=this.hatch_alpha.value,r=this.hatch_scale.value;e(this.hatch_pattern.value,a,h,r,this.hatch_weight.value,(e=>{this._hatch_image=new n.UniformScalar(e,t)}))}else{const a=new Array(t);a.fill(null),this._hatch_image=new n.UniformVector(a);for(let h=0;h{a[h]=t}))}}}get doit(){return this._static_doit}set_vectorize(t,e){var a;t.fillStyle=null!==(a=this.pattern(t,e))&&void 0!==a?a:\"transparent\"}pattern(t,e){const a=this._hatch_image.get(e);return null==a?null:t.createPattern(a,this.repetition(e))}repetition(t){const e=this.hatch_pattern.get(t),a=this.hatch_extra.value[e];if(null==a)return\"repeat\";switch(a.repetition){case\"repeat\":return\"repeat\";case\"repeat_x\":return\"repeat-x\";case\"repeat_y\":return\"repeat-y\";case\"no_repeat\":return\"no-repeat\"}}}a.HatchVector=u,u.__name__=\"HatchVector\",l.prototype.type=\"hatch\",l.prototype.attrs=Object.keys(_.Hatch),o.prototype.type=\"hatch\",o.prototype.attrs=Object.keys(_.HatchScalar),u.prototype.type=\"hatch\",u.prototype.attrs=Object.keys(_.HatchVector)},\n function _(e,o,a,s,r){s();const i=e(22);function l(e,o,a){e.moveTo(0,a+.5),e.lineTo(o,a+.5),e.stroke()}function n(e,o,a){e.moveTo(a+.5,0),e.lineTo(a+.5,o),e.stroke()}function t(e,o){e.moveTo(0,o),e.lineTo(o,0),e.stroke(),e.moveTo(0,0),e.lineTo(o,o),e.stroke()}a.hatch_aliases={\" \":\"blank\",\".\":\"dot\",o:\"ring\",\"-\":\"horizontal_line\",\"|\":\"vertical_line\",\"+\":\"cross\",'\"':\"horizontal_dash\",\":\":\"vertical_dash\",\"@\":\"spiral\",\"/\":\"right_diagonal_line\",\"\\\\\":\"left_diagonal_line\",x:\"diagonal_cross\",\",\":\"right_diagonal_dash\",\"`\":\"left_diagonal_dash\",v:\"horizontal_wave\",\">\":\"vertical_wave\",\"*\":\"criss_cross\"},a.get_pattern=function(e,o,s,r,c,k){return e.resize(c,c),e.prepare(),function(e,o,s,r,c,k){var _;const T=c,v=T/2,h=v/2,d=i.color2css(s,r);switch(e.strokeStyle=d,e.fillStyle=d,e.lineCap=\"square\",e.lineWidth=k,null!==(_=a.hatch_aliases[o])&&void 0!==_?_:o){case\"blank\":break;case\"dot\":e.arc(v,v,v/2,0,2*Math.PI,!0),e.fill();break;case\"ring\":e.arc(v,v,v/2,0,2*Math.PI,!0),e.stroke();break;case\"horizontal_line\":l(e,T,v);break;case\"vertical_line\":n(e,T,v);break;case\"cross\":l(e,T,v),n(e,T,v);break;case\"horizontal_dash\":l(e,v,v);break;case\"vertical_dash\":n(e,v,v);break;case\"spiral\":{const o=T/30;e.moveTo(v,v);for(let a=0;a<360;a++){const s=.1*a,r=v+o*s*Math.cos(s),i=v+o*s*Math.sin(s);e.lineTo(r,i)}e.stroke();break}case\"right_diagonal_line\":e.moveTo(.5-h,T),e.lineTo(h+.5,0),e.stroke(),e.moveTo(h+.5,T),e.lineTo(3*h+.5,0),e.stroke(),e.moveTo(3*h+.5,T),e.lineTo(5*h+.5,0),e.stroke(),e.stroke();break;case\"left_diagonal_line\":e.moveTo(h+.5,T),e.lineTo(.5-h,0),e.stroke(),e.moveTo(3*h+.5,T),e.lineTo(h+.5,0),e.stroke(),e.moveTo(5*h+.5,T),e.lineTo(3*h+.5,0),e.stroke(),e.stroke();break;case\"diagonal_cross\":t(e,T);break;case\"right_diagonal_dash\":e.moveTo(h+.5,3*h+.5),e.lineTo(3*h+.5,h+.5),e.stroke();break;case\"left_diagonal_dash\":e.moveTo(h+.5,h+.5),e.lineTo(3*h+.5,3*h+.5),e.stroke();break;case\"horizontal_wave\":e.moveTo(0,h),e.lineTo(v,3*h),e.lineTo(T,h),e.stroke();break;case\"vertical_wave\":e.moveTo(h,0),e.lineTo(3*h,v),e.lineTo(h,T),e.stroke();break;case\"criss_cross\":t(e,T),l(e,T,v),n(e,T,v)}}(e.ctx,o,s,r,c,k),e.canvas}},\n function _(e,t,s,n,c){n();const a=e(14),i=e(8),r=e(13),l=e(19);class o extends a.HasProps{constructor(e){super(e)}get is_syncable(){return this.syncable}static init_Model(){this.define((({Any:e,Unknown:t,Boolean:s,String:n,Array:c,Dict:a,Nullable:i})=>({tags:[c(t),[]],name:[i(n),null],js_property_callbacks:[a(c(e)),{}],js_event_callbacks:[a(c(e)),{}],subscribed_events:[c(n),[]],syncable:[s,!0]})))}initialize(){super.initialize(),this._js_callbacks=new Map}connect_signals(){super.connect_signals(),this._update_property_callbacks(),this.connect(this.properties.js_property_callbacks.change,(()=>this._update_property_callbacks())),this.connect(this.properties.js_event_callbacks.change,(()=>this._update_event_callbacks())),this.connect(this.properties.subscribed_events.change,(()=>this._update_event_callbacks()))}_process_event(e){var t;for(const s of null!==(t=this.js_event_callbacks[e.event_name])&&void 0!==t?t:[])s.execute(e);null!=this.document&&this.subscribed_events.some((t=>t==e.event_name))&&this.document.event_manager.send_event(e)}trigger_event(e){null!=this.document&&(e.origin=this,this.document.event_manager.trigger(e))}_update_event_callbacks(){null!=this.document?this.document.event_manager.subscribed_models.add(this):l.logger.warn(\"WARNING: Document not defined for updating event callbacks\")}_update_property_callbacks(){const e=e=>{const[t,s=null]=e.split(\":\");return null!=s?this.properties[s][t]:this[t]};for(const[t,s]of this._js_callbacks){const n=e(t);for(const e of s)this.disconnect(n,e)}this._js_callbacks.clear();for(const[t,s]of r.entries(this.js_property_callbacks)){const n=s.map((e=>()=>e.execute(this)));this._js_callbacks.set(t,n);const c=e(t);for(const e of n)this.connect(c,e)}}_doc_attached(){r.isEmpty(this.js_event_callbacks)&&0==this.subscribed_events.length||this._update_event_callbacks()}_doc_detached(){this.document.event_manager.subscribed_models.delete(this)}select(e){if(i.isString(e))return[...this.references()].filter((t=>t instanceof o&&t.name===e));if(e.prototype instanceof a.HasProps)return[...this.references()].filter((t=>t instanceof e));throw new Error(\"invalid selector\")}select_one(e){const t=this.select(e);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(\"found more than one object matching given selector\")}}}s.Model=o,o.__name__=\"Model\",o.init_Model()},\n function _(s,e,_,t,a){t();class r{constructor(s,e){this.x_scale=s,this.y_scale=e,this.x_range=this.x_scale.source_range,this.y_range=this.y_scale.source_range,this.ranges=[this.x_range,this.y_range],this.scales=[this.x_scale,this.y_scale]}map_to_screen(s,e){return[this.x_scale.v_compute(s),this.y_scale.v_compute(e)]}map_from_screen(s,e){return[this.x_scale.v_invert(s),this.y_scale.v_invert(e)]}}_.CoordinateTransform=r,r.__name__=\"CoordinateTransform\"},\n function _(t,e,s,a,i){a();const n=t(1),_=t(56),r=t(133),o=t(48),l=t(20),d=t(24),h=t(122),c=n.__importStar(t(18)),u=t(10);class v extends _.DataAnnotationView{async lazy_initialize(){await super.lazy_initialize();const{start:t,end:e}=this.model;null!=t&&(this.start=await h.build_view(t,{parent:this})),null!=e&&(this.end=await h.build_view(e,{parent:this}))}set_data(t){var e,s;super.set_data(t),null===(e=this.start)||void 0===e||e.set_data(t),null===(s=this.end)||void 0===s||s.set_data(t)}remove(){var t,e;null===(t=this.start)||void 0===t||t.remove(),null===(e=this.end)||void 0===e||e.remove(),super.remove()}map_data(){const{frame:t}=this.plot_view;\"data\"==this.model.start_units?(this._sx_start=this.coordinates.x_scale.v_compute(this._x_start),this._sy_start=this.coordinates.y_scale.v_compute(this._y_start)):(this._sx_start=t.bbox.xview.v_compute(this._x_start),this._sy_start=t.bbox.yview.v_compute(this._y_start)),\"data\"==this.model.end_units?(this._sx_end=this.coordinates.x_scale.v_compute(this._x_end),this._sy_end=this.coordinates.y_scale.v_compute(this._y_end)):(this._sx_end=t.bbox.xview.v_compute(this._x_end),this._sy_end=t.bbox.yview.v_compute(this._y_end));const{_sx_start:e,_sy_start:s,_sx_end:a,_sy_end:i}=this,n=e.length,_=this._angles=new d.ScreenArray(n);for(let t=0;t({x_start:[c.XCoordinateSpec,{field:\"x_start\"}],y_start:[c.YCoordinateSpec,{field:\"y_start\"}],start_units:[l.SpatialUnits,\"data\"],start:[e(t(r.ArrowHead)),null],x_end:[c.XCoordinateSpec,{field:\"x_end\"}],y_end:[c.YCoordinateSpec,{field:\"y_end\"}],end_units:[l.SpatialUnits,\"data\"],end:[e(t(r.ArrowHead)),()=>new r.OpenHead]})))}}s.Arrow=p,p.__name__=\"Arrow\",p.init_Arrow()},\n function _(t,n,s,a,e){a();const i=t(1),o=t(40),c=t(57),_=t(130),r=t(65),l=i.__importStar(t(18));class h extends o.AnnotationView{constructor(){super(...arguments),this._initial_set_data=!1}connect_signals(){super.connect_signals();const t=()=>{this.set_data(this.model.source),this.request_render()};this.connect(this.model.change,t),this.connect(this.model.source.streaming,t),this.connect(this.model.source.patching,t),this.connect(this.model.source.change,t)}set_data(t){const n=this;for(const s of this.model)if(s instanceof l.VectorSpec||s instanceof l.ScalarSpec)if(s instanceof l.BaseCoordinateSpec){const a=s.array(t);n[`_${s.attr}`]=a}else{const a=s.uniform(t);n[`${s.attr}`]=a}this.plot_model.use_map&&(null!=n._x&&r.inplace.project_xy(n._x,n._y),null!=n._xs&&r.inplace.project_xsys(n._xs,n._ys));for(const t of this.visuals)t.update()}_render(){this._initial_set_data||(this.set_data(this.model.source),this._initial_set_data=!0),this.map_data(),this.paint(this.layer.ctx)}}s.DataAnnotationView=h,h.__name__=\"DataAnnotationView\";class u extends o.Annotation{constructor(t){super(t)}static init_DataAnnotation(){this.define((({Ref:t})=>({source:[t(c.ColumnarDataSource),()=>new _.ColumnDataSource]})))}}s.DataAnnotation=u,u.__name__=\"DataAnnotation\",u.init_DataAnnotation()},\n function _(t,e,n,a,i){a();const s=t(58),r=t(15),l=t(19),o=t(60),c=t(8),u=t(9),h=t(13),g=t(59),d=t(129),_=t(29);class m extends s.DataSource{constructor(t){super(t)}get_array(t){let e=this.data[t];return null==e?this.data[t]=e=[]:c.isArray(e)||(this.data[t]=e=Array.from(e)),e}static init_ColumnarDataSource(){this.define((({Ref:t})=>({selection_policy:[t(d.SelectionPolicy),()=>new d.UnionRenderers]}))),this.internal((({AnyRef:t})=>({selection_manager:[t(),t=>new o.SelectionManager({source:t})],inspected:[t(),()=>new g.Selection]})))}initialize(){super.initialize(),this._select=new r.Signal0(this,\"select\"),this.inspect=new r.Signal(this,\"inspect\"),this.streaming=new r.Signal0(this,\"streaming\"),this.patching=new r.Signal(this,\"patching\")}get_column(t){const e=this.data[t];return null!=e?e:null}columns(){return h.keys(this.data)}get_length(t=!0){const e=u.uniq(h.values(this.data).map((t=>_.is_NDArray(t)?t.shape[0]:t.length)));switch(e.length){case 0:return null;case 1:return e[0];default:{const n=\"data source has columns of inconsistent lengths\";if(t)return l.logger.warn(n),e.sort()[0];throw new Error(n)}}}get length(){var t;return null!==(t=this.get_length())&&void 0!==t?t:0}clear(){const t={};for(const e of this.columns())t[e]=new this.data[e].constructor(0);this.data=t}}n.ColumnarDataSource=m,m.__name__=\"ColumnarDataSource\",m.init_ColumnarDataSource()},\n function _(e,t,c,n,a){n();const o=e(53),i=e(59);class s extends o.Model{constructor(e){super(e)}static init_DataSource(){this.define((({Ref:e})=>({selected:[e(i.Selection),()=>new i.Selection]})))}}c.DataSource=s,s.__name__=\"DataSource\",s.init_DataSource()},\n function _(i,e,s,t,n){t();const l=i(53),c=i(9),h=i(13);class d extends l.Model{constructor(i){super(i)}get_view(){return this.view}static init_Selection(){this.define((({Int:i,Array:e,Dict:s})=>({indices:[e(i),[]],line_indices:[e(i),[]],multiline_indices:[s(e(i)),{}]}))),this.internal((({Int:i,Array:e,AnyRef:s,Struct:t,Nullable:n})=>({selected_glyphs:[e(s()),[]],view:[n(s()),null],image_indices:[e(t({index:i,dim1:i,dim2:i,flat_index:i})),[]]})))}get selected_glyph(){return this.selected_glyphs.length>0?this.selected_glyphs[0]:null}add_to_selected_glyphs(i){this.selected_glyphs.push(i)}update(i,e=!0,s=\"replace\"){switch(s){case\"replace\":this.indices=i.indices,this.line_indices=i.line_indices,this.selected_glyphs=i.selected_glyphs,this.view=i.view,this.multiline_indices=i.multiline_indices,this.image_indices=i.image_indices;break;case\"append\":this.update_through_union(i);break;case\"intersect\":this.update_through_intersection(i);break;case\"subtract\":this.update_through_subtraction(i)}}clear(){this.indices=[],this.line_indices=[],this.multiline_indices={},this.view=null,this.selected_glyphs=[]}is_empty(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length}update_through_union(i){this.indices=c.union(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}update_through_intersection(i){this.indices=c.intersection(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}update_through_subtraction(i){this.indices=c.difference(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.view=i.view,this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)}}s.Selection=d,d.__name__=\"Selection\",d.init_Selection()},\n function _(e,t,s,n,i){n();const o=e(14),c=e(59),r=e(61),l=e(123);class p extends o.HasProps{constructor(e){super(e),this.inspectors=new Map}static init_SelectionManager(){this.internal((({AnyRef:e})=>({source:[e()]})))}select(e,t,s,n=\"replace\"){const i=[],o=[];for(const t of e)t instanceof r.GlyphRendererView?i.push(t):t instanceof l.GraphRendererView&&o.push(t);let c=!1;for(const e of o){const i=e.model.selection_policy.hit_test(t,e);c=c||e.model.selection_policy.do_selection(i,e.model,s,n)}if(i.length>0){const e=this.source.selection_policy.hit_test(t,i);c=c||this.source.selection_policy.do_selection(e,this.source,s,n)}return c}inspect(e,t){let s=!1;if(e instanceof r.GlyphRendererView){const n=e.hit_test(t);if(null!=n){s=!n.is_empty();const i=this.get_or_create_inspector(e.model);i.update(n,!0,\"replace\"),this.source.setv({inspected:i},{silent:!0}),this.source.inspect.emit([e.model,{geometry:t}])}}else if(e instanceof l.GraphRendererView){const n=e.model.inspection_policy.hit_test(t,e);s=s||e.model.inspection_policy.do_inspection(n,t,e,!1,\"replace\")}return s}clear(e){this.source.selected.clear(),null!=e&&this.get_or_create_inspector(e.model).clear()}get_or_create_inspector(e){let t=this.inspectors.get(e);return null==t&&(t=new c.Selection,this.inspectors.set(e,t)),t}}s.SelectionManager=p,p.__name__=\"SelectionManager\",p.init_SelectionManager()},\n function _(e,t,i,s,l){s();const h=e(62),n=e(63),o=e(116),a=e(117),c=e(119),d=e(98),_=e(57),r=e(120),p=e(24),g=e(12),u=e(9),y=e(13),m=e(122),v=e(104),f={fill:{},line:{}},w={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},b={fill:{fill_alpha:.2},line:{}};class V extends h.DataRendererView{get glyph_view(){return this.glyph}async lazy_initialize(){var e,t;await super.lazy_initialize();const i=this.model.glyph;this.glyph=await this.build_glyph_view(i);const s=\"fill\"in this.glyph.visuals,l=\"line\"in this.glyph.visuals,h=Object.assign({},i.attributes);function n(e){const t=y.clone(h);return s&&y.extend(t,e.fill),l&&y.extend(t,e.line),new i.constructor(t)}delete h.id;let{selection_glyph:o}=this.model;null==o?o=n({fill:{},line:{}}):\"auto\"==o&&(o=n(f)),this.selection_glyph=await this.build_glyph_view(o);let{nonselection_glyph:a}=this.model;null==a?a=n({fill:{},line:{}}):\"auto\"==a&&(a=n(b)),this.nonselection_glyph=await this.build_glyph_view(a);const{hover_glyph:c}=this.model;null!=c&&(this.hover_glyph=await this.build_glyph_view(c));const{muted_glyph:d}=this.model;null!=d&&(this.muted_glyph=await this.build_glyph_view(d));const _=n(w);this.decimated_glyph=await this.build_glyph_view(_),this.selection_glyph.set_base(this.glyph),this.nonselection_glyph.set_base(this.glyph),null===(e=this.hover_glyph)||void 0===e||e.set_base(this.glyph),null===(t=this.muted_glyph)||void 0===t||t.set_base(this.glyph),this.decimated_glyph.set_base(this.glyph),this.set_data()}async build_glyph_view(e){return m.build_view(e,{parent:this})}remove(){var e,t;this.glyph.remove(),this.selection_glyph.remove(),this.nonselection_glyph.remove(),null===(e=this.hover_glyph)||void 0===e||e.remove(),null===(t=this.muted_glyph)||void 0===t||t.remove(),this.decimated_glyph.remove(),super.remove()}connect_signals(){super.connect_signals();const e=()=>this.request_render(),t=()=>this.update_data();this.connect(this.model.change,e),this.connect(this.glyph.model.change,t),this.connect(this.selection_glyph.model.change,t),this.connect(this.nonselection_glyph.model.change,t),null!=this.hover_glyph&&this.connect(this.hover_glyph.model.change,t),null!=this.muted_glyph&&this.connect(this.muted_glyph.model.change,t),this.connect(this.decimated_glyph.model.change,t),this.connect(this.model.data_source.change,t),this.connect(this.model.data_source.streaming,t),this.connect(this.model.data_source.patching,(e=>this.update_data(e))),this.connect(this.model.data_source.selected.change,e),this.connect(this.model.data_source._select,e),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,e),this.connect(this.model.properties.view.change,t),this.connect(this.model.view.properties.indices.change,t),this.connect(this.model.view.properties.masked.change,(()=>this.set_visuals())),this.connect(this.model.properties.visible.change,(()=>this.plot_view.invalidate_dataranges=!0));const{x_ranges:i,y_ranges:s}=this.plot_view.frame;for(const[,e]of i)e instanceof v.FactorRange&&this.connect(e.change,t);for(const[,e]of s)e instanceof v.FactorRange&&this.connect(e.change,t);const{transformchange:l,exprchange:h}=this.model.glyph;this.connect(l,t),this.connect(h,t)}_update_masked_indices(){const e=this.glyph.mask_data();return this.model.view.masked=e,e}update_data(e){this.set_data(e),this.request_render()}set_data(e){const t=this.model.data_source;this.all_indices=this.model.view.indices;const{all_indices:i}=this;this.glyph.set_data(t,i,e),this.set_visuals(),this._update_masked_indices();const{lod_factor:s}=this.plot_model,l=this.all_indices.count;this.decimated=new p.Indices(l);for(let e=0;e!d||d.is_empty()?[]:d.selected_glyph?this.model.view.convert_indices_from_subset(i):d.indices.length>0?d.indices:Object.keys(d.multiline_indices).map((e=>parseInt(e))))()),r=g.filter(i,(e=>_.has(t[e]))),{lod_threshold:p}=this.plot_model;let y,m,v;if(null!=this.model.document&&this.model.document.interactive_duration()>0&&!e&&null!=p&&t.length>p?(i=[...this.decimated],y=this.decimated_glyph,m=this.decimated_glyph,v=this.selection_glyph):(y=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,m=this.nonselection_glyph,v=this.selection_glyph),null!=this.hover_glyph&&r.length&&(i=u.difference(i,r)),h.length){const e={};for(const t of h)e[t]=!0;const l=new Array,o=new Array;if(this.glyph instanceof n.LineView)for(const i of t)null!=e[i]?l.push(i):o.push(i);else for(const s of i)null!=e[t[s]]?l.push(s):o.push(s);m.render(s,o),v.render(s,l),null!=this.hover_glyph&&(this.glyph instanceof n.LineView?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):this.hover_glyph.render(s,r))}else if(this.glyph instanceof n.LineView)this.hover_glyph&&r.length?this.hover_glyph.render(s,this.model.view.convert_indices_from_subset(r)):y.render(s,t);else if(this.glyph instanceof o.PatchView||this.glyph instanceof a.HAreaView||this.glyph instanceof c.VAreaView)if(0==d.selected_glyphs.length||null==this.hover_glyph)y.render(s,t);else for(const e of d.selected_glyphs)e==this.glyph.model&&this.hover_glyph.render(s,t);else y.render(s,i),this.hover_glyph&&r.length&&this.hover_glyph.render(s,r);s.restore()}draw_legend(e,t,i,s,l,h,n,o){0!=this.glyph.data_size&&(null==o&&(o=this.model.get_reference_point(h,n)),this.glyph.draw_legend_for_index(e,{x0:t,x1:i,y0:s,y1:l},o))}hit_test(e){if(!this.model.visible)return null;const t=this.glyph.hit_test(e);return null==t?null:this.model.view.convert_selection_from_subset(t)}}i.GlyphRendererView=V,V.__name__=\"GlyphRendererView\";class x extends h.DataRenderer{constructor(e){super(e)}static init_GlyphRenderer(){this.prototype.default_view=V,this.define((({Boolean:e,Auto:t,Or:i,Ref:s,Null:l,Nullable:h})=>({data_source:[s(_.ColumnarDataSource)],view:[s(r.CDSView),e=>new r.CDSView({source:e.data_source})],glyph:[s(d.Glyph)],hover_glyph:[h(s(d.Glyph)),null],nonselection_glyph:[i(s(d.Glyph),t,l),\"auto\"],selection_glyph:[i(s(d.Glyph),t,l),\"auto\"],muted_glyph:[h(s(d.Glyph)),null],muted:[e,!1]})))}initialize(){super.initialize(),this.view.source!=this.data_source&&(this.view.source=this.data_source,this.view.compute_indices())}get_reference_point(e,t){let i=0;if(null!=e){const s=this.data_source.get_column(e);if(null!=s)if(null==this.view){const e=g.indexOf(s,t);-1!=e&&(i=e)}else for(const[e,l]of Object.entries(this.view.indices_map))if(s[parseInt(e)]==t){i=l;break}}return i}get_selection_manager(){return this.data_source.selection_manager}}i.GlyphRenderer=x,x.__name__=\"GlyphRenderer\",x.init_GlyphRenderer()},\n function _(e,r,t,a,n){a();const s=e(41);class i extends s.RendererView{get xscale(){return this.coordinates.x_scale}get yscale(){return this.coordinates.y_scale}}t.DataRendererView=i,i.__name__=\"DataRendererView\";class _ extends s.Renderer{constructor(e){super(e)}static init_DataRenderer(){this.override({level:\"glyph\"})}get selection_manager(){return this.get_selection_manager()}}t.DataRenderer=_,_.__name__=\"DataRenderer\",_.init_DataRenderer()},\n function _(e,i,t,s,n){s();const l=e(1),_=e(64),r=e(106),o=e(108),h=l.__importStar(e(48)),a=l.__importStar(e(107)),c=e(59);class d extends _.XYGlyphView{initialize(){super.initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;null!=e&&(this.glglyph=new o.LineGL(e.gl,this))}_render(e,i,t){const{sx:s,sy:n}=null!=t?t:this;let l=!1,_=null;this.visuals.line.set_value(e);for(const t of i){const i=s[t],r=n[t];if(l){if(!isFinite(i+r)){e.stroke(),e.beginPath(),l=!1,_=t;continue}null!=_&&t-_>1&&(e.stroke(),l=!1)}l?e.lineTo(i,r):(e.beginPath(),e.moveTo(i,r),l=!0),_=t}l&&e.stroke()}_hit_point(e){const i=new c.Selection,t={x:e.sx,y:e.sy};let s=9999;const n=Math.max(2,this.line_width.value/2);for(let e=0,l=this.sx.length-1;e({x:[p.XCoordinateSpec,{field:\"x\"}],y:[p.YCoordinateSpec,{field:\"y\"}]})))}}i.XYGlyph=d,d.__name__=\"XYGlyph\",d.init_XYGlyph()},\n function _(n,t,e,o,r){o();const c=n(1),l=c.__importDefault(n(66)),i=c.__importDefault(n(67)),u=n(24),a=new i.default(\"GOOGLE\"),s=new i.default(\"WGS84\"),f=l.default(s,a);e.wgs84_mercator={compute:(n,t)=>isFinite(n)&&isFinite(t)?f.forward([n,t]):[NaN,NaN],invert:(n,t)=>isFinite(n)&&isFinite(t)?f.inverse([n,t]):[NaN,NaN]};const _={lon:[-20026376.39,20026376.39],lat:[-20048966.1,20048966.1]},p={lon:[-180,180],lat:[-85.06,85.06]},{min:g,max:h}=Math;function m(n,t){const o=g(n.length,t.length),r=u.infer_type(n,t),c=new r(o),l=new r(o);return e.inplace.project_xy(n,t,c,l),[c,l]}e.clip_mercator=function(n,t,e){const[o,r]=_[e];return[h(n,o),g(t,r)]},e.in_bounds=function(n,t){const[e,o]=p[t];return e2?void 0!==e.name&&\"geocent\"===e.name||void 0!==n.name&&\"geocent\"===n.name?\"number\"==typeof r.z?[r.x,r.y,r.z].concat(t.splice(3)):[r.x,r.y,t[2]].concat(t.splice(3)):[r.x,r.y].concat(t.splice(2)):[r.x,r.y]):(o=c.default(e,n,t),2===(a=Object.keys(t)).length||a.forEach((function(r){if(void 0!==e.name&&\"geocent\"===e.name||void 0!==n.name&&\"geocent\"===n.name){if(\"x\"===r||\"y\"===r||\"z\"===r)return}else if(\"x\"===r||\"y\"===r)return;o[r]=t[r]})),o)}function l(e){return e instanceof i.default?e:e.oProj?e.oProj:i.default(e)}t.default=function(e,n,t){e=l(e);var r,o=!1;return void 0===n?(n=e,e=u,o=!0):(void 0!==n.x||Array.isArray(n))&&(t=n,n=e,e=u,o=!0),n=l(n),t?f(e,n,t):(r={forward:function(t){return f(e,n,t)},inverse:function(t){return f(n,e,t)}},o&&(r.oProj=n),r)}},\n function _(t,e,a,s,i){s();const u=t(1),l=u.__importDefault(t(68)),o=u.__importDefault(t(79)),r=u.__importDefault(t(80)),f=t(88),p=u.__importDefault(t(90)),d=u.__importDefault(t(91)),m=u.__importDefault(t(75));function n(t,e){if(!(this instanceof n))return new n(t);e=e||function(t){if(t)throw t};var a=l.default(t);if(\"object\"==typeof a){var s=n.projections.get(a.projName);if(s){if(a.datumCode&&\"none\"!==a.datumCode){var i=m.default(p.default,a.datumCode);i&&(a.datum_params=i.towgs84?i.towgs84.split(\",\"):null,a.ellps=i.ellipse,a.datumName=i.datumName?i.datumName:a.datumCode)}a.k0=a.k0||1,a.axis=a.axis||\"enu\",a.ellps=a.ellps||\"wgs84\";var u=f.sphere(a.a,a.b,a.rf,a.ellps,a.sphere),r=f.eccentricity(u.a,u.b,u.rf,a.R_A),h=a.datum||d.default(a.datumCode,a.datum_params,u.a,u.b,r.es,r.ep2);o.default(this,a),o.default(this,s),this.a=u.a,this.b=u.b,this.rf=u.rf,this.sphere=u.sphere,this.es=r.es,this.e=r.e,this.ep2=r.ep2,this.datum=h,this.init(),e(null,this)}else e(t)}else e(t)}n.projections=r.default,n.projections.start(),a.default=n},\n function _(t,r,n,u,e){u();const f=t(1),i=f.__importDefault(t(69)),a=f.__importDefault(t(76)),o=f.__importDefault(t(71)),l=f.__importDefault(t(75));var C=[\"PROJECTEDCRS\",\"PROJCRS\",\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\",\"GEODCRS\",\"GEODETICCRS\",\"GEODETICDATUM\",\"ENGCRS\",\"ENGINEERINGCRS\"];var d=[\"3857\",\"900913\",\"3785\",\"102113\"];n.default=function(t){if(!function(t){return\"string\"==typeof t}(t))return t;if(function(t){return t in i.default}(t))return i.default[t];if(function(t){return C.some((function(r){return t.indexOf(r)>-1}))}(t)){var r=a.default(t);if(function(t){var r=l.default(t,\"authority\");if(r){var n=l.default(r,\"epsg\");return n&&d.indexOf(n)>-1}}(r))return i.default[\"EPSG:3857\"];var n=function(t){var r=l.default(t,\"extension\");if(r)return l.default(r,\"proj4\")}(r);return n?o.default(n):r}return function(t){return\"+\"===t[0]}(t)?o.default(t):void 0}},\n function _(t,r,i,e,n){e();const f=t(1),a=f.__importDefault(t(70)),l=f.__importDefault(t(71)),u=f.__importDefault(t(76));function o(t){var r=this;if(2===arguments.length){var i=arguments[1];\"string\"==typeof i?\"+\"===i.charAt(0)?o[t]=l.default(arguments[1]):o[t]=u.default(arguments[1]):o[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?o.apply(r,t):o(t)}));if(\"string\"==typeof t){if(t in o)return o[t]}else\"EPSG\"in t?o[\"EPSG:\"+t.EPSG]=t:\"ESRI\"in t?o[\"ESRI:\"+t.ESRI]=t:\"IAU2000\"in t?o[\"IAU2000:\"+t.IAU2000]=t:console.log(t);return}}a.default(o),i.default=o},\n function _(t,l,G,S,e){S(),G.default=function(t){t(\"EPSG:4326\",\"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\"),t(\"EPSG:4269\",\"+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees\"),t(\"EPSG:3857\",\"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs\"),t.WGS84=t[\"EPSG:4326\"],t[\"EPSG:3785\"]=t[\"EPSG:3857\"],t.GOOGLE=t[\"EPSG:3857\"],t[\"EPSG:900913\"]=t[\"EPSG:3857\"],t[\"EPSG:102113\"]=t[\"EPSG:3857\"]}},\n function _(t,n,o,a,u){a();const e=t(1),r=t(72),i=e.__importDefault(t(73)),f=e.__importDefault(t(74)),l=e.__importDefault(t(75));o.default=function(t){var n,o,a,u={},e=t.split(\"+\").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,n){var o=n.split(\"=\");return o.push(!0),t[o[0].toLowerCase()]=o[1],t}),{}),c={proj:\"projName\",datum:\"datumCode\",rf:function(t){u.rf=parseFloat(t)},lat_0:function(t){u.lat0=t*r.D2R},lat_1:function(t){u.lat1=t*r.D2R},lat_2:function(t){u.lat2=t*r.D2R},lat_ts:function(t){u.lat_ts=t*r.D2R},lon_0:function(t){u.long0=t*r.D2R},lon_1:function(t){u.long1=t*r.D2R},lon_2:function(t){u.long2=t*r.D2R},alpha:function(t){u.alpha=parseFloat(t)*r.D2R},lonc:function(t){u.longc=t*r.D2R},x_0:function(t){u.x0=parseFloat(t)},y_0:function(t){u.y0=parseFloat(t)},k_0:function(t){u.k0=parseFloat(t)},k:function(t){u.k0=parseFloat(t)},a:function(t){u.a=parseFloat(t)},b:function(t){u.b=parseFloat(t)},r_a:function(){u.R_A=!0},zone:function(t){u.zone=parseInt(t,10)},south:function(){u.utmSouth=!0},towgs84:function(t){u.datum_params=t.split(\",\").map((function(t){return parseFloat(t)}))},to_meter:function(t){u.to_meter=parseFloat(t)},units:function(t){u.units=t;var n=l.default(f.default,t);n&&(u.to_meter=n.to_meter)},from_greenwich:function(t){u.from_greenwich=t*r.D2R},pm:function(t){var n=l.default(i.default,t);u.from_greenwich=(n||parseFloat(t))*r.D2R},nadgrids:function(t){\"@null\"===t?u.datumCode=\"none\":u.nadgrids=t},axis:function(t){var n=\"ewnsud\";3===t.length&&-1!==n.indexOf(t.substr(0,1))&&-1!==n.indexOf(t.substr(1,1))&&-1!==n.indexOf(t.substr(2,1))&&(u.axis=t)}};for(n in e)o=e[n],n in c?\"function\"==typeof(a=c[n])?a(o):u[a]=o:u[n]=o;return\"string\"==typeof u.datumCode&&\"WGS84\"!==u.datumCode&&(u.datumCode=u.datumCode.toLowerCase()),u}},\n function _(P,A,_,D,I){D(),_.PJD_3PARAM=1,_.PJD_7PARAM=2,_.PJD_WGS84=4,_.PJD_NODATUM=5,_.SEC_TO_RAD=484813681109536e-20,_.HALF_PI=Math.PI/2,_.SIXTH=.16666666666666666,_.RA4=.04722222222222222,_.RA6=.022156084656084655,_.EPSLN=1e-10,_.D2R=.017453292519943295,_.R2D=57.29577951308232,_.FORTPI=Math.PI/4,_.TWO_PI=2*Math.PI,_.SPI=3.14159265359},\n function _(o,r,a,e,s){e();var n={};a.default=n,n.greenwich=0,n.lisbon=-9.131906111111,n.paris=2.337229166667,n.bogota=-74.080916666667,n.madrid=-3.687938888889,n.rome=12.452333333333,n.bern=7.439583333333,n.jakarta=106.807719444444,n.ferro=-17.666666666667,n.brussels=4.367975,n.stockholm=18.058277777778,n.athens=23.7163375,n.oslo=10.722916666667},\n function _(t,e,f,o,u){o(),f.default={ft:{to_meter:.3048},\"us-ft\":{to_meter:1200/3937}}},\n function _(e,r,t,a,n){a();var o=/[\\s_\\-\\/\\(\\)]/g;t.default=function(e,r){if(e[r])return e[r];for(var t,a=Object.keys(e),n=r.toLowerCase().replace(o,\"\"),f=-1;++f0?90:-90),e.lat_ts=e.lat1)}(d),d}},\n function _(t,e,r,i,s){i(),r.default=function(t){return new d(t).output()};var h=/\\s/,o=/[A-Za-z]/,n=/[A-Za-z84]/,a=/[,\\]]/,u=/[\\d\\.E\\-\\+]/;function d(t){if(\"string\"!=typeof t)throw new Error(\"not a string\");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}d.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;h.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},d.prototype.afterquote=function(t){if('\"'===t)return this.word+='\"',void(this.state=4);if(a.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error(\"havn't handled \\\"\"+t+'\" in afterquote yet, index '+this.place)},d.prototype.afterItem=function(t){return\",\"===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):\"]\"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},d.prototype.number=function(t){if(!u.test(t)){if(a.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error(\"havn't handled \\\"\"+t+'\" in number yet, index '+this.place)}this.word+=t},d.prototype.quoted=function(t){'\"'!==t?this.word+=t:this.state=5},d.prototype.keyword=function(t){if(n.test(t))this.word+=t;else{if(\"[\"===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!a.test(t))throw new Error(\"havn't handled \\\"\"+t+'\" in keyword yet, index '+this.place);this.afterItem(t)}},d.prototype.neutral=function(t){if(o.test(t))return this.word=t,void(this.state=2);if('\"'===t)return this.word=\"\",void(this.state=4);if(u.test(t))return this.word=t,void(this.state=3);if(!a.test(t))throw new Error(\"havn't handled \\\"\"+t+'\" in neutral yet, index '+this.place);this.afterItem(t)},d.prototype.output=function(){for(;this.place90&&a*o.R2D<-90&&h*o.R2D>180&&h*o.R2D<-180)return null;if(Math.abs(Math.abs(a)-o.HALF_PI)<=o.EPSLN)return null;if(this.sphere)i=this.x0+this.a*this.k0*n.default(h-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(o.FORTPI+.5*a));else{var e=Math.sin(a),r=l.default(this.e,a,e);i=this.x0+this.a*this.k0*n.default(h-this.long0),s=this.y0-this.a*this.k0*Math.log(r)}return t.x=i,t.y=s,t}function M(t){var i,s,h=t.x-this.x0,a=t.y-this.y0;if(this.sphere)s=o.HALF_PI-2*Math.atan(Math.exp(-a/(this.a*this.k0)));else{var e=Math.exp(-a/(this.a*this.k0));if(-9999===(s=u.default(this.e,e)))return null}return i=n.default(this.long0+h/(this.a*this.k0)),t.x=i,t.y=s,t}s.init=f,s.forward=_,s.inverse=M,s.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"],s.default={init:f,forward:_,inverse:M,names:s.names}},\n function _(t,n,r,u,a){u(),r.default=function(t,n,r){var u=t*n;return r/Math.sqrt(1-u*u)}},\n function _(t,n,u,a,f){a();const e=t(1),o=t(72),_=e.__importDefault(t(84));u.default=function(t){return Math.abs(t)<=o.SPI?t:t-_.default(t)*o.TWO_PI}},\n function _(n,t,u,f,c){f(),u.default=function(n){return n<0?-1:1}},\n function _(t,n,a,o,u){o();const c=t(72);a.default=function(t,n,a){var o=t*a,u=.5*t;return o=Math.pow((1-o)/(1+o),u),Math.tan(.5*(c.HALF_PI-n))/o}},\n function _(t,a,n,r,f){r();const h=t(72);n.default=function(t,a){for(var n,r,f=.5*t,o=h.HALF_PI-2*Math.atan(a),u=0;u<=15;u++)if(n=t*Math.sin(o),o+=r=h.HALF_PI-2*Math.atan(a*Math.pow((1-n)/(1+n),f))-o,Math.abs(r)<=1e-10)return o;return-9999}},\n function _(n,i,e,t,r){function a(){}function f(n){return n}t(),e.init=a,e.forward=f,e.inverse=f,e.names=[\"longlat\",\"identity\"],e.default={init:a,forward:f,inverse:f,names:e.names}},\n function _(t,r,e,a,n){a();const f=t(1),i=t(72),u=f.__importStar(t(89)),c=f.__importDefault(t(75));e.eccentricity=function(t,r,e,a){var n=t*t,f=r*r,u=(n-f)/n,c=0;return a?(n=(t*=1-u*(i.SIXTH+u*(i.RA4+u*i.RA6)))*t,u=0):c=Math.sqrt(u),{es:u,e:c,ep2:(n-f)/f}},e.sphere=function(t,r,e,a,n){if(!t){var f=c.default(u.default,a);f||(f=u.WGS84),t=f.a,r=f.b,e=f.rf}return e&&!r&&(r=(1-1/e)*t),(0===e||Math.abs(t-r)3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=p.PJD_7PARAM,r.datum_params[3]*=p.SEC_TO_RAD,r.datum_params[4]*=p.SEC_TO_RAD,r.datum_params[5]*=p.SEC_TO_RAD,r.datum_params[6]=r.datum_params[6]/1e6+1))),r.a=_,r.b=t,r.es=u,r.ep2=d,r}},\n function _(t,e,a,r,u){r();const m=t(1),_=t(72),o=m.__importDefault(t(93)),d=m.__importDefault(t(95)),f=m.__importDefault(t(67)),n=m.__importDefault(t(96)),i=m.__importDefault(t(97));a.default=function t(e,a,r){var u;if(Array.isArray(r)&&(r=n.default(r)),i.default(r),e.datum&&a.datum&&function(t,e){return(t.datum.datum_type===_.PJD_3PARAM||t.datum.datum_type===_.PJD_7PARAM)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===_.PJD_3PARAM||e.datum.datum_type===_.PJD_7PARAM)&&\"WGS84\"!==t.datumCode}(e,a)&&(r=t(e,u=new f.default(\"WGS84\"),r),e=u),\"enu\"!==e.axis&&(r=d.default(e,!1,r)),\"longlat\"===e.projName)r={x:r.x*_.D2R,y:r.y*_.D2R,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;return e.from_greenwich&&(r.x+=e.from_greenwich),r=o.default(e.datum,a.datum,r),a.from_greenwich&&(r={x:r.x-a.from_greenwich,y:r.y,z:r.z||0}),\"longlat\"===a.projName?r={x:r.x*_.R2D,y:r.y*_.R2D,z:r.z||0}:(r=a.forward(r),a.to_meter&&(r={x:r.x/a.to_meter,y:r.y/a.to_meter,z:r.z||0})),\"enu\"!==a.axis?d.default(a,!0,r):r}},\n function _(t,e,a,u,c){u();const m=t(72),o=t(94);function _(t){return t===m.PJD_3PARAM||t===m.PJD_7PARAM}a.default=function(t,e,a){return o.compareDatums(t,e)||t.datum_type===m.PJD_NODATUM||e.datum_type===m.PJD_NODATUM?a:t.es!==e.es||t.a!==e.a||_(t.datum_type)||_(e.datum_type)?(a=o.geodeticToGeocentric(a,t.es,t.a),_(t.datum_type)&&(a=o.geocentricToWgs84(a,t.datum_type,t.datum_params)),_(e.datum_type)&&(a=o.geocentricFromWgs84(a,e.datum_type,e.datum_params)),o.geocentricToGeodetic(a,e.es,e.a,e.b)):a}},\n function _(a,t,r,m,s){m();const u=a(72);r.compareDatums=function(a,t){return a.datum_type===t.datum_type&&(!(a.a!==t.a||Math.abs(a.es-t.es)>5e-11)&&(a.datum_type===u.PJD_3PARAM?a.datum_params[0]===t.datum_params[0]&&a.datum_params[1]===t.datum_params[1]&&a.datum_params[2]===t.datum_params[2]:a.datum_type!==u.PJD_7PARAM||a.datum_params[0]===t.datum_params[0]&&a.datum_params[1]===t.datum_params[1]&&a.datum_params[2]===t.datum_params[2]&&a.datum_params[3]===t.datum_params[3]&&a.datum_params[4]===t.datum_params[4]&&a.datum_params[5]===t.datum_params[5]&&a.datum_params[6]===t.datum_params[6]))},r.geodeticToGeocentric=function(a,t,r){var m,s,_,e,n=a.x,d=a.y,i=a.z?a.z:0;if(d<-u.HALF_PI&&d>-1.001*u.HALF_PI)d=-u.HALF_PI;else if(d>u.HALF_PI&&d<1.001*u.HALF_PI)d=u.HALF_PI;else{if(d<-u.HALF_PI)return{x:-1/0,y:-1/0,z:a.z};if(d>u.HALF_PI)return{x:1/0,y:1/0,z:a.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(d),e=Math.cos(d),_=s*s,{x:((m=r/Math.sqrt(1-t*_))+i)*e*Math.cos(n),y:(m+i)*e*Math.sin(n),z:(m*(1-t)+i)*s}},r.geocentricToGeodetic=function(a,t,r,m){var s,_,e,n,d,i,p,P,y,z,M,o,A,c,x,h=1e-12,f=a.x,I=a.y,F=a.z?a.z:0;if(s=Math.sqrt(f*f+I*I),_=Math.sqrt(f*f+I*I+F*F),s/r1e-24&&A<30);return{x:c,y:Math.atan(M/Math.abs(z)),z:x}},r.geocentricToWgs84=function(a,t,r){if(t===u.PJD_3PARAM)return{x:a.x+r[0],y:a.y+r[1],z:a.z+r[2]};if(t===u.PJD_7PARAM){var m=r[0],s=r[1],_=r[2],e=r[3],n=r[4],d=r[5],i=r[6];return{x:i*(a.x-d*a.y+n*a.z)+m,y:i*(d*a.x+a.y-e*a.z)+s,z:i*(-n*a.x+e*a.y+a.z)+_}}},r.geocentricFromWgs84=function(a,t,r){if(t===u.PJD_3PARAM)return{x:a.x-r[0],y:a.y-r[1],z:a.z-r[2]};if(t===u.PJD_7PARAM){var m=r[0],s=r[1],_=r[2],e=r[3],n=r[4],d=r[5],i=r[6],p=(a.x-m)/i,P=(a.y-s)/i,y=(a.z-_)/i;return{x:p+d*P-n*y,y:-d*p+P+e*y,z:n*p-e*P+y}}}},\n function _(e,a,i,r,s){r(),i.default=function(e,a,i){var r,s,n,c=i.x,d=i.y,f=i.z||0,u={};for(n=0;n<3;n++)if(!a||2!==n||void 0!==i.z)switch(0===n?(r=c,s=-1!==\"ew\".indexOf(e.axis[n])?\"x\":\"y\"):1===n?(r=d,s=-1!==\"ns\".indexOf(e.axis[n])?\"y\":\"x\"):(r=f,s=\"z\"),e.axis[n]){case\"e\":u[s]=r;break;case\"w\":u[s]=-r;break;case\"n\":u[s]=r;break;case\"s\":u[s]=-r;break;case\"u\":void 0!==i[s]&&(u.z=r);break;case\"d\":void 0!==i[s]&&(u.z=-r);break;default:return null}return u}},\n function _(n,t,e,u,f){u(),e.default=function(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}},\n function _(e,i,n,t,r){function o(e){if(\"function\"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError(\"coordinates must be finite numbers\")}if(\"number\"!=typeof e||e!=e||!isFinite(e))throw new TypeError(\"coordinates must be finite numbers\")}t(),n.default=function(e){o(e.x),o(e.y)}},\n function _(e,t,s,i,n){i();const r=e(1),a=r.__importStar(e(18)),o=r.__importStar(e(99)),_=r.__importStar(e(45)),l=e(42),c=e(53),h=e(19),d=e(24),u=e(8),f=e(100),p=e(12),g=e(26),y=e(101),x=e(104),v=e(59),{abs:b,ceil:m}=Math;class w extends l.View{constructor(){super(...arguments),this._index=null,this._data_size=null,this._nohit_warned=new Set}get renderer(){return this.parent}get has_webgl(){return null!=this.glglyph}get index(){const{_index:e}=this;if(null!=e)return e;throw new Error(`${this}.index_data() wasn't called`)}get data_size(){const{_data_size:e}=this;if(null!=e)return e;throw new Error(`${this}.set_data() wasn't called`)}initialize(){super.initialize(),this.visuals=new _.Visuals(this)}request_render(){this.parent.request_render()}get canvas(){return this.renderer.parent.canvas_view}render(e,t,s){var i;null!=this.glglyph&&(this.renderer.needs_webgl_blit=this.glglyph.render(e,t,null!==(i=this.base)&&void 0!==i?i:this),this.renderer.needs_webgl_blit)||(e.beginPath(),this._render(e,t,null!=s?s:this.base))}has_finished(){return!0}notify_finished(){this.renderer.notify_finished()}_bounds(e){return e}bounds(){return this._bounds(this.index.bbox)}log_bounds(){const{x0:e,x1:t}=this.index.bounds(o.positive_x()),{y0:s,y1:i}=this.index.bounds(o.positive_y());return this._bounds({x0:e,y0:s,x1:t,y1:i})}get_anchor_point(e,t,[s,i]){switch(e){case\"center\":case\"center_center\":{const[e,n]=this.scenterxy(t,s,i);return{x:e,y:n}}default:return null}}scenterx(e,t,s){return this.scenterxy(e,t,s)[0]}scentery(e,t,s){return this.scenterxy(e,t,s)[1]}sdist(e,t,s,i=\"edge\",n=!1){const r=t.length,a=new d.ScreenArray(r),o=e.s_compute;if(\"center\"==i)for(let e=0;em(e))),a}draw_legend_for_index(e,t,s){}hit_test(e){switch(e.type){case\"point\":if(null!=this._hit_point)return this._hit_point(e);break;case\"span\":if(null!=this._hit_span)return this._hit_span(e);break;case\"rect\":if(null!=this._hit_rect)return this._hit_rect(e);break;case\"poly\":if(null!=this._hit_poly)return this._hit_poly(e)}return this._nohit_warned.has(e.type)||(h.logger.debug(`'${e.type}' selection not available for ${this.model.type}`),this._nohit_warned.add(e.type)),null}_hit_rect_against_index(e){const{sx0:t,sx1:s,sy0:i,sy1:n}=e,[r,a]=this.renderer.coordinates.x_scale.r_invert(t,s),[o,_]=this.renderer.coordinates.y_scale.r_invert(i,n),l=[...this.index.indices({x0:r,x1:a,y0:o,y1:_})];return new v.Selection({indices:l})}_project_data(){}*_iter_visuals(){for(const e of this.visuals)for(const t of e)(t instanceof a.VectorSpec||t instanceof a.ScalarSpec)&&(yield t)}set_base(e){e!=this&&e instanceof this.constructor&&(this.base=e)}_configure(e,t){Object.defineProperty(this,u.isString(e)?e:e.attr,Object.assign({configurable:!0,enumerable:!0},t))}set_visuals(e,t){var s;for(const s of this._iter_visuals()){const{base:i}=this;if(null!=i){const e=i.model.properties[s.attr];if(null!=e&&g.is_equal(s.get_value(),e.get_value())){this._configure(s,{get:()=>i[`${s.attr}`]});continue}}const n=s.uniform(e).select(t);this._configure(s,{value:n})}for(const e of this.visuals)e.update();null===(s=this.glglyph)||void 0===s||s.set_visuals_changed()}set_data(e,t,s){var i;const{x_range:n,y_range:r}=this.renderer.coordinates,o=new Set(this._iter_visuals());this._data_size=t.count;for(const s of this.model)if((s instanceof a.VectorSpec||s instanceof a.ScalarSpec)&&!o.has(s))if(s instanceof a.BaseCoordinateSpec){const i=s.array(e);let o=t.select(i);const _=\"x\"==s.dimension?n:r;if(_ instanceof x.FactorRange)if(s instanceof a.CoordinateSpec)o=_.v_synthetic(o);else if(s instanceof a.CoordinateSeqSpec)for(let e=0;e=0&&s>=0))throw new Error(`invalid bbox {x: ${i}, y: ${e}, width: ${h}, height: ${s}}`);this.x0=i,this.y0=e,this.x1=i+h,this.y1=e+s}else{let i,e,h,s;if(\"width\"in t)if(\"left\"in t)i=t.left,e=i+t.width;else if(\"right\"in t)e=t.right,i=e-t.width;else{const h=t.width/2;i=t.hcenter-h,e=t.hcenter+h}else i=t.left,e=t.right;if(\"height\"in t)if(\"top\"in t)h=t.top,s=h+t.height;else if(\"bottom\"in t)s=t.bottom,h=s-t.height;else{const i=t.height/2;h=t.vcenter-i,s=t.vcenter+i}else h=t.top,s=t.bottom;if(!(i<=e&&h<=s))throw new Error(`invalid bbox {left: ${i}, top: ${h}, right: ${e}, bottom: ${s}}`);this.x0=i,this.y0=h,this.x1=e,this.y1=s}}equals(t){return this.x0==t.x0&&this.y0==t.y0&&this.x1==t.x1&&this.y1==t.y1}[n.equals](t,i){return i.eq(this.x0,t.x0)&&i.eq(this.y0,t.y0)&&i.eq(this.x1,t.x1)&&i.eq(this.y1,t.y1)}toString(){return`BBox({left: ${this.left}, top: ${this.top}, width: ${this.width}, height: ${this.height}})`}get left(){return this.x0}get top(){return this.y0}get right(){return this.x1}get bottom(){return this.y1}get p0(){return[this.x0,this.y0]}get p1(){return[this.x1,this.y1]}get x(){return this.x0}get y(){return this.y0}get width(){return this.x1-this.x0}get height(){return this.y1-this.y0}get size(){return{width:this.width,height:this.height}}get rect(){const{x0:t,y0:i,x1:e,y1:h}=this;return{p0:{x:t,y:i},p1:{x:e,y:i},p2:{x:e,y:h},p3:{x:t,y:h}}}get box(){const{x:t,y:i,width:e,height:h}=this;return{x:t,y:i,width:e,height:h}}get h_range(){return{start:this.x0,end:this.x1}}get v_range(){return{start:this.y0,end:this.y1}}get ranges(){return[this.h_range,this.v_range]}get aspect(){return this.width/this.height}get hcenter(){return(this.left+this.right)/2}get vcenter(){return(this.top+this.bottom)/2}get area(){return this.width*this.height}relative(){const{width:t,height:i}=this;return new o({x:0,y:0,width:t,height:i})}translate(t,i){const{x:e,y:h,width:s,height:r}=this;return new o({x:t+e,y:i+h,width:s,height:r})}relativize(t,i){return[t-this.x,i-this.y]}contains(t,i){return this.x0<=t&&t<=this.x1&&this.y0<=i&&i<=this.y1}clip(t,i){return tthis.x1&&(t=this.x1),ithis.y1&&(i=this.y1),[t,i]}grow_by(t){return new o({left:this.left-t,right:this.right+t,top:this.top-t,bottom:this.bottom+t})}shrink_by(t){return new o({left:this.left+t,right:this.right-t,top:this.top+t,bottom:this.bottom-t})}union(t){return new o({x0:x(this.x0,t.x0),y0:x(this.y0,t.y0),x1:y(this.x1,t.x1),y1:y(this.y1,t.y1)})}intersection(t){return this.intersects(t)?new o({x0:y(this.x0,t.x0),y0:y(this.y0,t.y0),x1:x(this.x1,t.x1),y1:x(this.y1,t.y1)}):null}intersects(t){return!(t.x1this.x1||t.y1this.y1)}get xview(){return{compute:t=>this.left+t,v_compute:t=>{const i=new r.ScreenArray(t.length),e=this.left;for(let h=0;hthis.bottom-t,v_compute:t=>{const i=new r.ScreenArray(t.length),e=this.bottom;for(let h=0;h{const s=new Uint32Array(r);for(let n=0;n>1;i[s]>n?e=s:t=s+1}return i[t]}class r extends o.default{search_indices(n,i,t,e){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let s=this._boxes.length-4;const o=[],x=new d.Indices(this.numItems);for(;void 0!==s;){const d=Math.min(s+4*this.nodeSize,h(s,this._levelBounds));for(let h=s;h>2];tthis._boxes[h+2]||i>this._boxes[h+3]||(s<4*this.numItems?x.set(d):o.push(d)))}s=o.pop()}return x}}r.__name__=\"_FlatBush\";class l{constructor(n){this.index=null,n>0&&(this.index=new r(n))}add(n,i,t,e){var s;null===(s=this.index)||void 0===s||s.add(n,i,t,e)}add_empty(){var n;null===(n=this.index)||void 0===n||n.add(1/0,1/0,-1/0,-1/0)}finish(){var n;null===(n=this.index)||void 0===n||n.finish()}_normalize(n){let{x0:i,y0:t,x1:e,y1:s}=n;return i>e&&([i,e]=[e,i]),t>s&&([t,s]=[s,t]),{x0:i,y0:t,x1:e,y1:s}}get bbox(){if(null==this.index)return x.empty();{const{minX:n,minY:i,maxX:t,maxY:e}=this.index;return{x0:n,y0:i,x1:t,y1:e}}}indices(n){if(null==this.index)return new d.Indices(0);{const{x0:i,y0:t,x1:e,y1:s}=this._normalize(n);return this.index.search_indices(i,t,e,s)}}bounds(n){const i=x.empty();for(const t of this.indices(n)){const n=this.index._boxes,e=n[4*t+0],s=n[4*t+1],o=n[4*t+2],d=n[4*t+3];oi.x1&&(i.x1=e),di.y1&&(i.y1=s)}return i}}t.SpatialIndex=l,l.__name__=\"SpatialIndex\"},\n function _(t,s,i,e,h){e();const n=t(1).__importDefault(t(103)),o=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class r{static from(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");const[s,i]=new Uint8Array(t,0,2);if(251!==s)throw new Error(\"Data does not appear to be in a Flatbush format.\");if(i>>4!=3)throw new Error(`Got v${i>>4} data when expected v3.`);const[e]=new Uint16Array(t,2,1),[h]=new Uint32Array(t,4,1);return new r(h,e,o[15&i],t)}constructor(t,s=16,i=Float64Array,e){if(void 0===t)throw new Error(\"Missing required argument: numItems.\");if(isNaN(t)||t<=0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+s,2),65535);let h=t,r=h;this._levelBounds=[4*h];do{h=Math.ceil(h/this.nodeSize),r+=h,this._levelBounds.push(4*r)}while(1!==h);this.ArrayType=i||Float64Array,this.IndexArrayType=r<16384?Uint16Array:Uint32Array;const a=o.indexOf(this.ArrayType),_=4*r*this.ArrayType.BYTES_PER_ELEMENT;if(a<0)throw new Error(`Unexpected typed array class: ${i}.`);e&&e instanceof ArrayBuffer?(this.data=e,this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=4*r,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+_+r*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+a]),new Uint16Array(this.data,2,1)[0]=s,new Uint32Array(this.data,4,1)[0]=t),this._queue=new n.default}add(t,s,i,e){const h=this._pos>>2;return this._indices[h]=h,this._boxes[this._pos++]=t,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,tthis.maxX&&(this.maxX=i),e>this.maxY&&(this.maxY=e),h}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);if(this.numItems<=this.nodeSize)return this._boxes[this._pos++]=this.minX,this._boxes[this._pos++]=this.minY,this._boxes[this._pos++]=this.maxX,void(this._boxes[this._pos++]=this.maxY);const t=this.maxX-this.minX,s=this.maxY-this.minY,i=new Uint32Array(this.numItems);for(let e=0;e>2]=t,this._boxes[this._pos++]=e,this._boxes[this._pos++]=h,this._boxes[this._pos++]=n,this._boxes[this._pos++]=o}}}search(t,s,i,e,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const o=[],r=[];for(;void 0!==n;){const a=Math.min(n+4*this.nodeSize,_(n,this._levelBounds));for(let _=n;_>2];ithis._boxes[_+2]||s>this._boxes[_+3]||(n<4*this.numItems?(void 0===h||h(a))&&r.push(a):o.push(a)))}n=o.pop()}return r}neighbors(t,s,i=1/0,e=1/0,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const o=this._queue,r=[],x=e*e;for(;void 0!==n;){const e=Math.min(n+4*this.nodeSize,_(n,this._levelBounds));for(let i=n;i>2],r=a(t,this._boxes[i],this._boxes[i+2]),_=a(s,this._boxes[i+1],this._boxes[i+3]),x=r*r+_*_;n<4*this.numItems?(void 0===h||h(e))&&o.push(-e-1,x):o.push(e,x)}for(;o.length&&o.peek()<0;){if(o.peekValue()>x)return o.clear(),r;if(r.push(-o.pop()-1),r.length===i)return o.clear(),r}n=o.pop()}return o.clear(),r}}function a(t,s,i){return t>1;s[h]>t?e=h:i=h+1}return s[i]}function x(t,s,i,e,h,n){if(Math.floor(e/n)>=Math.floor(h/n))return;const o=t[e+h>>1];let r=e-1,a=h+1;for(;;){do{r++}while(t[r]o);if(r>=a)break;d(t,s,i,r,a)}x(t,s,i,e,a,n),x(t,s,i,a+1,h,n)}function d(t,s,i,e,h){const n=t[e];t[e]=t[h],t[h]=n;const o=4*e,r=4*h,a=s[o],_=s[o+1],x=s[o+2],d=s[o+3];s[o]=s[r],s[o+1]=s[r+1],s[o+2]=s[r+2],s[o+3]=s[r+3],s[r]=a,s[r+1]=_,s[r+2]=x,s[r+3]=d;const m=i[e];i[e]=i[h],i[h]=m}function m(t,s){let i=t^s,e=65535^i,h=65535^(t|s),n=t&(65535^s),o=i|e>>1,r=i>>1^i,a=h>>1^e&n>>1^h,_=i&h>>1^n>>1^n;i=o,e=r,h=a,n=_,o=i&i>>2^e&e>>2,r=i&e>>2^e&(i^e)>>2,a^=i&h>>2^e&n>>2,_^=e&h>>2^(i^e)&n>>2,i=o,e=r,h=a,n=_,o=i&i>>4^e&e>>4,r=i&e>>4^e&(i^e)>>4,a^=i&h>>4^e&n>>4,_^=e&h>>4^(i^e)&n>>4,i=o,e=r,h=a,n=_,a^=i&h>>8^e&n>>8,_^=e&h>>8^(i^e)&n>>8,i=a^a>>1,e=_^_>>1;let x=t^s,d=e|65535^(x|i);return x=16711935&(x|x<<8),x=252645135&(x|x<<4),x=858993459&(x|x<<2),x=1431655765&(x|x<<1),d=16711935&(d|d<<8),d=252645135&(d|d<<4),d=858993459&(d|d<<2),d=1431655765&(d|d<<1),(d<<1|x)>>>0}i.default=r},\n function _(s,t,i,h,e){h();i.default=class{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(s,t){let i=this.length++;for(this.ids[i]=s,this.values[i]=t;i>0;){const s=i-1>>1,h=this.values[s];if(t>=h)break;this.ids[i]=this.ids[s],this.values[i]=h,i=s}this.ids[i]=s,this.values[i]=t}pop(){if(0===this.length)return;const s=this.ids[0];if(this.length--,this.length>0){const s=this.ids[0]=this.ids[this.length],t=this.values[0]=this.values[this.length],i=this.length>>1;let h=0;for(;h=t)break;this.ids[h]=e,this.values[h]=l,h=s}this.ids[h]=s,this.values[h]=t}return s}peek(){if(0!==this.length)return this.ids[0]}peekValue(){if(0!==this.length)return this.values[0]}}},\n function _(t,n,e,i,s){i();const r=t(105),a=t(20),o=t(21),g=t(24),p=t(9),c=t(8),l=t(11);function u(t,n,e=0){const i=new Map;for(let s=0;sa.get(t).value)));r.set(t,{value:l/s,mapping:a}),o+=s+n+c}return[r,(a.size-1)*n+g]}function d(t,n,e,i,s=0){var r;const a=new Map,o=new Map;for(const[n,e,i]of t){const t=null!==(r=o.get(n))&&void 0!==r?r:[];o.set(n,[...t,[e,i]])}let g=s,c=0;for(const[t,s]of o){const r=s.length,[o,l]=h(s,e,i,g);c+=l;const u=p.sum(s.map((([t])=>o.get(t).value)));a.set(t,{value:u/r,mapping:o}),g+=r+n+l}return[a,(o.size-1)*n+c]}e.Factor=o.Or(o.String,o.Tuple(o.String,o.String),o.Tuple(o.String,o.String,o.String)),e.FactorSeq=o.Or(o.Array(o.String),o.Array(o.Tuple(o.String,o.String)),o.Array(o.Tuple(o.String,o.String,o.String))),e.map_one_level=u,e.map_two_levels=h,e.map_three_levels=d;class _ extends r.Range{constructor(t){super(t)}static init_FactorRange(){this.define((({Number:t})=>({factors:[e.FactorSeq,[]],factor_padding:[t,0],subgroup_padding:[t,.8],group_padding:[t,1.4],range_padding:[t,0],range_padding_units:[a.PaddingUnits,\"percent\"],start:[t],end:[t]}))),this.internal((({Number:t,String:n,Array:e,Tuple:i,Nullable:s})=>({levels:[t],mids:[s(e(i(n,n))),null],tops:[s(e(n)),null]})))}get min(){return this.start}get max(){return this.end}initialize(){super.initialize(),this._init(!0)}connect_signals(){super.connect_signals(),this.connect(this.properties.factors.change,(()=>this.reset())),this.connect(this.properties.factor_padding.change,(()=>this.reset())),this.connect(this.properties.group_padding.change,(()=>this.reset())),this.connect(this.properties.subgroup_padding.change,(()=>this.reset())),this.connect(this.properties.range_padding.change,(()=>this.reset())),this.connect(this.properties.range_padding_units.change,(()=>this.reset()))}reset(){this._init(!1),this.change.emit()}_lookup(t){switch(t.length){case 1:{const[n]=t,e=this._mapping.get(n);return null!=e?e.value:NaN}case 2:{const[n,e]=t,i=this._mapping.get(n);if(null!=i){const t=i.mapping.get(e);if(null!=t)return t.value}return NaN}case 3:{const[n,e,i]=t,s=this._mapping.get(n);if(null!=s){const t=s.mapping.get(e);if(null!=t){const n=t.mapping.get(i);if(null!=n)return n.value}}return NaN}default:l.unreachable()}}synthetic(t){if(c.isNumber(t))return t;if(c.isString(t))return this._lookup([t]);let n=0;const e=t[t.length-1];return c.isNumber(e)&&(n=e,t=t.slice(0,-1)),this._lookup(t)+n}v_synthetic(t){const n=t.length,e=new g.ScreenArray(n);for(let i=0;i{if(p.every(this.factors,c.isString)){const t=this.factors,[n,e]=u(t,this.factor_padding);return{levels:1,mapping:n,tops:null,mids:null,inside_padding:e}}if(p.every(this.factors,(t=>c.isArray(t)&&2==t.length&&c.isString(t[0])&&c.isString(t[1])))){const t=this.factors,[n,e]=h(t,this.group_padding,this.factor_padding),i=[...n.keys()];return{levels:2,mapping:n,tops:i,mids:null,inside_padding:e}}if(p.every(this.factors,(t=>c.isArray(t)&&3==t.length&&c.isString(t[0])&&c.isString(t[1])&&c.isString(t[2])))){const t=this.factors,[n,e]=d(t,this.group_padding,this.subgroup_padding,this.factor_padding),i=[...n.keys()],s=[];for(const[t,e]of n)for(const n of e.mapping.keys())s.push([t,n]);return{levels:3,mapping:n,tops:i,mids:s,inside_padding:e}}l.unreachable()})();this._mapping=e,this.tops=i,this.mids=s;let a=0,o=this.factors.length+r;if(\"percent\"==this.range_padding_units){const t=(o-a)*this.range_padding/2;a-=t,o+=t}else a-=this.range_padding,o+=this.range_padding;this.setv({start:a,end:o,levels:n},{silent:t}),\"auto\"==this.bounds&&this.setv({bounds:[a,o]},{silent:!0})}}e.FactorRange=_,_.__name__=\"FactorRange\",_.init_FactorRange()},\n function _(e,t,i,n,s){n();const a=e(53);class l extends a.Model{constructor(e){super(e),this.have_updated_interactively=!1}static init_Range(){this.define((({Number:e,Tuple:t,Or:i,Auto:n,Nullable:s})=>({bounds:[s(i(t(s(e),s(e)),n)),null],min_interval:[s(e),null],max_interval:[s(e),null]}))),this.internal((({Array:e,AnyRef:t})=>({plots:[e(t()),[]]})))}get is_reversed(){return this.start>this.end}get is_valid(){return isFinite(this.min)&&isFinite(this.max)}}i.Range=l,l.__name__=\"Range\",l.init_Range()},\n function _(e,t,i,n,l){n();const o=e(1).__importStar(e(107));function a(e,t,{x0:i,x1:n,y0:l,y1:o},a){t.save(),t.beginPath(),t.moveTo(i,(l+o)/2),t.lineTo(n,(l+o)/2),e.line.doit&&(e.line.set_vectorize(t,a),t.stroke()),t.restore()}function r(e,t,{x0:i,x1:n,y0:l,y1:o},a){var r,c;const s=.1*Math.abs(n-i),_=.1*Math.abs(o-l),v=i+s,d=n-s,h=l+_,g=o-_;t.beginPath(),t.rect(v,h,d-v,g-h),e.fill.doit&&(e.fill.set_vectorize(t,a),t.fill()),(null===(r=e.hatch)||void 0===r?void 0:r.doit)&&(e.hatch.set_vectorize(t,a),t.fill()),(null===(c=e.line)||void 0===c?void 0:c.doit)&&(e.line.set_vectorize(t,a),t.stroke())}i.generic_line_scalar_legend=function(e,t,{x0:i,x1:n,y0:l,y1:o}){t.save(),t.beginPath(),t.moveTo(i,(l+o)/2),t.lineTo(n,(l+o)/2),e.line.doit&&(e.line.set_value(t),t.stroke()),t.restore()},i.generic_line_vector_legend=a,i.generic_line_legend=a,i.generic_area_scalar_legend=function(e,t,{x0:i,x1:n,y0:l,y1:o}){var a,r;const c=.1*Math.abs(n-i),s=.1*Math.abs(o-l),_=i+c,v=n-c,d=l+s,h=o-s;t.beginPath(),t.rect(_,d,v-_,h-d),e.fill.doit&&(e.fill.set_value(t),t.fill()),(null===(a=e.hatch)||void 0===a?void 0:a.doit)&&(e.hatch.set_value(t),t.fill()),(null===(r=e.line)||void 0===r?void 0:r.doit)&&(e.line.set_value(t),t.stroke())},i.generic_area_vector_legend=r,i.generic_area_legend=r,i.line_interpolation=function(e,t,i,n,l,a){const{sx:r,sy:c}=t;let s,_,v,d;\"point\"==t.type?([v,d]=e.yscale.r_invert(c-1,c+1),[s,_]=e.xscale.r_invert(r-1,r+1)):\"v\"==t.direction?([v,d]=e.yscale.r_invert(c,c),[s,_]=[Math.min(i-1,l-1),Math.max(i+1,l+1)]):([s,_]=e.xscale.r_invert(r,r),[v,d]=[Math.min(n-1,a-1),Math.max(n+1,a+1)]);const{x:h,y:g}=o.check_2_segments_intersect(s,v,_,d,i,n,l,a);return[h,g]}},\n function _(t,n,e,i,r){function s(t,n){return(t.x-n.x)**2+(t.y-n.y)**2}function o(t,n,e){const i=s(n,e);if(0==i)return s(t,n);const r=((t.x-n.x)*(e.x-n.x)+(t.y-n.y)*(e.y-n.y))/i;if(r<0)return s(t,n);if(r>1)return s(t,e);return s(t,{x:n.x+r*(e.x-n.x),y:n.y+r*(e.y-n.y)})}i(),e.point_in_poly=function(t,n,e,i){let r=!1,s=e[e.length-1],o=i[i.length-1];for(let u=0;u0&&_<1&&h>0&&h<1,x:t+_*(e-t),y:n+_*(i-n)}}}},\n function _(t,e,s,i,a){i();const o=t(1),n=t(109),_=t(113),r=o.__importDefault(t(114)),h=o.__importDefault(t(115)),l=t(22),g=t(46);class u{constructor(t){this._atlas=new Map,this._width=256,this._height=256,this.tex=new n.Texture2d(t),this.tex.set_wrapping(t.REPEAT,t.REPEAT),this.tex.set_interpolation(t.NEAREST,t.NEAREST),this.tex.set_size([this._width,this._height],t.RGBA),this.tex.set_data([0,0],[this._width,this._height],new Uint8Array(4*this._width*this._height)),this.get_atlas_data([1])}get_atlas_data(t){const e=t.join(\"-\");let s=this._atlas.get(e);if(null==s){const[i,a]=this.make_pattern(t),o=this._atlas.size;this.tex.set_data([0,o],[this._width,1],new Uint8Array(i.map((t=>t+10)))),s=[o/this._height,a],this._atlas.set(e,s)}return s}make_pattern(t){t.length>1&&t.length%2&&(t=t.concat(t));let e=0;for(const s of t)e+=s;const s=[];let i=0;for(let e=0,a=t.length+2;es[h]?-1:0,n=s[h-1],i=s[h]),o[4*t+0]=s[h],o[4*t+1]=_,o[4*t+2]=n,o[4*t+3]=i}return[o,e]}}u.__name__=\"DashAtlas\";const f={miter:0,round:1,bevel:2},c={\"\":0,none:0,\".\":0,round:1,\")\":1,\"(\":1,o:1,\"triangle in\":2,\"<\":2,\"triangle out\":3,\">\":3,square:4,\"[\":4,\"]\":4,\"=\":4,butt:5,\"|\":5};class d extends _.BaseGLGlyph{constructor(t,e){super(t,e),this.glyph=e,this._scale_aspect=0;const s=r.default,i=h.default;this.prog=new n.Program(t),this.prog.set_shaders(s,i),this.index_buffer=new n.IndexBuffer(t),this.vbo_position=new n.VertexBuffer(t),this.vbo_tangents=new n.VertexBuffer(t),this.vbo_segment=new n.VertexBuffer(t),this.vbo_angles=new n.VertexBuffer(t),this.vbo_texcoord=new n.VertexBuffer(t),this.dash_atlas=new u(t)}draw(t,e,s){const i=e.glglyph;if(i.data_changed&&(i._set_data(),i.data_changed=!1),this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1),i._update_scale(1,1),this._scale_aspect=1,this.prog.set_attribute(\"a_position\",\"vec2\",i.vbo_position),this.prog.set_attribute(\"a_tangents\",\"vec4\",i.vbo_tangents),this.prog.set_attribute(\"a_segment\",\"vec2\",i.vbo_segment),this.prog.set_attribute(\"a_angles\",\"vec2\",i.vbo_angles),this.prog.set_attribute(\"a_texcoord\",\"vec2\",i.vbo_texcoord),this.prog.set_uniform(\"u_length\",\"float\",[i.cumsum]),this.prog.set_texture(\"u_dash_atlas\",this.dash_atlas.tex),this.prog.set_uniform(\"u_pixel_ratio\",\"float\",[s.pixel_ratio]),this.prog.set_uniform(\"u_canvas_size\",\"vec2\",[s.width,s.height]),this.prog.set_uniform(\"u_scale_aspect\",\"vec2\",[1,1]),this.prog.set_uniform(\"u_scale_length\",\"float\",[Math.sqrt(2)]),this.I_triangles=i.I_triangles,this.I_triangles.length<65535)this.index_buffer.set_size(2*this.I_triangles.length),this.index_buffer.set_data(0,new Uint16Array(this.I_triangles)),this.prog.draw(this.gl.TRIANGLES,this.index_buffer);else{t=Array.from(this.I_triangles);const e=this.I_triangles.length,s=64008,a=[];for(let t=0,i=Math.ceil(e/s);t1)for(let e=0;e0||console.log(`Variable ${t} is not an active attribute`));else if(this._unset_variables.has(t)&&this._unset_variables.delete(t),this.activate(),i instanceof r.VertexBuffer){const[r,o]=this.ATYPEINFO[e],l=\"vertexAttribPointer\",_=[r,o,n,s,a];this._attributes.set(t,[i.handle,h,l,_])}else{const s=this.ATYPEMAP[e];this._attributes.set(t,[null,h,s,i])}}_pre_draw(){this.activate();for(const[t,e,i]of this._samplers.values())this.gl.activeTexture(this.gl.TEXTURE0+i),this.gl.bindTexture(t,e);for(const[t,e,i,s]of this._attributes.values())null!=t?(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t),this.gl.enableVertexAttribArray(e),this.gl[i].apply(this.gl,[e,...s])):(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.gl.disableVertexAttribArray(e),this.gl[i].apply(this.gl,[e,...s]));this._validated||(this._validated=!0,this._validate())}_validate(){if(this._unset_variables.size&&console.log(`Program has unset variables: ${this._unset_variables}`),this.gl.validateProgram(this.handle),!this.gl.getProgramParameter(this.handle,this.gl.VALIDATE_STATUS))throw console.log(this.gl.getProgramInfoLog(this.handle)),new Error(\"Program validation error\")}draw(t,e){if(!this._linked)throw new Error(\"Cannot draw program if code has not been set\");if(e instanceof r.IndexBuffer){this._pre_draw(),e.activate();const i=e.buffer_size/2,s=this.gl.UNSIGNED_SHORT;this.gl.drawElements(t,i,s,0),e.deactivate()}else{const[i,s]=e;0!=s&&(this._pre_draw(),this.gl.drawArrays(t,i,s))}}}i.Program=n,n.__name__=\"Program\"},\n function _(t,e,s,i,a){i();class r{constructor(t){this.gl=t,this._usage=35048,this.buffer_size=0,this.handle=this.gl.createBuffer()}delete(){this.gl.deleteBuffer(this.handle)}activate(){this.gl.bindBuffer(this._target,this.handle)}deactivate(){this.gl.bindBuffer(this._target,null)}set_size(t){t!=this.buffer_size&&(this.activate(),this.gl.bufferData(this._target,t,this._usage),this.buffer_size=t)}set_data(t,e){this.activate(),this.gl.bufferSubData(this._target,t,e)}}s.Buffer=r,r.__name__=\"Buffer\";class f extends r{constructor(){super(...arguments),this._target=34962}}s.VertexBuffer=f,f.__name__=\"VertexBuffer\";class h extends r{constructor(){super(...arguments),this._target=34963}}s.IndexBuffer=h,h.__name__=\"IndexBuffer\"},\n function _(t,e,i,a,r){a();const s=t(11);class h{constructor(t){this.gl=t,this._target=3553,this._types={Int8Array:5120,Uint8Array:5121,Int16Array:5122,Uint16Array:5123,Int32Array:5124,Uint32Array:5125,Float32Array:5126},this.handle=this.gl.createTexture()}delete(){this.gl.deleteTexture(this.handle)}activate(){this.gl.bindTexture(this._target,this.handle)}deactivate(){this.gl.bindTexture(this._target,0)}_get_alignment(t){const e=[4,8,2,1];for(const i of e)if(t%i==0)return i;s.unreachable()}set_wrapping(t,e){this.activate(),this.gl.texParameterf(this._target,this.gl.TEXTURE_WRAP_S,t),this.gl.texParameterf(this._target,this.gl.TEXTURE_WRAP_T,e)}set_interpolation(t,e){this.activate(),this.gl.texParameterf(this._target,this.gl.TEXTURE_MIN_FILTER,t),this.gl.texParameterf(this._target,this.gl.TEXTURE_MAG_FILTER,e)}set_size([t,e],i){var a,r,s;t==(null===(a=this._shape_format)||void 0===a?void 0:a.width)&&e==(null===(r=this._shape_format)||void 0===r?void 0:r.height)&&i==(null===(s=this._shape_format)||void 0===s?void 0:s.format)||(this._shape_format={width:t,height:e,format:i},this.activate(),this.gl.texImage2D(this._target,0,i,t,e,0,i,this.gl.UNSIGNED_BYTE,null))}set_data(t,[e,i],a){this.activate();const{format:r}=this._shape_format,[s,h]=t,l=this._types[a.constructor.name];if(null==l)throw new Error(`Type ${a.constructor.name} not allowed for texture`);const _=this._get_alignment(e);4!=_&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,_),this.gl.texSubImage2D(this._target,0,s,h,e,i,r,l,a),4!=_&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,4)}}i.Texture2d=h,h.__name__=\"Texture2d\"},\n function _(e,t,s,i,h){i();class a{constructor(e,t){this.gl=e,this.glyph=t,this.nvertices=0,this.size_changed=!1,this.data_changed=!1,this.visuals_changed=!1}set_data_changed(){const{data_size:e}=this.glyph;e!=this.nvertices&&(this.nvertices=e,this.size_changed=!0),this.data_changed=!0}set_visuals_changed(){this.visuals_changed=!0}render(e,t,s){if(0==t.length)return!0;const{width:i,height:h}=this.glyph.renderer.plot_view.canvas_view.webgl.canvas,a={pixel_ratio:this.glyph.renderer.plot_view.canvas_view.pixel_ratio,width:i,height:h};return this.draw(t,s,a),!0}}s.BaseGLGlyph=a,a.__name__=\"BaseGLGlyph\"},\n function _(n,e,t,a,i){a();t.default=\"\\nprecision mediump float;\\n\\nconst float PI = 3.14159265358979323846264;\\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\\n\\nuniform float u_pixel_ratio;\\nuniform vec2 u_canvas_size, u_offset;\\nuniform vec2 u_scale_aspect;\\nuniform float u_scale_length;\\n\\nuniform vec4 u_color;\\nuniform float u_antialias;\\nuniform float u_length;\\nuniform float u_linewidth;\\nuniform float u_dash_index;\\nuniform float u_closed;\\n\\nattribute vec2 a_position;\\nattribute vec4 a_tangents;\\nattribute vec2 a_segment;\\nattribute vec2 a_angles;\\nattribute vec2 a_texcoord;\\n\\nvarying vec4 v_color;\\nvarying vec2 v_segment;\\nvarying vec2 v_angles;\\nvarying vec2 v_texcoord;\\nvarying vec2 v_miter;\\nvarying float v_length;\\nvarying float v_linewidth;\\n\\nfloat cross(in vec2 v1, in vec2 v2)\\n{\\n return v1.x*v2.y - v1.y*v2.x;\\n}\\n\\nfloat signed_distance(in vec2 v1, in vec2 v2, in vec2 v3)\\n{\\n return cross(v2-v1,v1-v3) / length(v2-v1);\\n}\\n\\nvoid rotate( in vec2 v, in float alpha, out vec2 result )\\n{\\n float c = cos(alpha);\\n float s = sin(alpha);\\n result = vec2( c*v.x - s*v.y,\\n s*v.x + c*v.y );\\n}\\n\\nvoid main()\\n{\\n bool closed = (u_closed > 0.0);\\n\\n // Attributes and uniforms to varyings\\n v_color = u_color;\\n v_linewidth = u_linewidth;\\n v_segment = a_segment * u_scale_length;\\n v_length = u_length * u_scale_length;\\n\\n // Scale to map to pixel coordinates. The original algorithm from the paper\\n // assumed isotropic scale. We obviously do not have this.\\n vec2 abs_scale_aspect = abs(u_scale_aspect);\\n vec2 abs_scale = u_scale_length * abs_scale_aspect;\\n\\n // Correct angles for aspect ratio\\n vec2 av;\\n av = vec2(1.0, tan(a_angles.x)) / abs_scale_aspect;\\n v_angles.x = atan(av.y, av.x);\\n av = vec2(1.0, tan(a_angles.y)) / abs_scale_aspect;\\n v_angles.y = atan(av.y, av.x);\\n\\n // Thickness below 1 pixel are represented using a 1 pixel thickness\\n // and a modified alpha\\n v_color.a = min(v_linewidth, v_color.a);\\n v_linewidth = max(v_linewidth, 1.0);\\n\\n // If color is fully transparent we just will discard the fragment anyway\\n if( v_color.a <= 0.0 ) {\\n gl_Position = vec4(0.0,0.0,0.0,1.0);\\n return;\\n }\\n\\n // This is the actual half width of the line\\n float w = ceil(u_antialias+v_linewidth)/2.0;\\n\\n vec2 position = a_position;\\n\\n vec2 t1 = normalize(a_tangents.xy * abs_scale_aspect); // note the scaling for aspect ratio here\\n vec2 t2 = normalize(a_tangents.zw * abs_scale_aspect);\\n float u = a_texcoord.x;\\n float v = a_texcoord.y;\\n vec2 o1 = vec2( +t1.y, -t1.x);\\n vec2 o2 = vec2( +t2.y, -t2.x);\\n\\n // This is a join\\n // ----------------------------------------------------------------\\n if( t1 != t2 ) {\\n float angle = atan (t1.x*t2.y-t1.y*t2.x, t1.x*t2.x+t1.y*t2.y); // Angle needs recalculation for some reason\\n vec2 t = normalize(t1+t2);\\n vec2 o = vec2( + t.y, - t.x);\\n\\n if ( u_dash_index > 0.0 )\\n {\\n // Broken angle\\n // ----------------------------------------------------------------\\n if( (abs(angle) > THETA) ) {\\n position += v * w * o / cos(angle/2.0);\\n float s = sign(angle);\\n if( angle < 0.0 ) {\\n if( u == +1.0 ) {\\n u = v_segment.y + v * w * tan(angle/2.0);\\n if( v == 1.0 ) {\\n position -= 2.0 * w * t1 / sin(angle);\\n u -= 2.0 * w / sin(angle);\\n }\\n } else {\\n u = v_segment.x - v * w * tan(angle/2.0);\\n if( v == 1.0 ) {\\n position += 2.0 * w * t2 / sin(angle);\\n u += 2.0*w / sin(angle);\\n }\\n }\\n } else {\\n if( u == +1.0 ) {\\n u = v_segment.y + v * w * tan(angle/2.0);\\n if( v == -1.0 ) {\\n position += 2.0 * w * t1 / sin(angle);\\n u += 2.0 * w / sin(angle);\\n }\\n } else {\\n u = v_segment.x - v * w * tan(angle/2.0);\\n if( v == -1.0 ) {\\n position -= 2.0 * w * t2 / sin(angle);\\n u -= 2.0*w / sin(angle);\\n }\\n }\\n }\\n // Continuous angle\\n // ------------------------------------------------------------\\n } else {\\n position += v * w * o / cos(angle/2.0);\\n if( u == +1.0 ) u = v_segment.y;\\n else u = v_segment.x;\\n }\\n }\\n\\n // Solid line\\n // --------------------------------------------------------------------\\n else\\n {\\n position.xy += v * w * o / cos(angle/2.0);\\n if( angle < 0.0 ) {\\n if( u == +1.0 ) {\\n u = v_segment.y + v * w * tan(angle/2.0);\\n } else {\\n u = v_segment.x - v * w * tan(angle/2.0);\\n }\\n } else {\\n if( u == +1.0 ) {\\n u = v_segment.y + v * w * tan(angle/2.0);\\n } else {\\n u = v_segment.x - v * w * tan(angle/2.0);\\n }\\n }\\n }\\n\\n // This is a line start or end (t1 == t2)\\n // ------------------------------------------------------------------------\\n } else {\\n position += v * w * o1;\\n if( u == -1.0 ) {\\n u = v_segment.x - w;\\n position -= w * t1;\\n } else {\\n u = v_segment.y + w;\\n position += w * t2;\\n }\\n }\\n\\n // Miter distance\\n // ------------------------------------------------------------------------\\n vec2 t;\\n vec2 curr = a_position * abs_scale;\\n if( a_texcoord.x < 0.0 ) {\\n vec2 next = curr + t2*(v_segment.y-v_segment.x);\\n\\n rotate( t1, +v_angles.x/2.0, t);\\n v_miter.x = signed_distance(curr, curr+t, position);\\n\\n rotate( t2, +v_angles.y/2.0, t);\\n v_miter.y = signed_distance(next, next+t, position);\\n } else {\\n vec2 prev = curr - t1*(v_segment.y-v_segment.x);\\n\\n rotate( t1, -v_angles.x/2.0,t);\\n v_miter.x = signed_distance(prev, prev+t, position);\\n\\n rotate( t2, -v_angles.y/2.0,t);\\n v_miter.y = signed_distance(curr, curr+t, position);\\n }\\n\\n if (!closed && v_segment.x <= 0.0) {\\n v_miter.x = 1e10;\\n }\\n if (!closed && v_segment.y >= v_length)\\n {\\n v_miter.y = 1e10;\\n }\\n\\n v_texcoord = vec2( u, v*w );\\n\\n // Calculate position in device coordinates. Note that we\\n // already scaled with abs scale above.\\n vec2 normpos = position * sign(u_scale_aspect);\\n normpos += 0.5; // make up for Bokeh's offset\\n normpos /= u_canvas_size / u_pixel_ratio; // in 0..1\\n gl_Position = vec4(normpos*2.0-1.0, 0.0, 1.0);\\n gl_Position.y *= -1.0;\\n}\\n\"},\n function _(n,t,e,s,a){s();e.default=\"\\nprecision mediump float;\\n\\nconst float PI = 3.14159265358979323846264;\\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\\n\\nuniform sampler2D u_dash_atlas;\\n\\nuniform vec2 u_linecaps;\\nuniform float u_miter_limit;\\nuniform float u_linejoin;\\nuniform float u_antialias;\\nuniform float u_dash_phase;\\nuniform float u_dash_period;\\nuniform float u_dash_index;\\nuniform vec2 u_dash_caps;\\nuniform float u_closed;\\n\\nvarying vec4 v_color;\\nvarying vec2 v_segment;\\nvarying vec2 v_angles;\\nvarying vec2 v_texcoord;\\nvarying vec2 v_miter;\\nvarying float v_length;\\nvarying float v_linewidth;\\n\\n// Compute distance to cap ----------------------------------------------------\\nfloat cap( int type, float dx, float dy, float t, float linewidth )\\n{\\n float d = 0.0;\\n dx = abs(dx);\\n dy = abs(dy);\\n if (type == 0) discard; // None\\n else if (type == 1) d = sqrt(dx*dx+dy*dy); // Round\\n else if (type == 3) d = (dx+abs(dy)); // Triangle in\\n else if (type == 2) d = max(abs(dy),(t+dx-abs(dy))); // Triangle out\\n else if (type == 4) d = max(dx,dy); // Square\\n else if (type == 5) d = max(dx+t,dy); // Butt\\n return d;\\n}\\n\\n// Compute distance to join -------------------------------------------------\\nfloat join( in int type, in float d, in vec2 segment, in vec2 texcoord, in vec2 miter,\\n in float linewidth )\\n{\\n // texcoord.x is distance from start\\n // texcoord.y is distance from centerline\\n // segment.x and y indicate the limits (as for texcoord.x) for this segment\\n\\n float dx = texcoord.x;\\n\\n // Round join\\n if( type == 1 ) {\\n if (dx < segment.x) {\\n d = max(d,length( texcoord - vec2(segment.x,0.0)));\\n //d = length( texcoord - vec2(segment.x,0.0));\\n } else if (dx > segment.y) {\\n d = max(d,length( texcoord - vec2(segment.y,0.0)));\\n //d = length( texcoord - vec2(segment.y,0.0));\\n }\\n }\\n // Bevel join\\n else if ( type == 2 ) {\\n if (dx < segment.x) {\\n vec2 x = texcoord - vec2(segment.x,0.0);\\n d = max(d, max(abs(x.x), abs(x.y)));\\n\\n } else if (dx > segment.y) {\\n vec2 x = texcoord - vec2(segment.y,0.0);\\n d = max(d, max(abs(x.x), abs(x.y)));\\n }\\n /* Original code for bevel which does not work for us\\n if( (dx < segment.x) || (dx > segment.y) )\\n d = max(d, min(abs(x.x),abs(x.y)));\\n */\\n }\\n\\n return d;\\n}\\n\\nvoid main()\\n{\\n // If color is fully transparent we just discard the fragment\\n if( v_color.a <= 0.0 ) {\\n discard;\\n }\\n\\n // Test if dash pattern is the solid one (0)\\n bool solid = (u_dash_index == 0.0);\\n\\n // Test if path is closed\\n bool closed = (u_closed > 0.0);\\n\\n vec4 color = v_color;\\n float dx = v_texcoord.x;\\n float dy = v_texcoord.y;\\n float t = v_linewidth/2.0-u_antialias;\\n float width = 1.0; //v_linewidth; original code had dashes scale with line width, we do not\\n float d = 0.0;\\n\\n vec2 linecaps = u_linecaps;\\n vec2 dash_caps = u_dash_caps;\\n float line_start = 0.0;\\n float line_stop = v_length;\\n\\n // Apply miter limit; fragments too far into the miter are simply discarded\\n if( (dx < v_segment.x) || (dx > v_segment.y) ) {\\n float into_miter = max(v_segment.x - dx, dx - v_segment.y);\\n if (into_miter > u_miter_limit*v_linewidth/2.0)\\n discard;\\n }\\n\\n // Solid line --------------------------------------------------------------\\n if( solid ) {\\n d = abs(dy);\\n if( (!closed) && (dx < line_start) ) {\\n d = cap( int(u_linecaps.x), abs(dx), abs(dy), t, v_linewidth );\\n }\\n else if( (!closed) && (dx > line_stop) ) {\\n d = cap( int(u_linecaps.y), abs(dx)-line_stop, abs(dy), t, v_linewidth );\\n }\\n else {\\n d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, v_linewidth );\\n }\\n\\n // Dash line --------------------------------------------------------------\\n } else {\\n float segment_start = v_segment.x;\\n float segment_stop = v_segment.y;\\n float segment_center= (segment_start+segment_stop)/2.0;\\n float freq = u_dash_period*width;\\n float u = mod( dx + u_dash_phase*width, freq);\\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\\n float dash_center= tex.x * width;\\n float dash_type = tex.y;\\n float _start = tex.z * width;\\n float _stop = tex.a * width;\\n float dash_start = dx - u + _start;\\n float dash_stop = dx - u + _stop;\\n\\n // Compute extents of the first dash (the one relative to v_segment.x)\\n // Note: this could be computed in the vertex shader\\n if( (dash_stop < segment_start) && (dash_caps.x != 5.0) ) {\\n float u = mod(segment_start + u_dash_phase*width, freq);\\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\\n dash_center= tex.x * width;\\n //dash_type = tex.y;\\n float _start = tex.z * width;\\n float _stop = tex.a * width;\\n dash_start = segment_start - u + _start;\\n dash_stop = segment_start - u + _stop;\\n }\\n\\n // Compute extents of the last dash (the one relatives to v_segment.y)\\n // Note: This could be computed in the vertex shader\\n else if( (dash_start > segment_stop) && (dash_caps.y != 5.0) ) {\\n float u = mod(segment_stop + u_dash_phase*width, freq);\\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\\n dash_center= tex.x * width;\\n //dash_type = tex.y;\\n float _start = tex.z * width;\\n float _stop = tex.a * width;\\n dash_start = segment_stop - u + _start;\\n dash_stop = segment_stop - u + _stop;\\n }\\n\\n // This test if the we are dealing with a discontinuous angle\\n bool discontinuous = ((dx < segment_center) && abs(v_angles.x) > THETA) ||\\n ((dx >= segment_center) && abs(v_angles.y) > THETA);\\n //if( dx < line_start) discontinuous = false;\\n //if( dx > line_stop) discontinuous = false;\\n\\n float d_join = join( int(u_linejoin), abs(dy),\\n v_segment, v_texcoord, v_miter, v_linewidth );\\n\\n // When path is closed, we do not have room for linecaps, so we make room\\n // by shortening the total length\\n if (closed) {\\n line_start += v_linewidth/2.0;\\n line_stop -= v_linewidth/2.0;\\n }\\n\\n // We also need to take antialias area into account\\n //line_start += u_antialias;\\n //line_stop -= u_antialias;\\n\\n // Check is dash stop is before line start\\n if( dash_stop <= line_start ) {\\n discard;\\n }\\n // Check is dash start is beyond line stop\\n if( dash_start >= line_stop ) {\\n discard;\\n }\\n\\n // Check if current dash start is beyond segment stop\\n if( discontinuous ) {\\n // Dash start is beyond segment, we discard\\n if( (dash_start > segment_stop) ) {\\n discard;\\n //gl_FragColor = vec4(1.0,0.0,0.0,.25); return;\\n }\\n\\n // Dash stop is before segment, we discard\\n if( (dash_stop < segment_start) ) {\\n discard; //gl_FragColor = vec4(0.0,1.0,0.0,.25); return;\\n }\\n\\n // Special case for round caps (nicer with this)\\n if( dash_caps.x == 1.0 ) {\\n if( (u > _stop) && (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0)) {\\n discard;\\n }\\n }\\n\\n // Special case for round caps (nicer with this)\\n if( dash_caps.y == 1.0 ) {\\n if( (u < _start) && (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0)) {\\n discard;\\n }\\n }\\n\\n // Special case for triangle caps (in & out) and square\\n // We make sure the cap stop at crossing frontier\\n if( (dash_caps.x != 1.0) && (dash_caps.x != 5.0) ) {\\n if( (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0) ) {\\n float a = v_angles.x/2.0;\\n float x = (segment_start-dx)*cos(a) - dy*sin(a);\\n float y = (segment_start-dx)*sin(a) + dy*cos(a);\\n if( x > 0.0 ) discard;\\n // We transform the cap into square to avoid holes\\n dash_caps.x = 4.0;\\n }\\n }\\n\\n // Special case for triangle caps (in & out) and square\\n // We make sure the cap stop at crossing frontier\\n if( (dash_caps.y != 1.0) && (dash_caps.y != 5.0) ) {\\n if( (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0) ) {\\n float a = v_angles.y/2.0;\\n float x = (dx-segment_stop)*cos(a) - dy*sin(a);\\n float y = (dx-segment_stop)*sin(a) + dy*cos(a);\\n if( x > 0.0 ) discard;\\n // We transform the caps into square to avoid holes\\n dash_caps.y = 4.0;\\n }\\n }\\n }\\n\\n // Line cap at start\\n if( (dx < line_start) && (dash_start < line_start) && (dash_stop > line_start) ) {\\n d = cap( int(linecaps.x), dx-line_start, dy, t, v_linewidth);\\n }\\n // Line cap at stop\\n else if( (dx > line_stop) && (dash_stop > line_stop) && (dash_start < line_stop) ) {\\n d = cap( int(linecaps.y), dx-line_stop, dy, t, v_linewidth);\\n }\\n // Dash cap left - dash_type = -1, 0 or 1, but there may be roundoff errors\\n else if( dash_type < -0.5 ) {\\n d = cap( int(dash_caps.y), abs(u-dash_center), dy, t, v_linewidth);\\n if( (dx > line_start) && (dx < line_stop) )\\n d = max(d,d_join);\\n }\\n // Dash cap right\\n else if( dash_type > 0.5 ) {\\n d = cap( int(dash_caps.x), abs(dash_center-u), dy, t, v_linewidth);\\n if( (dx > line_start) && (dx < line_stop) )\\n d = max(d,d_join);\\n }\\n // Dash body (plain)\\n else {// if( dash_type > -0.5 && dash_type < 0.5) {\\n d = abs(dy);\\n }\\n\\n // Line join\\n if( (dx > line_start) && (dx < line_stop)) {\\n if( (dx <= segment_start) && (dash_start <= segment_start)\\n && (dash_stop >= segment_start) ) {\\n d = d_join;\\n // Antialias at outer border\\n float angle = PI/2.+v_angles.x;\\n float f = abs( (segment_start - dx)*cos(angle) - dy*sin(angle));\\n d = max(f,d);\\n }\\n else if( (dx > segment_stop) && (dash_start <= segment_stop)\\n && (dash_stop >= segment_stop) ) {\\n d = d_join;\\n // Antialias at outer border\\n float angle = PI/2.+v_angles.y;\\n float f = abs((dx - segment_stop)*cos(angle) - dy*sin(angle));\\n d = max(f,d);\\n }\\n else if( dx < (segment_start - v_linewidth/2.)) {\\n discard;\\n }\\n else if( dx > (segment_stop + v_linewidth/2.)) {\\n discard;\\n }\\n }\\n else if( dx < (segment_start - v_linewidth/2.)) {\\n discard;\\n }\\n else if( dx > (segment_stop + v_linewidth/2.)) {\\n discard;\\n }\\n }\\n\\n // Distance to border ------------------------------------------------------\\n d = d - t;\\n if( d < 0.0 ) {\\n gl_FragColor = color;\\n } else {\\n d /= u_antialias;\\n gl_FragColor = vec4(color.rgb, exp(-d*d)*color.a);\\n }\\n}\\n\"},\n function _(i,t,s,e,l){e();const a=i(1),n=i(64),_=i(106),o=a.__importStar(i(107)),h=a.__importStar(i(48)),c=i(59);class r extends n.XYGlyphView{_inner_loop(i,t,s,e,l){for(const a of t){const t=s[a],n=e[a];0!=a?isNaN(t+n)?(i.closePath(),l.apply(i),i.beginPath()):i.lineTo(t,n):(i.beginPath(),i.moveTo(t,n))}i.closePath(),l.call(i)}_render(i,t,s){const{sx:e,sy:l}=null!=s?s:this;this.visuals.fill.doit&&(this.visuals.fill.set_value(i),this._inner_loop(i,t,e,l,i.fill)),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(i),this._inner_loop(i,t,e,l,i.fill)),this.visuals.line.doit&&(this.visuals.line.set_value(i),this._inner_loop(i,t,e,l,i.stroke))}draw_legend_for_index(i,t,s){_.generic_area_scalar_legend(this.visuals,i,t)}_hit_point(i){const t=new c.Selection;return o.point_in_poly(i.sx,i.sy,this.sx,this.sy)&&(t.add_to_selected_glyphs(this.model),t.view=this),t}}s.PatchView=r,r.__name__=\"PatchView\";class p extends n.XYGlyph{constructor(i){super(i)}static init_Patch(){this.prototype.default_view=r,this.mixins([h.LineScalar,h.FillScalar,h.HatchScalar])}}s.Patch=p,p.__name__=\"Patch\",p.init_Patch()},\n function _(t,e,s,i,n){i();const a=t(1),r=t(24),h=t(118),_=a.__importStar(t(107)),l=a.__importStar(t(18)),o=t(59);class c extends h.AreaView{_index_data(t){const{min:e,max:s}=Math,{data_size:i}=this;for(let n=0;n=0;e--)t.lineTo(s[e],i[e]);t.closePath(),n.call(t)}_render(t,e,s){const{sx1:i,sx2:n,sy:a}=null!=s?s:this;this.visuals.fill.doit&&(this.visuals.fill.set_value(t),this._inner(t,i,n,a,t.fill)),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(t),this._inner(t,i,n,a,t.fill))}_hit_point(t){const e=this.sy.length,s=new r.ScreenArray(2*e),i=new r.ScreenArray(2*e);for(let t=0,n=e;t({x1:[l.XCoordinateSpec,{field:\"x1\"}],x2:[l.XCoordinateSpec,{field:\"x2\"}],y:[l.YCoordinateSpec,{field:\"y\"}]})))}}s.HArea=d,d.__name__=\"HArea\",d.init_HArea()},\n function _(e,a,_,i,r){i();const s=e(1),n=e(98),t=e(106),c=s.__importStar(e(48));class l extends n.GlyphView{draw_legend_for_index(e,a,_){t.generic_area_scalar_legend(this.visuals,e,a)}}_.AreaView=l,l.__name__=\"AreaView\";class d extends n.Glyph{constructor(e){super(e)}static init_Area(){this.mixins([c.FillScalar,c.HatchScalar])}}_.Area=d,d.__name__=\"Area\",d.init_Area()},\n function _(t,e,s,i,n){i();const a=t(1),r=t(24),h=t(118),_=a.__importStar(t(107)),l=a.__importStar(t(18)),o=t(59);class c extends h.AreaView{_index_data(t){const{min:e,max:s}=Math,{data_size:i}=this;for(let n=0;n=0;s--)t.lineTo(e[s],i[s]);t.closePath(),n.call(t)}_render(t,e,s){const{sx:i,sy1:n,sy2:a}=null!=s?s:this;this.visuals.fill.doit&&(this.visuals.fill.set_value(t),this._inner(t,i,n,a,t.fill)),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(t),this._inner(t,i,n,a,t.fill))}scenterxy(t){return[this.sx[t],(this.sy1[t]+this.sy2[t])/2]}_hit_point(t){const e=this.sx.length,s=new r.ScreenArray(2*e),i=new r.ScreenArray(2*e);for(let t=0,n=e;t({x:[l.XCoordinateSpec,{field:\"x\"}],y1:[l.YCoordinateSpec,{field:\"y1\"}],y2:[l.YCoordinateSpec,{field:\"y2\"}]})))}}s.VArea=d,d.__name__=\"VArea\",d.init_VArea()},\n function _(i,e,s,t,n){t();const c=i(53),o=i(59),r=i(24),a=i(121),u=i(57);class _ extends c.Model{constructor(i){super(i)}static init_CDSView(){this.define((({Array:i,Ref:e})=>({filters:[i(e(a.Filter)),[]],source:[e(u.ColumnarDataSource)]}))),this.internal((({Int:i,Dict:e,Ref:s,Nullable:t})=>({indices:[s(r.Indices)],indices_map:[e(i),{}],masked:[t(s(r.Indices)),null]})))}initialize(){super.initialize(),this.compute_indices()}connect_signals(){super.connect_signals(),this.connect(this.properties.filters.change,(()=>this.compute_indices()));const i=()=>{const i=()=>this.compute_indices();null!=this.source&&(this.connect(this.source.change,i),this.source instanceof u.ColumnarDataSource&&(this.connect(this.source.streaming,i),this.connect(this.source.patching,i)))};let e=null!=this.source;e?i():this.connect(this.properties.source.change,(()=>{e||(i(),e=!0)}))}compute_indices(){var i;const{source:e}=this;if(null==e)return;const s=null!==(i=e.get_length())&&void 0!==i?i:1,t=r.Indices.all_set(s);for(const i of this.filters)t.intersect(i.compute_indices(e));this.indices=t,this._indices=[...t],this.indices_map_to_subset()}indices_map_to_subset(){this.indices_map={};for(let i=0;ithis._indices[i]));return new o.Selection(Object.assign(Object.assign({},i.attributes),{indices:e}))}convert_selection_to_subset(i){const e=i.indices.map((i=>this.indices_map[i]));return new o.Selection(Object.assign(Object.assign({},i.attributes),{indices:e}))}convert_indices_from_subset(i){return i.map((i=>this._indices[i]))}}s.CDSView=_,_.__name__=\"CDSView\",_.init_CDSView()},\n function _(e,t,n,s,c){s();const o=e(53);class r extends o.Model{constructor(e){super(e)}}n.Filter=r,r.__name__=\"Filter\"},\n function _(n,e,t,i,o){i();const s=n(9);async function c(n,e,t){const i=new n(Object.assign(Object.assign({},t),{model:e}));return i.initialize(),await i.lazy_initialize(),i}t.build_view=async function(n,e={parent:null},t=(n=>n.default_view)){const i=await c(t(n),n,e);return i.connect_signals(),i},t.build_views=async function(n,e,t={parent:null},i=(n=>n.default_view)){const o=s.difference([...n.keys()],e);for(const e of o)n.get(e).remove(),n.delete(e);const a=[],f=e.filter((e=>!n.has(e)));for(const e of f){const o=await c(i(e),e,t);n.set(e,o),a.push(o)}for(const n of a)n.connect_signals();return a},t.remove_views=function(n){for(const[e,t]of n)t.remove(),n.delete(e)}},\n function _(e,r,n,t,i){t();const s=e(62),o=e(61),l=e(124),d=e(125),a=e(126),p=e(122),_=e(64),h=e(127),c=e(128),u=e(11);class y extends s.DataRendererView{get glyph_view(){return this.node_view.glyph}async lazy_initialize(){await super.lazy_initialize();const e=this.model;let r=null,n=null;const t=new class extends l.Expression{_v_compute(n){u.assert(null==r);const[t]=r=e.layout_provider.get_edge_coordinates(n);return t}},i=new class extends l.Expression{_v_compute(e){u.assert(null!=r);const[,n]=r;return r=null,n}},s=new class extends l.Expression{_v_compute(r){u.assert(null==n);const[t]=n=e.layout_provider.get_node_coordinates(r);return t}},o=new class extends l.Expression{_v_compute(e){u.assert(null!=n);const[,r]=n;return n=null,r}},{edge_renderer:d,node_renderer:a}=this.model;if(!(d.glyph instanceof h.MultiLine||d.glyph instanceof c.Patches))throw new Error(`${this}.edge_renderer.glyph must be a MultiLine glyph`);if(!(a.glyph instanceof _.XYGlyph))throw new Error(`${this}.node_renderer.glyph must be a XYGlyph glyph`);d.glyph.properties.xs.internal=!0,d.glyph.properties.ys.internal=!0,a.glyph.properties.x.internal=!0,a.glyph.properties.y.internal=!0,d.glyph.xs={expr:t},d.glyph.ys={expr:i},a.glyph.x={expr:s},a.glyph.y={expr:o};const{parent:y}=this;this.edge_view=await p.build_view(d,{parent:y}),this.node_view=await p.build_view(a,{parent:y})}connect_signals(){super.connect_signals(),this.connect(this.model.layout_provider.change,(()=>{this.edge_view.set_data(),this.node_view.set_data(),this.request_render()}))}remove(){this.edge_view.remove(),this.node_view.remove(),super.remove()}_render(){this.edge_view.render(),this.node_view.render()}renderer_view(e){if(e instanceof o.GlyphRenderer){if(e==this.edge_view.model)return this.edge_view;if(e==this.node_view.model)return this.node_view}return super.renderer_view(e)}}n.GraphRendererView=y,y.__name__=\"GraphRendererView\";class g extends s.DataRenderer{constructor(e){super(e)}static init_GraphRenderer(){this.prototype.default_view=y,this.define((({Ref:e})=>({layout_provider:[e(d.LayoutProvider)],node_renderer:[e(o.GlyphRenderer)],edge_renderer:[e(o.GlyphRenderer)],selection_policy:[e(a.GraphHitTestPolicy),()=>new a.NodesOnly],inspection_policy:[e(a.GraphHitTestPolicy),()=>new a.NodesOnly]})))}get_selection_manager(){return this.node_renderer.data_source.selection_manager}}n.GraphRenderer=g,g.__name__=\"GraphRenderer\",g.init_GraphRenderer()},\n function _(e,t,s,n,i){n();const c=e(53);class l extends c.Model{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}v_compute(e){this._connected.has(e)||(this.connect(e.change,(()=>this._result.delete(e))),this.connect(e.patching,(()=>this._result.delete(e))),this.connect(e.streaming,(()=>this._result.delete(e))),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._v_compute(e),this._result.set(e,t)),t}}s.Expression=l,l.__name__=\"Expression\";class h extends c.Model{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}compute(e){this._connected.has(e)||(this.connect(e.change,(()=>this._result.delete(e))),this.connect(e.patching,(()=>this._result.delete(e))),this.connect(e.streaming,(()=>this._result.delete(e))),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._compute(e),this._result.set(e,t)),t}}s.ScalarExpression=h,h.__name__=\"ScalarExpression\"},\n function _(o,e,r,t,n){t();const s=o(53);class c extends s.Model{constructor(o){super(o)}}r.LayoutProvider=c,c.__name__=\"LayoutProvider\"},\n function _(e,t,d,n,s){n();const o=e(53),r=e(12),_=e(9),i=e(59);class c extends o.Model{constructor(e){super(e)}_hit_test(e,t,d){if(!t.model.visible)return null;const n=d.glyph.hit_test(e);return null==n?null:d.model.view.convert_selection_from_subset(n)}}d.GraphHitTestPolicy=c,c.__name__=\"GraphHitTestPolicy\";class a extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.edge_view)}do_selection(e,t,d,n){if(null==e)return!1;const s=t.edge_renderer.data_source.selected;return s.update(e,d,n),t.edge_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const{edge_renderer:o}=d.model,r=o.get_selection_manager().get_or_create_inspector(d.edge_view.model);return r.update(e,n,s),d.edge_view.model.data_source.setv({inspected:r},{silent:!0}),d.edge_view.model.data_source.inspect.emit([d.edge_view.model,{geometry:t}]),!r.is_empty()}}d.EdgesOnly=a,a.__name__=\"EdgesOnly\";class l extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.node_view)}do_selection(e,t,d,n){if(null==e)return!1;const s=t.node_renderer.data_source.selected;return s.update(e,d,n),t.node_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const{node_renderer:o}=d.model,r=o.get_selection_manager().get_or_create_inspector(d.node_view.model);return r.update(e,n,s),d.node_view.model.data_source.setv({inspected:r},{silent:!0}),d.node_view.model.data_source.inspect.emit([d.node_view.model,{geometry:t}]),!r.is_empty()}}d.NodesOnly=l,l.__name__=\"NodesOnly\";class u extends c{constructor(e){super(e)}hit_test(e,t){return this._hit_test(e,t,t.node_view)}get_linked_edges(e,t,d){let n=[];\"selection\"==d?n=e.selected.indices.map((t=>e.data.index[t])):\"inspection\"==d&&(n=e.inspected.indices.map((t=>e.data.index[t])));const s=[];for(let e=0;er.indexOf(e.data.index,t)));return new i.Selection({indices:o})}do_selection(e,t,d,n){if(null==e)return!1;const s=t.edge_renderer.data_source.selected;s.update(e,d,n);const o=t.node_renderer.data_source.selected,r=this.get_linked_nodes(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(r,d,n),t.edge_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,d,n,s){if(null==e)return!1;const o=d.edge_view.model.data_source.selection_manager.get_or_create_inspector(d.edge_view.model);o.update(e,n,s),d.edge_view.model.data_source.setv({inspected:o},{silent:!0});const r=d.node_view.model.data_source.selection_manager.get_or_create_inspector(d.node_view.model),_=this.get_linked_nodes(d.node_view.model.data_source,d.edge_view.model.data_source,\"inspection\");return r.update(_,n,s),d.node_view.model.data_source.setv({inspected:r},{silent:!0}),d.edge_view.model.data_source.inspect.emit([d.edge_view.model,{geometry:t}]),!o.is_empty()}}d.EdgesAndLinkedNodes=m,m.__name__=\"EdgesAndLinkedNodes\"},\n function _(t,e,i,s,n){s();const o=t(1),r=t(65),l=t(48),_=o.__importStar(t(107)),c=o.__importStar(t(18)),h=t(12),a=t(13),d=t(98),x=t(106),y=t(59);class g extends d.GlyphView{_project_data(){r.inplace.project_xy(this._xs.array,this._ys.array)}_index_data(t){const{data_size:e}=this;for(let i=0;i0&&o.set(t,i)}return new y.Selection({indices:[...o.keys()],multiline_indices:a.to_object(o)})}get_interpolation_hit(t,e,i){const s=this._xs.get(t),n=this._ys.get(t),o=s[e],r=n[e],l=s[e+1],_=n[e+1];return x.line_interpolation(this.renderer,i,o,r,l,_)}draw_legend_for_index(t,e,i){x.generic_line_vector_legend(this.visuals,t,e,i)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}i.MultiLineView=g,g.__name__=\"MultiLineView\";class u extends d.Glyph{constructor(t){super(t)}static init_MultiLine(){this.prototype.default_view=g,this.define((({})=>({xs:[c.XCoordinateSeqSpec,{field:\"xs\"}],ys:[c.YCoordinateSeqSpec,{field:\"ys\"}]}))),this.mixins(l.LineVector)}}i.MultiLine=u,u.__name__=\"MultiLine\",u.init_MultiLine()},\n function _(e,t,s,i,n){i();const r=e(1),o=e(98),a=e(106),_=e(12),c=e(48),l=r.__importStar(e(107)),h=r.__importStar(e(18)),d=e(59),y=e(11),p=e(65);class x extends o.GlyphView{_project_data(){p.inplace.project_xy(this._xs.array,this._ys.array)}_index_data(e){const{data_size:t}=this;for(let s=0;s({xs:[h.XCoordinateSeqSpec,{field:\"xs\"}],ys:[h.YCoordinateSeqSpec,{field:\"ys\"}]}))),this.mixins([c.LineVector,c.FillVector,c.HatchVector])}}s.Patches=f,f.__name__=\"Patches\",f.init_Patches()},\n function _(e,t,n,s,o){s();const r=e(53);class c extends r.Model{do_selection(e,t,n,s){return null!=e&&(t.selected.update(e,n,s),t._select.emit(),!t.selected.is_empty())}}n.SelectionPolicy=c,c.__name__=\"SelectionPolicy\";class l extends c{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!=t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_intersection(t);return e}return null}}n.IntersectRenderers=l,l.__name__=\"IntersectRenderers\";class _ extends c{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!=t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_union(t);return e}return null}}n.UnionRenderers=_,_.__name__=\"UnionRenderers\"},\n function _(t,n,e,s,o){s();const r=t(1),i=t(57),l=t(8),c=t(13),a=r.__importStar(t(131)),u=t(132),h=t(35);function d(t,n,e){if(l.isArray(t)){const s=t.concat(n);return null!=e&&s.length>e?s.slice(-e):s}if(l.isTypedArray(t)){const s=t.length+n.length;if(null!=e&&s>e){const o=s-e,r=t.length;let i;t.length({data:[t(n),{}]})))}stream(t,n,e){const{data:s}=this;for(const[e,o]of c.entries(t))s[e]=d(s[e],o,n);if(this.setv({data:s},{silent:!0}),this.streaming.emit(),null!=this.document){const s=new h.ColumnsStreamedEvent(this.document,this.ref(),t,n);this.document._notify_change(this,\"data\",null,null,{setter_id:e,hint:s})}}patch(t,n){const{data:e}=this;let s=new Set;for(const[n,o]of c.entries(t))s=u.union(s,m(e[n],o));if(this.setv({data:e},{silent:!0}),this.patching.emit([...s]),null!=this.document){const e=new h.ColumnsPatchedEvent(this.document,this.ref(),t);this.document._notify_change(this,\"data\",null,null,{setter_id:n,hint:e})}}}e.ColumnDataSource=_,_.__name__=\"ColumnDataSource\",_.init_ColumnDataSource()},\n function _(t,n,o,e,c){e(),o.concat=function(t,...n){let o=t.length;for(const t of n)o+=t.length;const e=new t.constructor(o);e.set(t,0);let c=t.length;for(const t of n)e.set(t,c),c+=t.length;return e}},\n function _(n,o,t,e,f){function c(...n){const o=new Set;for(const t of n)for(const n of t)o.add(n);return o}e(),t.union=c,t.intersection=function(n,...o){const t=new Set;n:for(const e of n){for(const n of o)if(!n.has(e))continue n;t.add(e)}return t},t.difference=function(n,...o){const t=new Set(n);for(const n of c(...o))t.delete(n);return t}},\n function _(e,i,t,s,o){s();const n=e(1),a=e(53),l=e(42),r=n.__importStar(e(45)),_=e(48),c=n.__importStar(e(18));class d extends l.View{initialize(){super.initialize(),this.visuals=new r.Visuals(this)}request_render(){this.parent.request_render()}get canvas(){return this.parent.canvas}set_data(e){const i=this;for(const t of this.model){if(!(t instanceof c.VectorSpec||t instanceof c.ScalarSpec))continue;const s=t.uniform(e);i[`${t.attr}`]=s}}}t.ArrowHeadView=d,d.__name__=\"ArrowHeadView\";class h extends a.Model{constructor(e){super(e)}static init_ArrowHead(){this.define((()=>({size:[c.NumberSpec,25]})))}}t.ArrowHead=h,h.__name__=\"ArrowHead\",h.init_ArrowHead();class v extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(0,0),e.lineTo(.5*t,t)}render(e,i){if(this.visuals.line.doit){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.stroke()}}}t.OpenHeadView=v,v.__name__=\"OpenHeadView\";class u extends h{constructor(e){super(e)}static init_OpenHead(){this.prototype.default_view=v,this.mixins(_.LineVector)}}t.OpenHead=u,u.__name__=\"OpenHead\",u.init_OpenHead();class m extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(.5*t,t)}render(e,i){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._normal(e,i),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._normal(e,i),e.stroke())}_normal(e,i){const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.closePath()}}t.NormalHeadView=m,m.__name__=\"NormalHeadView\";class T extends h{constructor(e){super(e)}static init_NormalHead(){this.prototype.default_view=m,this.mixins([_.LineVector,_.FillVector]),this.override({fill_color:\"black\"})}}t.NormalHead=T,T.__name__=\"NormalHead\",T.init_NormalHead();class p extends d{clip(e,i){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.moveTo(.5*t,t),e.lineTo(.5*t,-2),e.lineTo(-.5*t,-2),e.lineTo(-.5*t,t),e.lineTo(0,.5*t),e.lineTo(.5*t,t)}render(e,i){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._vee(e,i),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._vee(e,i),e.stroke())}_vee(e,i){const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,t),e.lineTo(0,0),e.lineTo(-.5*t,t),e.lineTo(0,.5*t),e.closePath()}}t.VeeHeadView=p,p.__name__=\"VeeHeadView\";class H extends h{constructor(e){super(e)}static init_VeeHead(){this.prototype.default_view=p,this.mixins([_.LineVector,_.FillVector]),this.override({fill_color:\"black\"})}}t.VeeHead=H,H.__name__=\"VeeHead\",H.init_VeeHead();class V extends d{render(e,i){if(this.visuals.line.doit){this.visuals.line.set_vectorize(e,i);const t=this.size.get(i);e.beginPath(),e.moveTo(.5*t,0),e.lineTo(-.5*t,0),e.stroke()}}clip(e,i){}}t.TeeHeadView=V,V.__name__=\"TeeHeadView\";class f extends h{constructor(e){super(e)}static init_TeeHead(){this.prototype.default_view=V,this.mixins(_.LineVector)}}t.TeeHead=f,f.__name__=\"TeeHead\",f.init_TeeHead()},\n function _(s,e,i,t,l){t();const _=s(1),o=s(135),r=_.__importStar(s(48));class h extends o.UpperLowerView{paint(s){s.beginPath(),s.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let e=0,i=this._lower_sx.length;e=0;e--)s.lineTo(this._upper_sx[e],this._upper_sy[e]);s.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(s),s.fill()),s.beginPath(),s.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let e=0,i=this._lower_sx.length;e({dimension:[n.Dimension,\"height\"],lower:[h,{field:\"lower\"}],upper:[h,{field:\"upper\"}],base:[h,{field:\"base\"}]})))}}i.UpperLower=d,d.__name__=\"UpperLower\",d.init_UpperLower()},\n function _(t,i,o,n,e){n();const s=t(1),l=t(40),a=s.__importStar(t(48)),r=t(20),h=t(99);o.EDGE_TOLERANCE=2.5;class u extends l.AnnotationView{constructor(){super(...arguments),this.bbox=new h.BBox}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_render(){const{left:t,right:i,top:o,bottom:n}=this.model;if(null==t&&null==i&&null==o&&null==n)return;const{frame:e}=this.plot_view,s=this.coordinates.x_scale,l=this.coordinates.y_scale,a=(t,i,o,n,e)=>{let s;return s=null!=t?this.model.screen?t:\"data\"==i?o.compute(t):n.compute(t):e,s};this.bbox=new h.BBox({left:a(t,this.model.left_units,s,e.bbox.xview,e.bbox.left),right:a(i,this.model.right_units,s,e.bbox.xview,e.bbox.right),top:a(o,this.model.top_units,l,e.bbox.yview,e.bbox.top),bottom:a(n,this.model.bottom_units,l,e.bbox.yview,e.bbox.bottom)}),this._paint_box()}_paint_box(){const{ctx:t}=this.layer;t.save();const{left:i,top:o,width:n,height:e}=this.bbox;t.beginPath(),t.rect(i,o,n,e),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_value(t),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.restore()}interactive_bbox(){const t=this.model.line_width+o.EDGE_TOLERANCE;return this.bbox.grow_by(t)}interactive_hit(t,i){if(null==this.model.in_cursor)return!1;return this.interactive_bbox().contains(t,i)}cursor(t,i){const{left:o,right:n,bottom:e,top:s}=this.bbox;return Math.abs(t-o)<3||Math.abs(t-n)<3?this.model.ew_cursor:Math.abs(i-e)<3||Math.abs(i-s)<3?this.model.ns_cursor:this.bbox.contains(t,i)?this.model.in_cursor:null}}o.BoxAnnotationView=u,u.__name__=\"BoxAnnotationView\";class c extends l.Annotation{constructor(t){super(t)}static init_BoxAnnotation(){this.prototype.default_view=u,this.mixins([a.Line,a.Fill,a.Hatch]),this.define((({Number:t,Nullable:i})=>({top:[i(t),null],top_units:[r.SpatialUnits,\"data\"],bottom:[i(t),null],bottom_units:[r.SpatialUnits,\"data\"],left:[i(t),null],left_units:[r.SpatialUnits,\"data\"],right:[i(t),null],right_units:[r.SpatialUnits,\"data\"],render_mode:[r.RenderMode,\"canvas\"]}))),this.internal((({Boolean:t,String:i,Nullable:o})=>({screen:[t,!1],ew_cursor:[o(i),null],ns_cursor:[o(i),null],in_cursor:[o(i),null]}))),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}update({left:t,right:i,top:o,bottom:n}){this.setv({left:t,right:i,top:o,bottom:n,screen:!0})}}o.BoxAnnotation=c,c.__name__=\"BoxAnnotation\",c.init_BoxAnnotation()},\n function _(t,e,i,a,n){a();const o=t(1),r=t(40),s=t(138),l=t(144),_=t(162),c=t(165),h=t(198),u=t(166),p=t(205),m=t(169),g=t(203),d=t(202),f=t(209),w=t(217),b=t(220),v=t(20),y=o.__importStar(t(48)),k=t(9),x=t(221),C=t(222),j=t(225),z=t(140),L=t(11),S=t(122),M=t(8);class T extends r.AnnotationView{get orientation(){return this._orientation}initialize(){super.initialize();const{ticker:t,formatter:e,color_mapper:i}=this.model;this._ticker=\"auto\"!=t?t:(()=>{switch(!0){case i instanceof f.LogColorMapper:return new h.LogTicker;case i instanceof f.ScanningColorMapper:return new h.BinnedTicker({mapper:i});case i instanceof f.CategoricalColorMapper:return new h.CategoricalTicker;default:return new h.BasicTicker}})(),this._formatter=\"auto\"!=e?e:(()=>{switch(!0){case this._ticker instanceof h.LogTicker:return new p.LogTickFormatter;case i instanceof f.CategoricalColorMapper:return new p.CategoricalTickFormatter;default:return new p.BasicTickFormatter}})(),this._major_range=(()=>{if(i instanceof f.CategoricalColorMapper){const{factors:t}=i;return new b.FactorRange({factors:t})}if(i instanceof d.ContinuousColorMapper){const{min:t,max:e}=i.metrics;return new b.Range1d({start:t,end:e})}L.unreachable()})(),this._major_scale=(()=>{if(i instanceof f.LinearColorMapper)return new w.LinearScale;if(i instanceof f.LogColorMapper)return new w.LogScale;if(i instanceof f.ScanningColorMapper){const{binning:t}=i.metrics;return new w.LinearInterpolationScale({binning:t})}if(i instanceof f.CategoricalColorMapper)return new w.CategoricalScale;L.unreachable()})(),this._minor_range=new b.Range1d({start:0,end:1}),this._minor_scale=new w.LinearScale;const a=y.attrs_of(this.model,\"major_label_\",y.Text,!0),n=y.attrs_of(this.model,\"major_tick_\",y.Line,!0),o=y.attrs_of(this.model,\"minor_tick_\",y.Line,!0),r=y.attrs_of(this.model,\"title_\",y.Text),l=i instanceof f.CategoricalColorMapper?_.CategoricalAxis:i instanceof f.LogColorMapper?_.LogAxis:_.LinearAxis;this._axis=new l(Object.assign(Object.assign(Object.assign({ticker:this._ticker,formatter:this._formatter,major_tick_in:this.model.major_tick_in,major_tick_out:this.model.major_tick_out,minor_tick_in:this.model.minor_tick_in,minor_tick_out:this.model.minor_tick_out,major_label_standoff:this.model.label_standoff,major_label_overrides:this.model.major_label_overrides,major_label_policy:this.model.major_label_policy,axis_line_color:null},a),n),o));const{title:c}=this.model;c&&(this._title=new s.Title(Object.assign({text:c,standoff:this.model.title_standoff},r)))}async lazy_initialize(){await super.lazy_initialize();const t=this,e={get parent(){return t.parent},get root(){return t.root},get frame(){return t._frame},get canvas_view(){return t.parent.canvas_view},request_layout(){t.parent.request_layout()}};this._axis_view=await S.build_view(this._axis,{parent:e}),null!=this._title&&(this._title_view=await S.build_view(this._title,{parent:e}))}remove(){var t;null===(t=this._title_view)||void 0===t||t.remove(),this._axis_view.remove(),super.remove()}connect_signals(){super.connect_signals(),this.connect(this._ticker.change,(()=>this.request_render())),this.connect(this._formatter.change,(()=>this.request_render())),this.connect(this.model.color_mapper.metrics_change,(()=>{const t=this._major_range,e=this._major_scale,{color_mapper:i}=this.model;if(i instanceof d.ContinuousColorMapper&&t instanceof b.Range1d){const{min:e,max:a}=i.metrics;t.setv({start:e,end:a})}if(i instanceof f.ScanningColorMapper&&e instanceof w.LinearInterpolationScale){const{binning:t}=i.metrics;e.binning=t}this._set_canvas_image(),this.plot_view.request_layout()}))}_set_canvas_image(){const{orientation:t}=this,e=(()=>{const{palette:e}=this.model.color_mapper;return\"vertical\"==t?k.reversed(e):e})(),[i,a]=\"vertical\"==t?[1,e.length]:[e.length,1],n=this._image=document.createElement(\"canvas\");n.width=i,n.height=a;const o=n.getContext(\"2d\"),r=o.getImageData(0,0,i,a),s=new f.LinearColorMapper({palette:e}).rgba_mapper.v_compute(k.range(0,e.length));r.data.set(s),o.putImageData(r,0,0)}update_layout(){const{location:t,width:e,height:i,padding:a,margin:n}=this.model,[o,r]=(()=>{if(!M.isString(t))return[\"end\",\"start\"];switch(t){case\"top_left\":return[\"start\",\"start\"];case\"top\":case\"top_center\":return[\"start\",\"center\"];case\"top_right\":return[\"start\",\"end\"];case\"bottom_left\":return[\"end\",\"start\"];case\"bottom\":case\"bottom_center\":return[\"end\",\"center\"];case\"bottom_right\":return[\"end\",\"end\"];case\"left\":case\"center_left\":return[\"center\",\"start\"];case\"center\":case\"center_center\":return[\"center\",\"center\"];case\"right\":case\"center_right\":return[\"center\",\"end\"]}})(),s=this._orientation=(()=>{const{orientation:t}=this.model;return\"auto\"==t?null!=this.panel?this.panel.is_horizontal?\"horizontal\":\"vertical\":\"start\"==r||\"end\"==r||\"center\"==r&&\"center\"==o?\"vertical\":\"horizontal\":t})(),_=new C.NodeLayout,c=new C.VStack,h=new C.VStack,u=new C.HStack,p=new C.HStack;_.absolute=!0,c.absolute=!0,h.absolute=!0,u.absolute=!0,p.absolute=!0;const[m,g,d,f]=(()=>\"horizontal\"==s?[this._major_scale,this._minor_scale,this._major_range,this._minor_range]:[this._minor_scale,this._major_scale,this._minor_range,this._major_range])();this._frame=new l.CartesianFrame(m,g,d,f),_.on_resize((t=>this._frame.set_geometry(t)));const w=new j.BorderLayout;this._inner_layout=w,w.absolute=!0,w.center_panel=_,w.top_panel=c,w.bottom_panel=h,w.left_panel=u,w.right_panel=p;const b={left:a,right:a,top:a,bottom:a},v=(()=>{if(null==this.panel){if(M.isString(t))return{left:n,right:n,top:n,bottom:n};{const[e,i]=t;return{left:e,right:n,top:n,bottom:i}}}if(!M.isString(t)){const[e,i]=t;return{left:e,right:0,top:0,bottom:i}}})();let y,k,L,S;if(w.padding=b,null!=this.panel?(y=\"max\",k=void 0,L=void 0,S=void 0):\"auto\"==(\"horizontal\"==s?e:i)?(y=\"fixed\",k=25*this.model.color_mapper.palette.length,L={percent:.3},S={percent:.8}):(y=\"fit\",k=void 0),\"horizontal\"==s){const t=\"auto\"==e?void 0:e,a=\"auto\"==i?25:i;w.set_sizing({width_policy:y,height_policy:\"min\",width:k,min_width:L,max_width:S,halign:r,valign:o,margin:v}),w.center_panel.set_sizing({width_policy:\"auto\"==e?\"fit\":\"fixed\",height_policy:\"fixed\",width:t,height:a})}else{const t=\"auto\"==e?25:e,a=\"auto\"==i?void 0:i;w.set_sizing({width_policy:\"min\",height_policy:y,height:k,min_height:L,max_height:S,halign:r,valign:o,margin:v}),w.center_panel.set_sizing({width_policy:\"fixed\",height_policy:\"auto\"==i?\"fit\":\"fixed\",width:t,height:a})}c.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),h.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),u.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),p.set_sizing({width_policy:\"min\",height_policy:\"fit\"});const{_title_view:T}=this;null!=T&&(\"horizontal\"==s?(T.panel=new z.Panel(\"above\"),T.update_layout(),c.children.push(T.layout)):(T.panel=new z.Panel(\"left\"),T.update_layout(),u.children.push(T.layout)));const{panel:B}=this,A=null!=B&&s==B.orientation?B.side:\"horizontal\"==s?\"below\":\"right\",O=(()=>{switch(A){case\"above\":return c;case\"below\":return h;case\"left\":return u;case\"right\":return p}})(),{_axis_view:R}=this;if(R.panel=new z.Panel(A),R.update_layout(),O.children.push(R.layout),null!=this.panel){const t=new x.Grid([{layout:w,row:0,col:0}]);t.absolute=!0,\"horizontal\"==s?t.set_sizing({width_policy:\"max\",height_policy:\"min\"}):t.set_sizing({width_policy:\"min\",height_policy:\"max\"}),this.layout=t}else this.layout=this._inner_layout;const{visible:F}=this.model;this.layout.sizing.visible=F,this._set_canvas_image()}_render(){var t;const{ctx:e}=this.layer;e.save(),this._paint_bbox(e,this._inner_layout.bbox),this._paint_image(e,this._inner_layout.center_panel.bbox),null===(t=this._title_view)||void 0===t||t.render(),this._axis_view.render(),e.restore()}_paint_bbox(t,e){const{x:i,y:a}=e;let{width:n,height:o}=e;i+n>=this.parent.canvas_view.bbox.width&&(n-=1),a+o>=this.parent.canvas_view.bbox.height&&(o-=1),t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(i,a,n,o)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(i,a,n,o)),t.restore()}_paint_image(t,e){const{x:i,y:a,width:n,height:o}=e;t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this._image,i,a,n,o),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(i,a,n,o)),t.restore()}serializable_state(){const t=super.serializable_state(),{children:e=[]}=t,i=o.__rest(t,[\"children\"]);return null!=this._title_view&&e.push(this._title_view.serializable_state()),e.push(this._axis_view.serializable_state()),Object.assign(Object.assign({},i),{children:e})}}i.ColorBarView=T,T.__name__=\"ColorBarView\";class B extends r.Annotation{constructor(t){super(t)}static init_ColorBar(){this.prototype.default_view=T,this.mixins([[\"major_label_\",y.Text],[\"title_\",y.Text],[\"major_tick_\",y.Line],[\"minor_tick_\",y.Line],[\"border_\",y.Line],[\"bar_\",y.Line],[\"background_\",y.Fill]]),this.define((({Alpha:t,Number:e,String:i,Tuple:a,Dict:n,Or:o,Ref:r,Auto:s,Nullable:l})=>({location:[o(v.Anchor,a(e,e)),\"top_right\"],orientation:[o(v.Orientation,s),\"auto\"],title:[l(i),null],title_standoff:[e,2],width:[o(e,s),\"auto\"],height:[o(e,s),\"auto\"],scale_alpha:[t,1],ticker:[o(r(c.Ticker),s),\"auto\"],formatter:[o(r(u.TickFormatter),s),\"auto\"],major_label_overrides:[n(i),{}],major_label_policy:[r(m.LabelingPolicy),()=>new m.NoOverlap],color_mapper:[r(g.ColorMapper)],label_standoff:[e,5],margin:[e,30],padding:[e,10],major_tick_in:[e,5],major_tick_out:[e,0],minor_tick_in:[e,0],minor_tick_out:[e,0]}))),this.override({background_fill_color:\"#ffffff\",background_fill_alpha:.95,bar_line_color:null,border_line_color:null,major_label_text_font_size:\"11px\",major_tick_line_color:\"#ffffff\",minor_tick_line_color:null,title_text_font_size:\"13px\",title_text_font_style:\"italic\"})}}i.ColorBar=B,B.__name__=\"ColorBar\",B.init_ColorBar()},\n function _(t,e,i,s,l){s();const o=t(1),a=t(139),n=t(20),r=t(143),c=o.__importStar(t(48));class h extends a.TextAnnotationView{_get_location(){const t=this.model.offset,e=this.model.standoff/2;let i,s;const{bbox:l}=this.layout;switch(this.panel.side){case\"above\":case\"below\":switch(this.model.vertical_align){case\"top\":s=l.top+e;break;case\"middle\":s=l.vcenter;break;case\"bottom\":s=l.bottom-e}switch(this.model.align){case\"left\":i=l.left+t;break;case\"center\":i=l.hcenter;break;case\"right\":i=l.right-t}break;case\"left\":switch(this.model.vertical_align){case\"top\":i=l.left+e;break;case\"middle\":i=l.hcenter;break;case\"bottom\":i=l.right-e}switch(this.model.align){case\"left\":s=l.bottom-t;break;case\"center\":s=l.vcenter;break;case\"right\":s=l.top+t}break;case\"right\":switch(this.model.vertical_align){case\"top\":i=l.right-e;break;case\"middle\":i=l.hcenter;break;case\"bottom\":i=l.left+e}switch(this.model.align){case\"left\":s=l.top+t;break;case\"center\":s=l.vcenter;break;case\"right\":s=l.bottom-t}}return[i,s]}_render(){const{text:t}=this.model;if(null==t||0==t.length)return;this.model.text_baseline=this.model.vertical_align,this.model.text_align=this.model.align;const[e,i]=this._get_location(),s=this.panel.get_label_angle_heuristic(\"parallel\");(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,t,e,i,s)}_get_size(){const{text:t}=this.model;if(null==t||0==t.length)return{width:0,height:0};{const{ctx:e}=this.layer;this.visuals.text.set_value(e);const{width:i}=this.layer.ctx.measureText(t),{height:s}=r.font_metrics(e.font);return{width:i,height:2+s*this.model.text_line_height+this.model.standoff}}}}i.TitleView=h,h.__name__=\"TitleView\";class _ extends a.TextAnnotation{constructor(t){super(t)}static init_Title(){this.prototype.default_view=h,this.mixins([c.Text,[\"border_\",c.Line],[\"background_\",c.Fill]]),this.define((({Number:t,String:e})=>({text:[e,\"\"],vertical_align:[n.VerticalAlign,\"bottom\"],align:[n.TextAlign,\"left\"],offset:[t,0],standoff:[t,10]}))),this.prototype._props.text_align.options.internal=!0,this.prototype._props.text_baseline.options.internal=!0,this.override({text_font_size:\"13px\",text_font_style:\"bold\",text_line_height:1,background_fill_color:null,border_line_color:null})}}i.Title=_,_.__name__=\"Title\",_.init_Title()},\n function _(e,t,s,i,n){i();const l=e(40),a=e(43),o=e(20),r=e(140),d=e(143),c=e(11);class _ extends l.AnnotationView{update_layout(){const{panel:e}=this;this.layout=null!=e?new r.SideLayout(e,(()=>this.get_size()),!0):void 0}initialize(){super.initialize(),\"css\"==this.model.render_mode&&(this.el=a.div(),this.plot_view.canvas_view.add_overlay(this.el))}remove(){null!=this.el&&a.remove(this.el),super.remove()}connect_signals(){super.connect_signals(),\"css\"==this.model.render_mode?this.connect(this.model.change,(()=>this.render())):this.connect(this.model.change,(()=>this.request_render()))}render(){this.model.visible||\"css\"!=this.model.render_mode||a.undisplay(this.el),super.render()}_calculate_text_dimensions(e,t){const{width:s}=e.measureText(t),{height:i}=d.font_metrics(this.visuals.text.font_value());return[s,i]}_calculate_bounding_box_dimensions(e,t){const[s,i]=this._calculate_text_dimensions(e,t);let n,l;switch(e.textAlign){case\"left\":n=0;break;case\"center\":n=-s/2;break;case\"right\":n=-s;break;default:c.unreachable()}switch(e.textBaseline){case\"top\":l=0;break;case\"middle\":l=-.5*i;break;case\"bottom\":l=-1*i;break;case\"alphabetic\":l=-.8*i;break;case\"hanging\":l=-.17*i;break;case\"ideographic\":l=-.83*i;break;default:c.unreachable()}return[n,l,s,i]}_canvas_text(e,t,s,i,n){this.visuals.text.set_value(e);const l=this._calculate_bounding_box_dimensions(e,t);e.save(),e.beginPath(),e.translate(s,i),n&&e.rotate(n),e.rect(l[0],l[1],l[2],l[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(e),e.fillText(t,0,0)),e.restore()}_css_text(e,t,s,i,n){const{el:l}=this;c.assert(null!=l),a.undisplay(l),this.visuals.text.set_value(e);const[o,r]=this._calculate_bounding_box_dimensions(e,t);l.style.position=\"absolute\",l.style.left=`${s+o}px`,l.style.top=`${i+r}px`,l.style.color=e.fillStyle,l.style.font=e.font,l.style.lineHeight=\"normal\",n&&(l.style.transform=`rotate(${n}rad)`),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),l.style.backgroundColor=e.fillStyle),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),l.style.borderStyle=e.lineDash.length<2?\"solid\":\"dashed\",l.style.borderWidth=`${e.lineWidth}px`,l.style.borderColor=e.strokeStyle),l.textContent=t,a.display(l)}}s.TextAnnotationView=_,_.__name__=\"TextAnnotationView\";class u extends l.Annotation{constructor(e){super(e)}static init_TextAnnotation(){this.define((()=>({render_mode:[o.RenderMode,\"canvas\"]})))}}s.TextAnnotation=u,u.__name__=\"TextAnnotation\",u.init_TextAnnotation()},\n function _(t,e,i,l,r){l();const a=t(141),o=t(142),n=t(8),h=Math.PI/2,s={above:{parallel:0,normal:-h,horizontal:0,vertical:-h},below:{parallel:0,normal:h,horizontal:0,vertical:h},left:{parallel:-h,normal:0,horizontal:0,vertical:-h},right:{parallel:h,normal:0,horizontal:0,vertical:h}},c={above:{parallel:\"bottom\",normal:\"center\",horizontal:\"bottom\",vertical:\"center\"},below:{parallel:\"top\",normal:\"center\",horizontal:\"top\",vertical:\"center\"},left:{parallel:\"bottom\",normal:\"center\",horizontal:\"center\",vertical:\"bottom\"},right:{parallel:\"bottom\",normal:\"center\",horizontal:\"center\",vertical:\"bottom\"}},g={above:{parallel:\"center\",normal:\"left\",horizontal:\"center\",vertical:\"left\"},below:{parallel:\"center\",normal:\"left\",horizontal:\"center\",vertical:\"left\"},left:{parallel:\"center\",normal:\"right\",horizontal:\"right\",vertical:\"center\"},right:{parallel:\"center\",normal:\"left\",horizontal:\"left\",vertical:\"center\"}},_={above:\"right\",below:\"left\",left:\"right\",right:\"left\"},b={above:\"left\",below:\"right\",left:\"right\",right:\"left\"};class z{constructor(t){this.side=t}get dimension(){return\"above\"==this.side||\"below\"==this.side?0:1}get normals(){switch(this.side){case\"above\":return[0,-1];case\"below\":return[0,1];case\"left\":return[-1,0];case\"right\":return[1,0]}}get orientation(){return this.is_horizontal?\"horizontal\":\"vertical\"}get is_horizontal(){return 0==this.dimension}get is_vertical(){return 1==this.dimension}get_label_text_heuristics(t){const{side:e}=this;return n.isString(t)?{vertical_align:c[e][t],align:g[e][t]}:{vertical_align:\"center\",align:(t<0?_:b)[e]}}get_label_angle_heuristic(t){return n.isString(t)?s[this.side][t]:-t}}i.Panel=z,z.__name__=\"Panel\";class m extends o.ContentLayoutable{constructor(t,e,i=!1){super(),this.panel=t,this.get_size=e,this.rotate=i,this.panel.is_horizontal?this.set_sizing({width_policy:\"max\",height_policy:\"fixed\"}):this.set_sizing({width_policy:\"fixed\",height_policy:\"max\"})}_content_size(){const{width:t,height:e}=this.get_size();return!this.rotate||this.panel.is_horizontal?new a.Sizeable({width:t,height:e}):new a.Sizeable({width:e,height:t})}has_size_changed(){const{width:t,height:e}=this._content_size();return this.panel.is_horizontal?this.bbox.height!=e:this.bbox.width!=t}}i.SideLayout=m,m.__name__=\"SideLayout\"},\n function _(h,t,i,e,w){e();const n=h(21),{min:d,max:s}=Math;class g{constructor(h={}){this.width=null!=h.width?h.width:0,this.height=null!=h.height?h.height:0}bounded_to({width:h,height:t}){return new g({width:this.width==1/0&&null!=h?h:this.width,height:this.height==1/0&&null!=t?t:this.height})}expanded_to({width:h,height:t}){return new g({width:h!=1/0?s(this.width,h):this.width,height:t!=1/0?s(this.height,t):this.height})}expand_to({width:h,height:t}){this.width=s(this.width,h),this.height=s(this.height,t)}narrowed_to({width:h,height:t}){return new g({width:d(this.width,h),height:d(this.height,t)})}narrow_to({width:h,height:t}){this.width=d(this.width,h),this.height=d(this.height,t)}grow_by({left:h,right:t,top:i,bottom:e}){const w=this.width+h+t,n=this.height+i+e;return new g({width:w,height:n})}shrink_by({left:h,right:t,top:i,bottom:e}){const w=s(this.width-h-t,0),n=s(this.height-i-e,0);return new g({width:w,height:n})}map(h,t){return new g({width:h(this.width),height:(null!=t?t:h)(this.height)})}}i.Sizeable=g,g.__name__=\"Sizeable\",i.SizingPolicy=n.Enum(\"fixed\",\"fit\",\"min\",\"max\")},\n function _(i,t,h,e,n){e();const s=i(141),r=i(99),g=i(8),{min:l,max:a,round:_}=Math;class o{constructor(){this.absolute=!1,this._bbox=new r.BBox,this._inner_bbox=new r.BBox,this._dirty=!1,this._handlers=[]}*[Symbol.iterator](){}get bbox(){return this._bbox}get inner_bbox(){return this._inner_bbox}get sizing(){return this._sizing}set visible(i){this._sizing.visible=i,this._dirty=!0}set_sizing(i){var t,h,e,n,s;const r=null!==(t=i.width_policy)&&void 0!==t?t:\"fit\",g=i.width,l=i.min_width,a=i.max_width,_=null!==(h=i.height_policy)&&void 0!==h?h:\"fit\",o=i.height,d=i.min_height,u=i.max_height,c=i.aspect,w=null!==(e=i.margin)&&void 0!==e?e:{top:0,right:0,bottom:0,left:0},m=!1!==i.visible,x=null!==(n=i.halign)&&void 0!==n?n:\"start\",b=null!==(s=i.valign)&&void 0!==s?s:\"start\";this._sizing={width_policy:r,min_width:l,width:g,max_width:a,height_policy:_,min_height:d,height:o,max_height:u,aspect:c,margin:w,visible:m,halign:x,valign:b,size:{width:g,height:o}},this._init()}_init(){}_set_geometry(i,t){this._bbox=i,this._inner_bbox=t}set_geometry(i,t){this._set_geometry(i,null!=t?t:i);for(const i of this._handlers)i(this._bbox,this._inner_bbox)}on_resize(i){this._handlers.push(i)}is_width_expanding(){return\"max\"==this.sizing.width_policy}is_height_expanding(){return\"max\"==this.sizing.height_policy}apply_aspect(i,{width:t,height:h}){const{aspect:e}=this.sizing;if(null!=e){const{width_policy:n,height_policy:s}=this.sizing,r=(i,t)=>{const h={max:4,fit:3,min:2,fixed:1};return h[i]>h[t]};if(\"fixed\"!=n&&\"fixed\"!=s)if(n==s){const n=t,s=_(t/e),r=_(h*e),g=h;Math.abs(i.width-n)+Math.abs(i.height-s)<=Math.abs(i.width-r)+Math.abs(i.height-g)?(t=n,h=s):(t=r,h=g)}else r(n,s)?h=_(t/e):t=_(h*e);else\"fixed\"==n?h=_(t/e):\"fixed\"==s&&(t=_(h*e))}return{width:t,height:h}}measure(i){if(!this.sizing.visible)return{width:0,height:0};const t=new s.Sizeable(i).shrink_by(this.sizing.margin).map((i=>i==1/0&&\"fixed\"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:i),(i=>i==1/0&&\"fixed\"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:i)),h=this._measure(t),e=this.clip_size(h,t),n=this.apply_aspect(t,e);return Object.assign(Object.assign({},h),n)}compute(i={}){const t={width:null!=i.width&&this.is_width_expanding()?i.width:1/0,height:null!=i.height&&this.is_height_expanding()?i.height:1/0},h=this.measure(t),{width:e,height:n}=h,s=new r.BBox({left:0,top:0,width:e,height:n});let g;if(null!=h.inner){const{left:i,top:t,right:s,bottom:l}=h.inner;g=new r.BBox({left:i,top:t,right:e-s,bottom:n-l})}this.set_geometry(s,g)}get xview(){return this.bbox.xview}get yview(){return this.bbox.yview}clip_size(i,t){function h(i,t,h,e){return null==h?h=0:g.isNumber(h)||(h=Math.round(h.percent*t)),null==e?e=1/0:g.isNumber(e)||(e=Math.round(e.percent*t)),a(h,l(i,e))}return{width:h(i.width,t.width,this.sizing.min_width,this.sizing.max_width),height:h(i.height,t.height,this.sizing.min_height,this.sizing.max_height)}}has_size_changed(){const{_dirty:i}=this;return this._dirty=!1,i}}h.Layoutable=o,o.__name__=\"Layoutable\";class d extends o{_measure(i){const{width_policy:t,height_policy:h}=this.sizing;return{width:(()=>{const{width:h}=this.sizing;if(i.width==1/0)return null!=h?h:0;switch(t){case\"fixed\":return null!=h?h:0;case\"min\":return null!=h?l(i.width,h):0;case\"fit\":return null!=h?l(i.width,h):i.width;case\"max\":return null!=h?a(i.width,h):i.width}})(),height:(()=>{const{height:t}=this.sizing;if(i.height==1/0)return null!=t?t:0;switch(h){case\"fixed\":return null!=t?t:0;case\"min\":return null!=t?l(i.height,t):0;case\"fit\":return null!=t?l(i.height,t):i.height;case\"max\":return null!=t?a(i.height,t):i.height}})()}}}h.LayoutItem=d,d.__name__=\"LayoutItem\";class u extends o{_measure(i){const t=this._content_size(),h=i.bounded_to(this.sizing.size).bounded_to(t);return{width:(()=>{switch(this.sizing.width_policy){case\"fixed\":return null!=this.sizing.width?this.sizing.width:t.width;case\"min\":return t.width;case\"fit\":return h.width;case\"max\":return Math.max(t.width,h.width)}})(),height:(()=>{switch(this.sizing.height_policy){case\"fixed\":return null!=this.sizing.height?this.sizing.height:t.height;case\"min\":return t.height;case\"fit\":return h.height;case\"max\":return Math.max(t.height,h.height)}})()}}}h.ContentLayoutable=u,u.__name__=\"ContentLayoutable\"},\n function _(t,e,n,r,a){r();const l=t(11),c=(()=>{try{return\"undefined\"!=typeof OffscreenCanvas&&null!=new OffscreenCanvas(0,0).getContext(\"2d\")}catch(t){return!1}})()?(t,e)=>new OffscreenCanvas(t,e):(t,e)=>{const n=document.createElement(\"canvas\");return n.width=t,n.height=e,n},o=(()=>{const t=c(0,0).getContext(\"2d\");return e=>{t.font=e;const n=t.measureText(\"M\"),r=t.measureText(\"x\"),a=t.measureText(\"ÅŚg|\"),c=a.fontBoundingBoxAscent,o=a.fontBoundingBoxDescent;if(null!=c&&null!=o)return{height:c+o,ascent:c,descent:o,cap_height:n.actualBoundingBoxAscent,x_height:r.actualBoundingBoxAscent};const s=a.actualBoundingBoxAscent,u=a.actualBoundingBoxDescent;if(null!=s&&null!=u)return{height:s+u,ascent:s,descent:u,cap_height:n.actualBoundingBoxAscent,x_height:r.actualBoundingBoxAscent};l.unreachable()}})(),s=(()=>{const t=c(0,0).getContext(\"2d\");return(e,n)=>{t.font=n;const r=t.measureText(e),a=r.actualBoundingBoxAscent,c=r.actualBoundingBoxDescent;if(null!=a&&null!=c)return{width:r.width,height:a+c,ascent:a,descent:c};l.unreachable()}})(),u=(()=>{const t=document.createElement(\"canvas\"),e=t.getContext(\"2d\");let n=-1,r=-1;return(a,l=1)=>{e.font=a;const{width:c}=e.measureText(\"M\"),o=c*l,s=Math.ceil(o),u=Math.ceil(2*o),i=Math.ceil(1.5*o);n{let e=0;for(let n=0;n<=i;n++)for(let r=0;r{let e=t.length-4;for(let n=u;n>=i;n--)for(let r=0;r{const t=document.createElement(\"canvas\"),e=t.getContext(\"2d\");let n=-1,r=-1;return(a,l,c=1)=>{e.font=l;const{width:o}=e.measureText(\"M\"),s=o*c,u=Math.ceil(s),i=Math.ceil(2*s),f=Math.ceil(1.5*s);(n{let e=0;for(let n=0;n<=f;n++)for(let r=0;r{let e=t.length-4;for(let n=i;n>=f;n--)for(let r=0;r{try{return o(\"normal 10px sans-serif\"),o}catch(t){return u}})(),h=(()=>{try{return s(\"A\",\"normal 10px sans-serif\"),s}catch(t){return i}})(),g=new Map;function d(t){let e=g.get(t);return null==e&&(e={font:f(t),glyphs:new Map},g.set(t,e)),e.font}n.font_metrics=d,n.glyph_metrics=function(t,e){let n=g.get(e);null==n&&(d(e),n=g.get(e));let r=n.glyphs.get(t);return null==r&&(r=h(t,e),n.glyphs.set(t,r)),r}},\n function _(e,t,s,_,a){_();const r=e(145),n=e(157),g=e(156),i=e(159),c=e(104),h=e(99),o=e(13),l=e(11);class x{constructor(e,t,s,_,a={},r={}){this.in_x_scale=e,this.in_y_scale=t,this.x_range=s,this.y_range=_,this.extra_x_ranges=a,this.extra_y_ranges=r,this._bbox=new h.BBox,l.assert(null==e.source_range&&null==e.target_range),l.assert(null==t.source_range&&null==t.target_range),this._configure_scales()}get bbox(){return this._bbox}_get_ranges(e,t){return new Map(o.entries(Object.assign(Object.assign({},t),{default:e})))}_get_scales(e,t,s){const _=new Map;for(const[a,g]of t){if(g instanceof c.FactorRange!=e instanceof r.CategoricalScale)throw new Error(`Range ${g.type} is incompatible is Scale ${e.type}`);e instanceof n.LogScale&&g instanceof i.DataRange1d&&(g.scale_hint=\"log\");const t=e.clone();t.setv({source_range:g,target_range:s}),_.set(a,t)}return _}_configure_frame_ranges(){const{bbox:e}=this;this._x_target=new g.Range1d({start:e.left,end:e.right}),this._y_target=new g.Range1d({start:e.bottom,end:e.top})}_configure_scales(){this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._x_scales=this._get_scales(this.in_x_scale,this._x_ranges,this._x_target),this._y_scales=this._get_scales(this.in_y_scale,this._y_ranges,this._y_target)}_update_scales(){this._configure_frame_ranges();for(const[,e]of this._x_scales)e.target_range=this._x_target;for(const[,e]of this._y_scales)e.target_range=this._y_target}set_geometry(e){this._bbox=e,this._update_scales()}get x_target(){return this._x_target}get y_target(){return this._y_target}get x_ranges(){return this._x_ranges}get y_ranges(){return this._y_ranges}get x_scales(){return this._x_scales}get y_scales(){return this._y_scales}get x_scale(){return this._x_scales.get(\"default\")}get y_scale(){return this._y_scales.get(\"default\")}get xscales(){return o.to_object(this.x_scales)}get yscales(){return o.to_object(this.y_scales)}}s.CartesianFrame=x,x.__name__=\"CartesianFrame\"},\n function _(e,t,r,n,_){n();const c=e(146);class s extends c.Scale{constructor(e){super(e)}get s_compute(){const[e,t]=this._linear_compute_state(),r=this.source_range;return n=>e*r.synthetic(n)+t}compute(e){return super._linear_compute(this.source_range.synthetic(e))}v_compute(e){return super._linear_v_compute(this.source_range.v_synthetic(e))}invert(e){return this._linear_invert(e)}v_invert(e){return this._linear_v_invert(e)}}r.CategoricalScale=s,s.__name__=\"CategoricalScale\"},\n function _(t,e,r,n,s){n();const i=t(147),_=t(105),a=t(156),c=t(24);class o extends i.Transform{constructor(t){super(t)}static init_Scale(){this.internal((({Ref:t})=>({source_range:[t(_.Range)],target_range:[t(a.Range1d)]})))}r_compute(t,e){return this.target_range.is_reversed?[this.compute(e),this.compute(t)]:[this.compute(t),this.compute(e)]}r_invert(t,e){return this.target_range.is_reversed?[this.invert(e),this.invert(t)]:[this.invert(t),this.invert(e)]}_linear_compute(t){const[e,r]=this._linear_compute_state();return e*t+r}_linear_v_compute(t){const[e,r]=this._linear_compute_state(),n=new c.ScreenArray(t.length);for(let s=0;s({args:[s(t),{}],func:[r,\"\"],v_func:[r,\"\"]})))}get names(){return o.keys(this.args)}get values(){return o.values(this.args)}_make_transform(t,r){return new Function(...this.names,t,u.use_strict(r))}get scalar_transform(){return this._make_transform(\"x\",this.func)}get vector_transform(){return this._make_transform(\"xs\",this.v_func)}compute(t){return this.scalar_transform(...this.values,t)}v_compute(t){return this.vector_transform(...this.values,t)}}s.CustomJSTransform=m,m.__name__=\"CustomJSTransform\",m.init_CustomJSTransform()},\n function _(n,s,o,r,c){r();const e=n(53);class t extends e.Model{constructor(n){super(n)}}o.Transform=t,t.__name__=\"Transform\"},\n function _(e,t,n,o,s){o();const i=e(151);class r extends i.RangeTransform{constructor(e){super(e)}static init_Dodge(){this.define((({Number:e})=>({value:[e,0]})))}_compute(e){return e+this.value}}n.Dodge=r,r.__name__=\"Dodge\",r.init_Dodge()},\n function _(e,n,t,r,s){r();const a=e(149),i=e(105),o=e(104),c=e(24),f=e(8);class u extends a.Transform{constructor(e){super(e)}static init_RangeTransform(){this.define((({Ref:e,Nullable:n})=>({range:[n(e(i.Range)),null]})))}v_compute(e){let n;if(this.range instanceof o.FactorRange)n=this.range.v_synthetic(e);else{if(!f.isArrayableOf(e,f.isNumber))throw new Error(\"unexpected\");n=e}const t=new(c.infer_type(n))(n.length);for(let e=0;e({x:[s(r,o(e))],y:[s(r,o(e))],data:[a(n(i.ColumnarDataSource)),null],clip:[t,!0]})))}connect_signals(){super.connect_signals(),this.connect(this.change,(()=>this._sorted_dirty=!0))}v_compute(t){const e=new(a.infer_type(t))(t.length);for(let r=0;rs*(e[t]-e[r]))),this._x_sorted=new(a.infer_type(e))(n),this._y_sorted=new(a.infer_type(r))(n);for(let t=0;t({mean:[t,0],width:[t,1],distribution:[o.Distribution,\"uniform\"]})))}v_compute(t){return null!=this.previous_values&&this.previous_values.length==t.length||(this.previous_values=super.v_compute(t)),this.previous_values}_compute(t){switch(this.distribution){case\"uniform\":return t+this.mean+(a.random()-.5)*this.width;case\"normal\":return t+a.rnorm(this.mean,this.width)}}}e.Jitter=h,h.__name__=\"Jitter\",h.init_Jitter()},\n function _(t,s,_,r,e){r();const i=t(9),o=t(152);class n extends o.Interpolator{constructor(t){super(t)}compute(t){if(this.sort(!1),this.clip){if(tthis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(t==this._x_sorted[0])return this._y_sorted[0];const s=i.find_last_index(this._x_sorted,(s=>s({mode:[_.StepMode,\"after\"]})))}compute(t){if(this.sort(!1),this.clip){if(tthis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}let e;switch(this.mode){case\"after\":e=n.find_last_index(this._x_sorted,(e=>t>=e));break;case\"before\":e=n.find_index(this._x_sorted,(e=>t<=e));break;case\"center\":{const s=n.map(this._x_sorted,(e=>Math.abs(e-t))),r=n.min(s);e=n.find_index(s,(t=>r===t));break}default:throw new Error(`unknown mode: ${this.mode}`)}return-1!=e?this._y_sorted[e]:NaN}}s.StepInterpolator=d,d.__name__=\"StepInterpolator\",d.init_StepInterpolator()},\n function _(t,e,s,n,i){n();const a=t(105);class r extends a.Range{constructor(t){super(t)}static init_Range1d(){this.define((({Number:t,Nullable:e})=>({start:[t,0],end:[t,1],reset_start:[e(t),null,{on_update(t,e){e._reset_start=null!=t?t:e.start}}],reset_end:[e(t),null,{on_update(t,e){e._reset_end=null!=t?t:e.end}}]})))}_set_auto_bounds(){if(\"auto\"==this.bounds){const t=Math.min(this._reset_start,this._reset_end),e=Math.max(this._reset_start,this._reset_end);this.setv({bounds:[t,e]},{silent:!0})}}initialize(){super.initialize(),this._set_auto_bounds()}get min(){return Math.min(this.start,this.end)}get max(){return Math.max(this.start,this.end)}reset(){this._set_auto_bounds();const{_reset_start:t,_reset_end:e}=this;this.start!=t||this.end!=e?this.setv({start:t,end:e}):this.change.emit()}map(t){return new r({start:t(this.start),end:t(this.end)})}widen(t){let{start:e,end:s}=this;return this.is_reversed?(e+=t,s-=t):(e-=t,s+=t),new r({start:e,end:s})}}s.Range1d=r,r.__name__=\"Range1d\",r.init_Range1d()},\n function _(t,e,o,n,s){n();const a=t(158),r=t(24);class c extends a.ContinuousScale{constructor(t){super(t)}get s_compute(){const[t,e,o,n]=this._compute_state();return s=>{if(0==o)return 0;{const a=(Math.log(s)-n)/o;return isFinite(a)?a*t+e:NaN}}}compute(t){const[e,o,n,s]=this._compute_state();let a;if(0==n)a=0;else{const r=(Math.log(t)-s)/n;a=isFinite(r)?r*e+o:NaN}return a}v_compute(t){const[e,o,n,s]=this._compute_state(),a=new r.ScreenArray(t.length);if(0==n)for(let e=0;e({start:[i],end:[i],range_padding:[i,.1],range_padding_units:[_.PaddingUnits,\"percent\"],flipped:[t,!1],follow:[n(_.StartEnd),null],follow_interval:[n(i),null],default_span:[i,2],only_visible:[t,!1]}))),this.internal((({Enum:t})=>({scale_hint:[t(\"log\",\"auto\"),\"auto\"]})))}initialize(){super.initialize(),this._initial_start=this.start,this._initial_end=this.end,this._initial_range_padding=this.range_padding,this._initial_range_padding_units=this.range_padding_units,this._initial_follow=this.follow,this._initial_follow_interval=this.follow_interval,this._initial_default_span=this.default_span,this._plot_bounds=new Map}get min(){return Math.min(this.start,this.end)}get max(){return Math.max(this.start,this.end)}computed_renderers(){const{renderers:t,names:i}=this,n=o.concat(this.plots.map((t=>t.data_renderers)));return d.compute_renderers(0==t.length?\"auto\":t,n,i)}_compute_plot_bounds(t,i){let n=r.empty();for(const a of t){const t=i.get(a);null==t||!a.visible&&this.only_visible||(n=r.union(n,t))}return n}adjust_bounds_for_aspect(t,i){const n=r.empty();let a=t.x1-t.x0;a<=0&&(a=1);let e=t.y1-t.y0;e<=0&&(e=1);const s=.5*(t.x1+t.x0),l=.5*(t.y1+t.y0);return al&&(\"start\"==this.follow?e=a+s*l:\"end\"==this.follow&&(a=e-s*l)),[a,e]}update(t,i,n,a){if(this.have_updated_interactively)return;const e=this.computed_renderers();let s=this._compute_plot_bounds(e,t);null!=a&&(s=this.adjust_bounds_for_aspect(s,a)),this._plot_bounds.set(n,s);const[l,_]=this._compute_min_max(this._plot_bounds.values(),i);let[o,h]=this._compute_range(l,_);null!=this._initial_start&&(\"log\"==this.scale_hint?this._initial_start>0&&(o=this._initial_start):o=this._initial_start),null!=this._initial_end&&(\"log\"==this.scale_hint?this._initial_end>0&&(h=this._initial_end):h=this._initial_end);let r=!1;\"auto\"==this.bounds&&(this.setv({bounds:[o,h]},{silent:!0}),r=!0);const[d,u]=[this.start,this.end];if(o!=d||h!=u){const t={};o!=d&&(t.start=o),h!=u&&(t.end=h),this.setv(t),r=!1}r&&this.change.emit()}reset(){this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()}}n.DataRange1d=u,u.__name__=\"DataRange1d\",u.init_DataRange1d()},\n function _(a,e,n,t,r){t();const s=a(105),i=a(62);class R extends s.Range{constructor(a){super(a)}static init_DataRange(){this.define((({String:a,Array:e,Ref:n})=>({names:[e(a),[]],renderers:[e(n(i.DataRenderer)),[]]})))}}n.DataRange=R,R.__name__=\"DataRange\",R.init_DataRange()},\n function _(n,e,t,r,u){r();const l=n(9);t.compute_renderers=function(n,e,t){if(null==n)return[];let r=\"auto\"==n?e:n;return t.length>0&&(r=r.filter((n=>l.includes(t,n.name)))),r}},\n function _(i,s,x,A,o){A(),o(\"Axis\",i(163).Axis),o(\"CategoricalAxis\",i(170).CategoricalAxis),o(\"ContinuousAxis\",i(173).ContinuousAxis),o(\"DatetimeAxis\",i(174).DatetimeAxis),o(\"LinearAxis\",i(175).LinearAxis),o(\"LogAxis\",i(192).LogAxis),o(\"MercatorAxis\",i(195).MercatorAxis)},\n function _(t,e,i,s,o){s();const n=t(1),a=t(164),l=t(165),r=t(166),_=t(169),c=n.__importStar(t(48)),h=t(20),b=t(24),m=t(140),d=t(9),u=t(8),x=t(167),g=t(104),{abs:f}=Math;class p extends a.GuideRendererView{update_layout(){this.layout=new m.SideLayout(this.panel,(()=>this.get_size()),!0)}get_size(){const{visible:t,fixed_location:e}=this.model;if(t&&null==e&&this.is_renderable){const{extents:t}=this;return{width:0,height:Math.round(t.tick+t.tick_label+t.axis_label)}}return{width:0,height:0}}get is_renderable(){const[t,e]=this.ranges;return t.is_valid&&e.is_valid}_render(){var t;if(!this.is_renderable)return;const{tick_coords:e,extents:i}=this,s=this.layer.ctx;s.save(),this._draw_rule(s,i),this._draw_major_ticks(s,i,e),this._draw_minor_ticks(s,i,e),this._draw_major_labels(s,i,e),this._draw_axis_label(s,i,e),null===(t=this._paint)||void 0===t||t.call(this,s,i,e),s.restore()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_layout()))}get needs_clip(){return null!=this.model.fixed_location}_draw_rule(t,e){if(!this.visuals.axis_line.doit)return;const[i,s]=this.rule_coords,[o,n]=this.coordinates.map_to_screen(i,s),[a,l]=this.normals,[r,_]=this.offsets;this.visuals.axis_line.set_value(t),t.beginPath();for(let e=0;e0?o+s+3:0}_draw_axis_label(t,e,i){const s=this.model.axis_label;if(!s||null!=this.model.fixed_location)return;const o=new x.TextBox({text:s});o.angle=this.panel.get_label_angle_heuristic(\"parallel\"),o.visuals=this.visuals.axis_label_text;const[n,a]=(()=>{const{bbox:t}=this.layout;switch(this.panel.side){case\"above\":return[t.hcenter,t.bottom];case\"below\":return[t.hcenter,t.top];case\"left\":return[t.right,t.vcenter];case\"right\":return[t.left,t.vcenter]}})(),[l,r]=this.normals,_=e.tick+e.tick_label+this.model.axis_label_standoff,{vertical_align:c,align:h}=this.panel.get_label_text_heuristics(\"parallel\");o.position={sx:n+l*_,sy:a+r*_,x_anchor:h,y_anchor:c},o.align=h,o.paint(t)}_draw_ticks(t,e,i,s,o){if(!o.doit)return;const[n,a]=e,[l,r]=this.coordinates.map_to_screen(n,a),[_,c]=this.normals,[h,b]=this.offsets,[m,d]=[_*(h-i),c*(b-i)],[u,x]=[_*(h+s),c*(b+s)];o.set_value(t),t.beginPath();for(let e=0;et.bbox())),O=(()=>{const[t]=this.ranges;return t.is_reversed?0==this.dimension?(t,e)=>T[t].left-T[e].right:(t,e)=>T[e].top-T[t].bottom:0==this.dimension?(t,e)=>T[e].left-T[t].right:(t,e)=>T[t].top-T[e].bottom})(),{major_label_policy:A}=this.model,M=A.filter(v,T,O),z=[...M.ones()];if(0!=z.length){const t=this.parent.canvas_view.bbox,e=e=>{const i=T[e];if(i.left<0){const t=-i.left,{position:s}=y[e];y[e].position=Object.assign(Object.assign({},s),{sx:s.sx+t})}else if(i.right>t.width){const s=i.right-t.width,{position:o}=y[e];y[e].position=Object.assign(Object.assign({},o),{sx:o.sx-s})}},i=e=>{const i=T[e];if(i.top<0){const t=-i.top,{position:s}=y[e];y[e].position=Object.assign(Object.assign({},s),{sy:s.sy+t})}else if(i.bottom>t.height){const s=i.bottom-t.height,{position:o}=y[e];y[e].position=Object.assign(Object.assign({},o),{sy:o.sy-s})}},s=z[0],o=z[z.length-1];0==this.dimension?(e(s),e(o)):(i(s),i(o))}for(const e of M){y[e].paint(t)}}_tick_extent(){return this.model.major_tick_out}_tick_label_extents(){const t=this.tick_coords.major,e=this.compute_labels(t[this.dimension]),i=this.model.major_label_orientation,s=this.model.major_label_standoff,o=this.visuals.major_label_text;return[this._oriented_labels_extent(e,i,s,o)]}get extents(){const t=this._tick_label_extents();return{tick:this._tick_extent(),tick_labels:t,tick_label:d.sum(t),axis_label:this._axis_label_extent()}}_oriented_labels_extent(t,e,i,s){if(0==t.length)return 0;const o=this.panel.get_label_angle_heuristic(e);t.visuals=s,t.angle=o;const n=t.max_size(),a=0==this.dimension?n.height:n.width;return a>0?i+a+3:0}get normals(){return this.panel.normals}get dimension(){return this.panel.dimension}compute_labels(t){const e=this.model.formatter.format_graphics(t,this),{major_label_overrides:i}=this.model;for(let s=0;sf(a-l)?(t=_(r(o,n),a),s=r(_(o,n),l)):(t=r(o,n),s=_(o,n)),[t,s]}}get rule_coords(){const t=this.dimension,e=(t+1)%2,[i]=this.ranges,[s,o]=this.computed_bounds,n=[new Array(2),new Array(2)];return n[t][0]=Math.max(s,i.min),n[t][1]=Math.min(o,i.max),n[t][0]>n[t][1]&&(n[t][0]=n[t][1]=NaN),n[e][0]=this.loc,n[e][1]=this.loc,n}get tick_coords(){const t=this.dimension,e=(t+1)%2,[i]=this.ranges,[s,o]=this.computed_bounds,n=this.model.ticker.get_ticks(s,o,i,this.loc),a=n.major,l=n.minor,r=[[],[]],_=[[],[]],[c,h]=[i.min,i.max];for(let i=0;ih||(r[t].push(a[i]),r[e].push(this.loc));for(let i=0;ih||(_[t].push(l[i]),_[e].push(this.loc));return{major:r,minor:_}}get loc(){const{fixed_location:t}=this.model;if(null!=t){if(u.isNumber(t))return t;const[,e]=this.ranges;if(e instanceof g.FactorRange)return e.synthetic(t);throw new Error(\"unexpected\")}const[,e]=this.ranges;switch(this.panel.side){case\"left\":case\"below\":return e.start;case\"right\":case\"above\":return e.end}}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box})}}i.AxisView=p,p.__name__=\"AxisView\";class k extends a.GuideRenderer{constructor(t){super(t)}static init_Axis(){this.prototype.default_view=p,this.mixins([[\"axis_\",c.Line],[\"major_tick_\",c.Line],[\"minor_tick_\",c.Line],[\"major_label_\",c.Text],[\"axis_label_\",c.Text]]),this.define((({Any:t,Int:e,Number:i,String:s,Ref:o,Dict:n,Tuple:a,Or:c,Nullable:b,Auto:m})=>({bounds:[c(a(i,i),m),\"auto\"],ticker:[o(l.Ticker)],formatter:[o(r.TickFormatter)],axis_label:[b(s),\"\"],axis_label_standoff:[e,5],major_label_standoff:[e,5],major_label_orientation:[c(h.TickLabelOrientation,i),\"horizontal\"],major_label_overrides:[n(s),{}],major_label_policy:[o(_.LabelingPolicy),()=>new _.AllLabels],major_tick_in:[i,2],major_tick_out:[i,6],minor_tick_in:[i,0],minor_tick_out:[i,4],fixed_location:[b(c(i,t)),null]}))),this.override({axis_line_color:\"black\",major_tick_line_color:\"black\",minor_tick_line_color:\"black\",major_label_text_font_size:\"11px\",major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label_text_font_size:\"13px\",axis_label_text_font_style:\"italic\"})}}i.Axis=k,k.__name__=\"Axis\",k.init_Axis()},\n function _(e,r,d,i,n){i();const s=e(41);class t extends s.RendererView{}d.GuideRendererView=t,t.__name__=\"GuideRendererView\";class _ extends s.Renderer{constructor(e){super(e)}static init_GuideRenderer(){this.override({level:\"guide\"})}}d.GuideRenderer=_,_.__name__=\"GuideRenderer\",_.init_GuideRenderer()},\n function _(c,e,n,s,o){s();const r=c(53);class t extends r.Model{constructor(c){super(c)}}n.Ticker=t,t.__name__=\"Ticker\"},\n function _(t,o,r,e,c){e();const n=t(53),a=t(167);class m extends n.Model{constructor(t){super(t)}format_graphics(t,o){return this.doFormat(t,o).map((t=>new a.TextBox({text:t})))}compute(t,o){return this.doFormat([t],null!=o?o:{loc:0})[0]}v_compute(t,o){return this.doFormat(t,null!=o?o:{loc:0})}}r.TickFormatter=m,m.__name__=\"TickFormatter\"},\n function _(t,e,s,i,n){i();const h=t(99),o=t(143),r=t(9),a=t(8),c=t(168),_=t(22);s.text_width=(()=>{const t=document.createElement(\"canvas\").getContext(\"2d\");let e=\"\";return(s,i)=>(i!=e&&(e=i,t.font=i),t.measureText(s).width)})();class l{constructor(){this._position={sx:0,sy:0},this.font_size_scale=1}set position(t){this._position=t}get position(){return this._position}infer_text_height(){return\"ascent_descent\"}bbox(){const{p0:t,p1:e,p2:s,p3:i}=this.rect(),n=Math.min(t.x,e.x,s.x,i.x),o=Math.min(t.y,e.y,s.y,i.y),r=Math.max(t.x,e.x,s.x,i.x),a=Math.max(t.y,e.y,s.y,i.y);return new h.BBox({left:n,right:r,top:o,bottom:a})}size(){const{width:t,height:e}=this._size(),{angle:s}=this;if(s){const i=Math.cos(Math.abs(s)),n=Math.sin(Math.abs(s));return{width:Math.abs(t*i+e*n),height:Math.abs(t*n+e*i)}}return{width:t,height:e}}rect(){const t=this._rect(),{angle:e}=this;if(e){const{sx:s,sy:i}=this.position,n=new c.AffineTransform;return n.translate(s,i),n.rotate(e),n.translate(-s,-i),n.apply_rect(t)}return t}paint_rect(t){const{p0:e,p1:s,p2:i,p3:n}=this.rect();t.save(),t.strokeStyle=\"red\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e.x),h(e.y)),t.lineTo(h(s.x),h(s.y)),t.lineTo(h(i.x),h(i.y)),t.lineTo(h(n.x),h(n.y)),t.closePath(),t.stroke(),t.restore()}paint_bbox(t){const{x:e,y:s,width:i,height:n}=this.bbox();t.save(),t.strokeStyle=\"blue\",t.lineWidth=1,t.beginPath();const{round:h}=Math;t.moveTo(h(e),h(s)),t.lineTo(h(e),h(s+n)),t.lineTo(h(e+i),h(s+n)),t.lineTo(h(e+i),h(s)),t.closePath(),t.stroke(),t.restore()}}s.GraphicsBox=l,l.__name__=\"GraphicsBox\";class x extends l{constructor({text:t}){super(),this.align=\"left\",this.text=t}set visuals(t){const e=t.text_color.get_value(),s=t.text_alpha.get_value(),i=t.text_font_style.get_value();let n=t.text_font_size.get_value();const h=t.text_font.get_value(),{font_size_scale:o}=this;if(1!=o){const t=n.match(/^\\s*(\\d+(\\.\\d+)?)px\\s*$/);if(null!=t){const[,e]=t,s=Number(e);isNaN(s)||(n=s*o+\"px\")}}const r=`${i} ${n} ${h}`;this.font=r,this.color=_.color2css(e,s),this.line_height=t.text_line_height.get_value()}infer_text_height(){if(this.text.includes(\"\\n\"))return\"ascent_descent\";return function(t){for(const e of new Set(t))if(!(\"0\"<=e&&e<=\"9\"))switch(e){case\",\":case\".\":case\"+\":case\"-\":case\"−\":case\"e\":continue;default:return!1}return!0}(this.text)?\"cap\":\"ascent_descent\"}_text_line(t){var e;const s=null!==(e=this.text_height_metric)&&void 0!==e?e:this.infer_text_height(),i=(()=>{switch(s){case\"x\":case\"x_descent\":return t.x_height;case\"cap\":case\"cap_descent\":return t.cap_height;case\"ascent\":case\"ascent_descent\":return t.ascent}})(),n=(()=>{switch(s){case\"x\":case\"cap\":case\"ascent\":return 0;case\"x_descent\":case\"cap_descent\":case\"ascent_descent\":return t.descent}})();return{height:i+n,ascent:i,descent:n}}get nlines(){return this.text.split(\"\\n\").length}_size(){var t,e;const{font:i}=this,n=o.font_metrics(i),h=(this.line_height-1)*n.height,a=\"\"==this.text,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,i))),x=this._text_line(n).height*_,u=\"%\"==(null===(t=this.width)||void 0===t?void 0:t.unit)?this.width.value:1,p=\"%\"==(null===(e=this.height)||void 0===e?void 0:e.unit)?this.height.value:1;return{width:r.max(l)*u,height:a?0:(x+h*(_-1))*p,metrics:n}}_computed_position(t,e,s){const{width:i,height:n}=t,{sx:h,sy:o,x_anchor:r=\"left\",y_anchor:c=\"center\"}=this.position;return{x:h-(()=>{if(a.isNumber(r))return r*i;switch(r){case\"left\":return 0;case\"center\":return.5*i;case\"right\":return i}})(),y:o-(()=>{var t;if(a.isNumber(c))return c*n;switch(c){case\"top\":return 0;case\"center\":return.5*n;case\"bottom\":return n;case\"baseline\":if(1!=s)return.5*n;switch(null!==(t=this.text_height_metric)&&void 0!==t?t:this.infer_text_height()){case\"x\":case\"x_descent\":return e.x_height;case\"cap\":case\"cap_descent\":return e.cap_height;case\"ascent\":case\"ascent_descent\":return e.ascent}}})()}}_rect(){const{width:t,height:e,metrics:s}=this._size(),i=this.text.split(\"\\n\").length,{x:n,y:o}=this._computed_position({width:t,height:e},s,i);return new h.BBox({x:n,y:o,width:t,height:e}).rect}paint(t){var e,i;const{font:n}=this,h=o.font_metrics(n),a=(this.line_height-1)*h.height,c=this.text.split(\"\\n\"),_=c.length,l=c.map((t=>s.text_width(t,n))),x=this._text_line(h),u=x.height*_,p=\"%\"==(null===(e=this.width)||void 0===e?void 0:e.unit)?this.width.value:1,g=\"%\"==(null===(i=this.height)||void 0===i?void 0:i.unit)?this.height.value:1,f=r.max(l)*p,d=(u+a*(_-1))*g;t.save(),t.fillStyle=this.color,t.font=this.font,t.textAlign=\"left\",t.textBaseline=\"alphabetic\";const{sx:m,sy:b}=this.position,{align:y}=this,{angle:w}=this;w&&(t.translate(m,b),t.rotate(w),t.translate(-m,-b));let{x:v,y:z}=this._computed_position({width:f,height:d},h,_);if(\"justify\"==y)for(let e=0;e<_;e++){let i=v;const h=c[e].split(\" \"),o=h.length,_=h.map((t=>s.text_width(t,n))),l=(f-r.sum(_))/(o-1);for(let e=0;e{switch(y){case\"left\":return 0;case\"center\":return.5*(f-l[e]);case\"right\":return f-l[e]}})();t.fillStyle=this.color,t.fillText(c[e],s,z+x.ascent),z+=x.height+a}t.restore()}}s.TextBox=x,x.__name__=\"TextBox\";class u extends l{constructor(t,e){super(),this.base=t,this.expo=e}get children(){return[this.base,this.expo]}set position(t){this._position=t;const e=this.base.size(),s=this.expo.size(),i=this._shift_scale()*e.height,n=Math.max(e.height,i+s.height);this.base.position={sx:0,x_anchor:\"left\",sy:n,y_anchor:\"bottom\"},this.expo.position={sx:e.width,x_anchor:\"left\",sy:i,y_anchor:\"bottom\"}}get position(){return this._position}set visuals(t){this.expo.font_size_scale=.7,this.base.visuals=t,this.expo.visuals=t}_shift_scale(){if(this.base instanceof x&&1==this.base.nlines){const{x_height:t,cap_height:e}=o.font_metrics(this.base.font);return t/e}return 2/3}infer_text_height(){return this.base.infer_text_height()}_rect(){const t=this.base.bbox(),e=this.expo.bbox(),s=t.union(e),{x:i,y:n}=this._computed_position();return s.translate(i,n).rect}_size(){const t=this.base.size(),e=this.expo.size();return{width:t.width+e.width,height:Math.max(t.height,this._shift_scale()*t.height+e.height)}}paint(t){t.save();const{angle:e}=this;if(e){const{sx:s,sy:i}=this.position;t.translate(s,i),t.rotate(e),t.translate(-s,-i)}const{x:s,y:i}=this._computed_position();t.translate(s,i),this.base.paint(t),this.expo.paint(t),t.restore()}paint_bbox(t){super.paint_bbox(t);const{x:e,y:s}=this._computed_position();t.save(),t.translate(e,s);for(const e of this.children)e.paint_bbox(t);t.restore()}_computed_position(){const{width:t,height:e}=this._size(),{sx:s,sy:i,x_anchor:n=\"left\",y_anchor:h=\"center\"}=this.position;return{x:s-(()=>{if(a.isNumber(n))return n*t;switch(n){case\"left\":return 0;case\"center\":return.5*t;case\"right\":return t}})(),y:i-(()=>{if(a.isNumber(h))return h*e;switch(h){case\"top\":return 0;case\"center\":return.5*e;case\"bottom\":return e;case\"baseline\":return.5*e}})()}}}s.BaseExpo=u,u.__name__=\"BaseExpo\";class p{constructor(t){this.items=t}get length(){return this.items.length}set visuals(t){for(const e of this.items)e.visuals=t;const e={x:0,cap:1,ascent:2,x_descent:3,cap_descent:4,ascent_descent:5},s=r.max_by(this.items.map((t=>t.infer_text_height())),(t=>e[t]));for(const t of this.items)t.text_height_metric=s}set angle(t){for(const e of this.items)e.angle=t}max_size(){let t=0,e=0;for(const s of this.items){const i=s.size();t=Math.max(t,i.width),e=Math.max(e,i.height)}return{width:t,height:e}}}s.GraphicsBoxes=p,p.__name__=\"GraphicsBoxes\"},\n function _(t,s,r,n,i){n();const{sin:e,cos:a}=Math;class h{constructor(t=1,s=0,r=0,n=1,i=0,e=0){this.a=t,this.b=s,this.c=r,this.d=n,this.e=i,this.f=e}toString(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return`matrix(${t}, ${s}, ${r}, ${n}, ${i}, ${e})`}clone(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return new h(t,s,r,n,i,e)}get is_identity(){const{a:t,b:s,c:r,d:n,e:i,f:e}=this;return 1==t&&0==s&&0==r&&1==n&&0==i&&0==e}apply_point(t){const[s,r]=this.apply(t.x,t.y);return{x:s,y:r}}apply_rect(t){return{p0:this.apply_point(t.p0),p1:this.apply_point(t.p1),p2:this.apply_point(t.p2),p3:this.apply_point(t.p3)}}apply(t,s){const{a:r,b:n,c:i,d:e,e:a,f:h}=this;return[r*t+i*s+a,n*t+e*s+h]}iv_apply(t,s){const{a:r,b:n,c:i,d:e,e:a,f:h}=this,p=t.length;for(let o=0;o({min_distance:[e,5]})))}filter(e,n,s){const{min_distance:t}=this;let i=null;for(const n of e)null!=i&&s(i,n)({args:[s(e),{}],code:[n,\"\"]})))}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}get func(){const e=o.use_strict(this.code);return new a.GeneratorFunction(\"indices\",\"bboxes\",\"distance\",...this.names,e)}filter(e,n,s){const t=Object.create(null),i=this.func.call(t,e,n,s,...this.values);let l=i.next();if(l.done&&void 0!==l.value){const{value:n}=l;return n instanceof a.Indices?n:void 0===n?e:r.isIterable(n)?a.Indices.from_indices(e.size,n):a.Indices.all_unset(e.size)}{const n=[];do{n.push(l.value),l=i.next()}while(!l.done);return a.Indices.from_indices(e.size,n)}}}s.CustomLabelingPolicy=m,m.__name__=\"CustomLabelingPolicy\",m.init_CustomLabelingPolicy()},\n function _(t,s,e,o,i){o();const a=t(1),r=t(163),l=t(171),_=t(172),n=a.__importStar(t(48)),c=t(20),p=t(167),h=t(8);class m extends r.AxisView{_paint(t,s,e){this._draw_group_separators(t,s,e)}_draw_group_separators(t,s,e){const[o]=this.ranges,[i,a]=this.computed_bounds;if(!o.tops||o.tops.length<2||!this.visuals.separator_line.doit)return;const r=this.dimension,l=(r+1)%2,_=[[],[]];let n=0;for(let t=0;ti&&cnew p.GraphicsBoxes(t.map((t=>h.isString(t)?new p.TextBox({text:t}):t))),_=t=>l(this.model.formatter.doFormat(t,this));if(1==t.levels){const t=_(i.major);r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text])}else if(2==t.levels){const t=_(i.major.map((t=>t[1])));r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),r.push([l(i.tops),a.tops,this.model.group_label_orientation,this.visuals.group_text])}else if(3==t.levels){const t=_(i.major.map((t=>t[2]))),s=i.mids.map((t=>t[1]));r.push([t,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),r.push([l(s),a.mids,this.model.subgroup_label_orientation,this.visuals.subgroup_text]),r.push([l(i.tops),a.tops,this.model.group_label_orientation,this.visuals.group_text])}return r}get tick_coords(){const t=this.dimension,s=(t+1)%2,[e]=this.ranges,[o,i]=this.computed_bounds,a=this.model.ticker.get_ticks(o,i,e,this.loc),r={major:[[],[]],mids:[[],[]],tops:[[],[]],minor:[[],[]]};return r.major[t]=a.major,r.major[s]=a.major.map((()=>this.loc)),3==e.levels&&(r.mids[t]=a.mids,r.mids[s]=a.mids.map((()=>this.loc))),e.levels>1&&(r.tops[t]=a.tops,r.tops[s]=a.tops.map((()=>this.loc))),r}}e.CategoricalAxisView=m,m.__name__=\"CategoricalAxisView\";class u extends r.Axis{constructor(t){super(t)}static init_CategoricalAxis(){this.prototype.default_view=m,this.mixins([[\"separator_\",n.Line],[\"group_\",n.Text],[\"subgroup_\",n.Text]]),this.define((({Number:t,Or:s})=>({group_label_orientation:[s(c.TickLabelOrientation,t),\"parallel\"],subgroup_label_orientation:[s(c.TickLabelOrientation,t),\"parallel\"]}))),this.override({ticker:()=>new l.CategoricalTicker,formatter:()=>new _.CategoricalTickFormatter,separator_line_color:\"lightgrey\",separator_line_width:2,group_text_font_style:\"bold\",group_text_font_size:\"11px\",group_text_color:\"grey\",subgroup_text_font_style:\"bold\",subgroup_text_font_size:\"11px\"})}}e.CategoricalAxis=u,u.__name__=\"CategoricalAxis\",u.init_CategoricalAxis()},\n function _(t,c,o,s,e){s();const r=t(165);class i extends r.Ticker{constructor(t){super(t)}get_ticks(t,c,o,s){var e,r;return{major:this._collect(o.factors,o,t,c),minor:[],tops:this._collect(null!==(e=o.tops)&&void 0!==e?e:[],o,t,c),mids:this._collect(null!==(r=o.mids)&&void 0!==r?r:[],o,t,c)}}_collect(t,c,o,s){const e=[];for(const r of t){const t=c.synthetic(r);t>o&&tnew m.DatetimeTicker,formatter:()=>new r.DatetimeTickFormatter})}}i.DatetimeAxis=c,c.__name__=\"DatetimeAxis\",c.init_DatetimeAxis()},\n function _(i,e,s,n,t){n();const r=i(173),a=i(176),o=i(177);class c extends r.ContinuousAxisView{}s.LinearAxisView=c,c.__name__=\"LinearAxisView\";class _ extends r.ContinuousAxis{constructor(i){super(i)}static init_LinearAxis(){this.prototype.default_view=c,this.override({ticker:()=>new o.BasicTicker,formatter:()=>new a.BasicTickFormatter})}}s.LinearAxis=_,_.__name__=\"LinearAxis\",_.init_LinearAxis()},\n function _(i,t,e,n,o){n();const s=i(166),r=i(34);function c(i){let t=\"\";for(const e of i)t+=\"-\"==e?\"−\":e;return t}e.unicode_replace=c;class _ extends s.TickFormatter{constructor(i){super(i),this.last_precision=3}static init_BasicTickFormatter(){this.define((({Boolean:i,Int:t,Auto:e,Or:n})=>({precision:[n(t,e),\"auto\"],use_scientific:[i,!0],power_limit_high:[t,5],power_limit_low:[t,-3]})))}get scientific_limit_low(){return 10**this.power_limit_low}get scientific_limit_high(){return 10**this.power_limit_high}_need_sci(i){if(!this.use_scientific)return!1;const{scientific_limit_high:t}=this,{scientific_limit_low:e}=this,n=i.length<2?0:Math.abs(i[1]-i[0])/1e4;for(const o of i){const i=Math.abs(o);if(!(i<=n)&&(i>=t||i<=e))return!0}return!1}_format_with_precision(i,t,e){return t?i.map((i=>c(i.toExponential(e)))):i.map((i=>c(r.to_fixed(i,e))))}_auto_precision(i,t){const e=new Array(i.length),n=this.last_precision<=15;i:for(let o=this.last_precision;n?o<=15:o>=1;n?o++:o--){if(t){e[0]=i[0].toExponential(o);for(let t=1;t({base:[t,10],mantissas:[i(t),[1,2,5]],min_interval:[t,0],max_interval:[a(t),null]})))}get_min_interval(){return this.min_interval}get_max_interval(){var t;return null!==(t=this.max_interval)&&void 0!==t?t:1/0}initialize(){super.initialize();const t=r.nth(this.mantissas,-1)/this.base,i=r.nth(this.mantissas,0)*this.base;this.extended_mantissas=[t,...this.mantissas,i],this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()}get_interval(t,i,a){const e=i-t,s=this.get_ideal_interval(t,i,a),n=Math.floor(_.log(s/this.base_factor,this.base)),l=this.base**n*this.base_factor,h=this.extended_mantissas,m=h.map((t=>Math.abs(a-e/(t*l)))),v=h[r.argmin(m)]*l;return _.clamp(v,this.get_min_interval(),this.get_max_interval())}}a.AdaptiveTicker=l,l.__name__=\"AdaptiveTicker\",l.init_AdaptiveTicker()},\n function _(t,i,n,s,e){s();const o=t(165),r=t(9);class c extends o.Ticker{constructor(t){super(t)}static init_ContinuousTicker(){this.define((({Int:t})=>({num_minor_ticks:[t,5],desired_num_ticks:[t,6]})))}get_ticks(t,i,n,s){return this.get_ticks_no_defaults(t,i,s,this.desired_num_ticks)}get_ticks_no_defaults(t,i,n,s){const e=this.get_interval(t,i,s),o=Math.floor(t/e),c=Math.ceil(i/e);let _;_=isFinite(o)&&isFinite(c)?r.range(o,c+1):[];const u=_.map((t=>t*e)).filter((n=>t<=n&&n<=i)),a=this.num_minor_ticks,f=[];if(a>0&&u.length>0){const n=e/a,s=r.range(0,a).map((t=>t*n));for(const n of s.slice(1)){const s=u[0]-n;t<=s&&s<=i&&f.push(s)}for(const n of u)for(const e of s){const s=n+e;t<=s&&s<=i&&f.push(s)}}return{major:u,minor:f}}get_ideal_interval(t,i,n){return(i-t)/n}}n.ContinuousTicker=c,c.__name__=\"ContinuousTicker\",c.init_ContinuousTicker()},\n function _(t,s,e,i,n){i();const r=t(1).__importDefault(t(181)),o=t(166),a=t(19),c=t(182),m=t(9),u=t(8);function h(t){return r.default(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map((t=>parseInt(t,10)))}function d(t,s){if(u.isFunction(s))return s(t);{const e=c.sprintf(\"$1%06d\",function(t){return Math.round(t/1e3%1*1e6)}(t));return-1==(s=s.replace(/((^|[^%])(%%)*)%f/,e)).indexOf(\"%\")?s:r.default(t,s)}}const l=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"];class f extends o.TickFormatter{constructor(t){super(t),this.strip_leading_zeros=!0}static init_DatetimeTickFormatter(){this.define((({String:t,Array:s})=>({microseconds:[s(t),[\"%fus\"]],milliseconds:[s(t),[\"%3Nms\",\"%S.%3Ns\"]],seconds:[s(t),[\"%Ss\"]],minsec:[s(t),[\":%M:%S\"]],minutes:[s(t),[\":%M\",\"%Mm\"]],hourmin:[s(t),[\"%H:%M\"]],hours:[s(t),[\"%Hh\",\"%H:%M\"]],days:[s(t),[\"%m/%d\",\"%a%d\"]],months:[s(t),[\"%m/%Y\",\"%b %Y\"]],years:[s(t),[\"%Y\"]]})))}initialize(){super.initialize(),this._update_width_formats()}_update_width_formats(){const t=+r.default(new Date),s=function(s){const e=s.map((s=>d(t,s).length)),i=m.sort_by(m.zip(e,s),(([t])=>t));return m.unzip(i)};this._width_formats={microseconds:s(this.microseconds),milliseconds:s(this.milliseconds),seconds:s(this.seconds),minsec:s(this.minsec),minutes:s(this.minutes),hourmin:s(this.hourmin),hours:s(this.hours),days:s(this.days),months:s(this.months),years:s(this.years)}}_get_resolution_str(t,s){const e=1.1*t;switch(!1){case!(e<.001):return\"microseconds\";case!(e<1):return\"milliseconds\";case!(e<60):return s>=60?\"minsec\":\"seconds\";case!(e<3600):return s>=3600?\"hourmin\":\"minutes\";case!(e<86400):return\"hours\";case!(e<2678400):return\"days\";case!(e<31536e3):return\"months\";default:return\"years\"}}doFormat(t,s){if(0==t.length)return[];const e=Math.abs(t[t.length-1]-t[0])/1e3,i=e/(t.length-1),n=this._get_resolution_str(i,e),[,[r]]=this._width_formats[n],o=[],c=l.indexOf(n),m={};for(const t of l)m[t]=0;m.seconds=5,m.minsec=4,m.minutes=4,m.hourmin=3,m.hours=3;for(const s of t){let t,e;try{e=h(s),t=d(s,r)}catch(t){a.logger.warn(`unable to format tick for timestamp value ${s}`),a.logger.warn(` - ${t}`),o.push(\"ERR\");continue}let i=!1,u=c;for(;0==e[m[l[u]]];){let r;if(u+=1,u==l.length)break;if((\"minsec\"==n||\"hourmin\"==n)&&!i){if(\"minsec\"==n&&0==e[4]&&0!=e[5]||\"hourmin\"==n&&0==e[3]&&0!=e[4]){r=this._width_formats[l[c-1]][1][0],t=d(s,r);break}i=!0}r=this._width_formats[l[u]][1][0],t=d(s,r)}if(this.strip_leading_zeros){let s=t.replace(/^0+/g,\"\");s!=t&&isNaN(parseInt(s))&&(s=`0${s}`),o.push(s)}else o.push(t)}return o}}e.DatetimeTickFormatter=f,f.__name__=\"DatetimeTickFormatter\",f.init_DatetimeTickFormatter()},\n function _(e,t,n,r,o){!function(e){\"object\"==typeof t&&t.exports?t.exports=e():\"function\"==typeof define?define(e):this.tz=e()}((function(){function e(e,t,n){var r,o=t.day[1];do{r=new Date(Date.UTC(n,t.month,Math.abs(o++)))}while(t.day[0]<7&&r.getUTCDay()!=t.day[0]);return(r={clock:t.clock,sort:r.getTime(),rule:t,save:6e4*t.save,offset:e.offset})[r.clock]=r.sort+6e4*t.time,r.posix?r.wallclock=r[r.clock]+(e.offset+t.saved):r.posix=r[r.clock]-(e.offset+t.saved),r}function t(t,n,r){var o,a,u,i,l,s,c,f=t[t.zone],h=[],T=new Date(r).getUTCFullYear(),g=1;for(o=1,a=f.length;o=T-g;--c)for(o=0,a=s.length;o=h[o][n]&&h[o][h[o].clock]>u[h[o].clock]&&(i=h[o])}return i&&((l=/^(.*)\\/(.*)$/.exec(u.format))?i.abbrev=l[i.save?2:1]:i.abbrev=u.format.replace(/%s/,i.rule.letter)),i||u}function n(e,n){return\"UTC\"==e.zone?n:(e.entry=t(e,\"posix\",n),n+e.entry.offset+e.entry.save)}function r(e,n){return\"UTC\"==e.zone?n:(e.entry=r=t(e,\"wallclock\",n),0<(o=n-r.wallclock)&&o9)t+=s*l[c-10];else{if(a=new Date(n(e,t)),c<7)for(;s;)a.setUTCDate(a.getUTCDate()+i),a.getUTCDay()==c&&(s-=i);else 7==c?a.setUTCFullYear(a.getUTCFullYear()+s):8==c?a.setUTCMonth(a.getUTCMonth()+s):a.setUTCDate(a.getUTCDate()+s);null==(t=r(e,a.getTime()))&&(t=r(e,a.getTime()+864e5*i)-864e5*i)}return t}var a={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(e,t,n,r){var o,a,u=this.entry.offset+this.entry.save,i=Math.abs(u/1e3),l=[],s=3600;for(o=0;o<3;o++)l.push((\"0\"+Math.floor(i/s)).slice(-2)),i%=s,s/=60;return\"^\"!=n||u?(\"^\"==n&&(r=3),3==r?(a=(a=l.join(\":\")).replace(/:00$/,\"\"),\"^\"!=n&&(a=a.replace(/:00$/,\"\"))):r?(a=l.slice(0,r+1).join(\":\"),\"^\"==n&&(a=a.replace(/:00$/,\"\"))):a=l.slice(0,2).join(\"\"),a=(a=(u<0?\"-\":\"+\")+a).replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[n]||\"$1$2\")):\"Z\"},\"%\":function(e){return\"%\"},n:function(e){return\"\\n\"},t:function(e){return\"\\t\"},U:function(e){return s(e,0)},W:function(e){return s(e,1)},V:function(e){return c(e)[0]},G:function(e){return c(e)[1]},g:function(e){return c(e)[1]%100},j:function(e){return Math.floor((e.getTime()-Date.UTC(e.getUTCFullYear(),0))/864e5)+1},s:function(e){return Math.floor(e.getTime()/1e3)},C:function(e){return Math.floor(e.getUTCFullYear()/100)},N:function(e){return e.getTime()%1e3*1e6},m:function(e){return e.getUTCMonth()+1},Y:function(e){return e.getUTCFullYear()},y:function(e){return e.getUTCFullYear()%100},H:function(e){return e.getUTCHours()},M:function(e){return e.getUTCMinutes()},S:function(e){return e.getUTCSeconds()},e:function(e){return e.getUTCDate()},d:function(e){return e.getUTCDate()},u:function(e){return e.getUTCDay()||7},w:function(e){return e.getUTCDay()},l:function(e){return e.getUTCHours()%12||12},I:function(e){return e.getUTCHours()%12||12},k:function(e){return e.getUTCHours()},Z:function(e){return this.entry.abbrev},a:function(e){return this[this.locale].day.abbrev[e.getUTCDay()]},A:function(e){return this[this.locale].day.full[e.getUTCDay()]},h:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},b:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},B:function(e){return this[this.locale].month.full[e.getUTCMonth()]},P:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)].toLowerCase()},p:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)]},R:function(e,t){return this.convert([t,\"%H:%M\"])},T:function(e,t){return this.convert([t,\"%H:%M:%S\"])},D:function(e,t){return this.convert([t,\"%m/%d/%y\"])},F:function(e,t){return this.convert([t,\"%Y-%m-%d\"])},x:function(e,t){return this.convert([t,this[this.locale].date])},r:function(e,t){return this.convert([t,this[this.locale].time12||\"%I:%M:%S\"])},X:function(e,t){return this.convert([t,this[this.locale].time24])},c:function(e,t){return this.convert([t,this[this.locale].dateTime])},convert:function(e){if(!e.length)return\"1.0.23\";var t,a,u,l,s,c=Object.create(this),f=[];for(t=0;t=o?Math.floor((n-o)/7)+1:0}function c(e){var t,n,r;return n=e.getUTCFullYear(),t=new Date(Date.UTC(n,0)).getUTCDay(),(r=s(e,1)+(t>1&&t<=4?1:0))?53!=r||4==t||3==t&&29==new Date(n,1,29).getDate()?[r,e.getUTCFullYear()]:[1,e.getUTCFullYear()+1]:(n=e.getUTCFullYear()-1,[r=4==(t=new Date(Date.UTC(n,0)).getUTCDay())||3==t&&29==new Date(n,1,29).getDate()?53:52,e.getUTCFullYear()-1])}return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,(function(e){a[e].pad=2})),a.N.pad=9,a.j.pad=3,a.k.style=\"_\",a.l.style=\"_\",a.e.style=\"_\",function(){return a.convert(arguments)}}))},\n function _(r,t,n,e,i){e();const u=r(1),a=u.__importStar(r(183)),f=r(184),o=u.__importDefault(r(181)),l=r(21),s=r(8);function c(r,...t){return f.sprintf(r,...t)}function m(r,t,n){if(s.isNumber(r)){return c((()=>{switch(!1){case Math.floor(r)!=r:return\"%d\";case!(Math.abs(r)>.1&&Math.abs(r)<1e3):return\"%0.3f\";default:return\"%0.3e\"}})(),r)}return`${r}`}function p(r,t,e){if(null==t)return m;if(null!=e&&r in e){const t=e[r];if(s.isString(t)){if(t in n.DEFAULT_FORMATTERS)return n.DEFAULT_FORMATTERS[t];throw new Error(`Unknown tooltip field formatter type '${t}'`)}return function(r,n,e){return t.format(r,n,e)}}return n.DEFAULT_FORMATTERS.numeral}function d(r,t,n,e){if(\"$\"==r[0]){return function(r,t){if(r in t)return t[r];throw new Error(`Unknown special variable '$${r}'`)}(r.substring(1),e)}return function(r,t,n){const e=t.get_column(r);if(null==e)return null;if(s.isNumber(n))return e[n];const i=e[n.index];if(s.isTypedArray(i)||s.isArray(i))return s.isArray(i[0])?i[n.dim2][n.dim1]:i[n.flat_index];return i}(r.substring(1).replace(/[{}]/g,\"\"),t,n)}n.FormatterType=l.Enum(\"numeral\",\"printf\",\"datetime\"),n.DEFAULT_FORMATTERS={numeral:(r,t,n)=>a.format(r,t),datetime:(r,t,n)=>o.default(r,t),printf:(r,t,n)=>c(t,r)},n.sprintf=c,n.basic_formatter=m,n.get_formatter=p,n.get_value=d,n.replace_placeholders=function(r,t,n,e,i={},u){let a,f;if(s.isString(r)?(a=r,f=!1):(a=r.html,f=!0),a=a.replace(/@\\$name/g,(r=>`@{${i.name}}`)),a=a.replace(/((?:\\$\\w+)|(?:@\\w+)|(?:@{(?:[^{}]+)}))(?:{([^{}]+)})?/g,((r,a,o)=>{const l=d(a,t,n,i);if(null==l)return u?u(\"???\"):\"???\";if(\"safe\"==o)return f=!0,`${l}`;const s=`${p(a,o,e)(l,o,i)}`;return u?u(s):s})),f){return[...(new DOMParser).parseFromString(a,\"text/html\").body.childNodes]}return a}},\n function _(e,n,t,r,i){\n /*!\n * numbro.js\n * version : 1.6.2\n * author : Företagsplatsen AB\n * license : MIT\n * http://www.foretagsplatsen.se\n */\n var a,o={},l=o,u=\"en-US\",c=null,s=\"0,0\";void 0!==n&&n.exports;function f(e){this._value=e}function d(e){var n,t=\"\";for(n=0;n-1?function(e,n){var t,r,i,a;return t=(a=e.toString()).split(\"e\")[0],i=a.split(\"e\")[1],a=t.split(\".\")[0]+(r=t.split(\".\")[1]||\"\")+d(i-r.length),n>0&&(a+=\".\"+d(n)),a}(e,n):(t(e*o)/o).toFixed(n),r&&(i=new RegExp(\"0{1,\"+r+\"}$\"),a=a.replace(i,\"\")),a}function p(e,n,t){return n.indexOf(\"$\")>-1?function(e,n,t){var r,i,a=n,l=a.indexOf(\"$\"),c=a.indexOf(\"(\"),s=a.indexOf(\"+\"),f=a.indexOf(\"-\"),d=\"\",h=\"\";-1===a.indexOf(\"$\")?\"infix\"===o[u].currency.position?(h=o[u].currency.symbol,o[u].currency.spaceSeparated&&(h=\" \"+h+\" \")):o[u].currency.spaceSeparated&&(d=\" \"):a.indexOf(\" $\")>-1?(d=\" \",a=a.replace(\" $\",\"\")):a.indexOf(\"$ \")>-1?(d=\" \",a=a.replace(\"$ \",\"\")):a=a.replace(\"$\",\"\");if(i=m(e,a,t,h),-1===n.indexOf(\"$\"))switch(o[u].currency.position){case\"postfix\":i.indexOf(\")\")>-1?((i=i.split(\"\")).splice(-1,0,d+o[u].currency.symbol),i=i.join(\"\")):i=i+d+o[u].currency.symbol;break;case\"infix\":break;case\"prefix\":i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),r=Math.max(c,f)+1,i.splice(r,0,o[u].currency.symbol+d),i=i.join(\"\")):i=o[u].currency.symbol+d+i;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else l<=1?i.indexOf(\"(\")>-1||i.indexOf(\"+\")>-1||i.indexOf(\"-\")>-1?(r=1,(l-1?((i=i.split(\"\")).splice(-1,0,d+o[u].currency.symbol),i=i.join(\"\")):i=i+d+o[u].currency.symbol;return i}(e,n,t):n.indexOf(\"%\")>-1?function(e,n,t){var r,i=\"\";e*=100,n.indexOf(\" %\")>-1?(i=\" \",n=n.replace(\" %\",\"\")):n=n.replace(\"%\",\"\");(r=m(e,n,t)).indexOf(\")\")>-1?((r=r.split(\"\")).splice(-1,0,i+\"%\"),r=r.join(\"\")):r=r+i+\"%\";return r}(e,n,t):n.indexOf(\":\")>-1?function(e){var n=Math.floor(e/60/60),t=Math.floor((e-60*n*60)/60),r=Math.round(e-60*n*60-60*t);return n+\":\"+(t<10?\"0\"+t:t)+\":\"+(r<10?\"0\"+r:r)}(e):m(e,n,t)}function m(e,n,t,r){var i,a,l,s,f,d,p,m,x,g,O,b,w,y,M,v,$,B=!1,E=!1,F=!1,k=\"\",U=!1,N=!1,S=!1,j=!1,D=!1,C=\"\",L=\"\",T=Math.abs(e),K=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],G=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],I=\"\",P=!1,R=!1;if(0===e&&null!==c)return c;if(!isFinite(e))return\"\"+e;if(0===n.indexOf(\"{\")){var W=n.indexOf(\"}\");if(-1===W)throw Error('Format should also contain a \"}\"');b=n.slice(1,W),n=n.slice(W+1)}else b=\"\";if(n.indexOf(\"}\")===n.length-1){var Y=n.indexOf(\"{\");if(-1===Y)throw Error('Format should also contain a \"{\"');w=n.slice(Y+1,-1),n=n.slice(0,Y+1)}else w=\"\";if(v=null===($=-1===n.indexOf(\".\")?n.match(/([0-9]+).*/):n.match(/([0-9]+)\\..*/))?-1:$[1].length,-1!==n.indexOf(\"-\")&&(P=!0),n.indexOf(\"(\")>-1?(B=!0,n=n.slice(1,-1)):n.indexOf(\"+\")>-1&&(E=!0,n=n.replace(/\\+/g,\"\")),n.indexOf(\"a\")>-1){if(g=n.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],g=parseInt(g[0],10),U=n.indexOf(\"aK\")>=0,N=n.indexOf(\"aM\")>=0,S=n.indexOf(\"aB\")>=0,j=n.indexOf(\"aT\")>=0,D=U||N||S||j,n.indexOf(\" a\")>-1?(k=\" \",n=n.replace(\" a\",\"\")):n=n.replace(\"a\",\"\"),p=0===(p=(f=Math.floor(Math.log(T)/Math.LN10)+1)%3)?3:p,g&&0!==T&&(d=Math.floor(Math.log(T)/Math.LN10)+1-g,m=3*~~((Math.min(g,f)-p)/3),T/=Math.pow(10,m),-1===n.indexOf(\".\")&&g>3))for(n+=\"[.]\",M=(M=0===d?0:3*~~(d/3)-d)<0?M+3:M,i=0;i=Math.pow(10,12)&&!D||j?(k+=o[u].abbreviations.trillion,e/=Math.pow(10,12)):T=Math.pow(10,9)&&!D||S?(k+=o[u].abbreviations.billion,e/=Math.pow(10,9)):T=Math.pow(10,6)&&!D||N?(k+=o[u].abbreviations.million,e/=Math.pow(10,6)):(T=Math.pow(10,3)&&!D||U)&&(k+=o[u].abbreviations.thousand,e/=Math.pow(10,3)))}if(n.indexOf(\"b\")>-1)for(n.indexOf(\" b\")>-1?(C=\" \",n=n.replace(\" b\",\"\")):n=n.replace(\"b\",\"\"),s=0;s<=K.length;s++)if(a=Math.pow(1024,s),l=Math.pow(1024,s+1),e>=a&&e0&&(e/=a);break}if(n.indexOf(\"d\")>-1)for(n.indexOf(\" d\")>-1?(C=\" \",n=n.replace(\" d\",\"\")):n=n.replace(\"d\",\"\"),s=0;s<=G.length;s++)if(a=Math.pow(1e3,s),l=Math.pow(1e3,s+1),e>=a&&e0&&(e/=a);break}if(n.indexOf(\"o\")>-1&&(n.indexOf(\" o\")>-1?(L=\" \",n=n.replace(\" o\",\"\")):n=n.replace(\"o\",\"\"),o[u].ordinal&&(L+=o[u].ordinal(e))),n.indexOf(\"[.]\")>-1&&(F=!0,n=n.replace(\"[.]\",\".\")),x=e.toString().split(\".\")[0],O=n.split(\".\")[1],y=n.indexOf(\",\"),O){if(x=(I=-1!==O.indexOf(\"*\")?h(e,e.toString().split(\".\")[1].length,t):O.indexOf(\"[\")>-1?h(e,(O=(O=O.replace(\"]\",\"\")).split(\"[\"))[0].length+O[1].length,t,O[1].length):h(e,O.length,t)).split(\".\")[0],I.split(\".\")[1].length)I=(r?k+r:o[u].delimiters.decimal)+I.split(\".\")[1];else I=\"\";F&&0===Number(I.slice(1))&&(I=\"\")}else x=h(e,null,t);return x.indexOf(\"-\")>-1&&(x=x.slice(1),R=!0),x.length-1&&(x=x.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+o[u].delimiters.thousands)),0===n.indexOf(\".\")&&(x=\"\"),b+(n.indexOf(\"(\")2)&&(o.length<2?!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(u):1===o[0].length?!!o[0].match(/^\\d+$/)&&!o[0].match(u)&&!!o[1].match(/^\\d+$/):!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(u)&&!!o[1].match(/^\\d+$/)))))},n.exports={format:function(e,n,t,r){return null!=t&&t!==a.culture()&&a.setCulture(t),p(Number(e),null!=n?n:s,null==r?Math.round:r)}}},\n function _(e,n,t,r,i){!function(){\"use strict\";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function n(e){return i(a(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(t,r){var i,s,a,o,p,c,l,u,f,d=1,g=t.length,y=\"\";for(s=0;s=0),o.type){case\"b\":i=parseInt(i,10).toString(2);break;case\"c\":i=String.fromCharCode(parseInt(i,10));break;case\"d\":case\"i\":i=parseInt(i,10);break;case\"j\":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case\"e\":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case\"f\":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case\"g\":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case\"t\":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case\"x\":i=(parseInt(i,10)>>>0).toString(16);break;case\"X\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}e.json.test(o.type)?y+=i:(!e.number.test(o.type)||u&&!o.sign?f=\"\":(f=u?\"+\":\"-\",i=i.toString().replace(e.sign,\"\")),c=o.pad_char?\"0\"===o.pad_char?\"0\":o.pad_char.charAt(1):\" \",l=o.width-(f+i).length,p=o.width&&l>0?c.repeat(l):\"\",y+=o.align?f+i+p:\"0\"===c?f+p+i:p+f+i)}return y}var s=Object.create(null);function a(n){if(s[n])return s[n];for(var t,r=n,i=[],a=0;r;){if(null!==(t=e.text.exec(r)))i.push(t[0]);else if(null!==(t=e.modulo.exec(r)))i.push(\"%\");else{if(null===(t=e.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(t[2]){a|=1;var o=[],p=t[2],c=[];if(null===(c=e.key.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(c[1]);\"\"!==(p=p.substring(c[0].length));)if(null!==(c=e.key_access.exec(p)))o.push(c[1]);else{if(null===(c=e.index_access.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[n]=i}void 0!==t&&(t.sprintf=n,t.vsprintf=r),\"undefined\"!=typeof window&&(window.sprintf=n,window.vsprintf=r,\"function\"==typeof define&&define.amd&&define((function(){return{sprintf:n,vsprintf:r}})))}()},\n function _(e,i,n,t,a){t();const s=e(9),r=e(178),c=e(186),m=e(187),_=e(190),k=e(191),o=e(189);class T extends c.CompositeTicker{constructor(e){super(e)}static init_DatetimeTicker(){this.override({num_minor_ticks:0,tickers:()=>[new r.AdaptiveTicker({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*o.ONE_MILLI,num_minor_ticks:0}),new r.AdaptiveTicker({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:o.ONE_SECOND,max_interval:30*o.ONE_MINUTE,num_minor_ticks:0}),new r.AdaptiveTicker({mantissas:[1,2,4,6,8,12],base:24,min_interval:o.ONE_HOUR,max_interval:12*o.ONE_HOUR,num_minor_ticks:0}),new m.DaysTicker({days:s.range(1,32)}),new m.DaysTicker({days:s.range(1,31,3)}),new m.DaysTicker({days:[1,8,15,22]}),new m.DaysTicker({days:[1,15]}),new _.MonthsTicker({months:s.range(0,12,1)}),new _.MonthsTicker({months:s.range(0,12,2)}),new _.MonthsTicker({months:s.range(0,12,4)}),new _.MonthsTicker({months:s.range(0,12,6)}),new k.YearsTicker({})]})}}n.DatetimeTicker=T,T.__name__=\"DatetimeTicker\",T.init_DatetimeTicker()},\n function _(t,e,i,s,r){s();const n=t(179),_=t(9);class a extends n.ContinuousTicker{constructor(t){super(t)}static init_CompositeTicker(){this.define((({Array:t,Ref:e})=>({tickers:[t(e(n.ContinuousTicker)),[]]})))}get min_intervals(){return this.tickers.map((t=>t.get_min_interval()))}get max_intervals(){return this.tickers.map((t=>t.get_max_interval()))}get_min_interval(){return this.min_intervals[0]}get_max_interval(){return this.max_intervals[0]}get_best_ticker(t,e,i){const s=e-t,r=this.get_ideal_interval(t,e,i),n=[_.sorted_index(this.min_intervals,r)-1,_.sorted_index(this.max_intervals,r)],a=[this.min_intervals[n[0]],this.max_intervals[n[1]]].map((t=>Math.abs(i-s/t)));let c;if(_.is_empty(a.filter((t=>!isNaN(t)))))c=this.tickers[0];else{const t=n[_.argmin(a)];c=this.tickers[t]}return c}get_interval(t,e,i){return this.get_best_ticker(t,e,i).get_interval(t,e,i)}get_ticks_no_defaults(t,e,i,s){return this.get_best_ticker(t,e,s).get_ticks_no_defaults(t,e,i,s)}}i.CompositeTicker=a,a.__name__=\"CompositeTicker\",a.init_CompositeTicker()},\n function _(t,e,n,i,s){i();const a=t(188),o=t(189),r=t(9);class c extends a.SingleIntervalTicker{constructor(t){super(t)}static init_DaysTicker(){this.define((({Int:t,Array:e})=>({days:[e(t),[]]}))),this.override({num_minor_ticks:0})}initialize(){super.initialize();const t=this.days;t.length>1?this.interval=(t[1]-t[0])*o.ONE_DAY:this.interval=31*o.ONE_DAY}get_ticks_no_defaults(t,e,n,i){const s=function(t,e){const n=o.last_month_no_later_than(new Date(t)),i=o.last_month_no_later_than(new Date(e));i.setUTCMonth(i.getUTCMonth()+1);const s=[],a=n;for(;s.push(o.copy_date(a)),a.setUTCMonth(a.getUTCMonth()+1),!(a>i););return s}(t,e),a=this.days,c=this.interval;return{major:r.concat(s.map((t=>((t,e)=>{const n=t.getUTCMonth(),i=[];for(const s of a){const a=o.copy_date(t);a.setUTCDate(s),new Date(a.getTime()+e/2).getUTCMonth()==n&&i.push(a)}return i})(t,c)))).map((t=>t.getTime())).filter((n=>t<=n&&n<=e)),minor:[]}}}n.DaysTicker=c,c.__name__=\"DaysTicker\",c.init_DaysTicker()},\n function _(e,t,n,i,r){i();const l=e(179);class a extends l.ContinuousTicker{constructor(e){super(e)}static init_SingleIntervalTicker(){this.define((({Number:e})=>({interval:[e]})))}get_interval(e,t,n){return this.interval}get_min_interval(){return this.interval}get_max_interval(){return this.interval}}n.SingleIntervalTicker=a,a.__name__=\"SingleIntervalTicker\",a.init_SingleIntervalTicker()},\n function _(t,n,e,_,E){function N(t){return new Date(t.getTime())}function O(t){const n=N(t);return n.setUTCDate(1),n.setUTCHours(0),n.setUTCMinutes(0),n.setUTCSeconds(0),n.setUTCMilliseconds(0),n}_(),e.ONE_MILLI=1,e.ONE_SECOND=1e3,e.ONE_MINUTE=60*e.ONE_SECOND,e.ONE_HOUR=60*e.ONE_MINUTE,e.ONE_DAY=24*e.ONE_HOUR,e.ONE_MONTH=30*e.ONE_DAY,e.ONE_YEAR=365*e.ONE_DAY,e.copy_date=N,e.last_month_no_later_than=O,e.last_year_no_later_than=function(t){const n=O(t);return n.setUTCMonth(0),n}},\n function _(t,e,n,i,s){i();const r=t(188),a=t(189),o=t(9);class c extends r.SingleIntervalTicker{constructor(t){super(t)}static init_MonthsTicker(){this.define((({Int:t,Array:e})=>({months:[e(t),[]]})))}initialize(){super.initialize();const t=this.months;t.length>1?this.interval=(t[1]-t[0])*a.ONE_MONTH:this.interval=12*a.ONE_MONTH}get_ticks_no_defaults(t,e,n,i){const s=function(t,e){const n=a.last_year_no_later_than(new Date(t)),i=a.last_year_no_later_than(new Date(e));i.setUTCFullYear(i.getUTCFullYear()+1);const s=[],r=n;for(;s.push(a.copy_date(r)),r.setUTCFullYear(r.getUTCFullYear()+1),!(r>i););return s}(t,e),r=this.months;return{major:o.concat(s.map((t=>r.map((e=>{const n=a.copy_date(t);return n.setUTCMonth(e),n}))))).map((t=>t.getTime())).filter((n=>t<=n&&n<=e)),minor:[]}}}n.MonthsTicker=c,c.__name__=\"MonthsTicker\",c.init_MonthsTicker()},\n function _(e,t,a,i,r){i();const n=e(177),_=e(188),s=e(189);class c extends _.SingleIntervalTicker{constructor(e){super(e)}initialize(){super.initialize(),this.interval=s.ONE_YEAR,this.basic_ticker=new n.BasicTicker({num_minor_ticks:0})}get_ticks_no_defaults(e,t,a,i){const r=s.last_year_no_later_than(new Date(e)).getUTCFullYear(),n=s.last_year_no_later_than(new Date(t)).getUTCFullYear();return{major:this.basic_ticker.get_ticks_no_defaults(r,n,a,i).major.map((e=>Date.UTC(e,0,1))).filter((a=>e<=a&&a<=t)),minor:[]}}}a.YearsTicker=c,c.__name__=\"YearsTicker\"},\n function _(i,s,t,e,o){e();const n=i(173),r=i(193),_=i(194);class c extends n.ContinuousAxisView{}t.LogAxisView=c,c.__name__=\"LogAxisView\";class x extends n.ContinuousAxis{constructor(i){super(i)}static init_LogAxis(){this.prototype.default_view=c,this.override({ticker:()=>new _.LogTicker,formatter:()=>new r.LogTickFormatter})}}t.LogAxis=x,x.__name__=\"LogAxis\",x.init_LogAxis()},\n function _(t,e,r,i,n){i();const o=t(166),a=t(176),s=t(194),c=t(167),{log:l,round:u}=Math;class _ extends o.TickFormatter{constructor(t){super(t)}static init_LogTickFormatter(){this.define((({Ref:t,Nullable:e})=>({ticker:[e(t(s.LogTicker)),null]})))}initialize(){super.initialize(),this.basic_formatter=new a.BasicTickFormatter}format_graphics(t,e){var r,i;if(0==t.length)return[];const n=null!==(i=null===(r=this.ticker)||void 0===r?void 0:r.base)&&void 0!==i?i:10,o=this._exponents(t,n);return null==o?this.basic_formatter.format_graphics(t,e):o.map((t=>{const e=new c.TextBox({text:a.unicode_replace(`${n}`)}),r=new c.TextBox({text:a.unicode_replace(`${t}`)});return new c.BaseExpo(e,r)}))}_exponents(t,e){let r=null;const i=[];for(const n of t){const t=u(l(n)/l(e));if(r==t)return null;r=t,i.push(t)}return i}doFormat(t,e){var r,i;if(0==t.length)return[];const n=null!==(i=null===(r=this.ticker)||void 0===r?void 0:r.base)&&void 0!==i?i:10,o=this._exponents(t,n);return null==o?this.basic_formatter.doFormat(t,e):o.map((t=>a.unicode_replace(`${n}^${t}`)))}}r.LogTickFormatter=_,_.__name__=\"LogTickFormatter\",_.init_LogTickFormatter()},\n function _(t,o,e,i,s){i();const n=t(178),r=t(9);class c extends n.AdaptiveTicker{constructor(t){super(t)}static init_LogTicker(){this.override({mantissas:[1,5]})}get_ticks_no_defaults(t,o,e,i){const s=this.num_minor_ticks,n=[],c=this.base,a=Math.log(t)/Math.log(c),f=Math.log(o)/Math.log(c),l=f-a;let h;if(isFinite(l))if(l<2){const e=this.get_interval(t,o,i),c=Math.floor(t/e),a=Math.ceil(o/e);if(h=r.range(c,a+1).filter((t=>0!=t)).map((t=>t*e)).filter((e=>t<=e&&e<=o)),s>0&&h.length>0){const t=e/s,o=r.range(0,s).map((o=>o*t));for(const t of o.slice(1))n.push(h[0]-t);for(const t of h)for(const e of o)n.push(t+e)}}else{const t=Math.ceil(.999999*a),o=Math.floor(1.000001*f),e=Math.ceil((o-t)/9);if(h=r.range(t-1,o+1,e).map((t=>c**t)),s>0&&h.length>0){const t=c**e/s,o=r.range(1,s+1).map((o=>o*t));for(const t of o)n.push(h[0]/t);n.push(h[0]);for(const t of h)for(const e of o)n.push(t*e)}}else h=[];return{major:h.filter((e=>t<=e&&e<=o)),minor:n.filter((e=>t<=e&&e<=o))}}}e.LogTicker=c,c.__name__=\"LogTicker\",c.init_LogTicker()},\n function _(e,t,i,r,s){r();const a=e(163),o=e(175),c=e(196),n=e(197);class _ extends a.AxisView{}i.MercatorAxisView=_,_.__name__=\"MercatorAxisView\";class x extends o.LinearAxis{constructor(e){super(e)}static init_MercatorAxis(){this.prototype.default_view=_,this.override({ticker:()=>new n.MercatorTicker({dimension:\"lat\"}),formatter:()=>new c.MercatorTickFormatter({dimension:\"lat\"})})}}i.MercatorAxis=x,x.__name__=\"MercatorAxis\",x.init_MercatorAxis()},\n function _(r,t,e,o,n){o();const i=r(176),c=r(20),a=r(65);class s extends i.BasicTickFormatter{constructor(r){super(r)}static init_MercatorTickFormatter(){this.define((({Nullable:r})=>({dimension:[r(c.LatLon),null]})))}doFormat(r,t){if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0==r.length)return[];const e=r.length,o=new Array(e);if(\"lon\"==this.dimension)for(let n=0;n({dimension:[t(e.LatLon),null]})))}get_ticks_no_defaults(t,o,n,r){if(null==this.dimension)throw new Error(`${this}.dimension wasn't configured`);return[t,o]=c.clip_mercator(t,o,this.dimension),\"lon\"==this.dimension?this._get_ticks_lon(t,o,n,r):this._get_ticks_lat(t,o,n,r)}_get_ticks_lon(t,o,n,r){const[s]=c.wgs84_mercator.invert(t,n),[i,e]=c.wgs84_mercator.invert(o,n),_=super.get_ticks_no_defaults(s,i,n,r),a=[];for(const t of _.major)if(c.in_bounds(t,\"lon\")){const[o]=c.wgs84_mercator.compute(t,e);a.push(o)}const m=[];for(const t of _.minor)if(c.in_bounds(t,\"lon\")){const[o]=c.wgs84_mercator.compute(t,e);m.push(o)}return{major:a,minor:m}}_get_ticks_lat(t,o,n,r){const[,s]=c.wgs84_mercator.invert(n,t),[i,e]=c.wgs84_mercator.invert(n,o),_=super.get_ticks_no_defaults(s,e,n,r),a=[];for(const t of _.major)if(c.in_bounds(t,\"lat\")){const[,o]=c.wgs84_mercator.compute(i,t);a.push(o)}const m=[];for(const t of _.minor)if(c.in_bounds(t,\"lat\")){const[,o]=c.wgs84_mercator.compute(i,t);m.push(o)}return{major:a,minor:m}}}n.MercatorTicker=_,_.__name__=\"MercatorTicker\",_.init_MercatorTicker()},\n function _(e,i,r,c,k){c(),k(\"AdaptiveTicker\",e(178).AdaptiveTicker),k(\"BasicTicker\",e(177).BasicTicker),k(\"CategoricalTicker\",e(171).CategoricalTicker),k(\"CompositeTicker\",e(186).CompositeTicker),k(\"ContinuousTicker\",e(179).ContinuousTicker),k(\"DatetimeTicker\",e(185).DatetimeTicker),k(\"DaysTicker\",e(187).DaysTicker),k(\"FixedTicker\",e(199).FixedTicker),k(\"LogTicker\",e(194).LogTicker),k(\"MercatorTicker\",e(197).MercatorTicker),k(\"MonthsTicker\",e(190).MonthsTicker),k(\"SingleIntervalTicker\",e(188).SingleIntervalTicker),k(\"Ticker\",e(165).Ticker),k(\"YearsTicker\",e(191).YearsTicker),k(\"BinnedTicker\",e(200).BinnedTicker)},\n function _(i,t,e,r,n){r();const s=i(179);class _ extends s.ContinuousTicker{constructor(i){super(i)}static init_FixedTicker(){this.define((({Number:i,Array:t})=>({ticks:[t(i),[]],minor_ticks:[t(i),[]]})))}get_ticks_no_defaults(i,t,e,r){return{major:this.ticks,minor:this.minor_ticks}}get_interval(i,t,e){return 0}get_min_interval(){return 0}get_max_interval(){return 0}}e.FixedTicker=_,_.__name__=\"FixedTicker\",_.init_FixedTicker()},\n function _(e,n,t,i,r){i();const c=e(165),o=e(201),s=e(12);class a extends c.Ticker{constructor(e){super(e)}static init_BinnedTicker(){this.define((({Number:e,Ref:n,Or:t,Auto:i})=>({mapper:[n(o.ScanningColorMapper)],num_major_ticks:[t(e,i),8]})))}get_ticks(e,n,t,i){const{binning:r}=this.mapper.metrics,c=Math.max(0,s.left_edge_index(e,r)),o=Math.min(s.left_edge_index(n,r)+1,r.length-1),a=[];for(let e=c;e<=o;e++)a.push(r[e]);const{num_major_ticks:_}=this,m=[],h=\"auto\"==_?a.length:_,l=Math.max(1,Math.floor(a.length/h));for(let e=0;eo.binning[o.binning.length-1])return r;return e[a.left_edge_index(n,o.binning)]}}i.ScanningColorMapper=c,c.__name__=\"ScanningColorMapper\"},\n function _(t,o,e,n,s){n();const l=t(203),i=t(61),c=t(9),a=t(8);class r extends l.ColorMapper{constructor(t){super(t),this._scan_data=null}static init_ContinuousColorMapper(){this.define((({Number:t,String:o,Ref:e,Color:n,Or:s,Tuple:l,Array:c,Nullable:a})=>({high:[a(t),null],low:[a(t),null],high_color:[a(n),null],low_color:[a(n),null],domain:[c(l(e(i.GlyphRenderer),s(o,c(o)))),[]]})))}connect_signals(){super.connect_signals();const t=()=>{for(const[t]of this.domain)this.connect(t.view.change,(()=>this.update_data())),this.connect(t.data_source.selected.change,(()=>this.update_data()))};this.connect(this.properties.domain.change,(()=>t())),t()}update_data(){const{domain:t,palette:o}=this,e=[...this._collect(t)];this._scan_data=this.scan(e,o.length),this.metrics_change.emit(),this.change.emit()}get metrics(){return null==this._scan_data&&this.update_data(),this._scan_data}*_collect(t){for(const[o,e]of t)for(const t of a.isArray(e)?e:[e]){let e=o.data_source.get_column(t);e=o.view.indices.select(e);const n=o.view.masked,s=o.data_source.selected.indices;let l;if(null!=n&&s.length>0?l=c.intersection([...n],s):null!=n?l=[...n]:s.length>0&&(l=s),null!=l&&(e=c.map(l,(t=>e[t]))),e.length>0&&!a.isNumber(e[0]))for(const t of e)yield*t;else yield*e}}_v_compute(t,o,e,n){const{nan_color:s}=n;let{low_color:l,high_color:i}=n;null==l&&(l=e[0]),null==i&&(i=e[e.length-1]);const{domain:a}=this,r=c.is_empty(a)?t:[...this._collect(a)];this._scan_data=this.scan(r,e.length),this.metrics_change.emit();for(let n=0,c=t.length;n({palette:[r(t)],nan_color:[t,\"gray\"]})))}v_compute(t){const r=new Array(t.length);return this._v_compute(t,r,this.palette,this._colors((t=>t))),r}get rgba_mapper(){const t=this,r=p(this.palette),e=this._colors(s);return{v_compute(n){const o=new c.ColorArray(n.length);return t._v_compute(n,o,r,e),new Uint8ClampedArray(l.to_big_endian(o).buffer)}}}_colors(t){return{nan_color:t(this.nan_color)}}}e.ColorMapper=u,u.__name__=\"ColorMapper\",u.init_ColorMapper()},\n function _(r,e,n,s,o){s();const p=r(149);class t extends p.Transform{constructor(r){super(r)}compute(r){throw new Error(\"mapping single values is not supported\")}}n.Mapper=t,t.__name__=\"Mapper\"},\n function _(t,r,a,e,c){e(),c(\"BasicTickFormatter\",t(176).BasicTickFormatter),c(\"CategoricalTickFormatter\",t(172).CategoricalTickFormatter),c(\"DatetimeTickFormatter\",t(180).DatetimeTickFormatter),c(\"FuncTickFormatter\",t(206).FuncTickFormatter),c(\"LogTickFormatter\",t(193).LogTickFormatter),c(\"MercatorTickFormatter\",t(196).MercatorTickFormatter),c(\"NumeralTickFormatter\",t(207).NumeralTickFormatter),c(\"PrintfTickFormatter\",t(208).PrintfTickFormatter),c(\"TickFormatter\",t(166).TickFormatter)},\n function _(t,n,e,s,i){s();const r=t(166),c=t(13),a=t(34);class u extends r.TickFormatter{constructor(t){super(t)}static init_FuncTickFormatter(){this.define((({Unknown:t,String:n,Dict:e})=>({args:[e(t),{}],code:[n,\"\"]})))}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}_make_func(){const t=a.use_strict(this.code);return new Function(\"tick\",\"index\",\"ticks\",...this.names,t)}doFormat(t,n){const e=this._make_func().bind({});return t.map(((t,n,s)=>e(t,n,s,...this.values)))}}e.FuncTickFormatter=u,u.__name__=\"FuncTickFormatter\",u.init_FuncTickFormatter()},\n function _(r,t,n,e,a){e();const o=r(1).__importStar(r(183)),i=r(166),u=r(20);class c extends i.TickFormatter{constructor(r){super(r)}static init_NumeralTickFormatter(){this.define((({String:r})=>({format:[r,\"0,0\"],language:[r,\"en\"],rounding:[u.RoundingFunction,\"round\"]})))}get _rounding_fn(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}doFormat(r,t){const{format:n,language:e,_rounding_fn:a}=this;return r.map((r=>o.format(r,n,e,a)))}}n.NumeralTickFormatter=c,c.__name__=\"NumeralTickFormatter\",c.init_NumeralTickFormatter()},\n function _(t,r,i,n,o){n();const a=t(166),e=t(182);class c extends a.TickFormatter{constructor(t){super(t)}static init_PrintfTickFormatter(){this.define((({String:t})=>({format:[t,\"%s\"]})))}doFormat(t,r){return t.map((t=>e.sprintf(this.format,t)))}}i.PrintfTickFormatter=c,c.__name__=\"PrintfTickFormatter\",c.init_PrintfTickFormatter()},\n function _(r,o,a,p,e){p(),e(\"CategoricalColorMapper\",r(210).CategoricalColorMapper),e(\"CategoricalMarkerMapper\",r(212).CategoricalMarkerMapper),e(\"CategoricalPatternMapper\",r(213).CategoricalPatternMapper),e(\"ContinuousColorMapper\",r(202).ContinuousColorMapper),e(\"ColorMapper\",r(203).ColorMapper),e(\"LinearColorMapper\",r(214).LinearColorMapper),e(\"LogColorMapper\",r(215).LogColorMapper),e(\"ScanningColorMapper\",r(201).ScanningColorMapper),e(\"EqHistColorMapper\",r(216).EqHistColorMapper)},\n function _(t,o,a,r,e){r();const c=t(211),l=t(203),i=t(104);class s extends l.ColorMapper{constructor(t){super(t)}static init_CategoricalColorMapper(){this.define((({Number:t,Nullable:o})=>({factors:[i.FactorSeq],start:[t,0],end:[o(t),null]})))}_v_compute(t,o,a,{nan_color:r}){c.cat_v_compute(t,this.factors,a,o,this.start,this.end,r)}}a.CategoricalColorMapper=s,s.__name__=\"CategoricalColorMapper\",s.init_CategoricalColorMapper()},\n function _(n,t,e,l,i){l();const c=n(12),u=n(8);function f(n,t){if(n.length!=t.length)return!1;for(let e=0,l=n.length;ef(n,h)))),s=_<0||_>=e.length?r:e[_],l[g]=s}}},\n function _(r,e,a,t,s){t();const c=r(211),i=r(104),l=r(204),n=r(20);class p extends l.Mapper{constructor(r){super(r)}static init_CategoricalMarkerMapper(){this.define((({Number:r,Array:e,Nullable:a})=>({factors:[i.FactorSeq],markers:[e(n.MarkerType)],start:[r,0],end:[a(r),null],default_value:[n.MarkerType,\"circle\"]})))}v_compute(r){const e=new Array(r.length);return c.cat_v_compute(r,this.factors,this.markers,e,this.start,this.end,this.default_value),e}}a.CategoricalMarkerMapper=p,p.__name__=\"CategoricalMarkerMapper\",p.init_CategoricalMarkerMapper()},\n function _(t,a,e,r,n){r();const s=t(211),c=t(104),i=t(204),p=t(20);class l extends i.Mapper{constructor(t){super(t)}static init_CategoricalPatternMapper(){this.define((({Number:t,Array:a,Nullable:e})=>({factors:[c.FactorSeq],patterns:[a(p.HatchPatternType)],start:[t,0],end:[e(t),null],default_value:[p.HatchPatternType,\" \"]})))}v_compute(t){const a=new Array(t.length);return s.cat_v_compute(t,this.factors,this.patterns,a,this.start,this.end,this.default_value),a}}e.CategoricalPatternMapper=l,l.__name__=\"CategoricalPatternMapper\",l.init_CategoricalPatternMapper()},\n function _(n,r,o,t,a){t();const e=n(202),i=n(12);class s extends e.ContinuousColorMapper{constructor(n){super(n)}scan(n,r){const o=null!=this.low?this.low:i.min(n),t=null!=this.high?this.high:i.max(n);return{max:t,min:o,norm_factor:1/(t-o),normed_interval:1/r}}cmap(n,r,o,t,a){const e=r.length-1;if(n==a.max)return r[e];const i=(n-a.min)*a.norm_factor,s=Math.floor(i/a.normed_interval);return s<0?o:s>e?t:r[s]}}o.LinearColorMapper=s,s.__name__=\"LinearColorMapper\"},\n function _(o,t,n,r,l){r();const a=o(202),s=o(12);class e extends a.ContinuousColorMapper{constructor(o){super(o)}scan(o,t){const n=null!=this.low?this.low:s.min(o),r=null!=this.high?this.high:s.max(o);return{max:r,min:n,scale:t/(Math.log(r)-Math.log(n))}}cmap(o,t,n,r,l){const a=t.length-1;if(o>l.max)return r;if(o==l.max)return t[a];if(oa&&(e=a),t[e]}}n.LogColorMapper=e,e.__name__=\"LogColorMapper\"},\n function _(n,t,i,e,o){e();const s=n(201),r=n(12),a=n(9),l=n(19);class c extends s.ScanningColorMapper{constructor(n){super(n)}static init_EqHistColorMapper(){this.define((({Int:n})=>({bins:[n,65536]})))}scan(n,t){const i=null!=this.low?this.low:r.min(n),e=null!=this.high?this.high:r.max(n),o=this.bins,s=a.linspace(i,e,o+1),c=r.bin_counts(n,s),h=new Array(o);for(let n=0,t=s.length;nn/g));let m=t-1,M=[],_=0,f=2*t;for(;m!=t&&_<4&&0!=m;){const n=f/m;if(n>1e3)break;f=Math.round(Math.max(t*n,t));const i=a.range(0,f),e=r.map(u,(n=>n*(f-1)));M=r.interpolate(i,e,h);m=a.uniq(M).length-1,_++}if(0==m){M=[i,e];for(let n=0;ne*n+t}compute(e){return this._linear_compute(e)}v_compute(e){return this._linear_v_compute(e)}invert(e){return this._linear_invert(e)}v_invert(e){return this._linear_v_invert(e)}}n.LinearScale=u,u.__name__=\"LinearScale\"},\n function _(n,e,t,r,i){r();const a=n(146),o=n(12);class c extends a.Scale{constructor(n){super(n)}static init_LinearInterpolationScale(){this.internal((({Arrayable:n})=>({binning:[n]})))}get s_compute(){throw new Error(\"not implemented\")}compute(n){return n}v_compute(n){const{binning:e}=this,{start:t,end:r}=this.source_range,i=t,a=r,c=e.length,l=(r-t)/(c-1),s=new Float64Array(c);for(let n=0;n{if(na)return a;const t=o.left_edge_index(n,e),r=e[t],c=(n-r)/(e[t+1]-r),l=s[t];return l+c*(s[t+1]-l)}));return this._linear_v_compute(_)}invert(n){return n}v_invert(n){return new Float64Array(n)}}t.LinearInterpolationScale=c,c.__name__=\"LinearInterpolationScale\",c.init_LinearInterpolationScale()},\n function _(a,n,e,g,R){g(),R(\"DataRange\",a(160).DataRange),R(\"DataRange1d\",a(159).DataRange1d),R(\"FactorRange\",a(104).FactorRange),R(\"Range\",a(105).Range),R(\"Range1d\",a(156).Range1d)},\n function _(a,o,i,t,e){t();var n=a(141);e(\"Sizeable\",n.Sizeable),e(\"SizingPolicy\",n.SizingPolicy);var c=a(142);e(\"Layoutable\",c.Layoutable),e(\"LayoutItem\",c.LayoutItem);var r=a(222);e(\"HStack\",r.HStack),e(\"VStack\",r.VStack);var l=a(223);e(\"Grid\",l.Grid),e(\"Row\",l.Row),e(\"Column\",l.Column);var S=a(224);e(\"ContentBox\",S.ContentBox),e(\"VariadicBox\",S.VariadicBox)},\n function _(t,e,h,i,r){i();const n=t(142),o=t(99);class s extends n.Layoutable{constructor(){super(...arguments),this.children=[]}*[Symbol.iterator](){yield*this.children}}h.Stack=s,s.__name__=\"Stack\";class c extends s{_measure(t){let e=0,h=0;for(const t of this.children){const i=t.measure({width:0,height:0});e+=i.width,h=Math.max(h,i.height)}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t.top:0;let i=this.absolute?t.left:0;const{height:r}=t;for(const t of this.children){const{width:e}=t.measure({width:0,height:0});t.set_geometry(new o.BBox({left:i,width:e,top:h,height:r})),i+=e}}}h.HStack=c,c.__name__=\"HStack\";class a extends s{_measure(t){let e=0,h=0;for(const t of this.children){const i=t.measure({width:0,height:0});e=Math.max(e,i.width),h+=i.height}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t.left:0;let i=this.absolute?t.top:0;const{width:r}=t;for(const t of this.children){const{height:e}=t.measure({width:0,height:0});t.set_geometry(new o.BBox({top:i,height:e,left:h,width:r})),i+=e}}}h.VStack=a,a.__name__=\"VStack\";class l extends n.Layoutable{constructor(){super(...arguments),this.children=[]}*[Symbol.iterator](){yield*this.children}_measure(t){const{width_policy:e,height_policy:h}=this.sizing,{min:i,max:r}=Math;let n=0,o=0;for(const e of this.children){const{width:h,height:i}=e.measure(t);n=r(n,h),o=r(o,i)}return{width:(()=>{const{width:h}=this.sizing;if(t.width==1/0)return\"fixed\"==e&&null!=h?h:n;switch(e){case\"fixed\":return null!=h?h:n;case\"min\":return n;case\"fit\":return null!=h?i(t.width,h):t.width;case\"max\":return null!=h?r(t.width,h):t.width}})(),height:(()=>{const{height:e}=this.sizing;if(t.height==1/0)return\"fixed\"==h&&null!=e?e:o;switch(h){case\"fixed\":return null!=e?e:o;case\"min\":return o;case\"fit\":return null!=e?i(t.height,e):t.height;case\"max\":return null!=e?r(t.height,e):t.height}})()}}_set_geometry(t,e){super._set_geometry(t,e);const h=this.absolute?t:t.relative(),{left:i,right:r,top:n,bottom:s}=h,c=Math.round(h.vcenter),a=Math.round(h.hcenter);for(const e of this.children){const{margin:h,halign:l,valign:d}=e.sizing,{width:u,height:g,inner:_}=e.measure(t),w=(()=>{switch(`${d}_${l}`){case\"start_start\":return new o.BBox({left:i+h.left,top:n+h.top,width:u,height:g});case\"start_center\":return new o.BBox({hcenter:a,top:n+h.top,width:u,height:g});case\"start_end\":return new o.BBox({right:r-h.right,top:n+h.top,width:u,height:g});case\"center_start\":return new o.BBox({left:i+h.left,vcenter:c,width:u,height:g});case\"center_center\":return new o.BBox({hcenter:a,vcenter:c,width:u,height:g});case\"center_end\":return new o.BBox({right:r-h.right,vcenter:c,width:u,height:g});case\"end_start\":return new o.BBox({left:i+h.left,bottom:s-h.bottom,width:u,height:g});case\"end_center\":return new o.BBox({hcenter:a,bottom:s-h.bottom,width:u,height:g});case\"end_end\":return new o.BBox({right:r-h.right,bottom:s-h.bottom,width:u,height:g})}})(),m=null==_?w:new o.BBox({left:w.left+_.left,top:w.top+_.top,right:w.right-_.right,bottom:w.bottom-_.bottom});e.set_geometry(w,m)}}}h.NodeLayout=l,l.__name__=\"NodeLayout\"},\n function _(t,i,s,e,o){e();const n=t(141),l=t(142),r=t(8),h=t(99),c=t(9),{max:a,round:g}=Math;class p{constructor(t){this.def=t,this._map=new Map}get(t){let i=this._map.get(t);return void 0===i&&(i=this.def(),this._map.set(t,i)),i}apply(t,i){const s=this.get(t);this._map.set(t,i(s))}}p.__name__=\"DefaultMap\";class f{constructor(){this._items=[],this._nrows=0,this._ncols=0}get nrows(){return this._nrows}get ncols(){return this._ncols}add(t,i){const{r1:s,c1:e}=t;this._nrows=a(this._nrows,s+1),this._ncols=a(this._ncols,e+1),this._items.push({span:t,data:i})}at(t,i){return this._items.filter((({span:s})=>s.r0<=t&&t<=s.r1&&s.c0<=i&&i<=s.c1)).map((({data:t})=>t))}row(t){return this._items.filter((({span:i})=>i.r0<=t&&t<=i.r1)).map((({data:t})=>t))}col(t){return this._items.filter((({span:i})=>i.c0<=t&&t<=i.c1)).map((({data:t})=>t))}foreach(t){for(const{span:i,data:s}of this._items)t(i,s)}map(t){const i=new f;for(const{span:s,data:e}of this._items)i.add(s,t(s,e));return i}}f.__name__=\"Container\";class _ extends l.Layoutable{constructor(t=[]){super(),this.items=t,this.rows=\"auto\",this.cols=\"auto\",this.spacing=0}*[Symbol.iterator](){for(const{layout:t}of this.items)yield t}is_width_expanding(){if(super.is_width_expanding())return!0;if(\"fixed\"==this.sizing.width_policy)return!1;const{cols:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}is_height_expanding(){if(super.is_height_expanding())return!0;if(\"fixed\"==this.sizing.height_policy)return!1;const{rows:t}=this._state;return c.some(t,(t=>\"max\"==t.policy))}_init(){var t,i,s,e;super._init();const o=new f;for(const{layout:t,row:i,col:s,row_span:e,col_span:n}of this.items)if(t.sizing.visible){const l=i,r=s,h=i+(null!=e?e:1)-1,c=s+(null!=n?n:1)-1;o.add({r0:l,c0:r,r1:h,c1:c},t)}const{nrows:n,ncols:l}=o,h=new Array(n);for(let s=0;s{var t;const i=r.isPlainObject(this.rows)?null!==(t=this.rows[s])&&void 0!==t?t:this.rows[\"*\"]:this.rows;return null==i?{policy:\"auto\"}:r.isNumber(i)?{policy:\"fixed\",height:i}:r.isString(i)?{policy:i}:i})(),n=null!==(t=e.align)&&void 0!==t?t:\"auto\";if(\"fixed\"==e.policy)h[s]={policy:\"fixed\",height:e.height,align:n};else if(\"min\"==e.policy)h[s]={policy:\"min\",align:n};else if(\"fit\"==e.policy||\"max\"==e.policy)h[s]={policy:e.policy,flex:null!==(i=e.flex)&&void 0!==i?i:1,align:n};else{if(\"auto\"!=e.policy)throw new Error(\"unrechable\");c.some(o.row(s),(t=>t.is_height_expanding()))?h[s]={policy:\"max\",flex:1,align:n}:h[s]={policy:\"min\",align:n}}}const a=new Array(l);for(let t=0;t{var i;const s=r.isPlainObject(this.cols)?null!==(i=this.cols[t])&&void 0!==i?i:this.cols[\"*\"]:this.cols;return null==s?{policy:\"auto\"}:r.isNumber(s)?{policy:\"fixed\",width:s}:r.isString(s)?{policy:s}:s})(),n=null!==(s=i.align)&&void 0!==s?s:\"auto\";if(\"fixed\"==i.policy)a[t]={policy:\"fixed\",width:i.width,align:n};else if(\"min\"==i.policy)a[t]={policy:\"min\",align:n};else if(\"fit\"==i.policy||\"max\"==i.policy)a[t]={policy:i.policy,flex:null!==(e=i.flex)&&void 0!==e?e:1,align:n};else{if(\"auto\"!=i.policy)throw new Error(\"unrechable\");c.some(o.col(t),(t=>t.is_width_expanding()))?a[t]={policy:\"max\",flex:1,align:n}:a[t]={policy:\"min\",align:n}}}const[g,p]=r.isNumber(this.spacing)?[this.spacing,this.spacing]:this.spacing;this._state={items:o,nrows:n,ncols:l,rows:h,cols:a,rspacing:g,cspacing:p}}_measure_totals(t,i){const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state;return{height:c.sum(t)+(s-1)*o,width:c.sum(i)+(e-1)*n}}_measure_cells(t){const{items:i,nrows:s,ncols:e,rows:o,cols:l,rspacing:r,cspacing:h}=this._state,c=new Array(s);for(let t=0;t{const{r0:e,c0:f,r1:d,c1:u}=i,w=(d-e)*r,m=(u-f)*h;let y=0;for(let i=e;i<=d;i++)y+=t(i,f).height;y+=w;let x=0;for(let i=f;i<=u;i++)x+=t(e,i).width;x+=m;const b=s.measure({width:x,height:y});_.add(i,{layout:s,size_hint:b});const z=new n.Sizeable(b).grow_by(s.sizing.margin);z.height-=w,z.width-=m;const v=[];for(let t=e;t<=d;t++){const i=o[t];\"fixed\"==i.policy?z.height-=i.height:v.push(t)}if(z.height>0){const t=g(z.height/v.length);for(const i of v)c[i]=a(c[i],t)}const j=[];for(let t=f;t<=u;t++){const i=l[t];\"fixed\"==i.policy?z.width-=i.width:j.push(t)}if(z.width>0){const t=g(z.width/j.length);for(const i of j)p[i]=a(p[i],t)}}));return{size:this._measure_totals(c,p),row_heights:c,col_widths:p,size_hints:_}}_measure_grid(t){const{nrows:i,ncols:s,rows:e,cols:o,rspacing:n,cspacing:l}=this._state,r=s=>{let o;o=\"fixed\"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:t.height!=1/0&&this.is_height_expanding()?t.height:s.size.height;let l=0;for(let t=0;t0)for(let t=0;ti?i:e,t--}}}},h=i=>{let e;e=\"fixed\"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:t.width!=1/0&&this.is_width_expanding()?t.width:i.size.width;let n=0;for(let t=0;t0)for(let t=0;ts?s:o,t--}}}},c=this._measure_cells(((t,i)=>{const s=e[t],n=o[i];return{width:\"fixed\"==n.policy?n.width:1/0,height:\"fixed\"==s.policy?s.height:1/0}}));r(c),h(c);const p=this._measure_cells(((t,i)=>({width:c.col_widths[i],height:c.row_heights[t]})));r(p),h(p);const{row_heights:f,col_widths:_}=p;return{size:this._measure_totals(f,_),row_heights:f,col_widths:_}}_measure(t){const{size:i}=this._measure_grid(t);return i}_set_geometry(t,i){super._set_geometry(t,i);const{nrows:s,ncols:e,rspacing:o,cspacing:n}=this._state,{row_heights:l,col_widths:r}=this._measure_grid(t),{size_hints:c}=this._measure_cells(((t,i)=>({width:r[i],height:l[t]}))),f=this._state.rows.map(((t,i)=>Object.assign(Object.assign({},t),{top:0,height:l[i],get bottom(){return this.top+this.height}}))),_=this._state.cols.map(((t,i)=>Object.assign(Object.assign({},t),{left:0,width:r[i],get right(){return this.left+this.width}}))),d=c.map(((t,i)=>Object.assign(Object.assign({},i),{outer:new h.BBox,inner:new h.BBox})));for(let i=0,e=this.absolute?t.top:0;i{const{layout:r,size_hint:c}=l,{sizing:a}=r,{width:p,height:d}=c,u=function(t,i){let s=(i-t)*n;for(let e=t;e<=i;e++)s+=_[e].width;return s}(i,e),w=function(t,i){let s=(i-t)*o;for(let e=t;e<=i;e++)s+=f[e].height;return s}(t,s),m=i==e&&\"auto\"!=_[i].align?_[i].align:a.halign,y=t==s&&\"auto\"!=f[t].align?f[t].align:a.valign;let x=_[i].left;\"start\"==m?x+=a.margin.left:\"center\"==m?x+=g((u-p)/2):\"end\"==m&&(x+=u-a.margin.right-p);let b=f[t].top;\"start\"==y?b+=a.margin.top:\"center\"==y?b+=g((w-d)/2):\"end\"==y&&(b+=w-a.margin.bottom-d),l.outer=new h.BBox({left:x,top:b,width:p,height:d})}));const u=f.map((()=>({start:new p((()=>0)),end:new p((()=>0))}))),w=_.map((()=>({start:new p((()=>0)),end:new p((()=>0))})));d.foreach((({r0:t,c0:i,r1:s,c1:e},{size_hint:o,outer:n})=>{const{inner:l}=o;null!=l&&(u[t].start.apply(n.top,(t=>a(t,l.top))),u[s].end.apply(f[s].bottom-n.bottom,(t=>a(t,l.bottom))),w[i].start.apply(n.left,(t=>a(t,l.left))),w[e].end.apply(_[e].right-n.right,(t=>a(t,l.right))))})),d.foreach((({r0:t,c0:i,r1:s,c1:e},o)=>{const{size_hint:n,outer:l}=o,r=t=>{const i=this.absolute?l:l.relative(),s=i.left+t.left,e=i.top+t.top,o=i.right-t.right,n=i.bottom-t.bottom;return new h.BBox({left:s,top:e,right:o,bottom:n})};if(null!=n.inner){let h=r(n.inner);if(!1!==n.align){const o=u[t].start.get(l.top),n=u[s].end.get(f[s].bottom-l.bottom),c=w[i].start.get(l.left),a=w[e].end.get(_[e].right-l.right);try{h=r({top:o,bottom:n,left:c,right:a})}catch(t){}}o.inner=h}else o.inner=l})),d.foreach(((t,{layout:i,outer:s,inner:e})=>{i.set_geometry(s,e)}))}}s.Grid=_,_.__name__=\"Grid\";class d extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:0,col:i}))),this.rows=\"fit\"}}s.Row=d,d.__name__=\"Row\";class u extends _{constructor(t){super(),this.items=t.map(((t,i)=>({layout:t,row:i,col:0}))),this.cols=\"fit\"}}s.Column=u,u.__name__=\"Column\"},\n function _(e,t,s,n,i){n();const a=e(142),c=e(141),o=e(43);class r extends a.ContentLayoutable{constructor(e){super(),this.content_size=o.unsized(e,(()=>new c.Sizeable(o.size(e))))}_content_size(){return this.content_size}}s.ContentBox=r,r.__name__=\"ContentBox\";class _ extends a.Layoutable{constructor(e){super(),this.el=e}_measure(e){const t=new c.Sizeable(e).bounded_to(this.sizing.size);return o.sized(this.el,t,(()=>{const e=new c.Sizeable(o.content_size(this.el)),{border:t,padding:s}=o.extents(this.el);return e.grow_by(t).grow_by(s).map(Math.ceil)}))}}s.VariadicBox=_,_.__name__=\"VariadicBox\";class h extends _{constructor(e){super(e),this._cache=new Map}_measure(e){const{width:t,height:s}=e,n=`${t},${s}`;let i=this._cache.get(n);return null==i&&(i=super._measure(e),this._cache.set(n,i)),i}invalidate_cache(){this._cache.clear()}}s.CachedVariadicBox=h,h.__name__=\"CachedVariadicBox\"},\n function _(t,e,i,h,o){h();const s=t(141),r=t(142),n=t(99);class g extends r.Layoutable{constructor(){super(...arguments),this.min_border={left:0,top:0,right:0,bottom:0},this.padding={left:0,top:0,right:0,bottom:0}}*[Symbol.iterator](){yield this.top_panel,yield this.bottom_panel,yield this.left_panel,yield this.right_panel,yield this.center_panel}_measure(t){t=new s.Sizeable({width:\"fixed\"==this.sizing.width_policy||t.width==1/0?this.sizing.width:t.width,height:\"fixed\"==this.sizing.height_policy||t.height==1/0?this.sizing.height:t.height});const e=this.left_panel.measure({width:0,height:t.height}),i=Math.max(e.width,this.min_border.left)+this.padding.left,h=this.right_panel.measure({width:0,height:t.height}),o=Math.max(h.width,this.min_border.right)+this.padding.right,r=this.top_panel.measure({width:t.width,height:0}),n=Math.max(r.height,this.min_border.top)+this.padding.top,g=this.bottom_panel.measure({width:t.width,height:0}),a=Math.max(g.height,this.min_border.bottom)+this.padding.bottom,d=new s.Sizeable(t).shrink_by({left:i,right:o,top:n,bottom:a}),l=this.center_panel.measure(d);return{width:i+l.width+o,height:n+l.height+a,inner:{left:i,right:o,top:n,bottom:a},align:(()=>{const{width_policy:t,height_policy:e}=this.center_panel.sizing;return\"fixed\"!=t&&\"fixed\"!=e})()}}_set_geometry(t,e){super._set_geometry(t,e),this.center_panel.set_geometry(e);const i=this.left_panel.measure({width:0,height:t.height}),h=this.right_panel.measure({width:0,height:t.height}),o=this.top_panel.measure({width:t.width,height:0}),s=this.bottom_panel.measure({width:t.width,height:0}),{left:r,top:g,right:a,bottom:d}=e;this.top_panel.set_geometry(new n.BBox({left:r,right:a,bottom:g,height:o.height})),this.bottom_panel.set_geometry(new n.BBox({left:r,right:a,top:d,height:s.height})),this.left_panel.set_geometry(new n.BBox({top:g,bottom:d,right:r,width:i.width})),this.right_panel.set_geometry(new n.BBox({top:g,bottom:d,left:a,width:h.width}))}}i.BorderLayout=g,g.__name__=\"BorderLayout\"},\n function _(t,e,i,s,n){s();const o=t(1),l=t(139),a=t(10),_=t(143),d=t(20),h=o.__importStar(t(48));class r extends l.TextAnnotationView{_get_size(){const{ctx:t}=this.layer;this.visuals.text.set_value(t);const{width:e}=t.measureText(this.model.text),{height:i}=_.font_metrics(t.font);return{width:e,height:i}}_render(){const{angle:t,angle_units:e}=this.model,i=a.resolve_angle(t,e),s=null!=this.layout?this.layout:this.plot_view.frame,n=this.coordinates.x_scale,o=this.coordinates.y_scale;let l=\"data\"==this.model.x_units?n.compute(this.model.x):s.bbox.xview.compute(this.model.x),_=\"data\"==this.model.y_units?o.compute(this.model.y):s.bbox.yview.compute(this.model.y);l+=this.model.x_offset,_-=this.model.y_offset;(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,this.model.text,l,_,i)}}i.LabelView=r,r.__name__=\"LabelView\";class c extends l.TextAnnotation{constructor(t){super(t)}static init_Label(){this.prototype.default_view=r,this.mixins([h.Text,[\"border_\",h.Line],[\"background_\",h.Fill]]),this.define((({Number:t,String:e,Angle:i})=>({x:[t],x_units:[d.SpatialUnits,\"data\"],y:[t],y_units:[d.SpatialUnits,\"data\"],text:[e,\"\"],angle:[i,0],angle_units:[d.AngleUnits,\"rad\"],x_offset:[t,0],y_offset:[t,0]}))),this.override({background_fill_color:null,border_line_color:null})}}i.Label=c,c.__name__=\"Label\",c.init_Label()},\n function _(t,e,s,i,o){i();const l=t(1),n=t(139),a=t(56),r=t(130),_=l.__importStar(t(48)),c=t(20),h=t(43),d=l.__importStar(t(18)),u=t(143);class x extends n.TextAnnotationView{set_data(t){a.DataAnnotationView.prototype.set_data.call(this,t)}initialize(){if(super.initialize(),this.set_data(this.model.source),\"css\"==this.model.render_mode)for(let t=0,e=this.text.length;t{this.set_data(this.model.source),\"css\"==this.model.render_mode?this.render():this.request_render()};this.connect(this.model.change,t),this.connect(this.model.source.streaming,t),this.connect(this.model.source.patching,t),this.connect(this.model.source.change,t)}_calculate_text_dimensions(t,e){const{width:s}=t.measureText(e),{height:i}=u.font_metrics(this.visuals.text.font_value(0));return[s,i]}_map_data(){const t=this.coordinates.x_scale,e=this.coordinates.y_scale,s=null!=this.layout?this.layout:this.plot_view.frame;return[\"data\"==this.model.x_units?t.v_compute(this._x):s.bbox.xview.v_compute(this._x),\"data\"==this.model.y_units?e.v_compute(this._y):s.bbox.yview.v_compute(this._y)]}_render(){const t=\"canvas\"==this.model.render_mode?this._v_canvas_text.bind(this):this._v_css_text.bind(this),{ctx:e}=this.layer,[s,i]=this._map_data();for(let o=0,l=this.text.length;o({x:[d.XCoordinateSpec,{field:\"x\"}],y:[d.YCoordinateSpec,{field:\"y\"}],x_units:[c.SpatialUnits,\"data\"],y_units:[c.SpatialUnits,\"data\"],text:[d.StringSpec,{field:\"text\"}],angle:[d.AngleSpec,0],x_offset:[d.NumberSpec,{value:0}],y_offset:[d.NumberSpec,{value:0}],source:[t(r.ColumnDataSource),()=>new r.ColumnDataSource]}))),this.override({background_fill_color:null,border_line_color:null})}}s.LabelSet=v,v.__name__=\"LabelSet\",v.init_LabelSet()},\n function _(t,e,i,s,l){s();const n=t(1),h=t(40),o=t(229),a=t(20),_=n.__importStar(t(48)),r=t(15),d=t(140),c=t(143),g=t(99),m=t(9),b=t(8),f=t(11);class u extends h.AnnotationView{update_layout(){const{panel:t}=this;this.layout=null!=t?new d.SideLayout(t,(()=>this.get_size())):void 0}cursor(t,e){return\"none\"==this.model.click_policy?null:\"pointer\"}get legend_padding(){return null!=this.model.border_line_color?this.model.padding:0}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.item_change,(()=>this.request_render()))}compute_legend_bbox(){const t=this.model.get_legend_names(),{glyph_height:e,glyph_width:i}=this.model,{label_height:s,label_width:l}=this.model;this.max_label_height=m.max([c.font_metrics(this.visuals.label_text.font_value()).height,s,e]);const{ctx:n}=this.layer;n.save(),this.visuals.label_text.set_value(n),this.text_widths=new Map;for(const e of t)this.text_widths.set(e,m.max([n.measureText(e).width,l]));this.visuals.title_text.set_value(n),this.title_height=this.model.title?c.font_metrics(this.visuals.title_text.font_value()).height+this.model.title_standoff:0,this.title_width=this.model.title?n.measureText(this.model.title).width:0,n.restore();const h=Math.max(m.max([...this.text_widths.values()]),0),o=this.model.margin,{legend_padding:a}=this,_=this.model.spacing,{label_standoff:r}=this.model;let d,u;if(\"vertical\"==this.model.orientation)d=t.length*this.max_label_height+Math.max(t.length-1,0)*_+2*a+this.title_height,u=m.max([h+i+r+2*a,this.title_width+2*a]);else{let e=2*a+Math.max(t.length-1,0)*_;for(const[,t]of this.text_widths)e+=m.max([t,l])+i+r;u=m.max([this.title_width+2*a,e]),d=this.max_label_height+this.title_height+2*a}const x=null!=this.layout?this.layout:this.plot_view.frame,[p,w]=x.bbox.ranges,{location:v}=this.model;let y,k;if(b.isString(v))switch(v){case\"top_left\":y=p.start+o,k=w.start+o;break;case\"top\":case\"top_center\":y=(p.end+p.start)/2-u/2,k=w.start+o;break;case\"top_right\":y=p.end-o-u,k=w.start+o;break;case\"bottom_right\":y=p.end-o-u,k=w.end-o-d;break;case\"bottom\":case\"bottom_center\":y=(p.end+p.start)/2-u/2,k=w.end-o-d;break;case\"bottom_left\":y=p.start+o,k=w.end-o-d;break;case\"left\":case\"center_left\":y=p.start+o,k=(w.end+w.start)/2-d/2;break;case\"center\":case\"center_center\":y=(p.end+p.start)/2-u/2,k=(w.end+w.start)/2-d/2;break;case\"right\":case\"center_right\":y=p.end-o-u,k=(w.end+w.start)/2-d/2}else if(b.isArray(v)&&2==v.length){const[t,e]=v;y=x.bbox.xview.compute(t),k=x.bbox.yview.compute(e)-d}else f.unreachable();return new g.BBox({left:y,top:k,width:u,height:d})}interactive_bbox(){return this.compute_legend_bbox()}interactive_hit(t,e){return this.interactive_bbox().contains(t,e)}on_hit(t,e){let i;const{glyph_width:s}=this.model,{legend_padding:l}=this,n=this.model.spacing,{label_standoff:h}=this.model;let o=i=l;const a=this.compute_legend_bbox(),_=\"vertical\"==this.model.orientation;for(const r of this.model.items){const d=r.get_labels_list_from_label_prop();for(const c of d){const d=a.x+o,m=a.y+i+this.title_height;let b,f;[b,f]=_?[a.width-2*l,this.max_label_height]:[this.text_widths.get(c)+s+h,this.max_label_height];if(new g.BBox({left:d,top:m,width:b,height:f}).contains(t,e)){switch(this.model.click_policy){case\"hide\":for(const t of r.renderers)t.visible=!t.visible;break;case\"mute\":for(const t of r.renderers)t.muted=!t.muted}return!0}_?i+=this.max_label_height+n:o+=this.text_widths.get(c)+s+h+n}}return!1}_render(){if(0==this.model.items.length)return;for(const t of this.model.items)t.legend=this.model;const{ctx:t}=this.layer,e=this.compute_legend_bbox();t.save(),this._draw_legend_box(t,e),this._draw_legend_items(t,e),this._draw_title(t,e),t.restore()}_draw_legend_box(t,e){t.beginPath(),t.rect(e.x,e.y,e.width,e.height),this.visuals.background_fill.set_value(t),t.fill(),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke())}_draw_legend_items(t,e){const{glyph_width:i,glyph_height:s}=this.model,{legend_padding:l}=this,n=this.model.spacing,{label_standoff:h}=this.model;let o=l,a=l;const _=\"vertical\"==this.model.orientation;for(const r of this.model.items){const d=r.get_labels_list_from_label_prop(),c=r.get_field_from_label_prop();if(0==d.length)continue;const g=(()=>{switch(this.model.click_policy){case\"none\":return!0;case\"hide\":return m.every(r.renderers,(t=>t.visible));case\"mute\":return m.every(r.renderers,(t=>!t.muted))}})();for(const m of d){const d=e.x+o,b=e.y+a+this.title_height,f=d+i,u=b+s;_?a+=this.max_label_height+n:o+=this.text_widths.get(m)+i+h+n,this.visuals.label_text.set_value(t),t.fillText(m,f+h,b+this.max_label_height/2);for(const e of r.renderers){const i=this.plot_view.renderer_view(e);null==i||i.draw_legend(t,d,f,b,u,c,m,r.index)}if(!g){let s,n;[s,n]=_?[e.width-2*l,this.max_label_height]:[this.text_widths.get(m)+i+h,this.max_label_height],t.beginPath(),t.rect(d,b,s,n),this.visuals.inactive_fill.set_value(t),t.fill()}}}}_draw_title(t,e){const{title:i}=this.model;i&&this.visuals.title_text.doit&&(t.save(),t.translate(e.x0,e.y0+this.title_height),this.visuals.title_text.set_value(t),t.fillText(i,this.legend_padding,this.legend_padding-this.model.title_standoff),t.restore())}_get_size(){const{width:t,height:e}=this.compute_legend_bbox();return{width:t+2*this.model.margin,height:e+2*this.model.margin}}}i.LegendView=u,u.__name__=\"LegendView\";class x extends h.Annotation{constructor(t){super(t)}initialize(){super.initialize(),this.item_change=new r.Signal0(this,\"item_change\")}static init_Legend(){this.prototype.default_view=u,this.mixins([[\"label_\",_.Text],[\"title_\",_.Text],[\"inactive_\",_.Fill],[\"border_\",_.Line],[\"background_\",_.Fill]]),this.define((({Number:t,String:e,Array:i,Tuple:s,Or:l,Ref:n,Nullable:h})=>({orientation:[a.Orientation,\"vertical\"],location:[l(a.LegendLocation,s(t,t)),\"top_right\"],title:[h(e),null],title_standoff:[t,5],label_standoff:[t,5],glyph_height:[t,20],glyph_width:[t,20],label_height:[t,20],label_width:[t,20],margin:[t,10],padding:[t,10],spacing:[t,3],items:[i(n(o.LegendItem)),[]],click_policy:[a.LegendClickPolicy,\"none\"]}))),this.override({border_line_color:\"#e5e5e5\",border_line_alpha:.5,border_line_width:1,background_fill_color:\"#ffffff\",background_fill_alpha:.95,inactive_fill_color:\"white\",inactive_fill_alpha:.7,label_text_font_size:\"13px\",label_text_baseline:\"middle\",title_text_font_size:\"13px\",title_text_font_style:\"italic\"})}get_legend_names(){const t=[];for(const e of this.items){const i=e.get_labels_list_from_label_prop();t.push(...i)}return t}}i.Legend=x,x.__name__=\"Legend\",x.init_Legend()},\n function _(e,r,n,l,t){l();const i=e(1),s=e(53),o=e(61),_=e(57),a=e(230),u=i.__importStar(e(18)),d=e(19),c=e(9);class f extends s.Model{constructor(e){super(e)}static init_LegendItem(){this.define((({Int:e,Array:r,Ref:n,Nullable:l})=>({label:[u.NullStringSpec,null],renderers:[r(n(o.GlyphRenderer)),[]],index:[l(e),null]})))}_check_data_sources_on_renderers(){if(null!=this.get_field_from_label_prop()){if(this.renderers.length<1)return!1;const e=this.renderers[0].data_source;if(null!=e)for(const r of this.renderers)if(r.data_source!=e)return!1}return!0}_check_field_label_on_data_source(){const e=this.get_field_from_label_prop();if(null!=e){if(this.renderers.length<1)return!1;const r=this.renderers[0].data_source;if(null!=r&&!c.includes(r.columns(),e))return!1}return!0}initialize(){super.initialize(),this.legend=null,this.connect(this.change,(()=>{var e;return null===(e=this.legend)||void 0===e?void 0:e.item_change.emit()}));this._check_data_sources_on_renderers()||d.logger.error(\"Non matching data sources on legend item renderers\");this._check_field_label_on_data_source()||d.logger.error(`Bad column name on label: ${this.label}`)}get_field_from_label_prop(){const{label:e}=this;return a.isField(e)?e.field:null}get_labels_list_from_label_prop(){if(a.isValue(this.label)){const{value:e}=this.label;return null!=e?[e]:[]}const e=this.get_field_from_label_prop();if(null!=e){let r;if(!this.renderers[0]||null==this.renderers[0].data_source)return[\"No source found\"];if(r=this.renderers[0].data_source,r instanceof _.ColumnarDataSource){const n=r.get_column(e);return null!=n?c.uniq(Array.from(n)):[\"Invalid field\"]}}return[]}}n.LegendItem=f,f.__name__=\"LegendItem\",f.init_LegendItem()},\n function _(i,n,e,t,u){t();const c=i(8);e.isValue=function(i){return c.isPlainObject(i)&&\"value\"in i},e.isField=function(i){return c.isPlainObject(i)&&\"field\"in i},e.isExpr=function(i){return c.isPlainObject(i)&&\"expr\"in i}},\n function _(t,i,s,n,e){n();const o=t(1),l=t(40),a=o.__importStar(t(48)),c=t(20);class h extends l.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_render(){const{xs:t,ys:i}=this.model;if(t.length!=i.length)return;const s=t.length;if(s<3)return;const{frame:n}=this.plot_view,{ctx:e}=this.layer,o=this.coordinates.x_scale,l=this.coordinates.y_scale,{screen:a}=this.model;function c(t,i,s,n){return a?t:\"data\"==i?s.v_compute(t):n.v_compute(t)}const h=c(t,this.model.xs_units,o,n.bbox.xview),r=c(i,this.model.ys_units,l,n.bbox.yview);e.beginPath();for(let t=0;t({xs:[i(t),[]],xs_units:[c.SpatialUnits,\"data\"],ys:[i(t),[]],ys_units:[c.SpatialUnits,\"data\"]}))),this.internal((({Boolean:t})=>({screen:[t,!1]}))),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}update({xs:t,ys:i}){this.setv({xs:t,ys:i,screen:!0},{check_eq:!1})}}s.PolyAnnotation=r,r.__name__=\"PolyAnnotation\",r.init_PolyAnnotation()},\n function _(e,t,i,n,o){n();const s=e(1),l=e(40),r=s.__importStar(e(48));class c extends l.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_render(){const{gradient:e,y_intercept:t}=this.model;if(null==e||null==t)return;const{frame:i}=this.plot_view,n=this.coordinates.x_scale,o=this.coordinates.y_scale;let s,l,r,c;if(0==e)s=o.compute(t),l=s,r=i.bbox.left,c=r+i.bbox.width;else{s=i.bbox.top,l=s+i.bbox.height;const a=(o.invert(s)-t)/e,_=(o.invert(l)-t)/e;r=n.compute(a),c=n.compute(_)}const{ctx:a}=this.layer;a.save(),a.beginPath(),this.visuals.line.set_value(a),a.moveTo(r,s),a.lineTo(c,l),a.stroke(),a.restore()}}i.SlopeView=c,c.__name__=\"SlopeView\";class a extends l.Annotation{constructor(e){super(e)}static init_Slope(){this.prototype.default_view=c,this.mixins(r.Line),this.define((({Number:e,Nullable:t})=>({gradient:[t(e),null],y_intercept:[t(e),null]}))),this.override({line_color:\"black\"})}}i.Slope=a,a.__name__=\"Slope\",a.init_Slope()},\n function _(e,i,t,n,o){n();const s=e(1),a=e(40),l=s.__importStar(e(48)),h=e(20);class c extends a.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_paint(this)))}_render(){const{location:e}=this.model;if(null==e)return;const{frame:i}=this.plot_view,t=this.coordinates.x_scale,n=this.coordinates.y_scale,o=(i,t)=>\"data\"==this.model.location_units?i.compute(e):this.model.for_hover?e:t.compute(e);let s,a,l,h;\"width\"==this.model.dimension?(l=o(n,i.bbox.yview),a=i.bbox.left,h=i.bbox.width,s=this.model.line_width):(l=i.bbox.top,a=o(t,i.bbox.xview),h=this.model.line_width,s=i.bbox.height);const{ctx:c}=this.layer;c.save(),c.beginPath(),this.visuals.line.set_value(c),c.moveTo(a,l),\"width\"==this.model.dimension?c.lineTo(a+h,l):c.lineTo(a,l+s),c.stroke(),c.restore()}}t.SpanView=c,c.__name__=\"SpanView\";class d extends a.Annotation{constructor(e){super(e)}static init_Span(){this.prototype.default_view=c,this.mixins(l.Line),this.define((({Number:e,Nullable:i})=>({render_mode:[h.RenderMode,\"canvas\"],location:[i(e),null],location_units:[h.SpatialUnits,\"data\"],dimension:[h.Dimension,\"width\"]}))),this.internal((({Boolean:e})=>({for_hover:[e,!1]}))),this.override({line_color:\"black\"})}}t.Span=d,d.__name__=\"Span\",d.init_Span()},\n function _(i,e,t,o,l){o();const s=i(40),a=i(235),n=i(122),r=i(43),_=i(140),h=i(99);class b extends s.AnnotationView{constructor(){super(...arguments),this._invalidate_toolbar=!0,this._previous_bbox=new h.BBox}update_layout(){this.layout=new _.SideLayout(this.panel,(()=>this.get_size()),!0)}initialize(){super.initialize(),this.el=r.div(),this.plot_view.canvas_view.add_event(this.el)}async lazy_initialize(){await super.lazy_initialize(),this._toolbar_view=await n.build_view(this.model.toolbar,{parent:this}),this.plot_view.visibility_callbacks.push((i=>this._toolbar_view.set_visibility(i)))}remove(){this._toolbar_view.remove(),r.remove(this.el),super.remove()}render(){this.model.visible||r.undisplay(this.el),super.render()}_render(){const{bbox:i}=this.layout;this._previous_bbox.equals(i)||(r.position(this.el,i),this._previous_bbox=i),this._invalidate_toolbar&&(this.el.style.position=\"absolute\",this.el.style.overflow=\"hidden\",this._toolbar_view.render(),r.empty(this.el),this.el.appendChild(this._toolbar_view.el),this._invalidate_toolbar=!1),r.display(this.el)}_get_size(){const{tools:i,logo:e}=this.model.toolbar;return{width:30*i.length+(null!=e?25:0),height:30}}}t.ToolbarPanelView=b,b.__name__=\"ToolbarPanelView\";class d extends s.Annotation{constructor(i){super(i)}static init_ToolbarPanel(){this.prototype.default_view=b,this.define((({Ref:i})=>({toolbar:[i(a.Toolbar)]})))}}t.ToolbarPanel=d,d.__name__=\"ToolbarPanel\",d.init_ToolbarPanel()},\n function _(t,s,e,i,o){i();const c=t(8),n=t(9),a=t(13),l=t(236),r=t(237),_=t(247),p=t(248);e.Drag=l.Tool,e.Inspection=l.Tool,e.Scroll=l.Tool,e.Tap=l.Tool;const u=t=>{switch(t){case\"tap\":return\"active_tap\";case\"pan\":return\"active_drag\";case\"pinch\":case\"scroll\":return\"active_scroll\";case\"multi\":return\"active_multi\"}return null},h=t=>\"tap\"==t||\"pan\"==t;class v extends p.ToolbarBase{constructor(t){super(t)}static init_Toolbar(){this.prototype.default_view=p.ToolbarBaseView,this.define((({Or:t,Ref:s,Auto:i,Null:o,Nullable:c})=>({active_drag:[t(s(e.Drag),i,o),\"auto\"],active_inspect:[t(s(e.Inspection),i,o),\"auto\"],active_scroll:[t(s(e.Scroll),i,o),\"auto\"],active_tap:[t(s(e.Tap),i,o),\"auto\"],active_multi:[c(s(r.GestureTool)),null]})))}connect_signals(){super.connect_signals();const{tools:t,active_drag:s,active_inspect:e,active_scroll:i,active_tap:o,active_multi:c}=this.properties;this.on_change([t,s,e,i,o,c],(()=>this._init_tools()))}_init_tools(){if(super._init_tools(),\"auto\"==this.active_inspect);else if(this.active_inspect instanceof _.InspectTool){let t=!1;for(const s of this.inspectors)s!=this.active_inspect?s.active=!1:t=!0;t||(this.active_inspect=null)}else if(c.isArray(this.active_inspect)){const t=n.intersection(this.active_inspect,this.inspectors);t.length!=this.active_inspect.length&&(this.active_inspect=t);for(const t of this.inspectors)n.includes(this.active_inspect,t)||(t.active=!1)}else if(null==this.active_inspect)for(const t of this.inspectors)t.active=!1;const t=t=>{t.active?this._active_change(t):t.active=!0};for(const t of a.values(this.gestures)){t.tools=n.sort_by(t.tools,(t=>t.default_order));for(const s of t.tools)this.connect(s.properties.active.change,(()=>this._active_change(s)))}for(const[s,e]of a.entries(this.gestures)){const i=u(s);if(i){const o=this[i];\"auto\"==o?0!=e.tools.length&&h(s)&&t(e.tools[0]):null!=o&&(n.includes(this.tools,o)?t(o):this[i]=null)}}}}e.Toolbar=v,v.__name__=\"Toolbar\",v.init_Toolbar()},\n function _(t,e,n,i,o){i();const s=t(42),a=t(9),r=t(53);class l extends s.View{get plot_view(){return this.parent}get plot_model(){return this.parent.model}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>{this.model.active?this.activate():this.deactivate()}))}activate(){}deactivate(){}}n.ToolView=l,l.__name__=\"ToolView\";class _ extends r.Model{constructor(t){super(t)}static init_Tool(){this.prototype._known_aliases=new Map,this.define((({String:t,Nullable:e})=>({description:[e(t),null]}))),this.internal((({Boolean:t})=>({active:[t,!1]})))}get synthetic_renderers(){return[]}_get_dim_limits([t,e],[n,i],o,s){const r=o.bbox.h_range;let l;\"width\"==s||\"both\"==s?(l=[a.min([t,n]),a.max([t,n])],l=[a.max([l[0],r.start]),a.min([l[1],r.end])]):l=[r.start,r.end];const _=o.bbox.v_range;let c;return\"height\"==s||\"both\"==s?(c=[a.min([e,i]),a.max([e,i])],c=[a.max([c[0],_.start]),a.min([c[1],_.end])]):c=[_.start,_.end],[l,c]}static register_alias(t,e){this.prototype._known_aliases.set(t,e)}static from_string(t){const e=this.prototype._known_aliases.get(t);if(null!=e)return e();{const e=[...this.prototype._known_aliases.keys()];throw new Error(`unexpected tool name '${t}', possible tools are ${e.join(\", \")}`)}}}n.Tool=_,_.__name__=\"Tool\",_.init_Tool()},\n function _(e,o,t,s,n){s();const u=e(238),_=e(246);class l extends u.ButtonToolView{}t.GestureToolView=l,l.__name__=\"GestureToolView\";class i extends u.ButtonTool{constructor(e){super(e),this.button_view=_.OnOffButtonView}}t.GestureTool=i,i.__name__=\"GestureTool\"},\n function _(t,e,o,i,s){i();const n=t(1),l=n.__importDefault(t(239)),r=t(240),a=t(236),u=t(43),h=t(34),_=t(8),c=t(9),d=n.__importStar(t(241)),m=d,p=n.__importDefault(t(242)),g=n.__importDefault(t(243)),v=t(244);class f extends r.DOMView{initialize(){super.initialize();const t=this.model.menu;if(null!=t){const e=this.parent.model.toolbar_location,o=\"left\"==e||\"above\"==e,i=this.parent.model.horizontal?\"vertical\":\"horizontal\";this._menu=new v.ContextMenu(o?c.reversed(t):t,{orientation:i,prevent_hide:t=>t.target==this.el})}this._hammer=new l.default(this.el,{touchAction:\"auto\",inputClass:l.default.TouchMouseInput}),this.connect(this.model.change,(()=>this.render())),this._hammer.on(\"tap\",(t=>{var e;(null===(e=this._menu)||void 0===e?void 0:e.is_open)?this._menu.hide():t.target==this.el&&this._clicked()})),this._hammer.on(\"press\",(()=>this._pressed()))}remove(){var t;this._hammer.destroy(),null===(t=this._menu)||void 0===t||t.remove(),super.remove()}styles(){return[...super.styles(),d.default,p.default,g.default]}css_classes(){return super.css_classes().concat(m.toolbar_button)}render(){u.empty(this.el);const t=this.model.computed_icon;_.isString(t)&&(h.startsWith(t,\"data:image\")?this.el.style.backgroundImage=\"url('\"+t+\"')\":this.el.classList.add(t)),this.el.title=this.model.tooltip,null!=this._menu&&this.root.el.appendChild(this._menu.el)}_pressed(){var t;const{left:e,top:o,right:i,bottom:s}=this.el.getBoundingClientRect(),n=(()=>{switch(this.parent.model.toolbar_location){case\"right\":return{right:e,top:o};case\"left\":return{left:i,top:o};case\"above\":return{left:e,top:s};case\"below\":return{left:e,bottom:o}}})();null===(t=this._menu)||void 0===t||t.toggle(n)}}o.ButtonToolButtonView=f,f.__name__=\"ButtonToolButtonView\";class b extends a.ToolView{}o.ButtonToolView=b,b.__name__=\"ButtonToolView\";class B extends a.Tool{constructor(t){super(t)}static init_ButtonTool(){this.internal((({Boolean:t})=>({disabled:[t,!1]})))}_get_dim_tooltip(t){const{description:e,tool_name:o}=this;return null!=e?e:\"both\"==t?o:`${o} (${\"width\"==t?\"x\":\"y\"}-axis)`}get tooltip(){var t;return null!==(t=this.description)&&void 0!==t?t:this.tool_name}get computed_icon(){return this.icon}get menu(){return null}}o.ButtonTool=B,B.__name__=\"ButtonTool\",B.init_ButtonTool()},\n function _(t,e,i,n,r){\n /*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n !function(t,i,n,r){\"use strict\";var s,o=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],a=i.createElement(\"div\"),h=Math.round,u=Math.abs,c=Date.now;function l(t,e,i){return setTimeout(T(t,i),e)}function p(t,e,i){return!!Array.isArray(t)&&(f(t,i[e],i),!0)}function f(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==r)for(n=0;n\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",s=t.console&&(t.console.warn||t.console.log);return s&&s.call(t.console,r,n),e.apply(this,arguments)}}s=\"function\"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),i=1;i-1}function S(t){return t.trim().split(/\\s+/g)}function b(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function x(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),a=0;a1&&!i.firstMultiple?i.firstMultiple=H(e):1===s&&(i.firstMultiple=!1);var o=i.firstInput,a=i.firstMultiple,h=a?a.center:o.center,l=e.center=L(n);e.timeStamp=c(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=G(h,l),e.distance=j(h,l),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=V(e.deltaX,e.deltaY);var p=U(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=u(p.x)>u(p.y)?p.x:p.y,e.scale=a?(f=a.pointers,v=n,j(v[0],v[1],W)/j(f[0],f[1],W)):1,e.rotation=a?function(t,e){return G(e[1],e[0],W)+G(t[1],t[0],W)}(a.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,s,o,a=t.lastInterval||e,h=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(h>25||a.velocity===r)){var c=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,p=U(h,c,l);n=p.x,s=p.y,i=u(p.x)>u(p.y)?p.x:p.y,o=V(c,l),t.lastInterval=e}else i=a.velocity,n=a.velocityX,s=a.velocityY,o=a.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=o}(i,e);var f,v;var d=t.element;_(e.srcEvent.target,d)&&(d=e.srcEvent.target);e.target=d}(t,i),t.emit(\"hammer.input\",i),t.recognize(i),t.session.prevInput=i}function H(t){for(var e=[],i=0;i=u(e)?t<0?2:4:e<0?8:16}function j(t,e,i){i||(i=F);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function G(t,e,i){i||(i=F);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}q.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(O(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4},B=\"mousedown\",$=\"mousemove mouseup\";function J(){this.evEl=B,this.evWin=$,this.pressed=!1,q.apply(this,arguments)}g(J,q,{handler:function(t){var e=Z[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:X,srcEvent:t}))}});var K={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:N,3:\"pen\",4:X,5:\"kinect\"},tt=\"pointerdown\",et=\"pointermove pointerup pointercancel\";function it(){this.evEl=tt,this.evWin=et,q.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(tt=\"MSPointerDown\",et=\"MSPointerMove MSPointerUp MSPointerCancel\"),g(it,q,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace(\"ms\",\"\"),r=K[n],s=Q[t.pointerType]||t.pointerType,o=s==N,a=b(e,t.pointerId,\"pointerId\");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var nt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},rt=\"touchstart\",st=\"touchstart touchmove touchend touchcancel\";function ot(){this.evTarget=rt,this.evWin=st,this.started=!1,q.apply(this,arguments)}function at(t,e){var i=P(t.touches),n=P(t.changedTouches);return 12&e&&(i=D(i.concat(n),\"identifier\",!0)),[i,n]}g(ot,q,{handler:function(t){var e=nt[t.type];if(1===e&&(this.started=!0),this.started){var i=at.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:N,srcEvent:t})}}});var ht={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ut=\"touchstart touchmove touchend touchcancel\";function ct(){this.evTarget=ut,this.targetIds={},q.apply(this,arguments)}function lt(t,e){var i=P(t.touches),n=this.targetIds;if(3&e&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=P(t.changedTouches),a=[],h=this.target;if(s=i.filter((function(t){return _(t.target,h)})),1===e)for(r=0;r-1&&n.splice(t,1)}),2500)}}function dt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+Dt(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+Dt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=bt},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Ot.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=xt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Mt,Ot,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[It]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(zt,Pt,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[yt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=l((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return bt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),g(Nt,Ot,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[It]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(Xt,Ot,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Rt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return 30&i?e=t.overallVelocity:6&i?e=t.overallVelocityX:i&Y&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&u(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=xt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(Yt,Pt,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Et]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance .bk-divider{cursor:default;overflow:hidden;background-color:#e5e5e5;}.bk-root .bk-context-menu.bk-horizontal > .bk-divider{width:1px;margin:5px 0;}.bk-root .bk-context-menu.bk-vertical > .bk-divider{height:1px;margin:0 5px;}.bk-root .bk-context-menu > :not(.bk-divider){border:1px solid transparent;}.bk-root .bk-context-menu > :not(.bk-divider).bk-active{border-color:#26aae1;}.bk-root .bk-context-menu > :not(.bk-divider):hover{background-color:#f9f9f9;}.bk-root .bk-context-menu.bk-horizontal > :not(.bk-divider):first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;}.bk-root .bk-context-menu.bk-horizontal > :not(.bk-divider):last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;}.bk-root .bk-context-menu.bk-vertical > :not(.bk-divider):first-child{border-top-left-radius:4px;border-top-right-radius:4px;}.bk-root .bk-context-menu.bk-vertical > :not(.bk-divider):last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;}.bk-root .bk-menu{position:absolute;left:0;width:100%;z-index:100;cursor:pointer;font-size:12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);}.bk-root .bk-menu.bk-above{bottom:100%;}.bk-root .bk-menu.bk-below{top:100%;}.bk-root .bk-menu > .bk-divider{height:1px;margin:7.5px 0;overflow:hidden;background-color:#e5e5e5;}.bk-root .bk-menu > :not(.bk-divider){padding:6px 12px;}.bk-root .bk-menu > :not(.bk-divider):hover,.bk-root .bk-menu > :not(.bk-divider).bk-active{background-color:#e6e6e6;}.bk-root .bk-caret{display:inline-block;vertical-align:middle;width:0;height:0;margin:0 5px;}.bk-root .bk-caret.bk-down{border-top:4px solid;}.bk-root .bk-caret.bk-up{border-bottom:4px solid;}.bk-root .bk-caret.bk-down,.bk-root .bk-caret.bk-up{border-right:4px solid transparent;border-left:4px solid transparent;}.bk-root .bk-caret.bk-left{border-right:4px solid;}.bk-root .bk-caret.bk-right{border-left:4px solid;}.bk-root .bk-caret.bk-left,.bk-root .bk-caret.bk-right{border-top:4px solid transparent;border-bottom:4px solid transparent;}\"},\n function _(t,e,i,n,s){n();const o=t(1),l=t(43),h=t(245),d=o.__importStar(t(243));class r{constructor(t,e={}){this.items=t,this.options=e,this.el=l.div(),this._open=!1,this._item_click=t=>{var e;null===(e=this.items[t])||void 0===e||e.handler(),this.hide()},this._on_mousedown=t=>{var e,i;const{target:n}=t;n instanceof Node&&this.el.contains(n)||(null===(i=(e=this.options).prevent_hide)||void 0===i?void 0:i.call(e,t))||this.hide()},this._on_keydown=t=>{t.keyCode==l.Keys.Esc&&this.hide()},this._on_blur=()=>{this.hide()},l.undisplay(this.el)}get is_open(){return this._open}get can_open(){return 0!=this.items.length}remove(){l.remove(this.el),this._unlisten()}_listen(){document.addEventListener(\"mousedown\",this._on_mousedown),document.addEventListener(\"keydown\",this._on_keydown),window.addEventListener(\"blur\",this._on_blur)}_unlisten(){document.removeEventListener(\"mousedown\",this._on_mousedown),document.removeEventListener(\"keydown\",this._on_keydown),window.removeEventListener(\"blur\",this._on_blur)}_position(t){const e=this.el.parentElement;if(null!=e){const i=e.getBoundingClientRect();this.el.style.left=null!=t.left?t.left-i.left+\"px\":\"\",this.el.style.top=null!=t.top?t.top-i.top+\"px\":\"\",this.el.style.right=null!=t.right?i.right-t.right+\"px\":\"\",this.el.style.bottom=null!=t.bottom?i.bottom-t.bottom+\"px\":\"\"}}render(){var t,e;l.empty(this.el,!0);const i=null!==(t=this.options.orientation)&&void 0!==t?t:\"vertical\";l.classes(this.el).add(\"bk-context-menu\",`bk-${i}`);for(const[t,i]of h.enumerate(this.items)){let n;if(null==t)n=l.div({class:d.divider});else{if(null!=t.if&&!t.if())continue;{const i=null!=t.icon?l.div({class:[\"bk-menu-icon\",t.icon]}):null;n=l.div({class:(null===(e=t.active)||void 0===e?void 0:e.call(t))?\"bk-active\":null,title:t.tooltip},i,t.label)}}n.addEventListener(\"click\",(()=>this._item_click(i))),this.el.appendChild(n)}}show(t){if(0!=this.items.length&&!this._open){if(this.render(),0==this.el.children.length)return;this._position(null!=t?t:{left:0,top:0}),l.display(this.el),this._listen(),this._open=!0}}hide(){this._open&&(this._open=!1,this._unlisten(),l.undisplay(this.el))}toggle(t){this._open?this.hide():this.show(t)}}i.ContextMenu=r,r.__name__=\"ContextMenu\"},\n function _(n,e,o,t,r){t();const f=n(9);function*i(n,e){const o=n.length;if(e>o)return;const t=f.range(e);for(yield t.map((e=>n[e]));;){let r;for(const n of f.reversed(f.range(e)))if(t[n]!=n+o-e){r=n;break}if(null==r)return;t[r]+=1;for(const n of f.range(r+1,e))t[n]=t[n-1]+1;yield t.map((e=>n[e]))}}o.enumerate=function*(n){let e=0;for(const o of n)yield[o,e++]},o.combinations=i,o.subsets=function*(n){for(const e of f.range(n.length+1))yield*i(n,e)}},\n function _(t,e,i,n,o){n();const s=t(1),c=t(238),l=s.__importStar(t(241)),a=t(43);class _ extends c.ButtonToolButtonView{render(){super.render(),a.classes(this.el).toggle(l.active,this.model.active)}_clicked(){const{active:t}=this.model;this.model.active=!t}}i.OnOffButtonView=_,_.__name__=\"OnOffButtonView\"},\n function _(t,e,o,n,s){n();const i=t(238),c=t(246);class l extends i.ButtonToolView{}o.InspectToolView=l,l.__name__=\"InspectToolView\";class _ extends i.ButtonTool{constructor(t){super(t),this.event_type=\"move\"}static init_InspectTool(){this.prototype.button_view=c.OnOffButtonView,this.define((({Boolean:t})=>({toggleable:[t,!0]}))),this.override({active:!0})}}o.InspectTool=_,_.__name__=\"InspectTool\",_.init_InspectTool()},\n function _(t,o,e,i,s){i();const l=t(1),n=t(19),a=t(43),r=t(122),c=t(240),_=t(20),u=t(9),h=t(13),v=t(8),p=t(249),d=t(99),b=t(53),g=t(236),f=t(237),m=t(251),w=t(252),y=t(247),T=l.__importStar(t(241)),z=T,B=l.__importStar(t(253)),x=B;class L extends b.Model{constructor(t){super(t)}static init_ToolbarViewModel(){this.define((({Boolean:t,Nullable:o})=>({_visible:[o(t),null],autohide:[t,!1]})))}get visible(){return!this.autohide||null!=this._visible&&this._visible}}e.ToolbarViewModel=L,L.__name__=\"ToolbarViewModel\",L.init_ToolbarViewModel();class M extends c.DOMView{constructor(){super(...arguments),this.layout={bbox:new d.BBox}}initialize(){super.initialize(),this._tool_button_views=new Map,this._toolbar_view_model=new L({autohide:this.model.autohide})}async lazy_initialize(){await super.lazy_initialize(),await this._build_tool_button_views()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.tools.change,(async()=>{await this._build_tool_button_views(),this.render()})),this.connect(this.model.properties.autohide.change,(()=>{this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change()})),this.connect(this._toolbar_view_model.properties._visible.change,(()=>this._on_visible_change()))}styles(){return[...super.styles(),T.default,B.default]}remove(){r.remove_views(this._tool_button_views),super.remove()}async _build_tool_button_views(){const t=null!=this.model._proxied_tools?this.model._proxied_tools:this.model.tools;await r.build_views(this._tool_button_views,t,{parent:this},(t=>t.button_view))}set_visibility(t){t!=this._toolbar_view_model._visible&&(this._toolbar_view_model._visible=t)}_on_visible_change(){const t=this._toolbar_view_model.visible,o=z.toolbar_hidden;this.el.classList.contains(o)&&t?this.el.classList.remove(o):t||this.el.classList.add(o)}render(){if(a.empty(this.el),this.el.classList.add(z.toolbar),this.el.classList.add(z[this.model.toolbar_location]),this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change(),null!=this.model.logo){const t=\"grey\"===this.model.logo?x.grey:null,o=a.a({href:\"https://bokeh.org/\",target:\"_blank\",class:[x.logo,x.logo_small,t]});this.el.appendChild(o)}for(const[,t]of this._tool_button_views)t.render();const t=[],o=t=>this._tool_button_views.get(t).el,{gestures:e}=this.model;for(const i of h.values(e))t.push(i.tools.map(o));t.push(this.model.actions.map(o)),t.push(this.model.inspectors.filter((t=>t.toggleable)).map(o));for(const o of t)if(0!==o.length){const t=a.div({class:z.button_bar},o);this.el.appendChild(t)}}update_layout(){}update_position(){}after_layout(){this._has_finished=!0}export(t,o=!0){const e=\"png\"==t?\"canvas\":\"svg\",i=new p.CanvasLayer(e,o);return i.resize(0,0),i}}function V(){return{pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}}}e.ToolbarBaseView=M,M.__name__=\"ToolbarBaseView\";class S extends b.Model{constructor(t){super(t)}static init_ToolbarBase(){this.prototype.default_view=M,this.define((({Boolean:t,Array:o,Ref:e,Nullable:i})=>({tools:[o(e(g.Tool)),[]],logo:[i(_.Logo),\"normal\"],autohide:[t,!1]}))),this.internal((({Array:t,Struct:o,Ref:e,Nullable:i})=>{const s=o({tools:t(e(f.GestureTool)),active:i(e(g.Tool))});return{gestures:[o({pan:s,scroll:s,pinch:s,tap:s,doubletap:s,press:s,pressup:s,rotate:s,move:s,multi:s}),V],actions:[t(e(m.ActionTool)),[]],inspectors:[t(e(y.InspectTool)),[]],help:[t(e(w.HelpTool)),[]],toolbar_location:[_.Location,\"right\"]}}))}initialize(){super.initialize(),this._init_tools()}_init_tools(){const t=function(t,o){if(t.length!=o.length)return!0;const e=new Set(o.map((t=>t.id)));return u.some(t,(t=>!e.has(t.id)))},o=this.tools.filter((t=>t instanceof y.InspectTool));t(this.inspectors,o)&&(this.inspectors=o);const e=this.tools.filter((t=>t instanceof w.HelpTool));t(this.help,e)&&(this.help=e);const i=this.tools.filter((t=>t instanceof m.ActionTool));t(this.actions,i)&&(this.actions=i);const s=(t,o)=>{t in this.gestures||n.logger.warn(`Toolbar: unknown event type '${t}' for tool: ${o}`)},l={pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}};for(const t of this.tools)if(t instanceof f.GestureTool&&t.event_type)if(v.isString(t.event_type))l[t.event_type].tools.push(t),s(t.event_type,t);else{l.multi.tools.push(t);for(const o of t.event_type)s(o,t)}for(const o of Object.keys(l)){const e=this.gestures[o];t(e.tools,l[o].tools)&&(e.tools=l[o].tools),e.active&&u.every(e.tools,(t=>t.id!=e.active.id))&&(e.active=null)}}get horizontal(){return\"above\"===this.toolbar_location||\"below\"===this.toolbar_location}get vertical(){return\"left\"===this.toolbar_location||\"right\"===this.toolbar_location}_active_change(t){const{event_type:o}=t;if(null==o)return;const e=v.isString(o)?[o]:o;for(const o of e)if(t.active){const e=this.gestures[o].active;null!=e&&t!=e&&(n.logger.debug(`Toolbar: deactivating tool: ${e} for event type '${o}'`),e.active=!1),this.gestures[o].active=t,n.logger.debug(`Toolbar: activating tool: ${t} for event type '${o}'`)}else this.gestures[o].active=null}}e.ToolbarBase=S,S.__name__=\"ToolbarBase\",S.init_ToolbarBase()},\n function _(e,t,i,n,s){n();const o=e(250),a=e(99),r=e(43);function h(e){!function(e){void 0===e.lineDash&&Object.defineProperty(e,\"lineDash\",{get:()=>e.getLineDash(),set:t=>e.setLineDash(t)})}(e),function(e){e.setImageSmoothingEnabled=t=>{e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.oImageSmoothingEnabled=t,e.webkitImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t},e.getImageSmoothingEnabled=()=>{const t=e.imageSmoothingEnabled;return null==t||t}}(e),function(e){e.ellipse||(e.ellipse=function(t,i,n,s,o,a,r,h=!1){const l=.551784;e.translate(t,i),e.rotate(o);let c=n,g=s;h&&(c=-n,g=-s),e.moveTo(-c,0),e.bezierCurveTo(-c,g*l,-c*l,g,0,g),e.bezierCurveTo(c*l,g,c,g*l,c,0),e.bezierCurveTo(c,-g*l,c*l,-g,0,-g),e.bezierCurveTo(-c*l,-g,-c,-g*l,-c,0),e.rotate(-o),e.translate(-t,-i)})}(e)}const l={position:\"absolute\",top:\"0\",left:\"0\",width:\"100%\",height:\"100%\"};class c{constructor(e,t){switch(this.backend=e,this.hidpi=t,this.pixel_ratio=1,this.bbox=new a.BBox,e){case\"webgl\":case\"canvas\":{this._el=this._canvas=r.canvas({style:l});const e=this.canvas.getContext(\"2d\");if(null==e)throw new Error(\"unable to obtain 2D rendering context\");this._ctx=e,t&&(this.pixel_ratio=devicePixelRatio);break}case\"svg\":{const e=new o.SVGRenderingContext2D;this._ctx=e,this._canvas=e.get_svg(),this._el=r.div({style:l},this._canvas);break}}h(this._ctx)}get canvas(){return this._canvas}get ctx(){return this._ctx}get el(){return this._el}resize(e,t){this.bbox=new a.BBox({left:0,top:0,width:e,height:t});const i=this._ctx instanceof o.SVGRenderingContext2D?this._ctx:this.canvas;i.width=e*this.pixel_ratio,i.height=t*this.pixel_ratio}prepare(){const{ctx:e,hidpi:t,pixel_ratio:i}=this;e.save(),t&&(e.scale(i,i),e.translate(.5,.5)),this.clear()}clear(){const{x:e,y:t,width:i,height:n}=this.bbox;this.ctx.clearRect(e,t,i,n)}finish(){this.ctx.restore()}to_blob(){const{_canvas:e}=this;if(e instanceof HTMLCanvasElement)return null!=e.msToBlob?Promise.resolve(e.msToBlob()):new Promise(((t,i)=>{e.toBlob((e=>null!=e?t(e):i()),\"image/png\")}));{const e=this._ctx.get_serialized_svg(!0),t=new Blob([e],{type:\"image/svg+xml\"});return Promise.resolve(t)}}}i.CanvasLayer=c,c.__name__=\"CanvasLayer\"},\n function _(t,e,i,s,n){s();const r=t(168),a=t(8),o=t(43);function l(t){if(!t)throw new Error(\"cannot create a random attribute name for an undefined object\");const e=\"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\";let i=\"\";do{i=\"\";for(let t=0;t<12;t++)i+=e[Math.floor(Math.random()*e.length)]}while(t[i]);return i}function h(t){var e;const i={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"};return null!==(e=i[t])&&void 0!==e?e:i.start}function c(t){var e;const i={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return null!==(e=i[t])&&void 0!==e?e:i.alphabetic}const _=function(t,e){const i=new Map,s=t.split(\",\");e=null!=e?e:10;for(let t=0;t=0?Math.acos(e):-Math.acos(e)}const w=v(f),b=v(g);this.lineTo(d+f[0]*n,m+f[1]*n),this.arc(d,m,n,w,b)}stroke(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\"),null!=this._clip_path&&this.__currentElement.setAttribute(\"clip-path\",this._clip_path)}fill(t){if(\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke\"),\"none\"!=this.__currentElement.getAttribute(\"fill\")){const t=this.__currentElement.cloneNode(!0);this.__root.appendChild(t),this.__currentElement=t}this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\"),null!=t&&this.__currentElement.setAttribute(\"fill-rule\",t),null!=this._clip_path&&this.__currentElement.setAttribute(\"clip-path\",this._clip_path)}rect(t,e,i,s){isFinite(t+e+i+s)&&(\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.lineTo(t,e))}fillRect(t,e,i,s){isFinite(t+e+i+s)&&(this.beginPath(),this.rect(t,e,i,s),this.fill())}strokeRect(t,e,i,s){isFinite(t+e+i+s)&&(this.beginPath(),this.rect(t,e,i,s),this.stroke())}__clearCanvas(){o.empty(this.__defs),o.empty(this.__root),this.__root.appendChild(this.__defs),this.__currentElement=this.__root}clearRect(t,e,i,s){if(!isFinite(t+e+i+s))return;if(0===t&&0===e&&i===this.width&&s===this.height)return void this.__clearCanvas();const n=this.__createElement(\"rect\",{x:t,y:e,width:i,height:s,fill:\"#FFFFFF\"},!0);this._apply_transform(n),this.__root.appendChild(n)}createLinearGradient(t,e,i,s){if(!isFinite(t+e+i+s))throw new Error(\"The provided double value is non-finite\");const[n,r]=this._transform.apply(t,e),[a,o]=this._transform.apply(i,s),h=this.__createElement(\"linearGradient\",{id:l(this.__ids),x1:`${n}px`,x2:`${a}px`,y1:`${r}px`,y2:`${o}px`,gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(h),new p(h,this)}createRadialGradient(t,e,i,s,n,r){if(!isFinite(t+e+i+s+n+r))throw new Error(\"The provided double value is non-finite\");const[a,o]=this._transform.apply(t,e),[h,c]=this._transform.apply(s,n),_=this.__createElement(\"radialGradient\",{id:l(this.__ids),cx:`${h}px`,cy:`${c}px`,r:`${r}px`,fx:`${a}px`,fy:`${o}px`,gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(_),new p(_,this)}__parseFont(){var t,e,i,s,n;const r=/^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\'\\\"\\sa-z0-9]+?)\\s*$/i.exec(this.font),a={style:null!==(t=r[1])&&void 0!==t?t:\"normal\",size:null!==(e=r[4])&&void 0!==e?e:\"10px\",family:null!==(i=r[6])&&void 0!==i?i:\"sans-serif\",weight:null!==(s=r[3])&&void 0!==s?s:\"normal\",decoration:null!==(n=r[2])&&void 0!==n?n:\"normal\"};return\"underline\"===this.__fontUnderline&&(a.decoration=\"underline\"),null!=this.__fontHref&&(a.href=this.__fontHref),a}__wrapTextLink(t,e){if(t.href){const i=this.__createElement(\"a\");return i.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,s){const n=this.__parseFont(),r=this.__createElement(\"text\",{\"font-family\":n.family,\"font-size\":n.size,\"font-style\":n.style,\"font-weight\":n.weight,\"text-decoration\":n.decoration,x:e,y:i,\"text-anchor\":h(this.textAlign),\"dominant-baseline\":c(this.textBaseline)},!0);r.appendChild(this.__document.createTextNode(t)),this._apply_transform(r),this.__currentElement=r,this.__applyStyleToCurrentElement(s),this.__root.appendChild(this.__wrapTextLink(n,r))}fillText(t,e,i){null!=t&&isFinite(e+i)&&this.__applyText(t,e,i,\"fill\")}strokeText(t,e,i){null!=t&&isFinite(e+i)&&this.__applyText(t,e,i,\"stroke\")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,s,n,r=!1){if(!isFinite(t+e+i+s+n))return;if(s===n)return;(s%=2*Math.PI)===(n%=2*Math.PI)&&(n=(n+2*Math.PI-.001*(r?-1:1))%(2*Math.PI));const a=t+i*Math.cos(n),o=e+i*Math.sin(n),l=t+i*Math.cos(s),h=e+i*Math.sin(s),c=r?0:1;let _=0,u=n-s;u<0&&(u+=2*Math.PI),_=r?u>Math.PI?0:1:u>Math.PI?1:0,this.lineTo(l,h);const p=i,d=i,[m,f]=this._transform.apply(a,o);this.__addPathCommand(m,f,`A ${p} ${d} 0 ${_} ${c} ${m} ${f}`)}clip(){const t=this.__createElement(\"clipPath\"),e=l(this.__ids);this.__applyCurrentDefaultPath(),t.setAttribute(\"id\",e),t.appendChild(this.__currentElement),this.__defs.appendChild(t),this._clip_path=`url(#${e})`}drawImage(t,...e){let i,s,n,r,a,o,l,h;if(2==e.length){if([i,s]=e,!isFinite(i+s))return;a=0,o=0,l=t.width,h=t.height,n=l,r=h}else if(4==e.length){if([i,s,n,r]=e,!isFinite(i+s+n+r))return;a=0,o=0,l=t.width,h=t.height}else{if(8!==e.length)throw new Error(`Inavlid number of arguments passed to drawImage: ${arguments.length}`);if([a,o,l,h,i,s,n,r]=e,!isFinite(a+o+l+h+i+s+n+r))return}const c=this.__root,_=this._transform.clone().translate(i,s);if(t instanceof m||t instanceof SVGSVGElement){const e=(t instanceof SVGSVGElement?t:t.get_svg()).cloneNode(!0);let i;_.is_identity?i=c:(i=this.__createElement(\"g\"),this._apply_transform(i,_),c.appendChild(i));for(const t of[...e.childNodes])if(t instanceof SVGDefsElement){for(const e of[...t.childNodes])if(e instanceof Element){const t=e.getAttribute(\"id\");this.__ids[t]=t,this.__defs.appendChild(e)}}else i.appendChild(t)}else if(t instanceof HTMLImageElement||t instanceof SVGImageElement){const e=this.__createElement(\"image\");if(e.setAttribute(\"width\",`${n}`),e.setAttribute(\"height\",`${r}`),e.setAttribute(\"preserveAspectRatio\",\"none\"),a||o||l!==t.width||h!==t.height){const e=this.__document.createElement(\"canvas\");e.width=n,e.height=r;e.getContext(\"2d\").drawImage(t,a,o,l,h,0,0,n,r),t=e}this._apply_transform(e,_);const i=t instanceof HTMLCanvasElement?t.toDataURL():t.getAttribute(\"src\");e.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",i),c.appendChild(e)}else if(t instanceof HTMLCanvasElement){const e=this.__createElement(\"image\");e.setAttribute(\"width\",`${n}`),e.setAttribute(\"height\",`${r}`),e.setAttribute(\"preserveAspectRatio\",\"none\");const i=this.__document.createElement(\"canvas\");i.width=n,i.height=r;const s=i.getContext(\"2d\");s.imageSmoothingEnabled=!1,s.drawImage(t,a,o,l,h,0,0,n,r),t=i,this._apply_transform(e,_),e.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.toDataURL()),c.appendChild(e)}}createPattern(t,e){const i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),s=l(this.__ids);if(i.setAttribute(\"id\",s),i.setAttribute(\"width\",`${this._to_number(t.width)}`),i.setAttribute(\"height\",`${this._to_number(t.height)}`),i.setAttribute(\"patternUnits\",\"userSpaceOnUse\"),t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof SVGImageElement){const e=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),s=t instanceof HTMLCanvasElement?t.toDataURL():t.getAttribute(\"src\");e.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",s),i.appendChild(e),this.__defs.appendChild(i)}else if(t instanceof m){for(const e of[...t.__root.childNodes])e instanceof SVGDefsElement||i.appendChild(e);this.__defs.appendChild(i)}else{if(!(t instanceof SVGSVGElement))throw new Error(\"unsupported\");for(const e of[...t.childNodes])e instanceof SVGDefsElement||i.appendChild(e);this.__defs.appendChild(i)}return new d(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null}_to_number(t){return a.isNumber(t)?t:t.baseVal.value}}i.SVGRenderingContext2D=m,m.__name__=\"SVGRenderingContext2D\"},\n function _(o,t,n,i,e){i();const s=o(238),c=o(15);class l extends s.ButtonToolButtonView{_clicked(){this.model.do.emit(void 0)}}n.ActionToolButtonView=l,l.__name__=\"ActionToolButtonView\";class _ extends s.ButtonToolView{connect_signals(){super.connect_signals(),this.connect(this.model.do,(o=>this.doit(o)))}}n.ActionToolView=_,_.__name__=\"ActionToolView\";class d extends s.ButtonTool{constructor(o){super(o),this.button_view=l,this.do=new c.Signal(this,\"do\")}}n.ActionTool=d,d.__name__=\"ActionTool\"},\n function _(o,e,t,i,l){i();const s=o(251),n=o(242);class r extends s.ActionToolView{doit(){window.open(this.model.redirect)}}t.HelpToolView=r,r.__name__=\"HelpToolView\";class c extends s.ActionTool{constructor(o){super(o),this.tool_name=\"Help\",this.icon=n.tool_icon_help}static init_HelpTool(){this.prototype.default_view=r,this.define((({String:o})=>({redirect:[o,\"https://docs.bokeh.org/en/latest/docs/user_guide/tools.html\"]}))),this.override({description:\"Click the question mark to learn more about Bokeh plot tools.\"}),this.register_alias(\"help\",(()=>new c))}}t.HelpTool=c,c.__name__=\"HelpTool\",c.init_HelpTool()},\n function _(o,l,g,A,r){A(),g.root=\"bk-root\",g.logo=\"bk-logo\",g.grey=\"bk-grey\",g.logo_small=\"bk-logo-small\",g.logo_notebook=\"bk-logo-notebook\",g.default=\".bk-root .bk-logo{margin:5px;position:relative;display:block;background-repeat:no-repeat;}.bk-root .bk-logo.bk-grey{filter:url(\\\"data:image/svg+xml;utf8,#grayscale\\\");filter:gray;-webkit-filter:grayscale(100%);}.bk-root .bk-logo-small{width:20px;height:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAOkSURBVDiNjZRtaJVlGMd/1/08zzln5zjP1LWcU9N0NkN8m2CYjpgQYQXqSs0I84OLIC0hkEKoPtiH3gmKoiJDU7QpLgoLjLIQCpEsNJ1vqUOdO7ppbuec5+V+rj4ctwzd8IIbbi6u+8f1539dt3A78eXC7QizUF7gyV1fD1Yqg4JWz84yffhm0qkFqBogB9rM8tZdtwVsPUhWhGcFJngGeWrPzHm5oaMmkfEg1usvLFyc8jLRqDOMru7AyC8saQr7GG7f5fvDeH7Ej8CM66nIF+8yngt6HWaKh7k49Soy9nXurCi1o3qUbS3zWfrYeQDTB/Qj6kX6Ybhw4B+bOYoLKCC9H3Nu/leUTZ1JdRWkkn2ldcCamzrcf47KKXdAJllSlxAOkRgyHsGC/zRday5Qld9DyoM4/q/rUoy/CXh3jzOu3bHUVZeU+DEn8FInkPBFlu3+nW3Nw0mk6vCDiWg8CeJaxEwuHS3+z5RgY+YBR6V1Z1nxSOfoaPa4LASWxxdNp+VWTk7+4vzaou8v8PN+xo+KY2xsw6une2frhw05CTYOmQvsEhjhWjn0bmXPjpE1+kplmmkP3suftwTubK9Vq22qKmrBhpY4jvd5afdRA3wGjFAgcnTK2s4hY0/GPNIb0nErGMCRxWOOX64Z8RAC4oCXdklmEvcL8o0BfkNK4lUg9HTl+oPlQxdNo3Mg4Nv175e/1LDGzZen30MEjRUtmXSfiTVu1kK8W4txyV6BMKlbgk3lMwYCiusNy9fVfvvwMxv8Ynl6vxoByANLTWplvuj/nF9m2+PDtt1eiHPBr1oIfhCChQMBw6Aw0UulqTKZdfVvfG7VcfIqLG9bcldL/+pdWTLxLUy8Qq38heUIjh4XlzZxzQm19lLFlr8vdQ97rjZVOLf8nclzckbcD4wxXMidpX30sFd37Fv/GtwwhzhxGVAprjbg0gCAEeIgwCZyTV2Z1REEW8O4py0wsjeloKoMr6iCY6dP92H6Vw/oTyICIthibxjm/DfN9lVz8IqtqKYLUXfoKVMVQVVJOElGjrnnUt9T9wbgp8AyYKaGlqingHZU/uG2NTZSVqwHQTWkx9hxjkpWDaCg6Ckj5qebgBVbT3V3NNXMSiWSDdGV3hrtzla7J+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==);}.bk-root .bk-logo-notebook{display:inline-block;vertical-align:middle;margin-right:5px;}\"},\n function _(t,e,i,s,l){s();const o=t(1),n=t(40),h=t(20),a=t(43),r=o.__importStar(t(255)),c=r;class d extends n.AnnotationView{initialize(){super.initialize(),this.el=a.div({class:c.tooltip}),a.undisplay(this.el),this.plot_view.canvas_view.add_overlay(this.el)}remove(){a.remove(this.el),super.remove()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.content.change,(()=>this.render())),this.connect(this.model.properties.position.change,(()=>this._reposition()))}styles(){return[...super.styles(),r.default]}render(){this.model.visible||a.undisplay(this.el),super.render()}_render(){const{content:t}=this.model;null!=t?(a.empty(this.el),a.classes(this.el).toggle(\"bk-tooltip-custom\",this.model.custom),this.el.appendChild(t),this.model.show_arrow&&this.el.classList.add(c.tooltip_arrow)):a.undisplay(this.el)}_reposition(){const{position:t}=this.model;if(null==t)return void a.undisplay(this.el);const[e,i]=t,s=(()=>{const t=this.parent.layout.bbox.relative(),{attachment:s}=this.model;switch(s){case\"horizontal\":return e({attachment:[h.TooltipAttachment,\"horizontal\"],inner_only:[t,!0],show_arrow:[t,!0]}))),this.internal((({Boolean:t,Number:e,Tuple:i,Ref:s,Nullable:l})=>({position:[l(i(e,e)),null],content:[s(HTMLElement),()=>a.div()],custom:[t]}))),this.override({level:\"overlay\"})}clear(){this.position=null}}i.Tooltip=p,p.__name__=\"Tooltip\",p.init_Tooltip()},\n function _(o,t,r,e,l){e(),r.root=\"bk-root\",r.tooltip=\"bk-tooltip\",r.left=\"bk-left\",r.tooltip_arrow=\"bk-tooltip-arrow\",r.right=\"bk-right\",r.above=\"bk-above\",r.below=\"bk-below\",r.tooltip_row_label=\"bk-tooltip-row-label\",r.tooltip_row_value=\"bk-tooltip-row-value\",r.tooltip_color_block=\"bk-tooltip-color-block\",r.default='.bk-root{}.bk-root .bk-tooltip{font-weight:300;font-size:12px;position:absolute;padding:5px;border:1px solid #e5e5e5;color:#2f2f2f;background-color:white;pointer-events:none;opacity:0.95;z-index:100;}.bk-root .bk-tooltip > div:not(:first-child){margin-top:5px;border-top:#e5e5e5 1px dashed;}.bk-root .bk-tooltip.bk-left.bk-tooltip-arrow::before{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:\" \";display:block;left:-10px;border-right-width:10px;border-right-color:#909599;}.bk-root .bk-tooltip.bk-left::before{left:-10px;border-right-width:10px;border-right-color:#909599;}.bk-root .bk-tooltip.bk-right.bk-tooltip-arrow::after{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:\" \";display:block;right:-10px;border-left-width:10px;border-left-color:#909599;}.bk-root .bk-tooltip.bk-right::after{right:-10px;border-left-width:10px;border-left-color:#909599;}.bk-root .bk-tooltip.bk-above::before{position:absolute;margin:0 0 0 -7px;left:50%;width:0;height:0;border-style:solid;border-width:0 7px 0 7px;border-color:transparent;content:\" \";display:block;top:-10px;border-bottom-width:10px;border-bottom-color:#909599;}.bk-root .bk-tooltip.bk-below::after{position:absolute;margin:0 0 0 -7px;left:50%;width:0;height:0;border-style:solid;border-width:0 7px 0 7px;border-color:transparent;content:\" \";display:block;bottom:-10px;border-top-width:10px;border-top-color:#909599;}.bk-root .bk-tooltip-row-label{text-align:right;color:#26aae1;}.bk-root .bk-tooltip-row-value{color:default;}.bk-root .bk-tooltip-color-block{width:12px;height:12px;margin-left:5px;margin-right:5px;outline:#dddddd solid 1px;display:inline-block;}'},\n function _(e,t,i,s,r){s();const a=e(135),h=e(133),_=e(122),l=e(48);class o extends a.UpperLowerView{async lazy_initialize(){await super.lazy_initialize();const{lower_head:e,upper_head:t}=this.model;null!=e&&(this.lower_head=await _.build_view(e,{parent:this})),null!=t&&(this.upper_head=await _.build_view(t,{parent:this}))}set_data(e){var t,i;super.set_data(e),null===(t=this.lower_head)||void 0===t||t.set_data(e),null===(i=this.upper_head)||void 0===i||i.set_data(e)}paint(e){if(this.visuals.line.doit)for(let t=0,i=this._lower_sx.length;t({lower_head:[t(e(h.ArrowHead)),()=>new h.TeeHead({size:10})],upper_head:[t(e(h.ArrowHead)),()=>new h.TeeHead({size:10})]}))),this.override({level:\"underlay\"})}}i.Whisker=n,n.__name__=\"Whisker\",n.init_Whisker()},\n function _(n,o,t,u,e){u(),e(\"CustomJS\",n(258).CustomJS),e(\"OpenURL\",n(260).OpenURL)},\n function _(t,s,e,n,c){n();const u=t(259),i=t(13),a=t(34);class r extends u.Callback{constructor(t){super(t)}static init_CustomJS(){this.define((({Unknown:t,String:s,Dict:e})=>({args:[e(t),{}],code:[s,\"\"]})))}get names(){return i.keys(this.args)}get values(){return i.values(this.args)}get func(){const t=a.use_strict(this.code);return new Function(...this.names,\"cb_obj\",\"cb_data\",t)}execute(t,s={}){return this.func.apply(t,this.values.concat(t,s))}}e.CustomJS=r,r.__name__=\"CustomJS\",r.init_CustomJS()},\n function _(c,a,l,n,s){n();const e=c(53);class o extends e.Model{constructor(c){super(c)}}l.Callback=o,o.__name__=\"Callback\"},\n function _(e,n,t,o,i){o();const s=e(259),c=e(182),r=e(8);class a extends s.Callback{constructor(e){super(e)}static init_OpenURL(){this.define((({Boolean:e,String:n})=>({url:[n,\"http://\"],same_tab:[e,!1]})))}execute(e,{source:n}){const t=e=>{const t=c.replace_placeholders(this.url,n,e,void 0,void 0,encodeURIComponent);if(!r.isString(t))throw new Error(\"HTML output is not supported in this context\");this.same_tab?window.location.href=t:window.open(t)},{selected:o}=n;for(const e of o.indices)t(e);for(const e of o.line_indices)t(e)}}t.OpenURL=a,a.__name__=\"OpenURL\",a.init_OpenURL()},\n function _(a,n,e,r,s){r(),s(\"Canvas\",a(262).Canvas),s(\"CartesianFrame\",a(144).CartesianFrame)},\n function _(e,t,s,i,a){i();const l=e(14),n=e(240),r=e(19),o=e(43),h=e(20),_=e(13),c=e(263),d=e(99),p=e(249),v=(()=>{const e=document.createElement(\"canvas\"),t=e.getContext(\"webgl\",{premultipliedAlpha:!0});return null!=t?{canvas:e,gl:t}:void r.logger.trace(\"WebGL is not supported\")})(),u={position:\"absolute\",top:\"0\",left:\"0\",width:\"100%\",height:\"100%\"};class b extends n.DOMView{constructor(){super(...arguments),this.bbox=new d.BBox}initialize(){super.initialize(),\"webgl\"==this.model.output_backend&&(this.webgl=v),this.underlays_el=o.div({style:u}),this.primary=this.create_layer(),this.overlays=this.create_layer(),this.overlays_el=o.div({style:u}),this.events_el=o.div({class:\"bk-canvas-events\",style:u});const e=[this.underlays_el,this.primary.el,this.overlays.el,this.overlays_el,this.events_el];_.extend(this.el.style,u),o.append(this.el,...e),this.ui_event_bus=new c.UIEventBus(this)}remove(){this.ui_event_bus.destroy(),super.remove()}add_underlay(e){this.underlays_el.appendChild(e)}add_overlay(e){this.overlays_el.appendChild(e)}add_event(e){this.events_el.appendChild(e)}get pixel_ratio(){return this.primary.pixel_ratio}resize(e,t){this.bbox=new d.BBox({left:0,top:0,width:e,height:t}),this.primary.resize(e,t),this.overlays.resize(e,t)}prepare_webgl(e){const{webgl:t}=this;if(null!=t){const{width:s,height:i}=this.bbox;t.canvas.width=this.pixel_ratio*s,t.canvas.height=this.pixel_ratio*i;const{gl:a}=t;a.enable(a.SCISSOR_TEST);const[l,n,r,o]=e,{xview:h,yview:_}=this.bbox,c=h.compute(l),d=_.compute(n+o),p=this.pixel_ratio;a.scissor(p*c,p*d,p*r,p*o),a.enable(a.BLEND),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE_MINUS_DST_ALPHA,a.ONE),this._clear_webgl()}}blit_webgl(e){const{webgl:t}=this;if(null!=t){if(r.logger.debug(\"Blitting WebGL canvas\"),e.restore(),e.drawImage(t.canvas,0,0),e.save(),this.model.hidpi){const t=this.pixel_ratio;e.scale(t,t),e.translate(.5,.5)}this._clear_webgl()}}_clear_webgl(){const{webgl:e}=this;if(null!=e){const{gl:t,canvas:s}=e;t.viewport(0,0,s.width,s.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}}compose(){const e=this.create_layer(),{width:t,height:s}=this.bbox;return e.resize(t,s),e.ctx.drawImage(this.primary.canvas,0,0),e.ctx.drawImage(this.overlays.canvas,0,0),e}create_layer(){const{output_backend:e,hidpi:t}=this.model;return new p.CanvasLayer(e,t)}to_blob(){return this.compose().to_blob()}}s.CanvasView=b,b.__name__=\"CanvasView\";class g extends l.HasProps{constructor(e){super(e)}static init_Canvas(){this.prototype.default_view=b,this.internal((({Boolean:e})=>({hidpi:[e,!0],output_backend:[h.OutputBackend,\"canvas\"]})))}}s.Canvas=g,g.__name__=\"Canvas\",g.init_Canvas()},\n function _(t,e,s,n,i){n();const r=t(1),a=r.__importDefault(t(239)),_=t(15),h=t(19),o=t(43),l=r.__importStar(t(264)),c=t(265),p=t(9),u=t(8),v=t(27),d=t(244);class g{constructor(t){this.canvas_view=t,this.pan_start=new _.Signal(this,\"pan:start\"),this.pan=new _.Signal(this,\"pan\"),this.pan_end=new _.Signal(this,\"pan:end\"),this.pinch_start=new _.Signal(this,\"pinch:start\"),this.pinch=new _.Signal(this,\"pinch\"),this.pinch_end=new _.Signal(this,\"pinch:end\"),this.rotate_start=new _.Signal(this,\"rotate:start\"),this.rotate=new _.Signal(this,\"rotate\"),this.rotate_end=new _.Signal(this,\"rotate:end\"),this.tap=new _.Signal(this,\"tap\"),this.doubletap=new _.Signal(this,\"doubletap\"),this.press=new _.Signal(this,\"press\"),this.pressup=new _.Signal(this,\"pressup\"),this.move_enter=new _.Signal(this,\"move:enter\"),this.move=new _.Signal(this,\"move\"),this.move_exit=new _.Signal(this,\"move:exit\"),this.scroll=new _.Signal(this,\"scroll\"),this.keydown=new _.Signal(this,\"keydown\"),this.keyup=new _.Signal(this,\"keyup\"),this.hammer=new a.default(this.hit_area,{touchAction:\"auto\",inputClass:a.default.TouchMouseInput}),this._prev_move=null,this._curr_pan=null,this._curr_pinch=null,this._curr_rotate=null,this._configure_hammerjs(),this.hit_area.addEventListener(\"mousemove\",(t=>this._mouse_move(t))),this.hit_area.addEventListener(\"mouseenter\",(t=>this._mouse_enter(t))),this.hit_area.addEventListener(\"mouseleave\",(t=>this._mouse_exit(t))),this.hit_area.addEventListener(\"contextmenu\",(t=>this._context_menu(t))),this.hit_area.addEventListener(\"wheel\",(t=>this._mouse_wheel(t))),document.addEventListener(\"keydown\",this),document.addEventListener(\"keyup\",this),this.menu=new d.ContextMenu([],{prevent_hide:t=>2==t.button&&t.target==this.hit_area}),this.hit_area.appendChild(this.menu.el)}get hit_area(){return this.canvas_view.events_el}destroy(){this.menu.remove(),this.hammer.destroy(),document.removeEventListener(\"keydown\",this),document.removeEventListener(\"keyup\",this)}handleEvent(t){\"keydown\"==t.type?this._key_down(t):\"keyup\"==t.type&&this._key_up(t)}_configure_hammerjs(){this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",(t=>this._doubletap(t))),this.hammer.on(\"tap\",(t=>this._tap(t))),this.hammer.on(\"press\",(t=>this._press(t))),this.hammer.on(\"pressup\",(t=>this._pressup(t))),this.hammer.get(\"pan\").set({direction:a.default.DIRECTION_ALL}),this.hammer.on(\"panstart\",(t=>this._pan_start(t))),this.hammer.on(\"pan\",(t=>this._pan(t))),this.hammer.on(\"panend\",(t=>this._pan_end(t))),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",(t=>this._pinch_start(t))),this.hammer.on(\"pinch\",(t=>this._pinch(t))),this.hammer.on(\"pinchend\",(t=>this._pinch_end(t))),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",(t=>this._rotate_start(t))),this.hammer.on(\"rotate\",(t=>this._rotate(t))),this.hammer.on(\"rotateend\",(t=>this._rotate_end(t)))}register_tool(t){const e=t.model.event_type;null!=e&&(u.isString(e)?this._register_tool(t,e):e.forEach(((e,s)=>this._register_tool(t,e,s<1))))}_register_tool(t,e,s=!0){const n=t,{id:i}=n.model,r=t=>e=>{e.id==i&&t(e.e)},a=t=>e=>{t(e.e)};switch(e){case\"pan\":null!=n._pan_start&&n.connect(this.pan_start,r(n._pan_start.bind(n))),null!=n._pan&&n.connect(this.pan,r(n._pan.bind(n))),null!=n._pan_end&&n.connect(this.pan_end,r(n._pan_end.bind(n)));break;case\"pinch\":null!=n._pinch_start&&n.connect(this.pinch_start,r(n._pinch_start.bind(n))),null!=n._pinch&&n.connect(this.pinch,r(n._pinch.bind(n))),null!=n._pinch_end&&n.connect(this.pinch_end,r(n._pinch_end.bind(n)));break;case\"rotate\":null!=n._rotate_start&&n.connect(this.rotate_start,r(n._rotate_start.bind(n))),null!=n._rotate&&n.connect(this.rotate,r(n._rotate.bind(n))),null!=n._rotate_end&&n.connect(this.rotate_end,r(n._rotate_end.bind(n)));break;case\"move\":null!=n._move_enter&&n.connect(this.move_enter,r(n._move_enter.bind(n))),null!=n._move&&n.connect(this.move,r(n._move.bind(n))),null!=n._move_exit&&n.connect(this.move_exit,r(n._move_exit.bind(n)));break;case\"tap\":null!=n._tap&&n.connect(this.tap,r(n._tap.bind(n))),null!=n._doubletap&&n.connect(this.doubletap,r(n._doubletap.bind(n)));break;case\"press\":null!=n._press&&n.connect(this.press,r(n._press.bind(n))),null!=n._pressup&&n.connect(this.pressup,r(n._pressup.bind(n)));break;case\"scroll\":null!=n._scroll&&n.connect(this.scroll,r(n._scroll.bind(n)));break;default:throw new Error(`unsupported event_type: ${e}`)}s&&(null!=n._keydown&&n.connect(this.keydown,a(n._keydown.bind(n))),null!=n._keyup&&n.connect(this.keyup,a(n._keyup.bind(n))),v.is_mobile&&null!=n._scroll&&\"pinch\"==e&&(h.logger.debug(\"Registering scroll on touch screen\"),n.connect(this.scroll,r(n._scroll.bind(n)))))}_hit_test_renderers(t,e,s){var n;const i=t.get_renderer_views();for(const t of p.reversed(i))if(null===(n=t.interactive_hit)||void 0===n?void 0:n.call(t,e,s))return t;return null}set_cursor(t=\"default\"){this.hit_area.style.cursor=t}_hit_test_frame(t,e,s){return t.frame.bbox.contains(e,s)}_hit_test_canvas(t,e,s){return t.layout.bbox.contains(e,s)}_hit_test_plot(t,e){for(const s of this.canvas_view.plot_views)if(s.layout.bbox.relative().contains(t,e))return s;return null}_trigger(t,e,s){var n;const{sx:i,sy:r}=e,a=this._hit_test_plot(i,r),_=t=>{const[s,n]=[i,r];return Object.assign(Object.assign({},e),{sx:s,sy:n})};if(\"panstart\"==e.type||\"pan\"==e.type||\"panend\"==e.type){let n;if(\"panstart\"==e.type&&null!=a?(this._curr_pan={plot_view:a},n=a):\"pan\"==e.type&&null!=this._curr_pan?n=this._curr_pan.plot_view:\"panend\"==e.type&&null!=this._curr_pan?(n=this._curr_pan.plot_view,this._curr_pan=null):n=null,null!=n){const e=_();this.__trigger(n,t,e,s)}}else if(\"pinchstart\"==e.type||\"pinch\"==e.type||\"pinchend\"==e.type){let n;if(\"pinchstart\"==e.type&&null!=a?(this._curr_pinch={plot_view:a},n=a):\"pinch\"==e.type&&null!=this._curr_pinch?n=this._curr_pinch.plot_view:\"pinchend\"==e.type&&null!=this._curr_pinch?(n=this._curr_pinch.plot_view,this._curr_pinch=null):n=null,null!=n){const e=_();this.__trigger(n,t,e,s)}}else if(\"rotatestart\"==e.type||\"rotate\"==e.type||\"rotateend\"==e.type){let n;if(\"rotatestart\"==e.type&&null!=a?(this._curr_rotate={plot_view:a},n=a):\"rotate\"==e.type&&null!=this._curr_rotate?n=this._curr_rotate.plot_view:\"rotateend\"==e.type&&null!=this._curr_rotate?(n=this._curr_rotate.plot_view,this._curr_rotate=null):n=null,null!=n){const e=_();this.__trigger(n,t,e,s)}}else if(\"mouseenter\"==e.type||\"mousemove\"==e.type||\"mouseleave\"==e.type){const h=null===(n=this._prev_move)||void 0===n?void 0:n.plot_view;if(null!=h&&(\"mouseleave\"==e.type||h!=a)){const{sx:t,sy:e}=_();this.__trigger(h,this.move_exit,{type:\"mouseleave\",sx:t,sy:e,shiftKey:!1,ctrlKey:!1},s)}if(null!=a&&(\"mouseenter\"==e.type||h!=a)){const{sx:t,sy:e}=_();this.__trigger(a,this.move_enter,{type:\"mouseenter\",sx:t,sy:e,shiftKey:!1,ctrlKey:!1},s)}if(null!=a&&\"mousemove\"==e.type){const e=_();this.__trigger(a,t,e,s)}this._prev_move={sx:i,sy:r,plot_view:a}}else if(null!=a){const e=_();this.__trigger(a,t,e,s)}}__trigger(t,e,s,n){var i,r;const a=t.model.toolbar.gestures,_=e.name.split(\":\")[0],h=this._hit_test_renderers(t,s.sx,s.sy),o=this._hit_test_canvas(t,s.sx,s.sy);switch(_){case\"move\":{const n=a[_].active;null!=n&&this.trigger(e,s,n.id);const r=t.model.toolbar.inspectors.filter((t=>t.active));let l=\"default\";null!=h?(l=null!==(i=h.cursor(s.sx,s.sy))&&void 0!==i?i:l,p.is_empty(r)||(e=this.move_exit)):this._hit_test_frame(t,s.sx,s.sy)&&(p.is_empty(r)||(l=\"crosshair\")),this.set_cursor(l),t.set_toolbar_visibility(o),r.map((t=>this.trigger(e,s,t.id)));break}case\"tap\":{const{target:t}=n;if(null!=t&&t!=this.hit_area)return;null!=h&&null!=h.on_hit&&h.on_hit(s.sx,s.sy);const i=a[_].active;null!=i&&this.trigger(e,s,i.id);break}case\"doubletap\":{const t=null!==(r=a.doubletap.active)&&void 0!==r?r:a.tap.active;null!=t&&this.trigger(e,s,t.id);break}case\"scroll\":{const t=a[v.is_mobile?\"pinch\":\"scroll\"].active;null!=t&&(n.preventDefault(),n.stopPropagation(),this.trigger(e,s,t.id));break}case\"pan\":{const t=a[_].active;null!=t&&(n.preventDefault(),this.trigger(e,s,t.id));break}default:{const t=a[_].active;null!=t&&this.trigger(e,s,t.id)}}this._trigger_bokeh_event(t,s)}trigger(t,e,s=null){t.emit({id:s,e})}_trigger_bokeh_event(t,e){const s=(()=>{const{sx:s,sy:n}=e,i=t.frame.x_scale.invert(s),r=t.frame.y_scale.invert(n);switch(e.type){case\"wheel\":return new l.MouseWheel(s,n,i,r,e.delta);case\"mousemove\":return new l.MouseMove(s,n,i,r);case\"mouseenter\":return new l.MouseEnter(s,n,i,r);case\"mouseleave\":return new l.MouseLeave(s,n,i,r);case\"tap\":return new l.Tap(s,n,i,r);case\"doubletap\":return new l.DoubleTap(s,n,i,r);case\"press\":return new l.Press(s,n,i,r);case\"pressup\":return new l.PressUp(s,n,i,r);case\"pan\":return new l.Pan(s,n,i,r,e.deltaX,e.deltaY);case\"panstart\":return new l.PanStart(s,n,i,r);case\"panend\":return new l.PanEnd(s,n,i,r);case\"pinch\":return new l.Pinch(s,n,i,r,e.scale);case\"pinchstart\":return new l.PinchStart(s,n,i,r);case\"pinchend\":return new l.PinchEnd(s,n,i,r);case\"rotate\":return new l.Rotate(s,n,i,r,e.rotation);case\"rotatestart\":return new l.RotateStart(s,n,i,r);case\"rotateend\":return new l.RotateEnd(s,n,i,r);default:return}})();null!=s&&t.model.trigger_event(s)}_get_sxy(t){const{pageX:e,pageY:s}=function(t){return\"undefined\"!=typeof TouchEvent&&t instanceof TouchEvent}(t)?(0!=t.touches.length?t.touches:t.changedTouches)[0]:t,{left:n,top:i}=o.offset(this.hit_area);return{sx:e-n,sy:s-i}}_pan_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{deltaX:t.deltaX,deltaY:t.deltaY,shiftKey:t.srcEvent.shiftKey,ctrlKey:t.srcEvent.ctrlKey})}_pinch_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{scale:t.scale,shiftKey:t.srcEvent.shiftKey,ctrlKey:t.srcEvent.ctrlKey})}_rotate_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{rotation:t.rotation,shiftKey:t.srcEvent.shiftKey,ctrlKey:t.srcEvent.ctrlKey})}_tap_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{shiftKey:t.srcEvent.shiftKey,ctrlKey:t.srcEvent.ctrlKey})}_move_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t)),{shiftKey:t.shiftKey,ctrlKey:t.ctrlKey})}_scroll_event(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t)),{delta:c.getDeltaY(t),shiftKey:t.shiftKey,ctrlKey:t.ctrlKey})}_key_event(t){return{type:t.type,keyCode:t.keyCode}}_pan_start(t){const e=this._pan_event(t);e.sx-=t.deltaX,e.sy-=t.deltaY,this._trigger(this.pan_start,e,t.srcEvent)}_pan(t){this._trigger(this.pan,this._pan_event(t),t.srcEvent)}_pan_end(t){this._trigger(this.pan_end,this._pan_event(t),t.srcEvent)}_pinch_start(t){this._trigger(this.pinch_start,this._pinch_event(t),t.srcEvent)}_pinch(t){this._trigger(this.pinch,this._pinch_event(t),t.srcEvent)}_pinch_end(t){this._trigger(this.pinch_end,this._pinch_event(t),t.srcEvent)}_rotate_start(t){this._trigger(this.rotate_start,this._rotate_event(t),t.srcEvent)}_rotate(t){this._trigger(this.rotate,this._rotate_event(t),t.srcEvent)}_rotate_end(t){this._trigger(this.rotate_end,this._rotate_event(t),t.srcEvent)}_tap(t){this._trigger(this.tap,this._tap_event(t),t.srcEvent)}_doubletap(t){this._trigger(this.doubletap,this._tap_event(t),t.srcEvent)}_press(t){this._trigger(this.press,this._tap_event(t),t.srcEvent)}_pressup(t){this._trigger(this.pressup,this._tap_event(t),t.srcEvent)}_mouse_enter(t){this._trigger(this.move_enter,this._move_event(t),t)}_mouse_move(t){this._trigger(this.move,this._move_event(t),t)}_mouse_exit(t){this._trigger(this.move_exit,this._move_event(t),t)}_mouse_wheel(t){this._trigger(this.scroll,this._scroll_event(t),t)}_context_menu(t){!this.menu.is_open&&this.menu.can_open&&t.preventDefault();const{sx:e,sy:s}=this._get_sxy(t);this.menu.toggle({left:e,top:s})}_key_down(t){this.trigger(this.keydown,this._key_event(t))}_key_up(t){this.trigger(this.keyup,this._key_event(t))}}s.UIEventBus=g,g.__name__=\"UIEventBus\"},\n function _(e,t,s,n,_){n();var a=this&&this.__decorate||function(e,t,s,n){var _,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,n);else for(var c=e.length-1;c>=0;c--)(_=e[c])&&(o=(a<3?_(o):a>3?_(t,s,o):_(t,s))||o);return a>3&&o&&Object.defineProperty(t,s,o),o};function o(e){return function(t){t.prototype.event_name=e}}class c{to_json(){const{event_name:e}=this;return{event_name:e,event_values:this._to_json()}}}s.BokehEvent=c,c.__name__=\"BokehEvent\";class r extends c{constructor(){super(...arguments),this.origin=null}_to_json(){return{model:this.origin}}}s.ModelEvent=r,r.__name__=\"ModelEvent\";let l=class extends c{_to_json(){return{}}};s.DocumentReady=l,l.__name__=\"DocumentReady\",s.DocumentReady=l=a([o(\"document_ready\")],l);let i=class extends r{};s.ButtonClick=i,i.__name__=\"ButtonClick\",s.ButtonClick=i=a([o(\"button_click\")],i);let u=class extends r{constructor(e){super(),this.item=e}_to_json(){const{item:e}=this;return Object.assign(Object.assign({},super._to_json()),{item:e})}};s.MenuItemClick=u,u.__name__=\"MenuItemClick\",s.MenuItemClick=u=a([o(\"menu_item_click\")],u);class d extends r{}s.UIEvent=d,d.__name__=\"UIEvent\";let h=class extends d{};s.LODStart=h,h.__name__=\"LODStart\",s.LODStart=h=a([o(\"lodstart\")],h);let m=class extends d{};s.LODEnd=m,m.__name__=\"LODEnd\",s.LODEnd=m=a([o(\"lodend\")],m);let x=class extends d{constructor(e,t){super(),this.geometry=e,this.final=t}_to_json(){const{geometry:e,final:t}=this;return Object.assign(Object.assign({},super._to_json()),{geometry:e,final:t})}};s.SelectionGeometry=x,x.__name__=\"SelectionGeometry\",s.SelectionGeometry=x=a([o(\"selectiongeometry\")],x);let p=class extends d{};s.Reset=p,p.__name__=\"Reset\",s.Reset=p=a([o(\"reset\")],p);class j extends d{constructor(e,t,s,n){super(),this.sx=e,this.sy=t,this.x=s,this.y=n}_to_json(){const{sx:e,sy:t,x:s,y:n}=this;return Object.assign(Object.assign({},super._to_json()),{sx:e,sy:t,x:s,y:n})}}s.PointEvent=j,j.__name__=\"PointEvent\";let y=class extends j{constructor(e,t,s,n,_,a){super(e,t,s,n),this.sx=e,this.sy=t,this.x=s,this.y=n,this.delta_x=_,this.delta_y=a}_to_json(){const{delta_x:e,delta_y:t}=this;return Object.assign(Object.assign({},super._to_json()),{delta_x:e,delta_y:t})}};s.Pan=y,y.__name__=\"Pan\",s.Pan=y=a([o(\"pan\")],y);let P=class extends j{constructor(e,t,s,n,_){super(e,t,s,n),this.sx=e,this.sy=t,this.x=s,this.y=n,this.scale=_}_to_json(){const{scale:e}=this;return Object.assign(Object.assign({},super._to_json()),{scale:e})}};s.Pinch=P,P.__name__=\"Pinch\",s.Pinch=P=a([o(\"pinch\")],P);let v=class extends j{constructor(e,t,s,n,_){super(e,t,s,n),this.sx=e,this.sy=t,this.x=s,this.y=n,this.rotation=_}_to_json(){const{rotation:e}=this;return Object.assign(Object.assign({},super._to_json()),{rotation:e})}};s.Rotate=v,v.__name__=\"Rotate\",s.Rotate=v=a([o(\"rotate\")],v);let g=class extends j{constructor(e,t,s,n,_){super(e,t,s,n),this.sx=e,this.sy=t,this.x=s,this.y=n,this.delta=_}_to_json(){const{delta:e}=this;return Object.assign(Object.assign({},super._to_json()),{delta:e})}};s.MouseWheel=g,g.__name__=\"MouseWheel\",s.MouseWheel=g=a([o(\"wheel\")],g);let E=class extends j{};s.MouseMove=E,E.__name__=\"MouseMove\",s.MouseMove=E=a([o(\"mousemove\")],E);let O=class extends j{};s.MouseEnter=O,O.__name__=\"MouseEnter\",s.MouseEnter=O=a([o(\"mouseenter\")],O);let b=class extends j{};s.MouseLeave=b,b.__name__=\"MouseLeave\",s.MouseLeave=b=a([o(\"mouseleave\")],b);let M=class extends j{};s.Tap=M,M.__name__=\"Tap\",s.Tap=M=a([o(\"tap\")],M);let R=class extends j{};s.DoubleTap=R,R.__name__=\"DoubleTap\",s.DoubleTap=R=a([o(\"doubletap\")],R);let f=class extends j{};s.Press=f,f.__name__=\"Press\",s.Press=f=a([o(\"press\")],f);let S=class extends j{};s.PressUp=S,S.__name__=\"PressUp\",s.PressUp=S=a([o(\"pressup\")],S);let D=class extends j{};s.PanStart=D,D.__name__=\"PanStart\",s.PanStart=D=a([o(\"panstart\")],D);let k=class extends j{};s.PanEnd=k,k.__name__=\"PanEnd\",s.PanEnd=k=a([o(\"panend\")],k);let L=class extends j{};s.PinchStart=L,L.__name__=\"PinchStart\",s.PinchStart=L=a([o(\"pinchstart\")],L);let C=class extends j{};s.PinchEnd=C,C.__name__=\"PinchEnd\",s.PinchEnd=C=a([o(\"pinchend\")],C);let T=class extends j{};s.RotateStart=T,T.__name__=\"RotateStart\",s.RotateStart=T=a([o(\"rotatestart\")],T);let B=class extends j{};s.RotateEnd=B,B.__name__=\"RotateEnd\",s.RotateEnd=B=a([o(\"rotateend\")],B)},\n function _(t,e,n,l,o){\n /*!\n * jQuery Mousewheel 3.1.13\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n */\n function u(t){const e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}l(),n.getDeltaY=function(t){let e=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:e*=(n=t.target,null!==(a=null!==(o=u(null!==(l=n.offsetParent)&&void 0!==l?l:document.body))&&void 0!==o?o:u(n))&&void 0!==a?a:16);break;case t.DOM_DELTA_PAGE:e*=function(t){return t.clientHeight}(t.target)}var n,l,o,a;return e}},\n function _(m,i,u,s,a){s(),a(\"Expression\",m(124).Expression),a(\"CustomJSExpr\",m(267).CustomJSExpr),a(\"Stack\",m(268).Stack),a(\"CumSum\",m(269).CumSum),a(\"ScalarExpression\",m(124).ScalarExpression),a(\"Minimum\",m(270).Minimum),a(\"Maximum\",m(271).Maximum)},\n function _(t,e,s,n,r){n();const i=t(14),o=t(124),a=t(24),c=t(9),u=t(13),l=t(34),h=t(8);class p extends o.Expression{constructor(t){super(t)}static init_CustomJSExpr(){this.define((({Unknown:t,String:e,Dict:s})=>({args:[s(t),{}],code:[e,\"\"]})))}connect_signals(){super.connect_signals();for(const t of u.values(this.args))t instanceof i.HasProps&&t.change.connect((()=>{this._result.clear(),this.change.emit()}))}get names(){return u.keys(this.args)}get values(){return u.values(this.args)}get func(){const t=l.use_strict(this.code);return new a.GeneratorFunction(...this.names,t)}_v_compute(t){const e=this.func.apply(t,this.values);let s=e.next();if(s.done&&void 0!==s.value){const{value:e}=s;return h.isArray(e)||h.isTypedArray(e)?e:h.isIterable(e)?[...e]:c.repeat(e,t.length)}{const t=[];do{t.push(s.value),s=e.next()}while(!s.done);return t}}}s.CustomJSExpr=p,p.__name__=\"CustomJSExpr\",p.init_CustomJSExpr()},\n function _(t,n,e,i,s){i();const a=t(124);class c extends a.Expression{constructor(t){super(t)}static init_Stack(){this.define((({String:t,Array:n})=>({fields:[n(t),[]]})))}_v_compute(t){var n;const e=null!==(n=t.get_length())&&void 0!==n?n:0,i=new Float64Array(e);for(const n of this.fields){const s=t.data[n];if(null!=s)for(let t=0,n=Math.min(e,s.length);t({field:[t],include_zero:[e,!1]})))}_v_compute(e){var t;const n=new Float64Array(null!==(t=e.get_length())&&void 0!==t?t:0),i=e.data[this.field],u=this.include_zero?1:0;n[0]=this.include_zero?0:i[0];for(let e=1;e({field:[n],initial:[t(i),null]})))}_compute(i){var n,t;const l=null!==(n=i.data[this.field])&&void 0!==n?n:[];return Math.min(null!==(t=this.initial)&&void 0!==t?t:1/0,m.min(l))}}t.Minimum=s,s.__name__=\"Minimum\",s.init_Minimum()},\n function _(i,t,a,n,l){n();const u=i(124),e=i(9);class m extends u.ScalarExpression{constructor(i){super(i)}static init_Maximum(){this.define((({Number:i,String:t,Nullable:a})=>({field:[t],initial:[a(i),null]})))}_compute(i){var t,a;const n=null!==(t=i.data[this.field])&&void 0!==t?t:[];return Math.max(null!==(a=this.initial)&&void 0!==a?a:-1/0,e.max(n))}}a.Maximum=m,m.__name__=\"Maximum\",m.init_Maximum()},\n function _(e,t,l,r,i){r(),i(\"BooleanFilter\",e(273).BooleanFilter),i(\"CustomJSFilter\",e(274).CustomJSFilter),i(\"Filter\",e(121).Filter),i(\"GroupFilter\",e(275).GroupFilter),i(\"IndexFilter\",e(276).IndexFilter)},\n function _(e,n,l,o,t){o();const i=e(121),s=e(24);class a extends i.Filter{constructor(e){super(e)}static init_BooleanFilter(){this.define((({Boolean:e,Array:n,Nullable:l})=>({booleans:[l(n(e)),null]})))}compute_indices(e){const n=e.length,{booleans:l}=this;return null==l?s.Indices.all_set(n):s.Indices.from_booleans(n,l)}}l.BooleanFilter=a,a.__name__=\"BooleanFilter\",a.init_BooleanFilter()},\n function _(e,t,s,n,r){n();const i=e(121),o=e(24),u=e(13),c=e(8),a=e(34);class l extends i.Filter{constructor(e){super(e)}static init_CustomJSFilter(){this.define((({Unknown:e,String:t,Dict:s})=>({args:[s(e),{}],code:[t,\"\"]})))}get names(){return u.keys(this.args)}get values(){return u.values(this.args)}get func(){const e=a.use_strict(this.code);return new Function(...this.names,\"source\",e)}compute_indices(e){const t=e.length,s=this.func(...this.values,e);if(null==s)return o.Indices.all_set(t);if(c.isArrayOf(s,c.isInteger))return o.Indices.from_indices(t,s);if(c.isArrayOf(s,c.isBoolean))return o.Indices.from_booleans(t,s);throw new Error(`expect an array of integers or booleans, or null, got ${s}`)}}s.CustomJSFilter=l,l.__name__=\"CustomJSFilter\",l.init_CustomJSFilter()},\n function _(n,t,e,i,o){i();const r=n(121),u=n(24),s=n(19);class c extends r.Filter{constructor(n){super(n)}static init_GroupFilter(){this.define((({String:n})=>({column_name:[n],group:[n]})))}compute_indices(n){const t=n.get_column(this.column_name);if(null==t)return s.logger.warn(`${this}: groupby column '${this.column_name}' not found in the data source`),new u.Indices(n.length,1);{const e=new u.Indices(n.length);for(let n=0;n({indices:[i(n(e)),null]})))}compute_indices(e){const n=e.length,{indices:i}=this;return null==i?c.Indices.all_set(n):c.Indices.from_indices(n,i)}}i.IndexFilter=r,r.__name__=\"IndexFilter\",r.init_IndexFilter()},\n function _(e,a,l,i,t){i(),t(\"AnnularWedge\",e(278).AnnularWedge),t(\"Annulus\",e(279).Annulus),t(\"Arc\",e(280).Arc),t(\"Bezier\",e(281).Bezier),t(\"Circle\",e(282).Circle),t(\"Ellipse\",e(286).Ellipse),t(\"EllipseOval\",e(287).EllipseOval),t(\"Glyph\",e(98).Glyph),t(\"HArea\",e(117).HArea),t(\"HBar\",e(289).HBar),t(\"HexTile\",e(291).HexTile),t(\"Image\",e(292).Image),t(\"ImageRGBA\",e(294).ImageRGBA),t(\"ImageURL\",e(295).ImageURL),t(\"Line\",e(63).Line),t(\"MultiLine\",e(127).MultiLine),t(\"MultiPolygons\",e(297).MultiPolygons),t(\"Oval\",e(298).Oval),t(\"Patch\",e(116).Patch),t(\"Patches\",e(128).Patches),t(\"Quad\",e(299).Quad),t(\"Quadratic\",e(300).Quadratic),t(\"Ray\",e(301).Ray),t(\"Rect\",e(302).Rect),t(\"Scatter\",e(303).Scatter),t(\"Segment\",e(306).Segment),t(\"Spline\",e(307).Spline),t(\"Step\",e(309).Step),t(\"Text\",e(310).Text),t(\"VArea\",e(119).VArea),t(\"VBar\",e(311).VBar),t(\"Wedge\",e(312).Wedge)},\n function _(e,t,s,i,r){i();const n=e(1),a=e(64),o=e(106),_=e(48),d=e(24),u=e(20),h=n.__importStar(e(18)),l=e(10),c=e(59);class g extends a.XYGlyphView{_map_data(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this.inner_radius):this.sinner_radius=d.to_screen(this.inner_radius),\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this.outer_radius):this.souter_radius=d.to_screen(this.outer_radius)}_render(e,t,s){const{sx:i,sy:r,start_angle:n,end_angle:a,sinner_radius:o,souter_radius:_}=null!=s?s:this,d=\"anticlock\"==this.model.direction;for(const s of t){const t=i[s],u=r[s],h=o[s],l=_[s],c=n.get(s),g=a.get(s);if(isNaN(t+u+h+l+c+g))continue;const x=g-c;e.translate(t,u),e.rotate(c),e.beginPath(),e.moveTo(l,0),e.arc(0,0,l,0,x,d),e.rotate(x),e.lineTo(h,0),e.arc(0,0,h,0,-x,!d),e.closePath(),e.rotate(-x-c),e.translate(-t,-u),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,s),e.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_vectorize(e,s),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,s),e.stroke())}}_hit_point(e){const{sx:t,sy:s}=e,i=this.renderer.xscale.invert(t),r=this.renderer.yscale.invert(s);let n,a,o,_;if(\"data\"==this.model.properties.outer_radius.units)n=i-this.max_outer_radius,o=i+this.max_outer_radius,a=r-this.max_outer_radius,_=r+this.max_outer_radius;else{const e=t-this.max_outer_radius,i=t+this.max_outer_radius;[n,o]=this.renderer.xscale.r_invert(e,i);const r=s-this.max_outer_radius,d=s+this.max_outer_radius;[a,_]=this.renderer.yscale.r_invert(r,d)}const d=[];for(const e of this.index.indices({x0:n,x1:o,y0:a,y1:_})){const t=this.souter_radius[e]**2,s=this.sinner_radius[e]**2,[n,a]=this.renderer.xscale.r_compute(i,this._x[e]),[o,_]=this.renderer.yscale.r_compute(r,this._y[e]),u=(n-a)**2+(o-_)**2;u<=t&&u>=s&&d.push(e)}const u=\"anticlock\"==this.model.direction,h=[];for(const e of d){const i=Math.atan2(s-this.sy[e],t-this.sx[e]);l.angle_between(-i,-this.start_angle.get(e),-this.end_angle.get(e),u)&&h.push(e)}return new c.Selection({indices:h})}draw_legend_for_index(e,t,s){o.generic_area_vector_legend(this.visuals,e,t,s)}scenterxy(e){const t=(this.sinner_radius[e]+this.souter_radius[e])/2,s=(this.start_angle.get(e)+this.end_angle.get(e))/2;return[this.sx[e]+t*Math.cos(s),this.sy[e]+t*Math.sin(s)]}}s.AnnularWedgeView=g,g.__name__=\"AnnularWedgeView\";class x extends a.XYGlyph{constructor(e){super(e)}static init_AnnularWedge(){this.prototype.default_view=g,this.mixins([_.LineVector,_.FillVector,_.HatchVector]),this.define((({})=>({direction:[u.Direction,\"anticlock\"],inner_radius:[h.DistanceSpec,{field:\"inner_radius\"}],outer_radius:[h.DistanceSpec,{field:\"outer_radius\"}],start_angle:[h.AngleSpec,{field:\"start_angle\"}],end_angle:[h.AngleSpec,{field:\"end_angle\"}]})))}}s.AnnularWedge=x,x.__name__=\"AnnularWedge\",x.init_AnnularWedge()},\n function _(s,i,t,e,r){e();const n=s(1),a=s(64),u=s(24),_=s(48),o=n.__importStar(s(18)),h=s(27),d=s(59);class c extends a.XYGlyphView{_map_data(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this.inner_radius):this.sinner_radius=u.to_screen(this.inner_radius),\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this.outer_radius):this.souter_radius=u.to_screen(this.outer_radius)}_render(s,i,t){const{sx:e,sy:r,sinner_radius:n,souter_radius:a}=null!=t?t:this;for(const t of i){const i=e[t],_=r[t],o=n[t],d=a[t];function u(){if(s.beginPath(),h.is_ie)for(const t of[!1,!0])s.arc(i,_,o,0,Math.PI,t),s.arc(i,_,d,Math.PI,0,!t);else s.arc(i,_,o,0,2*Math.PI,!0),s.arc(i,_,d,2*Math.PI,0,!1)}isNaN(i+_+o+d)||(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(s,t),u(),s.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_vectorize(s,t),u(),s.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(s,t),s.beginPath(),s.arc(i,_,o,0,2*Math.PI),s.moveTo(i+d,_),s.arc(i,_,d,0,2*Math.PI),s.stroke()))}}_hit_point(s){const{sx:i,sy:t}=s,e=this.renderer.xscale.invert(i),r=this.renderer.yscale.invert(t);let n,a,u,_;if(\"data\"==this.model.properties.outer_radius.units)n=e-this.max_outer_radius,u=e+this.max_outer_radius,a=r-this.max_outer_radius,_=r+this.max_outer_radius;else{const s=i-this.max_outer_radius,e=i+this.max_outer_radius;[n,u]=this.renderer.xscale.r_invert(s,e);const r=t-this.max_outer_radius,o=t+this.max_outer_radius;[a,_]=this.renderer.yscale.r_invert(r,o)}const o=[];for(const s of this.index.indices({x0:n,x1:u,y0:a,y1:_})){const i=this.souter_radius[s]**2,t=this.sinner_radius[s]**2,[n,a]=this.renderer.xscale.r_compute(e,this._x[s]),[u,_]=this.renderer.yscale.r_compute(r,this._y[s]),h=(n-a)**2+(u-_)**2;h<=i&&h>=t&&o.push(s)}return new d.Selection({indices:o})}draw_legend_for_index(s,{x0:i,y0:t,x1:e,y1:r},n){const a=n+1,u=new Array(a);u[n]=(i+e)/2;const _=new Array(a);_[n]=(t+r)/2;const o=.5*Math.min(Math.abs(e-i),Math.abs(r-t)),h=new Array(a);h[n]=.4*o;const d=new Array(a);d[n]=.8*o,this._render(s,[n],{sx:u,sy:_,sinner_radius:h,souter_radius:d})}}t.AnnulusView=c,c.__name__=\"AnnulusView\";class l extends a.XYGlyph{constructor(s){super(s)}static init_Annulus(){this.prototype.default_view=c,this.mixins([_.LineVector,_.FillVector,_.HatchVector]),this.define((({})=>({inner_radius:[o.DistanceSpec,{field:\"inner_radius\"}],outer_radius:[o.DistanceSpec,{field:\"outer_radius\"}]})))}}t.Annulus=l,l.__name__=\"Annulus\",l.init_Annulus()},\n function _(e,i,s,t,n){t();const r=e(1),a=e(64),c=e(106),d=e(48),_=e(24),l=e(20),o=r.__importStar(e(18));class h extends a.XYGlyphView{_map_data(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this.radius):this.sradius=_.to_screen(this.radius)}_render(e,i,s){if(this.visuals.line.doit){const{sx:t,sy:n,sradius:r,start_angle:a,end_angle:c}=null!=s?s:this,d=\"anticlock\"==this.model.direction;for(const s of i){const i=t[s],_=n[s],l=r[s],o=a.get(s),h=c.get(s);isNaN(i+_+l+o+h)||(e.beginPath(),e.arc(i,_,l,o,h,d),this.visuals.line.set_vectorize(e,s),e.stroke())}}}draw_legend_for_index(e,i,s){c.generic_line_vector_legend(this.visuals,e,i,s)}}s.ArcView=h,h.__name__=\"ArcView\";class u extends a.XYGlyph{constructor(e){super(e)}static init_Arc(){this.prototype.default_view=h,this.mixins(d.LineVector),this.define((({})=>({direction:[l.Direction,\"anticlock\"],radius:[o.DistanceSpec,{field:\"radius\"}],start_angle:[o.AngleSpec,{field:\"start_angle\"}],end_angle:[o.AngleSpec,{field:\"end_angle\"}]})))}}s.Arc=u,u.__name__=\"Arc\",u.init_Arc()},\n function _(e,t,i,s,n){s();const o=e(1),c=e(48),r=e(98),a=e(106),_=e(65),d=o.__importStar(e(18));function l(e,t,i,s,n,o,c,r){const a=[],_=[[],[]];for(let _=0;_<=2;_++){let d,l,x;if(0===_?(l=6*e-12*i+6*n,d=-3*e+9*i-9*n+3*c,x=3*i-3*e):(l=6*t-12*s+6*o,d=-3*t+9*s-9*o+3*r,x=3*s-3*t),Math.abs(d)<1e-12){if(Math.abs(l)<1e-12)continue;const e=-x/l;0({x0:[d.XCoordinateSpec,{field:\"x0\"}],y0:[d.YCoordinateSpec,{field:\"y0\"}],x1:[d.XCoordinateSpec,{field:\"x1\"}],y1:[d.YCoordinateSpec,{field:\"y1\"}],cx0:[d.XCoordinateSpec,{field:\"cx0\"}],cy0:[d.YCoordinateSpec,{field:\"cy0\"}],cx1:[d.XCoordinateSpec,{field:\"cx1\"}],cy1:[d.YCoordinateSpec,{field:\"cy1\"}]}))),this.mixins(c.LineVector)}}i.Bezier=h,h.__name__=\"Bezier\",h.init_Bezier()},\n function _(s,i,e,t,r){t();const a=s(1),n=s(64),h=s(283),d=s(48),l=s(24),c=s(20),_=a.__importStar(s(107)),u=a.__importStar(s(18)),o=s(9),x=s(12),m=s(59);class y extends n.XYGlyphView{initialize(){super.initialize();const{webgl:s}=this.renderer.plot_view.canvas_view;null!=s&&(this.glglyph=new h.MarkerGL(s.gl,this,\"circle\"))}get use_radius(){return!(this.radius.is_Scalar()&&isNaN(this.radius.value))}_map_data(){if(this.use_radius)if(\"data\"==this.model.properties.radius.units)switch(this.model.radius_dimension){case\"x\":this.sradius=this.sdist(this.renderer.xscale,this._x,this.radius);break;case\"y\":this.sradius=this.sdist(this.renderer.yscale,this._y,this.radius);break;case\"max\":{const s=this.sdist(this.renderer.xscale,this._x,this.radius),i=this.sdist(this.renderer.yscale,this._y,this.radius);this.sradius=x.map(s,((s,e)=>Math.max(s,i[e])));break}case\"min\":{const s=this.sdist(this.renderer.xscale,this._x,this.radius),i=this.sdist(this.renderer.yscale,this._y,this.radius);this.sradius=x.map(s,((s,e)=>Math.min(s,i[e])));break}}else this.sradius=l.to_screen(this.radius),this._configure(\"max_size\",{value:2*this.max_radius});else{const s=new l.ScreenArray(this.size);this.sradius=x.map(s,(s=>s/2))}}_mask_data(){const{frame:s}=this.renderer.plot_view,i=s.x_target,e=s.y_target;let t,r;return this.use_radius&&\"data\"==this.model.properties.radius.units?(t=i.map((s=>this.renderer.xscale.invert(s))).widen(this.max_radius),r=e.map((s=>this.renderer.yscale.invert(s))).widen(this.max_radius)):(t=i.widen(this.max_size).map((s=>this.renderer.xscale.invert(s))),r=e.widen(this.max_size).map((s=>this.renderer.yscale.invert(s)))),this.index.indices({x0:t.start,x1:t.end,y0:r.start,y1:r.end})}_render(s,i,e){const{sx:t,sy:r,sradius:a}=null!=e?e:this;for(const e of i){const i=t[e],n=r[e],h=a[e];isNaN(i+n+h)||(s.beginPath(),s.arc(i,n,h,0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(s,e),s.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_vectorize(s,e),s.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(s,e),s.stroke()))}}_hit_point(s){const{sx:i,sy:e}=s,t=this.renderer.xscale.invert(i),r=this.renderer.yscale.invert(e),{hit_dilation:a}=this.model;let n,h,d,l;if(this.use_radius&&\"data\"==this.model.properties.radius.units)n=t-this.max_radius*a,h=t+this.max_radius*a,d=r-this.max_radius*a,l=r+this.max_radius*a;else{const s=i-this.max_size*a,t=i+this.max_size*a;[n,h]=this.renderer.xscale.r_invert(s,t);const r=e-this.max_size*a,c=e+this.max_size*a;[d,l]=this.renderer.yscale.r_invert(r,c)}const c=this.index.indices({x0:n,x1:h,y0:d,y1:l}),_=[];if(this.use_radius&&\"data\"==this.model.properties.radius.units)for(const s of c){const i=(this.sradius[s]*a)**2,[e,n]=this.renderer.xscale.r_compute(t,this._x[s]),[h,d]=this.renderer.yscale.r_compute(r,this._y[s]);(e-n)**2+(h-d)**2<=i&&_.push(s)}else for(const s of c){const t=(this.sradius[s]*a)**2;(this.sx[s]-i)**2+(this.sy[s]-e)**2<=t&&_.push(s)}return new m.Selection({indices:_})}_hit_span(s){const{sx:i,sy:e}=s,t=this.bounds();let r,a,n,h;if(\"h\"==s.direction){let s,e;if(n=t.y0,h=t.y1,this.use_radius&&\"data\"==this.model.properties.radius.units)s=i-this.max_radius,e=i+this.max_radius,[r,a]=this.renderer.xscale.r_invert(s,e);else{const t=this.max_size/2;s=i-t,e=i+t,[r,a]=this.renderer.xscale.r_invert(s,e)}}else{let s,i;if(r=t.x0,a=t.x1,this.use_radius&&\"data\"==this.model.properties.radius.units)s=e-this.max_radius,i=e+this.max_radius,[n,h]=this.renderer.yscale.r_invert(s,i);else{const t=this.max_size/2;s=e-t,i=e+t,[n,h]=this.renderer.yscale.r_invert(s,i)}}const d=[...this.index.indices({x0:r,x1:a,y0:n,y1:h})];return new m.Selection({indices:d})}_hit_rect(s){const{sx0:i,sx1:e,sy0:t,sy1:r}=s,[a,n]=this.renderer.xscale.r_invert(i,e),[h,d]=this.renderer.yscale.r_invert(t,r),l=[...this.index.indices({x0:a,x1:n,y0:h,y1:d})];return new m.Selection({indices:l})}_hit_poly(s){const{sx:i,sy:e}=s,t=o.range(0,this.sx.length),r=[];for(let s=0,a=t.length;s({angle:[u.AngleSpec,0],size:[u.ScreenDistanceSpec,{value:4}],radius:[u.NullDistanceSpec,null],radius_dimension:[c.RadiusDimension,\"x\"],hit_dilation:[s,1]})))}}e.Circle=p,p.__name__=\"Circle\",p.init_Circle()},\n function _(t,e,s,i,a){i();const r=t(1),o=t(109),_=t(113),l=r.__importDefault(t(284)),h=r.__importDefault(t(285)),n=t(282),f=t(12),u=t(19),c=t(24),g=t(22),b=t(11);function d(t,e,s,i,a,r,o){if(a.doit)if(r.is_Scalar()&&o.is_Scalar()){e.used=!1;const[i,a,_,l]=g.color2rgba(r.value,o.value);t.set_attribute(s,\"vec4\",[i/255,a/255,_/255,l/255])}else{let a;if(e.used=!0,r.is_Vector()){const t=new c.ColorArray(r.array);if(a=new c.RGBAArray(t.buffer),!o.is_Scalar()||1!=o.value)for(let t=0;t2*t))),i.data_changed=!1),this.visuals_changed&&(this._set_visuals(a),this.visuals_changed=!1),this.prog.set_uniform(\"u_pixel_ratio\",\"float\",[s.pixel_ratio]),this.prog.set_uniform(\"u_canvas_size\",\"vec2\",[s.width,s.height]),this.prog.set_attribute(\"a_sx\",\"float\",i.vbo_sx),this.prog.set_attribute(\"a_sy\",\"float\",i.vbo_sy),this.prog.set_attribute(\"a_size\",\"float\",i.vbo_s),this.prog.set_attribute(\"a_angle\",\"float\",i.vbo_a),0!=t.length)if(t.length===a)this.prog.draw(this.gl.POINTS,[0,a]);else if(a<65535){const e=window.navigator.userAgent;e.indexOf(\"MSIE \")+e.indexOf(\"Trident/\")+e.indexOf(\"Edge/\")>0&&u.logger.warn(\"WebGL warning: IE is known to produce 1px sprites whith selections.\"),this.index_buffer.set_size(2*t.length),this.index_buffer.set_data(0,new Uint16Array(t)),this.prog.draw(this.gl.POINTS,this.index_buffer)}else{const e=64e3,s=[];for(let t=0,i=Math.ceil(a/e);t2*t))):this.vbo_s.set_data(0,new Float32Array(this.glyph.size))}_set_visuals(t){const{line:e,fill:s}=this.glyph.visuals;!function(t,e,s,i,a,r){if(a.doit){if(r.is_Scalar())e.used=!1,t.set_attribute(s,\"float\",[r.value]);else if(r.is_Vector()){e.used=!0;const a=new Float32Array(r.array);e.set_size(4*i),e.set_data(0,a),t.set_attribute(s,\"float\",e)}}else e.used=!1,t.set_attribute(s,\"float\",[0])}(this.prog,this.vbo_linewidth,\"a_linewidth\",t,e,e.line_width),d(this.prog,this.vbo_fg_color,\"a_fg_color\",t,e,e.line_color,e.line_alpha),d(this.prog,this.vbo_bg_color,\"a_bg_color\",t,s,s.fill_color,s.fill_alpha),this.prog.set_uniform(\"u_antialias\",\"float\",[.8])}}s.MarkerGL=p,p.__name__=\"MarkerGL\"},\n function _(n,i,a,o,_){o();a.default=\"\\nprecision mediump float;\\nconst float SQRT_2 = 1.4142135623730951;\\n//\\nuniform float u_pixel_ratio;\\nuniform vec2 u_canvas_size;\\nuniform vec2 u_offset;\\nuniform vec2 u_scale;\\nuniform float u_antialias;\\n//\\nattribute float a_sx;\\nattribute float a_sy;\\nattribute float a_size;\\nattribute float a_angle; // in radians\\nattribute float a_linewidth;\\nattribute vec4 a_fg_color;\\nattribute vec4 a_bg_color;\\n//\\nvarying float v_linewidth;\\nvarying float v_size;\\nvarying vec4 v_fg_color;\\nvarying vec4 v_bg_color;\\nvarying vec2 v_rotation;\\n\\nvoid main (void)\\n{\\n v_size = a_size * u_pixel_ratio;\\n v_linewidth = a_linewidth * u_pixel_ratio;\\n v_fg_color = a_fg_color;\\n v_bg_color = a_bg_color;\\n v_rotation = vec2(cos(-a_angle), sin(-a_angle));\\n vec2 pos = vec2(a_sx, a_sy); // in pixels\\n pos += 0.5; // make up for Bokeh's offset\\n pos /= u_canvas_size / u_pixel_ratio; // in 0..1\\n gl_Position = vec4(pos*2.0-1.0, 0.0, 1.0);\\n gl_Position.y *= -1.0;\\n gl_PointSize = SQRT_2 * v_size + 2.0 * (v_linewidth + 1.5*u_antialias);\\n}\\n\"},\n function _(n,a,s,e,t){e();s.default='\\nprecision mediump float;\\n\\nconst float SQRT_2 = 1.4142135623730951;\\nconst float PI = 3.14159265358979323846264;\\n\\nconst float IN_ANGLE = 0.6283185307179586; // PI/5. = 36 degrees (star of 5 pikes)\\n//const float OUT_ANGLE = PI/2. - IN_ANGLE; // External angle for regular stars\\nconst float COS_A = 0.8090169943749475; // cos(IN_ANGLE)\\nconst float SIN_A = 0.5877852522924731; // sin(IN_ANGLE)\\nconst float COS_B = 0.5877852522924731; // cos(OUT_ANGLE)\\nconst float SIN_B = 0.8090169943749475; // sin(OUT_ANGLE)\\n\\n//\\nuniform float u_antialias;\\n//\\nvarying vec4 v_fg_color;\\nvarying vec4 v_bg_color;\\nvarying float v_linewidth;\\nvarying float v_size;\\nvarying vec2 v_rotation;\\n\\n#ifdef USE_ASTERISK\\n// asterisk\\nfloat marker(vec2 P, float size)\\n{\\n // Masks\\n float diamond = max(abs(SQRT_2 / 2.0 * (P.x - P.y)), abs(SQRT_2 / 2.0 * (P.x + P.y))) - size / (2.0 * SQRT_2);\\n float square = max(abs(P.x), abs(P.y)) - size / (2.0 * SQRT_2);\\n // Shapes\\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of \"width\" for aa\\n float cross = min(abs(P.x), abs(P.y)) - size / 100.0; // bit of \"width\" for aa\\n // Result is union of masked shapes\\n return min(max(X, diamond), max(cross, square));\\n}\\n#endif\\n\\n#ifdef USE_CIRCLE\\n// circle\\nfloat marker(vec2 P, float size)\\n{\\n return length(P) - size/2.0;\\n}\\n#endif\\n\\n#ifdef USE_SQUARE\\n// square\\nfloat marker(vec2 P, float size)\\n{\\n return max(abs(P.x), abs(P.y)) - size/2.0;\\n}\\n#endif\\n\\n#ifdef USE_DIAMOND\\n// diamond\\nfloat marker(vec2 P, float size)\\n{\\n float x = SQRT_2 / 2.0 * (P.x * 1.5 - P.y);\\n float y = SQRT_2 / 2.0 * (P.x * 1.5 + P.y);\\n float r1 = max(abs(x), abs(y)) - size / (2.0 * SQRT_2);\\n return r1 / SQRT_2;\\n}\\n#endif\\n\\n#ifdef USE_HEX\\n// hex\\nfloat marker(vec2 P, float size)\\n{\\n vec2 q = abs(P);\\n return max(q.y * 0.57735 + q.x - 1.0 * size/2.0, q.y - 0.866 * size/2.0);\\n}\\n#endif\\n\\n#ifdef USE_STAR\\n// star\\n// https://iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm\\nfloat marker(vec2 P, float size)\\n{\\n float bn = mod(atan(P.x, -P.y), 2.0*IN_ANGLE) - IN_ANGLE;\\n P = length(P)*vec2(cos(bn), abs(sin(bn)));\\n P -= size*vec2(COS_A, SIN_A)/2.;\\n P += vec2(COS_B, SIN_B)*clamp(-(P.x*COS_B + P.y*SIN_B), 0.0, size*SIN_A/SIN_B/2.);\\n\\n return length(P)*sign(P.x);\\n}\\n#endif\\n\\n#ifdef USE_TRIANGLE\\n// triangle\\nfloat marker(vec2 P, float size)\\n{\\n P.y -= size * 0.3;\\n float x = SQRT_2 / 2.0 * (P.x * 1.7 - P.y);\\n float y = SQRT_2 / 2.0 * (P.x * 1.7 + P.y);\\n float r1 = max(abs(x), abs(y)) - size / 1.6;\\n float r2 = P.y;\\n return max(r1 / SQRT_2, r2); // Intersect diamond with rectangle\\n}\\n#endif\\n\\n#ifdef USE_INVERTED_TRIANGLE\\n// inverted_triangle\\nfloat marker(vec2 P, float size)\\n{\\n P.y += size * 0.3;\\n float x = SQRT_2 / 2.0 * (P.x * 1.7 - P.y);\\n float y = SQRT_2 / 2.0 * (P.x * 1.7 + P.y);\\n float r1 = max(abs(x), abs(y)) - size / 1.6;\\n float r2 = - P.y;\\n return max(r1 / SQRT_2, r2); // Intersect diamond with rectangle\\n}\\n#endif\\n\\n#ifdef USE_CROSS\\n// cross\\nfloat marker(vec2 P, float size)\\n{\\n float square = max(abs(P.x), abs(P.y)) - size / 2.5; // 2.5 is a tweak\\n float cross = min(abs(P.x), abs(P.y)) - size / 100.0; // bit of \"width\" for aa\\n return max(square, cross);\\n}\\n#endif\\n\\n#ifdef USE_CIRCLE_CROSS\\n// circle_cross\\nfloat marker(vec2 P, float size)\\n{\\n // Define quadrants\\n float qs = size / 2.0; // quadrant size\\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\\n // Intersect main shape with quadrants (to form cross)\\n float circle = length(P) - size/2.0;\\n float c1 = max(circle, s1);\\n float c2 = max(circle, s2);\\n float c3 = max(circle, s3);\\n float c4 = max(circle, s4);\\n // Union\\n return min(min(min(c1, c2), c3), c4);\\n}\\n#endif\\n\\n#ifdef USE_SQUARE_CROSS\\n// square_cross\\nfloat marker(vec2 P, float size)\\n{\\n // Define quadrants\\n float qs = size / 2.0; // quadrant size\\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\\n // Intersect main shape with quadrants (to form cross)\\n float square = max(abs(P.x), abs(P.y)) - size/2.0;\\n float c1 = max(square, s1);\\n float c2 = max(square, s2);\\n float c3 = max(square, s3);\\n float c4 = max(square, s4);\\n // Union\\n return min(min(min(c1, c2), c3), c4);\\n}\\n#endif\\n\\n#ifdef USE_DIAMOND_CROSS\\n// diamond_cross\\nfloat marker(vec2 P, float size)\\n{\\n // Define quadrants\\n float qs = size / 2.0; // quadrant size\\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\\n // Intersect main shape with quadrants (to form cross)\\n float x = SQRT_2 / 2.0 * (P.x * 1.5 - P.y);\\n float y = SQRT_2 / 2.0 * (P.x * 1.5 + P.y);\\n float diamond = max(abs(x), abs(y)) - size / (2.0 * SQRT_2);\\n diamond /= SQRT_2;\\n float c1 = max(diamond, s1);\\n float c2 = max(diamond, s2);\\n float c3 = max(diamond, s3);\\n float c4 = max(diamond, s4);\\n // Union\\n return min(min(min(c1, c2), c3), c4);\\n}\\n#endif\\n\\n#ifdef USE_X\\n// x\\nfloat marker(vec2 P, float size)\\n{\\n float circle = length(P) - size / 1.6;\\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of \"width\" for aa\\n return max(circle, X);\\n}\\n#endif\\n\\n#ifdef USE_CIRCLE_X\\n// circle_x\\nfloat marker(vec2 P, float size)\\n{\\n float x = P.x - P.y;\\n float y = P.x + P.y;\\n // Define quadrants\\n float qs = size / 2.0; // quadrant size\\n float s1 = max(abs(x - qs), abs(y - qs)) - qs;\\n float s2 = max(abs(x + qs), abs(y - qs)) - qs;\\n float s3 = max(abs(x - qs), abs(y + qs)) - qs;\\n float s4 = max(abs(x + qs), abs(y + qs)) - qs;\\n // Intersect main shape with quadrants (to form cross)\\n float circle = length(P) - size/2.0;\\n float c1 = max(circle, s1);\\n float c2 = max(circle, s2);\\n float c3 = max(circle, s3);\\n float c4 = max(circle, s4);\\n // Union\\n float almost = min(min(min(c1, c2), c3), c4);\\n // In this case, the X is also outside of the main shape\\n float Xmask = length(P) - size / 1.6; // a circle\\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of \"width\" for aa\\n return min(max(X, Xmask), almost);\\n}\\n#endif\\n\\n#ifdef USE_SQUARE_X\\n// square_x\\nfloat marker(vec2 P, float size)\\n{\\n float x = P.x - P.y;\\n float y = P.x + P.y;\\n // Define quadrants\\n float qs = size / 2.0; // quadrant size\\n float s1 = max(abs(x - qs), abs(y - qs)) - qs;\\n float s2 = max(abs(x + qs), abs(y - qs)) - qs;\\n float s3 = max(abs(x - qs), abs(y + qs)) - qs;\\n float s4 = max(abs(x + qs), abs(y + qs)) - qs;\\n // Intersect main shape with quadrants (to form cross)\\n float square = max(abs(P.x), abs(P.y)) - size/2.0;\\n float c1 = max(square, s1);\\n float c2 = max(square, s2);\\n float c3 = max(square, s3);\\n float c4 = max(square, s4);\\n // Union\\n return min(min(min(c1, c2), c3), c4);\\n}\\n#endif\\n\\nvec4 outline(float distance, float linewidth, float antialias, vec4 fg_color, vec4 bg_color)\\n{\\n vec4 frag_color;\\n float t = linewidth/2.0 - antialias;\\n float signed_distance = distance;\\n float border_distance = abs(signed_distance) - t;\\n float alpha = border_distance/antialias;\\n alpha = exp(-alpha*alpha);\\n\\n // If fg alpha is zero, it probably means no outline. To avoid a dark outline\\n // shining through due to aa, we set the fg color to the bg color. Avoid if (i.e. branching).\\n float select = float(bool(fg_color.a));\\n fg_color.rgb = select * fg_color.rgb + (1.0 - select) * bg_color.rgb;\\n // Similarly, if we want a transparent bg\\n select = float(bool(bg_color.a));\\n bg_color.rgb = select * bg_color.rgb + (1.0 - select) * fg_color.rgb;\\n\\n if( border_distance < 0.0)\\n frag_color = fg_color;\\n else if( signed_distance < 0.0 ) {\\n frag_color = mix(bg_color, fg_color, sqrt(alpha));\\n } else {\\n if( abs(signed_distance) < (linewidth/2.0 + antialias) ) {\\n frag_color = vec4(fg_color.rgb, fg_color.a * alpha);\\n } else {\\n discard;\\n }\\n }\\n return frag_color;\\n}\\n\\nvoid main()\\n{\\n vec2 P = gl_PointCoord.xy - vec2(0.5, 0.5);\\n P = vec2(v_rotation.x*P.x - v_rotation.y*P.y,\\n v_rotation.y*P.x + v_rotation.x*P.y);\\n float point_size = SQRT_2*v_size + 2.0 * (v_linewidth + 1.5*u_antialias);\\n float distance = marker(P*point_size, v_size);\\n gl_FragColor = outline(distance, v_linewidth, u_antialias, v_fg_color, v_bg_color);\\n}\\n'},\n function _(e,l,i,s,t){s();const _=e(287);class p extends _.EllipseOvalView{}i.EllipseView=p,p.__name__=\"EllipseView\";class n extends _.EllipseOval{constructor(e){super(e)}static init_Ellipse(){this.prototype.default_view=p}}i.Ellipse=n,n.__name__=\"Ellipse\",n.init_Ellipse()},\n function _(t,s,i,e,h){e();const r=t(1),a=t(288),n=r.__importStar(t(107)),l=t(24),o=t(59);class _ extends a.CenterRotatableView{_map_data(){\"data\"==this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this.width,\"center\"):this.sw=l.to_screen(this.width),\"data\"==this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this.height,\"center\"):this.sh=l.to_screen(this.height)}_render(t,s,i){const{sx:e,sy:h,sw:r,sh:a,angle:n}=null!=i?i:this;for(const i of s){const s=e[i],l=h[i],o=r[i],_=a[i],d=n.get(i);isNaN(s+l+o+_+d)||(t.beginPath(),t.ellipse(s,l,o/2,_/2,d,0,2*Math.PI),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,i),t.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_vectorize(t,i),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,i),t.stroke()))}}_hit_point(t){let s,i,e,h,r,a,l,_,d;const{sx:c,sy:x}=t,w=this.renderer.xscale.invert(c),p=this.renderer.yscale.invert(x);\"data\"==this.model.properties.width.units?(s=w-this.max_width,i=w+this.max_width):(a=c-this.max_width,l=c+this.max_width,[s,i]=this.renderer.xscale.r_invert(a,l)),\"data\"==this.model.properties.height.units?(e=p-this.max_height,h=p+this.max_height):(_=x-this.max_height,d=x+this.max_height,[e,h]=this.renderer.yscale.r_invert(_,d));const m=this.index.indices({x0:s,x1:i,y0:e,y1:h}),v=[];for(const t of m)r=n.point_in_ellipse(c,x,this.angle.get(t),this.sh[t]/2,this.sw[t]/2,this.sx[t],this.sy[t]),r&&v.push(t);return new o.Selection({indices:v})}draw_legend_for_index(t,{x0:s,y0:i,x1:e,y1:h},r){const a=r+1,n=new Array(a);n[r]=(s+e)/2;const l=new Array(a);l[r]=(i+h)/2;const o=this.sw[r]/this.sh[r],_=.8*Math.min(Math.abs(e-s),Math.abs(h-i)),d=new Array(a),c=new Array(a);o>1?(d[r]=_,c[r]=_/o):(d[r]=_*o,c[r]=_),this._render(t,[r],{sx:n,sy:l,sw:d,sh:c,_angle:[0]})}}i.EllipseOvalView=_,_.__name__=\"EllipseOvalView\";class d extends a.CenterRotatable{constructor(t){super(t)}}i.EllipseOval=d,d.__name__=\"EllipseOval\"},\n function _(t,e,i,a,n){a();const s=t(1),h=t(64),r=t(48),o=s.__importStar(t(18));class _ extends h.XYGlyphView{get max_w2(){return\"data\"==this.model.properties.width.units?this.max_width/2:0}get max_h2(){return\"data\"==this.model.properties.height.units?this.max_height/2:0}_bounds({x0:t,x1:e,y0:i,y1:a}){const{max_w2:n,max_h2:s}=this;return{x0:t-n,x1:e+n,y0:i-s,y1:a+s}}}i.CenterRotatableView=_,_.__name__=\"CenterRotatableView\";class l extends h.XYGlyph{constructor(t){super(t)}static init_CenterRotatable(){this.mixins([r.LineVector,r.FillVector,r.HatchVector]),this.define((({})=>({angle:[o.AngleSpec,0],width:[o.DistanceSpec,{field:\"width\"}],height:[o.DistanceSpec,{field:\"height\"}]})))}}i.CenterRotatable=l,l.__name__=\"CenterRotatable\",l.init_CenterRotatable()},\n function _(t,e,s,i,h){i();const r=t(1),a=t(290),n=t(24),_=r.__importStar(t(18));class o extends a.BoxView{scenterxy(t){return[(this.sleft[t]+this.sright[t])/2,this.sy[t]]}_lrtb(t){const e=this._left[t],s=this._right[t],i=this._y[t],h=this.height.get(t)/2;return[Math.min(e,s),Math.max(e,s),i+h,i-h]}_map_data(){this.sy=this.renderer.yscale.v_compute(this._y),this.sh=this.sdist(this.renderer.yscale,this._y,this.height,\"center\"),this.sleft=this.renderer.xscale.v_compute(this._left),this.sright=this.renderer.xscale.v_compute(this._right);const t=this.sy.length;this.stop=new n.ScreenArray(t),this.sbottom=new n.ScreenArray(t);for(let e=0;e({left:[_.XCoordinateSpec,{value:0}],y:[_.YCoordinateSpec,{field:\"y\"}],height:[_.NumberSpec,{value:1}],right:[_.XCoordinateSpec,{field:\"right\"}]})))}}s.HBar=c,c.__name__=\"HBar\",c.init_HBar()},\n function _(t,e,s,i,r){i();const n=t(48),o=t(98),a=t(106),h=t(59);class c extends o.GlyphView{get_anchor_point(t,e,s){const i=Math.min(this.sleft[e],this.sright[e]),r=Math.max(this.sright[e],this.sleft[e]),n=Math.min(this.stop[e],this.sbottom[e]),o=Math.max(this.sbottom[e],this.stop[e]);switch(t){case\"top_left\":return{x:i,y:n};case\"top\":case\"top_center\":return{x:(i+r)/2,y:n};case\"top_right\":return{x:r,y:n};case\"bottom_left\":return{x:i,y:o};case\"bottom\":case\"bottom_center\":return{x:(i+r)/2,y:o};case\"bottom_right\":return{x:r,y:o};case\"left\":case\"center_left\":return{x:i,y:(n+o)/2};case\"center\":case\"center_center\":return{x:(i+r)/2,y:(n+o)/2};case\"right\":case\"center_right\":return{x:r,y:(n+o)/2}}}_index_data(t){const{min:e,max:s}=Math,{data_size:i}=this;for(let r=0;r({r:[c.NumberSpec,{field:\"r\"}],q:[c.NumberSpec,{field:\"q\"}],scale:[c.NumberSpec,1],size:[e,1],aspect_scale:[e,1],orientation:[h.HexTileOrientation,\"pointytop\"]}))),this.override({line_color:null})}}s.HexTile=y,y.__name__=\"HexTile\",y.init_HexTile()},\n function _(e,a,t,_,s){_();const i=e(293),n=e(203),r=e(214);class o extends i.ImageBaseView{connect_signals(){super.connect_signals(),this.connect(this.model.color_mapper.change,(()=>this._update_image()))}_update_image(){null!=this.image_data&&(this._set_data(null),this.renderer.request_render())}_flat_img_to_buf8(e){return this.model.color_mapper.rgba_mapper.v_compute(e)}}t.ImageView=o,o.__name__=\"ImageView\";class m extends i.ImageBase{constructor(e){super(e)}static init_Image(){this.prototype.default_view=o,this.define((({Ref:e})=>({color_mapper:[e(n.ColorMapper),()=>new r.LinearColorMapper({palette:[\"#000000\",\"#252525\",\"#525252\",\"#737373\",\"#969696\",\"#bdbdbd\",\"#d9d9d9\",\"#f0f0f0\",\"#ffffff\"]})]})))}}t.Image=m,m.__name__=\"Image\",m.init_Image()},\n function _(e,t,i,s,a){s();const h=e(1),n=e(64),r=e(24),_=h.__importStar(e(18)),d=e(59),l=e(9),g=e(29),o=e(11);class c extends n.XYGlyphView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.global_alpha.change,(()=>this.renderer.request_render()))}_render(e,t,i){const{image_data:s,sx:a,sy:h,sw:n,sh:r}=null!=i?i:this,_=e.getImageSmoothingEnabled();e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.global_alpha;for(const i of t){const t=s[i],_=a[i],d=h[i],l=n[i],g=r[i];if(null==t||isNaN(_+d+l+g))continue;const o=d;e.translate(0,o),e.scale(1,-1),e.translate(0,-o),e.drawImage(t,0|_,0|d,l,g),e.translate(0,o),e.scale(1,-1),e.translate(0,-o)}e.setImageSmoothingEnabled(_)}_set_data(e){this._set_width_heigh_data();for(let t=0,i=this.image.length;t({image:[_.NDArraySpec,{field:\"image\"}],dw:[_.DistanceSpec,{field:\"dw\"}],dh:[_.DistanceSpec,{field:\"dh\"}],dilate:[e,!1],global_alpha:[t,1]})))}}i.ImageBase=m,m.__name__=\"ImageBase\",m.init_ImageBase()},\n function _(e,a,t,_,i){_();const n=e(293),s=e(8);class r extends n.ImageBaseView{_flat_img_to_buf8(e){let a;return a=s.isArray(e)?new Uint32Array(e):e,new Uint8ClampedArray(a.buffer)}}t.ImageRGBAView=r,r.__name__=\"ImageRGBAView\";class m extends n.ImageBase{constructor(e){super(e)}static init_ImageRGBA(){this.prototype.default_view=r}}t.ImageRGBA=m,m.__name__=\"ImageRGBA\",m.init_ImageRGBA()},\n function _(e,t,s,r,a){r();const i=e(1),n=e(64),o=e(24),c=e(20),_=i.__importStar(e(18)),h=e(12),l=e(296);class d extends n.XYGlyphView{constructor(){super(...arguments),this._images_rendered=!1,this._set_data_iteration=0}connect_signals(){super.connect_signals(),this.connect(this.model.properties.global_alpha.change,(()=>this.renderer.request_render()))}_index_data(e){const{data_size:t}=this;for(let s=0;s{this._set_data_iteration==r&&(this.image[a]=e,this.renderer.request_render())},attempts:t+1,timeout:s})}const a=\"data\"==this.model.properties.w.units,i=\"data\"==this.model.properties.h.units,n=this._x.length,c=new o.ScreenArray(a?2*n:n),_=new o.ScreenArray(i?2*n:n),{anchor:d}=this.model;function m(e,t){switch(d){case\"top_left\":case\"bottom_left\":case\"left\":case\"center_left\":return[e,e+t];case\"top\":case\"top_center\":case\"bottom\":case\"bottom_center\":case\"center\":case\"center_center\":return[e-t/2,e+t/2];case\"top_right\":case\"bottom_right\":case\"right\":case\"center_right\":return[e-t,e]}}function g(e,t){switch(d){case\"top_left\":case\"top\":case\"top_center\":case\"top_right\":return[e,e-t];case\"bottom_left\":case\"bottom\":case\"bottom_center\":case\"bottom_right\":return[e+t,e];case\"left\":case\"center_left\":case\"center\":case\"center_center\":case\"right\":case\"center_right\":return[e+t/2,e-t/2]}}if(a)for(let e=0;e({url:[_.StringSpec,{field:\"url\"}],anchor:[c.Anchor,\"top_left\"],global_alpha:[s,1],angle:[_.AngleSpec,0],w:[_.NullDistanceSpec,null],h:[_.NullDistanceSpec,null],dilate:[e,!1],retry_attempts:[t,0],retry_timeout:[t,0]})))}}s.ImageURL=m,m.__name__=\"ImageURL\",m.init_ImageURL()},\n function _(i,e,t,s,o){s();const a=i(19);class n{constructor(i,e={}){this._image=new Image,this._finished=!1;const{attempts:t=1,timeout:s=1}=e;this.promise=new Promise(((o,n)=>{this._image.crossOrigin=\"anonymous\";let r=0;this._image.onerror=()=>{if(++r==t){const s=`unable to load ${i} image after ${t} attempts`;if(a.logger.warn(s),null==this._image.crossOrigin)return void(null!=e.failed&&e.failed());a.logger.warn(`attempting to load ${i} without a cross origin policy`),this._image.crossOrigin=null,r=0}setTimeout((()=>this._image.src=i),s)},this._image.onload=()=>{this._finished=!0,null!=e.loaded&&e.loaded(this._image),o(this._image)},this._image.src=i}))}get finished(){return this._finished}get image(){if(this._finished)return this._image;throw new Error(\"not loaded yet\")}}t.ImageLoader=n,n.__name__=\"ImageLoader\"},\n function _(t,s,e,i,n){i();const o=t(1),l=t(101),r=t(98),h=t(106),_=t(12),a=t(12),c=t(48),d=o.__importStar(t(107)),x=o.__importStar(t(18)),y=t(59),f=t(11);class g extends r.GlyphView{_project_data(){}_index_data(t){const{min:s,max:e}=Math,{data_size:i}=this;for(let n=0;n1&&c.length>1)for(let e=1,i=n.length;e1){let l=!1;for(let t=1;t({xs:[x.XCoordinateSeqSeqSeqSpec,{field:\"xs\"}],ys:[x.YCoordinateSeqSeqSeqSpec,{field:\"ys\"}]}))),this.mixins([c.LineVector,c.FillVector,c.HatchVector])}}e.MultiPolygons=p,p.__name__=\"MultiPolygons\",p.init_MultiPolygons()},\n function _(a,t,e,l,s){l();const _=a(287),i=a(12);class n extends _.EllipseOvalView{_map_data(){super._map_data(),i.mul(this.sw,.75)}}e.OvalView=n,n.__name__=\"OvalView\";class v extends _.EllipseOval{constructor(a){super(a)}static init_Oval(){this.prototype.default_view=n}}e.Oval=v,v.__name__=\"Oval\",v.init_Oval()},\n function _(t,e,i,o,s){o();const r=t(1),_=t(290),d=r.__importStar(t(18));class n extends _.BoxView{scenterxy(t){return[this.sleft[t]/2+this.sright[t]/2,this.stop[t]/2+this.sbottom[t]/2]}_lrtb(t){return[this._left[t],this._right[t],this._top[t],this._bottom[t]]}}i.QuadView=n,n.__name__=\"QuadView\";class a extends _.Box{constructor(t){super(t)}static init_Quad(){this.prototype.default_view=n,this.define((({})=>({right:[d.XCoordinateSpec,{field:\"right\"}],bottom:[d.YCoordinateSpec,{field:\"bottom\"}],left:[d.XCoordinateSpec,{field:\"left\"}],top:[d.YCoordinateSpec,{field:\"top\"}]})))}}i.Quad=a,a.__name__=\"Quad\",a.init_Quad()},\n function _(e,t,i,s,n){s();const a=e(1),c=e(48),o=e(65),r=e(98),_=e(106),d=a.__importStar(e(18));function l(e,t,i){if(t==(e+i)/2)return[e,i];{const s=(e-t)/(e-2*t+i),n=e*(1-s)**2+2*t*(1-s)*s+i*s**2;return[Math.min(e,i,n),Math.max(e,i,n)]}}class x extends r.GlyphView{_project_data(){o.inplace.project_xy(this._x0,this._y0),o.inplace.project_xy(this._x1,this._y1)}_index_data(e){const{_x0:t,_x1:i,_y0:s,_y1:n,_cx:a,_cy:c,data_size:o}=this;for(let r=0;r({x0:[d.XCoordinateSpec,{field:\"x0\"}],y0:[d.YCoordinateSpec,{field:\"y0\"}],x1:[d.XCoordinateSpec,{field:\"x1\"}],y1:[d.YCoordinateSpec,{field:\"y1\"}],cx:[d.XCoordinateSpec,{field:\"cx\"}],cy:[d.YCoordinateSpec,{field:\"cy\"}]}))),this.mixins(c.LineVector)}}i.Quadratic=y,y.__name__=\"Quadratic\",y.init_Quadratic()},\n function _(e,t,s,i,n){i();const a=e(1),l=e(64),h=e(106),r=e(48),o=e(24),_=a.__importStar(e(18));class c extends l.XYGlyphView{_map_data(){\"data\"==this.model.properties.length.units?this.slength=this.sdist(this.renderer.xscale,this._x,this.length):this.slength=o.to_screen(this.length);const{width:e,height:t}=this.renderer.plot_view.frame.bbox,s=2*(e+t),{slength:i}=this;for(let e=0,t=i.length;e({length:[_.DistanceSpec,0],angle:[_.AngleSpec,0]})))}}s.Ray=g,g.__name__=\"Ray\",g.init_Ray()},\n function _(t,s,e,i,h){i();const r=t(288),n=t(106),a=t(24),o=t(12),l=t(59);class _ extends r.CenterRotatableView{_map_data(){if(\"data\"==this.model.properties.width.units)[this.sw,this.sx0]=this._map_dist_corner_for_data_side_length(this._x,this.width,this.renderer.xscale);else{this.sw=a.to_screen(this.width);const t=this.sx.length;this.sx0=new a.ScreenArray(t);for(let s=0;s({dilate:[t,!1]})))}}e.Rect=c,c.__name__=\"Rect\",c.init_Rect()},\n function _(e,t,r,s,i){s();const a=e(1),n=e(304),_=e(305),l=e(283),c=a.__importStar(e(18));class o extends n.MarkerView{_init_webgl(){const{webgl:e}=this.renderer.plot_view.canvas_view;if(null!=e){const t=new Set(this.marker);if(1==t.size){const[r]=[...t];if(l.MarkerGL.is_supported(r)){const{glglyph:t}=this;if(null==t||t.marker_type!=r)return void(this.glglyph=new l.MarkerGL(e.gl,this,r))}}}delete this.glglyph}_set_data(e){super._set_data(e),this._init_webgl()}_render(e,t,r){const{sx:s,sy:i,size:a,angle:n,marker:l}=null!=r?r:this;for(const r of t){const t=s[r],c=i[r],o=a.get(r),g=n.get(r),h=l.get(r);if(isNaN(t+c+o+g)||null==h)continue;const d=o/2;e.beginPath(),e.translate(t,c),g&&e.rotate(g),_.marker_funcs[h](e,r,d,this.visuals),g&&e.rotate(-g),e.translate(-t,-c)}}draw_legend_for_index(e,{x0:t,x1:r,y0:s,y1:i},a){const n=a+1,_=this.marker.get(a),l=Object.assign(Object.assign({},this._get_legend_args({x0:t,x1:r,y0:s,y1:i},a)),{marker:new c.UniformScalar(_,n)});this._render(e,[a],l)}}r.ScatterView=o,o.__name__=\"ScatterView\";class g extends n.Marker{constructor(e){super(e)}static init_Scatter(){this.prototype.default_view=o,this.define((()=>({marker:[c.MarkerSpec,{value:\"circle\"}]})))}}r.Scatter=g,g.__name__=\"Scatter\",g.init_Scatter()},\n function _(e,t,s,i,n){i();const r=e(1),a=e(64),c=e(48),_=r.__importStar(e(107)),o=r.__importStar(e(18)),h=e(9),l=e(59);class x extends a.XYGlyphView{_render(e,t,s){const{sx:i,sy:n,size:r,angle:a}=null!=s?s:this;for(const s of t){const t=i[s],c=n[s],_=r.get(s),o=a.get(s);if(isNaN(t+c+_+o))continue;const h=_/2;e.beginPath(),e.translate(t,c),o&&e.rotate(o),this._render_one(e,s,h,this.visuals),o&&e.rotate(-o),e.translate(-t,-c)}}_mask_data(){const{x_target:e,y_target:t}=this.renderer.plot_view.frame,s=e.widen(this.max_size).map((e=>this.renderer.xscale.invert(e))),i=t.widen(this.max_size).map((e=>this.renderer.yscale.invert(e)));return this.index.indices({x0:s.start,x1:s.end,y0:i.start,y1:i.end})}_hit_point(e){const{sx:t,sy:s}=e,{max_size:i}=this,{hit_dilation:n}=this.model,r=t-i*n,a=t+i*n,[c,_]=this.renderer.xscale.r_invert(r,a),o=s-i*n,h=s+i*n,[x,d]=this.renderer.yscale.r_invert(o,h),y=this.index.indices({x0:c,x1:_,y0:x,y1:d}),g=[];for(const e of y){const i=this.size.get(e)/2*n;Math.abs(this.sx[e]-t)<=i&&Math.abs(this.sy[e]-s)<=i&&g.push(e)}return new l.Selection({indices:g})}_hit_span(e){const{sx:t,sy:s}=e,i=this.bounds(),n=this.max_size/2;let r,a,c,_;if(\"h\"==e.direction){c=i.y0,_=i.y1;const e=t-n,s=t+n;[r,a]=this.renderer.xscale.r_invert(e,s)}else{r=i.x0,a=i.x1;const e=s-n,t=s+n;[c,_]=this.renderer.yscale.r_invert(e,t)}const o=[...this.index.indices({x0:r,x1:a,y0:c,y1:_})];return new l.Selection({indices:o})}_hit_rect(e){const{sx0:t,sx1:s,sy0:i,sy1:n}=e,[r,a]=this.renderer.xscale.r_invert(t,s),[c,_]=this.renderer.yscale.r_invert(i,n),o=[...this.index.indices({x0:r,x1:a,y0:c,y1:_})];return new l.Selection({indices:o})}_hit_poly(e){const{sx:t,sy:s}=e,i=h.range(0,this.sx.length),n=[];for(let e=0,r=i.length;e({size:[o.ScreenDistanceSpec,{value:4}],angle:[o.AngleSpec,0],hit_dilation:[e,1]})))}}s.Marker=d,d.__name__=\"Marker\",d.init_Marker()},\n function _(t,e,i,o,l){o();const n=Math.sqrt(3),c=Math.sqrt(5),r=(c+1)/4,s=Math.sqrt((5-c)/8),f=(c-1)/4,a=Math.sqrt((5+c)/8);function h(t,e){t.rotate(Math.PI/4),d(t,e),t.rotate(-Math.PI/4)}function v(t,e){const i=e*n,o=i/3;t.moveTo(-i/2,-o),t.lineTo(0,0),t.lineTo(i/2,-o),t.lineTo(0,0),t.lineTo(0,e)}function d(t,e){t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)}function _(t,e){t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()}function u(t,e){const i=e*n,o=i/3;t.moveTo(-e,o),t.lineTo(e,o),t.lineTo(0,o-i),t.closePath()}function z(t,e,i,o){t.arc(0,0,i,0,2*Math.PI,!1),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}function T(t,e,i,o){_(t,i),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}function k(t,e,i,o){!function(t,e){t.beginPath(),t.arc(0,0,e/4,0,2*Math.PI,!1),t.closePath()}(t,i),o.line.set_vectorize(t,e),t.fillStyle=t.strokeStyle,t.fill()}function P(t,e,i,o){!function(t,e){const i=e/2,o=n*i;t.moveTo(e,0),t.lineTo(i,-o),t.lineTo(-i,-o),t.lineTo(-e,0),t.lineTo(-i,o),t.lineTo(i,o),t.closePath()}(t,i),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}function m(t,e,i,o){const l=2*i;t.rect(-i,-i,l,l),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}function q(t,e,i,o){!function(t,e){const i=Math.sqrt(5-2*c)*e;t.moveTo(0,-e),t.lineTo(i*f,i*a-e),t.lineTo(i*(1+f),i*a-e),t.lineTo(i*(1+f-r),i*(a+s)-e),t.lineTo(i*(1+2*f-r),i*(2*a+s)-e),t.lineTo(0,2*i*a-e),t.lineTo(-i*(1+2*f-r),i*(2*a+s)-e),t.lineTo(-i*(1+f-r),i*(a+s)-e),t.lineTo(-i*(1+f),i*a-e),t.lineTo(-i*f,i*a-e),t.closePath()}(t,i),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}function M(t,e,i,o){u(t,i),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}i.marker_funcs={asterisk:function(t,e,i,o){d(t,i),h(t,i),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},circle:z,circle_cross:function(t,e,i,o){t.arc(0,0,i,0,2*Math.PI,!1),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),d(t,i),t.stroke())},circle_dot:function(t,e,i,o){z(t,e,i,o),k(t,e,i,o)},circle_y:function(t,e,i,o){t.arc(0,0,i,0,2*Math.PI,!1),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),v(t,i),t.stroke())},circle_x:function(t,e,i,o){t.arc(0,0,i,0,2*Math.PI,!1),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),h(t,i),t.stroke())},cross:function(t,e,i,o){d(t,i),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},diamond:T,diamond_dot:function(t,e,i,o){T(t,e,i,o),k(t,e,i,o)},diamond_cross:function(t,e,i,o){_(t,i),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-i/1.5,0),t.lineTo(i/1.5,0),t.stroke())},dot:k,hex:P,hex_dot:function(t,e,i,o){P(t,e,i,o),k(t,e,i,o)},inverted_triangle:function(t,e,i,o){t.rotate(Math.PI),u(t,i),t.rotate(-Math.PI),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},plus:function(t,e,i,o){const l=3*i/8,n=[l,l,i,i,l,l,-l,-l,-i,-i,-l,-l],c=[i,l,l,-l,-l,-i,-i,-l,-l,l,l,i];t.beginPath();for(let e=0;e<12;e++)t.lineTo(n[e],c[e]);t.closePath(),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},square:m,square_cross:function(t,e,i,o){const l=2*i;t.rect(-i,-i,l,l),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),d(t,i),t.stroke())},square_dot:function(t,e,i,o){m(t,e,i,o),k(t,e,i,o)},square_pin:function(t,e,i,o){const l=3*i/8;t.moveTo(-i,-i),t.quadraticCurveTo(0,-l,i,-i),t.quadraticCurveTo(l,0,i,i),t.quadraticCurveTo(0,l,-i,i),t.quadraticCurveTo(-l,0,-i,-i),t.closePath(),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},square_x:function(t,e,i,o){const l=2*i;t.rect(-i,-i,l,l),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.moveTo(-i,i),t.lineTo(i,-i),t.moveTo(-i,-i),t.lineTo(i,i),t.stroke())},star:q,star_dot:function(t,e,i,o){q(t,e,i,o),k(t,e,i,o)},triangle:M,triangle_dot:function(t,e,i,o){M(t,e,i,o),k(t,e,i,o)},triangle_pin:function(t,e,i,o){const l=i*n,c=l/3,r=3*c/8;t.moveTo(-i,c),t.quadraticCurveTo(0,r,i,c),t.quadraticCurveTo(n*r/2,r/2,0,c-l),t.quadraticCurveTo(-n*r/2,r/2,-i,c),t.closePath(),o.fill.doit&&(o.fill.set_vectorize(t,e),t.fill()),o.hatch.doit&&(o.hatch.set_vectorize(t,e),t.fill()),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},dash:function(t,e,i,o){!function(t,e){t.moveTo(-e,0),t.lineTo(e,0)}(t,i),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},x:function(t,e,i,o){h(t,i),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())},y:function(t,e,i,o){v(t,i),o.line.doit&&(o.line.set_vectorize(t,e),t.stroke())}}},\n function _(e,t,s,i,n){i();const r=e(1),_=r.__importStar(e(107)),o=r.__importStar(e(18)),h=e(48),a=e(65),c=e(98),d=e(106),x=e(59);class y extends c.GlyphView{_project_data(){a.inplace.project_xy(this._x0,this._y0),a.inplace.project_xy(this._x1,this._y1)}_index_data(e){const{min:t,max:s}=Math,{_x0:i,_x1:n,_y0:r,_y1:_,data_size:o}=this;for(let h=0;h({x0:[o.XCoordinateSpec,{field:\"x0\"}],y0:[o.YCoordinateSpec,{field:\"y0\"}],x1:[o.XCoordinateSpec,{field:\"x1\"}],y1:[o.YCoordinateSpec,{field:\"y1\"}]}))),this.mixins(h.LineVector)}}s.Segment=l,l.__name__=\"Segment\",l.init_Segment()},\n function _(t,e,s,i,n){i();const _=t(1),l=t(64),o=_.__importStar(t(48)),a=t(308);class c extends l.XYGlyphView{_set_data(){const{tension:t,closed:e}=this.model;[this._xt,this._yt]=a.catmullrom_spline(this._x,this._y,20,t,e)}_map_data(){const{x_scale:t,y_scale:e}=this.renderer.coordinates;this.sxt=t.v_compute(this._xt),this.syt=e.v_compute(this._yt)}_render(t,e,s){const{sxt:i,syt:n}=null!=s?s:this;this.visuals.line.set_value(t);const _=i.length;for(let e=0;e<_;e++)0!=e?isNaN(i[e])||isNaN(n[e])?(t.stroke(),t.beginPath()):t.lineTo(i[e],n[e]):(t.beginPath(),t.moveTo(i[e],n[e]));t.stroke()}}s.SplineView=c,c.__name__=\"SplineView\";class h extends l.XYGlyph{constructor(t){super(t)}static init_Spline(){this.prototype.default_view=c,this.mixins(o.LineScalar),this.define((({Boolean:t,Number:e})=>({tension:[e,.5],closed:[t,!1]})))}}s.Spline=h,h.__name__=\"Spline\",h.init_Spline()},\n function _(n,t,e,o,s){o();const c=n(24),l=n(11);e.catmullrom_spline=function(n,t,e=10,o=.5,s=!1){l.assert(n.length==t.length);const r=n.length,f=s?r+1:r,w=c.infer_type(n,t),i=new w(f+2),u=new w(f+2);i.set(n,1),u.set(t,1),s?(i[0]=n[r-1],u[0]=t[r-1],i[f]=n[0],u[f]=t[0],i[f+1]=n[1],u[f+1]=t[1]):(i[0]=n[0],u[0]=t[0],i[f+1]=n[r-1],u[f+1]=t[r-1]);const g=new w(4*(e+1));for(let n=0,t=0;n<=e;n++){const o=n/e,s=o**2,c=o*s;g[t++]=2*c-3*s+1,g[t++]=-2*c+3*s,g[t++]=c-2*s+o,g[t++]=c-s}const h=new w((f-1)*(e+1)),_=new w((f-1)*(e+1));for(let n=1,t=0;n1&&(e.stroke(),o=!1)}o?(e.lineTo(t,a),e.lineTo(r,_)):(e.beginPath(),e.moveTo(n[i],s[i]),o=!0),l=i}e.lineTo(n[r-1],s[r-1]),e.stroke()}}draw_legend_for_index(e,t,i){r.generic_line_scalar_legend(this.visuals,e,t)}}i.StepView=c,c.__name__=\"StepView\";class d extends l.XYGlyph{constructor(e){super(e)}static init_Step(){this.prototype.default_view=c,this.mixins(a.LineScalar),this.define((()=>({mode:[_.StepMode,\"before\"]})))}}i.Step=d,d.__name__=\"Step\",d.init_Step()},\n function _(t,e,s,i,n){i();const o=t(1),_=t(64),h=t(48),l=o.__importStar(t(107)),r=o.__importStar(t(18)),a=t(143),c=t(11),x=t(59);class u extends _.XYGlyphView{_rotate_point(t,e,s,i,n){return[(t-s)*Math.cos(n)-(e-i)*Math.sin(n)+s,(t-s)*Math.sin(n)+(e-i)*Math.cos(n)+i]}_text_bounds(t,e,s,i){return[[t,t+s,t+s,t,t],[e,e,e-i,e-i,e]]}_render(t,e,s){const{sx:i,sy:n,x_offset:o,y_offset:_,angle:h,text:l}=null!=s?s:this;this._sys=[],this._sxs=[];for(const s of e){const e=this._sxs[s]=[],r=this._sys[s]=[],c=i[s],x=n[s],u=o.get(s),f=_.get(s),p=h.get(s),g=l.get(s);if(!isNaN(c+x+u+f+p)&&null!=g&&this.visuals.text.doit){const i=`${g}`;t.save(),t.translate(c+u,x+f),t.rotate(p),this.visuals.text.set_vectorize(t,s);const n=this.visuals.text.font_value(s),{height:o}=a.font_metrics(n),_=this.text_line_height.get(s)*o;if(-1==i.indexOf(\"\\n\")){t.fillText(i,0,0);const s=c+u,n=x+f,o=t.measureText(i).width,[h,l]=this._text_bounds(s,n,o,_);e.push(h),r.push(l)}else{const n=i.split(\"\\n\"),o=_*n.length,h=this.text_baseline.get(s);let l;switch(h){case\"top\":l=0;break;case\"middle\":l=-o/2+_/2;break;case\"bottom\":l=-o+_;break;default:l=0,console.warn(`'${h}' baseline not supported with multi line text`)}for(const s of n){t.fillText(s,0,l);const i=c+u,n=l+x+f,o=t.measureText(s).width,[h,a]=this._text_bounds(i,n,o,_);e.push(h),r.push(a),l+=_}}t.restore()}}}_hit_point(t){const{sx:e,sy:s}=t,i=[];for(let t=0;t({text:[r.NullStringSpec,{field:\"text\"}],angle:[r.AngleSpec,0],x_offset:[r.NumberSpec,0],y_offset:[r.NumberSpec,0]})))}}s.Text=f,f.__name__=\"Text\",f.init_Text()},\n function _(t,s,e,i,r){i();const h=t(1),o=t(290),a=t(24),n=h.__importStar(t(18));class _ extends o.BoxView{scenterxy(t){return[this.sx[t],(this.stop[t]+this.sbottom[t])/2]}_lrtb(t){const s=this.width.get(t)/2,e=this._x[t],i=this._top[t],r=this._bottom[t];return[e-s,e+s,Math.max(i,r),Math.min(i,r)]}_map_data(){this.sx=this.renderer.xscale.v_compute(this._x),this.sw=this.sdist(this.renderer.xscale,this._x,this.width,\"center\"),this.stop=this.renderer.yscale.v_compute(this._top),this.sbottom=this.renderer.yscale.v_compute(this._bottom);const t=this.sx.length;this.sleft=new a.ScreenArray(t),this.sright=new a.ScreenArray(t);for(let s=0;s({x:[n.XCoordinateSpec,{field:\"x\"}],bottom:[n.YCoordinateSpec,{value:0}],width:[n.NumberSpec,{value:1}],top:[n.YCoordinateSpec,{field:\"top\"}]})))}}e.VBar=c,c.__name__=\"VBar\",c.init_VBar()},\n function _(e,t,s,i,n){i();const r=e(1),a=e(64),l=e(106),c=e(48),d=e(24),h=e(20),o=r.__importStar(e(18)),_=e(10),u=e(59);class g extends a.XYGlyphView{_map_data(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this.radius):this.sradius=d.to_screen(this.radius)}_render(e,t,s){const{sx:i,sy:n,sradius:r,start_angle:a,end_angle:l}=null!=s?s:this,c=\"anticlock\"==this.model.direction;for(const s of t){const t=i[s],d=n[s],h=r[s],o=a.get(s),_=l.get(s);isNaN(t+d+h+o+_)||(e.beginPath(),e.arc(t,d,h,o,_,c),e.lineTo(t,d),e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,s),e.fill()),this.visuals.hatch.doit&&(this.visuals.hatch.set_vectorize(e,s),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,s),e.stroke()))}}_hit_point(e){let t,s,i,n,r,a,l,c,d;const{sx:h,sy:o}=e,g=this.renderer.xscale.invert(h),p=this.renderer.yscale.invert(o),x=2*this.max_radius;\"data\"===this.model.properties.radius.units?(a=g-x,l=g+x,c=p-x,d=p+x):(s=h-x,i=h+x,[a,l]=this.renderer.xscale.r_invert(s,i),n=o-x,r=o+x,[c,d]=this.renderer.yscale.r_invert(n,r));const f=[];for(const e of this.index.indices({x0:a,x1:l,y0:c,y1:d})){const a=this.sradius[e]**2;[s,i]=this.renderer.xscale.r_compute(g,this._x[e]),[n,r]=this.renderer.yscale.r_compute(p,this._y[e]),t=(s-i)**2+(n-r)**2,t<=a&&f.push(e)}const v=\"anticlock\"==this.model.direction,y=[];for(const e of f){const t=Math.atan2(o-this.sy[e],h-this.sx[e]);_.angle_between(-t,-this.start_angle.get(e),-this.end_angle.get(e),v)&&y.push(e)}return new u.Selection({indices:y})}draw_legend_for_index(e,t,s){l.generic_area_vector_legend(this.visuals,e,t,s)}scenterxy(e){const t=this.sradius[e]/2,s=(this.start_angle.get(e)+this.end_angle.get(e))/2;return[this.sx[e]+t*Math.cos(s),this.sy[e]+t*Math.sin(s)]}}s.WedgeView=g,g.__name__=\"WedgeView\";class p extends a.XYGlyph{constructor(e){super(e)}static init_Wedge(){this.prototype.default_view=g,this.mixins([c.LineVector,c.FillVector,c.HatchVector]),this.define((({})=>({direction:[h.Direction,\"anticlock\"],radius:[o.DistanceSpec,{field:\"radius\"}],start_angle:[o.AngleSpec,{field:\"start_angle\"}],end_angle:[o.AngleSpec,{field:\"end_angle\"}]})))}}s.Wedge=p,p.__name__=\"Wedge\",p.init_Wedge()},\n function _(t,_,r,o,a){o();const e=t(1);e.__exportStar(t(126),r),e.__exportStar(t(125),r),e.__exportStar(t(314),r)},\n function _(t,a,o,r,e){r();const n=t(125);class l extends n.LayoutProvider{constructor(t){super(t)}static init_StaticLayoutProvider(){this.define((({Number:t,Tuple:a,Dict:o})=>({graph_layout:[o(a(t,t)),{}]})))}get_node_coordinates(t){var a;const o=null!==(a=t.data.index)&&void 0!==a?a:[],r=o.length,e=new Float64Array(r),n=new Float64Array(r);for(let t=0;tthis.request_render()))}_draw_regions(i){if(!this.visuals.band_fill.doit&&!this.visuals.band_hatch.doit)return;const[e,t]=this.grid_coords(\"major\",!1);for(let s=0;st[1]&&(n=t[1]);else{[s,n]=t;for(const i of this.plot_view.axis_views)i.dimension==this.model.dimension&&i.model.x_range_name==this.model.x_range_name&&i.model.y_range_name==this.model.y_range_name&&([s,n]=i.computed_bounds)}return[s,n]}grid_coords(i,e=!0){const t=this.model.dimension,s=(t+1)%2,[n,r]=this.ranges();let[o,d]=this.computed_bounds();[o,d]=[Math.min(o,d),Math.max(o,d)];const l=[[],[]],_=this.model.get_ticker();if(null==_)return l;const a=_.get_ticks(o,d,n,r.min)[i],h=n.min,u=n.max,c=r.min,m=r.max;e||(a[0]!=h&&a.splice(0,0,h),a[a.length-1]!=u&&a.push(u));for(let i=0;i({bounds:[r(n(i,i),e),\"auto\"],dimension:[t(0,1),0],axis:[d(s(o.Axis)),null],ticker:[d(s(l.Ticker)),null]}))),this.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null})}get_ticker(){return null!=this.ticker?this.ticker:null!=this.axis?this.axis.ticker:null}}t.Grid=u,u.__name__=\"Grid\",u.init_Grid()},\n function _(o,a,x,B,e){B(),e(\"Box\",o(318).Box),e(\"Column\",o(320).Column),e(\"GridBox\",o(321).GridBox),e(\"HTMLBox\",o(322).HTMLBox),e(\"LayoutDOM\",o(319).LayoutDOM),e(\"Panel\",o(323).Panel),e(\"Row\",o(324).Row),e(\"Spacer\",o(325).Spacer),e(\"Tabs\",o(326).Tabs),e(\"WidgetBox\",o(329).WidgetBox)},\n function _(e,n,i,t,s){t();const o=e(319);class c extends o.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(()=>this.rebuild()))}get child_models(){return this.model.children}}i.BoxView=c,c.__name__=\"BoxView\";class r extends o.LayoutDOM{constructor(e){super(e)}static init_Box(){this.define((({Number:e,Array:n,Ref:i})=>({children:[n(i(o.LayoutDOM)),[]],spacing:[e,0]})))}}i.Box=r,r.__name__=\"Box\",r.init_Box()},\n function _(i,t,e,s,o){s();const l=i(53),n=i(20),h=i(43),a=i(19),r=i(8),_=i(22),d=i(122),c=i(240),u=i(221),m=i(44),p=i(249);class g extends c.DOMView{constructor(){super(...arguments),this._idle_notified=!1,this._offset_parent=null,this._viewport={}}initialize(){super.initialize(),this.el.style.position=this.is_root?\"relative\":\"absolute\",this._child_views=new Map}async lazy_initialize(){await super.lazy_initialize(),await this.build_child_views()}remove(){for(const i of this.child_views)i.remove();this._child_views.clear(),super.remove()}connect_signals(){super.connect_signals(),this.is_root&&(this._on_resize=()=>this.resize_layout(),window.addEventListener(\"resize\",this._on_resize),this._parent_observer=setInterval((()=>{const i=this.el.offsetParent;this._offset_parent!=i&&(this._offset_parent=i,null!=i&&(this.compute_viewport(),this.invalidate_layout()))}),250));const i=this.model.properties;this.on_change([i.width,i.height,i.min_width,i.min_height,i.max_width,i.max_height,i.margin,i.width_policy,i.height_policy,i.sizing_mode,i.aspect_ratio,i.visible],(()=>this.invalidate_layout())),this.on_change([i.background,i.css_classes],(()=>this.invalidate_render()))}disconnect_signals(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener(\"resize\",this._on_resize),super.disconnect_signals()}css_classes(){return super.css_classes().concat(this.model.css_classes)}get child_views(){return this.child_models.map((i=>this._child_views.get(i)))}async build_child_views(){await d.build_views(this._child_views,this.child_models,{parent:this})}render(){super.render(),h.empty(this.el);const{background:i}=this.model;this.el.style.backgroundColor=null!=i?_.color2css(i):\"\",h.classes(this.el).clear().add(...this.css_classes());for(const i of this.child_views)this.el.appendChild(i.el),i.render()}update_layout(){for(const i of this.child_views)i.update_layout();this._update_layout()}update_position(){this.el.style.display=this.model.visible?\"block\":\"none\";const i=this.is_root?this.layout.sizing.margin:void 0;h.position(this.el,this.layout.bbox,i);for(const i of this.child_views)i.update_position()}after_layout(){for(const i of this.child_views)i.after_layout();this._has_finished=!0}compute_viewport(){this._viewport=this._viewport_size()}renderTo(i){i.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()}build(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this}async rebuild(){await this.build_child_views(),this.invalidate_render()}compute_layout(){const i=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),a.logger.debug(`layout computed in ${Date.now()-i} ms`),this.notify_finished()}resize_layout(){this.root.compute_viewport(),this.root.compute_layout()}invalidate_layout(){this.root.update_layout(),this.root.compute_layout()}invalidate_render(){this.render(),this.invalidate_layout()}has_finished(){if(!super.has_finished())return!1;for(const i of this.child_views)if(!i.has_finished())return!1;return!0}notify_finished(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()}_width_policy(){return null!=this.model.width?\"fixed\":\"fit\"}_height_policy(){return null!=this.model.height?\"fixed\":\"fit\"}box_sizing(){let{width_policy:i,height_policy:t,aspect_ratio:e}=this.model;\"auto\"==i&&(i=this._width_policy()),\"auto\"==t&&(t=this._height_policy());const{sizing_mode:s}=this.model;if(null!=s)if(\"fixed\"==s)i=t=\"fixed\";else if(\"stretch_both\"==s)i=t=\"max\";else if(\"stretch_width\"==s)i=\"max\";else if(\"stretch_height\"==s)t=\"max\";else switch(null==e&&(e=\"auto\"),s){case\"scale_width\":i=\"max\",t=\"min\";break;case\"scale_height\":i=\"min\",t=\"max\";break;case\"scale_both\":i=\"max\",t=\"max\"}const o={width_policy:i,height_policy:t},{min_width:l,min_height:n}=this.model;null!=l&&(o.min_width=l),null!=n&&(o.min_height=n);const{width:h,height:a}=this.model;null!=h&&(o.width=h),null!=a&&(o.height=a);const{max_width:_,max_height:d}=this.model;null!=_&&(o.max_width=_),null!=d&&(o.max_height=d),\"auto\"==e&&null!=h&&null!=a?o.aspect=h/a:r.isNumber(e)&&(o.aspect=e);const{margin:c}=this.model;if(null!=c)if(r.isNumber(c))o.margin={top:c,right:c,bottom:c,left:c};else if(2==c.length){const[i,t]=c;o.margin={top:i,right:t,bottom:i,left:t}}else{const[i,t,e,s]=c;o.margin={top:i,right:t,bottom:e,left:s}}o.visible=this.model.visible;const{align:u}=this.model;return r.isArray(u)?[o.halign,o.valign]=u:o.halign=o.valign=u,o}_viewport_size(){return h.undisplayed(this.el,(()=>{let i=this.el;for(;i=i.parentElement;){if(i.classList.contains(m.root))continue;if(i==document.body){const{margin:{left:i,right:t,top:e,bottom:s}}=h.extents(document.body);return{width:Math.ceil(document.documentElement.clientWidth-i-t),height:Math.ceil(document.documentElement.clientHeight-e-s)}}const{padding:{left:t,right:e,top:s,bottom:o}}=h.extents(i),{width:l,height:n}=i.getBoundingClientRect(),a=Math.ceil(l-t-e),r=Math.ceil(n-s-o);if(a>0||r>0)return{width:a>0?a:void 0,height:r>0?r:void 0}}return{}}))}export(i,t=!0){const e=\"png\"==i?\"canvas\":\"svg\",s=new p.CanvasLayer(e,t),{width:o,height:l}=this.layout.bbox;s.resize(o,l);for(const e of this.child_views){const o=e.export(i,t),{x:l,y:n}=e.layout.bbox;s.ctx.drawImage(o.canvas,l,n)}return s}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box,children:this.child_views.map((i=>i.serializable_state()))})}}e.LayoutDOMView=g,g.__name__=\"LayoutDOMView\";class f extends l.Model{constructor(i){super(i)}static init_LayoutDOM(){this.define((i=>{const{Boolean:t,Number:e,String:s,Auto:o,Color:l,Array:h,Tuple:a,Or:r,Null:_,Nullable:d}=i,c=a(e,e),m=a(e,e,e,e);return{width:[d(e),null],height:[d(e),null],min_width:[d(e),null],min_height:[d(e),null],max_width:[d(e),null],max_height:[d(e),null],margin:[d(r(e,c,m)),[0,0,0,0]],width_policy:[r(u.SizingPolicy,o),\"auto\"],height_policy:[r(u.SizingPolicy,o),\"auto\"],aspect_ratio:[r(e,o,_),null],sizing_mode:[d(n.SizingMode),null],visible:[t,!0],disabled:[t,!1],align:[r(n.Align,a(n.Align,n.Align)),\"start\"],background:[d(l),null],css_classes:[h(s),[]]}}))}}e.LayoutDOM=f,f.__name__=\"LayoutDOM\",f.init_LayoutDOM()},\n function _(t,s,i,o,n){o();const e=t(318),l=t(223);class u extends e.BoxView{_update_layout(){const t=this.child_views.map((t=>t.layout));this.layout=new l.Column(t),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}}i.ColumnView=u,u.__name__=\"ColumnView\";class a extends e.Box{constructor(t){super(t)}static init_Column(){this.prototype.default_view=u,this.define((({Any:t})=>({rows:[t,\"auto\"]})))}}i.Column=a,a.__name__=\"Column\",a.init_Column()},\n function _(t,s,i,o,e){o();const n=t(319),l=t(223);class a extends n.LayoutDOMView{connect_signals(){super.connect_signals();const{children:t,rows:s,cols:i,spacing:o}=this.model.properties;this.on_change([t,s,i,o],(()=>this.rebuild()))}get child_models(){return this.model.children.map((([t])=>t))}_update_layout(){this.layout=new l.Grid,this.layout.rows=this.model.rows,this.layout.cols=this.model.cols,this.layout.spacing=this.model.spacing;for(const[t,s,i,o,e]of this.model.children){const n=this._child_views.get(t);this.layout.items.push({layout:n.layout,row:s,col:i,row_span:o,col_span:e})}this.layout.set_sizing(this.box_sizing())}}i.GridBoxView=a,a.__name__=\"GridBoxView\";class r extends n.LayoutDOM{constructor(t){super(t)}static init_GridBox(){this.prototype.default_view=a,this.define((({Any:t,Int:s,Number:i,Tuple:o,Array:e,Ref:l,Or:a,Opt:r})=>({children:[e(o(l(n.LayoutDOM),s,s,r(s),r(s))),[]],rows:[t,\"auto\"],cols:[t,\"auto\"],spacing:[a(i,o(i,i)),0]})))}}i.GridBox=r,r.__name__=\"GridBox\",r.init_GridBox()},\n function _(t,e,o,s,n){s();const _=t(319),i=t(221);class a extends _.LayoutDOMView{get child_models(){return[]}_update_layout(){this.layout=new i.ContentBox(this.el),this.layout.set_sizing(this.box_sizing())}}o.HTMLBoxView=a,a.__name__=\"HTMLBoxView\";class u extends _.LayoutDOM{constructor(t){super(t)}}o.HTMLBox=u,u.__name__=\"HTMLBox\"},\n function _(e,n,t,i,l){i();const a=e(53),o=e(319);class s extends a.Model{constructor(e){super(e)}static init_Panel(){this.define((({Boolean:e,String:n,Ref:t})=>({title:[n,\"\"],child:[t(o.LayoutDOM)],closable:[e,!1]})))}}t.Panel=s,s.__name__=\"Panel\",s.init_Panel()},\n function _(t,s,i,o,e){o();const n=t(318),a=t(223);class _ extends n.BoxView{_update_layout(){const t=this.child_views.map((t=>t.layout));this.layout=new a.Row(t),this.layout.cols=this.model.cols,this.layout.spacing=[0,this.model.spacing],this.layout.set_sizing(this.box_sizing())}}i.RowView=_,_.__name__=\"RowView\";class l extends n.Box{constructor(t){super(t)}static init_Row(){this.prototype.default_view=_,this.define((({Any:t})=>({cols:[t,\"auto\"]})))}}i.Row=l,l.__name__=\"Row\",l.init_Row()},\n function _(t,e,a,i,s){i();const _=t(319),c=t(221);class n extends _.LayoutDOMView{get child_models(){return[]}_update_layout(){this.layout=new c.LayoutItem,this.layout.set_sizing(this.box_sizing())}}a.SpacerView=n,n.__name__=\"SpacerView\";class o extends _.LayoutDOM{constructor(t){super(t)}static init_Spacer(){this.prototype.default_view=n}}a.Spacer=o,o.__name__=\"Spacer\",o.init_Spacer()},\n function _(e,t,s,i,a){i();const l=e(1),h=e(221),o=e(43),c=e(9),d=e(20),r=e(319),n=e(323),_=l.__importStar(e(327)),p=_,b=l.__importStar(e(328)),u=b,m=l.__importStar(e(243)),v=m;class g extends r.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.tabs.change,(()=>this.rebuild())),this.connect(this.model.properties.active.change,(()=>this.on_active_change()))}styles(){return[...super.styles(),b.default,m.default,_.default]}get child_models(){return this.model.tabs.map((e=>e.child))}_update_layout(){const e=this.model.tabs_location,t=\"above\"==e||\"below\"==e,{scroll_el:s,headers_el:i}=this;this.header=new class extends h.ContentBox{_measure(e){const a=o.size(s),l=o.children(i).slice(0,3).map((e=>o.size(e))),{width:h,height:d}=super._measure(e);if(t){const t=a.width+c.sum(l.map((e=>e.width)));return{width:e.width!=1/0?e.width:t,height:d}}{const t=a.height+c.sum(l.map((e=>e.height)));return{width:h,height:e.height!=1/0?e.height:t}}}}(this.header_el),t?this.header.set_sizing({width_policy:\"fit\",height_policy:\"fixed\"}):this.header.set_sizing({width_policy:\"fixed\",height_policy:\"fit\"});let a=1,l=1;switch(e){case\"above\":a-=1;break;case\"below\":a+=1;break;case\"left\":l-=1;break;case\"right\":l+=1}const d={layout:this.header,row:a,col:l},r=this.child_views.map((e=>({layout:e.layout,row:1,col:1})));this.layout=new h.Grid([d,...r]),this.layout.set_sizing(this.box_sizing())}update_position(){super.update_position(),this.header_el.style.position=\"absolute\",o.position(this.header_el,this.header.bbox);const e=this.model.tabs_location,t=\"above\"==e||\"below\"==e,s=o.size(this.scroll_el),i=o.scroll_size(this.headers_el);if(t){const{width:e}=this.header.bbox;i.width>e?(this.wrapper_el.style.maxWidth=e-s.width+\"px\",o.display(this.scroll_el)):(this.wrapper_el.style.maxWidth=\"\",o.undisplay(this.scroll_el))}else{const{height:e}=this.header.bbox;i.height>e?(this.wrapper_el.style.maxHeight=e-s.height+\"px\",o.display(this.scroll_el)):(this.wrapper_el.style.maxHeight=\"\",o.undisplay(this.scroll_el))}const{child_views:a}=this;for(const e of a)o.hide(e.el);const l=a[this.model.active];null!=l&&o.show(l.el)}render(){super.render();const{active:e}=this.model,t=this.model.tabs_location,s=\"above\"==t||\"below\"==t,i=this.model.tabs.map(((t,s)=>{const i=o.div({class:[p.tab,s==e?p.active:null]},t.title);if(i.addEventListener(\"click\",(e=>{e.target==e.currentTarget&&this.change_active(s)})),t.closable){const e=o.div({class:p.close});e.addEventListener(\"click\",(e=>{if(e.target==e.currentTarget){this.model.tabs=c.remove_at(this.model.tabs,s);const e=this.model.tabs.length;this.model.active>e-1&&(this.model.active=e-1)}})),i.appendChild(e)}return i}));this.headers_el=o.div({class:[p.headers]},i),this.wrapper_el=o.div({class:p.headers_wrapper},this.headers_el);const a=o.div({class:[u.btn,u.btn_default],disabled:\"\"},o.div({class:[v.caret,p.left]})),l=o.div({class:[u.btn,u.btn_default]},o.div({class:[v.caret,p.right]}));let h=0;const d=e=>()=>{const t=this.model.tabs.length;h=\"left\"==e?Math.max(h-1,0):Math.min(h+1,t-1),0==h?a.setAttribute(\"disabled\",\"\"):a.removeAttribute(\"disabled\"),h==t-1?l.setAttribute(\"disabled\",\"\"):l.removeAttribute(\"disabled\");const i=o.children(this.headers_el).slice(0,h).map((e=>e.getBoundingClientRect()));if(s){const e=-c.sum(i.map((e=>e.width)));this.headers_el.style.left=`${e}px`}else{const e=-c.sum(i.map((e=>e.height)));this.headers_el.style.top=`${e}px`}};a.addEventListener(\"click\",d(\"left\")),l.addEventListener(\"click\",d(\"right\")),this.scroll_el=o.div({class:u.btn_group},a,l),this.header_el=o.div({class:[p.tabs_header,p[t]]},this.scroll_el,this.wrapper_el),this.el.appendChild(this.header_el)}change_active(e){e!=this.model.active&&(this.model.active=e)}on_active_change(){const e=this.model.active,t=o.children(this.headers_el);for(const e of t)e.classList.remove(p.active);t[e].classList.add(p.active);const{child_views:s}=this;for(const e of s)o.hide(e.el);o.show(s[e].el)}}s.TabsView=g,g.__name__=\"TabsView\";class w extends r.LayoutDOM{constructor(e){super(e)}static init_Tabs(){this.prototype.default_view=g,this.define((({Int:e,Array:t,Ref:s})=>({tabs:[t(s(n.Panel)),[]],tabs_location:[d.Location,\"above\"],active:[e,0]})))}}s.Tabs=w,w.__name__=\"Tabs\",w.init_Tabs()},\n function _(e,r,b,o,t){o(),b.root=\"bk-root\",b.tabs_header=\"bk-tabs-header\",b.btn_group=\"bk-btn-group\",b.btn=\"bk-btn\",b.headers_wrapper=\"bk-headers-wrapper\",b.above=\"bk-above\",b.right=\"bk-right\",b.below=\"bk-below\",b.left=\"bk-left\",b.headers=\"bk-headers\",b.tab=\"bk-tab\",b.active=\"bk-active\",b.close=\"bk-close\",b.default='.bk-root .bk-tabs-header{display:flex;display:-webkit-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;align-items:center;-webkit-align-items:center;overflow:hidden;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;}.bk-root .bk-tabs-header .bk-btn-group{height:auto;margin-right:5px;}.bk-root .bk-tabs-header .bk-btn-group > .bk-btn{flex-grow:0;-webkit-flex-grow:0;height:auto;padding:4px 4px;}.bk-root .bk-tabs-header .bk-headers-wrapper{flex-grow:1;-webkit-flex-grow:1;overflow:hidden;color:#666666;}.bk-root .bk-tabs-header.bk-above .bk-headers-wrapper{border-bottom:1px solid #e6e6e6;}.bk-root .bk-tabs-header.bk-right .bk-headers-wrapper{border-left:1px solid #e6e6e6;}.bk-root .bk-tabs-header.bk-below .bk-headers-wrapper{border-top:1px solid #e6e6e6;}.bk-root .bk-tabs-header.bk-left .bk-headers-wrapper{border-right:1px solid #e6e6e6;}.bk-root .bk-tabs-header.bk-above,.bk-root .bk-tabs-header.bk-below{flex-direction:row;-webkit-flex-direction:row;}.bk-root .bk-tabs-header.bk-above .bk-headers,.bk-root .bk-tabs-header.bk-below .bk-headers{flex-direction:row;-webkit-flex-direction:row;}.bk-root .bk-tabs-header.bk-left,.bk-root .bk-tabs-header.bk-right{flex-direction:column;-webkit-flex-direction:column;}.bk-root .bk-tabs-header.bk-left .bk-headers,.bk-root .bk-tabs-header.bk-right .bk-headers{flex-direction:column;-webkit-flex-direction:column;}.bk-root .bk-tabs-header .bk-headers{position:relative;display:flex;display:-webkit-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;align-items:center;-webkit-align-items:center;}.bk-root .bk-tabs-header .bk-tab{padding:4px 8px;border:solid transparent;white-space:nowrap;cursor:pointer;}.bk-root .bk-tabs-header .bk-tab:hover{background-color:#f2f2f2;}.bk-root .bk-tabs-header .bk-tab.bk-active{color:#4d4d4d;background-color:white;border-color:#e6e6e6;}.bk-root .bk-tabs-header .bk-tab .bk-close{margin-left:10px;}.bk-root .bk-tabs-header.bk-above .bk-tab{border-width:3px 1px 0px 1px;border-radius:4px 4px 0 0;}.bk-root .bk-tabs-header.bk-right .bk-tab{border-width:1px 3px 1px 0px;border-radius:0 4px 4px 0;}.bk-root .bk-tabs-header.bk-below .bk-tab{border-width:0px 1px 3px 1px;border-radius:0 0 4px 4px;}.bk-root .bk-tabs-header.bk-left .bk-tab{border-width:1px 0px 1px 3px;border-radius:4px 0 0 4px;}.bk-root .bk-close{display:inline-block;width:10px;height:10px;vertical-align:middle;background-image:url(\\'data:image/svg+xml;utf8, \\');}.bk-root .bk-close:hover{background-image:url(\\'data:image/svg+xml;utf8, \\');}'},\n function _(o,b,r,t,e){t(),r.root=\"bk-root\",r.btn=\"bk-btn\",r.active=\"bk-active\",r.btn_default=\"bk-btn-default\",r.btn_primary=\"bk-btn-primary\",r.btn_success=\"bk-btn-success\",r.btn_warning=\"bk-btn-warning\",r.btn_danger=\"bk-btn-danger\",r.btn_light=\"bk-btn-light\",r.btn_group=\"bk-btn-group\",r.dropdown_toggle=\"bk-dropdown-toggle\",r.default=\".bk-root .bk-btn{height:100%;display:inline-block;text-align:center;vertical-align:middle;white-space:nowrap;cursor:pointer;padding:6px 12px;font-size:12px;border:1px solid transparent;border-radius:4px;outline:0;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;}.bk-root .bk-btn:hover,.bk-root .bk-btn:focus{text-decoration:none;}.bk-root .bk-btn:active,.bk-root .bk-btn.bk-active{background-image:none;box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);}.bk-root .bk-btn[disabled]{cursor:not-allowed;pointer-events:none;opacity:0.65;box-shadow:none;}.bk-root .bk-btn-default{color:#333;background-color:#fff;border-color:#ccc;}.bk-root .bk-btn-default:hover{background-color:#f5f5f5;border-color:#b8b8b8;}.bk-root .bk-btn-default.bk-active{background-color:#ebebeb;border-color:#adadad;}.bk-root .bk-btn-default[disabled],.bk-root .bk-btn-default[disabled]:hover,.bk-root .bk-btn-default[disabled]:focus,.bk-root .bk-btn-default[disabled]:active,.bk-root .bk-btn-default[disabled].bk-active{background-color:#e6e6e6;border-color:#ccc;}.bk-root .bk-btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd;}.bk-root .bk-btn-primary:hover{background-color:#3681c1;border-color:#2c699e;}.bk-root .bk-btn-primary.bk-active{background-color:#3276b1;border-color:#285e8e;}.bk-root .bk-btn-primary[disabled],.bk-root .bk-btn-primary[disabled]:hover,.bk-root .bk-btn-primary[disabled]:focus,.bk-root .bk-btn-primary[disabled]:active,.bk-root .bk-btn-primary[disabled].bk-active{background-color:#506f89;border-color:#357ebd;}.bk-root .bk-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c;}.bk-root .bk-btn-success:hover{background-color:#4eb24e;border-color:#409240;}.bk-root .bk-btn-success.bk-active{background-color:#47a447;border-color:#398439;}.bk-root .bk-btn-success[disabled],.bk-root .bk-btn-success[disabled]:hover,.bk-root .bk-btn-success[disabled]:focus,.bk-root .bk-btn-success[disabled]:active,.bk-root .bk-btn-success[disabled].bk-active{background-color:#667b66;border-color:#4cae4c;}.bk-root .bk-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236;}.bk-root .bk-btn-warning:hover{background-color:#eea43b;border-color:#e89014;}.bk-root .bk-btn-warning.bk-active{background-color:#ed9c28;border-color:#d58512;}.bk-root .bk-btn-warning[disabled],.bk-root .bk-btn-warning[disabled]:hover,.bk-root .bk-btn-warning[disabled]:focus,.bk-root .bk-btn-warning[disabled]:active,.bk-root .bk-btn-warning[disabled].bk-active{background-color:#c89143;border-color:#eea236;}.bk-root .bk-btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a;}.bk-root .bk-btn-danger:hover{background-color:#d5433e;border-color:#bd2d29;}.bk-root .bk-btn-danger.bk-active{background-color:#d2322d;border-color:#ac2925;}.bk-root .bk-btn-danger[disabled],.bk-root .bk-btn-danger[disabled]:hover,.bk-root .bk-btn-danger[disabled]:focus,.bk-root .bk-btn-danger[disabled]:active,.bk-root .bk-btn-danger[disabled].bk-active{background-color:#a55350;border-color:#d43f3a;}.bk-root .bk-btn-light{color:#333;background-color:#fff;border-color:#ccc;border-color:transparent;}.bk-root .bk-btn-light:hover{background-color:#f5f5f5;border-color:#b8b8b8;}.bk-root .bk-btn-light.bk-active{background-color:#ebebeb;border-color:#adadad;}.bk-root .bk-btn-light[disabled],.bk-root .bk-btn-light[disabled]:hover,.bk-root .bk-btn-light[disabled]:focus,.bk-root .bk-btn-light[disabled]:active,.bk-root .bk-btn-light[disabled].bk-active{background-color:#e6e6e6;border-color:#ccc;}.bk-root .bk-btn-group{height:100%;display:flex;display:-webkit-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;align-items:center;-webkit-align-items:center;flex-direction:row;-webkit-flex-direction:row;}.bk-root .bk-btn-group > .bk-btn{flex-grow:1;-webkit-flex-grow:1;}.bk-root .bk-btn-group > .bk-btn + .bk-btn{margin-left:-1px;}.bk-root .bk-btn-group > .bk-btn:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;}.bk-root .bk-btn-group > .bk-btn:not(:first-child):last-child{border-bottom-left-radius:0;border-top-left-radius:0;}.bk-root .bk-btn-group > .bk-btn:not(:first-child):not(:last-child){border-radius:0;}.bk-root .bk-btn-group .bk-dropdown-toggle{flex:0 0 0;-webkit-flex:0 0 0;padding:6px 6px;}\"},\n function _(t,e,i,o,n){o();const _=t(320);class s extends _.ColumnView{}i.WidgetBoxView=s,s.__name__=\"WidgetBoxView\";class d extends _.Column{constructor(t){super(t)}static init_WidgetBox(){this.prototype.default_view=s}}i.WidgetBox=d,d.__name__=\"WidgetBox\",d.init_WidgetBox()},\n function _(p,o,t,a,n){a(),n(\"MapOptions\",p(331).MapOptions),n(\"GMapOptions\",p(331).GMapOptions),n(\"GMapPlot\",p(331).GMapPlot),n(\"Plot\",p(332).Plot)},\n function _(t,i,n,e,a){e();const s=t(332),o=t(53),p=t(156),_=t(337);a(\"GMapPlotView\",_.GMapPlotView);class l extends o.Model{constructor(t){super(t)}static init_MapOptions(){this.define((({Int:t,Number:i})=>({lat:[i],lng:[i],zoom:[t,12]})))}}n.MapOptions=l,l.__name__=\"MapOptions\",l.init_MapOptions();class r extends l{constructor(t){super(t)}static init_GMapOptions(){this.define((({Boolean:t,Int:i,String:n})=>({map_type:[n,\"roadmap\"],scale_control:[t,!1],styles:[n],tilt:[i,45]})))}}n.GMapOptions=r,r.__name__=\"GMapOptions\",r.init_GMapOptions();class c extends s.Plot{constructor(t){super(t),this.use_map=!0}static init_GMapPlot(){this.prototype.default_view=_.GMapPlotView,this.define((({String:t,Ref:i})=>({map_options:[i(r)],api_key:[t],api_version:[t,\"3.43\"]}))),this.override({x_range:()=>new p.Range1d,y_range:()=>new p.Range1d})}}n.GMapPlot=c,c.__name__=\"GMapPlot\",c.init_GMapPlot()},\n function _(e,t,i,n,r){n();const o=e(1),a=o.__importStar(e(48)),s=o.__importStar(e(18)),l=e(15),_=e(20),h=e(9),c=e(13),d=e(8),u=e(319),g=e(163),p=e(316),f=e(40),b=e(138),w=e(218),m=e(235),y=e(105),v=e(146),x=e(130),A=e(41),R=e(62),S=e(61),P=e(159),D=e(333);r(\"PlotView\",D.PlotView);class L extends u.LayoutDOM{constructor(e){super(e),this.use_map=!1}static init_Plot(){this.prototype.default_view=D.PlotView,this.mixins([[\"outline_\",a.Line],[\"background_\",a.Fill],[\"border_\",a.Fill]]),this.define((({Boolean:e,Number:t,String:i,Array:n,Dict:r,Or:o,Ref:a,Null:l,Nullable:h})=>({toolbar:[a(m.Toolbar),()=>new m.Toolbar],toolbar_location:[h(_.Location),\"right\"],toolbar_sticky:[e,!0],plot_width:[s.Alias(\"width\")],plot_height:[s.Alias(\"height\")],frame_width:[h(t),null],frame_height:[h(t),null],title:[o(a(b.Title),i,l),()=>new b.Title({text:\"\"})],title_location:[h(_.Location),\"above\"],above:[n(o(a(f.Annotation),a(g.Axis))),[]],below:[n(o(a(f.Annotation),a(g.Axis))),[]],left:[n(o(a(f.Annotation),a(g.Axis))),[]],right:[n(o(a(f.Annotation),a(g.Axis))),[]],center:[n(o(a(f.Annotation),a(p.Grid))),[]],renderers:[n(a(A.Renderer)),[]],x_range:[a(y.Range),()=>new P.DataRange1d],extra_x_ranges:[r(a(y.Range)),{}],y_range:[a(y.Range),()=>new P.DataRange1d],extra_y_ranges:[r(a(y.Range)),{}],x_scale:[a(v.Scale),()=>new w.LinearScale],y_scale:[a(v.Scale),()=>new w.LinearScale],lod_factor:[t,10],lod_interval:[t,300],lod_threshold:[h(t),2e3],lod_timeout:[t,500],hidpi:[e,!0],output_backend:[_.OutputBackend,\"canvas\"],min_border:[h(t),5],min_border_top:[h(t),null],min_border_left:[h(t),null],min_border_bottom:[h(t),null],min_border_right:[h(t),null],inner_width:[t,0],inner_height:[t,0],outer_width:[t,0],outer_height:[t,0],match_aspect:[e,!1],aspect_scale:[t,1],reset_policy:[_.ResetPolicy,\"standard\"]}))),this.override({width:600,height:600,outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"})}_doc_attached(){super._doc_attached(),this._push_changes([[this.properties.inner_height,null,this.inner_height],[this.properties.inner_width,null,this.inner_width]])}initialize(){super.initialize(),this.reset=new l.Signal0(this,\"reset\");for(const e of c.values(this.extra_x_ranges).concat(this.x_range)){let t=e.plots;d.isArray(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}for(const e of c.values(this.extra_y_ranges).concat(this.y_range)){let t=e.plots;d.isArray(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}}add_layout(e,t=\"center\"){const i=this.properties[t].get_value();this.setv({[t]:[...i,e]})}remove_layout(e){const t=t=>{h.remove_by(t,(t=>t==e))};t(this.left),t(this.right),t(this.above),t(this.below),t(this.center)}get data_renderers(){return this.renderers.filter((e=>e instanceof R.DataRenderer))}add_renderers(...e){this.renderers=this.renderers.concat(e)}add_glyph(e,t=new x.ColumnDataSource,i={}){const n=new S.GlyphRenderer(Object.assign(Object.assign({},i),{data_source:t,glyph:e}));return this.add_renderers(n),n}add_tools(...e){this.toolbar.tools=this.toolbar.tools.concat(e)}get panels(){return[...this.side_panels,...this.center]}get side_panels(){const{above:e,below:t,left:i,right:n}=this;return h.concat([e,t,i,n])}}i.Plot=L,L.__name__=\"Plot\",L.init_Plot()},\n function _(e,t,i,s,a){s();const n=e(1),o=e(144),l=e(262),r=e(319),_=e(40),h=e(138),d=e(163),u=e(234),c=e(264),p=e(122),v=e(45),b=e(19),g=e(334),m=e(8),w=e(9),y=e(249),f=e(222),x=e(225),z=e(223),k=e(140),q=e(99),M=e(335),V=e(336),P=e(28);class R extends r.LayoutDOMView{constructor(){super(...arguments),this._outer_bbox=new q.BBox,this._inner_bbox=new q.BBox,this._needs_paint=!0,this._needs_layout=!1,this._invalidated_painters=new Set,this._invalidate_all=!0}get canvas(){return this.canvas_view}get state(){return this._state_manager}set invalidate_dataranges(e){this._range_manager.invalidate_dataranges=e}renderer_view(e){const t=this.renderer_views.get(e);if(null==t)for(const[,t]of this.renderer_views){const i=t.renderer_view(e);if(null!=i)return i}return t}get is_paused(){return null!=this._is_paused&&0!==this._is_paused}get child_models(){return[]}pause(){null==this._is_paused?this._is_paused=1:this._is_paused+=1}unpause(e=!1){if(null==this._is_paused)throw new Error(\"wasn't paused\");this._is_paused-=1,0!=this._is_paused||e||this.request_paint(\"everything\")}request_render(){this.request_paint(\"everything\")}request_paint(e){this.invalidate_painters(e),this.schedule_paint()}invalidate_painters(e){if(\"everything\"==e)this._invalidate_all=!0;else if(m.isArray(e))for(const t of e)this._invalidated_painters.add(t);else this._invalidated_painters.add(e)}schedule_paint(){if(!this.is_paused){const e=this.throttled_paint();this._ready=this._ready.then((()=>e))}}request_layout(){this._needs_layout=!0,this.request_paint(\"everything\")}reset(){\"standard\"==this.model.reset_policy&&(this.state.clear(),this.reset_range(),this.reset_selection()),this.model.trigger_event(new c.Reset)}remove(){p.remove_views(this.renderer_views),p.remove_views(this.tool_views),this.canvas_view.remove(),super.remove()}render(){super.render(),this.el.appendChild(this.canvas_view.el),this.canvas_view.render()}initialize(){this.pause(),super.initialize(),this.lod_started=!1,this.visuals=new v.Visuals(this),this._initial_state={selection:new Map,dimensions:{width:0,height:0}},this.visibility_callbacks=[],this.renderer_views=new Map,this.tool_views=new Map,this.frame=new o.CartesianFrame(this.model.x_scale,this.model.y_scale,this.model.x_range,this.model.y_range,this.model.extra_x_ranges,this.model.extra_y_ranges),this._range_manager=new M.RangeManager(this),this._state_manager=new V.StateManager(this,this._initial_state),this.throttled_paint=g.throttle((()=>this.repaint()),1e3/60);const{title_location:e,title:t}=this.model;null!=e&&null!=t&&(this._title=t instanceof h.Title?t:new h.Title({text:t}));const{toolbar_location:i,toolbar:s}=this.model;null!=i&&null!=s&&(this._toolbar=new u.ToolbarPanel({toolbar:s}),s.toolbar_location=i)}async lazy_initialize(){await super.lazy_initialize();const{hidpi:e,output_backend:t}=this.model,i=new l.Canvas({hidpi:e,output_backend:t});this.canvas_view=await p.build_view(i,{parent:this}),this.canvas_view.plot_views=[this],await this.build_renderer_views(),await this.build_tool_views(),this._range_manager.update_dataranges(),this.unpause(!0),b.logger.debug(\"PlotView initialized\")}_width_policy(){return null==this.model.frame_width?super._width_policy():\"min\"}_height_policy(){return null==this.model.frame_height?super._height_policy():\"min\"}_update_layout(){var e,t,i,s,a;this.layout=new x.BorderLayout,this.layout.set_sizing(this.box_sizing());const n=w.copy(this.model.above),o=w.copy(this.model.below),l=w.copy(this.model.left),r=w.copy(this.model.right),d=e=>{switch(e){case\"above\":return n;case\"below\":return o;case\"left\":return l;case\"right\":return r}},{title_location:c,title:p}=this.model;null!=c&&null!=p&&d(c).push(this._title);const{toolbar_location:v,toolbar:b}=this.model;if(null!=v&&null!=b){const e=d(v);let t=!0;if(this.model.toolbar_sticky)for(let i=0;i{var i;const s=this.renderer_view(t);return s.panel=new k.Panel(e),null===(i=s.update_layout)||void 0===i||i.call(s),s.layout},y=(e,t)=>{const i=\"above\"==e||\"below\"==e,s=[];for(const a of t)if(m.isArray(a)){const t=a.map((t=>{const s=g(e,t);if(t instanceof u.ToolbarPanel){const e=i?\"width_policy\":\"height_policy\";s.set_sizing(Object.assign(Object.assign({},s.sizing),{[e]:\"min\"}))}return s}));let n;i?(n=new z.Row(t),n.set_sizing({width_policy:\"max\",height_policy:\"min\"})):(n=new z.Column(t),n.set_sizing({width_policy:\"min\",height_policy:\"max\"})),n.absolute=!0,s.push(n)}else s.push(g(e,a));return s},q=null!==(e=this.model.min_border)&&void 0!==e?e:0;this.layout.min_border={left:null!==(t=this.model.min_border_left)&&void 0!==t?t:q,top:null!==(i=this.model.min_border_top)&&void 0!==i?i:q,right:null!==(s=this.model.min_border_right)&&void 0!==s?s:q,bottom:null!==(a=this.model.min_border_bottom)&&void 0!==a?a:q};const M=new f.NodeLayout,V=new f.VStack,P=new f.VStack,R=new f.HStack,O=new f.HStack;M.absolute=!0,V.absolute=!0,P.absolute=!0,R.absolute=!0,O.absolute=!0,M.children=this.model.center.filter((e=>e instanceof _.Annotation)).map((e=>{var t;const i=this.renderer_view(e);return null===(t=i.update_layout)||void 0===t||t.call(i),i.layout})).filter((e=>null!=e));const{frame_width:S,frame_height:j}=this.model;M.set_sizing(Object.assign(Object.assign({},null!=S?{width_policy:\"fixed\",width:S}:{width_policy:\"fit\"}),null!=j?{height_policy:\"fixed\",height:j}:{height_policy:\"fit\"})),M.on_resize((e=>this.frame.set_geometry(e))),V.children=w.reversed(y(\"above\",n)),P.children=y(\"below\",o),R.children=w.reversed(y(\"left\",l)),O.children=y(\"right\",r),V.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),P.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),R.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),O.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),this.layout.center_panel=M,this.layout.top_panel=V,this.layout.bottom_panel=P,this.layout.left_panel=R,this.layout.right_panel=O}get axis_views(){const e=[];for(const[,t]of this.renderer_views)t instanceof d.AxisView&&e.push(t);return e}set_toolbar_visibility(e){for(const t of this.visibility_callbacks)t(e)}update_range(e,t){this.pause(),this._range_manager.update(e,t),this.unpause()}reset_range(){this.update_range(null)}get_selection(){const e=new Map;for(const t of this.model.data_renderers){const{selected:i}=t.selection_manager.source;e.set(t,i)}return e}update_selection(e){for(const t of this.model.data_renderers){const i=t.selection_manager.source;if(null!=e){const s=e.get(t);null!=s&&i.selected.update(s,!0)}else i.selection_manager.clear()}}reset_selection(){this.update_selection(null)}_invalidate_layout(){(()=>{var e;for(const t of this.model.side_panels){const i=this.renderer_views.get(t);if(null===(e=i.layout)||void 0===e?void 0:e.has_size_changed())return this.invalidate_painters(i),!0}return!1})()&&this.root.compute_layout()}get_renderer_views(){return this.computed_renderers.map((e=>this.renderer_views.get(e)))}*_compute_renderers(){const{above:e,below:t,left:i,right:s,center:a,renderers:n}=this.model;yield*n,yield*e,yield*t,yield*i,yield*s,yield*a,null!=this._title&&(yield this._title),null!=this._toolbar&&(yield this._toolbar);for(const e of this.model.toolbar.tools)null!=e.overlay&&(yield e.overlay),yield*e.synthetic_renderers}async build_renderer_views(){this.computed_renderers=[...this._compute_renderers()],await p.build_views(this.renderer_views,this.computed_renderers,{parent:this})}async build_tool_views(){const e=this.model.toolbar.tools;(await p.build_views(this.tool_views,e,{parent:this})).map((e=>this.canvas_view.ui_event_bus.register_tool(e)))}connect_signals(){super.connect_signals();const{x_ranges:e,y_ranges:t}=this.frame;for(const[,t]of e)this.connect(t.change,(()=>{this._needs_layout=!0,this.request_paint(\"everything\")}));for(const[,e]of t)this.connect(e.change,(()=>{this._needs_layout=!0,this.request_paint(\"everything\")}));const{above:i,below:s,left:a,right:n,center:o,renderers:l}=this.model.properties;this.on_change([i,s,a,n,o,l],(async()=>await this.build_renderer_views())),this.connect(this.model.toolbar.properties.tools.change,(async()=>{await this.build_renderer_views(),await this.build_tool_views()})),this.connect(this.model.change,(()=>this.request_paint(\"everything\"))),this.connect(this.model.reset,(()=>this.reset()))}has_finished(){if(!super.has_finished())return!1;if(this.model.visible)for(const[,e]of this.renderer_views)if(!e.has_finished())return!1;return!0}after_layout(){var e;super.after_layout();for(const[,t]of this.renderer_views)t instanceof _.AnnotationView&&(null===(e=t.after_layout)||void 0===e||e.call(t));if(this._needs_layout=!1,this.model.setv({inner_width:Math.round(this.frame.bbox.width),inner_height:Math.round(this.frame.bbox.height),outer_width:Math.round(this.layout.bbox.width),outer_height:Math.round(this.layout.bbox.height)},{no_change:!0}),!1!==this.model.match_aspect&&(this.pause(),this._range_manager.update_dataranges(),this.unpause(!0)),!this._outer_bbox.equals(this.layout.bbox)){const{width:e,height:t}=this.layout.bbox;this.canvas_view.resize(e,t),this._outer_bbox=this.layout.bbox,this._invalidate_all=!0,this._needs_paint=!0}const{inner_bbox:t}=this.layout;this._inner_bbox.equals(t)||(this._inner_bbox=t,this._needs_paint=!0),this._needs_paint&&this.paint()}repaint(){this._needs_layout&&this._invalidate_layout(),this.paint()}paint(){var e;if(this.is_paused||!this.model.visible)return;b.logger.trace(`PlotView.paint() for ${this.model.id}`);const{document:t}=this.model;if(null!=t){const e=t.interactive_duration();e>=0&&e{t.interactive_duration()>this.model.lod_timeout&&t.interactive_stop(),this.request_paint(\"everything\")}),this.model.lod_timeout):t.interactive_stop()}this._range_manager.invalidate_dataranges&&(this._range_manager.update_dataranges(),this._invalidate_layout());let i=!1,s=!1;if(this._invalidate_all)i=!0,s=!0;else for(const e of this._invalidated_painters){const{level:t}=e.model;if(\"overlay\"!=t?i=!0:s=!0,i&&s)break}this._invalidated_painters.clear(),this._invalidate_all=!1;const a=[this.frame.bbox.left,this.frame.bbox.top,this.frame.bbox.width,this.frame.bbox.height],{primary:n,overlays:o}=this.canvas_view;i&&(n.prepare(),this.canvas_view.prepare_webgl(a),this._map_hook(n.ctx,a),this._paint_empty(n.ctx,a),this._paint_outline(n.ctx,a),this._paint_levels(n.ctx,\"image\",a,!0),this._paint_levels(n.ctx,\"underlay\",a,!0),this._paint_levels(n.ctx,\"glyph\",a,!0),this._paint_levels(n.ctx,\"guide\",a,!1),this._paint_levels(n.ctx,\"annotation\",a,!1),n.finish()),(s||P.settings.wireframe)&&(o.prepare(),this._paint_levels(o.ctx,\"overlay\",a,!1),P.settings.wireframe&&this._paint_layout(o.ctx,this.layout),o.finish()),null==this._initial_state.range&&(this._initial_state.range=null!==(e=this._range_manager.compute_initial())&&void 0!==e?e:void 0),this._needs_paint=!1}_paint_levels(e,t,i,s){for(const a of this.computed_renderers){if(a.level!=t)continue;const n=this.renderer_views.get(a);e.save(),(s||n.needs_clip)&&(e.beginPath(),e.rect(...i),e.clip()),n.render(),e.restore(),n.has_webgl&&n.needs_webgl_blit&&this.canvas_view.blit_webgl(e)}}_paint_layout(e,t){const{x:i,y:s,width:a,height:n}=t.bbox;e.strokeStyle=\"blue\",e.strokeRect(i,s,a,n);for(const a of t)e.save(),t.absolute||e.translate(i,s),this._paint_layout(e,a),e.restore()}_map_hook(e,t){}_paint_empty(e,t){const[i,s,a,n]=[0,0,this.layout.bbox.width,this.layout.bbox.height],[o,l,r,_]=t;this.visuals.border_fill.doit&&(this.visuals.border_fill.set_value(e),e.fillRect(i,s,a,n),e.clearRect(o,l,r,_)),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fillRect(o,l,r,_))}_paint_outline(e,t){if(this.visuals.outline_line.doit){e.save(),this.visuals.outline_line.set_value(e);let[i,s,a,n]=t;i+a==this.layout.bbox.width&&(a-=1),s+n==this.layout.bbox.height&&(n-=1),e.strokeRect(i,s,a,n),e.restore()}}to_blob(){return this.canvas_view.to_blob()}export(e,t=!0){const i=\"png\"==e?\"canvas\":\"svg\",s=new y.CanvasLayer(i,t),{width:a,height:n}=this.layout.bbox;s.resize(a,n);const{canvas:o}=this.canvas_view.compose();return s.ctx.drawImage(o,0,0),s}serializable_state(){const e=super.serializable_state(),{children:t}=e,i=n.__rest(e,[\"children\"]),s=this.get_renderer_views().map((e=>e.serializable_state())).filter((e=>null!=e.bbox));return Object.assign(Object.assign({},i),{children:[...null!=t?t:[],...s]})}}i.PlotView=R,R.__name__=\"PlotView\"},\n function _(t,n,e,o,u){o(),e.throttle=function(t,n){let e=null,o=0,u=!1;return function(){return new Promise(((r,i)=>{const l=function(){o=Date.now(),e=null,u=!1;try{t(),r()}catch(t){i(t)}},a=Date.now(),c=n-(a-o);c<=0&&!u?(null!=e&&clearTimeout(e),u=!0,requestAnimationFrame(l)):e||u?r():e=setTimeout((()=>requestAnimationFrame(l)),c)}))}}},\n function _(t,n,e,s,a){s();const o=t(159),r=t(19);class l{constructor(t){this.parent=t,this.invalidate_dataranges=!0}get frame(){return this.parent.frame}update(t,n){const{x_ranges:e,y_ranges:s}=this.frame;if(null==t){for(const[,t]of e)t.reset();for(const[,t]of s)t.reset();this.update_dataranges()}else{const a=[];for(const[n,s]of e)a.push([s,t.xrs.get(n)]);for(const[n,e]of s)a.push([e,t.yrs.get(n)]);(null==n?void 0:n.scrolling)&&this._update_ranges_together(a),this._update_ranges_individually(a,n)}}reset(){this.update(null)}update_dataranges(){const t=new Map,n=new Map;let e=!1;for(const[,t]of this.frame.x_ranges)t instanceof o.DataRange1d&&\"log\"==t.scale_hint&&(e=!0);for(const[,t]of this.frame.y_ranges)t instanceof o.DataRange1d&&\"log\"==t.scale_hint&&(e=!0);for(const s of this.parent.model.data_renderers){const a=this.parent.renderer_view(s);if(null==a)continue;const o=a.glyph_view.bounds();if(null!=o&&t.set(s,o),e){const t=a.glyph_view.log_bounds();null!=t&&n.set(s,t)}}let s=!1,a=!1;const{width:l,height:i}=this.frame.bbox;let d;!1!==this.parent.model.match_aspect&&0!=l&&0!=i&&(d=1/this.parent.model.aspect_scale*(l/i));for(const[,e]of this.frame.x_ranges){if(e instanceof o.DataRange1d){const a=\"log\"==e.scale_hint?n:t;e.update(a,0,this.parent.model,d),e.follow&&(s=!0)}null!=e.bounds&&(a=!0)}for(const[,e]of this.frame.y_ranges){if(e instanceof o.DataRange1d){const a=\"log\"==e.scale_hint?n:t;e.update(a,1,this.parent.model,d),e.follow&&(s=!0)}null!=e.bounds&&(a=!0)}if(s&&a){r.logger.warn(\"Follow enabled so bounds are unset.\");for(const[,t]of this.frame.x_ranges)t.bounds=null;for(const[,t]of this.frame.y_ranges)t.bounds=null}this.invalidate_dataranges=!1}compute_initial(){let t=!0;const{x_ranges:n,y_ranges:e}=this.frame,s=new Map,a=new Map;for(const[e,a]of n){const{start:n,end:o}=a;if(null==n||null==o||isNaN(n+o)){t=!1;break}s.set(e,{start:n,end:o})}if(t)for(const[n,s]of e){const{start:e,end:o}=s;if(null==e||null==o||isNaN(e+o)){t=!1;break}a.set(n,{start:e,end:o})}return t?{xrs:s,yrs:a}:(r.logger.warn(\"could not set initial ranges\"),null)}_update_ranges_together(t){let n=1;for(const[e,s]of t)n=Math.min(n,this._get_weight_to_constrain_interval(e,s));if(n<1)for(const[e,s]of t)s.start=n*s.start+(1-n)*e.start,s.end=n*s.end+(1-n)*e.end}_update_ranges_individually(t,n){const e=!!(null==n?void 0:n.panning),s=!!(null==n?void 0:n.scrolling);let a=!1;for(const[n,o]of t){if(!s){const t=this._get_weight_to_constrain_interval(n,o);t<1&&(o.start=t*o.start+(1-t)*n.start,o.end=t*o.end+(1-t)*n.end)}if(null!=n.bounds&&\"auto\"!=n.bounds){const[t,r]=n.bounds,l=Math.abs(o.end-o.start);n.is_reversed?(null!=t&&t>=o.end&&(a=!0,o.end=t,(e||s)&&(o.start=t+l)),null!=r&&r<=o.start&&(a=!0,o.start=r,(e||s)&&(o.end=r-l))):(null!=t&&t>=o.start&&(a=!0,o.start=t,(e||s)&&(o.end=t+l)),null!=r&&r<=o.end&&(a=!0,o.end=r,(e||s)&&(o.start=r-l)))}}if(!(s&&a&&(null==n?void 0:n.maintain_focus)))for(const[n,e]of t)n.have_updated_interactively=!0,n.start==e.start&&n.end==e.end||n.setv(e)}_get_weight_to_constrain_interval(t,n){const{min_interval:e}=t;let{max_interval:s}=t;if(null!=t.bounds&&\"auto\"!=t.bounds){const[n,e]=t.bounds;if(null!=n&&null!=e){const t=Math.abs(e-n);s=null!=s?Math.min(s,t):t}}let a=1;if(null!=e||null!=s){const o=Math.abs(t.end-t.start),r=Math.abs(n.end-n.start);null!=e&&e>0&&r0&&r>s&&(a=(s-o)/(r-o)),a=Math.max(0,Math.min(1,a))}return a}}e.RangeManager=l,l.__name__=\"RangeManager\"},\n function _(t,i,s,e,n){e();const h=t(15);class a{constructor(t,i){this.parent=t,this.initial_state=i,this.changed=new h.Signal0(this.parent,\"state_changed\"),this.history=[],this.index=-1}_do_state_change(t){const i=null!=this.history[t]?this.history[t].state:this.initial_state;null!=i.range&&this.parent.update_range(i.range),null!=i.selection&&this.parent.update_selection(i.selection)}push(t,i){const{history:s,index:e}=this,n=null!=s[e]?s[e].state:{},h=Object.assign(Object.assign(Object.assign({},this.initial_state),n),i);this.history=this.history.slice(0,this.index+1),this.history.push({type:t,state:h}),this.index=this.history.length-1,this.changed.emit()}clear(){this.history=[],this.index=-1,this.changed.emit()}undo(){this.can_undo&&(this.index-=1,this._do_state_change(this.index),this.changed.emit())}redo(){this.can_redo&&(this.index+=1,this._do_state_change(this.index),this.changed.emit())}get can_undo(){return this.index>=0}get can_redo(){return this.indexm.emit();const s=encodeURIComponent,o=document.createElement(\"script\");o.type=\"text/javascript\",o.src=`https://maps.googleapis.com/maps/api/js?v=${s(e)}&key=${s(t)}&callback=_bokeh_gmaps_callback`,document.body.appendChild(o)}(t,e)}m.connect((()=>this.request_paint(\"everything\")))}this.unpause()}remove(){p.remove(this.map_el),super.remove()}update_range(t,e){var s,o;if(null==t)this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),super.update_range(null,e);else if(null!=t.sdx||null!=t.sdy)this.map.panBy(null!==(s=t.sdx)&&void 0!==s?s:0,null!==(o=t.sdy)&&void 0!==o?o:0),super.update_range(t,e);else if(null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),super.update_range(t,e);const s=t.factor<0?-1:1,o=this.map.getZoom(),i=o+s;if(i>=2){this.map.setZoom(i);const[t,e,,]=this._get_projected_bounds();e-t<0&&this.map.setZoom(o)}this.unpause()}this._set_bokeh_ranges()}_build_map(){const{maps:t}=google;this.map_types={satellite:t.MapTypeId.SATELLITE,terrain:t.MapTypeId.TERRAIN,roadmap:t.MapTypeId.ROADMAP,hybrid:t.MapTypeId.HYBRID};const e=this.model.map_options,s={center:new t.LatLng(e.lat,e.lng),zoom:e.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[e.map_type],scaleControl:e.scale_control,tilt:e.tilt};null!=e.styles&&(s.styles=JSON.parse(e.styles)),this.map_el=p.div({style:{position:\"absolute\"}}),this.canvas_view.add_underlay(this.map_el),this.map=new t.Map(this.map_el,s),t.event.addListener(this.map,\"idle\",(()=>this._set_bokeh_ranges())),t.event.addListener(this.map,\"bounds_changed\",(()=>this._set_bokeh_ranges())),t.event.addListenerOnce(this.map,\"tilesloaded\",(()=>this._render_finished())),this.connect(this.model.properties.map_options.change,(()=>this._update_options())),this.connect(this.model.map_options.properties.styles.change,(()=>this._update_styles())),this.connect(this.model.map_options.properties.lat.change,(()=>this._update_center(\"lat\"))),this.connect(this.model.map_options.properties.lng.change,(()=>this._update_center(\"lng\"))),this.connect(this.model.map_options.properties.zoom.change,(()=>this._update_zoom())),this.connect(this.model.map_options.properties.map_type.change,(()=>this._update_map_type())),this.connect(this.model.map_options.properties.scale_control.change,(()=>this._update_scale_control())),this.connect(this.model.map_options.properties.tilt.change,(()=>this._update_tilt()))}_render_finished(){this._tiles_loaded=!0,this.notify_finished()}has_finished(){return super.has_finished()&&!0===this._tiles_loaded}_get_latlon_bounds(){const t=this.map.getBounds(),e=t.getNorthEast(),s=t.getSouthWest();return[s.lng(),e.lng(),s.lat(),e.lat()]}_get_projected_bounds(){const[t,e,s,o]=this._get_latlon_bounds(),[i,a]=l.wgs84_mercator.compute(t,s),[n,p]=l.wgs84_mercator.compute(e,o);return[i,n,a,p]}_set_bokeh_ranges(){const[t,e,s,o]=this._get_projected_bounds();this.frame.x_range.setv({start:t,end:e}),this.frame.y_range.setv({start:s,end:o})}_update_center(t){const e=this.map.getCenter().toJSON();e[t]=this.model.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()}_update_map_type(){this.map.setOptions({mapTypeId:this.map_types[this.model.map_options.map_type]})}_update_scale_control(){this.map.setOptions({scaleControl:this.model.map_options.scale_control})}_update_tilt(){this.map.setOptions({tilt:this.model.map_options.tilt})}_update_options(){this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()}_update_styles(){this.map.setOptions({styles:JSON.parse(this.model.map_options.styles)})}_update_zoom(){this.map.setOptions({zoom:this.model.map_options.zoom}),this._set_bokeh_ranges()}_map_hook(t,e){if(null==this.map&&\"undefined\"!=typeof google&&null!=google.maps&&this._build_map(),null!=this.map_el){const[t,s,o,i]=e;this.map_el.style.top=`${s}px`,this.map_el.style.left=`${t}px`,this.map_el.style.width=`${o}px`,this.map_el.style.height=`${i}px`}}_paint_empty(t,e){const s=this.layout.bbox.width,o=this.layout.bbox.height,[i,a,n,p]=e;t.clearRect(0,0,s,o),t.beginPath(),t.moveTo(0,0),t.lineTo(0,o),t.lineTo(s,o),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(i,a),t.lineTo(i+n,a),t.lineTo(i+n,a+p),t.lineTo(i,a+p),t.lineTo(i,a),t.closePath(),null!=this.model.border_fill_color&&(t.fillStyle=_.color2css(this.model.border_fill_color),t.fill())}}s.GMapPlotView=d,d.__name__=\"GMapPlotView\"},\n function _(t,_,n,o,r){o();t(1).__exportStar(t(169),n)},\n function _(e,r,d,n,R){n(),R(\"GlyphRenderer\",e(61).GlyphRenderer),R(\"GraphRenderer\",e(123).GraphRenderer),R(\"GuideRenderer\",e(164).GuideRenderer),R(\"Renderer\",e(41).Renderer)},\n function _(e,t,n,o,c){o();e(1).__exportStar(e(129),n),c(\"Selection\",e(59).Selection)},\n function _(a,e,S,o,r){o(),r(\"ServerSentDataSource\",a(342).ServerSentDataSource),r(\"AjaxDataSource\",a(344).AjaxDataSource),r(\"ColumnDataSource\",a(130).ColumnDataSource),r(\"ColumnarDataSource\",a(57).ColumnarDataSource),r(\"CDSView\",a(120).CDSView),r(\"DataSource\",a(58).DataSource),r(\"GeoJSONDataSource\",a(345).GeoJSONDataSource),r(\"WebDataSource\",a(343).WebDataSource)},\n function _(e,t,i,a,s){a();const n=e(343);class r extends n.WebDataSource{constructor(e){super(e),this.initialized=!1}setup(){if(!this.initialized){this.initialized=!0;new EventSource(this.data_url).onmessage=e=>{var t;this.load_data(JSON.parse(e.data),this.mode,null!==(t=this.max_size)&&void 0!==t?t:void 0)}}}}i.ServerSentDataSource=r,r.__name__=\"ServerSentDataSource\"},\n function _(t,e,a,n,s){n();const r=t(130),i=t(20);class l extends r.ColumnDataSource{constructor(t){super(t)}get_column(t){const e=this.data[t];return null!=e?e:[]}get_length(){var t;return null!==(t=super.get_length())&&void 0!==t?t:0}initialize(){super.initialize(),this.setup()}load_data(t,e,a){const{adapter:n}=this;let s;switch(s=null!=n?n.execute(this,{response:t}):t,e){case\"replace\":this.data=s;break;case\"append\":{const t=this.data;for(const e of this.columns()){const n=Array.from(t[e]),r=Array.from(s[e]),i=n.concat(r);s[e]=null!=a?i.slice(-a):i}this.data=s;break}}}static init_WebDataSource(){this.define((({Any:t,Int:e,String:a,Nullable:n})=>({max_size:[n(e),null],mode:[i.UpdateMode,\"replace\"],adapter:[n(t),null],data_url:[a]})))}}a.WebDataSource=l,l.__name__=\"WebDataSource\",l.init_WebDataSource()},\n function _(t,e,i,s,a){s();const n=t(343),r=t(20),o=t(19),l=t(13);class d extends n.WebDataSource{constructor(t){super(t),this.interval=null,this.initialized=!1}static init_AjaxDataSource(){this.define((({Boolean:t,Int:e,String:i,Dict:s,Nullable:a})=>({polling_interval:[a(e),null],content_type:[i,\"application/json\"],http_headers:[s(i),{}],method:[r.HTTPMethod,\"POST\"],if_modified:[t,!1]})))}destroy(){null!=this.interval&&clearInterval(this.interval),super.destroy()}setup(){if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),null!=this.polling_interval)){const t=()=>this.get_data(this.mode,this.max_size,this.if_modified);this.interval=setInterval(t,this.polling_interval)}}get_data(t,e=null,i=!1){const s=this.prepare_request();s.addEventListener(\"load\",(()=>this.do_load(s,t,null!=e?e:void 0))),s.addEventListener(\"error\",(()=>this.do_error(s))),s.send()}prepare_request(){const t=new XMLHttpRequest;t.open(this.method,this.data_url,!0),t.withCredentials=!1,t.setRequestHeader(\"Content-Type\",this.content_type);const e=this.http_headers;for(const[i,s]of l.entries(e))t.setRequestHeader(i,s);return t}do_load(t,e,i){if(200===t.status){const s=JSON.parse(t.responseText);this.load_data(s,e,i)}}do_error(t){o.logger.error(`Failed to fetch JSON from ${this.data_url} with code ${t.status}`)}}i.AjaxDataSource=d,d.__name__=\"AjaxDataSource\",d.init_AjaxDataSource()},\n function _(e,t,o,r,n){r();const s=e(57),a=e(19),i=e(9),l=e(13);function c(e){return null!=e?e:NaN}const{hasOwnProperty:_}=Object.prototype;class g extends s.ColumnarDataSource{constructor(e){super(e)}static init_GeoJSONDataSource(){this.define((({String:e})=>({geojson:[e]}))),this.internal((({Dict:e,Arrayable:t})=>({data:[e(t),{}]})))}initialize(){super.initialize(),this._update_data()}connect_signals(){super.connect_signals(),this.connect(this.properties.geojson.change,(()=>this._update_data()))}_update_data(){this.data=this.geojson_to_column_data()}_get_new_list_array(e){return i.range(0,e).map((e=>[]))}_get_new_nan_array(e){return i.range(0,e).map((e=>NaN))}_add_properties(e,t,o,r){var n;const s=null!==(n=e.properties)&&void 0!==n?n:{};for(const[e,n]of l.entries(s))_.call(t,e)||(t[e]=this._get_new_nan_array(r)),t[e][o]=c(n)}_add_geometry(e,t,o){function r(e,t){return e.concat([[NaN,NaN,NaN]]).concat(t)}switch(e.type){case\"Point\":{const[r,n,s]=e.coordinates;t.x[o]=r,t.y[o]=n,t.z[o]=c(s);break}case\"LineString\":{const{coordinates:r}=e;for(let e=0;e1&&a.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\");const r=e.coordinates[0];for(let e=0;e1&&a.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),n.push(t[0]);const s=n.reduce(r);for(let e=0;e({use_latlon:[e,!1]})))}get_image_url(e,t,r){const i=this.string_lookup_replace(this.url,this.extra_url_vars);let o,l,n,s;return this.use_latlon?[l,s,o,n]=this.get_tile_geographic_bounds(e,t,r):[l,s,o,n]=this.get_tile_meter_bounds(e,t,r),i.replace(\"{XMIN}\",l.toString()).replace(\"{YMIN}\",s.toString()).replace(\"{XMAX}\",o.toString()).replace(\"{YMAX}\",n.toString())}}r.BBoxTileSource=n,n.__name__=\"BBoxTileSource\",n.init_BBoxTileSource()},\n function _(t,e,i,_,s){_();const r=t(349),o=t(9),n=t(350);class l extends r.TileSource{constructor(t){super(t)}static init_MercatorTileSource(){this.define((({Boolean:t})=>({snap_to_zoom:[t,!1],wrap_around:[t,!0]}))),this.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097})}initialize(){super.initialize(),this._resolutions=o.range(this.min_zoom,this.max_zoom+1).map((t=>this.get_resolution(t)))}_computed_initial_resolution(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size}is_valid_tile(t,e,i){return!(!this.wrap_around&&(t<0||t>=2**i))&&!(e<0||e>=2**i)}parent_by_tile_xyz(t,e,i){const _=this.tile_xyz_to_quadkey(t,e,i),s=_.substring(0,_.length-1);return this.quadkey_to_tile_xyz(s)}get_resolution(t){return this._computed_initial_resolution()/2**t}get_resolution_by_extent(t,e,i){return[(t[2]-t[0])/i,(t[3]-t[1])/e]}get_level_by_extent(t,e,i){const _=(t[2]-t[0])/i,s=(t[3]-t[1])/e,r=Math.max(_,s);let o=0;for(const t of this._resolutions){if(r>t){if(0==o)return 0;if(o>0)return o-1}o+=1}return o-1}get_closest_level_by_extent(t,e,i){const _=(t[2]-t[0])/i,s=(t[3]-t[1])/e,r=Math.max(_,s),o=this._resolutions.reduce((function(t,e){return Math.abs(e-r)e?(u=o-s,a*=t):(u*=e,a=n-r)}const h=(u-(o-s))/2,c=(a-(n-r))/2;return[s-h,r-c,o+h,n+c]}tms_to_wmts(t,e,i){return[t,2**i-1-e,i]}wmts_to_tms(t,e,i){return[t,2**i-1-e,i]}pixels_to_meters(t,e,i){const _=this.get_resolution(i);return[t*_-this.x_origin_offset,e*_-this.y_origin_offset]}meters_to_pixels(t,e,i){const _=this.get_resolution(i);return[(t+this.x_origin_offset)/_,(e+this.y_origin_offset)/_]}pixels_to_tile(t,e){let i=Math.ceil(t/this.tile_size);i=0===i?i:i-1;return[i,Math.max(Math.ceil(e/this.tile_size)-1,0)]}pixels_to_raster(t,e,i){return[t,(this.tile_size<=l;t--)for(let i=n;i<=u;i++)this.is_valid_tile(i,t,e)&&h.push([i,t,e,this.get_tile_meter_bounds(i,t,e)]);return this.sort_tiles_from_center(h,[n,l,u,a]),h}quadkey_to_tile_xyz(t){let e=0,i=0;const _=t.length;for(let s=_;s>0;s--){const r=1<0;s--){const i=1<0;)if(s=s.substring(0,s.length-1),[t,e,i]=this.quadkey_to_tile_xyz(s),[t,e,i]=this.denormalize_xyz(t,e,i,_),this.tiles.has(this.tile_xyz_to_key(t,e,i)))return[t,e,i];return[0,0,0]}normalize_xyz(t,e,i){if(this.wrap_around){const _=2**i;return[(t%_+_)%_,e,i]}return[t,e,i]}denormalize_xyz(t,e,i,_){return[t+_*2**i,e,i]}denormalize_meters(t,e,i,_){return[t+2*_*Math.PI*6378137,e]}calculate_world_x_by_tile_xyz(t,e,i){return Math.floor(t/2**i)}}i.MercatorTileSource=l,l.__name__=\"MercatorTileSource\",l.init_MercatorTileSource()},\n function _(e,t,r,i,n){i();const l=e(53),s=e(13);class a extends l.Model{constructor(e){super(e)}static init_TileSource(){this.define((({Number:e,String:t,Dict:r,Nullable:i})=>({url:[t,\"\"],tile_size:[e,256],max_zoom:[e,30],min_zoom:[e,0],extra_url_vars:[r(t),{}],attribution:[t,\"\"],x_origin_offset:[e],y_origin_offset:[e],initial_resolution:[i(e),null]})))}initialize(){super.initialize(),this.tiles=new Map,this._normalize_case()}connect_signals(){super.connect_signals(),this.connect(this.change,(()=>this._clear_cache()))}string_lookup_replace(e,t){let r=e;for(const[e,i]of s.entries(t))r=r.replace(`{${e}}`,i);return r}_normalize_case(){const e=this.url.replace(\"{x}\",\"{X}\").replace(\"{y}\",\"{Y}\").replace(\"{z}\",\"{Z}\").replace(\"{q}\",\"{Q}\").replace(\"{xmin}\",\"{XMIN}\").replace(\"{ymin}\",\"{YMIN}\").replace(\"{xmax}\",\"{XMAX}\").replace(\"{ymax}\",\"{YMAX}\");this.url=e}_clear_cache(){this.tiles=new Map}tile_xyz_to_key(e,t,r){return`${e}:${t}:${r}`}key_to_tile_xyz(e){const[t,r,i]=e.split(\":\").map((e=>parseInt(e)));return[t,r,i]}sort_tiles_from_center(e,t){const[r,i,n,l]=t,s=(n-r)/2+r,a=(l-i)/2+i;e.sort((function(e,t){return Math.sqrt((s-e[0])**2+(a-e[1])**2)-Math.sqrt((s-t[0])**2+(a-t[1])**2)}))}get_image_url(e,t,r){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",t.toString()).replace(\"{Z}\",r.toString())}}r.TileSource=a,a.__name__=\"TileSource\",a.init_TileSource()},\n function _(t,e,r,n,o){n();const c=t(65);function _(t,e){return c.wgs84_mercator.compute(t,e)}function g(t,e){return c.wgs84_mercator.invert(t,e)}r.geographic_to_meters=_,r.meters_to_geographic=g,r.geographic_extent_to_meters=function(t){const[e,r,n,o]=t,[c,g]=_(e,r),[i,u]=_(n,o);return[c,g,i,u]},r.meters_extent_to_geographic=function(t){const[e,r,n,o]=t,[c,_]=g(e,r),[i,u]=g(n,o);return[c,_,i,u]}},\n function _(e,t,r,s,_){s();const o=e(348);class c extends o.MercatorTileSource{constructor(e){super(e)}get_image_url(e,t,r){const s=this.string_lookup_replace(this.url,this.extra_url_vars),[_,o,c]=this.tms_to_wmts(e,t,r),i=this.tile_xyz_to_quadkey(_,o,c);return s.replace(\"{Q}\",i)}}r.QUADKEYTileSource=c,c.__name__=\"QUADKEYTileSource\"},\n function _(t,e,i,s,_){s();const n=t(1),a=t(349),h=t(353),r=t(41),o=t(156),l=t(43),d=t(296),m=t(9),c=t(8),g=n.__importStar(t(354));class p extends r.RendererView{initialize(){this._tiles=[],super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.tile_source.change,(()=>this.request_render()))}styles(){return[...super.styles(),g.default]}get_extent(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]}get map_plot(){return this.plot_model}get map_canvas(){return this.layer.ctx}get map_frame(){return this.plot_view.frame}get x_range(){return this.map_plot.x_range}get y_range(){return this.map_plot.y_range}_set_data(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0}_update_attribution(){null!=this.attribution_el&&l.removeElement(this.attribution_el);const{attribution:t}=this.model.tile_source;if(c.isString(t)&&t.length>0){const{layout:e,frame:i}=this.plot_view,s=e.bbox.width-i.bbox.right,_=e.bbox.height-i.bbox.bottom,n=i.bbox.width;this.attribution_el=l.div({class:g.tile_attribution,style:{position:\"absolute\",right:`${s}px`,bottom:`${_}px`,\"max-width\":n-4+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.5)\",\"font-size\":\"9px\",\"line-height\":\"1.05\",\"white-space\":\"nowrap\",overflow:\"hidden\",\"text-overflow\":\"ellipsis\"}}),this.plot_view.canvas_view.add_event(this.attribution_el),this.attribution_el.innerHTML=t,this.attribution_el.title=this.attribution_el.textContent.replace(/\\s*\\n\\s*/g,\" \")}}_map_data(){this.initial_extent=this.get_extent();const t=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width),e=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width,t);this.x_range.start=e[0],this.y_range.start=e[1],this.x_range.end=e[2],this.y_range.end=e[3],this.x_range instanceof o.Range1d&&(this.x_range.reset_start=e[0],this.x_range.reset_end=e[2]),this.y_range instanceof o.Range1d&&(this.y_range.reset_start=e[1],this.y_range.reset_end=e[3]),this._update_attribution()}_create_tile(t,e,i,s,_=!1){const[n,a,h]=this.model.tile_source.normalize_xyz(t,e,i),r={img:void 0,tile_coords:[t,e,i],normalized_coords:[n,a,h],quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,i),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,i),bounds:s,loaded:!1,finished:!1,x_coord:s[0],y_coord:s[3]},o=this.model.tile_source.get_image_url(n,a,h);new d.ImageLoader(o,{loaded:t=>{Object.assign(r,{img:t,loaded:!0}),_?(r.finished=!0,this.notify_finished()):this.request_render()},failed(){r.finished=!0}}),this.model.tile_source.tiles.set(r.cache_key,r),this._tiles.push(r)}_enforce_aspect_ratio(){if(this._last_height!==this.map_frame.bbox.height||this._last_width!==this.map_frame.bbox.width){const t=this.get_extent(),e=this.model.tile_source.get_level_by_extent(t,this.map_frame.bbox.height,this.map_frame.bbox.width),i=this.model.tile_source.snap_to_zoom_level(t,this.map_frame.bbox.height,this.map_frame.bbox.width,e);this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame.bbox.height,this._last_width=this.map_frame.bbox.width}}has_finished(){if(!super.has_finished())return!1;if(0===this._tiles.length)return!1;for(const t of this._tiles)if(!t.finished)return!1;return!0}_render(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()}_draw_tile(t){const e=this.model.tile_source.tiles.get(t);if(null!=e&&e.loaded){const[[t],[i]]=this.coordinates.map_to_screen([e.bounds[0]],[e.bounds[3]]),[[s],[_]]=this.coordinates.map_to_screen([e.bounds[2]],[e.bounds[1]]),n=s-t,a=_-i,h=t,r=i,o=this.map_canvas.getImageSmoothingEnabled();this.map_canvas.setImageSmoothingEnabled(this.model.smoothing),this.map_canvas.drawImage(e.img,h,r,n,a),this.map_canvas.setImageSmoothingEnabled(o),e.finished=!0}}_set_rect(){const t=this.plot_model.outline_line_width,e=this.map_frame.bbox.left+t/2,i=this.map_frame.bbox.top+t/2,s=this.map_frame.bbox.width-t,_=this.map_frame.bbox.height-t;this.map_canvas.rect(e,i,s,_),this.map_canvas.clip()}_render_tiles(t){this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha;for(const e of t)this._draw_tile(e);this.map_canvas.restore()}_prefetch_tiles(){const{tile_source:t}=this.model,e=this.get_extent(),i=this.map_frame.bbox.height,s=this.map_frame.bbox.width,_=this.model.tile_source.get_level_by_extent(e,i,s),n=this.model.tile_source.get_tiles_by_extent(e,_);for(let e=0,i=Math.min(10,n.length);ei&&(s=this.extent,h=i,r=!0),r&&(this.x_range.setv({x_range:{start:s[0],end:s[2]}}),this.y_range.setv({start:s[1],end:s[3]})),this.extent=s;const o=t.get_tiles_by_extent(s,h),l=[],d=[],c=[],g=[];for(const e of o){const[i,s,n]=e,a=t.tile_xyz_to_key(i,s,n),h=t.tiles.get(a);if(null!=h&&h.loaded)d.push(a);else if(this.model.render_parents){const[e,a,h]=t.get_closest_parent_by_tile_xyz(i,s,n),r=t.tile_xyz_to_key(e,a,h),o=t.tiles.get(r);if(null!=o&&o.loaded&&!m.includes(c,r)&&c.push(r),_){const e=t.children_by_tile_xyz(i,s,n);for(const[i,s,_]of e){const e=t.tile_xyz_to_key(i,s,_);t.tiles.has(e)&&g.push(e)}}}null==h&&l.push(e)}this._render_tiles(c),this._render_tiles(g),this._render_tiles(d),null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout((()=>this._fetch_tiles(l)),65)}}i.TileRendererView=p,p.__name__=\"TileRendererView\";class u extends r.Renderer{constructor(t){super(t)}static init_TileRenderer(){this.prototype.default_view=p,this.define((({Boolean:t,Number:e,Ref:i})=>({alpha:[e,1],smoothing:[t,!0],tile_source:[i(a.TileSource),()=>new h.WMTSTileSource],render_parents:[t,!0]}))),this.override({level:\"image\"})}}i.TileRenderer=u,u.__name__=\"TileRenderer\",u.init_TileRenderer()},\n function _(t,e,r,o,s){o();const c=t(348);class i extends c.MercatorTileSource{constructor(t){super(t)}get_image_url(t,e,r){const o=this.string_lookup_replace(this.url,this.extra_url_vars),[s,c,i]=this.tms_to_wmts(t,e,r);return o.replace(\"{X}\",s.toString()).replace(\"{Y}\",c.toString()).replace(\"{Z}\",i.toString())}}r.WMTSTileSource=i,i.__name__=\"WMTSTileSource\"},\n function _(t,o,i,b,r){b(),i.root=\"bk-root\",i.tile_attribution=\"bk-tile-attribution\",i.default=\".bk-root .bk-tile-attribution a{color:black;}\"},\n function _(e,r,t,c,o){c();const i=e(348);class l extends i.MercatorTileSource{constructor(e){super(e)}get_image_url(e,r,t){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",r.toString()).replace(\"{Z}\",t.toString())}}t.TMSTileSource=l,l.__name__=\"TMSTileSource\"},\n function _(e,t,u,a,r){a(),r(\"CanvasTexture\",e(357).CanvasTexture),r(\"ImageURLTexture\",e(359).ImageURLTexture),r(\"Texture\",e(358).Texture)},\n function _(t,e,n,c,s){c();const a=t(358),i=t(34);class r extends a.Texture{constructor(t){super(t)}static init_CanvasTexture(){this.define((({String:t})=>({code:[t]})))}get func(){const t=i.use_strict(this.code);return new Function(\"ctx\",\"color\",\"scale\",\"weight\",t)}get_pattern(t,e,n){const c=document.createElement(\"canvas\");c.width=e,c.height=e;const s=c.getContext(\"2d\");return this.func.call(this,s,t,e,n),c}}n.CanvasTexture=r,r.__name__=\"CanvasTexture\",r.init_CanvasTexture()},\n function _(e,t,i,n,r){n();const s=e(53),u=e(20);class o extends s.Model{constructor(e){super(e)}static init_Texture(){this.define((()=>({repetition:[u.TextureRepetition,\"repeat\"]})))}}i.Texture=o,o.__name__=\"Texture\",o.init_Texture()},\n function _(e,t,i,r,n){r();const a=e(358),s=e(296);class u extends a.Texture{constructor(e){super(e)}static init_ImageURLTexture(){this.define((({String:e})=>({url:[e]})))}initialize(){super.initialize(),this._loader=new s.ImageLoader(this.url)}get_pattern(e,t,i){const{_loader:r}=this;return this._loader.finished?r.image:r.promise}}i.ImageURLTexture=u,u.__name__=\"ImageURLTexture\",u.init_ImageURLTexture()},\n function _(o,l,T,e,t){e(),t(\"ActionTool\",o(251).ActionTool),t(\"CustomAction\",o(361).CustomAction),t(\"HelpTool\",o(252).HelpTool),t(\"RedoTool\",o(362).RedoTool),t(\"ResetTool\",o(363).ResetTool),t(\"SaveTool\",o(364).SaveTool),t(\"UndoTool\",o(365).UndoTool),t(\"ZoomInTool\",o(366).ZoomInTool),t(\"ZoomOutTool\",o(369).ZoomOutTool),t(\"ButtonTool\",o(238).ButtonTool),t(\"EditTool\",o(370).EditTool),t(\"BoxEditTool\",o(371).BoxEditTool),t(\"FreehandDrawTool\",o(372).FreehandDrawTool),t(\"PointDrawTool\",o(373).PointDrawTool),t(\"PolyDrawTool\",o(374).PolyDrawTool),t(\"PolyTool\",o(375).PolyTool),t(\"PolyEditTool\",o(376).PolyEditTool),t(\"BoxSelectTool\",o(377).BoxSelectTool),t(\"BoxZoomTool\",o(379).BoxZoomTool),t(\"GestureTool\",o(237).GestureTool),t(\"LassoSelectTool\",o(380).LassoSelectTool),t(\"LineEditTool\",o(382).LineEditTool),t(\"PanTool\",o(384).PanTool),t(\"PolySelectTool\",o(381).PolySelectTool),t(\"RangeTool\",o(385).RangeTool),t(\"SelectTool\",o(378).SelectTool),t(\"TapTool\",o(386).TapTool),t(\"WheelPanTool\",o(387).WheelPanTool),t(\"WheelZoomTool\",o(388).WheelZoomTool),t(\"CrosshairTool\",o(389).CrosshairTool),t(\"CustomJSHover\",o(390).CustomJSHover),t(\"HoverTool\",o(391).HoverTool),t(\"InspectTool\",o(247).InspectTool),t(\"Tool\",o(236).Tool),t(\"ToolProxy\",o(392).ToolProxy),t(\"Toolbar\",o(235).Toolbar),t(\"ToolbarBase\",o(248).ToolbarBase),t(\"ProxyToolbar\",o(393).ProxyToolbar),t(\"ToolbarBox\",o(393).ToolbarBox)},\n function _(t,o,i,s,n){s();const e=t(251);class c extends e.ActionToolButtonView{css_classes(){return super.css_classes().concat(\"bk-toolbar-button-custom-action\")}}i.CustomActionButtonView=c,c.__name__=\"CustomActionButtonView\";class u extends e.ActionToolView{doit(){var t;null===(t=this.model.callback)||void 0===t||t.execute(this.model)}}i.CustomActionView=u,u.__name__=\"CustomActionView\";class l extends e.ActionTool{constructor(t){super(t),this.tool_name=\"Custom Action\",this.button_view=c}static init_CustomAction(){this.prototype.default_view=u,this.define((({Any:t,String:o,Nullable:i})=>({callback:[i(t)],icon:[o]}))),this.override({description:\"Perform a Custom Action\"})}}i.CustomAction=l,l.__name__=\"CustomAction\",l.init_CustomAction()},\n function _(o,e,t,i,s){i();const n=o(251),d=o(242);class l extends n.ActionToolView{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state.changed,(()=>this.model.disabled=!this.plot_view.state.can_redo))}doit(){this.plot_view.state.redo()}}t.RedoToolView=l,l.__name__=\"RedoToolView\";class _ extends n.ActionTool{constructor(o){super(o),this.tool_name=\"Redo\",this.icon=d.tool_icon_redo}static init_RedoTool(){this.prototype.default_view=l,this.override({disabled:!0}),this.register_alias(\"redo\",(()=>new _))}}t.RedoTool=_,_.__name__=\"RedoTool\",_.init_RedoTool()},\n function _(e,t,o,s,i){s();const _=e(251),n=e(242);class l extends _.ActionToolView{doit(){this.plot_view.reset()}}o.ResetToolView=l,l.__name__=\"ResetToolView\";class c extends _.ActionTool{constructor(e){super(e),this.tool_name=\"Reset\",this.icon=n.tool_icon_reset}static init_ResetTool(){this.prototype.default_view=l,this.register_alias(\"reset\",(()=>new c))}}o.ResetTool=c,c.__name__=\"ResetTool\",c.init_ResetTool()},\n function _(o,e,t,a,i){a();const n=o(251),s=o(242);class c extends n.ActionToolView{async copy(){const o=await this.plot_view.to_blob(),e=new ClipboardItem({[o.type]:o});await navigator.clipboard.write([e])}async save(o){const e=await this.plot_view.to_blob(),t=document.createElement(\"a\");t.href=URL.createObjectURL(e),t.download=o,t.target=\"_blank\",t.dispatchEvent(new MouseEvent(\"click\"))}doit(o=\"save\"){switch(o){case\"save\":this.save(\"bokeh_plot\");break;case\"copy\":this.copy()}}}t.SaveToolView=c,c.__name__=\"SaveToolView\";class l extends n.ActionTool{constructor(o){super(o),this.tool_name=\"Save\",this.icon=s.tool_icon_save}static init_SaveTool(){this.prototype.default_view=c,this.register_alias(\"save\",(()=>new l))}get menu(){return[{icon:\"bk-tool-icon-copy-to-clipboard\",tooltip:\"Copy image to clipboard\",if:()=>\"undefined\"!=typeof ClipboardItem,handler:()=>{this.do.emit(\"copy\")}}]}}t.SaveTool=l,l.__name__=\"SaveTool\",l.init_SaveTool()},\n function _(o,t,n,i,e){i();const s=o(251),d=o(242);class l extends s.ActionToolView{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state.changed,(()=>this.model.disabled=!this.plot_view.state.can_undo))}doit(){this.plot_view.state.undo()}}n.UndoToolView=l,l.__name__=\"UndoToolView\";class _ extends s.ActionTool{constructor(o){super(o),this.tool_name=\"Undo\",this.icon=d.tool_icon_undo}static init_UndoTool(){this.prototype.default_view=l,this.override({disabled:!0}),this.register_alias(\"undo\",(()=>new _))}}n.UndoTool=_,_.__name__=\"UndoTool\",_.init_UndoTool()},\n function _(o,i,n,s,e){s();const t=o(367),_=o(242);class m extends t.ZoomBaseToolView{}n.ZoomInToolView=m,m.__name__=\"ZoomInToolView\";class l extends t.ZoomBaseTool{constructor(o){super(o),this.sign=1,this.tool_name=\"Zoom In\",this.icon=_.tool_icon_zoom_in}static init_ZoomInTool(){this.prototype.default_view=m,this.register_alias(\"zoom_in\",(()=>new l({dimensions:\"both\"}))),this.register_alias(\"xzoom_in\",(()=>new l({dimensions:\"width\"}))),this.register_alias(\"yzoom_in\",(()=>new l({dimensions:\"height\"})))}}n.ZoomInTool=l,l.__name__=\"ZoomInTool\",l.init_ZoomInTool()},\n function _(o,t,e,i,s){i();const n=o(251),l=o(20),a=o(368);class _ extends n.ActionToolView{doit(){var o;const t=this.plot_view.frame,e=this.model.dimensions,i=\"width\"==e||\"both\"==e,s=\"height\"==e||\"both\"==e,n=a.scale_range(t,this.model.sign*this.model.factor,i,s);this.plot_view.state.push(\"zoom_out\",{range:n}),this.plot_view.update_range(n,{scrolling:!0}),null===(o=this.model.document)||void 0===o||o.interactive_start(this.plot_model)}}e.ZoomBaseToolView=_,_.__name__=\"ZoomBaseToolView\";class m extends n.ActionTool{constructor(o){super(o)}static init_ZoomBaseTool(){this.define((({Percent:o})=>({factor:[o,.1],dimensions:[l.Dimensions,\"both\"]})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}e.ZoomBaseTool=m,m.__name__=\"ZoomBaseTool\",m.init_ZoomBaseTool()},\n function _(n,t,o,r,s){r();const c=n(10);function e(n,t,o){const[r,s]=[n.start,n.end],c=null!=o?o:(s+r)/2;return[r-(r-c)*t,s-(s-c)*t]}function a(n,[t,o]){const r=new Map;for(const[s,c]of n){const[n,e]=c.r_invert(t,o);r.set(s,{start:n,end:e})}return r}o.scale_highlow=e,o.get_info=a,o.scale_range=function(n,t,o=!0,r=!0,s){t=c.clamp(t,-.9,.9);const l=o?t:0,[u,i]=e(n.bbox.h_range,l,null!=s?s.x:void 0),_=a(n.x_scales,[u,i]),f=r?t:0,[g,x]=e(n.bbox.v_range,f,null!=s?s.y:void 0);return{xrs:_,yrs:a(n.y_scales,[g,x]),factor:t}}},\n function _(o,t,i,s,e){s();const n=o(367),_=o(242);class m extends n.ZoomBaseToolView{}i.ZoomOutToolView=m,m.__name__=\"ZoomOutToolView\";class l extends n.ZoomBaseTool{constructor(o){super(o),this.sign=-1,this.tool_name=\"Zoom Out\",this.icon=_.tool_icon_zoom_out}static init_ZoomOutTool(){this.prototype.default_view=m,this.register_alias(\"zoom_out\",(()=>new l({dimensions:\"both\"}))),this.register_alias(\"xzoom_out\",(()=>new l({dimensions:\"width\"}))),this.register_alias(\"yzoom_out\",(()=>new l({dimensions:\"height\"})))}}i.ZoomOutTool=l,l.__name__=\"ZoomOutTool\",l.init_ZoomOutTool()},\n function _(e,t,s,o,n){o();const i=e(9),r=e(8),c=e(11),_=e(61),a=e(237);class l extends a.GestureToolView{constructor(){super(...arguments),this._mouse_in_frame=!0}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void c.unreachable():\"replace\"}_move_enter(e){this._mouse_in_frame=!0}_move_exit(e){this._mouse_in_frame=!1}_map_drag(e,t,s){if(!this.plot_view.frame.bbox.contains(e,t))return null;const o=this.plot_view.renderer_view(s);if(null==o)return null;return[o.coordinates.x_scale.invert(e),o.coordinates.y_scale.invert(t)]}_delete_selected(e){const t=e.data_source,s=t.selected.indices;s.sort();for(const e of t.columns()){const o=t.get_array(e);for(let e=0;e({custom_icon:[t],empty_value:[e],renderers:[s(o(_.GlyphRenderer)),[]]})))}get computed_icon(){var e;return null!==(e=this.custom_icon)&&void 0!==e?e:this.icon}}s.EditTool=d,d.__name__=\"EditTool\",d.init_EditTool()},\n function _(e,t,s,i,_){i();const o=e(43),n=e(20),a=e(370),d=e(242);class l extends a.EditToolView{_tap(e){null==this._draw_basepoint&&null==this._basepoint&&this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)if(e.keyCode===o.Keys.Backspace)this._delete_selected(t);else if(e.keyCode==o.Keys.Esc){t.data_source.selection_manager.clear()}}_set_extent([e,t],[s,i],_,o=!1){const n=this.model.renderers[0],a=this.plot_view.renderer_view(n);if(null==a)return;const d=n.glyph,l=n.data_source,[r,h]=a.coordinates.x_scale.r_invert(e,t),[p,u]=a.coordinates.y_scale.r_invert(s,i),[c,m]=[(r+h)/2,(p+u)/2],[f,b]=[h-r,u-p],[x,y]=[d.x.field,d.y.field],[w,v]=[d.width.field,d.height.field];if(_)this._pop_glyphs(l,this.model.num_objects),x&&l.get_array(x).push(c),y&&l.get_array(y).push(m),w&&l.get_array(w).push(f),v&&l.get_array(v).push(b),this._pad_empty_columns(l,[x,y,w,v]);else{const e=l.data[x].length-1;x&&(l.data[x][e]=c),y&&(l.data[y][e]=m),w&&(l.data[w][e]=f),v&&(l.data[v][e]=b)}this._emit_cds_changes(l,!0,!1,o)}_update_box(e,t=!1,s=!1){if(null==this._draw_basepoint)return;const i=[e.sx,e.sy],_=this.plot_view.frame,o=this.model.dimensions,n=this.model._get_dim_limits(this._draw_basepoint,i,_,o);if(null!=n){const[e,i]=n;this._set_extent(e,i,t,s)}}_doubletap(e){this.model.active&&(null!=this._draw_basepoint?(this._update_box(e,!1,!0),this._draw_basepoint=null):(this._draw_basepoint=[e.sx,e.sy],this._select_event(e,\"append\",this.model.renderers),this._update_box(e,!0,!1)))}_move(e){this._update_box(e,!1,!1)}_pan_start(e){if(e.shiftKey){if(null!=this._draw_basepoint)return;this._draw_basepoint=[e.sx,e.sy],this._update_box(e,!0,!1)}else{if(null!=this._basepoint)return;this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy]}}_pan(e,t=!1,s=!1){if(e.shiftKey){if(null==this._draw_basepoint)return;this._update_box(e,t,s)}else{if(null==this._basepoint)return;this._drag_points(e,this.model.renderers)}}_pan_end(e){if(this._pan(e,!1,!0),e.shiftKey)this._draw_basepoint=null;else{this._basepoint=null;for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0)}}}s.BoxEditToolView=l,l.__name__=\"BoxEditToolView\";class r extends a.EditTool{constructor(e){super(e),this.tool_name=\"Box Edit Tool\",this.icon=d.tool_icon_box_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=1}static init_BoxEditTool(){this.prototype.default_view=l,this.define((({Int:e})=>({dimensions:[n.Dimensions,\"both\"],num_objects:[e,0]})))}}s.BoxEditTool=r,r.__name__=\"BoxEditTool\",r.init_BoxEditTool()},\n function _(e,t,a,s,r){s();const o=e(43),_=e(8),i=e(370),d=e(242);class n extends i.EditToolView{_draw(e,t,a=!1){if(!this.model.active)return;const s=this.model.renderers[0],r=this._map_drag(e.sx,e.sy,s);if(null==r)return;const[o,i]=r,d=s.data_source,n=s.glyph,[h,l]=[n.xs.field,n.ys.field];if(\"new\"==t)this._pop_glyphs(d,this.model.num_objects),h&&d.get_array(h).push([o]),l&&d.get_array(l).push([i]),this._pad_empty_columns(d,[h,l]);else if(\"add\"==t){if(h){const e=d.data[h].length-1;let t=d.get_array(h)[e];_.isArray(t)||(t=Array.from(t),d.data[h][e]=t),t.push(o)}if(l){const e=d.data[l].length-1;let t=d.get_array(l)[e];_.isArray(t)||(t=Array.from(t),d.data[l][e]=t),t.push(i)}}this._emit_cds_changes(d,!0,!0,a)}_pan_start(e){this._draw(e,\"new\")}_pan(e){this._draw(e,\"add\")}_pan_end(e){this._draw(e,\"add\",!0)}_tap(e){this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===o.Keys.Esc?t.data_source.selection_manager.clear():e.keyCode===o.Keys.Backspace&&this._delete_selected(t)}}a.FreehandDrawToolView=n,n.__name__=\"FreehandDrawToolView\";class h extends i.EditTool{constructor(e){super(e),this.tool_name=\"Freehand Draw Tool\",this.icon=d.tool_icon_freehand_draw,this.event_type=[\"pan\",\"tap\"],this.default_order=3}static init_FreehandDrawTool(){this.prototype.default_view=n,this.define((({Int:e})=>({num_objects:[e,0]})))}}a.FreehandDrawTool=h,h.__name__=\"FreehandDrawTool\",h.init_FreehandDrawTool()},\n function _(e,t,s,o,i){o();const a=e(43),n=e(370),_=e(242);class r extends n.EditToolView{_tap(e){if(this._select_event(e,this._select_mode(e),this.model.renderers).length||!this.model.add)return;const t=this.model.renderers[0],s=this._map_drag(e.sx,e.sy,t);if(null==s)return;const o=t.glyph,i=t.data_source,[a,n]=[o.x.field,o.y.field],[_,r]=s;this._pop_glyphs(i,this.model.num_objects),a&&i.get_array(a).push(_),n&&i.get_array(n).push(r),this._pad_empty_columns(i,[a,n]),i.change.emit(),i.data=i.data,i.properties.data.change.emit()}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===a.Keys.Backspace?this._delete_selected(t):e.keyCode==a.Keys.Esc&&t.data_source.selection_manager.clear()}_pan_start(e){this.model.drag&&(this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){this.model.drag&&null!=this._basepoint&&this._drag_points(e,this.model.renderers)}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0);this._basepoint=null}}}s.PointDrawToolView=r,r.__name__=\"PointDrawToolView\";class d extends n.EditTool{constructor(e){super(e),this.tool_name=\"Point Draw Tool\",this.icon=_.tool_icon_point_draw,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=2}static init_PointDrawTool(){this.prototype.default_view=r,this.define((({Boolean:e,Int:t})=>({add:[e,!0],drag:[e,!0],num_objects:[t,0]})))}}s.PointDrawTool=d,d.__name__=\"PointDrawTool\",d.init_PointDrawTool()},\n function _(e,t,s,i,a){i();const o=e(43),r=e(8),n=e(375),_=e(242);class d extends n.PolyToolView{constructor(){super(...arguments),this._drawing=!1,this._initialized=!1}_tap(e){this._drawing?this._draw(e,\"add\",!0):this._select_event(e,this._select_mode(e),this.model.renderers)}_draw(e,t,s=!1){const i=this.model.renderers[0],a=this._map_drag(e.sx,e.sy,i);if(this._initialized||this.activate(),null==a)return;const[o,n]=this._snap_to_vertex(e,...a),_=i.data_source,d=i.glyph,[l,h]=[d.xs.field,d.ys.field];if(\"new\"==t)this._pop_glyphs(_,this.model.num_objects),l&&_.get_array(l).push([o,o]),h&&_.get_array(h).push([n,n]),this._pad_empty_columns(_,[l,h]);else if(\"edit\"==t){if(l){const e=_.data[l][_.data[l].length-1];e[e.length-1]=o}if(h){const e=_.data[h][_.data[h].length-1];e[e.length-1]=n}}else if(\"add\"==t){if(l){const e=_.data[l].length-1;let t=_.get_array(l)[e];const s=t[t.length-1];t[t.length-1]=o,r.isArray(t)||(t=Array.from(t),_.data[l][e]=t),t.push(s)}if(h){const e=_.data[h].length-1;let t=_.get_array(h)[e];const s=t[t.length-1];t[t.length-1]=n,r.isArray(t)||(t=Array.from(t),_.data[h][e]=t),t.push(s)}}this._emit_cds_changes(_,!0,!1,s)}_show_vertices(){if(!this.model.active)return;const e=[],t=[];for(let s=0;sthis._show_vertices()))}this._initialized=!0}}deactivate(){this._drawing&&(this._remove(),this._drawing=!1),this.model.vertex_renderer&&this._hide_vertices()}}s.PolyDrawToolView=d,d.__name__=\"PolyDrawToolView\";class l extends n.PolyTool{constructor(e){super(e),this.tool_name=\"Polygon Draw Tool\",this.icon=_.tool_icon_poly_draw,this.event_type=[\"pan\",\"tap\",\"move\"],this.default_order=3}static init_PolyDrawTool(){this.prototype.default_view=d,this.define((({Boolean:e,Int:t})=>({drag:[e,!0],num_objects:[t,0]})))}}s.PolyDrawTool=l,l.__name__=\"PolyDrawTool\",l.init_PolyDrawTool()},\n function _(e,t,r,o,s){o();const i=e(8),l=e(370);class _ extends l.EditToolView{_set_vertices(e,t){const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[s,l]=[r.x.field,r.y.field];s&&(i.isArray(e)?o.data[s]=e:r.x={value:e}),l&&(i.isArray(t)?o.data[l]=t:r.y={value:t}),this._emit_cds_changes(o,!0,!0,!1)}_hide_vertices(){this._set_vertices([],[])}_snap_to_vertex(e,t,r){if(this.model.vertex_renderer){const o=this._select_event(e,\"replace\",[this.model.vertex_renderer]),s=this.model.vertex_renderer.data_source,i=this.model.vertex_renderer.glyph,[l,_]=[i.x.field,i.y.field];if(o.length){const e=s.selected.indices[0];l&&(t=s.data[l][e]),_&&(r=s.data[_][e]),s.selection_manager.clear()}}return[t,r]}}r.PolyToolView=_,_.__name__=\"PolyToolView\";class d extends l.EditTool{constructor(e){super(e)}static init_PolyTool(){this.define((({AnyRef:e})=>({vertex_renderer:[e()]})))}}r.PolyTool=d,d.__name__=\"PolyTool\",d.init_PolyTool()},\n function _(e,t,s,r,i){r();const _=e(43),d=e(8),n=e(375),l=e(242);class a extends n.PolyToolView{constructor(){super(...arguments),this._drawing=!1,this._cur_index=null}_doubletap(e){if(!this.model.active)return;const t=this._map_drag(e.sx,e.sy,this.model.vertex_renderer);if(null==t)return;const[s,r]=t,i=this._select_event(e,\"replace\",[this.model.vertex_renderer]),_=this.model.vertex_renderer.data_source,d=this.model.vertex_renderer.glyph,[n,l]=[d.x.field,d.y.field];if(i.length&&null!=this._selected_renderer){const e=_.selected.indices[0];this._drawing?(this._drawing=!1,_.selection_manager.clear()):(_.selected.indices=[e+1],n&&_.get_array(n).splice(e+1,0,s),l&&_.get_array(l).splice(e+1,0,r),this._drawing=!0),_.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}else this._show_vertices(e)}_show_vertices(e){if(!this.model.active)return;const t=this.model.renderers[0],s=()=>this._update_vertices(t),r=null==t?void 0:t.data_source,i=this._select_event(e,\"replace\",this.model.renderers);if(!i.length)return this._set_vertices([],[]),this._selected_renderer=null,this._drawing=!1,this._cur_index=null,void(null!=r&&r.disconnect(r.properties.data.change,s));null!=r&&r.connect(r.properties.data.change,s),this._cur_index=i[0].data_source.selected.indices[0],this._update_vertices(i[0])}_update_vertices(e){const t=e.glyph,s=e.data_source,r=this._cur_index,[i,_]=[t.xs.field,t.ys.field];if(this._drawing)return;if(null==r&&(i||_))return;let n,l;i&&null!=r?(n=s.data[i][r],d.isArray(n)||(s.data[i][r]=n=Array.from(n))):n=t.xs.value,_&&null!=r?(l=s.data[_][r],d.isArray(l)||(s.data[_][r]=l=Array.from(l))):l=t.ys.value,this._selected_renderer=e,this._set_vertices(n,l)}_move(e){if(this._drawing&&null!=this._selected_renderer){const t=this.model.vertex_renderer,s=t.data_source,r=t.glyph,i=this._map_drag(e.sx,e.sy,t);if(null==i)return;let[_,d]=i;const n=s.selected.indices;[_,d]=this._snap_to_vertex(e,_,d),s.selected.indices=n;const[l,a]=[r.x.field,r.y.field],c=n[0];l&&(s.data[l][c]=_),a&&(s.data[a][c]=d),s.change.emit(),this._selected_renderer.data_source.change.emit()}}_tap(e){const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null==s)return;if(this._drawing&&this._selected_renderer){let[r,i]=s;const _=t.data_source,d=t.glyph,[n,l]=[d.x.field,d.y.field],a=_.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const c=a[0];if(_.selected.indices=[c+1],n){const e=_.get_array(n),t=e[c];e[c]=r,e.splice(c+1,0,t)}if(l){const e=_.get_array(l),t=e[c];e[c]=i,e.splice(c+1,0,t)}return _.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}const r=this._select_mode(e);this._select_event(e,r,[t]),this._select_event(e,r,this.model.renderers)}_remove_vertex(){if(!this._drawing||!this._selected_renderer)return;const e=this.model.vertex_renderer,t=e.data_source,s=e.glyph,r=t.selected.indices[0],[i,_]=[s.x.field,s.y.field];i&&t.get_array(i).splice(r,1),_&&t.get_array(_).splice(r,1),t.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}_pan_start(e){this._select_event(e,\"append\",[this.model.vertex_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}_keyup(e){if(!this.model.active||!this._mouse_in_frame)return;let t;t=this._selected_renderer?[this.model.vertex_renderer]:this.model.renderers;for(const s of t)e.keyCode===_.Keys.Backspace?(this._delete_selected(s),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source)):e.keyCode==_.Keys.Esc&&(this._drawing?(this._remove_vertex(),this._drawing=!1):this._selected_renderer&&this._hide_vertices(),s.data_source.selection_manager.clear())}deactivate(){this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._hide_vertices())}}s.PolyEditToolView=a,a.__name__=\"PolyEditToolView\";class c extends n.PolyTool{constructor(e){super(e),this.tool_name=\"Poly Edit Tool\",this.icon=l.tool_icon_poly_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=4}static init_PolyEditTool(){this.prototype.default_view=a}}s.PolyEditTool=c,c.__name__=\"PolyEditTool\",c.init_PolyEditTool()},\n function _(e,t,o,s,i){s();const l=e(378),n=e(136),_=e(20),c=e(242);class h extends l.SelectToolView{_compute_limits(e){const t=this.plot_view.frame,o=this.model.dimensions;let s=this._base_point;if(\"center\"==this.model.origin){const[t,o]=s,[i,l]=e;s=[t-(i-t),o-(l-o)]}return this.model._get_dim_limits(s,e,t,o)}_pan_start(e){const{sx:t,sy:o}=e;this._base_point=[t,o]}_pan(e){const{sx:t,sy:o}=e,s=[t,o],[i,l]=this._compute_limits(s);this.model.overlay.update({left:i[0],right:i[1],top:l[0],bottom:l[1]}),this.model.select_every_mousemove&&this._do_select(i,l,!1,this._select_mode(e))}_pan_end(e){const{sx:t,sy:o}=e,s=[t,o],[i,l]=this._compute_limits(s);this._do_select(i,l,!0,this._select_mode(e)),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null,this.plot_view.state.push(\"box_select\",{selection:this.plot_view.get_selection()})}_do_select([e,t],[o,s],i,l=\"replace\"){const n={type:\"rect\",sx0:e,sx1:t,sy0:o,sy1:s};this._select(n,i,l)}}o.BoxSelectToolView=h,h.__name__=\"BoxSelectToolView\";const r=()=>new n.BoxAnnotation({level:\"overlay\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class a extends l.SelectTool{constructor(e){super(e),this.tool_name=\"Box Select\",this.icon=c.tool_icon_box_select,this.event_type=\"pan\",this.default_order=30}static init_BoxSelectTool(){this.prototype.default_view=h,this.define((({Boolean:e,Ref:t})=>({dimensions:[_.Dimensions,\"both\"],select_every_mousemove:[e,!1],overlay:[t(n.BoxAnnotation),r],origin:[_.BoxOrigin,\"corner\"]}))),this.register_alias(\"box_select\",(()=>new a)),this.register_alias(\"xbox_select\",(()=>new a({dimensions:\"width\"}))),this.register_alias(\"ybox_select\",(()=>new a({dimensions:\"height\"})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}o.BoxSelectTool=a,a.__name__=\"BoxSelectTool\",a.init_BoxSelectTool()},\n function _(e,t,s,n,o){n();const r=e(237),c=e(61),i=e(123),l=e(62),a=e(161),_=e(20),d=e(43),h=e(264),p=e(15),u=e(11);class m extends r.GestureToolView{connect_signals(){super.connect_signals(),this.model.clear.connect((()=>this._clear()))}get computed_renderers(){const{renderers:e,names:t}=this.model,s=this.plot_model.data_renderers;return a.compute_renderers(e,s,t)}_computed_renderers_by_data_source(){var e;const t=new Map;for(const s of this.computed_renderers){let n;if(s instanceof c.GlyphRenderer)n=s.data_source;else{if(!(s instanceof i.GraphRenderer))continue;n=s.node_renderer.data_source}const o=null!==(e=t.get(n))&&void 0!==e?e:[];t.set(n,[...o,s])}return t}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void u.unreachable():this.model.mode}_keyup(e){e.keyCode==d.Keys.Esc&&this._clear()}_clear(){for(const e of this.computed_renderers)e.get_selection_manager().clear();const e=this.computed_renderers.map((e=>this.plot_view.renderer_view(e)));this.plot_view.request_paint(e)}_select(e,t,s){const n=this._computed_renderers_by_data_source();for(const[,o]of n){const n=o[0].get_selection_manager(),r=[];for(const e of o){const t=this.plot_view.renderer_view(e);null!=t&&r.push(t)}n.select(r,e,t,s)}null!=this.model.callback&&this._emit_callback(e),this._emit_selection_event(e,t)}_emit_selection_event(e,t=!0){const{x_scale:s,y_scale:n}=this.plot_view.frame;let o;switch(e.type){case\"point\":{const{sx:t,sy:r}=e,c=s.invert(t),i=n.invert(r);o=Object.assign(Object.assign({},e),{x:c,y:i});break}case\"span\":{const{sx:t,sy:r}=e,c=s.invert(t),i=n.invert(r);o=Object.assign(Object.assign({},e),{x:c,y:i});break}case\"rect\":{const{sx0:t,sx1:r,sy0:c,sy1:i}=e,[l,a]=s.r_invert(t,r),[_,d]=n.r_invert(c,i);o=Object.assign(Object.assign({},e),{x0:l,y0:_,x1:a,y1:d});break}case\"poly\":{const{sx:t,sy:r}=e,c=s.v_invert(t),i=n.v_invert(r);o=Object.assign(Object.assign({},e),{x:c,y:i});break}}this.plot_model.trigger_event(new h.SelectionGeometry(o,t))}}s.SelectToolView=m,m.__name__=\"SelectToolView\";class v extends r.GestureTool{constructor(e){super(e)}initialize(){super.initialize(),this.clear=new p.Signal0(this,\"clear\")}static init_SelectTool(){this.define((({String:e,Array:t,Ref:s,Or:n,Auto:o})=>({renderers:[n(t(s(l.DataRenderer)),o),\"auto\"],names:[t(e),[]],mode:[_.SelectionMode,\"replace\"]})))}get menu(){return[{icon:\"bk-tool-icon-replace-mode\",tooltip:\"Replace the current selection\",active:()=>\"replace\"==this.mode,handler:()=>{this.mode=\"replace\",this.active=!0}},{icon:\"bk-tool-icon-append-mode\",tooltip:\"Append to the current selection (Shift)\",active:()=>\"append\"==this.mode,handler:()=>{this.mode=\"append\",this.active=!0}},{icon:\"bk-tool-icon-intersect-mode\",tooltip:\"Intersect with the current selection (Ctrl)\",active:()=>\"intersect\"==this.mode,handler:()=>{this.mode=\"intersect\",this.active=!0}},{icon:\"bk-tool-icon-subtract-mode\",tooltip:\"Subtract from the current selection (Shift+Ctrl)\",active:()=>\"subtract\"==this.mode,handler:()=>{this.mode=\"subtract\",this.active=!0}},null,{icon:\"bk-tool-icon-clear-selection\",tooltip:\"Clear the current selection (Esc)\",handler:()=>{this.clear.emit()}}]}}s.SelectTool=v,v.__name__=\"SelectTool\",v.init_SelectTool()},\n function _(t,o,e,s,i){s();const n=t(237),_=t(136),a=t(20),l=t(242);class r extends n.GestureToolView{_match_aspect(t,o,e){const s=e.bbox.aspect,i=e.bbox.h_range.end,n=e.bbox.h_range.start,_=e.bbox.v_range.end,a=e.bbox.v_range.start;let l=Math.abs(t[0]-o[0]),r=Math.abs(t[1]-o[1]);const h=0==r?0:l/r,[c]=h>=s?[1,h/s]:[s/h,1];let m,p,d,b;return t[0]<=o[0]?(m=t[0],p=t[0]+l*c,p>i&&(p=i)):(p=t[0],m=t[0]-l*c,m_&&(d=_)):(d=t[1],b=t[1]-l/s,bnew _.BoxAnnotation({level:\"overlay\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class c extends n.GestureTool{constructor(t){super(t),this.tool_name=\"Box Zoom\",this.icon=l.tool_icon_box_zoom,this.event_type=\"pan\",this.default_order=20}static init_BoxZoomTool(){this.prototype.default_view=r,this.define((({Boolean:t,Ref:o})=>({dimensions:[a.Dimensions,\"both\"],overlay:[o(_.BoxAnnotation),h],match_aspect:[t,!1],origin:[a.BoxOrigin,\"corner\"]}))),this.register_alias(\"box_zoom\",(()=>new c({dimensions:\"both\"}))),this.register_alias(\"xbox_zoom\",(()=>new c({dimensions:\"width\"}))),this.register_alias(\"ybox_zoom\",(()=>new c({dimensions:\"height\"})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}e.BoxZoomTool=c,c.__name__=\"BoxZoomTool\",c.init_BoxZoomTool()},\n function _(s,e,t,o,i){o();const l=s(378),_=s(231),a=s(381),c=s(43),n=s(242);class h extends l.SelectToolView{constructor(){super(...arguments),this.sxs=[],this.sys=[]}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._active_change()))}_active_change(){this.model.active||this._clear_overlay()}_keyup(s){s.keyCode==c.Keys.Enter&&this._clear_overlay()}_pan_start(s){this.sxs=[],this.sys=[];const{sx:e,sy:t}=s;this._append_overlay(e,t)}_pan(s){const[e,t]=this.plot_view.frame.bbox.clip(s.sx,s.sy);this._append_overlay(e,t),this.model.select_every_mousemove&&this._do_select(this.sxs,this.sys,!1,this._select_mode(s))}_pan_end(s){const{sxs:e,sys:t}=this;this._clear_overlay(),this._do_select(e,t,!0,this._select_mode(s)),this.plot_view.state.push(\"lasso_select\",{selection:this.plot_view.get_selection()})}_append_overlay(s,e){const{sxs:t,sys:o}=this;t.push(s),o.push(e),this.model.overlay.update({xs:t,ys:o})}_clear_overlay(){this.sxs=[],this.sys=[],this.model.overlay.update({xs:this.sxs,ys:this.sys})}_do_select(s,e,t,o){const i={type:\"poly\",sx:s,sy:e};this._select(i,t,o)}}t.LassoSelectToolView=h,h.__name__=\"LassoSelectToolView\";class r extends l.SelectTool{constructor(s){super(s),this.tool_name=\"Lasso Select\",this.icon=n.tool_icon_lasso_select,this.event_type=\"pan\",this.default_order=12}static init_LassoSelectTool(){this.prototype.default_view=h,this.define((({Boolean:s,Ref:e})=>({select_every_mousemove:[s,!0],overlay:[e(_.PolyAnnotation),a.DEFAULT_POLY_OVERLAY]}))),this.register_alias(\"lasso_select\",(()=>new r))}}t.LassoSelectTool=r,r.__name__=\"LassoSelectTool\",r.init_LassoSelectTool()},\n function _(e,t,s,l,o){l();const i=e(378),a=e(231),_=e(43),c=e(9),n=e(242);class h extends i.SelectToolView{initialize(){super.initialize(),this.data={sx:[],sy:[]}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._active_change()))}_active_change(){this.model.active||this._clear_data()}_keyup(e){e.keyCode==_.Keys.Enter&&this._clear_data()}_doubletap(e){this._do_select(this.data.sx,this.data.sy,!0,this._select_mode(e)),this.plot_view.state.push(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()}_clear_data(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})}_tap(e){const{sx:t,sy:s}=e;this.plot_view.frame.bbox.contains(t,s)&&(this.data.sx.push(t),this.data.sy.push(s),this.model.overlay.update({xs:c.copy(this.data.sx),ys:c.copy(this.data.sy)}))}_do_select(e,t,s,l){const o={type:\"poly\",sx:e,sy:t};this._select(o,s,l)}}s.PolySelectToolView=h,h.__name__=\"PolySelectToolView\";s.DEFAULT_POLY_OVERLAY=()=>new a.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class y extends i.SelectTool{constructor(e){super(e),this.tool_name=\"Poly Select\",this.icon=n.tool_icon_polygon_select,this.event_type=\"tap\",this.default_order=11}static init_PolySelectTool(){this.prototype.default_view=h,this.define((({Ref:e})=>({overlay:[e(a.PolyAnnotation),s.DEFAULT_POLY_OVERLAY]}))),this.register_alias(\"poly_select\",(()=>new y))}}s.PolySelectTool=y,y.__name__=\"PolySelectTool\",y.init_PolySelectTool()},\n function _(e,t,i,s,n){s();const r=e(20),_=e(383),d=e(242);class o extends _.LineToolView{constructor(){super(...arguments),this._drawing=!1}_doubletap(e){if(!this.model.active)return;const t=this.model.renderers;for(const i of t){1==this._select_event(e,\"replace\",[i]).length&&(this._selected_renderer=i)}this._show_intersections(),this._update_line_cds()}_show_intersections(){if(!this.model.active)return;if(null==this._selected_renderer)return;if(!this.model.renderers.length)return this._set_intersection([],[]),this._selected_renderer=null,void(this._drawing=!1);const e=this._selected_renderer.data_source,t=this._selected_renderer.glyph,[i,s]=[t.x.field,t.y.field],n=e.get_array(i),r=e.get_array(s);this._set_intersection(n,r)}_tap(e){const t=this.model.intersection_renderer;if(null==this._map_drag(e.sx,e.sy,t))return;if(this._drawing&&this._selected_renderer){const i=this._select_mode(e);if(0==this._select_event(e,i,[t]).length)return}const i=this._select_mode(e);this._select_event(e,i,[t]),this._select_event(e,i,this.model.renderers)}_update_line_cds(){if(null==this._selected_renderer)return;const e=this.model.intersection_renderer.glyph,t=this.model.intersection_renderer.data_source,[i,s]=[e.x.field,e.y.field];if(i&&s){const e=t.data[i],n=t.data[s];this._selected_renderer.data_source.data[i]=e,this._selected_renderer.data_source.data[s]=n}this._emit_cds_changes(this._selected_renderer.data_source,!0,!0,!1)}_pan_start(e){this._select_event(e,\"append\",[this.model.intersection_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer],this.model.dimensions),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer]),this._emit_cds_changes(this.model.intersection_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}activate(){this._drawing=!0}deactivate(){this._selected_renderer&&(this._drawing&&(this._drawing=!1),this._hide_intersections())}}i.LineEditToolView=o,o.__name__=\"LineEditToolView\";class l extends _.LineTool{constructor(e){super(e),this.tool_name=\"Line Edit Tool\",this.icon=d.tool_icon_line_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=4}static init_LineEditTool(){this.prototype.default_view=o,this.define((()=>({dimensions:[r.Dimensions,\"both\"]})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}i.LineEditTool=l,l.__name__=\"LineEditTool\",l.init_LineEditTool()},\n function _(e,i,t,n,o){n();const s=e(8),_=e(370);class r extends _.EditToolView{_set_intersection(e,i){const t=this.model.intersection_renderer.glyph,n=this.model.intersection_renderer.data_source,[o,_]=[t.x.field,t.y.field];o&&(s.isArray(e)?n.data[o]=e:t.x={value:e}),_&&(s.isArray(i)?n.data[_]=i:t.y={value:i}),this._emit_cds_changes(n,!0,!0,!1)}_hide_intersections(){this._set_intersection([],[])}}t.LineToolView=r,r.__name__=\"LineToolView\";class c extends _.EditTool{constructor(e){super(e)}static init_LineTool(){this.define((({AnyRef:e})=>({intersection_renderer:[e()]})))}}t.LineTool=c,c.__name__=\"LineTool\",c.init_LineTool()},\n function _(t,s,i,n,e){n();const o=t(1),a=t(237),_=t(20),h=o.__importStar(t(242));function l(t,s,i){const n=new Map;for(const[e,o]of t){const[t,a]=o.r_invert(s,i);n.set(e,{start:t,end:a})}return n}i.update_ranges=l;class r extends a.GestureToolView{_pan_start(t){var s;this.last_dx=0,this.last_dy=0;const{sx:i,sy:n}=t,e=this.plot_view.frame.bbox;if(!e.contains(i,n)){const t=e.h_range,s=e.v_range;(it.end)&&(this.v_axis_only=!0),(ns.end)&&(this.h_axis_only=!0)}null===(s=this.model.document)||void 0===s||s.interactive_start(this.plot_model)}_pan(t){var s;this._update(t.deltaX,t.deltaY),null===(s=this.model.document)||void 0===s||s.interactive_start(this.plot_model)}_pan_end(t){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.state.push(\"pan\",{range:this.pan_info})}_update(t,s){const i=this.plot_view.frame,n=t-this.last_dx,e=s-this.last_dy,o=i.bbox.h_range,a=o.start-n,_=o.end-n,h=i.bbox.v_range,r=h.start-e,d=h.end-e,p=this.model.dimensions;let c,m,u,x,v,y;\"width\"!=p&&\"both\"!=p||this.v_axis_only?(c=o.start,m=o.end,u=0):(c=a,m=_,u=-n),\"height\"!=p&&\"both\"!=p||this.h_axis_only?(x=h.start,v=h.end,y=0):(x=r,v=d,y=-e),this.last_dx=t,this.last_dy=s;const{x_scales:g,y_scales:w}=i,f=l(g,c,m),b=l(w,x,v);this.pan_info={xrs:f,yrs:b,sdx:u,sdy:y},this.plot_view.update_range(this.pan_info,{panning:!0})}}i.PanToolView=r,r.__name__=\"PanToolView\";class d extends a.GestureTool{constructor(t){super(t),this.tool_name=\"Pan\",this.event_type=\"pan\",this.default_order=10}static init_PanTool(){this.prototype.default_view=r,this.define((()=>({dimensions:[_.Dimensions,\"both\",{on_update(t,s){switch(t){case\"both\":s.icon=h.tool_icon_pan;break;case\"width\":s.icon=h.tool_icon_xpan;break;case\"height\":s.icon=h.tool_icon_ypan}}}]}))),this.register_alias(\"pan\",(()=>new d({dimensions:\"both\"}))),this.register_alias(\"xpan\",(()=>new d({dimensions:\"width\"}))),this.register_alias(\"ypan\",(()=>new d({dimensions:\"height\"})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}i.PanTool=d,d.__name__=\"PanTool\",d.init_PanTool()},\n function _(t,e,i,s,n){s();const l=t(136),a=t(156),r=t(19),o=t(237),_=t(242);function h(t){switch(t){case 1:return 2;case 2:return 1;case 4:return 5;case 5:return 4;default:return t}}function d(t,e,i,s){if(null==e)return!1;const n=i.compute(e);return Math.abs(t-n)n.right)&&(l=!1)}if(null!=n.bottom&&null!=n.top){const t=s.invert(e);(tn.top)&&(l=!1)}return l}function c(t,e,i){let s=0;return t>=i.start&&t<=i.end&&(s+=1),e>=i.start&&e<=i.end&&(s+=1),s}function g(t,e,i,s){const n=e.compute(t),l=e.invert(n+i);return l>=s.start&&l<=s.end?l:t}function y(t,e,i){return t>e.start?(e.end=t,i):(e.end=e.start,e.start=t,h(i))}function f(t,e,i){return t=o&&(t.start=a,t.end=r)}i.flip_side=h,i.is_near=d,i.is_inside=u,i.sides_inside=c,i.compute_value=g,i.update_range_end_side=y,i.update_range_start_side=f,i.update_range=m;class v extends o.GestureToolView{initialize(){super.initialize(),this.side=0,this.model.update_overlay_from_ranges()}connect_signals(){super.connect_signals(),null!=this.model.x_range&&this.connect(this.model.x_range.change,(()=>this.model.update_overlay_from_ranges())),null!=this.model.y_range&&this.connect(this.model.y_range.change,(()=>this.model.update_overlay_from_ranges()))}_pan_start(t){this.last_dx=0,this.last_dy=0;const e=this.model.x_range,i=this.model.y_range,{frame:s}=this.plot_view,n=s.x_scale,a=s.y_scale,r=this.model.overlay,{left:o,right:_,top:h,bottom:c}=r,g=this.model.overlay.line_width+l.EDGE_TOLERANCE;null!=e&&this.model.x_interaction&&(d(t.sx,o,n,g)?this.side=1:d(t.sx,_,n,g)?this.side=2:u(t.sx,t.sy,n,a,r)&&(this.side=3)),null!=i&&this.model.y_interaction&&(0==this.side&&d(t.sy,c,a,g)&&(this.side=4),0==this.side&&d(t.sy,h,a,g)?this.side=5:u(t.sx,t.sy,n,a,this.model.overlay)&&(3==this.side?this.side=7:this.side=6))}_pan(t){const e=this.plot_view.frame,i=t.deltaX-this.last_dx,s=t.deltaY-this.last_dy,n=this.model.x_range,l=this.model.y_range,a=e.x_scale,r=e.y_scale;if(null!=n)if(3==this.side||7==this.side)m(n,a,i,e.x_range);else if(1==this.side){const t=g(n.start,a,i,e.x_range);this.side=f(t,n,this.side)}else if(2==this.side){const t=g(n.end,a,i,e.x_range);this.side=y(t,n,this.side)}if(null!=l)if(6==this.side||7==this.side)m(l,r,s,e.y_range);else if(4==this.side){const t=g(l.start,r,s,e.y_range);this.side=f(t,l,this.side)}else if(5==this.side){const t=g(l.end,r,s,e.y_range);this.side=y(t,l,this.side)}this.last_dx=t.deltaX,this.last_dy=t.deltaY}_pan_end(t){this.side=0}}i.RangeToolView=v,v.__name__=\"RangeToolView\";const p=()=>new l.BoxAnnotation({level:\"overlay\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:.5,line_dash:[2,2]});class x extends o.GestureTool{constructor(t){super(t),this.tool_name=\"Range Tool\",this.icon=_.tool_icon_range,this.event_type=\"pan\",this.default_order=1}static init_RangeTool(){this.prototype.default_view=v,this.define((({Boolean:t,Ref:e,Nullable:i})=>({x_range:[i(e(a.Range1d)),null],x_interaction:[t,!0],y_range:[i(e(a.Range1d)),null],y_interaction:[t,!0],overlay:[e(l.BoxAnnotation),p]})))}initialize(){super.initialize(),this.overlay.in_cursor=\"grab\",this.overlay.ew_cursor=null!=this.x_range&&this.x_interaction?\"ew-resize\":null,this.overlay.ns_cursor=null!=this.y_range&&this.y_interaction?\"ns-resize\":null}update_overlay_from_ranges(){null==this.x_range&&null==this.y_range&&(this.overlay.left=null,this.overlay.right=null,this.overlay.bottom=null,this.overlay.top=null,r.logger.warn(\"RangeTool not configured with any Ranges.\")),null==this.x_range?(this.overlay.left=null,this.overlay.right=null):(this.overlay.left=this.x_range.start,this.overlay.right=this.x_range.end),null==this.y_range?(this.overlay.bottom=null,this.overlay.top=null):(this.overlay.bottom=this.y_range.start,this.overlay.top=this.y_range.end)}}i.RangeTool=x,x.__name__=\"RangeTool\",x.init_RangeTool()},\n function _(e,t,s,o,i){o();const l=e(378),a=e(20),n=e(242);class c extends l.SelectToolView{_tap(e){\"tap\"==this.model.gesture&&this._handle_tap(e)}_doubletap(e){\"doubletap\"==this.model.gesture&&this._handle_tap(e)}_handle_tap(e){const{sx:t,sy:s}=e,o={type:\"point\",sx:t,sy:s};this._select(o,!0,this._select_mode(e))}_select(e,t,s){const{callback:o}=this.model;if(\"select\"==this.model.behavior){const i=this._computed_renderers_by_data_source();for(const[,l]of i){const i=l[0].get_selection_manager(),a=l.map((e=>this.plot_view.renderer_view(e))).filter((e=>null!=e));if(i.select(a,e,t,s)&&null!=o){const t=a[0].coordinates.x_scale.invert(e.sx),s=a[0].coordinates.y_scale.invert(e.sy),l={geometries:Object.assign(Object.assign({},e),{x:t,y:s}),source:i.source};o.execute(this.model,l)}}this._emit_selection_event(e),this.plot_view.state.push(\"tap\",{selection:this.plot_view.get_selection()})}else for(const t of this.computed_renderers){const s=this.plot_view.renderer_view(t);if(null==s)continue;const i=t.get_selection_manager();if(i.inspect(s,e)&&null!=o){const t=s.coordinates.x_scale.invert(e.sx),l=s.coordinates.y_scale.invert(e.sy),a={geometries:Object.assign(Object.assign({},e),{x:t,y:l}),source:i.source};o.execute(this.model,a)}}}}s.TapToolView=c,c.__name__=\"TapToolView\";class _ extends l.SelectTool{constructor(e){super(e),this.tool_name=\"Tap\",this.icon=n.tool_icon_tap_select,this.event_type=\"tap\",this.default_order=10}static init_TapTool(){this.prototype.default_view=c,this.define((({Any:e,Enum:t,Nullable:s})=>({behavior:[a.TapBehavior,\"select\"],gesture:[t(\"tap\",\"doubletap\"),\"tap\"],callback:[s(e)]}))),this.register_alias(\"click\",(()=>new _({behavior:\"inspect\"}))),this.register_alias(\"tap\",(()=>new _)),this.register_alias(\"doubletap\",(()=>new _({gesture:\"doubletap\"})))}}s.TapTool=_,_.__name__=\"TapTool\",_.init_TapTool()},\n function _(e,t,s,i,n){i();const o=e(237),a=e(20),l=e(242),_=e(384);class h extends o.GestureToolView{_scroll(e){let t=this.model.speed*e.delta;t>.9?t=.9:t<-.9&&(t=-.9),this._update_ranges(t)}_update_ranges(e){var t;const{frame:s}=this.plot_view,i=s.bbox.h_range,n=s.bbox.v_range,[o,a]=[i.start,i.end],[l,h]=[n.start,n.end];let r,d,c,p;switch(this.model.dimension){case\"height\":{const t=Math.abs(h-l);r=o,d=a,c=l-t*e,p=h-t*e;break}case\"width\":{const t=Math.abs(a-o);r=o-t*e,d=a-t*e,c=l,p=h;break}}const{x_scales:m,y_scales:u}=s,w={xrs:_.update_ranges(m,r,d),yrs:_.update_ranges(u,c,p),factor:e};this.plot_view.state.push(\"wheel_pan\",{range:w}),this.plot_view.update_range(w,{scrolling:!0}),null===(t=this.model.document)||void 0===t||t.interactive_start(this.plot_model)}}s.WheelPanToolView=h,h.__name__=\"WheelPanToolView\";class r extends o.GestureTool{constructor(e){super(e),this.tool_name=\"Wheel Pan\",this.icon=l.tool_icon_wheel_pan,this.event_type=\"scroll\",this.default_order=12}static init_WheelPanTool(){this.prototype.default_view=h,this.define((()=>({dimension:[a.Dimension,\"width\"]}))),this.internal((({Number:e})=>({speed:[e,.001]}))),this.register_alias(\"xwheel_pan\",(()=>new r({dimension:\"width\"}))),this.register_alias(\"ywheel_pan\",(()=>new r({dimension:\"height\"})))}get tooltip(){return this._get_dim_tooltip(this.dimension)}}s.WheelPanTool=r,r.__name__=\"WheelPanTool\",r.init_WheelPanTool()},\n function _(e,o,t,s,i){s();const l=e(237),n=e(368),h=e(20),_=e(27),a=e(242);class m extends l.GestureToolView{_pinch(e){const{sx:o,sy:t,scale:s,ctrlKey:i,shiftKey:l}=e;let n;n=s>=1?20*(s-1):-20/s,this._scroll({type:\"wheel\",sx:o,sy:t,delta:n,ctrlKey:i,shiftKey:l})}_scroll(e){var o;const{frame:t}=this.plot_view,s=t.bbox.h_range,i=t.bbox.v_range,{sx:l,sy:h}=e,_=this.model.dimensions,a=(\"width\"==_||\"both\"==_)&&s.start({dimensions:[h.Dimensions,\"both\"],maintain_focus:[e,!0],zoom_on_axis:[e,!0],speed:[o,1/600]}))),this.register_alias(\"wheel_zoom\",(()=>new r({dimensions:\"both\"}))),this.register_alias(\"xwheel_zoom\",(()=>new r({dimensions:\"width\"}))),this.register_alias(\"ywheel_zoom\",(()=>new r({dimensions:\"height\"})))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}}t.WheelZoomTool=r,r.__name__=\"WheelZoomTool\",r.init_WheelZoomTool()},\n function _(i,s,t,o,e){o();const n=i(247),l=i(233),h=i(20),a=i(13),r=i(242);class _ extends n.InspectToolView{_move(i){if(!this.model.active)return;const{sx:s,sy:t}=i;this.plot_view.frame.bbox.contains(s,t)?this._update_spans(s,t):this._update_spans(null,null)}_move_exit(i){this._update_spans(null,null)}_update_spans(i,s){const t=this.model.dimensions;\"width\"!=t&&\"both\"!=t||(this.model.spans.width.location=s),\"height\"!=t&&\"both\"!=t||(this.model.spans.height.location=i)}}t.CrosshairToolView=_,_.__name__=\"CrosshairToolView\";class c extends n.InspectTool{constructor(i){super(i),this.tool_name=\"Crosshair\",this.icon=r.tool_icon_crosshair}static init_CrosshairTool(){function i(i,s){return new l.Span({for_hover:!0,dimension:s,location_units:\"screen\",level:\"overlay\",line_color:i.line_color,line_width:i.line_width,line_alpha:i.line_alpha})}this.prototype.default_view=_,this.define((({Alpha:i,Number:s,Color:t})=>({dimensions:[h.Dimensions,\"both\"],line_color:[t,\"black\"],line_width:[s,1],line_alpha:[i,1]}))),this.internal((({Struct:s,Ref:t})=>({spans:[s({width:t(l.Span),height:t(l.Span)}),s=>({width:i(s,\"width\"),height:i(s,\"height\")})]}))),this.register_alias(\"crosshair\",(()=>new c))}get tooltip(){return this._get_dim_tooltip(this.dimensions)}get synthetic_renderers(){return a.values(this.spans)}}t.CrosshairTool=c,c.__name__=\"CrosshairTool\",c.init_CrosshairTool()},\n function _(t,e,s,o,r){o();const n=t(53),i=t(13),a=t(34);class u extends n.Model{constructor(t){super(t)}static init_CustomJSHover(){this.define((({Unknown:t,String:e,Dict:s})=>({args:[s(t),{}],code:[e,\"\"]})))}get values(){return i.values(this.args)}_make_code(t,e,s,o){return new Function(...i.keys(this.args),t,e,s,a.use_strict(o))}format(t,e,s){return this._make_code(\"value\",\"format\",\"special_vars\",this.code)(...this.values,t,e,s)}}s.CustomJSHover=u,u.__name__=\"CustomJSHover\",u.init_CustomJSHover()},\n function _(e,t,n,s,o){s();const i=e(1),r=e(247),l=e(390),a=e(254),c=e(61),_=e(123),d=e(62),p=e(63),h=e(127),u=i.__importStar(e(107)),m=e(182),y=e(43),f=e(22),x=e(13),v=e(245),w=e(8),g=e(122),b=e(20),k=e(242),C=e(15),S=e(161),T=i.__importStar(e(255));function $(e,t,n,s,o,i){const r={x:o[e],y:i[e]},l={x:o[e+1],y:i[e+1]};let a,c;if(\"span\"==t.type)\"h\"==t.direction?(a=Math.abs(r.x-n),c=Math.abs(l.x-n)):(a=Math.abs(r.y-s),c=Math.abs(l.y-s));else{const e={x:n,y:s};a=u.dist_2_pts(r,e),c=u.dist_2_pts(l,e)}return adelete this._template_el)),this.on_change([e,t,n],(async()=>await this._update_ttmodels()))}async _update_ttmodels(){const{_ttmodels:e,computed_renderers:t}=this;e.clear();const{tooltips:n}=this.model;if(null!=n)for(const t of this.computed_renderers){const s=new a.Tooltip({custom:w.isString(n)||w.isFunction(n),attachment:this.model.attachment,show_arrow:this.model.show_arrow});t instanceof c.GlyphRenderer?e.set(t,s):t instanceof _.GraphRenderer&&(e.set(t.node_renderer,s),e.set(t.edge_renderer,s))}const s=await g.build_views(this._ttviews,[...e.values()],{parent:this.plot_view});for(const e of s)e.render();const o=[...function*(){for(const e of t)e instanceof c.GlyphRenderer?yield e:e instanceof _.GraphRenderer&&(yield e.node_renderer,yield e.edge_renderer)}()],i=this._slots.get(this._update);if(null!=i){const e=new Set(o.map((e=>e.data_source)));C.Signal.disconnect_receiver(this,i,e)}for(const e of o)this.connect(e.data_source.inspect,this._update)}get computed_renderers(){const{renderers:e,names:t}=this.model,n=this.plot_model.data_renderers;return S.compute_renderers(e,n,t)}get ttmodels(){return this._ttmodels}_clear(){this._inspect(1/0,1/0);for(const[,e]of this.ttmodels)e.clear()}_move(e){if(!this.model.active)return;const{sx:t,sy:n}=e;this.plot_view.frame.bbox.contains(t,n)?this._inspect(t,n):this._clear()}_move_exit(){this._clear()}_inspect(e,t){let n;if(\"mouse\"==this.model.mode)n={type:\"point\",sx:e,sy:t};else{n={type:\"span\",direction:\"vline\"==this.model.mode?\"h\":\"v\",sx:e,sy:t}}for(const e of this.computed_renderers){const t=e.get_selection_manager(),s=this.plot_view.renderer_view(e);null!=s&&t.inspect(s,n)}this._emit_callback(n)}_update([e,{geometry:t}]){var n,s;if(!this.model.active)return;if(\"point\"!=t.type&&\"span\"!=t.type)return;if(!(e instanceof c.GlyphRenderer))return;if(\"ignore\"==this.model.muted_policy&&e.muted)return;const o=this.ttmodels.get(e);if(null==o)return;const i=e.get_selection_manager();let r=i.inspectors.get(e);if(r=e.view.convert_selection_to_subset(r),r.is_empty())return void o.clear();const l=i.source,a=this.plot_view.renderer_view(e);if(null==a)return;const{sx:_,sy:d}=t,u=a.coordinates.x_scale,m=a.coordinates.y_scale,f=u.invert(_),v=m.invert(d),{glyph:w}=a,g=[];if(w instanceof p.LineView)for(const n of r.line_indices){let s,o,i=w._x[n+1],a=w._y[n+1],c=n;switch(this.model.line_policy){case\"interp\":[i,a]=w.get_interpolation_hit(n,t),s=u.compute(i),o=m.compute(a);break;case\"prev\":[[s,o],c]=R(w.sx,w.sy,n);break;case\"next\":[[s,o],c]=R(w.sx,w.sy,n+1);break;case\"nearest\":[[s,o],c]=$(n,t,_,d,w.sx,w.sy),i=w._x[c],a=w._y[c];break;default:[s,o]=[_,d]}const p={index:c,x:f,y:v,sx:_,sy:d,data_x:i,data_y:a,rx:s,ry:o,indices:r.line_indices,name:e.name};g.push([s,o,this._render_tooltips(l,c,p)])}for(const t of r.image_indices){const n={index:t.index,x:f,y:v,sx:_,sy:d,name:e.name},s=this._render_tooltips(l,t,n);g.push([_,d,s])}for(const o of r.indices)if(w instanceof h.MultiLineView&&!x.isEmpty(r.multiline_indices))for(const n of r.multiline_indices[o.toString()]){let s,i,a,p=w._xs.get(o)[n],h=w._ys.get(o)[n],y=n;switch(this.model.line_policy){case\"interp\":[p,h]=w.get_interpolation_hit(o,n,t),s=u.compute(p),i=m.compute(h);break;case\"prev\":[[s,i],y]=R(w.sxs.get(o),w.sys.get(o),n);break;case\"next\":[[s,i],y]=R(w.sxs.get(o),w.sys.get(o),n+1);break;case\"nearest\":[[s,i],y]=$(n,t,_,d,w.sxs.get(o),w.sys.get(o)),p=w._xs.get(o)[y],h=w._ys.get(o)[y];break;default:throw new Error(\"shouldn't have happened\")}a=e instanceof c.GlyphRenderer?e.view.convert_indices_from_subset([o])[0]:o;const x={index:a,x:f,y:v,sx:_,sy:d,data_x:p,data_y:h,segment_index:y,indices:r.multiline_indices,name:e.name};g.push([s,i,this._render_tooltips(l,a,x)])}else{const t=null===(n=w._x)||void 0===n?void 0:n[o],i=null===(s=w._y)||void 0===s?void 0:s[o];let a,p,h;if(\"snap_to_data\"==this.model.point_policy){let e=w.get_anchor_point(this.model.anchor,o,[_,d]);if(null==e&&(e=w.get_anchor_point(\"center\",o,[_,d]),null==e))continue;a=e.x,p=e.y}else[a,p]=[_,d];h=e instanceof c.GlyphRenderer?e.view.convert_indices_from_subset([o])[0]:o;const u={index:h,x:f,y:v,sx:_,sy:d,data_x:t,data_y:i,indices:r.indices,name:e.name};g.push([a,p,this._render_tooltips(l,h,u)])}if(0==g.length)o.clear();else{const{content:e}=o;y.empty(o.content);for(const[,,t]of g)null!=t&&e.appendChild(t);const[t,n]=g[g.length-1];o.setv({position:[t,n]},{check_eq:!1})}}_emit_callback(e){const{callback:t}=this.model;if(null!=t)for(const n of this.computed_renderers){if(!(n instanceof c.GlyphRenderer))continue;const s=this.plot_view.renderer_view(n);if(null==s)continue;const{x_scale:o,y_scale:i}=s.coordinates,r=o.invert(e.sx),l=i.invert(e.sy),a=n.data_source.inspected;t.execute(this.model,{geometry:Object.assign({x:r,y:l},e),renderer:n,index:a})}}_create_template(e){const t=y.div({style:{display:\"table\",borderSpacing:\"2px\"}});for(const[n]of e){const e=y.div({style:{display:\"table-row\"}});t.appendChild(e);const s=y.div({style:{display:\"table-cell\"},class:T.tooltip_row_label},0!=n.length?`${n}: `:\"\");e.appendChild(s);const o=y.span();o.dataset.value=\"\";const i=y.span({class:T.tooltip_color_block},\" \");i.dataset.swatch=\"\",y.undisplay(i);const r=y.div({style:{display:\"table-cell\"},class:T.tooltip_row_value},o,i);e.appendChild(r)}return t}_render_template(e,t,n,s,o){const i=e.cloneNode(!0),r=i.querySelectorAll(\"[data-value]\"),l=i.querySelectorAll(\"[data-swatch]\"),a=/\\$color(\\[.*\\])?:(\\w*)/,c=/\\$swatch:(\\w*)/;for(const[[,e],i]of v.enumerate(t)){const t=e.match(c),_=e.match(a);if(null!=t||null!=_){if(null!=t){const[,e]=t,o=n.get_column(e);if(null==o)r[i].textContent=`${e} unknown`;else{const e=w.isNumber(s)?o[s]:null;null!=e&&(l[i].style.backgroundColor=f.color2css(e),y.display(l[i]))}}if(null!=_){const[,e=\"\",t]=_,o=n.get_column(t);if(null==o){r[i].textContent=`${t} unknown`;continue}const a=e.indexOf(\"hex\")>=0,c=e.indexOf(\"swatch\")>=0,d=w.isNumber(s)?o[s]:null;if(null==d){r[i].textContent=\"(null)\";continue}r[i].textContent=a?f.color2hex(d):f.color2css(d),c&&(l[i].style.backgroundColor=f.color2css(d),y.display(l[i]))}}else{const t=m.replace_placeholders(e.replace(\"$~\",\"$data_\"),n,s,this.model.formatters,o);if(w.isString(t))r[i].textContent=t;else for(const e of t)r[i].appendChild(e)}}return i}_render_tooltips(e,t,n){var s;const{tooltips:o}=this.model;if(w.isString(o)){const s=m.replace_placeholders({html:o},e,t,this.model.formatters,n);return y.div({},s)}if(w.isFunction(o))return o(e,n);if(null!=o){const i=null!==(s=this._template_el)&&void 0!==s?s:this._template_el=this._create_template(o);return this._render_template(i,o,e,t,n)}return null}}n.HoverToolView=H,H.__name__=\"HoverToolView\";class M extends r.InspectTool{constructor(e){super(e),this.tool_name=\"Hover\",this.icon=k.tool_icon_hover}static init_HoverTool(){this.prototype.default_view=H,this.define((({Any:e,Boolean:t,String:n,Array:s,Tuple:o,Dict:i,Or:r,Ref:a,Function:c,Auto:_,Nullable:p})=>({tooltips:[p(r(n,s(o(n,n)),c())),[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"screen (x, y)\",\"($sx, $sy)\"]]],formatters:[i(r(a(l.CustomJSHover),m.FormatterType)),{}],renderers:[r(s(a(d.DataRenderer)),_),\"auto\"],names:[s(n),[]],mode:[b.HoverMode,\"mouse\"],muted_policy:[b.MutedPolicy,\"show\"],point_policy:[b.PointPolicy,\"snap_to_data\"],line_policy:[b.LinePolicy,\"nearest\"],show_arrow:[t,!0],anchor:[b.Anchor,\"center\"],attachment:[b.TooltipAttachment,\"horizontal\"],callback:[p(e)]}))),this.register_alias(\"hover\",(()=>new M))}}n.HoverTool=M,M.__name__=\"HoverTool\",M.init_HoverTool()},\n function _(t,o,e,n,i){n();const s=t(15),l=t(53),c=t(238),r=t(247),a=t(245);class u extends l.Model{constructor(t){super(t)}static init_ToolProxy(){this.define((({Boolean:t,Array:o,Ref:e})=>({tools:[o(e(c.ButtonTool)),[]],active:[t,!1],disabled:[t,!1]})))}get button_view(){return this.tools[0].button_view}get event_type(){return this.tools[0].event_type}get tooltip(){return this.tools[0].tooltip}get tool_name(){return this.tools[0].tool_name}get icon(){return this.tools[0].computed_icon}get computed_icon(){return this.icon}get toggleable(){const t=this.tools[0];return t instanceof r.InspectTool&&t.toggleable}initialize(){super.initialize(),this.do=new s.Signal0(this,\"do\")}connect_signals(){super.connect_signals(),this.connect(this.do,(()=>this.doit())),this.connect(this.properties.active.change,(()=>this.set_active()));for(const t of this.tools)this.connect(t.properties.active.change,(()=>{this.active=t.active}))}doit(){for(const t of this.tools)t.do.emit()}set_active(){for(const t of this.tools)t.active=this.active}get menu(){const{menu:t}=this.tools[0];if(null==t)return null;const o=[];for(const[e,n]of a.enumerate(t))if(null==e)o.push(null);else{const t=()=>{var t,o;for(const e of this.tools)null===(o=null===(t=e.menu)||void 0===t?void 0:t[n])||void 0===o||o.handler()};o.push(Object.assign(Object.assign({},e),{handler:t}))}return o}}e.ToolProxy=u,u.__name__=\"ToolProxy\",u.init_ToolProxy()},\n function _(o,t,s,i,e){i();const n=o(20),r=o(9),l=o(13),c=o(248),h=o(235),a=o(392),_=o(319),p=o(221);class f extends c.ToolbarBase{constructor(o){super(o)}static init_ProxyToolbar(){this.define((({Array:o,Ref:t})=>({toolbars:[o(t(h.Toolbar)),[]]})))}initialize(){super.initialize(),this._merge_tools()}_merge_tools(){this._proxied_tools=[];const o={},t={},s={},i=[],e=[];for(const o of this.help)r.includes(e,o.redirect)||(i.push(o),e.push(o.redirect));this._proxied_tools.push(...i),this.help=i;for(const[o,t]of l.entries(this.gestures)){o in s||(s[o]={});for(const i of t.tools)i.type in s[o]||(s[o][i.type]=[]),s[o][i.type].push(i)}for(const t of this.inspectors)t.type in o||(o[t.type]=[]),o[t.type].push(t);for(const o of this.actions)o.type in t||(t[o.type]=[]),t[o.type].push(o);const n=(o,t=!1)=>{const s=new a.ToolProxy({tools:o,active:t});return this._proxied_tools.push(s),s};for(const o of l.keys(s)){const t=this.gestures[o];t.tools=[];for(const i of l.keys(s[o])){const e=s[o][i];if(e.length>0)if(\"multi\"==o)for(const o of e){const s=n([o]);t.tools.push(s),this.connect(s.properties.active.change,(()=>this._active_change(s)))}else{const o=n(e);t.tools.push(o),this.connect(o.properties.active.change,(()=>this._active_change(o)))}}}this.actions=[];for(const[o,s]of l.entries(t))if(\"CustomAction\"==o)for(const o of s)this.actions.push(n([o]));else s.length>0&&this.actions.push(n(s));this.inspectors=[];for(const t of l.values(o))t.length>0&&this.inspectors.push(n(t,!0));for(const[o,t]of l.entries(this.gestures))0!=t.tools.length&&(t.tools=r.sort_by(t.tools,(o=>o.default_order)),\"pinch\"!=o&&\"scroll\"!=o&&\"multi\"!=o&&(t.tools[0].active=!0))}}s.ProxyToolbar=f,f.__name__=\"ProxyToolbar\",f.init_ProxyToolbar();class u extends _.LayoutDOMView{initialize(){this.model.toolbar.toolbar_location=this.model.toolbar_location,super.initialize()}get child_models(){return[this.model.toolbar]}_update_layout(){this.layout=new p.ContentBox(this.child_views[0].el);const{toolbar:o}=this.model;o.horizontal?this.layout.set_sizing({width_policy:\"fit\",min_width:100,height_policy:\"fixed\"}):this.layout.set_sizing({width_policy:\"fixed\",height_policy:\"fit\",min_height:100})}}s.ToolbarBoxView=u,u.__name__=\"ToolbarBoxView\";class y extends _.LayoutDOM{constructor(o){super(o)}static init_ToolbarBox(){this.prototype.default_view=u,this.define((({Ref:o})=>({toolbar:[o(c.ToolbarBase)],toolbar_location:[n.Location,\"right\"]})))}}s.ToolbarBox=y,y.__name__=\"ToolbarBox\",y.init_ToolbarBox()},\n function _(e,n,r,t,o){t();const s=e(1),u=e(7),c=e(53),l=s.__importStar(e(21)),a=e(8),i=e(13);r.resolve_defs=function(e){var n,r,t,o;function s(e){return null!=e.module?`${e.module}.${e.name}`:e.name}function d(e){if(a.isString(e))switch(e){case\"Any\":return l.Any;case\"Unknown\":return l.Unknown;case\"Boolean\":return l.Boolean;case\"Number\":return l.Number;case\"Int\":return l.Int;case\"String\":return l.String;case\"Null\":return l.Null}else switch(e[0]){case\"Nullable\":{const[,n]=e;return l.Nullable(d(n))}case\"Or\":{const[,...n]=e;return l.Or(...n.map(d))}case\"Tuple\":{const[,n,...r]=e;return l.Tuple(d(n),...r.map(d))}case\"Array\":{const[,n]=e;return l.Array(d(n))}case\"Struct\":{const[,...n]=e,r=n.map((([e,n])=>[e,d(n)]));return l.Struct(i.to_object(r))}case\"Dict\":{const[,n]=e;return l.Dict(d(n))}case\"Map\":{const[,n,r]=e;return l.Map(d(n),d(r))}case\"Enum\":{const[,...n]=e;return l.Enum(...n)}case\"Ref\":{const[,n]=e,r=u.Models.get(s(n));if(null!=r)return l.Ref(r);throw new Error(`${s(n)} wasn't defined before referencing it`)}case\"AnyRef\":return l.AnyRef()}}for(const l of e){const e=(()=>{if(null==l.extends)return c.Model;{const e=u.Models.get(s(l.extends));if(null!=e)return e;throw new Error(`base model ${s(l.extends)} of ${s(l)} is not defined`)}})(),a=((o=class extends e{}).__name__=l.name,o.__module__=l.module,o);for(const e of null!==(n=l.properties)&&void 0!==n?n:[]){const n=d(null!==(r=e.kind)&&void 0!==r?r:\"Unknown\");a.define({[e.name]:[n,e.default]})}for(const e of null!==(t=l.overrides)&&void 0!==t?t:[])a.override({[e.name]:e.default});u.Models.register_models([a])}}},\n function _(n,e,t,o,i){o();const d=n(5),c=n(240),s=n(122),a=n(43),l=n(396);t.index={},t.add_document_standalone=async function(n,e,o=[],i=!1){const u=new Map;async function f(i){let d;const f=n.roots().indexOf(i),r=o[f];null!=r?d=r:e.classList.contains(l.BOKEH_ROOT)?d=e:(d=a.div({class:l.BOKEH_ROOT}),e.appendChild(d));const w=await s.build_view(i,{parent:null});return w instanceof c.DOMView&&w.renderTo(d),u.set(i,w),t.index[i.id]=w,w}for(const e of n.roots())await f(e);return i&&(window.document.title=n.title()),n.on_change((n=>{n instanceof d.RootAddedEvent?f(n.model):n instanceof d.RootRemovedEvent?function(n){const e=u.get(n);null!=e&&(e.remove(),u.delete(n),delete t.index[n.id])}(n.model):i&&n instanceof d.TitleChangedEvent&&(window.document.title=n.title)})),[...u.values()]}},\n function _(o,e,n,t,r){t();const l=o(43),d=o(44);function u(o){let e=document.getElementById(o);if(null==e)throw new Error(`Error rendering Bokeh model: could not find #${o} HTML tag`);if(!document.body.contains(e))throw new Error(`Error rendering Bokeh model: element #${o} must be under `);if(\"SCRIPT\"==e.tagName){const o=l.div({class:n.BOKEH_ROOT});l.replaceWith(e,o),e=o}return e}n.BOKEH_ROOT=d.root,n._resolve_element=function(o){const{elementid:e}=o;return null!=e?u(e):document.body},n._resolve_root_elements=function(o){const e=[];if(null!=o.root_ids&&null!=o.roots)for(const n of o.root_ids)e.push(u(o.roots[n]));return e}},\n function _(n,o,t,s,e){s();const c=n(398),r=n(19),a=n(395);t._get_ws_url=function(n,o){let t,s=\"ws:\";return\"https:\"==window.location.protocol&&(s=\"wss:\"),null!=o?(t=document.createElement(\"a\"),t.href=o):t=window.location,null!=n?\"/\"==n&&(n=\"\"):n=t.pathname.replace(/\\/+$/,\"\"),s+\"//\"+t.host+n+\"/ws\"};const i={};t.add_document_from_session=async function(n,o,t,s=[],e=!1){const l=window.location.search.substr(1);let d;try{d=await function(n,o,t){const s=c.parse_token(o).session_id;n in i||(i[n]={});const e=i[n];return s in e||(e[s]=c.pull_session(n,o,t)),e[s]}(n,o,l)}catch(n){const t=c.parse_token(o).session_id;throw r.logger.error(`Failed to load Bokeh session ${t}: ${n}`),n}return a.add_document_standalone(d.document,t,s,e)}},\n function _(e,s,n,t,o){t();const r=e(19),i=e(5),c=e(399),l=e(400),_=e(401);n.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",n.DEFAULT_TOKEN=\"eyJzZXNzaW9uX2lkIjogImRlZmF1bHQifQ\";let h=0;function a(e){let s=e.split(\".\")[0];const n=s.length%4;return 0!=n&&(s+=\"=\".repeat(4-n)),JSON.parse(atob(s.replace(/_/g,\"/\").replace(/-/g,\"+\")))}n.parse_token=a;class d{constructor(e=n.DEFAULT_SERVER_WEBSOCKET_URL,s=n.DEFAULT_TOKEN,t=null){this.url=e,this.token=s,this.args_string=t,this._number=h++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_replies=new Map,this._pending_messages=[],this._receiver=new l.Receiver,this.id=a(s).session_id.split(\".\")[0],r.logger.debug(`Creating websocket ${this._number} to '${this.url}' session '${this.id}'`)}async connect(){if(this.closed_permanently)throw new Error(\"Cannot connect() a closed ClientConnection\");if(null!=this.socket)throw new Error(\"Already connected\");this._current_handler=null,this._pending_replies.clear(),this._pending_messages=[];try{let e=`${this.url}`;return null!=this.args_string&&this.args_string.length>0&&(e+=`?${this.args_string}`),this.socket=new WebSocket(e,[\"bokeh\",this.token]),new Promise(((e,s)=>{this.socket.binaryType=\"arraybuffer\",this.socket.onopen=()=>this._on_open(e,s),this.socket.onmessage=e=>this._on_message(e),this.socket.onclose=e=>this._on_close(e,s),this.socket.onerror=()=>this._on_error(s)}))}catch(e){throw r.logger.error(`websocket creation failed to url: ${this.url}`),r.logger.error(` - ${e}`),e}}close(){this.closed_permanently||(r.logger.debug(`Permanently closing websocket connection ${this._number}`),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,`close method called on ClientConnection ${this._number}`),this.session._connection_closed())}_schedule_reconnect(e){setTimeout((()=>{this.closed_permanently||r.logger.info(`Websocket connection ${this._number} disconnected, will not attempt to reconnect`)}),e)}send(e){if(null==this.socket)throw new Error(`not connected so cannot send ${e}`);e.send(this.socket)}async send_with_reply(e){const s=await new Promise(((s,n)=>{this._pending_replies.set(e.msgid(),{resolve:s,reject:n}),this.send(e)}));if(\"ERROR\"===s.msgtype())throw new Error(`Error reply ${s.content.text}`);return s}async _pull_doc_json(){const e=c.Message.create(\"PULL-DOC-REQ\",{}),s=await this.send_with_reply(e);if(!(\"doc\"in s.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return s.content.doc}async _repull_session_doc(e,s){var n;r.logger.debug(this.session?\"Repulling session\":\"Pulling session for first time\");try{const n=await this._pull_doc_json();if(null==this.session)if(this.closed_permanently)r.logger.debug(\"Got new document after connection was already closed\"),s(new Error(\"The connection has been closed\"));else{const s=i.Document.from_json(n),t=i.Document._compute_patch_since_json(n,s);if(t.events.length>0){r.logger.debug(`Sending ${t.events.length} changes from model construction back to server`);const e=c.Message.create(\"PATCH-DOC\",{},t);this.send(e)}this.session=new _.ClientSession(this,s,this.id);for(const e of this._pending_messages)this.session.handle(e);this._pending_messages=[],r.logger.debug(\"Created a new session from new pulled doc\"),e(this.session)}else this.session.document.replace_with_json(n),r.logger.debug(\"Updated existing session with new pulled doc\")}catch(e){null===(n=console.trace)||void 0===n||n.call(console,e),r.logger.error(`Failed to repull session ${e}`),s(e instanceof Error?e:`${e}`)}}_on_open(e,s){r.logger.info(`Websocket connection ${this._number} is now open`),this._current_handler=n=>{this._awaiting_ack_handler(n,e,s)}}_on_message(e){null==this._current_handler&&r.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(e.data)}catch(e){this._close_bad_protocol(`${e}`)}const s=this._receiver.message;if(null!=s){const e=s.problem();null!=e&&this._close_bad_protocol(e),this._current_handler(s)}}_on_close(e,s){r.logger.info(`Lost websocket ${this._number} connection, ${e.code} (${e.reason})`),this.socket=null,this._pending_replies.forEach((e=>e.reject(\"Disconnected\"))),this._pending_replies.clear(),this.closed_permanently||this._schedule_reconnect(2e3),s(new Error(`Lost websocket connection, ${e.code} (${e.reason})`))}_on_error(e){r.logger.debug(`Websocket error on socket ${this._number}`);const s=\"Could not open websocket\";r.logger.error(`Failed to connect to Bokeh server: ${s}`),e(new Error(s))}_close_bad_protocol(e){r.logger.error(`Closing connection: ${e}`),null!=this.socket&&this.socket.close(1002,e)}_awaiting_ack_handler(e,s,n){\"ACK\"===e.msgtype()?(this._current_handler=e=>this._steady_state_handler(e),this._repull_session_doc(s,n)):this._close_bad_protocol(\"First message was not an ACK\")}_steady_state_handler(e){const s=e.reqid(),n=this._pending_replies.get(s);n?(this._pending_replies.delete(s),n.resolve(e)):this.session?this.session.handle(e):\"PATCH-DOC\"!=e.msgtype()&&this._pending_messages.push(e)}}n.ClientConnection=d,d.__name__=\"ClientConnection\",n.pull_session=function(e,s,n){return new d(e,s,n).connect()}},\n function _(e,s,t,r,n){r();const i=e(34);class a{constructor(e,s,t){this.header=e,this.metadata=s,this.content=t,this.buffers=new Map}static assemble(e,s,t){const r=JSON.parse(e),n=JSON.parse(s),i=JSON.parse(t);return new a(r,n,i)}assemble_buffer(e,s){const t=null!=this.header.num_buffers?this.header.num_buffers:0;if(t<=this.buffers.size)throw new Error(`too many buffers received, expecting ${t}`);const{id:r}=JSON.parse(e);this.buffers.set(r,s)}static create(e,s,t={}){const r=a.create_header(e);return new a(r,s,t)}static create_header(e){return{msgid:i.uniqueId(),msgtype:e}}complete(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(null==this.header.num_buffers||this.buffers.size==this.header.num_buffers)}send(e){if((null!=this.header.num_buffers?this.header.num_buffers:0)>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");const s=JSON.stringify(this.header),t=JSON.stringify(this.metadata),r=JSON.stringify(this.content);e.send(s),e.send(t),e.send(r)}msgid(){return this.header.msgid}msgtype(){return this.header.msgtype}reqid(){return this.header.reqid}problem(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"}}t.Message=a,a.__name__=\"Message\"},\n function _(e,t,s,_,r){_();const i=e(399),h=e(8);class a{constructor(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}consume(e){this._current_consumer(e)}_HEADER(e){this._assume_text(e),this.message=null,this._partial=null,this._fragments=[e],this._buf_header=null,this._current_consumer=this._METADATA}_METADATA(e){this._assume_text(e),this._fragments.push(e),this._current_consumer=this._CONTENT}_CONTENT(e){this._assume_text(e),this._fragments.push(e);const[t,s,_]=this._fragments.slice(0,3);this._partial=i.Message.assemble(t,s,_),this._check_complete()}_BUFFER_HEADER(e){this._assume_text(e),this._buf_header=e,this._current_consumer=this._BUFFER_PAYLOAD}_BUFFER_PAYLOAD(e){this._assume_binary(e),this._partial.assemble_buffer(this._buf_header,e),this._check_complete()}_assume_text(e){if(!h.isString(e))throw new Error(\"Expected text fragment but received binary fragment\")}_assume_binary(e){if(!(e instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")}_check_complete(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER}}s.Receiver=a,a.__name__=\"Receiver\"},\n function _(e,t,n,s,o){s();const c=e(5),i=e(399),_=e(19);class r{constructor(e,t,n){this._connection=e,this.document=t,this.id=n,this._document_listener=e=>{this._document_changed(e)},this.document.on_change(this._document_listener,!0)}handle(e){const t=e.msgtype();\"PATCH-DOC\"===t?this._handle_patch(e):\"OK\"===t?this._handle_ok(e):\"ERROR\"===t?this._handle_error(e):_.logger.debug(`Doing nothing with message ${e.msgtype()}`)}close(){this._connection.close()}_connection_closed(){this.document.remove_on_change(this._document_listener)}async request_server_info(){const e=i.Message.create(\"SERVER-INFO-REQ\",{});return(await this._connection.send_with_reply(e)).content}async force_roundtrip(){await this.request_server_info()}_document_changed(e){if(e.setter_id===this.id)return;const t=e instanceof c.DocumentEventBatch?e.events:[e],n=this.document.create_json_patch(t),s=i.Message.create(\"PATCH-DOC\",{},n);this._connection.send(s)}_handle_patch(e){this.document.apply_json_patch(e.content,e.buffers,this.id)}_handle_ok(e){_.logger.trace(`Unhandled OK reply to ${e.reqid()}`)}_handle_error(e){_.logger.error(`Unhandled ERROR reply to ${e.reqid()}: ${e.content.text}`)}}n.ClientSession=r,r.__name__=\"ClientSession\"},\n function _(e,o,t,n,r){n();const s=e(1),l=e(5),i=e(400),a=e(19),c=e(43),g=e(13),f=e(395),u=e(396),m=s.__importDefault(e(44)),p=s.__importDefault(e(253)),d=s.__importDefault(e(403));function _(e,o){o.buffers.length>0?e.consume(o.buffers[0].buffer):e.consume(o.content.data);const t=e.message;null!=t&&this.apply_json_patch(t.content,t.buffers)}function b(e,o){if(\"undefined\"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){a.logger.info(`Registering Jupyter comms for target ${e}`);const t=Jupyter.notebook.kernel.comm_manager;try{t.register_target(e,(t=>{a.logger.info(`Registering Jupyter comms for target ${e}`);const n=new i.Receiver;t.on_msg(_.bind(o,n))}))}catch(e){a.logger.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if(o.roots()[0].id in t.kernels){a.logger.info(`Registering JupyterLab comms for target ${e}`);const n=t.kernels[o.roots()[0].id];try{n.registerCommTarget(e,(t=>{a.logger.info(`Registering JupyterLab comms for target ${e}`);const n=new i.Receiver;t.onMsg=_.bind(o,n)}))}catch(e){a.logger.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if(\"undefined\"!=typeof google&&null!=google.colab.kernel){a.logger.info(`Registering Google Colab comms for target ${e}`);const t=google.colab.kernel.comms;try{t.registerTarget(e,(async t=>{var n,r,l;a.logger.info(`Registering Google Colab comms for target ${e}`);const c=new i.Receiver;try{for(var g,f=s.__asyncValues(t.messages);!(g=await f.next()).done;){const e=g.value,t={data:e.data},n=[];for(const o of null!==(l=e.buffers)&&void 0!==l?l:[])n.push(new DataView(o));const r={content:t,buffers:n};_.bind(o)(c,r)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=f.return)&&await r.call(f)}finally{if(n)throw n.error}}}))}catch(e){a.logger.warn(`Google Colab comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest @bokeh/jupyter_bokeh extension is installed. In an exported notebook this warning is expected.\")}c.stylesheet.append(m.default),c.stylesheet.append(p.default),c.stylesheet.append(d.default),t.kernels={},t.embed_items_notebook=function(e,o){if(1!=g.size(e))throw new Error(\"embed_items_notebook expects exactly one document in docs_json\");const t=l.Document.from_json(g.values(e)[0]);for(const e of o){null!=e.notebook_comms_target&&b(e.notebook_comms_target,t);const o=u._resolve_element(e),n=u._resolve_root_elements(e);f.add_document_standalone(t,o,n)}}},\n function _(t,o,r,e,d){e(),r.root=\"bk-root\",r.tooltip=\"bk-tooltip\",r.default=\".rendered_html .bk-root .bk-tooltip table,.rendered_html .bk-root .bk-tooltip tr,.rendered_html .bk-root .bk-tooltip th,.rendered_html .bk-root .bk-tooltip td{border:none;padding:1px;}\"},\n function _(t,_,o,r,n){r();const a=t(1);a.__exportStar(t(399),o),a.__exportStar(t(400),o)},\n function _(e,t,n,s,o){function l(){const e=document.getElementsByTagName(\"body\")[0],t=document.getElementsByClassName(\"bokeh-test-div\");1==t.length&&(e.removeChild(t[0]),delete t[0]);const n=document.createElement(\"div\");n.classList.add(\"bokeh-test-div\"),n.style.display=\"none\",e.insertBefore(n,e.firstChild)}s(),n.results={},n.init=function(){l()},n.record0=function(e,t){n.results[e]=t},n.record=function(e,t){n.results[e]=t,l()},n.count=function(e){null==n.results[e]&&(n.results[e]=0),n.results[e]+=1,l()}},\n function _(e,t,o,n,l){n(),o.safely=function(e,t=!1){try{return e()}catch(e){if(function(e){const t=document.createElement(\"div\");t.style.backgroundColor=\"#f2dede\",t.style.border=\"1px solid #a94442\",t.style.borderRadius=\"4px\",t.style.display=\"inline-block\",t.style.fontFamily=\"sans-serif\",t.style.marginTop=\"5px\",t.style.minWidth=\"200px\",t.style.padding=\"5px 5px 5px 10px\",t.classList.add(\"bokeh-error-box-into-flames\");const o=document.createElement(\"span\");o.style.backgroundColor=\"#a94442\",o.style.borderRadius=\"0px 4px 0px 0px\",o.style.color=\"white\",o.style.cursor=\"pointer\",o.style.cssFloat=\"right\",o.style.fontSize=\"0.8em\",o.style.margin=\"-6px -6px 0px 0px\",o.style.padding=\"2px 5px 4px 5px\",o.title=\"close\",o.setAttribute(\"aria-label\",\"close\"),o.appendChild(document.createTextNode(\"x\")),o.addEventListener(\"click\",(()=>s.removeChild(t)));const n=document.createElement(\"h3\");n.style.color=\"#a94442\",n.style.margin=\"8px 0px 0px 0px\",n.style.padding=\"0px\",n.appendChild(document.createTextNode(\"Bokeh Error\"));const l=document.createElement(\"pre\");l.style.whiteSpace=\"unset\",l.style.overflowX=\"auto\",l.appendChild(document.createTextNode(e)),t.appendChild(o),t.appendChild(n),t.appendChild(l);const s=document.getElementsByTagName(\"body\")[0];s.insertBefore(t,s.firstChild)}(e instanceof Error&&e.stack?e.stack:`${e}`),t)return;throw e}}},\n ], 0, {\"main\":0,\"tslib\":1,\"index\":2,\"version\":3,\"embed/index\":4,\"document/index\":5,\"document/document\":6,\"base\":7,\"core/util/types\":8,\"core/util/array\":9,\"core/util/math\":10,\"core/util/assert\":11,\"core/util/arrayable\":12,\"core/util/object\":13,\"core/has_props\":14,\"core/signaling\":15,\"core/util/defer\":16,\"core/util/refs\":17,\"core/properties\":18,\"core/logging\":19,\"core/enums\":20,\"core/kinds\":21,\"core/util/color\":22,\"core/util/svg_colors\":23,\"core/types\":24,\"core/util/bitset\":25,\"core/util/eq\":26,\"core/util/platform\":27,\"core/settings\":28,\"core/util/ndarray\":29,\"core/serializer\":30,\"core/util/serialization\":31,\"core/util/buffer\":32,\"core/uniforms\":33,\"core/util/string\":34,\"document/events\":35,\"core/util/pretty\":36,\"core/util/cloneable\":37,\"models/index\":38,\"models/annotations/index\":39,\"models/annotations/annotation\":40,\"models/renderers/renderer\":41,\"core/view\":42,\"core/dom\":43,\"styles/root.css\":44,\"core/visuals/index\":45,\"core/visuals/line\":46,\"core/visuals/visual\":47,\"core/property_mixins\":48,\"core/visuals/fill\":49,\"core/visuals/text\":50,\"core/visuals/hatch\":51,\"core/visuals/patterns\":52,\"model\":53,\"models/canvas/coordinates\":54,\"models/annotations/arrow\":55,\"models/annotations/data_annotation\":56,\"models/sources/columnar_data_source\":57,\"models/sources/data_source\":58,\"models/selections/selection\":59,\"core/selection_manager\":60,\"models/renderers/glyph_renderer\":61,\"models/renderers/data_renderer\":62,\"models/glyphs/line\":63,\"models/glyphs/xy_glyph\":64,\"core/util/projections\":65,\"models/glyphs/glyph\":98,\"core/util/bbox\":99,\"core/util/ragged_array\":100,\"core/util/spatial\":101,\"models/ranges/factor_range\":104,\"models/ranges/range\":105,\"models/glyphs/utils\":106,\"core/hittest\":107,\"models/glyphs/webgl/line\":108,\"models/glyphs/webgl/utils/index\":109,\"models/glyphs/webgl/utils/program\":110,\"models/glyphs/webgl/utils/buffer\":111,\"models/glyphs/webgl/utils/texture\":112,\"models/glyphs/webgl/base\":113,\"models/glyphs/webgl/line.vert\":114,\"models/glyphs/webgl/line.frag\":115,\"models/glyphs/patch\":116,\"models/glyphs/harea\":117,\"models/glyphs/area\":118,\"models/glyphs/varea\":119,\"models/sources/cds_view\":120,\"models/filters/filter\":121,\"core/build_views\":122,\"models/renderers/graph_renderer\":123,\"models/expressions/expression\":124,\"models/graphs/layout_provider\":125,\"models/graphs/graph_hit_test_policy\":126,\"models/glyphs/multi_line\":127,\"models/glyphs/patches\":128,\"models/selections/interaction_policy\":129,\"models/sources/column_data_source\":130,\"core/util/typed_array\":131,\"core/util/set\":132,\"models/annotations/arrow_head\":133,\"models/annotations/band\":134,\"models/annotations/upper_lower\":135,\"models/annotations/box_annotation\":136,\"models/annotations/color_bar\":137,\"models/annotations/title\":138,\"models/annotations/text_annotation\":139,\"core/layout/side_panel\":140,\"core/layout/types\":141,\"core/layout/layoutable\":142,\"core/util/text\":143,\"models/canvas/cartesian_frame\":144,\"models/scales/categorical_scale\":145,\"models/scales/scale\":146,\"models/transforms/index\":147,\"models/transforms/customjs_transform\":148,\"models/transforms/transform\":149,\"models/transforms/dodge\":150,\"models/transforms/range_transform\":151,\"models/transforms/interpolator\":152,\"models/transforms/jitter\":153,\"models/transforms/linear_interpolator\":154,\"models/transforms/step_interpolator\":155,\"models/ranges/range1d\":156,\"models/scales/log_scale\":157,\"models/scales/continuous_scale\":158,\"models/ranges/data_range1d\":159,\"models/ranges/data_range\":160,\"models/util\":161,\"models/axes/index\":162,\"models/axes/axis\":163,\"models/renderers/guide_renderer\":164,\"models/tickers/ticker\":165,\"models/formatters/tick_formatter\":166,\"core/graphics\":167,\"core/util/affine\":168,\"models/policies/labeling\":169,\"models/axes/categorical_axis\":170,\"models/tickers/categorical_ticker\":171,\"models/formatters/categorical_tick_formatter\":172,\"models/axes/continuous_axis\":173,\"models/axes/datetime_axis\":174,\"models/axes/linear_axis\":175,\"models/formatters/basic_tick_formatter\":176,\"models/tickers/basic_ticker\":177,\"models/tickers/adaptive_ticker\":178,\"models/tickers/continuous_ticker\":179,\"models/formatters/datetime_tick_formatter\":180,\"core/util/templating\":182,\"models/tickers/datetime_ticker\":185,\"models/tickers/composite_ticker\":186,\"models/tickers/days_ticker\":187,\"models/tickers/single_interval_ticker\":188,\"models/tickers/util\":189,\"models/tickers/months_ticker\":190,\"models/tickers/years_ticker\":191,\"models/axes/log_axis\":192,\"models/formatters/log_tick_formatter\":193,\"models/tickers/log_ticker\":194,\"models/axes/mercator_axis\":195,\"models/formatters/mercator_tick_formatter\":196,\"models/tickers/mercator_ticker\":197,\"models/tickers/index\":198,\"models/tickers/fixed_ticker\":199,\"models/tickers/binned_ticker\":200,\"models/mappers/scanning_color_mapper\":201,\"models/mappers/continuous_color_mapper\":202,\"models/mappers/color_mapper\":203,\"models/mappers/mapper\":204,\"models/formatters/index\":205,\"models/formatters/func_tick_formatter\":206,\"models/formatters/numeral_tick_formatter\":207,\"models/formatters/printf_tick_formatter\":208,\"models/mappers/index\":209,\"models/mappers/categorical_color_mapper\":210,\"models/mappers/categorical_mapper\":211,\"models/mappers/categorical_marker_mapper\":212,\"models/mappers/categorical_pattern_mapper\":213,\"models/mappers/linear_color_mapper\":214,\"models/mappers/log_color_mapper\":215,\"models/mappers/eqhist_color_mapper\":216,\"models/scales/index\":217,\"models/scales/linear_scale\":218,\"models/scales/linear_interpolation_scale\":219,\"models/ranges/index\":220,\"core/layout/index\":221,\"core/layout/alignments\":222,\"core/layout/grid\":223,\"core/layout/html\":224,\"core/layout/border\":225,\"models/annotations/label\":226,\"models/annotations/label_set\":227,\"models/annotations/legend\":228,\"models/annotations/legend_item\":229,\"core/vectorization\":230,\"models/annotations/poly_annotation\":231,\"models/annotations/slope\":232,\"models/annotations/span\":233,\"models/annotations/toolbar_panel\":234,\"models/tools/toolbar\":235,\"models/tools/tool\":236,\"models/tools/gestures/gesture_tool\":237,\"models/tools/button_tool\":238,\"core/dom_view\":240,\"styles/toolbar.css\":241,\"styles/icons.css\":242,\"styles/menus.css\":243,\"core/util/menus\":244,\"core/util/iterator\":245,\"models/tools/on_off_button\":246,\"models/tools/inspectors/inspect_tool\":247,\"models/tools/toolbar_base\":248,\"core/util/canvas\":249,\"core/util/svg\":250,\"models/tools/actions/action_tool\":251,\"models/tools/actions/help_tool\":252,\"styles/logo.css\":253,\"models/annotations/tooltip\":254,\"styles/tooltips.css\":255,\"models/annotations/whisker\":256,\"models/callbacks/index\":257,\"models/callbacks/customjs\":258,\"models/callbacks/callback\":259,\"models/callbacks/open_url\":260,\"models/canvas/index\":261,\"models/canvas/canvas\":262,\"core/ui_events\":263,\"core/bokeh_events\":264,\"core/util/wheel\":265,\"models/expressions/index\":266,\"models/expressions/customjs_expr\":267,\"models/expressions/stack\":268,\"models/expressions/cumsum\":269,\"models/expressions/minimum\":270,\"models/expressions/maximum\":271,\"models/filters/index\":272,\"models/filters/boolean_filter\":273,\"models/filters/customjs_filter\":274,\"models/filters/group_filter\":275,\"models/filters/index_filter\":276,\"models/glyphs/index\":277,\"models/glyphs/annular_wedge\":278,\"models/glyphs/annulus\":279,\"models/glyphs/arc\":280,\"models/glyphs/bezier\":281,\"models/glyphs/circle\":282,\"models/glyphs/webgl/markers\":283,\"models/glyphs/webgl/markers.vert\":284,\"models/glyphs/webgl/markers.frag\":285,\"models/glyphs/ellipse\":286,\"models/glyphs/ellipse_oval\":287,\"models/glyphs/center_rotatable\":288,\"models/glyphs/hbar\":289,\"models/glyphs/box\":290,\"models/glyphs/hex_tile\":291,\"models/glyphs/image\":292,\"models/glyphs/image_base\":293,\"models/glyphs/image_rgba\":294,\"models/glyphs/image_url\":295,\"core/util/image\":296,\"models/glyphs/multi_polygons\":297,\"models/glyphs/oval\":298,\"models/glyphs/quad\":299,\"models/glyphs/quadratic\":300,\"models/glyphs/ray\":301,\"models/glyphs/rect\":302,\"models/glyphs/scatter\":303,\"models/glyphs/marker\":304,\"models/glyphs/defs\":305,\"models/glyphs/segment\":306,\"models/glyphs/spline\":307,\"core/util/interpolation\":308,\"models/glyphs/step\":309,\"models/glyphs/text\":310,\"models/glyphs/vbar\":311,\"models/glyphs/wedge\":312,\"models/graphs/index\":313,\"models/graphs/static_layout_provider\":314,\"models/grids/index\":315,\"models/grids/grid\":316,\"models/layouts/index\":317,\"models/layouts/box\":318,\"models/layouts/layout_dom\":319,\"models/layouts/column\":320,\"models/layouts/grid_box\":321,\"models/layouts/html_box\":322,\"models/layouts/panel\":323,\"models/layouts/row\":324,\"models/layouts/spacer\":325,\"models/layouts/tabs\":326,\"styles/tabs.css\":327,\"styles/buttons.css\":328,\"models/layouts/widget_box\":329,\"models/plots/index\":330,\"models/plots/gmap_plot\":331,\"models/plots/plot\":332,\"models/plots/plot_canvas\":333,\"core/util/throttle\":334,\"models/plots/range_manager\":335,\"models/plots/state_manager\":336,\"models/plots/gmap_plot_canvas\":337,\"models/policies/index\":338,\"models/renderers/index\":339,\"models/selections/index\":340,\"models/sources/index\":341,\"models/sources/server_sent_data_source\":342,\"models/sources/web_data_source\":343,\"models/sources/ajax_data_source\":344,\"models/sources/geojson_data_source\":345,\"models/tiles/index\":346,\"models/tiles/bbox_tile_source\":347,\"models/tiles/mercator_tile_source\":348,\"models/tiles/tile_source\":349,\"models/tiles/tile_utils\":350,\"models/tiles/quadkey_tile_source\":351,\"models/tiles/tile_renderer\":352,\"models/tiles/wmts_tile_source\":353,\"styles/tiles.css\":354,\"models/tiles/tms_tile_source\":355,\"models/textures/index\":356,\"models/textures/canvas_texture\":357,\"models/textures/texture\":358,\"models/textures/image_url_texture\":359,\"models/tools/index\":360,\"models/tools/actions/custom_action\":361,\"models/tools/actions/redo_tool\":362,\"models/tools/actions/reset_tool\":363,\"models/tools/actions/save_tool\":364,\"models/tools/actions/undo_tool\":365,\"models/tools/actions/zoom_in_tool\":366,\"models/tools/actions/zoom_base_tool\":367,\"core/util/zoom\":368,\"models/tools/actions/zoom_out_tool\":369,\"models/tools/edit/edit_tool\":370,\"models/tools/edit/box_edit_tool\":371,\"models/tools/edit/freehand_draw_tool\":372,\"models/tools/edit/point_draw_tool\":373,\"models/tools/edit/poly_draw_tool\":374,\"models/tools/edit/poly_tool\":375,\"models/tools/edit/poly_edit_tool\":376,\"models/tools/gestures/box_select_tool\":377,\"models/tools/gestures/select_tool\":378,\"models/tools/gestures/box_zoom_tool\":379,\"models/tools/gestures/lasso_select_tool\":380,\"models/tools/gestures/poly_select_tool\":381,\"models/tools/edit/line_edit_tool\":382,\"models/tools/edit/line_tool\":383,\"models/tools/gestures/pan_tool\":384,\"models/tools/gestures/range_tool\":385,\"models/tools/gestures/tap_tool\":386,\"models/tools/gestures/wheel_pan_tool\":387,\"models/tools/gestures/wheel_zoom_tool\":388,\"models/tools/inspectors/crosshair_tool\":389,\"models/tools/inspectors/customjs_hover\":390,\"models/tools/inspectors/hover_tool\":391,\"models/tools/tool_proxy\":392,\"models/tools/toolbar_box\":393,\"document/defs\":394,\"embed/standalone\":395,\"embed/dom\":396,\"embed/server\":397,\"client/connection\":398,\"protocol/message\":399,\"protocol/receiver\":400,\"client/session\":401,\"embed/notebook\":402,\"styles/notebook.css\":403,\"protocol/index\":404,\"testing\":405,\"safely\":406}, {});});\n\n /* END bokeh.min.js */\n },\n \n function(Bokeh) {\n /* BEGIN bokeh-widgets.min.js */\n /*!\n * Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * \n * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * \n * Neither the name of Anaconda nor the names of any contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n (function(root, factory) {\n factory(root[\"Bokeh\"], \"2.3.0\");\n })(this, function(Bokeh, version) {\n var define;\n return (function(modules, entry, aliases, externals) {\n const bokeh = typeof Bokeh !== \"undefined\" && (version != null ? Bokeh[version] : Bokeh);\n if (bokeh != null) {\n return bokeh.register_plugin(modules, entry, aliases);\n } else {\n throw new Error(\"Cannot find Bokeh \" + version + \". You have to load it prior to loading plugins.\");\n }\n })\n ({\n 417: function _(t,e,i,o,r){o();const s=t(1).__importStar(t(418));i.Widgets=s;t(7).register_models(s)},\n 418: function _(t,e,o,r,u){r(),u(\"AbstractButton\",t(419).AbstractButton),u(\"AbstractIcon\",t(422).AbstractIcon),u(\"AutocompleteInput\",t(423).AutocompleteInput),u(\"Button\",t(428).Button),u(\"CheckboxButtonGroup\",t(429).CheckboxButtonGroup),u(\"CheckboxGroup\",t(431).CheckboxGroup),u(\"ColorPicker\",t(433).ColorPicker),u(\"DatePicker\",t(434).DatePicker),u(\"DateRangeSlider\",t(437).DateRangeSlider),u(\"DateSlider\",t(442).DateSlider),u(\"Div\",t(443).Div),u(\"Dropdown\",t(446).Dropdown),u(\"FileInput\",t(447).FileInput),u(\"InputWidget\",t(426).InputWidget),u(\"Markup\",t(444).Markup),u(\"MultiSelect\",t(448).MultiSelect),u(\"Paragraph\",t(449).Paragraph),u(\"PasswordInput\",t(450).PasswordInput),u(\"MultiChoice\",t(451).MultiChoice),u(\"NumericInput\",t(454).NumericInput),u(\"PreText\",t(455).PreText),u(\"RadioButtonGroup\",t(456).RadioButtonGroup),u(\"RadioGroup\",t(457).RadioGroup),u(\"RangeSlider\",t(458).RangeSlider),u(\"Select\",t(459).Select),u(\"Slider\",t(460).Slider),u(\"Spinner\",t(461).Spinner),u(\"TextInput\",t(424).TextInput),u(\"TextAreaInput\",t(462).TextAreaInput),u(\"Toggle\",t(463).Toggle),u(\"Widget\",t(488).Widget)},\n 419: function _(t,e,n,i,s){i();const l=t(1),o=t(20),r=t(43),c=t(122),u=t(420),_=t(422),a=l.__importStar(t(328)),b=a;class d extends u.ControlView{*controls(){yield this.button_el}async lazy_initialize(){await super.lazy_initialize();const{icon:t}=this.model;null!=t&&(this.icon_view=await c.build_view(t,{parent:this}))}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}remove(){null!=this.icon_view&&this.icon_view.remove(),super.remove()}styles(){return[...super.styles(),a.default]}_render_button(...t){return r.button({type:\"button\",disabled:this.model.disabled,class:[b.btn,b[`btn_${this.model.button_type}`]]},...t)}render(){super.render(),this.button_el=this._render_button(this.model.label),this.button_el.addEventListener(\"click\",(()=>this.click())),null!=this.icon_view&&(\"\"!=this.model.label?r.prepend(this.button_el,this.icon_view.el,r.nbsp()):r.prepend(this.button_el,this.icon_view.el),this.icon_view.render()),this.group_el=r.div({class:b.btn_group},this.button_el),this.el.appendChild(this.group_el)}click(){}}n.AbstractButtonView=d,d.__name__=\"AbstractButtonView\";class h extends u.Control{constructor(t){super(t)}static init_AbstractButton(){this.define((({String:t,Ref:e,Nullable:n})=>({label:[t,\"Button\"],icon:[n(e(_.AbstractIcon)),null],button_type:[o.ButtonType,\"default\"]})))}}n.AbstractButton=h,h.__name__=\"AbstractButton\",h.init_AbstractButton()},\n 420: function _(t,e,o,s,n){s();const i=t(488),l=t(43);class c extends i.WidgetView{connect_signals(){super.connect_signals();const t=this.model.properties;this.on_change(t.disabled,(()=>{for(const t of this.controls())l.toggle_attribute(t,\"disabled\",this.model.disabled)}))}}o.ControlView=c,c.__name__=\"ControlView\";class r extends i.Widget{constructor(t){super(t)}}o.Control=r,r.__name__=\"Control\"},\n 488: function _(i,t,e,o,n){o();const s=i(322),r=i(20);class d extends s.HTMLBoxView{_width_policy(){return\"horizontal\"==this.model.orientation?super._width_policy():\"fixed\"}_height_policy(){return\"horizontal\"==this.model.orientation?\"fixed\":super._height_policy()}box_sizing(){const i=super.box_sizing();return\"horizontal\"==this.model.orientation?null==i.width&&(i.width=this.model.default_size):null==i.height&&(i.height=this.model.default_size),i}}e.WidgetView=d,d.__name__=\"WidgetView\";class _ extends s.HTMLBox{constructor(i){super(i)}static init_Widget(){this.define((({Number:i})=>({orientation:[r.Orientation,\"horizontal\"],default_size:[i,300]}))),this.override({margin:[5,5,5,5]})}}e.Widget=_,_.__name__=\"Widget\",_.init_Widget()},\n 422: function _(c,t,s,n,e){n();const o=c(53),_=c(240);class a extends _.DOMView{}s.AbstractIconView=a,a.__name__=\"AbstractIconView\";class r extends o.Model{constructor(c){super(c)}}s.AbstractIcon=r,r.__name__=\"AbstractIcon\"},\n 423: function _(e,t,n,i,s){i();const h=e(1),o=e(424),_=e(43),u=e(10),r=h.__importStar(e(243)),c=r;class l extends o.TextInputView{constructor(){super(...arguments),this._open=!1,this._last_value=\"\",this._hover_index=0}styles(){return[...super.styles(),r.default]}render(){super.render(),this.input_el.addEventListener(\"keydown\",(e=>this._keydown(e))),this.input_el.addEventListener(\"keyup\",(e=>this._keyup(e))),this.menu=_.div({class:[c.menu,c.below]}),this.menu.addEventListener(\"click\",(e=>this._menu_click(e))),this.menu.addEventListener(\"mouseover\",(e=>this._menu_hover(e))),this.el.appendChild(this.menu),_.undisplay(this.menu)}change_input(){this._open&&this.menu.children.length>0&&(this.model.value=this.menu.children[this._hover_index].textContent,this.input_el.focus(),this._hide_menu()),this.model.restrict||super.change_input()}_update_completions(e){_.empty(this.menu);for(const t of e){const e=_.div({},t);this.menu.appendChild(e)}e.length>0&&this.menu.children[0].classList.add(c.active)}_show_menu(){if(!this._open){this._open=!0,this._hover_index=0,this._last_value=this.model.value,_.display(this.menu);const e=t=>{const{target:n}=t;n instanceof HTMLElement&&!this.el.contains(n)&&(document.removeEventListener(\"click\",e),this._hide_menu())};document.addEventListener(\"click\",e)}}_hide_menu(){this._open&&(this._open=!1,_.undisplay(this.menu))}_menu_click(e){e.target!=e.currentTarget&&e.target instanceof Element&&(this.model.value=e.target.textContent,this.input_el.focus(),this._hide_menu())}_menu_hover(e){if(e.target!=e.currentTarget&&e.target instanceof Element){let t=0;for(t=0;t0&&(this.menu.children[this._hover_index].classList.remove(c.active),this._hover_index=u.clamp(e,0,t-1),this.menu.children[this._hover_index].classList.add(c.active))}_keydown(e){}_keyup(e){switch(e.keyCode){case _.Keys.Enter:this.change_input();break;case _.Keys.Esc:this._hide_menu();break;case _.Keys.Up:this._bump_hover(this._hover_index-1);break;case _.Keys.Down:this._bump_hover(this._hover_index+1);break;default:{const e=this.input_el.value;if(e.lengthe:e=>e.toLowerCase();for(const n of this.model.completions)i(n).startsWith(i(e))&&t.push(n);this._update_completions(t),0==t.length?this._hide_menu():this._show_menu()}}}}n.AutocompleteInputView=l,l.__name__=\"AutocompleteInputView\";class a extends o.TextInput{constructor(e){super(e)}static init_AutocompleteInput(){this.prototype.default_view=l,this.define((({Boolean:e,Int:t,String:n,Array:i})=>({completions:[i(n),[]],min_characters:[t,2],case_sensitive:[e,!0],restrict:[e,!0]})))}}n.AutocompleteInput=a,a.__name__=\"AutocompleteInput\",a.init_AutocompleteInput()},\n 424: function _(t,e,n,i,p){i();const _=t(1),u=t(425),s=t(43),x=_.__importStar(t(427));class a extends u.TextLikeInputView{_render_input(){this.input_el=s.input({type:\"text\",class:x.input})}}n.TextInputView=a,a.__name__=\"TextInputView\";class c extends u.TextLikeInput{constructor(t){super(t)}static init_TextInput(){this.prototype.default_view=a}}n.TextInput=c,c.__name__=\"TextInput\",c.init_TextInput()},\n 425: function _(e,t,n,i,l){i();const s=e(426);class h extends s.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>{var e;return this.input_el.name=null!==(e=this.model.name)&&void 0!==e?e:\"\"})),this.connect(this.model.properties.value.change,(()=>this.input_el.value=this.model.value)),this.connect(this.model.properties.value_input.change,(()=>this.input_el.value=this.model.value_input)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled)),this.connect(this.model.properties.placeholder.change,(()=>this.input_el.placeholder=this.model.placeholder)),this.connect(this.model.properties.max_length.change,(()=>{const{max_length:e}=this.model;null!=e?this.input_el.maxLength=e:this.input_el.removeAttribute(\"maxLength\")}))}render(){var e;super.render(),this._render_input();const{input_el:t}=this;t.name=null!==(e=this.model.name)&&void 0!==e?e:\"\",t.value=this.model.value,t.disabled=this.model.disabled,t.placeholder=this.model.placeholder,null!=this.model.max_length&&(t.maxLength=this.model.max_length),t.addEventListener(\"change\",(()=>this.change_input())),t.addEventListener(\"input\",(()=>this.change_input_value())),this.group_el.appendChild(t)}change_input(){this.model.value=this.input_el.value,super.change_input()}change_input_value(){this.model.value_input=this.input_el.value,super.change_input()}}n.TextLikeInputView=h,h.__name__=\"TextLikeInputView\";class a extends s.InputWidget{constructor(e){super(e)}static init_TextLikeInput(){this.define((({Int:e,String:t,Nullable:n})=>({value:[t,\"\"],value_input:[t,\"\"],placeholder:[t,\"\"],max_length:[n(e),null]})))}}n.TextLikeInput=a,a.__name__=\"TextLikeInput\",a.init_TextLikeInput()},\n 426: function _(t,e,i,n,s){n();const l=t(1),o=t(420),r=t(43),_=l.__importStar(t(427)),p=_;class d extends o.ControlView{*controls(){yield this.input_el}connect_signals(){super.connect_signals(),this.connect(this.model.properties.title.change,(()=>{this.label_el.textContent=this.model.title}))}styles(){return[...super.styles(),_.default]}render(){super.render();const{title:t}=this.model;this.label_el=r.label({style:{display:0==t.length?\"none\":\"\"}},t),this.group_el=r.div({class:p.input_group},this.label_el),this.el.appendChild(this.group_el)}change_input(){}}i.InputWidgetView=d,d.__name__=\"InputWidgetView\";class u extends o.Control{constructor(t){super(t)}static init_InputWidget(){this.define((({String:t})=>({title:[t,\"\"]})))}}i.InputWidget=u,u.__name__=\"InputWidget\",u.init_InputWidget()},\n 427: function _(o,i,t,n,p){n(),t.root=\"bk-root\",t.input=\"bk-input\",t.input_group=\"bk-input-group\",t.inline=\"bk-inline\",t.spin_wrapper=\"bk-spin-wrapper\",t.spin_btn=\"bk-spin-btn\",t.spin_btn_up=\"bk-spin-btn-up\",t.spin_btn_down=\"bk-spin-btn-down\",t.default='.bk-root .bk-input{display:inline-block;width:100%;flex-grow:1;-webkit-flex-grow:1;min-height:31px;padding:0 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;}.bk-root .bk-input:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);}.bk-root .bk-input::placeholder,.bk-root .bk-input:-ms-input-placeholder,.bk-root .bk-input::-moz-placeholder,.bk-root .bk-input::-webkit-input-placeholder{color:#999;opacity:1;}.bk-root .bk-input[disabled]{cursor:not-allowed;background-color:#eee;opacity:1;}.bk-root select:not([multiple]).bk-input,.bk-root select:not([size]).bk-input{height:auto;appearance:none;-webkit-appearance:none;background-image:url(\\'data:image/svg+xml;utf8,\\');background-position:right 0.5em center;background-size:8px 6px;background-repeat:no-repeat;}.bk-root select[multiple].bk-input,.bk-root select[size].bk-input,.bk-root textarea.bk-input{height:auto;}.bk-root .bk-input-group{width:100%;height:100%;display:inline-flex;display:-webkit-inline-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;align-items:start;-webkit-align-items:start;flex-direction:column;-webkit-flex-direction:column;white-space:nowrap;}.bk-root .bk-input-group.bk-inline{flex-direction:row;-webkit-flex-direction:row;}.bk-root .bk-input-group.bk-inline > *:not(:first-child){margin-left:5px;}.bk-root .bk-input-group input[type=\"checkbox\"] + span,.bk-root .bk-input-group input[type=\"radio\"] + span{position:relative;top:-2px;margin-left:3px;}.bk-root .bk-input-group > .bk-spin-wrapper{display:inherit;width:inherit;height:inherit;position:relative;overflow:hidden;padding:0;vertical-align:middle;}.bk-root .bk-input-group > .bk-spin-wrapper input{padding-right:20px;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn{position:absolute;display:block;height:50%;min-height:0;min-width:0;width:30px;padding:0;margin:0;right:0;border:none;background:none;cursor:pointer;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn:before{content:\"\";display:inline-block;transform:translateY(-50%);border-left:5px solid transparent;border-right:5px solid transparent;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up{top:0;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up:before{border-bottom:5px solid black;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up:disabled:before{border-bottom-color:grey;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down{bottom:0;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down:before{border-top:5px solid black;}.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down:disabled:before{border-top-color:grey;}'},\n 428: function _(t,e,n,i,o){i();const s=t(419),u=t(264);class c extends s.AbstractButtonView{click(){this.model.trigger_event(new u.ButtonClick),super.click()}}n.ButtonView=c,c.__name__=\"ButtonView\";class _ extends s.AbstractButton{constructor(t){super(t)}static init_Button(){this.prototype.default_view=c,this.override({label:\"Button\"})}}n.Button=_,_.__name__=\"Button\",_.init_Button()},\n 429: function _(t,e,o,i,c){i();const n=t(1),s=t(430),a=t(43),u=n.__importStar(t(328));class r extends s.ButtonGroupView{get active(){return new Set(this.model.active)}change_active(t){const{active:e}=this;e.has(t)?e.delete(t):e.add(t),this.model.active=[...e].sort()}_update_active(){const{active:t}=this;this._buttons.forEach(((e,o)=>{a.classes(e).toggle(u.active,t.has(o))}))}}o.CheckboxButtonGroupView=r,r.__name__=\"CheckboxButtonGroupView\";class _ extends s.ButtonGroup{constructor(t){super(t)}static init_CheckboxButtonGroup(){this.prototype.default_view=r,this.define((({Int:t,Array:e})=>({active:[e(t),[]]})))}}o.CheckboxButtonGroup=_,_.__name__=\"CheckboxButtonGroup\",_.init_CheckboxButtonGroup()},\n 430: function _(t,e,n,s,i){s();const o=t(1),r=t(420),u=t(20),a=t(43),_=o.__importStar(t(328)),l=_;class c extends r.ControlView{*controls(){yield*this._buttons}connect_signals(){super.connect_signals();const t=this.model.properties;this.on_change(t.button_type,(()=>this.render())),this.on_change(t.labels,(()=>this.render())),this.on_change(t.active,(()=>this._update_active()))}styles(){return[...super.styles(),_.default]}render(){super.render(),this._buttons=this.model.labels.map(((t,e)=>{const n=a.div({class:[l.btn,l[`btn_${this.model.button_type}`]],disabled:this.model.disabled},t);return n.addEventListener(\"click\",(()=>this.change_active(e))),n})),this._update_active();const t=a.div({class:l.btn_group},this._buttons);this.el.appendChild(t)}}n.ButtonGroupView=c,c.__name__=\"ButtonGroupView\";class d extends r.Control{constructor(t){super(t)}static init_ButtonGroup(){this.define((({String:t,Array:e})=>({labels:[e(t),[]],button_type:[u.ButtonType,\"default\"]})))}}n.ButtonGroup=d,d.__name__=\"ButtonGroup\",d.init_ButtonGroup()},\n 431: function _(e,t,i,n,s){n();const o=e(1),c=e(432),a=e(43),l=e(9),d=o.__importStar(e(427));class h extends c.InputGroupView{render(){super.render();const e=a.div({class:[d.input_group,this.model.inline?d.inline:null]});this.el.appendChild(e);const{active:t,labels:i}=this.model;this._inputs=[];for(let n=0;nthis.change_active(n))),this._inputs.push(s),this.model.disabled&&(s.disabled=!0),l.includes(t,n)&&(s.checked=!0);const o=a.label({},s,a.span({},i[n]));e.appendChild(o)}}change_active(e){const t=new Set(this.model.active);t.has(e)?t.delete(e):t.add(e),this.model.active=[...t].sort()}}i.CheckboxGroupView=h,h.__name__=\"CheckboxGroupView\";class p extends c.InputGroup{constructor(e){super(e)}static init_CheckboxGroup(){this.prototype.default_view=h,this.define((({Boolean:e,Int:t,String:i,Array:n})=>({active:[n(t),[]],labels:[n(i),[]],inline:[e,!1]})))}}i.CheckboxGroup=p,p.__name__=\"CheckboxGroup\",p.init_CheckboxGroup()},\n 432: function _(n,t,e,s,o){s();const r=n(1),u=n(420),c=r.__importDefault(n(427));class _ extends u.ControlView{*controls(){yield*this._inputs}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}styles(){return[...super.styles(),c.default]}}e.InputGroupView=_,_.__name__=\"InputGroupView\";class i extends u.Control{constructor(n){super(n)}}e.InputGroup=i,i.__name__=\"InputGroup\"},\n 433: function _(e,i,t,n,o){n();const s=e(1),l=e(426),r=e(43),c=e(22),a=s.__importStar(e(427));class d extends l.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>{var e;return this.input_el.name=null!==(e=this.model.name)&&void 0!==e?e:\"\"})),this.connect(this.model.properties.color.change,(()=>this.input_el.value=c.color2css(this.model.color))),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled))}render(){super.render(),this.input_el=r.input({type:\"color\",class:a.input,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){this.model.color=this.input_el.value,super.change_input()}}t.ColorPickerView=d,d.__name__=\"ColorPickerView\";class h extends l.InputWidget{constructor(e){super(e)}static init_ColorPicker(){this.prototype.default_view=d,this.define((({Color:e})=>({color:[e,\"#000000\"]})))}}t.ColorPicker=h,h.__name__=\"ColorPicker\",h.init_ColorPicker()},\n 434: function _(e,t,i,n,s){n();const a=e(1),l=a.__importDefault(e(435)),o=e(426),d=e(43),r=e(20),c=e(8),h=a.__importStar(e(427)),u=a.__importDefault(e(436));function _(e){const t=[];for(const i of e)if(c.isString(i))t.push(i);else{const[e,n]=i;t.push({from:e,to:n})}return t}class p extends o.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:i,disabled_dates:n,enabled_dates:s,position:a,inline:l}=this.model.properties;this.connect(e.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.setDate(this.model.value)})),this.connect(t.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"minDate\",this.model.min_date)})),this.connect(i.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"maxDate\",this.model.max_date)})),this.connect(n.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"disable\",this.model.disabled_dates)})),this.connect(s.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"enable\",this.model.enabled_dates)})),this.connect(a.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"position\",this.model.position)})),this.connect(l.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set(\"inline\",this.model.inline)}))}remove(){var e;null===(e=this._picker)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),u.default]}render(){var e,t;null==this._picker&&(super.render(),this.input_el=d.input({type:\"text\",class:h.input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=l.default(this.input_el,{defaultDate:this.model.value,minDate:null!==(e=this.model.min_date)&&void 0!==e?e:void 0,maxDate:null!==(t=this.model.max_date)&&void 0!==t?t:void 0,inline:this.model.inline,position:this.model.position,disable:_(this.model.disabled_dates),enable:_(this.model.enabled_dates),onChange:(e,t,i)=>this._on_change(e,t,i)}))}_on_change(e,t,i){this.model.value=t,this.change_input()}}i.DatePickerView=p,p.__name__=\"DatePickerView\";class m extends o.InputWidget{constructor(e){super(e)}static init_DatePicker(){this.prototype.default_view=p,this.define((({Boolean:e,String:t,Array:i,Tuple:n,Or:s,Nullable:a})=>{const l=i(s(t,n(t,t)));return{value:[t],min_date:[a(t),null],max_date:[a(t),null],disabled_dates:[l,[]],enabled_dates:[l,[]],position:[r.CalendarPosition,\"auto\"],inline:[e,!1]}}))}}i.DatePicker=m,m.__name__=\"DatePicker\",m.init_DatePicker()},\n 435: function _(e,n,t,a,i){\n /* flatpickr v4.6.6, @license MIT */var o,r;o=this,r=function(){\"use strict\";\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n \n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n \n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */var e=function(){return(e=Object.assign||function(e){for(var n,t=1,a=arguments.length;t\",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:\"auto\",positionElement:void 0,prevArrow:\"\",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],longhand:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],longhand:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return\"th\";switch(n%10){case 1:return\"st\";case 2:return\"nd\";case 3:return\"rd\";default:return\"th\"}},rangeSeparator:\" to \",weekAbbreviation:\"Wk\",scrollTitle:\"Scroll to increment\",toggleTitle:\"Click to toggle\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"Year\",monthAriaLabel:\"Month\",hourAriaLabel:\"Hour\",minuteAriaLabel:\"Minute\",time_24hr:!1},o=function(e,n){return void 0===n&&(n=2),(\"000\"+e).slice(-1*n)},r=function(e){return!0===e?1:0};function l(e,n,t){var a;return void 0===t&&(t=!1),function(){var i=this,o=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,t||e.apply(i,o)}),n),t&&!a&&e.apply(i,o)}}var c=function(e){return e instanceof Array?e:[e]};function d(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function s(e,n,t){var a=window.document.createElement(e);return n=n||\"\",t=t||\"\",a.className=n,void 0!==t&&(a.textContent=t),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,n){return n(e)?e:e.parentNode?f(e.parentNode,n):void 0}function m(e,n){var t=s(\"div\",\"numInputWrapper\"),a=s(\"input\",\"numInput \"+e),i=s(\"span\",\"arrowUp\"),o=s(\"span\",\"arrowDown\");if(-1===navigator.userAgent.indexOf(\"MSIE 9.0\")?a.type=\"number\":(a.type=\"text\",a.pattern=\"\\\\d*\"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function g(e){try{return\"function\"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var p=function(){},h=function(e,n,t){return t.months[n?\"shorthand\":\"longhand\"][e]},v={D:p,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours(parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*r(new RegExp(t.amPM[1],\"i\").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours(parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:p,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:p,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},D={D:\"(\\\\w+)\",F:\"(\\\\w+)\",G:\"(\\\\d\\\\d|\\\\d)\",H:\"(\\\\d\\\\d|\\\\d)\",J:\"(\\\\d\\\\d|\\\\d)\\\\w+\",K:\"\",M:\"(\\\\w+)\",S:\"(\\\\d\\\\d|\\\\d)\",U:\"(.+)\",W:\"(\\\\d\\\\d|\\\\d)\",Y:\"(\\\\d{4})\",Z:\"(.+)\",d:\"(\\\\d\\\\d|\\\\d)\",h:\"(\\\\d\\\\d|\\\\d)\",i:\"(\\\\d\\\\d|\\\\d)\",j:\"(\\\\d\\\\d|\\\\d)\",l:\"(\\\\w+)\",m:\"(\\\\d\\\\d|\\\\d)\",n:\"(\\\\d\\\\d|\\\\d)\",s:\"(\\\\d\\\\d|\\\\d)\",u:\"(.+)\",w:\"(\\\\d\\\\d|\\\\d)\",y:\"(\\\\d{2})\"},w={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[w.w(e,n,t)]},F:function(e,n,t){return h(w.n(e,n,t)-1,!1,n)},G:function(e,n,t){return o(w.h(e,n,t))},H:function(e){return o(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[r(e.getHours()>11)]},M:function(e,n){return h(e.getMonth(),!0,n)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},b=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,a){var i=a||r;return void 0===t.formatDate||c?n.split(\"\").map((function(n,a,o){return w[n]&&\"\\\\\"!==o[a-1]?w[n](e,i,t):\"\\\\\"!==n?n:\"\"})).join(\"\"):t.formatDate(e,n,i)}},C=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o;return function(e,n,i,o){if(0===e||e){var l,c=o||r,d=e;if(e instanceof Date)l=new Date(e.getTime());else if(\"string\"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if(\"string\"==typeof e){var s=n||(t||a).dateFormat,u=String(e).trim();if(\"today\"===u)l=new Date,i=!0;else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else if(t&&t.parseDate)l=t.parseDate(e,s);else{l=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],g=0,p=0,h=\"\";gl&&(u=a===w.hourElement?u-l-r(!w.amPM):i,m&&H(void 0,1,w.hourElement)),w.amPM&&f&&(1===c?u+d===23:Math.abs(u-d)>c)&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]),a.value=o(u)}}(e);var c=w._input.value;I(),be(),w._input.value!==c&&w._debouncedChange()}function I(){if(void 0!==w.hourElement&&void 0!==w.minuteElement){var e,n,t=(parseInt(w.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(w.minuteElement.value,10)||0)%60,i=void 0!==w.secondElement?(parseInt(w.secondElement.value,10)||0)%60:0;void 0!==w.amPM&&(e=t,n=w.amPM.textContent,t=e%12+12*r(n===w.l10n.amPM[1]));var o=void 0!==w.config.minTime||w.config.minDate&&w.minDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.minDate,!0);if(void 0!==w.config.maxTime||w.config.maxDate&&w.maxDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.maxDate,!0)){var l=void 0!==w.config.maxTime?w.config.maxTime:w.config.maxDate;(t=Math.min(t,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(o){var c=void 0!==w.config.minTime?w.config.minTime:w.config.minDate;(t=Math.max(t,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}O(t,a,i)}}function S(e){var n=e||w.latestSelectedDateObj;n&&O(n.getHours(),n.getMinutes(),n.getSeconds())}function _(){var e=w.config.defaultHour,n=w.config.defaultMinute,t=w.config.defaultSeconds;if(void 0!==w.config.minDate){var a=w.config.minDate.getHours(),i=w.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(n=Math.max(i,n)),e===a&&n===i&&(t=w.config.minDate.getSeconds())}if(void 0!==w.config.maxDate){var o=w.config.maxDate.getHours(),r=w.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(n=Math.min(r,n)),e===o&&n===r&&(t=w.config.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:t}}function O(e,n,t){void 0!==w.latestSelectedDateObj&&w.latestSelectedDateObj.setHours(e%24,n,t||0,0),w.hourElement&&w.minuteElement&&!w.isMobile&&(w.hourElement.value=o(w.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),w.minuteElement.value=o(n),void 0!==w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(e>=12)]),void 0!==w.secondElement&&(w.secondElement.value=o(t)))}function F(e){var n=g(e),t=parseInt(n.value)+(e.delta||0);(t/1e3>1||\"Enter\"===e.key&&!/[^\\d]/.test(t.toString()))&&Q(t)}function N(e,n,t,a){return n instanceof Array?n.forEach((function(n){return N(e,n,t,a)})):e instanceof Array?e.forEach((function(e){return N(e,n,t,a)})):(e.addEventListener(n,t,a),void w._handlers.push({element:e,event:n,handler:t,options:a}))}function A(){pe(\"onChange\")}function P(e,n){var t=void 0!==e?w.parseDate(e):w.latestSelectedDateObj||(w.config.minDate&&w.config.minDate>w.now?w.config.minDate:w.config.maxDate&&w.config.maxDate=0&&M(e,w.selectedDates[1])<=0}(n)&&!ve(n)&&o.classList.add(\"inRange\"),w.weekNumbers&&1===w.config.showMonths&&\"prevMonthDay\"!==e&&t%7==1&&w.weekNumbers.insertAdjacentHTML(\"beforeend\",\"\"+w.config.getWeek(n)+\"\"),pe(\"onDayCreate\",o),o}function L(e){e.focus(),\"range\"===w.config.mode&&ae(e)}function W(e){for(var n=e>0?0:w.config.showMonths-1,t=e>0?w.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=w.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf(\"hidden\")&&X(c.dateObj))return c}}function R(e,n){var t=ee(document.activeElement||document.body),a=void 0!==e?e:t?document.activeElement:void 0!==w.selectedDateElem&&ee(w.selectedDateElem)?w.selectedDateElem:void 0!==w.todayDateElem&&ee(w.todayDateElem)?w.todayDateElem:W(n>0?1:-1);void 0===a?w._input.focus():t?function(e,n){for(var t=-1===e.className.indexOf(\"Month\")?e.dateObj.getMonth():w.currentMonth,a=n>0?w.config.showMonths:-1,i=n>0?1:-1,o=t-w.currentMonth;o!=a;o+=i)for(var r=w.daysContainer.children[o],l=t-w.currentMonth===o?e.$i+n:n<0?r.children.length-1:0,c=r.children.length,d=l;d>=0&&d0?c:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf(\"hidden\")&&X(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(n))return L(s)}w.changeMonth(i),R(W(i),0)}(a,n):L(a)}function B(e,n){for(var t=(new Date(e,n,1).getDay()-w.l10n.firstDayOfWeek+7)%7,a=w.utils.getDaysInMonth((n-1+12)%12,e),i=w.utils.getDaysInMonth(n,e),o=window.document.createDocumentFragment(),r=w.config.showMonths>1,l=r?\"prevMonthDay hidden\":\"prevMonthDay\",c=r?\"nextMonthDay hidden\":\"nextMonthDay\",d=a+1-t,u=0;d<=a;d++,u++)o.appendChild(j(l,new Date(e,n-1,d),d,u));for(d=1;d<=i;d++,u++)o.appendChild(j(\"\",new Date(e,n,d),d,u));for(var f=i+1;f<=42-t&&(1===w.config.showMonths||u%7!=0);f++,u++)o.appendChild(j(c,new Date(e,n+1,f%i),f,u));var m=s(\"div\",\"dayContainer\");return m.appendChild(o),m}function J(){if(void 0!==w.daysContainer){u(w.daysContainer),w.weekNumbers&&u(w.weekNumbers);for(var e=document.createDocumentFragment(),n=0;n1||\"dropdown\"!==w.config.monthSelectorType)){var e=function(e){return!(void 0!==w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&ew.config.maxDate.getMonth())};w.monthsDropdownContainer.tabIndex=-1,w.monthsDropdownContainer.innerHTML=\"\";for(var n=0;n<12;n++)if(e(n)){var t=s(\"option\",\"flatpickr-monthDropdown-month\");t.value=new Date(w.currentYear,n).getMonth().toString(),t.textContent=h(n,w.config.shorthandCurrentMonth,w.l10n),t.tabIndex=-1,w.currentMonth===n&&(t.selected=!0),w.monthsDropdownContainer.appendChild(t)}}}function U(){var e,n=s(\"div\",\"flatpickr-month\"),t=window.document.createDocumentFragment();w.config.showMonths>1||\"static\"===w.config.monthSelectorType?e=s(\"span\",\"cur-month\"):(w.monthsDropdownContainer=s(\"select\",\"flatpickr-monthDropdown-months\"),w.monthsDropdownContainer.setAttribute(\"aria-label\",w.l10n.monthAriaLabel),N(w.monthsDropdownContainer,\"change\",(function(e){var n=g(e),t=parseInt(n.value,10);w.changeMonth(t-w.currentMonth),pe(\"onMonthChange\")})),K(),e=w.monthsDropdownContainer);var a=m(\"cur-year\",{tabindex:\"-1\"}),i=a.getElementsByTagName(\"input\")[0];i.setAttribute(\"aria-label\",w.l10n.yearAriaLabel),w.config.minDate&&i.setAttribute(\"min\",w.config.minDate.getFullYear().toString()),w.config.maxDate&&(i.setAttribute(\"max\",w.config.maxDate.getFullYear().toString()),i.disabled=!!w.config.minDate&&w.config.minDate.getFullYear()===w.config.maxDate.getFullYear());var o=s(\"div\",\"flatpickr-current-month\");return o.appendChild(e),o.appendChild(a),t.appendChild(o),n.appendChild(t),{container:n,yearElement:i,monthElement:e}}function q(){u(w.monthNav),w.monthNav.appendChild(w.prevMonthNav),w.config.showMonths&&(w.yearElements=[],w.monthElements=[]);for(var e=w.config.showMonths;e--;){var n=U();w.yearElements.push(n.yearElement),w.monthElements.push(n.monthElement),w.monthNav.appendChild(n.container)}w.monthNav.appendChild(w.nextMonthNav)}function $(){w.weekdayContainer?u(w.weekdayContainer):w.weekdayContainer=s(\"div\",\"flatpickr-weekdays\");for(var e=w.config.showMonths;e--;){var n=s(\"div\",\"flatpickr-weekdaycontainer\");w.weekdayContainer.appendChild(n)}return z(),w.weekdayContainer}function z(){if(w.weekdayContainer){var e=w.l10n.firstDayOfWeek,t=n(w.l10n.weekdays.shorthand);e>0&&e\\n \"+t.join(\"\")+\"\\n \\n \"}}function G(e,n){void 0===n&&(n=!0);var t=n?e:e-w.currentMonth;t<0&&!0===w._hidePrevMonthArrow||t>0&&!0===w._hideNextMonthArrow||(w.currentMonth+=t,(w.currentMonth<0||w.currentMonth>11)&&(w.currentYear+=w.currentMonth>11?1:-1,w.currentMonth=(w.currentMonth+12)%12,pe(\"onYearChange\"),K()),J(),pe(\"onMonthChange\"),De())}function V(e){return!(!w.config.appendTo||!w.config.appendTo.contains(e))||w.calendarContainer.contains(e)}function Z(e){if(w.isOpen&&!w.config.inline){var n=g(e),t=V(n),a=n===w.input||n===w.altInput||w.element.contains(n)||e.path&&e.path.indexOf&&(~e.path.indexOf(w.input)||~e.path.indexOf(w.altInput)),i=\"blur\"===e.type?a&&e.relatedTarget&&!V(e.relatedTarget):!a&&!t&&!V(e.relatedTarget),o=!w.config.ignoredFocusElements.some((function(e){return e.contains(n)}));i&&o&&(void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement&&\"\"!==w.input.value&&void 0!==w.input.value&&T(),w.close(),w.config&&\"range\"===w.config.mode&&1===w.selectedDates.length&&(w.clear(!1),w.redraw()))}}function Q(e){if(!(!e||w.config.minDate&&ew.config.maxDate.getFullYear())){var n=e,t=w.currentYear!==n;w.currentYear=n||w.currentYear,w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth=Math.min(w.config.maxDate.getMonth(),w.currentMonth):w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&(w.currentMonth=Math.max(w.config.minDate.getMonth(),w.currentMonth)),t&&(w.redraw(),pe(\"onYearChange\"),K())}}function X(e,n){void 0===n&&(n=!0);var t=w.parseDate(e,void 0,n);if(w.config.minDate&&t&&M(t,w.config.minDate,void 0!==n?n:!w.minDateHasTime)<0||w.config.maxDate&&t&&M(t,w.config.maxDate,void 0!==n?n:!w.maxDateHasTime)>0)return!1;if(0===w.config.enable.length&&0===w.config.disable.length)return!0;if(void 0===t)return!1;for(var a=w.config.enable.length>0,i=a?w.config.enable:w.config.disable,o=0,r=void 0;o=r.from.getTime()&&t.getTime()<=r.to.getTime())return a}return!a}function ee(e){return void 0!==w.daysContainer&&-1===e.className.indexOf(\"hidden\")&&-1===e.className.indexOf(\"flatpickr-disabled\")&&w.daysContainer.contains(e)}function ne(e){e.target!==w._input||e.relatedTarget&&V(e.relatedTarget)||w.setDate(w._input.value,!0,e.target===w.altInput?w.config.altFormat:w.config.dateFormat)}function te(e){var n=g(e),t=w.config.wrap?p.contains(n):n===w._input,a=w.config.allowInput,i=w.isOpen&&(!a||!t),o=w.config.inline&&t&&!a;if(13===e.keyCode&&t){if(a)return w.setDate(w._input.value,!0,n===w.altInput?w.config.altFormat:w.config.dateFormat),n.blur();w.open()}else if(V(n)||i||o){var r=!!w.timeContainer&&w.timeContainer.contains(n);switch(e.keyCode){case 13:r?(e.preventDefault(),T(),se()):ue(e);break;case 27:e.preventDefault(),se();break;case 8:case 46:t&&!w.config.allowInput&&(e.preventDefault(),w.clear());break;case 37:case 39:if(r||t)w.hourElement&&w.hourElement.focus();else if(e.preventDefault(),void 0!==w.daysContainer&&(!1===a||document.activeElement&&ee(document.activeElement))){var l=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(l),R(W(1),0)):R(void 0,l)}break;case 38:case 40:e.preventDefault();var c=40===e.keyCode?1:-1;w.daysContainer&&void 0!==n.$i||n===w.input||n===w.altInput?e.ctrlKey?(e.stopPropagation(),Q(w.currentYear-c),R(W(1),0)):r||R(void 0,7*c):n===w.currentYearElement?Q(w.currentYear-c):w.config.enableTime&&(!r&&w.hourElement&&w.hourElement.focus(),T(e),w._debouncedChange());break;case 9:if(r){var d=[w.hourElement,w.minuteElement,w.secondElement,w.amPM].concat(w.pluginElements).filter((function(e){return e})),s=d.indexOf(n);if(-1!==s){var u=d[s+(e.shiftKey?-1:1)];e.preventDefault(),(u||w._input).focus()}}else!w.config.noCalendar&&w.daysContainer&&w.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),w._input.focus())}}if(void 0!==w.amPM&&n===w.amPM)switch(e.key){case w.l10n.amPM[0].charAt(0):case w.l10n.amPM[0].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[0],I(),be();break;case w.l10n.amPM[1].charAt(0):case w.l10n.amPM[1].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[1],I(),be()}(t||V(n))&&pe(\"onKeyDown\",e)}function ae(e){if(1===w.selectedDates.length&&(!e||e.classList.contains(\"flatpickr-day\")&&!e.classList.contains(\"flatpickr-disabled\"))){for(var n=e?e.dateObj.getTime():w.days.firstElementChild.dateObj.getTime(),t=w.parseDate(w.selectedDates[0],void 0,!0).getTime(),a=Math.min(n,w.selectedDates[0].getTime()),i=Math.max(n,w.selectedDates[0].getTime()),o=!1,r=0,l=0,c=a;ca&&cr)?r=c:c>t&&(!l||c0&&m0&&m>l;return g?(f.classList.add(\"notAllowed\"),[\"inRange\",\"startRange\",\"endRange\"].forEach((function(e){f.classList.remove(e)})),\"continue\"):o&&!g?\"continue\":([\"startRange\",\"inRange\",\"endRange\",\"notAllowed\"].forEach((function(e){f.classList.remove(e)})),void(void 0!==e&&(e.classList.add(n<=w.selectedDates[0].getTime()?\"startRange\":\"endRange\"),tn&&m===t&&f.classList.add(\"endRange\"),m>=r&&(0===l||m<=l)&&(d=t,u=n,(c=m)>Math.min(d,u)&&c0||t.getMinutes()>0||t.getSeconds()>0),w.selectedDates&&(w.selectedDates=w.selectedDates.filter((function(e){return X(e)})),w.selectedDates.length||\"min\"!==e||S(t),be()),w.daysContainer&&(de(),void 0!==t?w.currentYearElement[e]=t.getFullYear().toString():w.currentYearElement.removeAttribute(e),w.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear())}}function re(){return w.config.wrap?p.querySelector(\"[data-input]\"):p}function le(){\"object\"!=typeof w.config.locale&&void 0===k.l10ns[w.config.locale]&&w.config.errorHandler(new Error(\"flatpickr: invalid locale \"+w.config.locale)),w.l10n=e(e({},k.l10ns.default),\"object\"==typeof w.config.locale?w.config.locale:\"default\"!==w.config.locale?k.l10ns[w.config.locale]:void 0),D.K=\"(\"+w.l10n.amPM[0]+\"|\"+w.l10n.amPM[1]+\"|\"+w.l10n.amPM[0].toLowerCase()+\"|\"+w.l10n.amPM[1].toLowerCase()+\")\",void 0===e(e({},v),JSON.parse(JSON.stringify(p.dataset||{}))).time_24hr&&void 0===k.defaultConfig.time_24hr&&(w.config.time_24hr=w.l10n.time_24hr),w.formatDate=b(w),w.parseDate=C({config:w.config,l10n:w.l10n})}function ce(e){if(void 0!==w.calendarContainer){pe(\"onPreCalendarPosition\");var n=e||w._positionElement,t=Array.prototype.reduce.call(w.calendarContainer.children,(function(e,n){return e+n.offsetHeight}),0),a=w.calendarContainer.offsetWidth,i=w.config.position.split(\" \"),o=i[0],r=i.length>1?i[1]:null,l=n.getBoundingClientRect(),c=window.innerHeight-l.bottom,s=\"above\"===o||\"below\"!==o&&ct,u=window.pageYOffset+l.top+(s?-t-2:n.offsetHeight+2);if(d(w.calendarContainer,\"arrowTop\",!s),d(w.calendarContainer,\"arrowBottom\",s),!w.config.inline){var f=window.pageXOffset+l.left,m=!1,g=!1;\"center\"===r?(f-=(a-l.width)/2,m=!0):\"right\"===r&&(f-=a-l.width,g=!0),d(w.calendarContainer,\"arrowLeft\",!m&&!g),d(w.calendarContainer,\"arrowCenter\",m),d(w.calendarContainer,\"arrowRight\",g);var p=window.document.body.offsetWidth-(window.pageXOffset+l.right),h=f+a>window.document.body.offsetWidth,v=p+a>window.document.body.offsetWidth;if(d(w.calendarContainer,\"rightMost\",h),!w.config.static)if(w.calendarContainer.style.top=u+\"px\",h)if(v){var D=function(){for(var e=null,n=0;nw.currentMonth+w.config.showMonths-1)&&\"range\"!==w.config.mode;if(w.selectedDateElem=t,\"single\"===w.config.mode)w.selectedDates=[a];else if(\"multiple\"===w.config.mode){var o=ve(a);o?w.selectedDates.splice(parseInt(o),1):w.selectedDates.push(a)}else\"range\"===w.config.mode&&(2===w.selectedDates.length&&w.clear(!1,!1),w.latestSelectedDateObj=a,w.selectedDates.push(a),0!==M(a,w.selectedDates[0],!0)&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()})));if(I(),i){var r=w.currentYear!==a.getFullYear();w.currentYear=a.getFullYear(),w.currentMonth=a.getMonth(),r&&(pe(\"onYearChange\"),K()),pe(\"onMonthChange\")}if(De(),J(),be(),i||\"range\"===w.config.mode||1!==w.config.showMonths?void 0!==w.selectedDateElem&&void 0===w.hourElement&&w.selectedDateElem&&w.selectedDateElem.focus():L(t),void 0!==w.hourElement&&void 0!==w.hourElement&&w.hourElement.focus(),w.config.closeOnSelect){var l=\"single\"===w.config.mode&&!w.config.enableTime,c=\"range\"===w.config.mode&&2===w.selectedDates.length&&!w.config.enableTime;(l||c)&&se()}A()}}w.parseDate=C({config:w.config,l10n:w.l10n}),w._handlers=[],w.pluginElements=[],w.loadedPlugins=[],w._bind=N,w._setHoursFromDate=S,w._positionCalendar=ce,w.changeMonth=G,w.changeYear=Q,w.clear=function(e,n){if(void 0===e&&(e=!0),void 0===n&&(n=!0),w.input.value=\"\",void 0!==w.altInput&&(w.altInput.value=\"\"),void 0!==w.mobileInput&&(w.mobileInput.value=\"\"),w.selectedDates=[],w.latestSelectedDateObj=void 0,!0===n&&(w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth()),!0===w.config.enableTime){var t=_(),a=t.hours,i=t.minutes,o=t.seconds;O(a,i,o)}w.redraw(),e&&pe(\"onChange\")},w.close=function(){w.isOpen=!1,w.isMobile||(void 0!==w.calendarContainer&&w.calendarContainer.classList.remove(\"open\"),void 0!==w._input&&w._input.classList.remove(\"active\")),pe(\"onClose\")},w._createElement=s,w.destroy=function(){void 0!==w.config&&pe(\"onDestroy\");for(var e=w._handlers.length;e--;){var n=w._handlers[e];n.element.removeEventListener(n.event,n.handler,n.options)}if(w._handlers=[],w.mobileInput)w.mobileInput.parentNode&&w.mobileInput.parentNode.removeChild(w.mobileInput),w.mobileInput=void 0;else if(w.calendarContainer&&w.calendarContainer.parentNode)if(w.config.static&&w.calendarContainer.parentNode){var t=w.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else w.calendarContainer.parentNode.removeChild(w.calendarContainer);w.altInput&&(w.input.type=\"text\",w.altInput.parentNode&&w.altInput.parentNode.removeChild(w.altInput),delete w.altInput),w.input&&(w.input.type=w.input._type,w.input.classList.remove(\"flatpickr-input\"),w.input.removeAttribute(\"readonly\")),[\"_showTimeInput\",\"latestSelectedDateObj\",\"_hideNextMonthArrow\",\"_hidePrevMonthArrow\",\"__hideNextMonthArrow\",\"__hidePrevMonthArrow\",\"isMobile\",\"isOpen\",\"selectedDateElem\",\"minDateHasTime\",\"maxDateHasTime\",\"days\",\"daysContainer\",\"_input\",\"_positionElement\",\"innerContainer\",\"rContainer\",\"monthNav\",\"todayDateElem\",\"calendarContainer\",\"weekdayContainer\",\"prevMonthNav\",\"nextMonthNav\",\"monthsDropdownContainer\",\"currentMonthElement\",\"currentYearElement\",\"navigationCurrentMonth\",\"selectedDateElem\",\"config\"].forEach((function(e){try{delete w[e]}catch(e){}}))},w.isEnabled=X,w.jumpToDate=P,w.open=function(e,n){if(void 0===n&&(n=w._positionElement),!0===w.isMobile){if(e){e.preventDefault();var t=g(e);t&&t.blur()}return void 0!==w.mobileInput&&(w.mobileInput.focus(),w.mobileInput.click()),void pe(\"onOpen\")}if(!w._input.disabled&&!w.config.inline){var a=w.isOpen;w.isOpen=!0,a||(w.calendarContainer.classList.add(\"open\"),w._input.classList.add(\"active\"),pe(\"onOpen\"),ce(n)),!0===w.config.enableTime&&!0===w.config.noCalendar&&(!1!==w.config.allowInput||void 0!==e&&w.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return w.hourElement.select()}),50))}},w.redraw=de,w.set=function(e,n){if(null!==e&&\"object\"==typeof e)for(var a in Object.assign(w.config,e),e)void 0!==fe[a]&&fe[a].forEach((function(e){return e()}));else w.config[e]=n,void 0!==fe[e]?fe[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(w.config[e]=c(n));w.redraw(),be(!0)},w.setDate=function(e,n,t){if(void 0===n&&(n=!1),void 0===t&&(t=w.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return w.clear(n);me(e,t),w.latestSelectedDateObj=w.selectedDates[w.selectedDates.length-1],w.redraw(),P(void 0,n),S(),0===w.selectedDates.length&&w.clear(!1),be(n),n&&pe(\"onChange\")},w.toggle=function(e){if(!0===w.isOpen)return w.close();w.open(e)};var fe={locale:[le,z],showMonths:[q,E,$],minDate:[P],maxDate:[P]};function me(e,n){var t=[];if(e instanceof Array)t=e.map((function(e){return w.parseDate(e,n)}));else if(e instanceof Date||\"number\"==typeof e)t=[w.parseDate(e,n)];else if(\"string\"==typeof e)switch(w.config.mode){case\"single\":case\"time\":t=[w.parseDate(e,n)];break;case\"multiple\":t=e.split(w.config.conjunction).map((function(e){return w.parseDate(e,n)}));break;case\"range\":t=e.split(w.l10n.rangeSeparator).map((function(e){return w.parseDate(e,n)}))}else w.config.errorHandler(new Error(\"Invalid date supplied: \"+JSON.stringify(e)));w.selectedDates=w.config.allowInvalidPreload?t:t.filter((function(e){return e instanceof Date&&X(e,!1)})),\"range\"===w.config.mode&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()}))}function ge(e){return e.slice().map((function(e){return\"string\"==typeof e||\"number\"==typeof e||e instanceof Date?w.parseDate(e,void 0,!0):e&&\"object\"==typeof e&&e.from&&e.to?{from:w.parseDate(e.from,void 0),to:w.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function pe(e,n){if(void 0!==w.config){var t=w.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a1||\"static\"===w.config.monthSelectorType?w.monthElements[n].textContent=h(t.getMonth(),w.config.shorthandCurrentMonth,w.l10n)+\" \":w.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()})),w._hidePrevMonthArrow=void 0!==w.config.minDate&&(w.currentYear===w.config.minDate.getFullYear()?w.currentMonth<=w.config.minDate.getMonth():w.currentYearw.config.maxDate.getMonth():w.currentYear>w.config.maxDate.getFullYear()))}function we(e){return w.selectedDates.map((function(n){return w.formatDate(n,e)})).filter((function(e,n,t){return\"range\"!==w.config.mode||w.config.enableTime||t.indexOf(e)===n})).join(\"range\"!==w.config.mode?w.config.conjunction:w.l10n.rangeSeparator)}function be(e){void 0===e&&(e=!0),void 0!==w.mobileInput&&w.mobileFormatStr&&(w.mobileInput.value=void 0!==w.latestSelectedDateObj?w.formatDate(w.latestSelectedDateObj,w.mobileFormatStr):\"\"),w.input.value=we(w.config.dateFormat),void 0!==w.altInput&&(w.altInput.value=we(w.config.altFormat)),!1!==e&&pe(\"onValueUpdate\")}function Ce(e){var n=g(e),t=w.prevMonthNav.contains(n),a=w.nextMonthNav.contains(n);t||a?G(t?-1:1):w.yearElements.indexOf(n)>=0?n.select():n.classList.contains(\"arrowUp\")?w.changeYear(w.currentYear+1):n.classList.contains(\"arrowDown\")&&w.changeYear(w.currentYear-1)}return function(){w.element=w.input=p,w.isOpen=!1,function(){var n=[\"wrap\",\"weekNumbers\",\"allowInput\",\"allowInvalidPreload\",\"clickOpens\",\"time_24hr\",\"enableTime\",\"noCalendar\",\"altInput\",\"shorthandCurrentMonth\",\"inline\",\"static\",\"enableSeconds\",\"disableMobile\"],i=e(e({},JSON.parse(JSON.stringify(p.dataset||{}))),v),o={};w.config.parseDate=i.parseDate,w.config.formatDate=i.formatDate,Object.defineProperty(w.config,\"enable\",{get:function(){return w.config._enable},set:function(e){w.config._enable=ge(e)}}),Object.defineProperty(w.config,\"disable\",{get:function(){return w.config._disable},set:function(e){w.config._disable=ge(e)}});var r=\"time\"===i.mode;if(!i.dateFormat&&(i.enableTime||r)){var l=k.defaultConfig.dateFormat||a.dateFormat;o.dateFormat=i.noCalendar||r?\"H:i\"+(i.enableSeconds?\":S\":\"\"):l+\" H:i\"+(i.enableSeconds?\":S\":\"\")}if(i.altInput&&(i.enableTime||r)&&!i.altFormat){var d=k.defaultConfig.altFormat||a.altFormat;o.altFormat=i.noCalendar||r?\"h:i\"+(i.enableSeconds?\":S K\":\" K\"):d+\" h:i\"+(i.enableSeconds?\":S\":\"\")+\" K\"}Object.defineProperty(w.config,\"minDate\",{get:function(){return w.config._minDate},set:oe(\"min\")}),Object.defineProperty(w.config,\"maxDate\",{get:function(){return w.config._maxDate},set:oe(\"max\")});var s=function(e){return function(n){w.config[\"min\"===e?\"_minTime\":\"_maxTime\"]=w.parseDate(n,\"H:i:S\")}};Object.defineProperty(w.config,\"minTime\",{get:function(){return w.config._minTime},set:s(\"min\")}),Object.defineProperty(w.config,\"maxTime\",{get:function(){return w.config._maxTime},set:s(\"max\")}),\"time\"===i.mode&&(w.config.noCalendar=!0,w.config.enableTime=!0),Object.assign(w.config,o,i);for(var u=0;u-1?w.config[m]=c(f[m]).map(x).concat(w.config[m]):void 0===i[m]&&(w.config[m]=f[m])}i.altInputClass||(w.config.altInputClass=re().className+\" \"+w.config.altInputClass),pe(\"onParseConfig\")}(),le(),w.input=re(),w.input?(w.input._type=w.input.type,w.input.type=\"text\",w.input.classList.add(\"flatpickr-input\"),w._input=w.input,w.config.altInput&&(w.altInput=s(w.input.nodeName,w.config.altInputClass),w._input=w.altInput,w.altInput.placeholder=w.input.placeholder,w.altInput.disabled=w.input.disabled,w.altInput.required=w.input.required,w.altInput.tabIndex=w.input.tabIndex,w.altInput.type=\"text\",w.input.setAttribute(\"type\",\"hidden\"),!w.config.static&&w.input.parentNode&&w.input.parentNode.insertBefore(w.altInput,w.input.nextSibling)),w.config.allowInput||w._input.setAttribute(\"readonly\",\"readonly\"),w._positionElement=w.config.positionElement||w._input):w.config.errorHandler(new Error(\"Invalid input element specified\")),function(){w.selectedDates=[],w.now=w.parseDate(w.config.now)||new Date;var e=w.config.defaultDate||(\"INPUT\"!==w.input.nodeName&&\"TEXTAREA\"!==w.input.nodeName||!w.input.placeholder||w.input.value!==w.input.placeholder?w.input.value:null);e&&me(e,w.config.dateFormat),w._initialDate=w.selectedDates.length>0?w.selectedDates[0]:w.config.minDate&&w.config.minDate.getTime()>w.now.getTime()?w.config.minDate:w.config.maxDate&&w.config.maxDate.getTime()0&&(w.latestSelectedDateObj=w.selectedDates[0]),void 0!==w.config.minTime&&(w.config.minTime=w.parseDate(w.config.minTime,\"H:i\")),void 0!==w.config.maxTime&&(w.config.maxTime=w.parseDate(w.config.maxTime,\"H:i\")),w.minDateHasTime=!!w.config.minDate&&(w.config.minDate.getHours()>0||w.config.minDate.getMinutes()>0||w.config.minDate.getSeconds()>0),w.maxDateHasTime=!!w.config.maxDate&&(w.config.maxDate.getHours()>0||w.config.maxDate.getMinutes()>0||w.config.maxDate.getSeconds()>0)}(),w.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=w.currentMonth),void 0===n&&(n=w.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:w.l10n.daysInMonth[e]}},w.isMobile||function(){var e=window.document.createDocumentFragment();if(w.calendarContainer=s(\"div\",\"flatpickr-calendar\"),w.calendarContainer.tabIndex=-1,!w.config.noCalendar){if(e.appendChild((w.monthNav=s(\"div\",\"flatpickr-months\"),w.yearElements=[],w.monthElements=[],w.prevMonthNav=s(\"span\",\"flatpickr-prev-month\"),w.prevMonthNav.innerHTML=w.config.prevArrow,w.nextMonthNav=s(\"span\",\"flatpickr-next-month\"),w.nextMonthNav.innerHTML=w.config.nextArrow,q(),Object.defineProperty(w,\"_hidePrevMonthArrow\",{get:function(){return w.__hidePrevMonthArrow},set:function(e){w.__hidePrevMonthArrow!==e&&(d(w.prevMonthNav,\"flatpickr-disabled\",e),w.__hidePrevMonthArrow=e)}}),Object.defineProperty(w,\"_hideNextMonthArrow\",{get:function(){return w.__hideNextMonthArrow},set:function(e){w.__hideNextMonthArrow!==e&&(d(w.nextMonthNav,\"flatpickr-disabled\",e),w.__hideNextMonthArrow=e)}}),w.currentYearElement=w.yearElements[0],De(),w.monthNav)),w.innerContainer=s(\"div\",\"flatpickr-innerContainer\"),w.config.weekNumbers){var n=function(){w.calendarContainer.classList.add(\"hasWeeks\");var e=s(\"div\",\"flatpickr-weekwrapper\");e.appendChild(s(\"span\",\"flatpickr-weekday\",w.l10n.weekAbbreviation));var n=s(\"div\",\"flatpickr-weeks\");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,a=n.weekNumbers;w.innerContainer.appendChild(t),w.weekNumbers=a,w.weekWrapper=t}w.rContainer=s(\"div\",\"flatpickr-rContainer\"),w.rContainer.appendChild($()),w.daysContainer||(w.daysContainer=s(\"div\",\"flatpickr-days\"),w.daysContainer.tabIndex=-1),J(),w.rContainer.appendChild(w.daysContainer),w.innerContainer.appendChild(w.rContainer),e.appendChild(w.innerContainer)}w.config.enableTime&&e.appendChild(function(){w.calendarContainer.classList.add(\"hasTime\"),w.config.noCalendar&&w.calendarContainer.classList.add(\"noCalendar\"),w.timeContainer=s(\"div\",\"flatpickr-time\"),w.timeContainer.tabIndex=-1;var e=s(\"span\",\"flatpickr-time-separator\",\":\"),n=m(\"flatpickr-hour\",{\"aria-label\":w.l10n.hourAriaLabel});w.hourElement=n.getElementsByTagName(\"input\")[0];var t=m(\"flatpickr-minute\",{\"aria-label\":w.l10n.minuteAriaLabel});if(w.minuteElement=t.getElementsByTagName(\"input\")[0],w.hourElement.tabIndex=w.minuteElement.tabIndex=-1,w.hourElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getHours():w.config.time_24hr?w.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(w.config.defaultHour)),w.minuteElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getMinutes():w.config.defaultMinute),w.hourElement.setAttribute(\"step\",w.config.hourIncrement.toString()),w.minuteElement.setAttribute(\"step\",w.config.minuteIncrement.toString()),w.hourElement.setAttribute(\"min\",w.config.time_24hr?\"0\":\"1\"),w.hourElement.setAttribute(\"max\",w.config.time_24hr?\"23\":\"12\"),w.minuteElement.setAttribute(\"min\",\"0\"),w.minuteElement.setAttribute(\"max\",\"59\"),w.timeContainer.appendChild(n),w.timeContainer.appendChild(e),w.timeContainer.appendChild(t),w.config.time_24hr&&w.timeContainer.classList.add(\"time24hr\"),w.config.enableSeconds){w.timeContainer.classList.add(\"hasSeconds\");var a=m(\"flatpickr-second\");w.secondElement=a.getElementsByTagName(\"input\")[0],w.secondElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getSeconds():w.config.defaultSeconds),w.secondElement.setAttribute(\"step\",w.minuteElement.getAttribute(\"step\")),w.secondElement.setAttribute(\"min\",\"0\"),w.secondElement.setAttribute(\"max\",\"59\"),w.timeContainer.appendChild(s(\"span\",\"flatpickr-time-separator\",\":\")),w.timeContainer.appendChild(a)}return w.config.time_24hr||(w.amPM=s(\"span\",\"flatpickr-am-pm\",w.l10n.amPM[r((w.latestSelectedDateObj?w.hourElement.value:w.config.defaultHour)>11)]),w.amPM.title=w.l10n.toggleTitle,w.amPM.tabIndex=-1,w.timeContainer.appendChild(w.amPM)),w.timeContainer}()),d(w.calendarContainer,\"rangeMode\",\"range\"===w.config.mode),d(w.calendarContainer,\"animate\",!0===w.config.animate),d(w.calendarContainer,\"multiMonth\",w.config.showMonths>1),w.calendarContainer.appendChild(e);var i=void 0!==w.config.appendTo&&void 0!==w.config.appendTo.nodeType;if((w.config.inline||w.config.static)&&(w.calendarContainer.classList.add(w.config.inline?\"inline\":\"static\"),w.config.inline&&(!i&&w.element.parentNode?w.element.parentNode.insertBefore(w.calendarContainer,w._input.nextSibling):void 0!==w.config.appendTo&&w.config.appendTo.appendChild(w.calendarContainer)),w.config.static)){var l=s(\"div\",\"flatpickr-wrapper\");w.element.parentNode&&w.element.parentNode.insertBefore(l,w.element),l.appendChild(w.element),w.altInput&&l.appendChild(w.altInput),l.appendChild(w.calendarContainer)}w.config.static||w.config.inline||(void 0!==w.config.appendTo?w.config.appendTo:window.document.body).appendChild(w.calendarContainer)}(),function(){if(w.config.wrap&&[\"open\",\"close\",\"toggle\",\"clear\"].forEach((function(e){Array.prototype.forEach.call(w.element.querySelectorAll(\"[data-\"+e+\"]\"),(function(n){return N(n,\"click\",w[e])}))})),w.isMobile)!function(){var e=w.config.enableTime?w.config.noCalendar?\"time\":\"datetime-local\":\"date\";w.mobileInput=s(\"input\",w.input.className+\" flatpickr-mobile\"),w.mobileInput.tabIndex=1,w.mobileInput.type=e,w.mobileInput.disabled=w.input.disabled,w.mobileInput.required=w.input.required,w.mobileInput.placeholder=w.input.placeholder,w.mobileFormatStr=\"datetime-local\"===e?\"Y-m-d\\\\TH:i:S\":\"date\"===e?\"Y-m-d\":\"H:i:S\",w.selectedDates.length>0&&(w.mobileInput.defaultValue=w.mobileInput.value=w.formatDate(w.selectedDates[0],w.mobileFormatStr)),w.config.minDate&&(w.mobileInput.min=w.formatDate(w.config.minDate,\"Y-m-d\")),w.config.maxDate&&(w.mobileInput.max=w.formatDate(w.config.maxDate,\"Y-m-d\")),w.input.getAttribute(\"step\")&&(w.mobileInput.step=String(w.input.getAttribute(\"step\"))),w.input.type=\"hidden\",void 0!==w.altInput&&(w.altInput.type=\"hidden\");try{w.input.parentNode&&w.input.parentNode.insertBefore(w.mobileInput,w.input.nextSibling)}catch(e){}N(w.mobileInput,\"change\",(function(e){w.setDate(g(e).value,!1,w.mobileFormatStr),pe(\"onChange\"),pe(\"onClose\")}))}();else{var e=l(ie,50);if(w._debouncedChange=l(A,300),w.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&N(w.daysContainer,\"mouseover\",(function(e){\"range\"===w.config.mode&&ae(g(e))})),N(window.document.body,\"keydown\",te),w.config.inline||w.config.static||N(window,\"resize\",e),void 0!==window.ontouchstart?N(window.document,\"touchstart\",Z):N(window.document,\"click\",Z),N(window.document,\"focus\",Z,{capture:!0}),!0===w.config.clickOpens&&(N(w._input,\"focus\",w.open),N(w._input,\"click\",w.open)),void 0!==w.daysContainer&&(N(w.monthNav,\"click\",Ce),N(w.monthNav,[\"keyup\",\"increment\"],F),N(w.daysContainer,\"click\",ue)),void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement){var n=function(e){return g(e).select()};N(w.timeContainer,[\"increment\"],T),N(w.timeContainer,\"blur\",T,{capture:!0}),N(w.timeContainer,\"click\",Y),N([w.hourElement,w.minuteElement],[\"focus\",\"click\"],n),void 0!==w.secondElement&&N(w.secondElement,\"focus\",(function(){return w.secondElement&&w.secondElement.select()})),void 0!==w.amPM&&N(w.amPM,\"click\",(function(e){T(e),A()}))}w.config.allowInput&&N(w._input,\"blur\",ne)}}(),(w.selectedDates.length||w.config.noCalendar)&&(w.config.enableTime&&S(w.config.noCalendar?w.latestSelectedDateObj||w.config.minDate:void 0),be(!1)),E();var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!w.isMobile&&n&&ce(),pe(\"onReady\")}(),w}function E(e,n){for(var t=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],i=0;ithis.render()));const{start:s,end:l,value:r,step:o,title:n}=this.model.properties;this.on_change([s,l,r,o],(()=>{const{start:t,end:e,value:i,step:s}=this._calc_to();this.noUiSlider.updateOptions({range:{min:t,max:e},start:i,step:s})}));const{bar_color:a}=this.model.properties;this.on_change(a,(()=>{this._set_bar_color()}));const{show_value:d}=this.model.properties;this.on_change([r,n,d],(()=>this._update_title()))}styles(){return[...super.styles(),u.default,c.default]}_update_title(){var t;n.empty(this.title_el);const e=null==this.model.title||0==this.model.title.length&&!this.model.show_value;if(this.title_el.style.display=e?\"none\":\"\",!e&&(0!=(null===(t=this.model.title)||void 0===t?void 0:t.length)&&(this.title_el.textContent=`${this.model.title}: `),this.model.show_value)){const{value:t}=this._calc_to(),e=t.map((t=>this.model.pretty(t))).join(\" .. \");this.title_el.appendChild(n.span({class:m.slider_value},e))}}_set_bar_color(){if(!this.model.disabled){this.slider_el.querySelector(\".noUi-connect\").style.backgroundColor=d.color2css(this.model.bar_color)}}render(){super.render();const{start:t,end:e,value:i,step:s}=this._calc_to();let l;if(this.model.tooltips){const t={to:t=>this.model.pretty(t)};l=a.repeat(t,i.length)}else l=!1;if(null==this.slider_el){this.slider_el=n.div(),o.create(this.slider_el,{range:{min:t,max:e},start:i,step:s,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:l,orientation:this.model.orientation,direction:this.model.direction}),this.noUiSlider.on(\"slide\",((t,e,i)=>this._slide(i))),this.noUiSlider.on(\"change\",((t,e,i)=>this._change(i)));const r=(t,e)=>{if(!l)return;this.slider_el.querySelectorAll(\".noUi-handle\")[t].querySelector(\".noUi-tooltip\").style.display=e?\"block\":\"\"};this.noUiSlider.on(\"start\",((t,e)=>r(e,!0))),this.noUiSlider.on(\"end\",((t,e)=>r(e,!1)))}else this.noUiSlider.updateOptions({range:{min:t,max:e},start:i,step:s});this._set_bar_color(),this.model.disabled?this.slider_el.setAttribute(\"disabled\",\"true\"):this.slider_el.removeAttribute(\"disabled\"),this.title_el=n.div({class:m.slider_title}),this._update_title(),this.group_el=n.div({class:p.input_group},this.title_el,this.slider_el),this.el.appendChild(this.group_el)}_slide(t){this.model.value=this._calc_from(t)}_change(t){const e=this._calc_from(t);this.model.setv({value:e,value_throttled:e})}}b.__name__=\"AbstractBaseSliderView\";class v extends b{_calc_to(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}}_calc_from([t]){return Number.isInteger(this.model.start)&&Number.isInteger(this.model.end)&&Number.isInteger(this.model.step)?Math.round(t):t}}i.AbstractSliderView=v,v.__name__=\"AbstractSliderView\";class g extends b{_calc_to(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}}_calc_from(t){return t}}i.AbstractRangeSliderView=g,g.__name__=\"AbstractRangeSliderView\";class S extends _.Control{constructor(t){super(t),this.connected=!1}static init_AbstractSlider(){this.define((({Any:t,Boolean:e,Number:i,String:s,Color:l,Or:r,Enum:o,Ref:n,Nullable:a})=>({title:[a(s),\"\"],show_value:[e,!0],start:[t],end:[t],value:[t],value_throttled:[t],step:[i,1],format:[r(s,n(h.TickFormatter))],direction:[o(\"ltr\",\"rtl\"),\"ltr\"],tooltips:[e,!0],bar_color:[l,\"#e6e6e6\"]})))}pretty(t){return this._formatter(t,this.format)}}i.AbstractSlider=S,S.__name__=\"AbstractSlider\",S.init_AbstractSlider()},\n 439: function _(t,e,r,n,i){\n /*! nouislider - 14.6.3 - 11/19/2020 */\n var o;o=function(){\"use strict\";var t=\"14.6.3\";function e(t){t.parentElement.removeChild(t)}function r(t){return null!=t}function n(t){t.preventDefault()}function i(t){return\"number\"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,r){r>0&&(u(t,e),setTimeout((function(){c(t,e)}),r))}function s(t){return Math.max(Math.min(t,100),0)}function a(t){return Array.isArray(t)?t:[t]}function l(t){var e=(t=String(t)).split(\".\");return e.length>1?e[1].length:0}function u(t,e){t.classList&&!/\\s/.test(e)?t.classList.add(e):t.className+=\" \"+e}function c(t,e){t.classList&&!/\\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function p(t){var e=void 0!==window.pageXOffset,r=\"CSS1Compat\"===(t.compatMode||\"\");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function f(t,e){return 100/(e-t)}function d(t,e,r){return 100*e/(t[r+1]-t[r])}function h(t,e){for(var r=1;t>=e[r];)r+=1;return r}function m(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=h(r,t),i=t[n-1],o=t[n],s=e[n-1],a=e[n];return s+function(t,e){return d(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}([i,o],r)/f(s,a)}function g(t,e,r,n){if(100===n)return n;var i=h(n,t),o=t[i-1],s=t[i];return r?n-o>(s-o)/2?s:o:e[i-1]?t[i-1]+function(t,e){return Math.round(t/e)*e}(n-t[i-1],e[i-1]):n}function v(t,e,r){var n;if(\"number\"==typeof e&&(e=[e]),!Array.isArray(e))throw new Error(\"noUiSlider (14.6.3): 'range' contains invalid value.\");if(!i(n=\"min\"===t?0:\"max\"===t?100:parseFloat(t))||!i(e[0]))throw new Error(\"noUiSlider (14.6.3): 'range' value isn't numeric.\");r.xPct.push(n),r.xVal.push(e[0]),n?r.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(r.xSteps[0]=e[1]),r.xHighestCompleteStep.push(0)}function b(t,e,r){if(e)if(r.xVal[t]!==r.xVal[t+1]){r.xSteps[t]=d([r.xVal[t],r.xVal[t+1]],e,0)/f(r.xPct[t],r.xPct[t+1]);var n=(r.xVal[t+1]-r.xVal[t])/r.xNumSteps[t],i=Math.ceil(Number(n.toFixed(3))-1),o=r.xVal[t]+r.xNumSteps[t]*i;r.xHighestCompleteStep[t]=o}else r.xSteps[t]=r.xHighestCompleteStep[t]=r.xVal[t]}function x(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i=[];for(n in t)t.hasOwnProperty(n)&&i.push([t[n],n]);for(i.length&&\"object\"==typeof i[0][0]?i.sort((function(t,e){return t[0][0]-e[0][0]})):i.sort((function(t,e){return t[0]-e[0]})),n=0;nthis.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++;var o=1,s=e[i],a=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);s>0;)a=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=a*n,o=(s-100*n)/e[i+c],n=1):(l=e[i+c]*a/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),s=e[i+c]*o;return t+u},x.prototype.toStepping=function(t){return t=m(this.xVal,this.xPct,t)},x.prototype.fromStepping=function(t){return function(t,e,r){if(r>=100)return t.slice(-1)[0];var n=h(r,e),i=t[n-1],o=t[n],s=e[n-1];return function(t,e){return e*(t[1]-t[0])/100+t[0]}([i,o],(r-s)*f(s,e[n]))}(this.xVal,this.xPct,t)},x.prototype.getStep=function(t){return t=g(this.xPct,this.xSteps,this.snap,t)},x.prototype.getDefaultStep=function(t,e,r){var n=h(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},x.prototype.getNearbySteps=function(t){var e=h(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},x.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(l);return Math.max.apply(null,t)},x.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var S={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number},w={target:\"target\",base:\"base\",origin:\"origin\",handle:\"handle\",handleLower:\"handle-lower\",handleUpper:\"handle-upper\",touchArea:\"touch-area\",horizontal:\"horizontal\",vertical:\"vertical\",background:\"background\",connect:\"connect\",connects:\"connects\",ltr:\"ltr\",rtl:\"rtl\",textDirectionLtr:\"txt-dir-ltr\",textDirectionRtl:\"txt-dir-rtl\",draggable:\"draggable\",drag:\"state-drag\",tap:\"state-tap\",active:\"active\",tooltip:\"tooltip\",pips:\"pips\",pipsHorizontal:\"pips-horizontal\",pipsVertical:\"pips-vertical\",marker:\"marker\",markerHorizontal:\"marker-horizontal\",markerVertical:\"marker-vertical\",markerNormal:\"marker-normal\",markerLarge:\"marker-large\",markerSub:\"marker-sub\",value:\"value\",valueHorizontal:\"value-horizontal\",valueVertical:\"value-vertical\",valueNormal:\"value-normal\",valueLarge:\"value-large\",valueSub:\"value-sub\"},y=\".__tooltips\",E=\".__aria\";function C(t){if(function(t){return\"object\"==typeof t&&\"function\"==typeof t.to&&\"function\"==typeof t.from}(t))return!0;throw new Error(\"noUiSlider (14.6.3): 'format' requires 'to' and 'from' methods.\")}function P(t,e){if(!i(e))throw new Error(\"noUiSlider (14.6.3): 'step' is not numeric.\");t.singleStep=e}function N(t,e){if(!i(e))throw new Error(\"noUiSlider (14.6.3): 'keyboardPageMultiplier' is not numeric.\");t.keyboardPageMultiplier=e}function k(t,e){if(!i(e))throw new Error(\"noUiSlider (14.6.3): 'keyboardDefaultStep' is not numeric.\");t.keyboardDefaultStep=e}function U(t,e){if(\"object\"!=typeof e||Array.isArray(e))throw new Error(\"noUiSlider (14.6.3): 'range' is not an object.\");if(void 0===e.min||void 0===e.max)throw new Error(\"noUiSlider (14.6.3): Missing 'min' or 'max' in 'range'.\");if(e.min===e.max)throw new Error(\"noUiSlider (14.6.3): 'range' 'min' and 'max' cannot be equal.\");t.spectrum=new x(e,t.snap,t.singleStep)}function A(t,e){if(e=a(e),!Array.isArray(e)||!e.length)throw new Error(\"noUiSlider (14.6.3): 'start' option is incorrect.\");t.handles=e.length,t.start=e}function V(t,e){if(t.snap=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (14.6.3): 'snap' option must be a boolean.\")}function D(t,e){if(t.animate=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (14.6.3): 'animate' option must be a boolean.\")}function M(t,e){if(t.animationDuration=e,\"number\"!=typeof e)throw new Error(\"noUiSlider (14.6.3): 'animationDuration' option must be a number.\")}function O(t,e){var r,n=[!1];if(\"lower\"===e?e=[!0,!1]:\"upper\"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r1)throw new Error(\"noUiSlider (14.6.3): 'padding' option must not exceed 100% of the range.\")}}function F(t,e){switch(e){case\"ltr\":t.dir=0;break;case\"rtl\":t.dir=1;break;default:throw new Error(\"noUiSlider (14.6.3): 'direction' option was not recognized.\")}}function R(t,e){if(\"string\"!=typeof e)throw new Error(\"noUiSlider (14.6.3): 'behaviour' must be a string containing options.\");var r=e.indexOf(\"tap\")>=0,n=e.indexOf(\"drag\")>=0,i=e.indexOf(\"fixed\")>=0,o=e.indexOf(\"snap\")>=0,s=e.indexOf(\"hover\")>=0,a=e.indexOf(\"unconstrained\")>=0;if(i){if(2!==t.handles)throw new Error(\"noUiSlider (14.6.3): 'fixed' behaviour must be used with 2 handles\");z(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error(\"noUiSlider (14.6.3): 'unconstrained' behaviour cannot be used with margin or limit\");t.events={tap:r||o,drag:n,fixed:i,snap:o,hover:s,unconstrained:a}}function T(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var r=0;r0&&((a=L(i,!1)).className=c(s,r.cssClasses.value),a.setAttribute(\"data-value\",o),a.style[r.style]=t+\"%\",a.innerHTML=n.to(o))}}(o,t[o][0],t[o][1])})),i}function q(){h&&(e(h),h=null)}function X(t){q();var e=t.mode,r=t.density||1,n=t.filter||!1,i=function(t,e,r){if(\"range\"===t||\"steps\"===t)return C.xVal;if(\"count\"===t){if(e<2)throw new Error(\"noUiSlider (14.6.3): 'values' (>= 2) required for mode 'count'.\");var n=e-1,i=100/n;for(e=[];n--;)e[n]=n*i;e.push(100),t=\"positions\"}return\"positions\"===t?e.map((function(t){return C.fromStepping(r?C.getStep(t):t)})):\"values\"===t?r?e.map((function(t){return C.fromStepping(C.getStep(C.toStepping(t)))})):e:void 0}(e,t.values||!1,t.stepped||!1),o=function(t,e,r){var n,i={},o=C.xVal[0],s=C.xVal[C.xVal.length-1],a=!1,l=!1,u=0;return n=r.slice().sort((function(t,e){return t-e})),(r=n.filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==o&&(r.unshift(o),a=!0),r[r.length-1]!==s&&(r.push(s),l=!0),r.forEach((function(n,o){var s,c,p,f,d,h,m,g,v,b,x=n,S=r[o+1],w=\"steps\"===e;if(w&&(s=C.xNumSteps[o]),s||(s=S-x),!1!==x)for(void 0===S&&(S=x),s=Math.max(s,1e-7),c=x;c<=S;c=(c+s).toFixed(7)/1){for(g=(d=(f=C.toStepping(c))-u)/t,b=d/(v=Math.round(g)),p=1;p<=v;p+=1)i[(h=u+p*b).toFixed(5)]=[C.fromStepping(h),0];m=r.indexOf(c)>-1?1:w?2:0,!o&&a&&c!==S&&(m=0),c===S&&l||(i[f.toFixed(5)]=[c,m]),u=f}})),i}(r,e,i),s=t.format||{to:Math.round};return h=w.appendChild(B(o,n,s))}function Y(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][r.ort];return 0===r.ort?t.width||l[e]:t.height||l[e]}function I(t,e,n,i){var o=function(o){return!!(o=function(t,e,r){var n,i,o=0===t.type.indexOf(\"touch\"),s=0===t.type.indexOf(\"mouse\"),a=0===t.type.indexOf(\"pointer\");if(0===t.type.indexOf(\"MSPointer\")&&(a=!0),\"mousedown\"===t.type&&!t.buttons&&!t.touches)return!1;if(o){var l=function(t){return t.target===r||r.contains(t.target)||t.target.shadowRoot&&t.target.shadowRoot.contains(r)};if(\"touchstart\"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;n=u[0].pageX,i=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;n=c.pageX,i=c.pageY}}return e=e||p(V),(s||a)&&(n=t.clientX+e.x,i=t.clientY+e.y),t.pageOffset=e,t.points=[n,i],t.cursor=s||a,t}(o,i.pageOffset,i.target||e))&&!(F()&&!i.doNotReject)&&(s=w,a=r.cssClasses.tap,!((s.classList?s.classList.contains(a):new RegExp(\"\\\\b\"+a+\"\\\\b\").test(s.className))&&!i.doNotReject)&&!(t===x.start&&void 0!==o.buttons&&o.buttons>1)&&(!i.hover||!o.buttons)&&(S||o.preventDefault(),o.calcPoint=o.points[r.ort],void n(o,i)));var s,a},s=[];return t.split(\" \").forEach((function(t){e.addEventListener(t,o,!!S&&{passive:!0}),s.push([t,o])})),s}function $(t){var e,n,i,o,a,u,c=100*(t-(e=l,n=r.ort,i=e.getBoundingClientRect(),o=e.ownerDocument,a=o.documentElement,u=p(o),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(u.x=0),n?i.top+u.y-a.clientTop:i.left+u.x-a.clientLeft))/Y();return c=s(c),r.dir?100-c:c}function G(t,e){\"mouseout\"===t.type&&\"HTML\"===t.target.nodeName&&null===t.relatedTarget&&K(t,e)}function J(t,e){if(-1===navigator.appVersion.indexOf(\"MSIE 9\")&&0===t.buttons&&0!==e.buttonsProperty)return K(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);st(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function K(t,e){e.handle&&(c(e.handle,r.cssClasses.active),U-=1),e.listeners.forEach((function(t){D.removeEventListener(t[0],t[1])})),0===U&&(c(w,r.cssClasses.drag),lt(),t.cursor&&(M.style.cursor=\"\",M.removeEventListener(\"selectstart\",n))),e.handleNumbers.forEach((function(t){nt(\"change\",t),nt(\"set\",t),nt(\"end\",t)}))}function Q(t,e){if(e.handleNumbers.some(R))return!1;var i;1===e.handleNumbers.length&&(i=f[e.handleNumbers[0]].children[0],U+=1,u(i,r.cssClasses.active)),t.stopPropagation();var o=[],s=I(x.move,D,J,{target:t.target,handle:i,listeners:o,startCalcPoint:t.calcPoint,baseSize:Y(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:N.slice()}),a=I(x.end,D,K,{target:t.target,handle:i,listeners:o,doNotReject:!0,handleNumbers:e.handleNumbers}),l=I(\"mouseout\",D,G,{target:t.target,handle:i,listeners:o,doNotReject:!0,handleNumbers:e.handleNumbers});o.push.apply(o,s.concat(a,l)),t.cursor&&(M.style.cursor=getComputedStyle(t.target).cursor,f.length>1&&u(w,r.cssClasses.drag),M.addEventListener(\"selectstart\",n,!1)),e.handleNumbers.forEach((function(t){nt(\"start\",t)}))}function Z(t){t.stopPropagation();var e=$(t.calcPoint),n=function(t){var e=100,r=!1;return f.forEach((function(n,i){if(!R(i)){var o=N[i],s=Math.abs(o-t);(so||100===s&&100===e)&&(r=i,e=s)}})),r}(e);if(!1===n)return!1;r.events.snap||o(w,r.cssClasses.tap,r.animationDuration),ut(n,e,!0,!0),lt(),nt(\"slide\",n,!0),nt(\"update\",n,!0),nt(\"change\",n,!0),nt(\"set\",n,!0),r.events.snap&&Q(t,{handleNumbers:[n]})}function tt(t){var e=$(t.calcPoint),r=C.getStep(e),n=C.fromStepping(r);Object.keys(A).forEach((function(t){\"hover\"===t.split(\".\")[0]&&A[t].forEach((function(t){t.call(g,n)}))}))}function et(t,e){A[t]=A[t]||[],A[t].push(e),\"update\"===t.split(\".\")[0]&&f.forEach((function(t,e){nt(\"update\",e)}))}function rt(t){var e=t&&t.split(\".\")[0],r=e?t.substring(e.length):t;Object.keys(A).forEach((function(t){var n=t.split(\".\")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||function(t){return t===E||t===y}(i)&&r!==i||delete A[t]}))}function nt(t,e,n){Object.keys(A).forEach((function(i){var o=i.split(\".\")[0];t===o&&A[i].forEach((function(t){t.call(g,P.map(r.format.to),e,P.slice(),n||!1,N.slice(),g)}))}))}function it(t,e,n,i,o,a){var l;return f.length>1&&!r.events.unconstrained&&(i&&e>0&&(l=C.getAbsoluteDistance(t[e-1],r.margin,0),n=Math.max(n,l)),o&&e1&&r.limit&&(i&&e>0&&(l=C.getAbsoluteDistance(t[e-1],r.limit,0),n=Math.min(n,l)),o&&e1?n.forEach((function(t,r){var n=it(i,t,i[t]+e,o[r],s[r],!1);!1===n?e=0:(e=n-i[t],i[t]=n)})):o=s=[!0];var a=!1;n.forEach((function(t,n){a=ut(t,r[t]+e,o[n],s[n])||a})),a&&n.forEach((function(t){nt(\"update\",t),nt(\"slide\",t)}))}function at(t,e){return r.dir?100-t-e:t}function lt(){k.forEach((function(t){var e=N[t]>50?-1:1,r=3+(f.length+e*t);f[t].style.zIndex=r}))}function ut(t,e,n,i,o){return o||(e=it(N,t,e,n,i,!1)),!1!==e&&(function(t,e){N[t]=e,P[t]=C.fromStepping(e);var n=\"translate(\"+ot(10*(at(e,0)-O)+\"%\",\"0\")+\")\";f[t].style[r.transformRule]=n,ct(t),ct(t+1)}(t,e),!0)}function ct(t){if(d[t]){var e=0,n=100;0!==t&&(e=N[t-1]),t!==d.length-1&&(n=N[t]);var i=n-e,o=\"translate(\"+ot(at(e,i)+\"%\",\"0\")+\")\",s=\"scale(\"+ot(i/100,\"1\")+\")\";d[t].style[r.transformRule]=o+\" \"+s}}function pt(t,e){return null===t||!1===t||void 0===t?N[e]:(\"number\"==typeof t&&(t=String(t)),t=r.format.from(t),!1===(t=C.toStepping(t))||isNaN(t)?N[e]:t)}function ft(t,e,n){var i=a(t),s=void 0===N[0];e=void 0===e||!!e,r.animate&&!s&&o(w,r.cssClasses.tap,r.animationDuration),k.forEach((function(t){ut(t,pt(i[t],t),!0,!1,n)}));for(var l=1===k.length?0:1;ln.stepAfter.startValue&&(o=n.stepAfter.startValue-i),s=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(s=null);var a=C.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(a))),null!==s&&!1!==s&&(s=Number(s.toFixed(a))),[s,o]}return u(v=w,r.cssClasses.target),0===r.dir?u(v,r.cssClasses.ltr):u(v,r.cssClasses.rtl),0===r.ort?u(v,r.cssClasses.horizontal):u(v,r.cssClasses.vertical),u(v,\"rtl\"===getComputedStyle(v).direction?r.cssClasses.textDirectionRtl:r.cssClasses.textDirectionLtr),l=L(v,r.cssClasses.base),function(t,e){var n=L(e,r.cssClasses.connects);f=[],(d=[]).push(H(n,t[0]));for(var i=0;i=0&&t .noUi-tooltip{-webkit-transform:translate(50%, 0);transform:translate(50%, 0);left:auto;bottom:10px;}.bk-root .noUi-vertical .noUi-origin > .noUi-tooltip{-webkit-transform:translate(0, -18px);transform:translate(0, -18px);top:auto;right:28px;}.bk-root .noUi-handle{cursor:grab;cursor:-webkit-grab;}.bk-root .noUi-handle.noUi-active{cursor:grabbing;cursor:-webkit-grabbing;}.bk-root .noUi-handle:after,.bk-root .noUi-handle:before{display:none;}.bk-root .noUi-tooltip{display:none;white-space:nowrap;}.bk-root .noUi-handle:hover .noUi-tooltip{display:block;}.bk-root .noUi-horizontal{width:100%;height:10px;}.bk-root .noUi-vertical{width:10px;height:100%;}.bk-root .noUi-horizontal .noUi-handle{width:14px;height:18px;right:-7px;top:-5px;}.bk-root .noUi-vertical .noUi-handle{width:18px;height:14px;right:-5px;top:-7px;}.bk-root .noUi-target.noUi-horizontal{margin:5px 0px;}.bk-root .noUi-target.noUi-vertical{margin:0px 5px;}'},\n 442: function _(t,e,i,r,a){r();const s=t(1).__importDefault(t(181)),d=t(438),_=t(8);class n extends d.AbstractSliderView{}i.DateSliderView=n,n.__name__=\"DateSliderView\";class l extends d.AbstractSlider{constructor(t){super(t),this.behaviour=\"tap\",this.connected=[!0,!1]}static init_DateSlider(){this.prototype.default_view=n,this.override({format:\"%d %b %Y\"})}_formatter(t,e){return _.isString(e)?s.default(t,e):e.compute(t)}}i.DateSlider=l,l.__name__=\"DateSlider\",l.init_DateSlider()},\n 443: function _(e,t,i,n,s){n();const r=e(444);class _ extends r.MarkupView{render(){super.render(),this.model.render_as_text?this.markup_el.textContent=this.model.text:this.markup_el.innerHTML=this.model.text}}i.DivView=_,_.__name__=\"DivView\";class a extends r.Markup{constructor(e){super(e)}static init_Div(){this.prototype.default_view=_,this.define((({Boolean:e})=>({render_as_text:[e,!1]})))}}i.Div=a,a.__name__=\"Div\",a.init_Div()},\n 444: function _(t,e,s,i,a){i();const n=t(1),l=t(224),r=t(43),c=t(488),u=n.__importStar(t(445));class _ extends c.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>{this.layout.invalidate_cache(),this.render(),this.root.compute_layout()}))}styles(){return[...super.styles(),u.default]}_update_layout(){this.layout=new l.CachedVariadicBox(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render();const t=Object.assign(Object.assign({},this.model.style),{display:\"inline-block\"});this.markup_el=r.div({class:u.clearfix,style:t}),this.el.appendChild(this.markup_el)}}s.MarkupView=_,_.__name__=\"MarkupView\";class o extends c.Widget{constructor(t){super(t)}static init_Markup(){this.define((({String:t,Dict:e})=>({text:[t,\"\"],style:[e(t),{}]})))}}s.Markup=o,o.__name__=\"Markup\",o.init_Markup()},\n 445: function _(o,r,e,t,a){t(),e.root=\"bk-root\",e.clearfix=\"bk-clearfix\",e.default='.bk-root .bk-clearfix:before,.bk-root .bk-clearfix:after{content:\"\";display:table;}.bk-root .bk-clearfix:after{clear:both;}'},\n 446: function _(e,t,i,n,s){n();const o=e(1),r=e(419),l=e(264),d=e(43),_=e(8),u=o.__importStar(e(328)),c=o.__importStar(e(243)),h=c;class p extends r.AbstractButtonView{constructor(){super(...arguments),this._open=!1}styles(){return[...super.styles(),c.default]}render(){super.render();const e=d.div({class:[h.caret,h.down]});if(this.model.is_split){const t=this._render_button(e);t.classList.add(u.dropdown_toggle),t.addEventListener(\"click\",(()=>this._toggle_menu())),this.group_el.appendChild(t)}else this.button_el.appendChild(e);const t=this.model.menu.map(((e,t)=>{if(null==e)return d.div({class:h.divider});{const i=_.isString(e)?e:e[0],n=d.div({},i);return n.addEventListener(\"click\",(()=>this._item_click(t))),n}}));this.menu=d.div({class:[h.menu,h.below]},t),this.el.appendChild(this.menu),d.undisplay(this.menu)}_show_menu(){if(!this._open){this._open=!0,d.display(this.menu);const e=t=>{const{target:i}=t;i instanceof HTMLElement&&!this.el.contains(i)&&(document.removeEventListener(\"click\",e),this._hide_menu())};document.addEventListener(\"click\",e)}}_hide_menu(){this._open&&(this._open=!1,d.undisplay(this.menu))}_toggle_menu(){this._open?this._hide_menu():this._show_menu()}click(){this.model.is_split?(this._hide_menu(),this.model.trigger_event(new l.ButtonClick),super.click()):this._toggle_menu()}_item_click(e){this._hide_menu();const t=this.model.menu[e];if(null!=t){const i=_.isString(t)?t:t[1];_.isString(i)?this.model.trigger_event(new l.MenuItemClick(i)):i.execute(this.model,{index:e})}}}i.DropdownView=p,p.__name__=\"DropdownView\";class m extends r.AbstractButton{constructor(e){super(e)}static init_Dropdown(){this.prototype.default_view=p,this.define((({Null:e,Boolean:t,String:i,Array:n,Tuple:s,Or:o})=>({split:[t,!1],menu:[n(o(i,s(i,o(i)),e)),[]]}))),this.override({label:\"Dropdown\"})}get is_split(){return this.split}}i.Dropdown=m,m.__name__=\"Dropdown\",m.init_Dropdown()},\n 447: function _(e,i,t,l,s){l();const n=e(488);class a extends n.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.properties.width.change,(()=>this.render()))}render(){null==this.dialogEl&&(this.dialogEl=document.createElement(\"input\"),this.dialogEl.type=\"file\",this.dialogEl.multiple=this.model.multiple,this.dialogEl.onchange=()=>{const{files:e}=this.dialogEl;null!=e&&this.load_files(e)},this.el.appendChild(this.dialogEl)),null!=this.model.accept&&\"\"!=this.model.accept&&(this.dialogEl.accept=this.model.accept),this.dialogEl.style.width=\"{this.model.width}px\",this.dialogEl.disabled=this.model.disabled}async load_files(e){const i=[],t=[],l=[];let s;for(s=0;s{const l=new FileReader;l.onload=()=>{var s;const{result:n}=l;null!=n?i(n):t(null!==(s=l.error)&&void 0!==s?s:new Error(`unable to read '${e.name}'`))},l.readAsDataURL(e)}))}}t.FileInputView=a,a.__name__=\"FileInputView\";class o extends n.Widget{constructor(e){super(e)}static init_FileInput(){this.prototype.default_view=a,this.define((({Boolean:e,String:i,Array:t,Or:l})=>({value:[l(i,t(i)),\"\"],mime_type:[l(i,t(i)),\"\"],filename:[l(i,t(i)),\"\"],accept:[i,\"\"],multiple:[e,!1]})))}}t.FileInput=o,o.__name__=\"FileInput\",o.init_FileInput()},\n 448: function _(e,t,i,s,n){s();const l=e(1),o=e(43),r=e(8),c=e(426),h=l.__importStar(e(427));class p extends c.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,(()=>this.render_selection())),this.connect(this.model.properties.options.change,(()=>this.render())),this.connect(this.model.properties.name.change,(()=>this.render())),this.connect(this.model.properties.title.change,(()=>this.render())),this.connect(this.model.properties.size.change,(()=>this.render())),this.connect(this.model.properties.disabled.change,(()=>this.render()))}render(){super.render();const e=this.model.options.map((e=>{let t,i;return r.isString(e)?t=i=e:[t,i]=e,o.option({value:t},i)}));this.input_el=o.select({multiple:!0,class:h.input,name:this.model.name,disabled:this.model.disabled},e),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el),this.render_selection()}render_selection(){const e=new Set(this.model.value);for(const t of this.el.querySelectorAll(\"option\"))t.selected=e.has(t.value);this.input_el.size=this.model.size}change_input(){const e=null!=this.el.querySelector(\"select:focus\"),t=[];for(const e of this.el.querySelectorAll(\"option\"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.input_el.focus()}}i.MultiSelectView=p,p.__name__=\"MultiSelectView\";class u extends c.InputWidget{constructor(e){super(e)}static init_MultiSelect(){this.prototype.default_view=p,this.define((({Int:e,String:t,Array:i,Tuple:s,Or:n})=>({value:[i(t),[]],options:[i(n(t,s(t,t))),[]],size:[e,4]})))}}i.MultiSelect=u,u.__name__=\"MultiSelect\",u.init_MultiSelect()},\n 449: function _(a,r,e,t,p){t();const s=a(444),i=a(43);class n extends s.MarkupView{render(){super.render();const a=i.p({style:{margin:0}},this.model.text);this.markup_el.appendChild(a)}}e.ParagraphView=n,n.__name__=\"ParagraphView\";class _ extends s.Markup{constructor(a){super(a)}static init_Paragraph(){this.prototype.default_view=n}}e.Paragraph=_,_.__name__=\"Paragraph\",_.init_Paragraph()},\n 450: function _(s,t,e,n,r){n();const p=s(424);class u extends p.TextInputView{render(){super.render(),this.input_el.type=\"password\"}}e.PasswordInputView=u,u.__name__=\"PasswordInputView\";class a extends p.TextInput{constructor(s){super(s)}static init_PasswordInput(){this.prototype.default_view=u}}e.PasswordInput=a,a.__name__=\"PasswordInput\",a.init_PasswordInput()},\n 451: function _(e,t,i,l,s){l();const o=e(1),n=o.__importDefault(e(452)),h=e(43),a=e(8),u=e(224),c=o.__importStar(e(427)),d=o.__importDefault(e(453)),_=e(426);class r extends _.InputWidgetView{constructor(){super(...arguments),this._last_height=null}connect_signals(){super.connect_signals(),this.connect(this.model.properties.disabled.change,(()=>this.set_disabled()));const{value:e,max_items:t,option_limit:i,delete_button:l,placeholder:s,options:o,name:n,title:h}=this.model.properties;this.on_change([e,t,i,l,s,o,n,h],(()=>this.render()))}styles(){return[...super.styles(),d.default]}_update_layout(){this.layout=new u.CachedVariadicBox(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render(),this.input_el=h.select({multiple:!0,class:c.input,name:this.model.name,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el);const e=new Set(this.model.value),t=this.model.options.map((t=>{let i,l;return a.isString(t)?i=l=t:[i,l]=t,{value:i,label:l,selected:e.has(i)}})),i=this.model.solid?\"solid\":\"light\",l=`choices__item ${i}`,s=`choices__button ${i}`,o={choices:t,duplicateItemsAllowed:!1,removeItemButton:this.model.delete_button,classNames:{item:l,button:s}};null!=this.model.placeholder&&(o.placeholderValue=this.model.placeholder),null!=this.model.max_items&&(o.maxItemCount=this.model.max_items),null!=this.model.option_limit&&(o.renderChoiceLimit=this.model.option_limit),this.choice_el=new n.default(this.input_el,o);const u=()=>this.choice_el.containerOuter.element.getBoundingClientRect().height;null!=this._last_height&&this._last_height!=u()&&this.root.invalidate_layout(),this._last_height=u(),this.input_el.addEventListener(\"change\",(()=>this.change_input()))}set_disabled(){this.model.disabled?this.choice_el.disable():this.choice_el.enable()}change_input(){const e=null!=this.el.querySelector(\"select:focus\"),t=[];for(const e of this.el.querySelectorAll(\"option\"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.input_el.focus()}}i.MultiChoiceView=r,r.__name__=\"MultiChoiceView\";class m extends _.InputWidget{constructor(e){super(e)}static init_MultiChoice(){this.prototype.default_view=r,this.define((({Boolean:e,Int:t,String:i,Array:l,Tuple:s,Or:o,Nullable:n})=>({value:[l(i),[]],options:[l(o(i,s(i,i))),[]],max_items:[n(t),null],delete_button:[e,!0],placeholder:[n(i),null],option_limit:[n(t),null],solid:[e,!0]})))}}i.MultiChoice=m,m.__name__=\"MultiChoice\",m.init_MultiChoice()},\n 452: function _(e,t,i,n,s){\n /*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n var r,o;r=window,o=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,\"a\",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p=\"/public/assets/scripts/\",i(i.s=4)}([function(e,t,i){\"use strict\";var n=function(e){return function(e){return!!e&&\"object\"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return\"[object RegExp]\"===t||\"[object Date]\"===t||function(e){return e.$$typeof===s}(e)}(e)},s=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function o(e,t,i){return e.concat(t).map((function(e){return r(e,i)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function c(e,t,i){var n={};return i.isMergeableObject(e)&&a(e).forEach((function(t){n[t]=r(e[t],i)})),a(t).forEach((function(s){(function(e,t){try{return t in e&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}catch(e){return!1}})(e,s)||(i.isMergeableObject(t[s])&&e[s]?n[s]=function(e,t){if(!t.customMerge)return l;var i=t.customMerge(e);return\"function\"==typeof i?i:l}(s,i)(e[s],t[s],i):n[s]=r(t[s],i))})),n}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=r;var s=Array.isArray(t);return s===Array.isArray(e)?s?i.arrayMerge(e,t,i):c(e,t,i):r(t,i)}l.all=function(e,t){if(!Array.isArray(e))throw new Error(\"first argument should be an array\");return e.reduce((function(e,i){return l(e,i,t)}),{})};var h=l;e.exports=h},function(e,t,i){\"use strict\";(function(e,n){var s,r=i(3);s=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==e?e:n;var o=Object(r.a)(s);t.a=o}).call(this,i(5),i(6)(e))},function(e,t,i){\n /*!\n * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,\"a\",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p=\"\",i(i.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,i){function n(e){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function s(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var i=this._prepareSearchers(e),n=i.tokenSearchers,s=i.fullSearcher,r=this._search(n,s),o=r.weights,a=r.results;return this._computeScore(o,a),this.options.shouldSort&&this._sort(a),t.limit&&\"number\"==typeof t.limit&&(a=a.slice(0,t.limit)),this._format(a)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var i=e.split(this.options.tokenSeparator),n=0,s=i.length;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,i=this.list,n={},s=[];if(\"string\"==typeof i[0]){for(var r=0,o=i.length;r1)throw new Error(\"Key weight has to be > 0 and <= 1\");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(h,p),record:h,index:c},{resultMap:n,results:s,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:s}}},{key:\"_analyze\",value:function(e,t){var i=e.key,n=e.arrayIndex,s=void 0===n?-1:n,r=e.value,o=e.record,c=e.index,l=t.tokenSearchers,h=void 0===l?[]:l,u=t.fullSearcher,d=void 0===u?[]:u,p=t.resultMap,m=void 0===p?{}:p,f=t.results,v=void 0===f?[]:f;if(null!=r){var g=!1,_=-1,b=0;if(\"string\"==typeof r){this._log(\"\\nKey: \".concat(\"\"===i?\"-\":i));var y=d.search(r);if(this._log('Full text: \"'.concat(r,'\", score: ').concat(y.score)),this.options.tokenize){for(var E=r.split(this.options.tokenSeparator),I=[],S=0;S-1&&(P=(P+_)/2),this._log(\"Score average:\",P);var D=!this.options.tokenize||!this.options.matchAllTokens||b>=h.length;if(this._log(\"\\nCheck Matches: \".concat(D)),(g||y.isMatch)&&D){var M=m[c];M?M.output.push({key:i,arrayIndex:s,value:r,score:P,matchedIndices:y.matchedIndices}):(m[c]={item:o,output:[{key:i,arrayIndex:s,value:r,score:P,matchedIndices:y.matchedIndices}]},v.push(m[c]))}}else if(a(r))for(var N=0,F=r.length;N-1&&(o.arrayIndex=r.arrayIndex),t.matches.push(o)}}})),this.options.includeScore&&s.push((function(e,t){t.score=e.score}));for(var r=0,o=e.length;ri)return s(e,this.pattern,n);var o=this.options,a=o.location,c=o.distance,l=o.threshold,h=o.findAllMatches,u=o.minMatchCharLength;return r(e,this.pattern,this.patternAlphabet,{location:a,distance:c,threshold:l,findAllMatches:h,minMatchCharLength:u})}}])&&n(t.prototype,i),a&&n(t,a),e}();e.exports=a},function(e,t){var i=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,s=new RegExp(t.replace(i,\"\\\\$&\").replace(n,\"|\")),r=e.match(s),o=!!r,a=[];if(o)for(var c=0,l=r.length;c=P;N-=1){var F=N-1,j=i[e.charAt(F)];if(j&&(E[F]=1),M[N]=(M[N+1]<<1|1)&j,0!==T&&(M[N]|=(O[N+1]|O[N])<<1|1|O[N+1]),M[N]&L&&(C=n(t,{errors:T,currentLocation:F,expectedLocation:v,distance:l}))<=_){if(_=C,(b=F)<=v)break;P=Math.max(1,2*v-b)}}if(n(t,{errors:T+1,currentLocation:v,expectedLocation:v,distance:l})>_)break;O=M}return{isMatch:b>=0,score:0===C?.001:C,matchedIndices:s(E,f)}}},function(e,t){e.exports=function(e,t){var i=t.errors,n=void 0===i?0:i,s=t.currentLocation,r=void 0===s?0:s,o=t.expectedLocation,a=void 0===o?0:o,c=t.distance,l=void 0===c?100:c,h=n/e.length,u=Math.abs(a-r);return l?h+u/l:u?1:h}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=[],n=-1,s=-1,r=0,o=e.length;r=t&&i.push([n,s]),n=-1)}return e[r-1]&&r-n>=t&&i.push([n,r-1]),i}},function(e,t){e.exports=function(e){for(var t={},i=e.length,n=0;n/g,\"&rt;\").replace(/-1?e.map((function(e){var i=e;return i.id===parseInt(t.choiceId,10)&&(i.selected=!0),i})):e;case\"REMOVE_ITEM\":return t.choiceId>-1?e.map((function(e){var i=e;return i.id===parseInt(t.choiceId,10)&&(i.selected=!1),i})):e;case\"FILTER_CHOICES\":return e.map((function(e){var i=e;return i.active=t.results.some((function(e){var t=e.item,n=e.score;return t.id===i.id&&(i.score=n,!0)})),i}));case\"ACTIVATE_CHOICES\":return e.map((function(e){var i=e;return i.active=t.active,i}));case\"CLEAR_CHOICES\":return v;default:return e}},general:_}),A=function(e,t){var i=e;if(\"CLEAR_ALL\"===t.type)i=void 0;else if(\"RESET_TO\"===t.type)return O(t.state);return C(i,t)};function L(e,t){for(var i=0;i\"'+I(e)+'\"'},maxItemText:function(e){return\"Only \"+e+\" values can be added\"},valueComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:\"choices\",containerInner:\"choices__inner\",input:\"choices__input\",inputCloned:\"choices__input--cloned\",list:\"choices__list\",listItems:\"choices__list--multiple\",listSingle:\"choices__list--single\",listDropdown:\"choices__list--dropdown\",item:\"choices__item\",itemSelectable:\"choices__item--selectable\",itemDisabled:\"choices__item--disabled\",itemChoice:\"choices__item--choice\",placeholder:\"choices__placeholder\",group:\"choices__group\",groupHeading:\"choices__heading\",button:\"choices__button\",activeState:\"is-active\",focusState:\"is-focused\",openState:\"is-open\",disabledState:\"is-disabled\",highlightedState:\"is-highlighted\",selectedState:\"is-selected\",flippedState:\"is-flipped\",loadingState:\"is-loading\",noResults:\"has-no-results\",noChoices:\"has-no-choices\"}},D=\"showDropdown\",M=\"hideDropdown\",N=\"change\",F=\"choice\",j=\"search\",K=\"addItem\",R=\"removeItem\",H=\"highlightItem\",B=\"highlightChoice\",V=\"ADD_CHOICE\",G=\"FILTER_CHOICES\",q=\"ACTIVATE_CHOICES\",U=\"CLEAR_CHOICES\",z=\"ADD_GROUP\",W=\"ADD_ITEM\",X=\"REMOVE_ITEM\",$=\"HIGHLIGHT_ITEM\",J=46,Y=8,Z=13,Q=65,ee=27,te=38,ie=40,ne=33,se=34,re=\"text\",oe=\"select-one\",ae=\"select-multiple\",ce=function(){function e(e){var t=e.element,i=e.type,n=e.classNames,s=e.position;this.element=t,this.classNames=n,this.type=i,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var t=e.prototype;return t.addEventListeners=function(){this.element.addEventListener(\"focus\",this._onFocus),this.element.addEventListener(\"blur\",this._onBlur)},t.removeEventListeners=function(){this.element.removeEventListener(\"focus\",this._onFocus),this.element.removeEventListener(\"blur\",this._onBlur)},t.shouldFlip=function(e){if(\"number\"!=typeof e)return!1;var t=!1;return\"auto\"===this.position?t=!window.matchMedia(\"(min-height: \"+(e+1)+\"px)\").matches:\"top\"===this.position&&(t=!0),t},t.setActiveDescendant=function(e){this.element.setAttribute(\"aria-activedescendant\",e)},t.removeActiveDescendant=function(){this.element.removeAttribute(\"aria-activedescendant\")},t.open=function(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute(\"aria-expanded\",\"true\"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},t.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute(\"aria-expanded\",\"false\"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},t.focus=function(){this.isFocussed||this.element.focus()},t.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},t.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},t.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute(\"aria-disabled\"),this.type===oe&&this.element.setAttribute(\"tabindex\",\"0\"),this.isDisabled=!1},t.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute(\"aria-disabled\",\"true\"),this.type===oe&&this.element.setAttribute(\"tabindex\",\"-1\"),this.isDisabled=!0},t.wrap=function(e){!function(e,t){void 0===t&&(t=document.createElement(\"div\")),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t.appendChild(e)}(e,this.element)},t.unwrap=function(e){this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element)},t.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute(\"aria-busy\",\"true\"),this.isLoading=!0},t.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute(\"aria-busy\"),this.isLoading=!1},t._onFocus=function(){this.isFocussed=!0},t._onBlur=function(){this.isFocussed=!1},e}();function le(e,t){for(var i=0;i0?this.element.scrollTop+o-s:e.offsetTop;requestAnimationFrame((function(){i._animateScroll(a,t)}))}},t._scrollDown=function(e,t,i){var n=(i-e)/t,s=n>1?n:1;this.element.scrollTop=e+s},t._scrollUp=function(e,t,i){var n=(e-i)/t,s=n>1?n:1;this.element.scrollTop=e-s},t._animateScroll=function(e,t){var i=this,n=this.element.scrollTop,s=!1;t>0?(this._scrollDown(n,4,e),ne&&(s=!0)),s&&requestAnimationFrame((function(){i._animateScroll(e,t)}))},e}();function de(e,t){for(var i=0;i0?\"treeitem\":\"option\"),Object.assign(g.dataset,{choice:\"\",id:l,value:h,selectText:i}),m?(g.classList.add(a),g.dataset.choiceDisabled=\"\",g.setAttribute(\"aria-disabled\",\"true\")):(g.classList.add(r),g.dataset.choiceSelectable=\"\"),g},input:function(e,t){var i=e.input,n=e.inputCloned,s=Object.assign(document.createElement(\"input\"),{type:\"text\",className:i+\" \"+n,autocomplete:\"off\",autocapitalize:\"off\",spellcheck:!1});return s.setAttribute(\"role\",\"textbox\"),s.setAttribute(\"aria-autocomplete\",\"list\"),s.setAttribute(\"aria-label\",t),s},dropdown:function(e){var t=e.list,i=e.listDropdown,n=document.createElement(\"div\");return n.classList.add(t,i),n.setAttribute(\"aria-expanded\",\"false\"),n},notice:function(e,t,i){var n=e.item,s=e.itemChoice,r=e.noResults,o=e.noChoices;void 0===i&&(i=\"\");var a=[n,s];return\"no-choices\"===i?a.push(o):\"no-results\"===i&&a.push(r),Object.assign(document.createElement(\"div\"),{innerHTML:t,className:a.join(\" \")})},option:function(e){var t=e.label,i=e.value,n=e.customProperties,s=e.active,r=e.disabled,o=new Option(t,i,!1,s);return n&&(o.dataset.customProperties=n),o.disabled=r,o}},be=function(e){return void 0===e&&(e=!0),{type:q,active:e}},ye=function(e,t){return{type:$,id:e,highlighted:t}},Ee=function(e){var t=e.value,i=e.id,n=e.active,s=e.disabled;return{type:z,value:t,id:i,active:n,disabled:s}},Ie=function(e){return{type:\"SET_IS_LOADING\",isLoading:e}};function Se(e,t){for(var i=0;i=0?this._store.getGroupById(s):null;return this._store.dispatch(ye(i,!0)),t&&this.passedElement.triggerEvent(H,{id:i,value:o,label:c,groupValue:l&&l.value?l.value:null}),this},r.unhighlightItem=function(e){if(!e)return this;var t=e.id,i=e.groupId,n=void 0===i?-1:i,s=e.value,r=void 0===s?\"\":s,o=e.label,a=void 0===o?\"\":o,c=n>=0?this._store.getGroupById(n):null;return this._store.dispatch(ye(t,!1)),this.passedElement.triggerEvent(H,{id:t,value:r,label:a,groupValue:c&&c.value?c.value:null}),this},r.highlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.highlightItem(t)})),this},r.unhighlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.unhighlightItem(t)})),this},r.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.value===e})).forEach((function(e){return t._removeItem(e)})),this},r.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.id!==e})).forEach((function(e){return t._removeItem(e)})),this},r.removeHighlightedItems=function(e){var t=this;return void 0===e&&(e=!1),this._store.highlightedActiveItems.forEach((function(i){t._removeItem(i),e&&t._triggerChange(i.value)})),this},r.showDropdown=function(e){var t=this;return this.dropdown.isActive||requestAnimationFrame((function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(D,{})})),this},r.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame((function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(M,{})})),this):this},r.getValue=function(e){void 0===e&&(e=!1);var t=this._store.activeItems.reduce((function(t,i){var n=e?i.value:i;return t.push(n),t}),[]);return this._isSelectOneElement?t[0]:t},r.setValue=function(e){var t=this;return this.initialised?(e.forEach((function(e){return t._setChoiceOrItem(e)})),this):this},r.setChoiceByValue=function(e){var t=this;return!this.initialised||this._isTextElement||(Array.isArray(e)?e:[e]).forEach((function(e){return t._findAndSelectChoiceByValue(e)})),this},r.setChoices=function(e,t,i,n){var s=this;if(void 0===e&&(e=[]),void 0===t&&(t=\"value\"),void 0===i&&(i=\"label\"),void 0===n&&(n=!1),!this.initialised)throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");if(!this._isSelectElement)throw new TypeError(\"setChoices can't be used with INPUT based Choices\");if(\"string\"!=typeof t||!t)throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");if(n&&this.clearChoices(),\"function\"==typeof e){var r=e(this);if(\"function\"==typeof Promise&&r instanceof Promise)return new Promise((function(e){return requestAnimationFrame(e)})).then((function(){return s._handleLoadingState(!0)})).then((function(){return r})).then((function(e){return s.setChoices(e,t,i,n)})).catch((function(e){s.config.silent||console.error(e)})).then((function(){return s._handleLoadingState(!1)})).then((function(){return s}));if(!Array.isArray(r))throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \"+typeof r);return this.setChoices(r,t,i,!1)}if(!Array.isArray(e))throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach((function(e){e.choices?s._addGroup({id:parseInt(e.id,10)||null,group:e,valueKey:t,labelKey:i}):s._addChoice({value:e[t],label:e[i],isSelected:e.selected,isDisabled:e.disabled,customProperties:e.customProperties,placeholder:e.placeholder})})),this._stopLoading(),this},r.clearChoices=function(){return this._store.dispatch({type:U}),this},r.clearStore=function(){return this._store.dispatch({type:\"CLEAR_ALL\"}),this},r.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(be(!0))),this},r._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,i=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),i&&this._renderItems(),this._prevState=this._currentState)}},r._renderChoices=function(){var e=this,t=this._store,i=t.activeGroups,n=t.activeChoices,s=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame((function(){return e.choiceList.scrollToTop()})),i.length>=1&&!this._isSearching){var r=n.filter((function(e){return!0===e.placeholder&&-1===e.groupId}));r.length>=1&&(s=this._createChoicesFragment(r,s)),s=this._createGroupsFragment(i,n,s)}else n.length>=1&&(s=this._createChoicesFragment(n,s));if(s.childNodes&&s.childNodes.length>0){var o=this._store.activeItems,a=this._canAddItem(o,this.input.value);a.response?(this.choiceList.append(s),this._highlightChoice()):this.choiceList.append(this._getTemplate(\"notice\",a.notice))}else{var c,l;this._isSearching?(l=\"function\"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,c=this._getTemplate(\"notice\",l,\"no-results\")):(l=\"function\"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,c=this._getTemplate(\"notice\",l,\"no-choices\")),this.choiceList.append(c)}},r._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},r._createGroupsFragment=function(e,t,i){var n=this;return void 0===i&&(i=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sorter),e.forEach((function(e){var s=function(e){return t.filter((function(t){return n._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&(\"always\"===n.config.renderSelectedChoices||!t.selected)}))}(e);if(s.length>=1){var r=n._getTemplate(\"choiceGroup\",e);i.appendChild(r),n._createChoicesFragment(s,i,!0)}})),i},r._createChoicesFragment=function(e,t,i){var n=this;void 0===t&&(t=document.createDocumentFragment()),void 0===i&&(i=!1);var s=this.config,r=s.renderSelectedChoices,o=s.searchResultLimit,a=s.renderChoiceLimit,c=this._isSearching?w:this.config.sorter,l=function(e){if(\"auto\"!==r||n._isSelectOneElement||!e.selected){var i=n._getTemplate(\"choice\",e,n.config.itemSelectText);t.appendChild(i)}},h=e;\"auto\"!==r||this._isSelectOneElement||(h=e.filter((function(e){return!e.selected})));var u=h.reduce((function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e}),{placeholderChoices:[],normalChoices:[]}),d=u.placeholderChoices,p=u.normalChoices;(this.config.shouldSort||this._isSearching)&&p.sort(c);var m=h.length,f=this._isSelectOneElement?[].concat(d,p):p;this._isSearching?m=o:a&&a>0&&!i&&(m=a);for(var v=0;v=n){var o=s?this._searchChoices(e):0;this.passedElement.triggerEvent(j,{value:e,resultCount:o})}else r&&(this._isSearching=!1,this._store.dispatch(be(!0)))}},r._canAddItem=function(e,t){var i=!0,n=\"function\"==typeof this.config.addItemText?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var s=function(e,t,i){return void 0===i&&(i=\"value\"),e.some((function(e){return\"string\"==typeof t?e[i]===t.trim():e[i]===t}))}(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(i=!1,n=\"function\"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&s&&i&&(i=!1,n=\"function\"==typeof this.config.uniqueItemText?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&i&&\"function\"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(i=!1,n=\"function\"==typeof this.config.customAddItemText?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:i,notice:n}},r._searchChoices=function(e){var t=\"string\"==typeof e?e.trim():e,i=\"string\"==typeof this._currentValue?this._currentValue.trim():this._currentValue;if(t.length<1&&t===i+\" \")return 0;var n=this._store.searchableChoices,r=t,o=[].concat(this.config.searchFields),a=Object.assign(this.config.fuseOptions,{keys:o}),c=new s.a(n,a).search(r);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(e){return{type:G,results:e}}(c)),c.length},r._addEventListeners=function(){var e=document.documentElement;e.addEventListener(\"touchend\",this._onTouchEnd,!0),this.containerOuter.element.addEventListener(\"keydown\",this._onKeyDown,!0),this.containerOuter.element.addEventListener(\"mousedown\",this._onMouseDown,!0),e.addEventListener(\"click\",this._onClick,{passive:!0}),e.addEventListener(\"touchmove\",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener(\"mouseover\",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener(\"focus\",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener(\"blur\",this._onBlur,{passive:!0})),this.input.element.addEventListener(\"keyup\",this._onKeyUp,{passive:!0}),this.input.element.addEventListener(\"focus\",this._onFocus,{passive:!0}),this.input.element.addEventListener(\"blur\",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener(\"reset\",this._onFormReset,{passive:!0}),this.input.addEventListeners()},r._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener(\"touchend\",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener(\"keydown\",this._onKeyDown,!0),this.containerOuter.element.removeEventListener(\"mousedown\",this._onMouseDown,!0),e.removeEventListener(\"click\",this._onClick),e.removeEventListener(\"touchmove\",this._onTouchMove),this.dropdown.element.removeEventListener(\"mouseover\",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener(\"focus\",this._onFocus),this.containerOuter.element.removeEventListener(\"blur\",this._onBlur)),this.input.element.removeEventListener(\"keyup\",this._onKeyUp),this.input.element.removeEventListener(\"focus\",this._onFocus),this.input.element.removeEventListener(\"blur\",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener(\"reset\",this._onFormReset),this.input.removeEventListeners()},r._onKeyDown=function(e){var t,i=e.target,n=e.keyCode,s=e.ctrlKey,r=e.metaKey,o=this._store.activeItems,a=this.input.isFocussed,c=this.dropdown.isActive,l=this.itemList.hasChildren(),h=String.fromCharCode(n),u=J,d=Y,p=Z,m=Q,f=ee,v=te,g=ie,_=ne,b=se,y=s||r;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(h)&&this.showDropdown();var E=((t={})[m]=this._onAKey,t[p]=this._onEnterKey,t[f]=this._onEscapeKey,t[v]=this._onDirectionKey,t[_]=this._onDirectionKey,t[g]=this._onDirectionKey,t[b]=this._onDirectionKey,t[d]=this._onDeleteKey,t[u]=this._onDeleteKey,t);E[n]&&E[n]({event:e,target:i,keyCode:n,metaKey:r,activeItems:o,hasFocusedInput:a,hasActiveDropdown:c,hasItems:l,hasCtrlDownKeyPressed:y})},r._onKeyUp=function(e){var t=e.target,i=e.keyCode,n=this.input.value,s=this._store.activeItems,r=this._canAddItem(s,n),o=J,a=Y;if(this._isTextElement)if(r.notice&&n){var c=this._getTemplate(\"notice\",r.notice);this.dropdown.element.innerHTML=c.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var l=(i===o||i===a)&&!t.value,h=!this._isTextElement&&this._isSearching,u=this._canSearch&&r.response;l&&h?(this._isSearching=!1,this._store.dispatch(be(!0))):u&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},r._onAKey=function(e){var t=e.hasItems;e.hasCtrlDownKeyPressed&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},r._onEnterKey=function(e){var t=e.event,i=e.target,n=e.activeItems,s=e.hasActiveDropdown,r=Z,o=i.hasAttribute(\"data-button\");if(this._isTextElement&&i.value){var a=this.input.value;this._canAddItem(n,a).response&&(this.hideDropdown(!0),this._addItem({value:a}),this._triggerChange(a),this.clearInput())}if(o&&(this._handleButtonAction(n,i),t.preventDefault()),s){var c=this.dropdown.getChild(\".\"+this.config.classNames.highlightedState);c&&(n[0]&&(n[0].keyCode=r),this._handleChoiceAction(n,c)),t.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),t.preventDefault())},r._onEscapeKey=function(e){e.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},r._onDirectionKey=function(e){var t,i,n,s=e.event,r=e.hasActiveDropdown,o=e.keyCode,a=e.metaKey,c=ie,l=ne,h=se;if(r||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var u,d=o===c||o===h?1:-1,p=\"[data-choice-selectable]\";if(a||o===h||o===l)u=d>0?this.dropdown.element.querySelector(\"[data-choice-selectable]:last-of-type\"):this.dropdown.element.querySelector(p);else{var m=this.dropdown.element.querySelector(\".\"+this.config.classNames.highlightedState);u=m?function(e,t,i){if(void 0===i&&(i=1),e instanceof Element&&\"string\"==typeof t){for(var n=(i>0?\"next\":\"previous\")+\"ElementSibling\",s=e[n];s;){if(s.matches(t))return s;s=s[n]}return s}}(m,p,d):this.dropdown.element.querySelector(p)}u&&(t=u,i=this.choiceList.element,void 0===(n=d)&&(n=1),t&&(n>0?i.scrollTop+i.offsetHeight>=t.offsetTop+t.offsetHeight:t.offsetTop>=i.scrollTop)||this.choiceList.scrollToChildElement(u,d),this._highlightChoice(u)),s.preventDefault()}},r._onDeleteKey=function(e){var t=e.event,i=e.target,n=e.hasFocusedInput,s=e.activeItems;!n||i.value||this._isSelectOneElement||(this._handleBackspace(s),t.preventDefault())},r._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},r._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},r._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(we&&this.choiceList.element.contains(t)){var i=this.choiceList.element.firstElementChild,n=\"ltr\"===this._direction?e.offsetX>=i.offsetWidth:e.offsetX0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},r._onFocus=function(e){var t,i=this,n=e.target;this.containerOuter.element.contains(n)&&((t={}).text=function(){n===i.input.element&&i.containerOuter.addFocusState()},t[\"select-one\"]=function(){i.containerOuter.addFocusState(),n===i.input.element&&i.showDropdown(!0)},t[\"select-multiple\"]=function(){n===i.input.element&&(i.showDropdown(!0),i.containerOuter.addFocusState())},t)[this.passedElement.element.type]()},r._onBlur=function(e){var t=this,i=e.target;if(this.containerOuter.element.contains(i)&&!this._isScrollingOnIe){var n,s=this._store.activeItems.some((function(e){return e.highlighted}));((n={}).text=function(){i===t.input.element&&(t.containerOuter.removeFocusState(),s&&t.unhighlightAll(),t.hideDropdown(!0))},n[\"select-one\"]=function(){t.containerOuter.removeFocusState(),(i===t.input.element||i===t.containerOuter.element&&!t._canSearch)&&t.hideDropdown(!0)},n[\"select-multiple\"]=function(){i===t.input.element&&(t.containerOuter.removeFocusState(),t.hideDropdown(!0),s&&t.unhighlightAll())},n)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},r._onFormReset=function(){this._store.dispatch({type:\"RESET_TO\",state:this._initialState})},r._highlightChoice=function(e){var t=this;void 0===e&&(e=null);var i=Array.from(this.dropdown.element.querySelectorAll(\"[data-choice-selectable]\"));if(i.length){var n=e;Array.from(this.dropdown.element.querySelectorAll(\".\"+this.config.classNames.highlightedState)).forEach((function(e){e.classList.remove(t.config.classNames.highlightedState),e.setAttribute(\"aria-selected\",\"false\")})),n?this._highlightPosition=i.indexOf(n):(n=i.length>this._highlightPosition?i[this._highlightPosition]:i[i.length-1])||(n=i[0]),n.classList.add(this.config.classNames.highlightedState),n.setAttribute(\"aria-selected\",\"true\"),this.passedElement.triggerEvent(B,{el:n}),this.dropdown.isActive&&(this.input.setActiveDescendant(n.id),this.containerOuter.setActiveDescendant(n.id))}},r._addItem=function(e){var t=e.value,i=e.label,n=void 0===i?null:i,s=e.choiceId,r=void 0===s?-1:s,o=e.groupId,a=void 0===o?-1:o,c=e.customProperties,l=void 0===c?null:c,h=e.placeholder,u=void 0!==h&&h,d=e.keyCode,p=void 0===d?null:d,m=\"string\"==typeof t?t.trim():t,f=p,v=l,g=this._store.items,_=n||m,b=r||-1,y=a>=0?this._store.getGroupById(a):null,E=g?g.length+1:1;return this.config.prependValue&&(m=this.config.prependValue+m.toString()),this.config.appendValue&&(m+=this.config.appendValue.toString()),this._store.dispatch(function(e){var t=e.value,i=e.label,n=e.id,s=e.choiceId,r=e.groupId,o=e.customProperties,a=e.placeholder,c=e.keyCode;return{type:W,value:t,label:i,id:n,choiceId:s,groupId:r,customProperties:o,placeholder:a,keyCode:c}}({value:m,label:_,id:E,choiceId:b,groupId:a,customProperties:l,placeholder:u,keyCode:f})),this._isSelectOneElement&&this.removeActiveItems(E),this.passedElement.triggerEvent(K,{id:E,value:m,label:_,customProperties:v,groupValue:y&&y.value?y.value:void 0,keyCode:f}),this},r._removeItem=function(e){if(!e||!E(\"Object\",e))return this;var t=e.id,i=e.value,n=e.label,s=e.choiceId,r=e.groupId,o=r>=0?this._store.getGroupById(r):null;return this._store.dispatch(function(e,t){return{type:X,id:e,choiceId:t}}(t,s)),o&&o.value?this.passedElement.triggerEvent(R,{id:t,value:i,label:n,groupValue:o.value}):this.passedElement.triggerEvent(R,{id:t,value:i,label:n}),this},r._addChoice=function(e){var t=e.value,i=e.label,n=void 0===i?null:i,s=e.isSelected,r=void 0!==s&&s,o=e.isDisabled,a=void 0!==o&&o,c=e.groupId,l=void 0===c?-1:c,h=e.customProperties,u=void 0===h?null:h,d=e.placeholder,p=void 0!==d&&d,m=e.keyCode,f=void 0===m?null:m;if(null!=t){var v=this._store.choices,g=n||t,_=v?v.length+1:1,b=this._baseId+\"-\"+this._idNames.itemChoice+\"-\"+_;this._store.dispatch(function(e){var t=e.value,i=e.label,n=e.id,s=e.groupId,r=e.disabled,o=e.elementId,a=e.customProperties,c=e.placeholder,l=e.keyCode;return{type:V,value:t,label:i,id:n,groupId:s,disabled:r,elementId:o,customProperties:a,placeholder:c,keyCode:l}}({id:_,groupId:l,elementId:b,value:t,label:g,disabled:a,customProperties:u,placeholder:p,keyCode:f})),r&&this._addItem({value:t,label:g,choiceId:_,customProperties:u,placeholder:p,keyCode:f})}},r._addGroup=function(e){var t=this,i=e.group,n=e.id,s=e.valueKey,r=void 0===s?\"value\":s,o=e.labelKey,a=void 0===o?\"label\":o,c=E(\"Object\",i)?i.choices:Array.from(i.getElementsByTagName(\"OPTION\")),l=n||Math.floor((new Date).valueOf()*Math.random()),h=!!i.disabled&&i.disabled;c?(this._store.dispatch(Ee({value:i.label,id:l,active:!0,disabled:h})),c.forEach((function(e){var i=e.disabled||e.parentNode&&e.parentNode.disabled;t._addChoice({value:e[r],label:E(\"Object\",e)?e[a]:e.innerHTML,isSelected:e.selected,isDisabled:i,groupId:l,customProperties:e.customProperties,placeholder:e.placeholder})}))):this._store.dispatch(Ee({value:i.label,id:i.id,active:!1,disabled:i.disabled}))},r._getTemplate=function(e){var t;if(!e)return null;for(var i=this.config.classNames,n=arguments.length,s=new Array(n>1?n-1:0),r=1;r{var e;return this.input_el.name=null!==(e=this.model.name)&&void 0!==e?e:\"\"})),this.connect(this.model.properties.value.change,(()=>{this.input_el.value=this.format_value,this.old_value=this.input_el.value})),this.connect(this.model.properties.low.change,(()=>{const{value:e,low:t,high:l}=this.model;null!=t&&null!=l&&d.assert(t<=l,\"Invalid bounds, low must be inferior to high\"),null!=e&&null!=t&&(this.model.value=Math.max(e,t))})),this.connect(this.model.properties.high.change,(()=>{const{value:e,low:t,high:l}=this.model;null!=t&&null!=l&&d.assert(l>=t,\"Invalid bounds, high must be superior to low\"),null!=e&&null!=l&&(this.model.value=Math.min(e,l))})),this.connect(this.model.properties.high.change,(()=>this.input_el.placeholder=this.model.placeholder)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled)),this.connect(this.model.properties.placeholder.change,(()=>this.input_el.placeholder=this.model.placeholder))}get format_value(){return null!=this.model.value?this.model.pretty(this.model.value):\"\"}_set_input_filter(e){this.input_el.addEventListener(\"input\",(()=>{const{selectionStart:t,selectionEnd:l}=this.input_el;if(e(this.input_el.value))this.old_value=this.input_el.value;else{const e=this.old_value.length-this.input_el.value.length;this.input_el.value=this.old_value,t&&l&&this.input_el.setSelectionRange(t-1,l+e)}}))}render(){super.render(),this.input_el=a.input({type:\"text\",class:p.input,name:this.model.name,value:this.format_value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.old_value=this.format_value,this.set_input_filter(),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.input_el.addEventListener(\"focusout\",(()=>this.input_el.value=this.format_value)),this.group_el.appendChild(this.input_el)}set_input_filter(){\"int\"==this.model.mode?this._set_input_filter((e=>_.test(e))):\"float\"==this.model.mode&&this._set_input_filter((e=>m.test(e)))}bound_value(e){let t=e;const{low:l,high:i}=this.model;return t=null!=l?Math.max(l,t):t,t=null!=i?Math.min(i,t):t,t}get value(){let e=\"\"!=this.input_el.value?Number(this.input_el.value):null;return null!=e&&(e=this.bound_value(e)),e}change_input(){null==this.value?this.model.value=null:Number.isNaN(this.value)||(this.model.value=this.value)}}l.NumericInputView=c,c.__name__=\"NumericInputView\";class v extends h.InputWidget{constructor(e){super(e)}static init_NumericInput(){this.prototype.default_view=c,this.define((({Number:e,String:t,Enum:l,Ref:i,Or:n,Nullable:s})=>({value:[s(e),null],placeholder:[t,\"\"],mode:[l(\"int\",\"float\"),\"int\"],format:[s(n(t,i(o.TickFormatter))),null],low:[s(e),null],high:[s(e),null]})))}_formatter(e,t){return r.isString(t)?u.format(e,t):t.doFormat([e],{loc:0})[0]}pretty(e){return null!=this.format?this._formatter(e,this.format):`${e}`}}l.NumericInput=v,v.__name__=\"NumericInput\",v.init_NumericInput()},\n 455: function _(e,t,r,s,i){s();const n=e(444),_=e(43);class a extends n.MarkupView{render(){super.render();const e=_.pre({style:{overflow:\"auto\"}},this.model.text);this.markup_el.appendChild(e)}}r.PreTextView=a,a.__name__=\"PreTextView\";class o extends n.Markup{constructor(e){super(e)}static init_PreText(){this.prototype.default_view=a}}r.PreText=o,o.__name__=\"PreText\",o.init_PreText()},\n 456: function _(t,o,i,e,a){e();const n=t(1),u=t(430),s=t(43),c=n.__importStar(t(328));class _ extends u.ButtonGroupView{change_active(t){this.model.active!==t&&(this.model.active=t)}_update_active(){const{active:t}=this.model;this._buttons.forEach(((o,i)=>{s.classes(o).toggle(c.active,t===i)}))}}i.RadioButtonGroupView=_,_.__name__=\"RadioButtonGroupView\";class r extends u.ButtonGroup{constructor(t){super(t)}static init_RadioButtonGroup(){this.prototype.default_view=_,this.define((({Int:t,Nullable:o})=>({active:[o(t),null]})))}}i.RadioButtonGroup=r,r.__name__=\"RadioButtonGroup\",r.init_RadioButtonGroup()},\n 457: function _(e,i,t,n,a){n();const s=e(1),o=e(43),d=e(34),l=e(432),p=s.__importStar(e(427));class r extends l.InputGroupView{render(){super.render();const e=o.div({class:[p.input_group,this.model.inline?p.inline:null]});this.el.appendChild(e);const i=d.uniqueId(),{active:t,labels:n}=this.model;this._inputs=[];for(let a=0;athis.change_active(a))),this._inputs.push(s),this.model.disabled&&(s.disabled=!0),a==t&&(s.checked=!0);const d=o.label({},s,o.span({},n[a]));e.appendChild(d)}}change_active(e){this.model.active=e}}t.RadioGroupView=r,r.__name__=\"RadioGroupView\";class u extends l.InputGroup{constructor(e){super(e)}static init_RadioGroup(){this.prototype.default_view=r,this.define((({Boolean:e,Int:i,String:t,Array:n})=>({active:[i],labels:[n(t),[]],inline:[e,!1]})))}}t.RadioGroup=u,u.__name__=\"RadioGroup\",u.init_RadioGroup()},\n 458: function _(e,t,i,r,a){r();const n=e(1).__importStar(e(183)),s=e(438),_=e(8);class d extends s.AbstractRangeSliderView{}i.RangeSliderView=d,d.__name__=\"RangeSliderView\";class o extends s.AbstractSlider{constructor(e){super(e),this.behaviour=\"drag\",this.connected=[!1,!0,!1]}static init_RangeSlider(){this.prototype.default_view=d,this.override({format:\"0[.]00\"})}_formatter(e,t){return _.isString(t)?n.format(e,t):t.compute(e)}}i.RangeSlider=o,o.__name__=\"RangeSlider\",o.init_RangeSlider()},\n 459: function _(e,t,n,i,s){i();const l=e(1),u=e(43),a=e(8),o=e(13),_=e(426),p=l.__importStar(e(427));class r extends _.InputWidgetView{constructor(){super(...arguments),this._known_values=new Set}connect_signals(){super.connect_signals();const{value:e,options:t}=this.model.properties;this.on_change(e,(()=>{this._update_value()})),this.on_change(t,(()=>{u.empty(this.input_el),u.append(this.input_el,...this.options_el()),this._update_value()}))}options_el(){const{_known_values:e}=this;function t(t){return t.map((t=>{let n,i;return a.isString(t)?n=i=t:[n,i]=t,e.add(n),u.option({value:n},i)}))}e.clear();const{options:n}=this.model;return a.isArray(n)?t(n):o.entries(n).map((([e,n])=>u.optgroup({label:e},t(n))))}render(){super.render(),this.input_el=u.select({class:p.input,name:this.model.name,disabled:this.model.disabled},this.options_el()),this._update_value(),this.input_el.addEventListener(\"change\",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){const e=this.input_el.value;this.model.value=e,super.change_input()}_update_value(){const{value:e}=this.model;this._known_values.has(e)?this.input_el.value=e:this.input_el.removeAttribute(\"value\")}}n.SelectView=r,r.__name__=\"SelectView\";class c extends _.InputWidget{constructor(e){super(e)}static init_Select(){this.prototype.default_view=r,this.define((({String:e,Array:t,Tuple:n,Dict:i,Or:s})=>{const l=t(s(e,n(e,e)));return{value:[e,\"\"],options:[s(l,i(l)),[]]}}))}}n.Select=c,c.__name__=\"Select\",c.init_Select()},\n 460: function _(t,e,i,r,s){r();const _=t(1).__importStar(t(183)),a=t(438),n=t(8);class o extends a.AbstractSliderView{}i.SliderView=o,o.__name__=\"SliderView\";class d extends a.AbstractSlider{constructor(t){super(t),this.behaviour=\"tap\",this.connected=[!0,!1]}static init_Slider(){this.prototype.default_view=o,this.override({format:\"0[.]00\"})}_formatter(t,e){return n.isString(e)?_.format(t,e):e.compute(t)}}i.Slider=d,d.__name__=\"Slider\",d.init_Slider()},\n 461: function _(e,t,i,n,s){n();const l=e(454),o=e(43),{min:r,max:a,floor:h,abs:_}=Math;function u(e){return h(e)!==e?e.toFixed(16).replace(/0+$/,\"\").split(\".\")[1].length:0}class d extends l.NumericInputView{*buttons(){yield this.btn_up_el,yield this.btn_down_el}initialize(){super.initialize(),this._handles={interval:void 0,timeout:void 0},this._interval=200}connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.disabled,(()=>{for(const e of this.buttons())o.toggle_attribute(e,\"disabled\",this.model.disabled)}))}render(){super.render(),this.wrapper_el=o.div({class:\"bk-spin-wrapper\"}),this.group_el.replaceChild(this.wrapper_el,this.input_el),this.btn_up_el=o.button({class:\"bk-spin-btn bk-spin-btn-up\"}),this.btn_down_el=o.button({class:\"bk-spin-btn bk-spin-btn-down\"}),this.wrapper_el.appendChild(this.input_el),this.wrapper_el.appendChild(this.btn_up_el),this.wrapper_el.appendChild(this.btn_down_el);for(const e of this.buttons())o.toggle_attribute(e,\"disabled\",this.model.disabled),e.addEventListener(\"mousedown\",(e=>this._btn_mouse_down(e))),e.addEventListener(\"mouseup\",(()=>this._btn_mouse_up())),e.addEventListener(\"mouseleave\",(()=>this._btn_mouse_leave()));this.input_el.addEventListener(\"keydown\",(e=>this._input_key_down(e))),this.input_el.addEventListener(\"keyup\",(()=>this.model.value_throttled=this.model.value)),this.input_el.addEventListener(\"wheel\",(e=>this._input_mouse_wheel(e))),this.input_el.addEventListener(\"wheel\",function(e,t,i=!1){let n;return function(...s){const l=this,o=i&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((function(){n=void 0,i||e.apply(l,s)}),t),o&&e.apply(l,s)}}((()=>{this.model.value_throttled=this.model.value}),this.model.wheel_wait,!1))}get precision(){const{low:e,high:t,step:i}=this.model,n=u;return a(n(_(null!=e?e:0)),n(_(null!=t?t:0)),n(_(i)))}remove(){this._stop_incrementation(),super.remove()}_start_incrementation(e){clearInterval(this._handles.interval),this._counter=0;const{step:t}=this.model,i=e=>{if(this._counter+=1,this._counter%5==0){const t=Math.floor(this._counter/5);t<10?(clearInterval(this._handles.interval),this._handles.interval=setInterval((()=>i(e)),this._interval/(t+1))):t>=10&&t<=13&&(clearInterval(this._handles.interval),this._handles.interval=setInterval((()=>i(2*e)),this._interval/10))}this.increment(e)};this._handles.interval=setInterval((()=>i(e*t)),this._interval)}_stop_incrementation(){clearTimeout(this._handles.timeout),this._handles.timeout=void 0,clearInterval(this._handles.interval),this._handles.interval=void 0,this.model.value_throttled=this.model.value}_btn_mouse_down(e){e.preventDefault();const t=e.currentTarget===this.btn_up_el?1:-1;this.increment(t*this.model.step),this.input_el.focus(),this._handles.timeout=setTimeout((()=>this._start_incrementation(t)),this._interval)}_btn_mouse_up(){this._stop_incrementation()}_btn_mouse_leave(){this._stop_incrementation()}_input_mouse_wheel(e){if(document.activeElement===this.input_el){e.preventDefault();const t=e.deltaY>0?-1:1;this.increment(t*this.model.step)}}_input_key_down(e){switch(e.keyCode){case o.Keys.Up:return e.preventDefault(),this.increment(this.model.step);case o.Keys.Down:return e.preventDefault(),this.increment(-this.model.step);case o.Keys.PageUp:return e.preventDefault(),this.increment(this.model.page_step_multiplier*this.model.step);case o.Keys.PageDown:return e.preventDefault(),this.increment(-this.model.page_step_multiplier*this.model.step)}}adjust_to_precision(e){return this.bound_value(Number(e.toFixed(this.precision)))}increment(e){const{low:t,high:i}=this.model;null==this.model.value?e>0?this.model.value=null!=t?t:null!=i?r(0,i):0:e<0&&(this.model.value=null!=i?i:null!=t?a(t,0):0):this.model.value=this.adjust_to_precision(this.model.value+e)}change_input(){super.change_input(),this.model.value_throttled=this.model.value}}i.SpinnerView=d,d.__name__=\"SpinnerView\";class p extends l.NumericInput{constructor(e){super(e)}static init_Spinner(){this.prototype.default_view=d,this.define((({Number:e,Nullable:t})=>({value_throttled:[t(e),null],step:[e,1],page_step_multiplier:[e,10],wheel_wait:[e,100]}))),this.override({mode:\"float\"})}}i.Spinner=p,p.__name__=\"Spinner\",p.init_Spinner()},\n 462: function _(e,t,s,n,i){n();const r=e(1),o=e(425),p=e(43),c=r.__importStar(e(427));class l extends o.TextLikeInputView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.rows.change,(()=>this.input_el.rows=this.model.rows)),this.connect(this.model.properties.cols.change,(()=>this.input_el.cols=this.model.cols))}_render_input(){this.input_el=p.textarea({class:c.input})}render(){super.render(),this.input_el.cols=this.model.cols,this.input_el.rows=this.model.rows}}s.TextAreaInputView=l,l.__name__=\"TextAreaInputView\";class _ extends o.TextLikeInput{constructor(e){super(e)}static init_TextAreaInput(){this.prototype.default_view=l,this.define((({Int:e})=>({cols:[e,20],rows:[e,2]}))),this.override({max_length:500})}}s.TextAreaInput=_,_.__name__=\"TextAreaInput\",_.init_TextAreaInput()},\n 463: function _(e,t,i,s,c){s();const o=e(1),a=e(419),n=e(43),l=o.__importStar(e(328));class _ extends a.AbstractButtonView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._update_active()))}render(){super.render(),this._update_active()}click(){this.model.active=!this.model.active,super.click()}_update_active(){n.classes(this.button_el).toggle(l.active,this.model.active)}}i.ToggleView=_,_.__name__=\"ToggleView\";class g extends a.AbstractButton{constructor(e){super(e)}static init_Toggle(){this.prototype.default_view=_,this.define((({Boolean:e})=>({active:[e,!1]}))),this.override({label:\"Toggle\"})}}i.Toggle=g,g.__name__=\"Toggle\",g.init_Toggle()},\n }, 417, {\"models/widgets/main\":417,\"models/widgets/index\":418,\"models/widgets/abstract_button\":419,\"models/widgets/control\":420,\"models/widgets/widget\":488,\"models/widgets/abstract_icon\":422,\"models/widgets/autocomplete_input\":423,\"models/widgets/text_input\":424,\"models/widgets/text_like_input\":425,\"models/widgets/input_widget\":426,\"styles/widgets/inputs.css\":427,\"models/widgets/button\":428,\"models/widgets/checkbox_button_group\":429,\"models/widgets/button_group\":430,\"models/widgets/checkbox_group\":431,\"models/widgets/input_group\":432,\"models/widgets/color_picker\":433,\"models/widgets/date_picker\":434,\"styles/widgets/flatpickr.css\":436,\"models/widgets/date_range_slider\":437,\"models/widgets/abstract_slider\":438,\"styles/widgets/sliders.css\":440,\"styles/widgets/nouislider.css\":441,\"models/widgets/date_slider\":442,\"models/widgets/div\":443,\"models/widgets/markup\":444,\"styles/clearfix.css\":445,\"models/widgets/dropdown\":446,\"models/widgets/file_input\":447,\"models/widgets/multiselect\":448,\"models/widgets/paragraph\":449,\"models/widgets/password_input\":450,\"models/widgets/multichoice\":451,\"styles/widgets/choices.css\":453,\"models/widgets/numeric_input\":454,\"models/widgets/pretext\":455,\"models/widgets/radio_button_group\":456,\"models/widgets/radio_group\":457,\"models/widgets/range_slider\":458,\"models/widgets/selectbox\":459,\"models/widgets/slider\":460,\"models/widgets/spinner\":461,\"models/widgets/textarea_input\":462,\"models/widgets/toggle\":463}, {});});\n\n /* END bokeh-widgets.min.js */\n },\n \n function(Bokeh) {\n /* BEGIN bokeh-tables.min.js */\n /*!\n * Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * \n * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * \n * Neither the name of Anaconda nor the names of any contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n (function(root, factory) {\n factory(root[\"Bokeh\"], \"2.3.0\");\n })(this, function(Bokeh, version) {\n var define;\n return (function(modules, entry, aliases, externals) {\n const bokeh = typeof Bokeh !== \"undefined\" && (version != null ? Bokeh[version] : Bokeh);\n if (bokeh != null) {\n return bokeh.register_plugin(modules, entry, aliases);\n } else {\n throw new Error(\"Cannot find Bokeh \" + version + \". You have to load it prior to loading plugins.\");\n }\n })\n ({\n 464: function _(t,e,o,r,s){r();const _=t(1).__importStar(t(465));o.Tables=_;t(7).register_models(_)},\n 465: function _(g,a,r,e,t){e();const o=g(1);o.__exportStar(g(466),r),o.__exportStar(g(469),r),t(\"DataTable\",g(472).DataTable),t(\"TableColumn\",g(490).TableColumn),t(\"TableWidget\",g(489).TableWidget);var n=g(492);t(\"AvgAggregator\",n.AvgAggregator),t(\"MinAggregator\",n.MinAggregator),t(\"MaxAggregator\",n.MaxAggregator),t(\"SumAggregator\",n.SumAggregator);var A=g(493);t(\"GroupingInfo\",A.GroupingInfo),t(\"DataCube\",A.DataCube)},\n 466: function _(e,t,i,s,r){s();const a=e(1),n=e(43),l=e(240),u=e(53),d=e(467),o=a.__importStar(e(468));class _ extends l.DOMView{constructor(e){const{model:t,parent:i}=e.column;super(Object.assign({model:t,parent:i},e)),this.args=e,this.initialize(),this.render()}get emptyValue(){return null}initialize(){super.initialize(),this.inputEl=this._createInput(),this.defaultValue=null}async lazy_initialize(){throw new Error(\"unsupported\")}css_classes(){return super.css_classes().concat(o.cell_editor)}render(){super.render(),this.args.container.append(this.el),this.el.appendChild(this.inputEl),this.renderEditor(),this.disableNavigation()}renderEditor(){}disableNavigation(){this.inputEl.addEventListener(\"keydown\",(e=>{switch(e.keyCode){case n.Keys.Left:case n.Keys.Right:case n.Keys.Up:case n.Keys.Down:case n.Keys.PageUp:case n.Keys.PageDown:e.stopImmediatePropagation()}}))}destroy(){this.remove()}focus(){this.inputEl.focus()}show(){}hide(){}position(){}getValue(){return this.inputEl.value}setValue(e){this.inputEl.value=e}serializeValue(){return this.getValue()}isValueChanged(){return!(\"\"==this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue}applyValue(e,t){const i=this.args.grid.getData(),s=i.index.indexOf(e[d.DTINDEX_NAME]);i.setField(s,this.args.column.field,t)}loadValue(e){const t=e[this.args.column.field];this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)}validateValue(e){if(this.args.column.validator){const t=this.args.column.validator(e);if(!t.valid)return t}return{valid:!0,msg:null}}validate(){return this.validateValue(this.getValue())}}i.CellEditorView=_,_.__name__=\"CellEditorView\";class c extends u.Model{}i.CellEditor=c,c.__name__=\"CellEditor\";class p extends _{get emptyValue(){return\"\"}_createInput(){return n.input({type:\"text\"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}}i.StringEditorView=p,p.__name__=\"StringEditorView\";class h extends c{static init_StringEditor(){this.prototype.default_view=p,this.define((({String:e,Array:t})=>({completions:[t(e),[]]})))}}i.StringEditor=h,h.__name__=\"StringEditor\",h.init_StringEditor();class E extends _{_createInput(){return n.textarea()}renderEditor(){this.inputEl.focus(),this.inputEl.select()}}i.TextEditorView=E,E.__name__=\"TextEditorView\";class V extends c{static init_TextEditor(){this.prototype.default_view=E}}i.TextEditor=V,V.__name__=\"TextEditor\",V.init_TextEditor();class m extends _{_createInput(){return n.select()}renderEditor(){for(const e of this.model.options)this.inputEl.appendChild(n.option({value:e},e));this.focus()}}i.SelectEditorView=m,m.__name__=\"SelectEditorView\";class f extends c{static init_SelectEditor(){this.prototype.default_view=m,this.define((({String:e,Array:t})=>({options:[t(e),[]]})))}}i.SelectEditor=f,f.__name__=\"SelectEditor\",f.init_SelectEditor();class x extends _{_createInput(){return n.input({type:\"text\"})}}i.PercentEditorView=x,x.__name__=\"PercentEditorView\";class g extends c{static init_PercentEditor(){this.prototype.default_view=x}}i.PercentEditor=g,g.__name__=\"PercentEditor\",g.init_PercentEditor();class w extends _{_createInput(){return n.input({type:\"checkbox\"})}renderEditor(){this.focus()}loadValue(e){this.defaultValue=!!e[this.args.column.field],this.inputEl.checked=this.defaultValue}serializeValue(){return this.inputEl.checked}}i.CheckboxEditorView=w,w.__name__=\"CheckboxEditorView\";class v extends c{static init_CheckboxEditor(){this.prototype.default_view=w}}i.CheckboxEditor=v,v.__name__=\"CheckboxEditor\",v.init_CheckboxEditor();class y extends _{_createInput(){return n.input({type:\"text\"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}remove(){super.remove()}serializeValue(){var e;return null!==(e=parseInt(this.getValue(),10))&&void 0!==e?e:0}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}validateValue(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid integer\"}:super.validateValue(e)}}i.IntEditorView=y,y.__name__=\"IntEditorView\";class I extends c{static init_IntEditor(){this.prototype.default_view=y,this.define((({Int:e})=>({step:[e,1]})))}}i.IntEditor=I,I.__name__=\"IntEditor\",I.init_IntEditor();class b extends _{_createInput(){return n.input({type:\"text\"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}remove(){super.remove()}serializeValue(){var e;return null!==(e=parseFloat(this.getValue()))&&void 0!==e?e:0}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}validateValue(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid number\"}:super.validateValue(e)}}i.NumberEditorView=b,b.__name__=\"NumberEditorView\";class N extends c{static init_NumberEditor(){this.prototype.default_view=b,this.define((({Number:e})=>({step:[e,.01]})))}}i.NumberEditor=N,N.__name__=\"NumberEditor\",N.init_NumberEditor();class S extends _{_createInput(){return n.input({type:\"text\"})}}i.TimeEditorView=S,S.__name__=\"TimeEditorView\";class C extends c{static init_TimeEditor(){this.prototype.default_view=S}}i.TimeEditor=C,C.__name__=\"TimeEditor\",C.init_TimeEditor();class D extends _{_createInput(){return n.input({type:\"text\"})}get emptyValue(){return new Date}renderEditor(){this.inputEl.focus(),this.inputEl.select()}destroy(){super.destroy()}show(){super.show()}hide(){super.hide()}position(){return super.position()}getValue(){}setValue(e){}}i.DateEditorView=D,D.__name__=\"DateEditorView\";class T extends c{static init_DateEditor(){this.prototype.default_view=D}}i.DateEditor=T,T.__name__=\"DateEditor\",T.init_DateEditor()},\n 467: function _(_,n,i,t,d){t(),i.DTINDEX_NAME=\"__bkdt_internal_index__\"},\n 468: function _(e,l,o,t,r){t(),o.root=\"bk-root\",o.data_table=\"bk-data-table\",o.cell_special_defaults=\"bk-cell-special-defaults\",o.cell_select=\"bk-cell-select\",o.cell_index=\"bk-cell-index\",o.header_index=\"bk-header-index\",o.cell_editor=\"bk-cell-editor\",o.cell_editor_completion=\"bk-cell-editor-completion\",o.default='.bk-root .bk-data-table{box-sizing:content-box;font-size:11px;}.bk-root .bk-data-table input[type=\"checkbox\"]{margin-left:4px;margin-right:4px;}.bk-root .bk-cell-special-defaults{border-right-color:silver;border-right-style:solid;background:#f5f5f5;}.bk-root .bk-cell-select{border-right-color:silver;border-right-style:solid;background:#f5f5f5;}.bk-root .slick-cell.bk-cell-index{border-right-color:silver;border-right-style:solid;background:#f5f5f5;text-align:right;background:#f0f0f0;color:#909090;}.bk-root .bk-header-index .slick-column-name{float:right;}.bk-root .slick-row.selected .bk-cell-index{background-color:transparent;}.bk-root .slick-row.odd{background:#f0f0f0;}.bk-root .slick-cell{padding-left:4px;padding-right:4px;border-right-color:transparent;border:0.25px solid transparent;}.bk-root .slick-cell .bk{line-height:inherit;}.bk-root .slick-cell.active{border-style:dashed;}.bk-root .slick-cell.selected{background-color:#F0F8FF;}.bk-root .slick-cell.editable{padding-left:0;padding-right:0;}.bk-root .bk-cell-editor{display:contents;}.bk-root .bk-cell-editor input,.bk-root .bk-cell-editor select{width:100%;height:100%;border:0;margin:0;padding:0;outline:0;background:transparent;vertical-align:baseline;}.bk-root .bk-cell-editor input{padding-left:4px;padding-right:4px;}.bk-root .bk-cell-editor-completion{font-size:11px;}'},\n 469: function _(t,e,r,a,n){a();const i=t(1),o=i.__importDefault(t(181)),s=i.__importStar(t(183)),l=t(470),c=t(43),m=t(20),u=t(8),_=t(34),F=t(22),d=t(53);class f extends d.Model{constructor(t){super(t)}doFormat(t,e,r,a,n){return null==r?\"\":(r+\"\").replace(/&/g,\"&\").replace(//g,\">\")}}r.CellFormatter=f,f.__name__=\"CellFormatter\";class h extends f{constructor(t){super(t)}static init_StringFormatter(){this.define((({Color:t,Nullable:e})=>({font_style:[m.FontStyle,\"normal\"],text_align:[m.TextAlign,\"left\"],text_color:[e(t),null]})))}doFormat(t,e,r,a,n){const{font_style:i,text_align:o,text_color:s}=this,l=c.div({},null==r?\"\":`${r}`);switch(i){case\"bold\":l.style.fontWeight=\"bold\";break;case\"italic\":l.style.fontStyle=\"italic\"}return null!=o&&(l.style.textAlign=o),null!=s&&(l.style.color=F.color2css(s)),l.outerHTML}}r.StringFormatter=h,h.__name__=\"StringFormatter\",h.init_StringFormatter();class g extends h{constructor(t){super(t)}static init_ScientificFormatter(){this.define((({Number:t,String:e,Nullable:r})=>({nan_format:[r(e),null],precision:[t,10],power_limit_high:[t,5],power_limit_low:[t,-3]})))}get scientific_limit_low(){return 10**this.power_limit_low}get scientific_limit_high(){return 10**this.power_limit_high}doFormat(t,e,r,a,n){const i=Math.abs(r)<=this.scientific_limit_low||Math.abs(r)>=this.scientific_limit_high;let o=this.precision;return o<1&&(o=1),r=null!=r&&!isNaN(r)||null==this.nan_format?0==r?_.to_fixed(r,1):i?r.toExponential(o):_.to_fixed(r,o):this.nan_format,super.doFormat(t,e,r,a,n)}}r.ScientificFormatter=g,g.__name__=\"ScientificFormatter\",g.init_ScientificFormatter();class p extends h{constructor(t){super(t)}static init_NumberFormatter(){this.define((({String:t,Nullable:e})=>({format:[t,\"0,0\"],language:[t,\"en\"],rounding:[m.RoundingFunction,\"round\"],nan_format:[e(t),null]})))}doFormat(t,e,r,a,n){const{format:i,language:o,nan_format:l}=this,c=(()=>{switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}})();return r=null!=r&&!isNaN(r)||null==l?s.format(r,i,o,c):l,super.doFormat(t,e,r,a,n)}}r.NumberFormatter=p,p.__name__=\"NumberFormatter\",p.init_NumberFormatter();class S extends f{constructor(t){super(t)}static init_BooleanFormatter(){this.define((({String:t})=>({icon:[t,\"check\"]})))}doFormat(t,e,r,a,n){return r?c.i({class:this.icon}).outerHTML:\"\"}}r.BooleanFormatter=S,S.__name__=\"BooleanFormatter\",S.init_BooleanFormatter();class b extends h{constructor(t){super(t)}static init_DateFormatter(){this.define((({String:t,Nullable:e})=>({format:[t,\"ISO-8601\"],nan_format:[e(t),null]})))}getFormat(){switch(this.format){case\"ATOM\":case\"W3C\":case\"RFC-3339\":case\"ISO-8601\":return\"%Y-%m-%d\";case\"COOKIE\":return\"%a, %d %b %Y\";case\"RFC-850\":return\"%A, %d-%b-%y\";case\"RFC-1123\":case\"RFC-2822\":return\"%a, %e %b %Y\";case\"RSS\":case\"RFC-822\":case\"RFC-1036\":return\"%a, %e %b %y\";case\"TIMESTAMP\":return;default:return this.format}}doFormat(t,e,r,a,n){const{nan_format:i}=this;let s;return s=null!=(r=u.isString(r)?parseInt(r,10):r)&&!isNaN(r)&&-9223372036854776!==r||null==i?null==r?\"\":o.default(r,this.getFormat()):i,super.doFormat(t,e,s,a,n)}}r.DateFormatter=b,b.__name__=\"DateFormatter\",b.init_DateFormatter();class x extends f{constructor(t){super(t)}static init_HTMLTemplateFormatter(){this.define((({String:t})=>({template:[t,\"<%= value %>\"]})))}doFormat(t,e,r,a,n){const{template:i}=this;if(null==r)return\"\";return l._.template(i)(Object.assign(Object.assign({},n),{value:r}))}}r.HTMLTemplateFormatter=x,x.__name__=\"HTMLTemplateFormatter\",x.init_HTMLTemplateFormatter()},\n 470: function _(e,n,t,f,i){var o=e(471),d=o.template;function r(e,n,t){return d(e,n,t)}r._=o,n.exports=r,\"function\"==typeof define&&define.amd?define((function(){return r})):\"undefined\"==typeof window&&\"undefined\"==typeof navigator||(window.UnderscoreTemplate=r)},\n 471: function _(r,e,n,t,a){\n // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n // Underscore may be freely distributed under the MIT license.\n var u={},c=Array.prototype,o=Object.prototype,l=c.slice,i=o.toString,f=o.hasOwnProperty,s=c.forEach,p=Object.keys,_=Array.isArray,h=function(){},v=h.each=h.forEach=function(r,e,n){if(null!=r)if(s&&r.forEach===s)r.forEach(e,n);else if(r.length===+r.length){for(var t=0,a=r.length;t\":\">\",'\"':\""\",\"'\":\"'\"}},y={escape:new RegExp(\"[\"+h.keys(g.escape).join(\"\")+\"]\",\"g\")};h.each([\"escape\"],(function(r){h[r]=function(e){return null==e?\"\":(\"\"+e).replace(y[r],(function(e){return g[r][e]}))}})),h.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var j=/(.)^/,b={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\t\":\"t\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},w=/\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;h.template=function(r,e,n){var t;n=h.defaults({},n,h.templateSettings);var a=new RegExp([(n.escape||j).source,(n.interpolate||j).source,(n.evaluate||j).source].join(\"|\")+\"|$\",\"g\"),u=0,c=\"__p+='\";r.replace(a,(function(e,n,t,a,o){return c+=r.slice(u,o).replace(w,(function(r){return\"\\\\\"+b[r]})),n&&(c+=\"'+\\n((__t=(\"+n+\"))==null?'':_.escape(__t))+\\n'\"),t&&(c+=\"'+\\n((__t=(\"+t+\"))==null?'':__t)+\\n'\"),a&&(c+=\"';\\n\"+a+\"\\n__p+='\"),u=o+e.length,e})),c+=\"';\\n\",n.variable||(c=\"with(obj||{}){\\n\"+c+\"}\\n\"),c=\"var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\\n\"+c+\"return __p;\\n\";try{t=new Function(n.variable||\"obj\",\"_\",c)}catch(r){throw r.source=c,r}if(e)return t(e,h);var o=function(r){return t.call(this,r,h)};return o.source=\"function(\"+(n.variable||\"obj\")+\"){\\n\"+c+\"}\",o},e.exports=h},\n 472: function _(e,t,i,s,o){s();const n=e(1),l=e(473),r=e(477),d=e(478),a=e(479),h=e(34),u=e(8),c=e(9),_=e(13),m=e(19),g=e(488),p=e(467),f=e(489),b=e(490),w=n.__importStar(e(468)),x=w,C=n.__importDefault(e(491));i.AutosizeModes={fit_columns:\"FCV\",fit_viewport:\"FVC\",force_fit:\"LFF\",none:\"NOA\"};let z=!1;class v{constructor(e,t){this.init(e,t)}init(e,t){if(p.DTINDEX_NAME in e.data)throw new Error(`special name ${p.DTINDEX_NAME} cannot be used as a data table column`);this.source=e,this.view=t,this.index=[...this.view.indices]}getLength(){return this.index.length}getItem(e){const t={};for(const i of _.keys(this.source.data))t[i]=this.source.data[i][this.index[e]];return t[p.DTINDEX_NAME]=this.index[e],t}getField(e,t){return t==p.DTINDEX_NAME?this.index[e]:this.source.data[t][this.index[e]]}setField(e,t,i){const s=this.index[e];this.source.patch({[t]:[[s,i]]})}getRecords(){return c.range(0,this.getLength()).map((e=>this.getItem(e)))}getItems(){return this.getRecords()}slice(e,t,i){return e=null!=e?e:0,t=null!=t?t:this.getLength(),i=null!=i?i:1,c.range(e,t,i).map((e=>this.getItem(e)))}sort(e){let t=e.map((e=>[e.sortCol.field,e.sortAsc?1:-1]));0==t.length&&(t=[[p.DTINDEX_NAME,1]]);const i=this.getRecords(),s=this.index.slice();this.index.sort(((e,o)=>{for(const[n,l]of t){const t=i[s.indexOf(e)][n],r=i[s.indexOf(o)][n];if(t!==r)return u.isNumber(t)&&u.isNumber(r)?l*(t-r||+isNaN(t)-+isNaN(r)):`${t}`>`${r}`?l:-l}return 0}))}}i.TableDataProvider=v,v.__name__=\"TableDataProvider\";class A extends g.WidgetView{constructor(){super(...arguments),this._in_selection_update=!1,this._width=null}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.source.streaming,(()=>this.updateGrid())),this.connect(this.model.source.patching,(()=>this.updateGrid())),this.connect(this.model.source.change,(()=>this.updateGrid())),this.connect(this.model.source.properties.data.change,(()=>this.updateGrid())),this.connect(this.model.source.selected.change,(()=>this.updateSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.updateSelection()))}remove(){var e;null===(e=this.grid)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),C.default,w.default]}update_position(){super.update_position(),this.grid.resizeCanvas()}after_layout(){super.after_layout(),this.updateLayout(!0,!1)}box_sizing(){const e=super.box_sizing();return\"fit_viewport\"===this.model.autosize_mode&&null!=this._width&&(e.width=this._width),e}updateLayout(e,t){const s=this.autosize;s===i.AutosizeModes.fit_columns||s===i.AutosizeModes.force_fit?(e||this.grid.resizeCanvas(),this.grid.autosizeColumns()):e&&t&&s===i.AutosizeModes.fit_viewport&&this.invalidate_layout()}updateGrid(){if(this.model.view.compute_indices(),this.data.init(this.model.source,this.model.view),this.model.sortable){const e=this.grid.getColumns(),t=this.grid.getSortColumns().map((t=>({sortCol:{field:e[this.grid.getColumnIndex(t.columnId)].field},sortAsc:t.sortAsc})));this.data.sort(t)}this.grid.invalidate(),this.updateLayout(!0,!0)}updateSelection(){if(this._in_selection_update)return;const{selected:e}=this.model.source,t=e.indices.map((e=>this.data.index.indexOf(e))).sort();this._in_selection_update=!0,this.grid.setSelectedRows(t),this._in_selection_update=!1;const i=this.grid.getViewport(),s=this.model.get_scroll_index(i,t);null!=s&&this.grid.scrollRowToTop(s)}newIndexColumn(){return{id:h.uniqueId(),name:this.model.index_header,field:p.DTINDEX_NAME,width:this.model.index_width,behavior:\"select\",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:x.cell_index,headerCssClass:x.header_index}}css_classes(){return super.css_classes().concat(x.data_table)}get autosize(){let e;return e=!0===this.model.fit_columns?i.AutosizeModes.force_fit:!1===this.model.fit_columns?i.AutosizeModes.none:i.AutosizeModes[this.model.autosize_mode],e}render(){var e;const t=this.model.columns.map((e=>Object.assign(Object.assign({},e.toColumn()),{parent:this})));let s=null;if(\"checkbox\"==this.model.selectable&&(s=new r.CheckboxSelectColumn({cssClass:x.cell_select}),t.unshift(s.getColumnDefinition())),null!=this.model.index_position){const e=this.model.index_position,i=this.newIndexColumn();-1==e?t.push(i):e<-1?t.splice(e+1,0,i):t.splice(e,0,i)}let{reorderable:o}=this.model;!o||\"undefined\"!=typeof $&&null!=$.fn&&null!=$.fn.sortable||(z||(m.logger.warn(\"jquery-ui is required to enable DataTable.reorderable\"),z=!0),o=!1);let n=-1,h=!1;const{frozen_rows:c,frozen_columns:_}=this.model,g=null==_?-1:_-1;null!=c&&(h=c<0,n=Math.abs(c));const p={enableCellNavigation:!1!==this.model.selectable,enableColumnReorder:o,autosizeColsMode:this.autosize,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:this.model.auto_edit,autoHeight:!1,rowHeight:this.model.row_height,frozenColumn:g,frozenRow:n,frozenBottom:h},f=null!=this.grid;if(this.data=new v(this.model.source,this.model.view),this.grid=new a.Grid(this.el,this.data,t,p),this.autosize==i.AutosizeModes.fit_viewport){this.grid.autosizeColumns();let i=0;for(const s of t)i+=null!==(e=s.width)&&void 0!==e?e:0;this._width=Math.ceil(i)}if(this.grid.onSort.subscribe(((e,t)=>{if(!this.model.sortable)return;const i=t.sortCols;null!=i&&(this.data.sort(i),this.grid.invalidate(),this.updateSelection(),this.grid.render(),this.model.header_row||this._hide_header(),this.model.update_sort_columns(i))})),!1!==this.model.selectable){this.grid.setSelectionModel(new l.RowSelectionModel({selectActiveRow:null==s})),null!=s&&this.grid.registerPlugin(s);const e={dataItemColumnValueExtractor(e,t){let i=e[t.field];return u.isString(i)&&(i=i.replace(/\\n/g,\"\\\\n\")),i},includeHeaderWhenCopying:!1};this.grid.registerPlugin(new d.CellExternalCopyManager(e)),this.grid.onSelectedRowsChanged.subscribe(((e,t)=>{this._in_selection_update||(this.model.source.selected.indices=t.rows.map((e=>this.data.index[e])))})),this.updateSelection(),this.model.header_row||this._hide_header()}f&&this.updateLayout(f,!1)}_hide_header(){for(const e of this.el.querySelectorAll(\".slick-header-columns\"))e.style.height=\"0px\";this.grid.resizeCanvas()}}i.DataTableView=A,A.__name__=\"DataTableView\";class D extends f.TableWidget{constructor(e){super(e),this._sort_columns=[]}get sort_columns(){return this._sort_columns}static init_DataTable(){this.prototype.default_view=A,this.define((({Array:e,Boolean:t,Int:i,Ref:s,String:o,Enum:n,Or:l,Nullable:r})=>({autosize_mode:[n(\"fit_columns\",\"fit_viewport\",\"none\",\"force_fit\"),\"force_fit\"],auto_edit:[t,!1],columns:[e(s(b.TableColumn)),[]],fit_columns:[r(t),null],frozen_columns:[r(i),null],frozen_rows:[r(i),null],sortable:[t,!0],reorderable:[t,!0],editable:[t,!1],selectable:[l(t,n(\"checkbox\")),!0],index_position:[r(i),0],index_header:[o,\"#\"],index_width:[i,40],scroll_to_selection:[t,!0],header_row:[t,!0],row_height:[i,25]}))),this.override({width:600,height:400})}update_sort_columns(e){this._sort_columns=e.map((({sortCol:e,sortAsc:t})=>({field:e.field,sortAsc:t})))}get_scroll_index(e,t){return this.scroll_to_selection&&0!=t.length?c.some(t,(t=>e.top<=t&&t<=e.bottom))?null:Math.max(0,Math.min(...t)-1):null}}i.DataTable=D,D.__name__=\"DataTable\",D.init_DataTable()},\n 473: function _(e,t,n,o,r){var l=e(474),i=e(476);t.exports={RowSelectionModel:function(e){var t,n,o,r=[],c=this,u=new i.EventHandler,s={selectActiveRow:!0};function a(e){return function(){n||(n=!0,e.apply(this,arguments),n=!1)}}function f(e){for(var t=[],n=0;n=0&&r0&&t-1 in e)}w.fn=w.prototype={jquery:b,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.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.namespaceURI,n=(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}(e);w.find=C,w.expr=C.selectors,w.expr[\":\"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var E=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=w.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;function D(e,t,n){return h(t)?w.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):\"string\"!=typeof t?w.grep(e,(function(e){return s.call(t,e)>-1!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(\"string\"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,\"string\"==typeof e&&k.test(e)?w(e):e||[],!1).length}});var j,q=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/;(w.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,\"string\"==typeof e){if(!(r=\"<\"===e[0]&&\">\"===e[e.length-1]&&e.length>=3?[null,e,null]:q.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 w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),N.test(r[1])&&w.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,j=w(v);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?\"string\"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,\"parentNode\")},parentsUntil:function(e,t,n){return E(e,\"parentNode\",n)},next:function(e){return O(e,\"nextSibling\")},prev:function(e){return O(e,\"previousSibling\")},nextAll:function(e){return E(e,\"nextSibling\")},prevAll:function(e){return E(e,\"previousSibling\")},nextUntil:function(e,t,n){return E(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return E(e,\"previousSibling\",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,\"template\")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return\"Until\"!==e.slice(-5)&&(r=n),r&&\"string\"==typeof r&&(i=w.filter(r,i)),this.length>1&&(H[e]||w.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var P=/[^\\x20\\t\\r\\n\\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){e=\"string\"==typeof e?function(e){var t={};return w.each(e.match(P)||[],(function(e,n){t[n]=!0})),t}(e):w.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?w.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},w.extend({Deferred:function(t){var n=[[\"notify\",\"progress\",w.Callbacks(\"memory\"),w.Callbacks(\"memory\"),2],[\"resolve\",\"done\",w.Callbacks(\"once memory\"),w.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",w.Callbacks(\"once memory\"),w.Callbacks(\"once memory\"),1,\"rejected\"]],r=\"pending\",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(t){w.each(n,(function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&h(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+\"With\"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==M&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred((function(e){n[0][3].add(a(0,e,h(i)?i:R,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:R)),n[2][3].add(a(0,e,h(r)?r:M))})).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+\"With\"](this===o?void 0:this,arguments),this},o[t[0]+\"With\"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(I(e,a.done(s(n)).resolve,a.reject,!t),\"pending\"===a.state()||h(o[n]&&o[n].then)))return a.then();for(;n--;)I(o[n],s(n),a.reject);return a.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&W.test(t.name)&&e.console.warn(\"jQuery.Deferred exception: \"+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout((function(){throw t}))};var F=w.Deferred();function B(){v.removeEventListener(\"DOMContentLoaded\",B),e.removeEventListener(\"load\",B),w.ready()}w.fn.ready=function(e){return F.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(v,[w]))}}),w.ready.then=F.then,\"complete\"===v.readyState||\"loading\"!==v.readyState&&!v.documentElement.doScroll?e.setTimeout(w.ready):(v.addEventListener(\"DOMContentLoaded\",B),e.addEventListener(\"load\",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if(\"object\"===x(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,h(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){Q.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||\"fx\")+\"queue\",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||\"fx\";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t);\"inprogress\"===i&&(i=n.shift(),r--),i&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,i.call(e,(function(){w.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Y.get(e,n)||Y.access(e,n,{empty:w.Callbacks(\"once memory\").add((function(){Y.remove(e,[t+\"queue\",n])}))})}}),w.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,ge=/^$|^module$|\\/(?:java|ecma)script/i;fe=v.createDocumentFragment().appendChild(v.createElement(\"div\")),(pe=v.createElement(\"input\")).setAttribute(\"type\",\"radio\"),pe.setAttribute(\"checked\",\"checked\"),pe.setAttribute(\"name\",\"t\"),fe.appendChild(pe),d.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML=\"\",d.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML=\"\",d.option=!!fe.lastChild;var ve={thead:[1,\"\",\"
    \"],col:[2,\"\",\"
    \"],tr:[2,\"\",\"
    \"],td:[3,\"\",\"
    \"],_default:[0,\"\",\"\"]};function ye(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):void 0!==e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&A(e,t)?w.merge([e],n):n}function me(e,t){for(var n=0,r=e.length;n\",\"\"]);var xe=/<|&#?\\w+;/;function be(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=ie(o),a=ye(f.appendChild(o),\"script\"),l&&me(a),n)for(c=0;o=a[c++];)ge.test(o.type||\"\")&&n.push(o);return f}var we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\\.(.+)|)/;function Ee(){return!0}function Se(){return!1}function ke(e,t){return e===function(){try{return v.activeElement}catch(e){}}()==(\"focus\"===t)}function Ae(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)Ae(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=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each((function(){w.event.add(this,t,i,r,n)}))}function Ne(e,t,n){n?(Y.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var r,o,a=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Y.set(this,t,a),r=n(this,t),this[t](),a!==(o=Y.get(this,t))||r?Y.set(this,t,!1):o={},a!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else a.length&&(Y.set(this,t,{value:w.event.trigger(w.extend(a[0],w.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&w.event.add(e,t,Ee)}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(e);if(V(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(re,i),n.guid||(n.guid=w.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||\"\").match(P)||[\"\"]).length;l--;)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.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),w.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){for(l=(t=(t||\"\").match(P)||[\"\"]).length;l--;)if(d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d){for(f=w.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)||w.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&Y.remove(e,\"handle events\")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=w.event.fix(e),l=(Y.get(this,\"events\")||Object.create(null))[u.type]||[],c=w.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:w.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 Le(e,t){return A(e,\"table\")&&A(11!==t.nodeType?t:t.firstChild,\"tr\")&&w(e).children(\"tbody\")[0]||e}function He(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function Oe(e){return\"true/\"===(e.type||\"\").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute(\"type\"),e}function Pe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,\"handle events\"),s)for(n=0,r=s[i].length;n1&&\"string\"==typeof v&&!d.checkClone&&je.test(v))return e.each((function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Me(o,t,n,r)}));if(p&&(a=(i=be(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=w.map(ye(i,\"script\"),He)).length;f0&&me(a,!u&&ye(e,\"script\")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return $(this,(function(e){return void 0===e?w.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 Me(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return Me(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Me(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Me(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&&(w.cleanData(ye(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return $(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&&!De.test(e)&&!ve[(he.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n3,re.removeChild(t)),s}}))}();var Ue=[\"Webkit\",\"Moz\",\"ms\"],Xe=v.createElement(\"div\").style,Ve={};function Ge(e){var t=w.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;n--;)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Ke={letterSpacing:\"0\",fontWeight:\"400\"};function Ze(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||\"px\"):t}function et(e,t,n,r,i,o){var a=\"width\"===t?1:0,s=0,u=0;if(n===(r?\"border\":\"content\"))return 0;for(;a<4;a+=2)\"margin\"===n&&(u+=w.css(e,n+ne[a],!0,i)),r?(\"content\"===n&&(u-=w.css(e,\"padding\"+ne[a],!0,i)),\"margin\"!==n&&(u-=w.css(e,\"border\"+ne[a]+\"Width\",!0,i))):(u+=w.css(e,\"padding\"+ne[a],!0,i),\"padding\"!==n?u+=w.css(e,\"border\"+ne[a]+\"Width\",!0,i):s+=w.css(e,\"border\"+ne[a]+\"Width\",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!d.boxSizingReliable()||n)&&\"border-box\"===w.css(e,\"boxSizing\",!1,r),o=i,a=_e(e,t,r),s=\"offset\"+t[0].toUpperCase()+t.slice(1);if(We.test(a)){if(!n)return a;a=\"auto\"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&A(e,\"tr\")||\"auto\"===a||!parseFloat(a)&&\"inline\"===w.css(e,\"display\",!1,r))&&e.getClientRects().length&&(i=\"border-box\"===w.css(e,\"boxSizing\",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?\"border\":\"content\"),o,r,a)+\"px\"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(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=X(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=w.cssHooks[t]||w.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=te.exec(n))&&i[1]&&(n=se(e,t,i),o=\"number\"),null!=n&&n==n&&(\"number\"!==o||u||(n+=i&&i[3]||(w.cssNumber[s]?\"\":\"px\")),d.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=X(t);return Qe.test(t)||(t=Ge(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&\"get\"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),\"normal\"===i&&t in Ke&&(i=Ke[t]),\"\"===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each([\"height\",\"width\"],(function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!Ye.test(w.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,r):Be(e,Je,(function(){return tt(e,t,r)}))},set:function(e,n,r){var i,o=Fe(e),a=!d.scrollboxSize()&&\"absolute\"===o.position,s=(a||r)&&\"border-box\"===w.css(e,\"boxSizing\",!1,o),u=r?et(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-et(e,t,\"border\",!1,o)-.5)),u&&(i=te.exec(n))&&\"px\"!==(i[3]||\"px\")&&(e.style[t]=n,n=w.css(e,t)),Ze(0,n,u)}}})),w.cssHooks.marginLeft=ze(d.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(_e(e,\"marginLeft\"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+\"px\"})),w.each({margin:\"\",padding:\"\",border:\"Width\"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o=\"string\"==typeof n?n.split(\" \"):[n];r<4;r++)i[e+ne[r]+t]=o[r]||o[r-2]||o[0];return i}},\"margin\"!==e&&(w.cssHooks[e+t].set=Ze)})),w.fn.extend({css:function(e,t){return $(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a1)}}),w.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?\"\":\"px\")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=w.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):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.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=w.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},w.fx=nt.prototype.init,w.fx.step={};var rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){it&&(!1===v.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,w.fx.interval),w.fx.tick())}function ut(){return e.setTimeout((function(){rt=void 0})),rt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i[\"margin\"+(n=ne[r])]=i[\"padding\"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners[\"*\"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void w.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=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&\"radio\"===t&&A(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(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\\w+/g),(function(e,t){var n=dt[t]||w.find.attr;dt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=dt[a],dt[a]=i,i=null!=n(e,t,r)?a:null,dt[a]=o),i}}));var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(\" \")}function yt(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function mt(e){return Array.isArray(e)?e:\"string\"==typeof e&&e.match(P)||[]}w.fn.extend({prop:function(e,t){return $(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.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=w.find.attr(e,\"tabindex\");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:\"htmlFor\",class:\"className\"}}),d.optSelected||(w.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)}}),w.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each((function(t){w(this).addClass(e.call(this,t,yt(this)))}));if((t=mt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&\" \"+vt(i)+\" \"){for(a=0;o=t[a++];)r.indexOf(\" \"+o+\" \")<0&&(r+=o+\" \");i!==(s=vt(r))&&n.setAttribute(\"class\",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each((function(t){w(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr(\"class\",\"\");if((t=mt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&\" \"+vt(i)+\" \"){for(a=0;o=t[a++];)for(;r.indexOf(\" \"+o+\" \")>-1;)r=r.replace(\" \"+o+\" \",\" \");i!==(s=vt(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):h(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,yt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=w(this),a=mt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&\"boolean\"!==n||((t=yt(this))&&Y.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||!1===e?\"\":Y.get(this,\"__className__\")||\"\"))}))},hasClass:function(e){var t,n,r=0;for(t=\" \"+e+\" \";n=this[r++];)if(1===n.nodeType&&(\" \"+vt(yt(n))+\" \").indexOf(t)>-1)return!0;return!1}});var xt=/\\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i=\"\":\"number\"==typeof i?i+=\"\":Array.isArray(i)&&(i=w.map(i,(function(e){return null==e?\"\":e+\"\"}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&\"set\"in t&&void 0!==t.set(this,i,\"value\")||(this.value=i))}))):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&\"get\"in t&&void 0!==(n=t.get(i,\"value\"))?n:\"string\"==typeof(n=i.value)?n.replace(xt,\"\"):null==n?\"\":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,\"value\");return null!=t?t:vt(w.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}}}}),w.each([\"radio\",\"checkbox\"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},d.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})})),d.focusin=\"onfocusin\"in e;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,y=[r||v],m=c.call(t,\"type\")?t.type:t,x=c.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(a=d=s=r=r||v,3!==r.nodeType&&8!==r.nodeType&&!bt.test(m+w.event.triggered)&&(m.indexOf(\".\")>-1&&(x=m.split(\".\"),m=x.shift(),x.sort()),l=m.indexOf(\":\")<0&&\"on\"+m,(t=t[w.expando]?t:new w.Event(m,\"object\"==typeof t&&t)).isTrigger=i?2:3,t.namespace=x.join(\".\"),t.rnamespace=t.namespace?new RegExp(\"(^|\\\\.)\"+x.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:w.makeArray(n,[t]),p=w.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||m,bt.test(u+m)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||v)&&y.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=y[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?u:p.bindType||m,(f=(Y.get(a,\"events\")||Object.create(null))[t.type]&&Y.get(a,\"handle\"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&V(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!V(r)||l&&h(r[m])&&!g(r)&&((s=r[l])&&(r[l]=null),w.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,wt),r[m](),t.isPropagationStopped()&&d.removeEventListener(m,wt),w.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),d.focusin||w.each({focus:\"focusin\",blur:\"focusout\"},(function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t);i||r.addEventListener(e,n,!0),Y.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t)-1;i?Y.access(r,t,i):(r.removeEventListener(e,n,!0),Y.remove(r,t))}}}));var Tt=e.location,Ct={guid:Date.now()},Et=/\\?/;w.parseXML=function(t){var n;if(!t||\"string\"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(e){n=void 0}return n&&!n.getElementsByTagName(\"parsererror\").length||w.error(\"Invalid XML: \"+t),n};var St=/\\[\\]$/,kt=/\\r?\\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,(function(t,i){n||St.test(e)?r(e,i):Dt(e+\"[\"+(\"object\"==typeof i&&null!=i?t:\"\")+\"]\",i,n,r)}));else if(n||\"object\"!==x(t))r(e,t);else for(i in t)Dt(e+\"[\"+i+\"]\",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(null==e)return\"\";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){i(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,i);return r.join(\"&\")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,\"elements\");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(\":disabled\")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!de.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(kt,\"\\r\\n\")}})):{name:t.name,value:n.replace(kt,\"\\r\\n\")}})).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\\/\\//,Rt={},Mt={},It=\"*/\".concat(\"*\"),Wt=v.createElement(\"a\");function Ft(e){return function(t,n){\"string\"!=typeof t&&(n=t,t=\"*\");var r,i=0,o=t.toLowerCase().match(P)||[];if(h(n))for(;r=o[i++];)\"+\"===r[0]?(r=r.slice(1)||\"*\",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var i={},o=e===Mt;function a(s){var u;return i[s]=!0,w.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=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}Wt.href=Tt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":It,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\":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,w.ajaxSettings),t):$t(w.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(t,n){\"object\"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=w.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?w(h):w.event,y=w.Deferred(),m=w.Callbacks(\"once memory\"),x=d.statusCode||{},b={},T={},C=\"canceled\",E={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ht.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=T[e.toLowerCase()]=T[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)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),S(0,t),this}};if(y.promise(E),d.url=((t||d.url||Tt.href)+\"\").replace(Pt,Tt.protocol+\"//\"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||\"*\").toLowerCase().match(P)||[\"\"],null==d.crossDomain){u=v.createElement(\"a\");try{u.href=d.url,u.href=u.href,d.crossDomain=Wt.protocol+\"//\"+Wt.host!=u.protocol+\"//\"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&\"string\"!=typeof d.data&&(d.data=w.param(d.data,d.traditional)),Bt(Rt,d,n,E),l)return E;for(f in(c=w.event&&d.global)&&0==w.active++&&w.event.trigger(\"ajaxStart\"),d.type=d.type.toUpperCase(),d.hasContent=!Ot.test(d.type),i=d.url.replace(qt,\"\"),d.hasContent?d.data&&d.processData&&0===(d.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(d.data=d.data.replace(jt,\"+\")):(p=d.url.slice(i.length),d.data&&(d.processData||\"string\"==typeof d.data)&&(i+=(Et.test(i)?\"&\":\"?\")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Lt,\"$1\"),p=(Et.test(i)?\"&\":\"?\")+\"_=\"+Ct.guid+++p),d.url=i+p),d.ifModified&&(w.lastModified[i]&&E.setRequestHeader(\"If-Modified-Since\",w.lastModified[i]),w.etag[i]&&E.setRequestHeader(\"If-None-Match\",w.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&E.setRequestHeader(\"Content-Type\",d.contentType),E.setRequestHeader(\"Accept\",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(\"*\"!==d.dataTypes[0]?\", \"+It+\"; q=0.01\":\"\"):d.accepts[\"*\"]),d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||l))return E.abort();if(C=\"abort\",m.add(d.complete),E.done(d.success),E.fail(d.error),r=Bt(Mt,d,n,E)){if(E.readyState=1,c&&g.trigger(\"ajaxSend\",[E,d]),l)return E;d.async&&d.timeout>0&&(s=e.setTimeout((function(){E.abort(\"timeout\")}),d.timeout));try{l=!1,r.send(b,S)}catch(e){if(l)throw e;S(-1,e)}}else S(-1,\"No Transport\");function S(t,n,a,u){var f,p,v,b,T,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||\"\",E.readyState=t>0?4:0,f=t>=200&&t<300||304===t,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,E,a)),!f&&w.inArray(\"script\",d.dataTypes)>-1&&(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,E,f),f?(d.ifModified&&((T=E.getResponseHeader(\"Last-Modified\"))&&(w.lastModified[i]=T),(T=E.getResponseHeader(\"etag\"))&&(w.etag[i]=T)),204===t||\"HEAD\"===d.type?C=\"nocontent\":304===t?C=\"notmodified\":(C=b.state,p=b.data,f=!(v=b.error))):(v=C,!t&&C||(C=\"error\",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+\"\",f?y.resolveWith(h,[p,C,E]):y.rejectWith(h,[E,C,v]),E.statusCode(x),x=void 0,c&&g.trigger(f?\"ajaxSuccess\":\"ajaxError\",[E,d,f?p:v]),m.fireWith(h,[E,C]),c&&(g.trigger(\"ajaxComplete\",[E,d]),--w.active||w.event.trigger(\"ajaxStop\")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,\"json\")},getScript:function(e,t){return w.get(e,void 0,t,\"script\")}}),w.each([\"get\",\"post\"],(function(e,t){w[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)\"content-type\"===t.toLowerCase()&&(e.contentType=e.headers[t]||\"\")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,converters:{\"text script\":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=w(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 h(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=h(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not(\"body\").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=w.ajaxSettings.xhr();d.cors=!!zt&&\"withCredentials\"in zt,d.ajax=zt=!!zt,w.ajaxTransport((function(t){var n,r;if(d.cors||zt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i[\"X-Requested-With\"]||(i[\"X-Requested-With\"]=\"XMLHttpRequest\"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=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(_t[s.status]||s.status,s.statusText,\"text\"!==(s.responseType||\"text\")||\"string\"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n(\"error\"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n(\"abort\");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.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 w.globalEval(e),e}}}),w.ajaxPrefilter(\"script\",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")})),w.ajaxTransport(\"script\",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=w(\"